jquery-ui.js 2
jquery-ui.js 2
js
var uuid = 0,
runiqueId = /^ui-id-\d+$/;
$.extend( $.ui, {
version: "1.10.3",
keyCode: {
BACKSPACE: 8,
COMMA: 188,
DELETE: 46,
DOWN: 40,
END: 35,
ENTER: 13,
ESCAPE: 27,
HOME: 36,
LEFT: 37,
NUMPAD_ADD: 107,
NUMPAD_DECIMAL: 110,
NUMPAD_DIVIDE: 111,
NUMPAD_ENTER: 108,
NUMPAD_MULTIPLY: 106,
NUMPAD_SUBTRACT: 109,
PAGE_DOWN: 34,
PAGE_UP: 33,
PERIOD: 190,
RIGHT: 39,
SPACE: 32,
TAB: 9,
UP: 38
}
});
// plugins
$.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 ),
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 1/238
8/2/25, 1:46 PM jquery-ui.js
scrollParent: function() {
var scrollParent;
if (($.ui.ie && (/(static|relative)/).test(this.css("position"))) ||
(/absolute/).test(this.css("position"))) {
scrollParent = this.parents().filter(function() {
return
(/(relative|absolute|fixed)/).test($.css(this,"position")) &&
(/(auto|scroll)/).test($.css(this,"overflow")+$.css(this,"overflow-
y")+$.css(this,"overflow-x"));
}).eq(0);
} else {
scrollParent = this.parents().filter(function() {
return
(/(auto|scroll)/).test($.css(this,"overflow")+$.css(this,"overflow-
y")+$.css(this,"overflow-x"));
}).eq(0);
}
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
// 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;
},
uniqueId: function() {
return this.each(function() {
if ( !this.id ) {
this.id = "ui-id-" + (++uuid);
}
});
},
removeUniqueId: function() {
return this.each(function() {
if ( runiqueId.test( this.id ) ) {
$( this ).removeAttr( "id" );
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 2/238
8/2/25, 1:46 PM jquery-ui.js
}
});
}
});
// 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/9INBHF22/jquery-ui.js 3/238
8/2/25, 1:46 PM jquery-ui.js
};
return this.each(function() {
$( this ).css( type, reduce( this, size ) + "px" );
});
};
return this.each(function() {
$( this).css( type, reduce( this, size, true, margin ) +
"px" );
});
};
});
}
// deprecated
$.ui.ie = !!/msie [\w.]+/.exec( navigator.userAgent.toLowerCase() );
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 4/238
8/2/25, 1:46 PM jquery-ui.js
enableSelection: function() {
return this.unbind( ".ui-disableSelection" );
}
});
$.extend( $.ui, {
// $.ui.plugin is deprecated. Use $.widget() extensions instead.
plugin: {
add: function( module, option, set ) {
var i,
proto = $.ui[ module ].prototype;
for ( i in set ) {
proto.plugins[ i ] = proto.plugins[ i ] || [];
proto.plugins[ i ].push( [ option, set[ i ] ] );
}
},
call: function( instance, name, args ) {
var i,
set = instance.plugins[ name ];
if ( !set || !instance.element[ 0 ].parentNode ||
instance.element[ 0 ].parentNode.nodeType === 11 ) {
return;
}
//If overflow is hidden, the element might have extra content, but the
user wants to hide it
if ( $( el ).css( "overflow" ) === "hidden") {
return false;
}
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 5/238
8/2/25, 1:46 PM jquery-ui.js
})( jQuery );
(function( $, undefined ) {
var uuid = 0,
slice = Array.prototype.slice,
_cleanData = $.cleanData;
$.cleanData = function( elems ) {
for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
try {
$( elem ).triggerHandler( "remove" );
// http://bugs.jquery.com/ticket/8235
} catch( e ) {}
}
_cleanData( elems );
};
if ( !prototype ) {
prototype = base;
base = $.Widget;
}
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 6/238
8/2/25, 1:46 PM jquery-ui.js
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
}, 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/9INBHF22/jquery-ui.js 7/238
8/2/25, 1:46 PM jquery-ui.js
inputLength = input.length,
key,
value;
for ( ; inputIndex < inputLength; inputIndex++ ) {
for ( key in input[ inputIndex ] ) {
value = input[ inputIndex ][ key ];
if ( input[ inputIndex ].hasOwnProperty( key ) && value !==
undefined ) {
// Clone objects
if ( $.isPlainObject( value ) ) {
target[ key ] = $.isPlainObject( target[ key ] )
?
$.widget.extend( {}, target[ key ], value
) :
// Don't extend strings, arrays, etc.
with objects
$.widget.extend( {}, value );
// Copy everything else by reference
} else {
target[ key ] = value;
}
}
}
}
return target;
};
if ( isMethodCall ) {
this.each(function() {
var methodValue,
instance = $.data( this, fullName );
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 !==
undefined ) {
returnValue = methodValue && methodValue.jquery ?
returnValue.pushStack( methodValue.get()
) :
methodValue;
return false;
}
});
} else {
this.each(function() {
var instance = $.data( this, fullName );
if ( instance ) {
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 8/238
8/2/25, 1:46 PM jquery-ui.js
instance.option( options || {} )._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 = uuid++;
this.eventNamespace = "." + this.widgetName + this.uuid;
this.options = $.widget.extend( {},
this.options,
this._getCreateOptions(),
options );
this.bindings = $();
this.hoverable = $();
this.focusable = $();
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
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 9/238
8/2/25, 1:46 PM jquery-ui.js
// all event bindings should go through this._on()
this.element
.unbind( this.eventNamespace )
// 1.9 BC for #7810
// TODO remove dual storage
.removeData( this.widgetName )
.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 );
}
this._setOptions( options );
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 10/238
8/2/25, 1:46 PM jquery-ui.js
return this;
},
_setOptions: function( options ) {
var key;
return this;
},
_setOption: function( key, value ) {
this.options[ key ] = value;
return this;
},
enable: function() {
return this._setOption( "disabled", false );
},
disable: function() {
return this._setOption( "disabled", true );
},
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 11/238
8/2/25, 1:46 PM jquery-ui.js
.apply( instance, arguments );
}
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 12/238
8/2/25, 1:46 PM jquery-ui.js
this.widgetEventPrefix + type ).toLowerCase();
// the original event may come from any element
// so we need to reset the target on the new event
event.target = this.element[ 0 ];
})( jQuery );
(function( $, undefined ) {
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 13/238
8/2/25, 1:46 PM jquery-ui.js
$.widget("ui.mouse", {
version: "1.10.3",
options: {
cancel: "input,textarea,button,select,option",
distance: 1,
delay: 0
},
_mouseInit: function() {
var that = this;
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 ) {
$(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 ) { return; }
this._mouseDownEvent = event;
this.mouseDelayMet = !this.options.delay;
if (!this.mouseDelayMet) {
this._mouseDelayTimer = setTimeout(function() {
that.mouseDelayMet = true;
}, this.options.delay);
}
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 14/238
8/2/25, 1:46 PM jquery-ui.js
event.preventDefault();
return true;
}
}
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);
}
if (this._mouseStarted) {
this._mouseDrag(event);
return event.preventDefault();
}
return !this._mouseStarted;
},
_mouseUp: function(event) {
$(document)
.unbind("mousemove."+this.widgetName, this._mouseMoveDelegate)
.unbind("mouseup."+this.widgetName, this._mouseUpDelegate);
if (this._mouseStarted) {
this._mouseStarted = false;
this._mouseStop(event);
}
return false;
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 15/238
8/2/25, 1:46 PM jquery-ui.js
},
_mouseDistanceMet: function(event) {
return (Math.max(
Math.abs(this._mouseDownEvent.pageX - event.pageX),
Math.abs(this._mouseDownEvent.pageY - event.pageY)
) >= this.options.distance
);
},
})(jQuery);
(function( $, undefined ) {
$.widget("ui.draggable", $.ui.mouse, {
version: "1.10.3",
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,
stack: false,
zIndex: false,
// callbacks
drag: null,
start: null,
stop: null
},
_create: function() {
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 16/238
8/2/25, 1:46 PM jquery-ui.js
this.element.addClass("ui-draggable-disabled");
}
this._mouseInit();
},
_destroy: function() {
this.element.removeClass( "ui-draggable ui-draggable-dragging ui-
draggable-disabled" );
this._mouseDestroy();
},
_mouseCapture: function(event) {
var o = this.options;
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.
*/
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 17/238
8/2/25, 1:46 PM jquery-ui.js
this._cacheMargins();
$.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
});
//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;
},
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 18/238
8/2/25, 1:46 PM jquery-ui.js
// reset any necessary cached properties (see #5009)
if ( this.offsetParentCssPosition === "fixed" ) {
this.offset.parent = this._getParentOffset();
}
//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;
}
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);
}
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 19/238
8/2/25, 1:46 PM jquery-ui.js
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;
},
_getHandle: function(event) {
return this.options.handle ?
!!$( event.target ).closest( this.element.find(
this.options.handle ) ).length :
true;
},
_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;
}
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 20/238
8/2/25, 1:46 PM jquery-ui.js
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),
left: po.left +
(parseInt(this.offsetParent.css("borderLeftWidth"),10) || 0)
};
},
_getRelativeOffset: function() {
},
_cacheMargins: function() {
this.margins = {
left: (parseInt(this.element.css("marginLeft"),10) || 0),
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 21/238
8/2/25, 1:46 PM jquery-ui.js
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() {
if ( !o.containment ) {
this.containment = null;
return;
}
c = $( o.containment );
ce = c[ 0 ];
if( !ce ) {
return;
}
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 22/238
8/2/25, 1:46 PM jquery-ui.js
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.relative_container = c;
},
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.scrollParent.scrollTop() : 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.scrollParent.scrollLeft() : this.offset.scroll.left ) * mod )
)
};
},
_generatePosition: function(event) {
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 23/238
8/2/25, 1:46 PM jquery-ui.js
//Cache the scroll
if (!this.offset.scroll) {
this.offset.scroll = {top : scroll.scrollTop(), left :
scroll.scrollLeft()};
}
/*
* - Position constraining -
* Constrain the position to a mix of grid, 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)
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 24/238
8/2/25, 1:46 PM jquery-ui.js
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() : 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.scrollParent.scrollLeft() : 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;
},
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) {
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 25/238
8/2/25, 1:46 PM jquery-ui.js
});
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) {
//If we are still over the sortable, we fake the stop event of the
sortable, but also remove helper
var inst = $(this).data("ui-draggable"),
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) {
$.each(inst.sortables, function() {
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 26/238
8/2/25, 1:46 PM jquery-ui.js
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) &&
$.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;
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 27/238
8/2/25, 1:46 PM jquery-ui.js
this.instance._mouseDrag(event);
}
} else {
this.instance.isOver = 0;
this.instance.cancelHelperRemoval = true;
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() {
var t = $("body"), o = $(this).data("ui-draggable").options;
if (t.css("cursor")) {
o._cursor = t.css("cursor");
}
t.css("cursor", o.cursor);
},
stop: function() {
var o = $(this).data("ui-draggable").options;
if (o._cursor) {
$("body").css("cursor", o._cursor);
}
}
});
$.ui.plugin.add("draggable", "opacity", {
start: function(event, ui) {
var t = $(ui.helper), o = $(this).data("ui-draggable").options;
if(t.css("opacity")) {
o._opacity = t.css("opacity");
}
t.css("opacity", o.opacity);
},
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 28/238
8/2/25, 1:46 PM jquery-ui.js
stop: function(event, ui) {
var o = $(this).data("ui-draggable").options;
if(o._opacity) {
$(ui.helper).css("opacity", o._opacity);
}
}
});
$.ui.plugin.add("draggable", "scroll", {
start: function() {
var i = $(this).data("ui-draggable");
if(i.scrollParent[0] !== document && i.scrollParent[0].tagName !==
"HTML") {
i.overflowOffset = i.scrollParent.offset();
}
},
drag: function( event ) {
} else {
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 29/238
8/2/25, 1:46 PM jquery-ui.js
$(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed);
}
}
}
});
$.ui.plugin.add("draggable", "snap", {
start: function() {
var i = $(this).data("ui-draggable"),
o = i.options;
i.snapElements = [];
},
drag: function(event, ui) {
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/9INBHF22/jquery-ui.js 30/238
8/2/25, 1:46 PM jquery-ui.js
inst._convertPositionTo("relative", { top: t - inst.helperProportions.height, left: 0
}).top - inst.margins.top;
}
if(bs) {
ui.position.top =
inst._convertPositionTo("relative", { top: b, left: 0 }).top - inst.margins.top;
}
if(ls) {
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() {
var min,
o = this.data("ui-draggable").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/9INBHF22/jquery-ui.js 31/238
8/2/25, 1:46 PM jquery-ui.js
min = parseInt($(group[0]).css("zIndex"), 10) || 0;
$(group).each(function(i) {
$(this).css("zIndex", min + i);
});
this.css("zIndex", (min + group.length));
}
});
$.ui.plugin.add("draggable", "zIndex", {
start: function(event, ui) {
var t = $(ui.helper), o = $(this).data("ui-draggable").options;
if(t.css("zIndex")) {
o._zIndex = t.css("zIndex");
}
t.css("zIndex", o.zIndex);
},
stop: function(event, ui) {
var o = $(this).data("ui-draggable").options;
if(o._zIndex) {
$(ui.helper).css("zIndex", o._zIndex);
}
}
});
})(jQuery);
(function( $, undefined ) {
$.widget("ui.droppable", {
version: "1.10.3",
widgetEventPrefix: "drop",
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 o = this.options,
accept = o.accept;
this.isover = false;
this.isout = true;
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 32/238
8/2/25, 1:46 PM jquery-ui.js
|| [];
$.ui.ddmanager.droppables[o.scope].push(this);
},
_destroy: function() {
var i = 0,
drop = $.ui.ddmanager.droppables[this.options.scope];
this.element.removeClass("ui-droppable ui-droppable-disabled");
},
_activate: function(event) {
var draggable = $.ui.ddmanager.current;
if(this.options.activeClass) {
this.element.addClass(this.options.activeClass);
}
if(draggable){
this._trigger("activate", event, this.ui(draggable));
}
},
_deactivate: function(event) {
var draggable = $.ui.ddmanager.current;
if(this.options.activeClass) {
this.element.removeClass(this.options.activeClass);
}
if(draggable){
this._trigger("deactivate", event, this.ui(draggable));
}
},
_over: function(event) {
if (this.accept.call(this.element[0],(draggable.currentItem ||
draggable.element))) {
if(this.options.hoverClass) {
this.element.addClass(this.options.hoverClass);
}
this._trigger("over", event, this.ui(draggable));
}
},
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 33/238
8/2/25, 1:46 PM jquery-ui.js
_out: function(event) {
if (this.accept.call(this.element[0],(draggable.currentItem ||
draggable.element))) {
if(this.options.hoverClass) {
this.element.removeClass(this.options.hoverClass);
}
this._trigger("out", event, this.ui(draggable));
}
},
_drop: function(event,custom) {
this.element.find(":data(ui-droppable)").not(".ui-draggable-
dragging").each(function() {
var inst = $.data(this, "ui-droppable");
if(
inst.options.greedy &&
!inst.options.disabled &&
inst.options.scope === draggable.options.scope &&
inst.accept.call(inst.element[0], (draggable.currentItem
|| draggable.element)) &&
$.ui.intersect(draggable, $.extend(inst, { offset:
inst.element.offset() }), inst.options.tolerance)
) { childrenIntersection = true; return false; }
});
if(childrenIntersection) {
return false;
}
if(this.accept.call(this.element[0],(draggable.currentItem ||
draggable.element))) {
if(this.options.activeClass) {
this.element.removeClass(this.options.activeClass);
}
if(this.options.hoverClass) {
this.element.removeClass(this.options.hoverClass);
}
this._trigger("drop", event, this.ui(draggable));
return this.element;
}
return false;
},
ui: function(c) {
return {
draggable: (c.currentItem || c.element),
helper: c.helper,
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 34/238
8/2/25, 1:46 PM jquery-ui.js
position: c.position,
offset: c.positionAbs
};
}
});
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":
draggableLeft = ((draggable.positionAbs ||
draggable.position.absolute).left + (draggable.clickOffset ||
draggable.offset.click).left);
draggableTop = ((draggable.positionAbs ||
draggable.position.absolute).top + (draggable.clickOffset ||
draggable.offset.click).top);
return isOverAxis( draggableTop, t, droppable.proportions.height
) && isOverAxis( draggableLeft, 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] || [],
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 35/238
8/2/25, 1:46 PM jquery-ui.js
type = event ? event.type : null, // workaround for #2317
list = (t.currentItem || t.element).find(":data(ui-
droppable)").addBack();
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)) {
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() {
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 36/238
8/2/25, 1:46 PM jquery-ui.js
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.
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 $.data(this, "ui-droppable").options.scope
=== scope;
});
if (parent.length) {
parentInstance = $.data(parent[0], "ui-
droppable");
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" );
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 37/238
8/2/25, 1:46 PM jquery-ui.js
//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 );
}
}
};
})(jQuery);
(function( $, undefined ) {
function num(v) {
return parseInt(v, 10) || 0;
}
function isNumber(value) {
return !isNaN(parseInt(value, 10));
}
$.widget("ui.resizable", $.ui.mouse, {
version: "1.10.3",
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
},
_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
});
if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)) {
//Create a wrapper element and set the wrapper to the new current
internal element
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 38/238
8/2/25, 1:46 PM jquery-ui.js
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.elementIsWrapper = true;
n = this.handles.split(",");
this.handles = {};
handle = $.trim(n[i]);
hname = "ui-resizable-"+handle;
axis = $("<div class='ui-resizable-handle " + hname + "'>
</div>");
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 39/238
8/2/25, 1:46 PM jquery-ui.js
if ("se" === handle) {
axis.addClass("ui-icon ui-icon-gripsmall-
diagonal-se");
}
this._renderAxis = function(target) {
for(i in this.handles) {
target.css(padPos, padWrapper);
this._proportionallyResize();
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 40/238
8/2/25, 1:46 PM jquery-ui.js
(se|sw|ne|nw|n|e|s|w)/i);
}
//Axis, default = se
that.axis = axis && axis[1] ? axis[1] : "se";
}
});
},
_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) {
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 41/238
8/2/25, 1:46 PM jquery-ui.js
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) {
this.resizing = true;
this._renderProxy();
curleft = num(this.helper.css("left"));
curtop = num(this.helper.css("top"));
if (o.containment) {
curleft += $(o.containment).scrollLeft() || 0;
curtop += $(o.containment).scrollTop() || 0;
}
//Aspect Ratio
this.aspectRatio = (typeof o.aspectRatio === "number") ? o.aspectRatio :
((this.originalSize.width / this.originalSize.height) || 1);
el.addClass("ui-resizable-resizing");
this._propagate("start", event);
return true;
},
_mouseDrag: function(event) {
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 42/238
8/2/25, 1:46 PM jquery-ui.js
//Increase performance, avoid regex
var data,
el = this.helper, props = {},
smp = this.originalMousePosition,
a = this.axis,
prevTop = this.position.top,
prevLeft = this.position.left,
prevWidth = this.size.width,
prevHeight = this.size.height,
dx = (event.pageX-smp.left)||0,
dy = (event.pageY-smp.top)||0,
trigger = this._change[a];
if (!trigger) {
return false;
}
// Put this in the mouseDrag handler since the user can start pressing
shift while resizing
this._updateVirtualBoundaries(event.shiftKey);
if (this._aspectRatio || event.shiftKey) {
data = this._updateRatio(data, event);
}
this._updateCache(data);
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;
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 43/238
8/2/25, 1:46 PM jquery-ui.js
ista = pr.length && (/textarea/i).test(pr[0].nodeName);
soffseth = ista && $.ui.hasScroll(pr[0], "left") /* TODO - jump
height */ ? 0 : that.sizeDiff.height;
soffsetw = ista ? 0 : that.sizeDiff.width;
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) {
this.helper.remove();
}
return false;
},
_updateVirtualBoundaries: function(forceAspectRatio) {
var pMinWidth, pMaxWidth, pMinHeight, pMaxHeight, b,
o = this.options;
b = {
minWidth: isNumber(o.minWidth) ? o.minWidth : 0,
maxWidth: isNumber(o.maxWidth) ? o.maxWidth : Infinity,
minHeight: isNumber(o.minHeight) ? o.minHeight : 0,
maxHeight: isNumber(o.maxHeight) ? o.maxHeight : Infinity
};
if(this._aspectRatio || forceAspectRatio) {
// We want to create an enclosing box whose aspect ration is the
requested one
// First, compute the "projected" size for each dimension based
on the aspect ratio and other dimension
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/9INBHF22/jquery-ui.js 44/238
8/2/25, 1:46 PM jquery-ui.js
b.maxHeight = pMaxHeight;
}
}
this._vBoundaries = b;
},
_updateCache: function(data) {
this.offset = this.helper.offset();
if (isNumber(data.left)) {
this.position.left = data.left;
}
if (isNumber(data.top)) {
this.position.top = data.top;
}
if (isNumber(data.height)) {
this.size.height = data.height;
}
if (isNumber(data.width)) {
this.size.width = data.width;
}
},
if (isNumber(data.height)) {
data.width = (data.height * this.aspectRatio);
} else if (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 = isNumber(data.width) && o.maxWidth && (o.maxWidth <
data.width), ismaxh = isNumber(data.height) && o.maxHeight && (o.maxHeight <
data.height),
isminw = isNumber(data.width) && o.minWidth && (o.minWidth >
data.width), isminh = 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) {
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 45/238
8/2/25, 1:46 PM jquery-ui.js
data.height = o.maxHeight;
}
return data;
},
_proportionallyResize: function() {
if (!this._proportionallyResizeElements.length) {
return;
}
prel = this._proportionallyResizeElements[i];
if (!this.borderDif) {
this.borderDif = [];
borders = [prel.css("borderTopWidth"),
prel.css("borderRightWidth"), prel.css("borderBottomWidth"),
prel.css("borderLeftWidth")];
paddings = [prel.css("paddingTop"),
prel.css("paddingRight"), prel.css("paddingBottom"), prel.css("paddingLeft")];
prel.css({
height: (element.height() - this.borderDif[0] -
this.borderDif[2]) || 0,
width: (element.width() - this.borderDif[1] -
this.borderDif[3]) || 0
});
},
_renderProxy: function() {
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 46/238
8/2/25, 1:46 PM jquery-ui.js
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),
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,
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 47/238
8/2/25, 1:46 PM jquery-ui.js
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)
};
}
}
);
}
});
$.ui.plugin.add("resizable", "containment", {
start: function() {
var element, p, co, ch, cw, width, height,
that = $(this).data("ui-resizable"),
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 48/238
8/2/25, 1:46 PM jquery-ui.js
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
};
}
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;
width = ($.ui.hasScroll(ce, "left") ? ce.scrollWidth : cw );
height = ($.ui.hasScroll(ce) ? ce.scrollHeight : ch);
that.parentData = {
element: ce, left: co.left, top: co.top, width: width,
height: height
};
}
},
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 49/238
8/2/25, 1:46 PM jquery-ui.js
if (cp.top < (that._helper ? co.top : 0)) {
that.size.height = that.size.height + (that._helper ?
(that.position.top - co.top) : that.position.top);
if (pRatio) {
that.size.width = that.size.height * that.aspectRatio;
}
that.position.top = that._helper ? co.top : 0;
}
that.offset.left = that.parentData.left+that.position.left;
that.offset.top = that.parentData.top+that.position.top;
stop: function(){
var that = $(this).data("ui-resizable"),
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", {
start: function () {
var that = $(this).data("ui-resizable"),
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 50/238
8/2/25, 1:46 PM jquery-ui.js
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)
});
});
};
el.css(style);
});
};
stop: function () {
$(this).removeData("resizable-alsoresize");
}
});
$.ui.plugin.add("resizable", "ghost", {
start: function() {
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 51/238
8/2/25, 1:46 PM jquery-ui.js
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).data("ui-resizable");
if (that.ghost) {
that.ghost.css({ position: "relative", height: that.size.height,
width: that.size.width });
}
},
stop: function() {
var that = $(this).data("ui-resizable");
if (that.ghost && that.helper) {
that.helper.get(0).removeChild(that.ghost.get(0));
}
}
});
$.ui.plugin.add("resizable", "grid", {
resize: function() {
var that = $(this).data("ui-resizable"),
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),
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 = newWidth + gridX;
}
if (isMinHeight) {
newHeight = newHeight + gridY;
}
if (isMaxWidth) {
newWidth = newWidth - gridX;
}
if (isMaxHeight) {
newHeight = newHeight - gridY;
}
if (/^(se|s|e)$/.test(a)) {
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 52/238
8/2/25, 1:46 PM jquery-ui.js
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 {
that.size.width = newWidth;
that.size.height = newHeight;
that.position.top = op.top - oy;
that.position.left = op.left - ox;
}
}
});
})(jQuery);
(function( $, undefined ) {
$.widget("ui.selectable", $.ui.mouse, {
version: "1.10.3",
options: {
appendTo: "body",
autoRefresh: true,
distance: 0,
filter: "*",
tolerance: "touch",
// callbacks
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;
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 53/238
8/2/25, 1:46 PM jquery-ui.js
};
this.refresh();
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);
// 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-
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 54/238
8/2/25, 1:46 PM jquery-ui.js
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],
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;
}
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 55/238
8/2/25, 1:46 PM jquery-ui.js
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
});
}
}
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
});
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 56/238
8/2/25, 1:46 PM jquery-ui.js
});
$(".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);
(function( $, undefined ) {
function isFloating(item) {
return (/left|right/).test(item.css("float")) || (/inline|table-
cell/).test(item.css("display"));
}
$.widget("ui.sortable", $.ui.mouse, {
version: "1.10.3",
widgetEventPrefix: "sort",
ready: false,
options: {
appendTo: "parent",
axis: false,
connectWith: false,
containment: false,
cursor: "auto",
cursorAt: false,
dropOnEmpty: true,
forcePlaceholderSize: false,
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,
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 57/238
8/2/25, 1:46 PM jquery-ui.js
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");
//We're ready to go
this.ready = true;
},
_destroy: function() {
this.element
.removeClass("ui-sortable ui-sortable-disabled");
this._mouseDestroy();
return this;
},
if (this.reverting) {
return false;
}
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 58/238
8/2/25, 1:46 PM jquery-ui.js
//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;
}
}
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.
*/
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 59/238
8/2/25, 1:46 PM jquery-ui.js
top: this.offset.top - this.margins.top,
left: this.offset.left - this.margins.left
};
$.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");
//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 );
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 60/238
8/2/25, 1:46 PM jquery-ui.js
}
this.helper.css("zIndex", o.zIndex);
}
//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());
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) {
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 61/238
8/2/25, 1:46 PM jquery-ui.js
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 {
//Rearrange
for (i = this.items.length - 1; i >= 0; i--) {
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 62/238
8/2/25, 1:46 PM jquery-ui.js
// currentContainer is switched before the placeholder is moved.
//
// Without this moving items in "sub-sortables" can cause the
placeholder to jitter
// beetween the outer and inner container.
if (item.instance !== this.currentContainer) {
continue;
}
//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 = {};
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 63/238
8/2/25, 1:46 PM jquery-ui.js
this.margins.left + (this.offsetParent[0] === document.body ? 0 :
this.offsetParent[0].scrollLeft);
}
if ( !axis || axis === "y" ) {
animation.top = cur.top - this.offset.parent.top -
this.margins.top + (this.offsetParent[0] === document.body ? 0 :
this.offsetParent[0].scrollTop);
}
this.reverting = true;
$(this.helper).animate( animation, parseInt(this.options.revert,
10) || 500, function() {
that._clear(event);
});
} else {
this._clear(event, noPropagation);
}
return false;
},
cancel: function() {
if(this.dragging) {
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 {
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 64/238
8/2/25, 1:46 PM jquery-ui.js
$(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("&");
},
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;
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 65/238
8/2/25, 1:46 PM jquery-ui.js
return isOverElement;
} else {
}
},
_intersectsWithPointer: function(item) {
if (!isOverElement) {
return false;
}
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.refreshPositions();
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 66/238
8/2/25, 1:46 PM jquery-ui.js
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]);
}
}
}
}
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]);
return $(items);
},
_removeCurrentsFromItems: function() {
},
_refreshItems: function(event) {
this.items = [];
this.containers = [this];
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 67/238
8/2/25, 1:46 PM jquery-ui.js
queries = [[$.isFunction(this.options.items) ?
this.options.items.call(this.element[0], event, { item: this.currentItem }) :
$(this.options.items, this.element), this]],
connectWith = this._connectWith();
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);
}
}
}
}
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();
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 68/238
8/2/25, 1:46 PM jquery-ui.js
item.height = t.outerHeight();
}
p = t.offset();
item.left = p.left;
item.top = p.top;
}
return this;
},
_createPlaceholder: function(that) {
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) {
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 69/238
8/2/25, 1:46 PM jquery-ui.js
enabled to force it even if a class name is specified
if(className && !o.forcePlaceholderSize) {
return;
}
//Update the size of the placeholder (TODO: Logic to fuzzy, see line
316/317)
o.placeholder.update(that, that.placeholder);
},
_contactContainers: function(event) {
var i, j, dist, itemWithLeastDistance, posProperty, sizeProperty, base,
cur, nearBottom, floating,
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;
}
}
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 70/238
8/2/25, 1:46 PM jquery-ui.js
}
// 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 ||
isFloating(this.currentItem);
posProperty = floating ? "left" : "top";
sizeProperty = floating ? "width" : "height";
base = this.positionAbs[posProperty] +
this.offset.click[posProperty];
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;
}
if (floating && !isOverAxis(this.positionAbs.top +
this.offset.click.top, this.items[j].top, this.items[j].height)) {
continue;
}
cur = this.items[j].item.offset()[posProperty];
nearBottom = false;
if(Math.abs(cur - base) > Math.abs(cur + this.items[j]
[sizeProperty] - base)){
nearBottom = true;
cur += this.items[j][sizeProperty];
}
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];
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 71/238
8/2/25, 1:46 PM jquery-ui.js
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);
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() {
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 72/238
8/2/25, 1:46 PM jquery-ui.js
//Get the offsetParent and cache its position
this.offsetParent = this.helper.offsetParent();
var po = this.offsetParent.offset();
return {
top: po.top +
(parseInt(this.offsetParent.css("borderTopWidth"),10) || 0),
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() {
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 73/238
8/2/25, 1:46 PM jquery-ui.js
o = this.options;
if(o.containment === "parent") {
o.containment = this.helper[0].parentNode;
}
if(o.containment === "document" || o.containment === "window") {
this.containment = [
0 - this.offset.relative.left - this.offset.parent.left,
0 - this.offset.relative.top - this.offset.parent.top,
$(o.containment === "document" ? document :
window).width() - this.helperProportions.width - this.margins.left,
($(o.containment === "document" ? document :
window).height() || document.body.parentNode.scrollHeight) -
this.helperProportions.height - this.margins.top
];
}
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,
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" ? -
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 74/238
8/2/25, 1:46 PM jquery-ui.js
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();
}
/*
* - 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;
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 75/238
8/2/25, 1:46 PM jquery-ui.js
this.originalPageX) / o.grid[0]) * o.grid[0];
pageX = this.containment ? ( (left -
this.offset.click.left >= this.containment[0] && left - this.offset.click.left <=
this.containment[2]) ? left : ((left - this.offset.click.left >= this.containment[0]) ?
left - o.grid[0] : left + o.grid[0])) : left;
}
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 +
// 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
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 76/238
8/2/25, 1:46 PM jquery-ui.js
var i,
delayedTriggers = [];
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 77/238
8/2/25, 1:46 PM jquery-ui.js
this.storedStylesheet.remove();
}
if(this._storedOpacity) {
this.helper.css("opacity", this._storedOpacity);
}
if(this._storedZIndex) {
this.helper.css("zIndex", this._storedZIndex === "auto" ? "" :
this._storedZIndex);
}
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());
}
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
};
}
});
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 78/238
8/2/25, 1:46 PM jquery-ui.js
})(jQuery);
(function($, undefined) {
$.effects = {
effect: {}
};
/*!
* jQuery Color Animations v2.1.2
* https://github.com/jquery/jquery-color
*
* Copyright 2013 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/9INBHF22/jquery-ui.js 79/238
8/2/25, 1:46 PM jquery-ui.js
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,
type: "percent"
}
}
}
},
propTypes = {
"byte": {
floor: true,
max: 255
},
"percent": {
max: 1
},
"degrees": {
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 80/238
8/2/25, 1:46 PM jquery-ui.js
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;
}
string = string.toLowerCase();
if ( values ) {
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 81/238
8/2/25, 1:46 PM jquery-ui.js
parsed = inst[ spaceName ]( values );
// named colors
return colors[ string ];
}
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 82/238
8/2/25, 1:46 PM jquery-ui.js
each( spaces, function( spaceName, space ) {
var cache = space.cache;
each( space.props, function( key, prop ) {
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 83/238
8/2/25, 1:46 PM jquery-ui.js
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();
if ( rgba[ 3 ] === 1 ) {
rgba.pop();
prefix = "rgb(";
}
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 84/238
8/2/25, 1:46 PM jquery-ui.js
return prefix + rgba.join() + ")";
},
toHslaString: function() {
var prefix = "hsla(",
hsla = jQuery.map( this.hsla(), function( v, i ) {
if ( v == null ) {
v = i > 2 ? 1 : 0;
}
// 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;
}
if ( h * 3 < 2 ) {
return p + (q - p) * ((2/3) - h) * 6;
}
return p;
}
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 85/238
8/2/25, 1:46 PM jquery-ui.js
a = rgba[ 3 ],
max = Math.max( r, g, b ),
min = Math.min( r, g, b ),
diff = max - min,
add = max + min,
l = add * 0.5,
h, s;
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
];
};
var ret,
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 86/238
8/2/25, 1:46 PM jquery-ui.js
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/9INBHF22/jquery-ui.js 87/238
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/9INBHF22/jquery-ui.js 88/238
8/2/25, 1:46 PM jquery-ui.js
black: "#000000",
blue: "#0000ff",
fuchsia: "#ff00ff",
gray: "#808080",
green: "#008000",
lime: "#00ff00",
maroon: "#800000",
navy: "#000080",
olive: "#808000",
purple: "#800080",
red: "#ff0000",
silver: "#c0c0c0",
teal: "#008080",
white: "#ffffff",
yellow: "#ffff00",
_default: "#ffffff"
};
})( jQuery );
/******************************************************************************/
/****************************** CLASS ANIMATIONS ******************************/
/******************************************************************************/
(function() {
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 89/238
8/2/25, 1:46 PM jquery-ui.js
} else {
for ( key in style ) {
if ( typeof style[ key ] === "string" ) {
styles[ key ] = style[ key ];
}
}
}
return styles;
}
return diff;
}
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 90/238
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/9INBHF22/jquery-ui.js 91/238
8/2/25, 1:46 PM jquery-ui.js
if ( typeof force === "boolean" || force === undefined ) {
if ( !speed ) {
// without speed parameter
return orig.apply( this, arguments );
} else {
return $.effects.animateClass.call( this,
(force ? { add: classNames } : { remove:
classNames }),
speed, easing, callback );
}
} else {
// without force parameter
return $.effects.animateClass.call( this,
{ toggle: classNames }, force, speed, easing );
}
};
})( $.fn.toggleClass ),
})();
/******************************************************************************/
/*********************************** EFFECTS **********************************/
/******************************************************************************/
(function() {
$.extend( $.effects, {
version: "1.10.3",
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 92/238
8/2/25, 1:46 PM jquery-ui.js
setMode: function( el, mode ) {
if (mode === "toggle") {
mode = el.is( ":hidden" ) ? "show" : "hide";
}
return mode;
},
// support: Firefox
// Firefox incorrectly exposes anonymous content
// https://bugzilla.mozilla.org/show_bug.cgi?id=561664
try {
active.id;
} catch( e ) {
active = document.body;
}
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 93/238
8/2/25, 1:46 PM jquery-ui.js
element.wrap( wrapper );
if ( element.parent().is( ".ui-effects-wrapper" ) ) {
element.parent().replaceWith( element );
return element;
},
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 94/238
8/2/25, 1:46 PM jquery-ui.js
// convert to an object
effect = { effect: effect };
return effect;
}
// Complete callback
if ( $.isFunction( option ) ) {
return true;
}
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 95/238
8/2/25, 1:46 PM jquery-ui.js
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/9INBHF22/jquery-ui.js 96/238
8/2/25, 1:46 PM jquery-ui.js
hide: (function( orig ) {
return function( option ) {
if ( standardAnimationOption( option ) ) {
return orig.apply( this, arguments );
} else {
var args = _normalizeArguments.apply( this, arguments );
args.mode = "hide";
return this.effect.call( this, args );
}
};
})( $.fn.hide ),
// helper functions
cssUnit: function(key) {
var style = this.css( key ),
val = [];
})();
/******************************************************************************/
/*********************************** EASING ***********************************/
/******************************************************************************/
(function() {
$.extend( baseEasings, {
Sine: function ( p ) {
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 );
},
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 97/238
8/2/25, 1:46 PM jquery-ui.js
Back: function( p ) {
return p * p * ( 3 * p - 2 );
},
Bounce: function ( p ) {
var pow2,
bounce = 4;
})();
})(jQuery);
(function( $, undefined ) {
var uid = 0,
hideProps = {},
showProps = {};
$.widget( "ui.accordion", {
version: "1.10.3",
options: {
active: 0,
animate: {},
collapsible: false,
event: "click",
header: "> li > :first-child,> :not(li):even",
heightStyle: "auto",
icons: {
activeHeader: "ui-icon-triangle-1-s",
header: "ui-icon-triangle-1-e"
},
// callbacks
activate: null,
beforeActivate: null
},
_create: function() {
var options = this.options;
this.prevShow = this.prevHide = $();
this.element.addClass( "ui-accordion ui-widget ui-helper-reset" )
// ARIA
.attr( "role", "tablist" );
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 98/238
8/2/25, 1:46 PM jquery-ui.js
options.active = 0;
}
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(),
content: !this.active.length ? $() : this.active.next()
};
},
_createIcons: function() {
var icons = this.options.icons;
if ( icons ) {
$( "<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-
helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-
top" )
.removeAttr( "role" )
.removeAttr( "aria-selected" )
.removeAttr( "aria-controls" )
.removeAttr( "tabIndex" )
.each(function() {
if ( /^ui-accordion/.test( this.id ) ) {
this.removeAttribute( "id" );
}
});
this._destroyIcons();
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 99/238
8/2/25, 1:46 PM jquery-ui.js
.removeAttr( "aria-hidden" )
.removeAttr( "aria-labelledby" )
.removeClass( "ui-helper-reset ui-widget-content ui-corner-bottom
ui-accordion-content ui-accordion-content-active ui-state-disabled" )
.each(function() {
if ( /^ui-accordion/.test( this.id ) ) {
this.removeAttribute( "id" );
}
});
if ( this.options.heightStyle !== "content" ) {
contents.css( "height", "" );
}
},
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 ) %
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 100/238
8/2/25, 1:46 PM jquery-ui.js
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();
}
},
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-helper-reset ui-state-default
ui-corner-all" );
this.headers.next()
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 101/238
8/2/25, 1:46 PM jquery-ui.js
.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(),
accordionId = this.accordionId = "ui-accordion-" +
(this.element.attr( "id" ) || ++uid);
this.headers
.attr( "role", "tab" )
.each(function( i ) {
var header = $( this ),
headerId = header.attr( "id" ),
panel = header.next(),
panelId = panel.attr( "id" );
if ( !headerId ) {
headerId = accordionId + "-header-" + i;
header.attr( "id", headerId );
}
if ( !panelId ) {
panelId = accordionId + "-panel-" + i;
panel.attr( "id", panelId );
}
header.attr( "aria-controls", panelId );
panel.attr( "aria-labelledby", headerId );
})
.next()
.attr( "role", "tabpanel" );
this.headers
.not( this.active )
.attr({
"aria-selected": "false",
tabIndex: -1
})
.next()
.attr({
"aria-expanded": "false",
"aria-hidden": "true"
})
.hide();
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 102/238
8/2/25, 1:46 PM jquery-ui.js
}
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() {
maxHeight = Math.max( maxHeight, $( this ).css(
"height", "" ).height() );
})
.height( maxHeight );
}
},
this._eventHandler({
target: active,
currentTarget: active,
preventDefault: $.noop
});
},
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 103/238
8/2/25, 1:46 PM jquery-ui.js
});
}
event.preventDefault();
if (
// click on active header, but not collapsible
( clickedIsActive && !options.collapsible ) ||
// allow canceling activation
( this._trigger( "beforeActivate", event, eventData ) ===
false ) ) {
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" );
}
},
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 104/238
8/2/25, 1:46 PM jquery-ui.js
if ( this.options.animate ) {
this._animate( toShow, toHide, data );
} else {
toHide.hide();
toShow.show();
this._toggleComplete( data );
}
toHide.attr({
"aria-expanded": "false",
"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 );
} else if ( toShow.length ) {
this.headers.filter(function() {
return $( this ).attr( "tabIndex" ) === 0;
})
.attr( "tabIndex", -1 );
}
toShow
.attr({
"aria-expanded": "true",
"aria-hidden": "false"
})
.prev()
.attr({
"aria-selected": "true",
tabIndex: 0
});
},
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 105/238
8/2/25, 1:46 PM jquery-ui.js
duration = duration || options.duration || animate.duration;
if ( !toHide.length ) {
return toShow.animate( showProps, duration, easing, complete );
}
if ( !toShow.length ) {
return toHide.animate( hideProps, duration, easing, complete );
}
total = toShow.show().outerHeight();
toHide.animate( hideProps, {
duration: duration,
easing: easing,
step: function( now, fx ) {
fx.now = Math.round( now );
}
});
toShow
.hide()
.animate( 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 );
adjust = 0;
}
}
});
},
toHide
.removeClass( "ui-accordion-content-active" )
.prev()
.removeClass( "ui-corner-top" )
.addClass( "ui-corner-all" );
})( jQuery );
(function( $, undefined ) {
$.widget( "ui.autocomplete", {
version: "1.10.3",
defaultElement: "<input>",
options: {
appendTo: null,
autoFocus: false,
delay: 300,
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 106/238
8/2/25, 1:46 PM jquery-ui.js
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
},
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 ) {
/*jshint maxcomplexity:15*/
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;
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 107/238
8/2/25, 1:46 PM jquery-ui.js
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:
case keyCode.NUMPAD_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" ) ) {
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;
if ( !this.isMultiLine || this.menu.element.is(
":visible" ) ) {
event.preventDefault();
}
return;
}
if ( suppressKeyPressRepeat ) {
return;
}
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 108/238
8/2/25, 1:46 PM jquery-ui.js
this._move( "previousPage", event );
break;
case keyCode.PAGE_DOWN:
this._move( "nextPage", event );
break;
case keyCode.UP:
this._keyEvent( "previous", event );
break;
case keyCode.DOWN:
this._keyEvent( "next", event );
break;
}
},
input: function( event ) {
if ( suppressInput ) {
suppressInput = false;
event.preventDefault();
return;
}
this._searchTimeout( event );
},
focus: function() {
this.selectedItem = null;
this.previous = this._value();
},
blur: function( event ) {
if ( this.cancelBlur ) {
delete this.cancelBlur;
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()
.data( "ui-menu" );
this._on( this.menu.element, {
mousedown: function( event ) {
// prevent moving focus out of the text field
event.preventDefault();
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 109/238
8/2/25, 1:46 PM jquery-ui.js
// the user clicks somewhere outside of the autocomplete
var menuElement = this.menu.element[ 0 ];
if ( !$( event.target ).closest( ".ui-menu-item" ).length
) {
this._delay(function() {
var that = this;
this.document.one( "mousedown", function(
event ) {
if ( event.target !==
that.element[ 0 ] &&
event.target !==
menuElement &&
!$.contains(
menuElement, event.target ) ) {
that.close();
}
});
});
}
},
menufocus: function( event, ui ) {
// support: Firefox
// Prevent accidental activation of menu items in Firefox
(#7024 #9118)
if ( this.isNewMenu ) {
this.isNewMenu = false;
if ( event.originalEvent && /^mouse/.test(
event.originalEvent.type ) ) {
this.menu.blur();
this.document.one( "mousemove",
function() {
$( event.target ).trigger(
event.originalEvent );
});
return;
}
}
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 110/238
8/2/25, 1:46 PM jquery-ui.js
this.element.focus();
this.previous = previous;
// #6109 - IE triggers two focus events and the
second
// is asynchronous, so we need to reset the
previous
// term synchronously and asynchronously :-(
this._delay(function() {
this.previous = previous;
this.selectedItem = item;
});
}
this.close( event );
this.selectedItem = item;
}
});
this.liveRegion = $( "<span>", {
role: "status",
"aria-live": "polite"
})
.addClass( "ui-helper-hidden-accessible" )
.insertBefore( this.element );
_destroy: function() {
clearTimeout( this.searching );
this.element
.removeClass( "ui-autocomplete-input" )
.removeAttr( "autocomplete" );
this.menu.element.remove();
this.liveRegion.remove();
},
_appendTo: function() {
var element = this.options.appendTo;
if ( element ) {
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 111/238
8/2/25, 1:46 PM jquery-ui.js
element = element.jquery || element.nodeType ?
$( element ) :
this.document.find( element ).eq( 0 );
}
if ( !element ) {
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;
}
},
// always save the actual value, not the one passed as an argument
this.term = this._value();
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 112/238
8/2/25, 1:46 PM jquery-ui.js
if ( this._trigger( "search", event ) === false ) {
return;
}
_response: function() {
var that = this,
index = ++requestIndex;
that.pending--;
if ( !that.pending ) {
that.element.removeClass( "ui-autocomplete-loading" );
}
};
},
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 113/238
8/2/25, 1:46 PM jquery-ui.js
if ( items.length && items[0].label && items[0].value ) {
return items;
}
return $.map( items, function( item ) {
if ( typeof item === "string" ) {
return {
label: item,
value: item
};
}
return $.extend({
label: item.label || item.value,
value: item.value || item.label
}, item );
});
},
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/9INBHF22/jquery-ui.js 114/238
8/2/25, 1:46 PM jquery-ui.js
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/9INBHF22/jquery-ui.js 115/238
8/2/25, 1:46 PM jquery-ui.js
}( jQuery ));
(function( $, undefined ) {
$.widget( "ui.button", {
version: "1.10.3",
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" );
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 116/238
8/2/25, 1:46 PM jquery-ui.js
: this.buttonElement.html());
}
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();
}
});
this.element
.bind( "focus" + this.eventNamespace, function() {
// no need to check disabled, focus won't be triggered
anyway
that.buttonElement.addClass( focusClass );
})
.bind( "blur" + this.eventNamespace, function() {
that.buttonElement.removeClass( focusClass );
});
if ( toggleButton ) {
this.element.bind( "change" + this.eventNamespace, function() {
if ( clickDragged ) {
return;
}
that.refresh();
});
// if mouse moves between mousedown and mouseup (drag) set
clickDragged flag
// prevents issue where button state changes but checkbox/radio
checked state
// does not in Firefox (see ticket #6970)
this.buttonElement
.bind( "mousedown" + this.eventNamespace, function( event
) {
if ( options.disabled ) {
return;
}
clickDragged = false;
startXPos = event.pageX;
startYPos = event.pageY;
})
.bind( "mouseup" + this.eventNamespace, function( event )
{
if ( options.disabled ) {
return;
}
if ( startXPos !== event.pageX || startYPos !==
event.pageY ) {
clickDragged = true;
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 117/238
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
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 118/238
8/2/25, 1:46 PM jquery-ui.js
correctly (just as 2nd argument doesn't work)
$( this ).click();
}
});
}
}
// TODO: pull out $.Widget's handling for the disabled option into
// $.Widget.prototype._setOptionDisabled so it's easy to proxy and can
// be overridden by individual plugins
this._setOption( "disabled", options.disabled );
this._resetButton();
},
_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 + " " + stateClasses + " " +
typeClasses )
.removeAttr( "role" )
.removeAttr( "aria-pressed" )
.html( this.buttonElement.find(".ui-button-text").html() );
if ( !this.hasTitle ) {
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 119/238
8/2/25, 1:46 PM jquery-ui.js
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" )
.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 ) {
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 120/238
8/2/25, 1:46 PM jquery-ui.js
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.10.3",
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";
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 121/238
8/2/25, 1:46 PM jquery-ui.js
.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 ) );
(function( $, undefined ) {
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"], //
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 122/238
8/2/25, 1:46 PM jquery-ui.js
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
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
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 123/238
8/2/25, 1:46 PM jquery-ui.js
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[""]);
this.dpDiv = 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) {
extendRemove(this._defaults, settings || {});
return this;
},
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 124/238
8/2/25, 1:46 PM jquery-ui.js
},
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/9INBHF22/jquery-ui.js 125/238
8/2/25, 1:46 PM jquery-ui.js
buttonText }) :
$("<button type='button'>
</button>").addClass(this._triggerClass).
html(!buttonImage ? buttonText : $("
<img/>").attr(
{ src:buttonImage, alt:buttonText,
title:buttonText })));
input[isRTL ? "before" : "after"](inst.trigger);
inst.trigger.click(function() {
if ($.datepicker._datepickerShowing &&
$.datepicker._lastInput === input[0]) {
$.datepicker._hideDatepicker();
} else if ($.datepicker._datepickerShowing &&
$.datepicker._lastInput !== input[0]) {
$.datepicker._hideDatepicker();
$.datepicker._showDatepicker(input[0]);
} else {
$.datepicker._showDatepicker(input[0]);
}
return false;
});
}
},
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/9INBHF22/jquery-ui.js 126/238
8/2/25, 1:46 PM jquery-ui.js
if( inst.settings.disabled ) {
this._disableDatepicker( target );
}
// Set display:block in place of inst.dpDiv.show() which won't work on
disconnected elements
// http://bugs.jqueryui.com/ticket/7552 - A Datepicker created on a
detached div has zero height
inst.dpDiv.css( "display", "block" );
},
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], PROP_NAME, inst);
}
extendRemove(inst.settings, settings || {});
date = (date && date.constructor === Date ? this._formatDate(inst, date)
: date);
this._dialogInput.val(date);
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 127/238
8/2/25, 1:46 PM jquery-ui.js
},
if (!$target.hasClass(this.markerClassName)) {
return;
}
nodeName = target.nodeName.toLowerCase();
$.removeData(target, PROP_NAME);
if (nodeName === "input") {
inst.append.remove();
inst.trigger.remove();
$target.removeClass(this.markerClassName).
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;
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 128/238
8/2/25, 1:46 PM jquery-ui.js
}
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;
},
/* 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);
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 129/238
8/2/25, 1:46 PM jquery-ui.js
return (name === "defaults" ? $.extend({},
$.datepicker._defaults) :
(inst ? (name === "all" ? $.extend({}, inst.settings) :
this._get(inst, name)) : null));
}
if (inst) {
if (this._curInst === inst) {
this._hideDatepicker();
}
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 130/238
8/2/25, 1:46 PM jquery-ui.js
this._updateDatepicker(inst);
this._updateAlternate(inst);
}
},
/* Handle keystrokes. */
_doKeyDown: function(event) {
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);
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 131/238
8/2/25, 1:46 PM jquery-ui.js
"stepMonths")), "M");
break; // next month/year on page down/+
ctrl
case 35: if (event.ctrlKey || event.metaKey) {
$.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) {
$.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) {
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 132/238
8/2/25, 1:46 PM jquery-ui.js
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);
}
},
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);
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 133/238
8/2/25, 1:46 PM jquery-ui.js
if ( inst && $.datepicker._datepickerShowing ) {
$.datepicker._hideDatepicker(
$.datepicker._curInst.input[0] );
}
}
inst.lastVal = null;
$.datepicker._lastInput = input;
$.datepicker._setDateFromField(inst);
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.zIndex($(input).zIndex()+1);
$.datepicker._datepickerShowing = true;
if ( $.datepicker._shouldFocusInput( inst ) ) {
inst.input.focus();
}
$.datepicker._curInst = inst;
}
},
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 134/238
8/2/25, 1:46 PM jquery-ui.js
_updateDatepicker: function(inst) {
this.maxRows = 4; //Reset the max number of rows being displayed (see
#7043)
instActive = inst; // for delegate hover events
inst.dpDiv.empty().append(this._generateHTML(inst));
this._attachHandlers(inst);
inst.dpDiv.find("." + this._dayOverClass + " a").mouseover();
var origyearshtml,
numMonths = this._getNumberOfMonths(inst),
cols = numMonths[1],
width = 17;
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 135/238
8/2/25, 1:46 PM jquery-ui.js
// now check if datepicker is showing outside window viewport - move to a
better place if so.
offset.left -= Math.min(offset.left, (offset.left + dpWidth > viewWidth
&& viewWidth > dpWidth) ?
Math.abs(offset.left + dpWidth - viewWidth) : 0);
offset.top -= Math.min(offset.top, (offset.top + dpHeight > viewHeight &&
viewHeight > dpHeight) ?
Math.abs(dpHeight + inputHeight) : 0);
return offset;
},
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;
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 136/238
8/2/25, 1:46 PM jquery-ui.js
if (this._inDialog) {
this._dialogInput.css({ position: "absolute", left: "0",
top: "-100px" });
if ($.blockUI) {
$.unblockUI();
$("body").append(this.dpDiv);
}
}
this._inDialog = false;
}
},
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/9INBHF22/jquery-ui.js 137/238
8/2/25, 1:46 PM jquery-ui.js
inst.drawMonth = inst.selectedMonth = date.getMonth();
inst.drawYear = inst.selectedYear = date.getFullYear();
}
this._notifyChange(inst);
this._adjustDate(target);
},
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];
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 138/238
8/2/25, 1:46 PM jquery-ui.js
if (typeof(inst.input[0]) !== "object") {
inst.input.focus(); // restore focus
}
this._lastInput = null;
}
},
/* 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/9INBHF22/jquery-ui.js 139/238
8/2/25, 1:46 PM jquery-ui.js
if (format == null || value == null) {
throw "Invalid arguments";
}
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 140/238
8/2/25, 1:46 PM jquery-ui.js
index = pair[0];
iValue += name.length;
return false;
}
});
if (index !== -1) {
return index + 1;
} else {
throw "Unknown name at position " + iValue;
}
},
// Confirm that a literal character matches the string value
checkLiteral = function() {
if (value.charAt(iValue) !== format.charAt(iFormat)) {
throw "Unexpected literal at position " + iValue;
}
iValue++;
};
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 141/238
8/2/25, 1:46 PM jquery-ui.js
}
}
}
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 142/238
8/2/25, 1:46 PM jquery-ui.js
* M - month name short
* MM - month name long
* y - year (two digit)
* yy - year (four digit)
* @ - Unix timestamp (ms since 01/01/1970)
* ! - Windows ticks (100ns since 01/01/0001)
* "..." - literal text
* '' - single quote
*
* @param format string - the desired format of the date
* @param date Date - the date value to format
* @param settings Object - attributes include:
* dayNamesShort string[7] - abbreviated
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;
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 143/238
8/2/25, 1:46 PM jquery-ui.js
} 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;
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/9INBHF22/jquery-ui.js 144/238
8/2/25, 1:46 PM jquery-ui.js
};
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/9INBHF22/jquery-ui.js 145/238
8/2/25, 1:46 PM jquery-ui.js
},
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/9INBHF22/jquery-ui.js 146/238
8/2/25, 1:46 PM jquery-ui.js
* Hours may be non-zero on daylight saving cut-over:
* > 12 when midnight changeover, but then cannot generate
* midnight datetime, so jump to 1AM, otherwise reset.
* @param date (Date) the date to check
* @return (Date) the corrected date
*/
_daylightSavingAdjust: function(date) {
if (!date) {
return null;
}
date.setHours(date.getHours() > 12 ? date.getHours() + 2 : 0);
return date;
},
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 147/238
8/2/25, 1:46 PM jquery-ui.js
return false;
},
selectMonth: function () {
$.datepicker._selectMonthYear(id, this, "M");
return false;
},
selectYear: function () {
$.datepicker._selectMonthYear(id, this, "Y");
return false;
}
};
$(this).bind(this.getAttribute("data-event"),
handler[this.getAttribute("data-handler")]);
});
},
/* 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/9INBHF22/jquery-ui.js 148/238
8/2/25, 1:46 PM jquery-ui.js
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 149/238
8/2/25, 1:46 PM jquery-ui.js
this.maxRows = 4;
for (col = 0; col < numMonths[1]; col++) {
selectedDate = this._daylightSavingAdjust(new
Date(drawYear, drawMonth, inst.selectedDay));
cornerClass = " ui-corner-all";
calender = "";
if (isMultiMonth) {
calender += "<div class='ui-datepicker-group";
if (numMonths[1] > 1) {
switch (col) {
case 0: calender += " ui-
datepicker-group-first";
cornerClass = " ui-
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" + ((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")
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 150/238
8/2/25, 1:46 PM jquery-ui.js
(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='" +
((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;
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 151/238
8/2/25, 1:46 PM jquery-ui.js
}
html += group;
}
html += buttonPanel;
inst._keyEvent = false;
return html;
},
// 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);
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 152/238
8/2/25, 1:46 PM jquery-ui.js
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>";
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. */
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 153/238
8/2/25, 1:46 PM jquery-ui.js
_getMinMaxDate: function(inst, minMax) {
return this._determineDate(inst, this._get(inst, minMax + "Date"), null);
},
if (offset < 0) {
date.setDate(this._getDaysInMonth(date.getFullYear(),
date.getMonth()));
}
return this._isInRange(inst, date);
},
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 154/238
8/2/25, 1:46 PM jquery-ui.js
/* Format the given date for display. */
_formatDate: function(inst, day, month, year) {
if (!day) {
inst.currentDay = inst.selectedDay;
inst.currentMonth = inst.selectedMonth;
inst.currentYear = inst.selectedYear;
}
var date = (day ? (typeof day === "object" ? day :
this._daylightSavingAdjust(new Date(year, month, day))) :
this._daylightSavingAdjust(new Date(inst.currentYear,
inst.currentMonth, inst.currentDay)));
return this.formatDate(this._get(inst, "dateFormat"), date,
this._getFormatConfig(inst));
}
});
/*
* Bind hover events for datepicker elements.
* Done via delegate so the binding only occurs once in the lifetime of the parent div.
* Global instActive, set by _updateDatepicker allows the handlers to find their way back
to the active picker.
*/
function 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", function(){
if (!$.datepicker._isDisabledDatepicker( instActive.inline ?
dpDiv.parent()[0] : 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/9INBHF22/jquery-ui.js 155/238
8/2/25, 1:46 PM jquery-ui.js
})(jQuery);
(function( $, undefined ) {
var sizeRelatedOptions = {
buttons: true,
height: true,
maxHeight: true,
maxWidth: true,
minHeight: true,
minWidth: true,
width: true
},
resizableRelatedOptions = {
maxHeight: true,
maxWidth: true,
minHeight: true,
minWidth: true
};
$.widget( "ui.dialog", {
version: "1.10.3",
options: {
appendTo: "body",
autoOpen: true,
buttons: [],
closeOnEscape: true,
closeText: "close",
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 156/238
8/2/25, 1:46 PM jquery-ui.js
dialogClass: "",
draggable: true,
hide: null,
height: "auto",
maxHeight: null,
maxWidth: null,
minHeight: 150,
minWidth: 150,
modal: false,
position: {
my: "center",
at: "center",
of: window,
collision: "fit",
// Ensure the titlebar is always visible
using: function( pos ) {
var topOffset = $( this ).css( pos ).offset().top;
if ( topOffset < 0 ) {
$( this ).css( "top", pos.top - topOffset );
}
}
},
resizable: true,
show: null,
title: null,
width: 300,
// callbacks
beforeClose: null,
close: null,
drag: null,
dragStart: null,
dragStop: null,
focus: null,
open: null,
resize: null,
resizeStart: null,
resizeStop: null
},
_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();
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 157/238
8/2/25, 1:46 PM jquery-ui.js
if ( this.options.resizable && $.fn.resizable ) {
this._makeResizable();
}
this._isOpen = false;
},
_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();
if ( this.originalTitle ) {
this.element.attr( "title", this.originalTitle );
}
widget: function() {
return this.uiDialog;
},
disable: $.noop,
enable: $.noop,
this._isOpen = false;
this._destroyOverlay();
if ( !this.opener.filter(":focusable").focus().length ) {
// Hiding a focused element doesn't trigger blur in WebKit
// so in case we have nothing to focus on, explicitly blur the
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 158/238
8/2/25, 1:46 PM jquery-ui.js
active element
// https://bugs.webkit.org/show_bug.cgi?id=47182
$( this.document[0].activeElement ).blur();
}
isOpen: function() {
return this._isOpen;
},
moveToTop: function() {
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 );
this._show( this.uiDialog, this.options.show, function() {
that._focusTabbable();
that._trigger("focus");
});
this._trigger("open");
},
_focusTabbable: function() {
// Set focus to the first match:
// 1. First element inside the dialog matching [autofocus]
// 2. Tabbable element inside the content element
// 3. Tabbable element inside the buttonpane
// 4. The close button
// 5. The dialog itself
var 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 ) {
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 159/238
8/2/25, 1:46 PM jquery-ui.js
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/9INBHF22/jquery-ui.js 160/238
8/2/25, 1:46 PM jquery-ui.js
_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();
}
}
});
this.uiDialogTitlebarClose = $("<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();
this.close( event );
}
});
uiDialogTitle = $("<span>")
.uniqueId()
.addClass("ui-dialog-title")
.prependTo( this.uiDialogTitlebar );
this._title( uiDialogTitle );
this.uiDialog.attr({
"aria-labelledby": uiDialogTitle.attr("id")
});
},
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 161/238
8/2/25, 1:46 PM jquery-ui.js
_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;
_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 ) {
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 162/238
8/2/25, 1:46 PM jquery-ui.js
$( 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 ) {
options.position = [
ui.position.left - that.document.scrollLeft(),
ui.position.top - that.document.scrollTop()
];
$( 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",
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 ) {
options.height = $( this ).height();
options.width = $( this ).width();
$( this ).removeClass("ui-dialog-resizing");
that._unblockFrames();
that._trigger( "resizeStop", event, filteredUi( ui ) );
}
})
.css( "position", position );
},
_minHeight: function() {
var options = this.options;
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 163/238
8/2/25, 1:46 PM jquery-ui.js
_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 sizeRelatedOptions ) {
resize = true;
}
if ( key in 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/9INBHF22/jquery-ui.js 164/238
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/9INBHF22/jquery-ui.js 165/238
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;
}
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 166/238
8/2/25, 1:46 PM jquery-ui.js
if ( $.ui.dialog.overlayInstances ) {
this.document.bind( "focusin.dialog", function(
event ) {
if ( !that._allowInteraction( event ) ) {
event.preventDefault();
$(".ui-dialog:visible:last .ui-
dialog-content")
.data( widgetFullName
)._focusTabbable();
}
});
}
});
}
this.overlay = $("<div>")
.addClass("ui-widget-overlay ui-front")
.appendTo( this._appendTo() );
this._on( this.overlay, {
mousedown: "_keepFocus"
});
$.ui.dialog.overlayInstances++;
},
_destroyOverlay: function() {
if ( !this.options.modal ) {
return;
}
if ( this.overlay ) {
$.ui.dialog.overlayInstances--;
if ( !$.ui.dialog.overlayInstances ) {
this.document.unbind( "focusin.dialog" );
}
this.overlay.remove();
this.overlay = null;
}
}
});
$.ui.dialog.overlayInstances = 0;
// DEPRECATED
if ( $.uiBackCompat !== false ) {
// position option with array notation
// just override with old implementation
$.widget( "ui.dialog", $.ui.dialog, {
_position: function() {
var position = this.options.position,
myAt = [],
offset = [ 0, 0 ],
isVisible;
if ( position ) {
if ( typeof position === "string" || (typeof position ===
"object" && "0" in position ) ) {
myAt = position.split ? position.split(" ") : [
position[0], position[1] ];
if ( myAt.length === 1 ) {
myAt[1] = myAt[0];
}
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 167/238
8/2/25, 1:46 PM jquery-ui.js
});
position = {
my: myAt[0] + (offset[0] < 0 ? offset[0]
: "+" + offset[0]) + " " +
myAt[1] + (offset[1] < 0 ?
offset[1] : "+" + offset[1]),
at: myAt.join(" ")
};
}
}( jQuery ) );
(function( $, undefined ) {
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 168/238
8/2/25, 1:46 PM jquery-ui.js
el
.css( vertical ? "bottom" : "right", 0 )
.css( vertical ? "top" : "left", "auto" )
.css({ position: "absolute" });
// 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);
(function( $, undefined ) {
// defaults:
mode = $.effects.setMode( el, o.mode || "effect" ),
hide = mode === "hide",
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,
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 169/238
8/2/25, 1:46 PM jquery-ui.js
}
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;
el.queue(function() {
if ( hide ) {
el.hide();
}
$.effects.restore( el, props );
$.effects.removeWrapper( el );
done();
});
};
})(jQuery);
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 170/238
8/2/25, 1:46 PM jquery-ui.js
(function( $, undefined ) {
// 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 );
}
// 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);
(function( $, undefined ) {
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 = {
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 171/238
8/2/25, 1:46 PM jquery-ui.js
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,
duration: o.duration,
easing: o.easing,
complete: function() {
if ( mode === "hide" ) {
el.hide();
}
$.effects.restore( el, props );
$.effects.removeWrapper( el );
done();
}
});
};
})(jQuery);
(function( $, undefined ) {
// loop
i, j, left, top, mx, my;
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 172/238
8/2/25, 1:46 PM jquery-ui.js
}
function animComplete() {
el.css({
visibility: "visible"
});
$( pieces ).remove();
if ( !show ) {
el.hide();
}
done();
}
};
})(jQuery);
(function( $, undefined ) {
el.animate({
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 173/238
8/2/25, 1:46 PM jquery-ui.js
opacity: mode
}, {
queue: false,
duration: o.duration,
easing: o.easing,
complete: done
});
};
})( jQuery );
(function( $, undefined ) {
// 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/9INBHF22/jquery-ui.js 174/238
8/2/25, 1:46 PM jquery-ui.js
done();
});
};
})(jQuery);
(function( $, undefined ) {
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);
(function( $, undefined ) {
if ( show || !elem.is(":visible")) {
elem.css( "opacity", 0 ).show();
animateTo = 1;
}
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 175/238
8/2/25, 1:46 PM jquery-ui.js
elem.animate({
opacity: animateTo
}, duration, o.easing );
animateTo = 1 - animateTo;
}
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);
(function( $, undefined ) {
$.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 );
};
// Create element
var el = $( this ),
options = $.extend( true, {}, o ),
mode = $.effects.setMode( el, o.mode || "effect" ),
percent = parseInt( o.percent, 10 ) ||
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 176/238
8/2/25, 1:46 PM jquery-ui.js
( 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
};
// Animate
el.effect( options );
};
// Create element
var original, baseline, factor,
el = $( this ),
props0 = [ "position", "top", "bottom", "left", "right", "width",
"height", "overflow", "opacity" ],
// Always restore
props1 = [ "position", "top", "bottom", "left", "right", "overflow",
"opacity" ],
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 177/238
8/2/25, 1:46 PM jquery-ui.js
props2 = [ "width", "height", "overflow" ],
cProps = [ "fontSize" ],
vProps = [ "borderTopWidth", "borderBottomWidth", "paddingTop",
"paddingBottom" ],
hProps = [ "borderLeftWidth", "borderRightWidth", "paddingLeft",
"paddingRight" ],
// 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/9INBHF22/jquery-ui.js 178/238
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,
width: c_original.width * factor.to.x,
outerHeight: c_original.height * factor.to.y,
outerWidth: c_original.width * factor.to.x
};
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 179/238
8/2/25, 1:46 PM jquery-ui.js
child.to = $.effects.setTransition( child, vProps,
factor.to.y, child.to );
}
// 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 ) {
$.effects.removeWrapper( el );
done();
}
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 180/238
8/2/25, 1:46 PM jquery-ui.js
});
};
})(jQuery);
(function( $, undefined ) {
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();
});
};
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 181/238
8/2/25, 1:46 PM jquery-ui.js
})(jQuery);
(function( $, undefined ) {
// 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);
(function( $, undefined ) {
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 182/238
8/2/25, 1:46 PM jquery-ui.js
left: endPosition.left - fixLeft ,
height: target.innerHeight(),
width: target.innerWidth()
},
startPosition = elem.offset(),
transfer = $( "<div class='ui-effects-transfer'></div>" )
.appendTo( document.body )
.addClass( o.className )
.css({
top: startPosition.top - fixTop ,
left: startPosition.left - fixLeft ,
height: elem.innerHeight(),
width: elem.innerWidth(),
position: targetFixed ? "fixed" : "absolute"
})
.animate( animation, o.duration, o.easing, function() {
transfer.remove();
done();
});
};
})(jQuery);
(function( $, undefined ) {
$.widget( "ui.menu", {
version: "1.10.3",
defaultElement: "<ul>",
delay: 300,
options: {
icons: {
submenu: "ui-icon-carat-1-e"
},
menus: "ul",
position: {
my: "left top",
at: "right top"
},
role: "menu",
// callbacks
blur: null,
focus: null,
select: null
},
_create: function() {
this.activeMenu = this.element;
// flag used to prevent firing of the click handler
// as the event bubbles up through nested menus
this.mouseHandled = false;
this.element
.uniqueId()
.addClass( "ui-menu ui-widget ui-widget-content ui-corner-all" )
.toggleClass( "ui-menu-icons", !!this.element.find( ".ui-icon"
).length )
.attr({
role: this.options.role,
tabIndex: 0
})
// need to catch all clicks on disabled menu
// not possible through _on
.bind( "click" + this.eventNamespace, $.proxy(function( event ) {
if ( this.options.disabled ) {
event.preventDefault();
}
}, this ));
if ( this.options.disabled ) {
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 183/238
8/2/25, 1:46 PM jquery-ui.js
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 > a": function( event ) {
event.preventDefault();
},
"click .ui-state-disabled > a": function( event ) {
event.preventDefault();
},
"click .ui-menu-item:has(a)": function( event ) {
var target = $( event.target ).closest( ".ui-menu-item"
);
if ( !this.mouseHandled && target.not( ".ui-state-
disabled" ).length ) {
this.mouseHandled = true;
this.select( event );
// Open submenu on click
if ( target.has( ".ui-menu" ).length ) {
this.expand( event );
} else if ( !this.element.is( ":focus" ) ) {
// Redirect focus to the menu
this.element.trigger( "focus", [ true ]
);
if ( !keepActiveItem ) {
this.focus( event, item );
}
},
blur: function( event ) {
this._delay(function() {
if ( !$.contains( this.element[0],
this.document[0].activeElement ) ) {
this.collapseAll( event );
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 184/238
8/2/25, 1:46 PM jquery-ui.js
}
});
},
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-
corner-all ui-menu-icons" )
.removeAttr( "role" )
.removeAttr( "tabIndex" )
.removeAttr( "aria-labelledby" )
.removeAttr( "aria-expanded" )
.removeAttr( "aria-hidden" )
.removeAttr( "aria-disabled" )
.removeUniqueId()
.show();
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 185/238
8/2/25, 1:46 PM jquery-ui.js
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/9INBHF22/jquery-ui.js 186/238
8/2/25, 1:46 PM jquery-ui.js
}
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,
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/9INBHF22/jquery-ui.js 187/238
8/2/25, 1:46 PM jquery-ui.js
.attr({
tabIndex: -1,
role: this._itemRole()
});
_itemRole: function() {
return {
menu: "menuitem",
listbox: "option"
}[ this.options.role ];
},
this._scrollIntoView( item );
this.active = item.first();
focused = this.active.children( "a" ).addClass( "ui-state-focus" );
// 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/9INBHF22/jquery-ui.js 188/238
8/2/25, 1:46 PM jquery-ui.js
}
if ( offset < 0 ) {
this.activeMenu.scrollTop( scroll + offset );
} else if ( offset + itemHeight > elementHeight ) {
this.activeMenu.scrollTop( scroll + offset -
elementHeight + itemHeight );
}
}
},
if ( !this.active ) {
return;
}
// 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() {
this._close();
this._open( submenu );
}, this.delay );
},
clearTimeout( this.timer );
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 189/238
8/2/25, 1:46 PM jquery-ui.js
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( "a.ui-state-active" )
.removeClass( "ui-state-active" );
},
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 190/238
8/2/25, 1:46 PM jquery-ui.js
// Delay so Firefox will not hide activedescendant change in
expanding submenu from AT
this._delay(function() {
this.focus( event, newItem );
});
}
},
isFirstItem: function() {
return this.active && !this.active.prevAll( ".ui-menu-item" ).length;
},
isLastItem: function() {
return this.active && !this.active.nextAll( ".ui-menu-item" ).length;
},
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;
});
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 191/238
8/2/25, 1:46 PM jquery-ui.js
_hasScroll: function() {
return this.element.outerHeight() < this.element.prop( "scrollHeight" );
},
}( jQuery ));
(function( $, undefined ) {
var cachedScrollbarWidth,
max = Math.max,
abs = Math.abs,
round = Math.round,
rhorizontal = /left|center|right/,
rvertical = /top|center|bottom/,
roffset = /[\+\-]\d+(\.[\d]+)?%?/,
rposition = /^\w+/,
rpercent = /%$/,
_position = $.fn.position;
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 192/238
8/2/25, 1:46 PM jquery-ui.js
return parseInt( $.css( element, property ), 10 ) || 0;
}
$.position = {
scrollbarWidth: function() {
if ( cachedScrollbarWidth !== undefined ) {
return cachedScrollbarWidth;
}
var w1, w2,
div = $( "<div
style='display:block;width:50px;height:50px;overflow:hidden;'><div
style='height:100px;width:auto;'></div></div>" ),
innerDiv = div.children()[0];
w2 = innerDiv.offsetWidth;
if ( w1 === w2 ) {
w2 = div[0].clientWidth;
}
div.remove();
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 193/238
8/2/25, 1:46 PM jquery-ui.js
return {
width: hasOverflowY ? $.position.scrollbarWidth() : 0,
height: hasOverflowX ? $.position.scrollbarWidth() : 0
};
},
getWithinInfo: function( element ) {
var withinElement = $( element || window ),
isWindow = $.isWindow( withinElement[0] );
return {
element: withinElement,
isWindow: isWindow,
offset: withinElement.offset() || { left: 0, top: 0 },
scrollLeft: withinElement.scrollLeft(),
scrollTop: withinElement.scrollTop(),
width: isWindow ? withinElement.width() :
withinElement.outerWidth(),
height: isWindow ? withinElement.height() :
withinElement.outerHeight()
};
}
};
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 ] = [
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 194/238
8/2/25, 1:46 PM jquery-ui.js
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" ),
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 ];
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 195/238
8/2/25, 1:46 PM jquery-ui.js
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,
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 );
};
}
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 196/238
8/2/25, 1:46 PM jquery-ui.js
$.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/9INBHF22/jquery-ui.js 197/238
8/2/25, 1:46 PM jquery-ui.js
position.top += overTop - newOverBottom;
// element is initially over bottom of within
} else if ( overBottom > 0 && overTop <= 0 ) {
position.top = withinOffset;
// element is initially over both top and bottom of
within
} else {
if ( overTop > overBottom ) {
position.top = withinOffset + outerHeight
- data.collisionHeight;
} else {
position.top = withinOffset;
}
}
// too far up -> align with top
} else if ( overTop > 0 ) {
position.top += overTop;
// too far down -> align with bottom edge
} else if ( overBottom > 0 ) {
position.top -= overBottom;
// adjust based on position and margin
} else {
position.top = max( position.top - collisionPosTop,
position.top );
}
}
},
flip: {
left: function( position, data ) {
var within = data.within,
withinOffset = within.offset.left + within.scrollLeft,
outerWidth = within.width,
offsetLeft = within.isWindow ? within.scrollLeft :
within.offset.left,
collisionPosLeft = position.left -
data.collisionPosition.marginLeft,
overLeft = collisionPosLeft - offsetLeft,
overRight = collisionPosLeft + data.collisionWidth -
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;
}
}
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 198/238
8/2/25, 1:46 PM jquery-ui.js
},
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;
}
}
}
},
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 );
}
}
};
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 199/238
8/2/25, 1:46 PM jquery-ui.js
margin: 0,
background: "none"
};
if ( body ) {
$.extend( testElementStyle, {
position: "absolute",
left: "-1000px",
top: "-1000px"
});
}
for ( i in testElementStyle ) {
testElement.style[ i ] = testElementStyle[ i ];
}
testElement.appendChild( div );
testElementParent = body || document.documentElement;
testElementParent.insertBefore( testElement, testElementParent.firstChild );
testElement.innerHTML = "";
testElementParent.removeChild( testElement );
})();
}( jQuery ) );
(function( $, undefined ) {
$.widget( "ui.progressbar", {
version: "1.10.3",
options: {
max: 100,
value: 0,
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",
"aria-valuemin": this.min
});
this._refreshValue();
},
_destroy: function() {
this.element
.removeClass( "ui-progressbar ui-widget ui-widget-content ui-
corner-all" )
.removeAttr( "role" )
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 200/238
8/2/25, 1:46 PM jquery-ui.js
.removeAttr( "aria-valuemin" )
.removeAttr( "aria-valuemax" )
.removeAttr( "aria-valuenow" );
this.valueDiv.remove();
},
// sanitize value
if ( typeof newValue !== "number" ) {
newValue = 0;
}
this._super( options );
_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 );
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 201/238
8/2/25, 1:46 PM jquery-ui.js
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 );
(function( $, undefined ) {
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" +
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 202/238
8/2/25, 1:46 PM jquery-ui.js
" ui-widget-content" +
" ui-corner-all");
this._refresh();
this._setOption( "disabled", this.options.disabled );
this._animateOff = false;
},
_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 = "<a class='ui-slider-handle ui-state-default ui-corner-
all' href='#'></a>",
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" +
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 203/238
8/2/25, 1:46 PM jquery-ui.js
// 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({
"left": "",
"bottom": ""
});
}
this.range.addClass( classes +
( ( options.range === "min" || options.range === "max" )
? " ui-slider-range-" + options.range : "" ) );
} else {
this.range = $([]);
}
},
_setupEvents: function() {
var elements = this.handles.add( this.range ).filter( "a" );
this._off( elements );
this._on( elements, this._handleEvents );
this._hoverable( elements );
this._focusable( elements );
},
_destroy: function() {
this.handles.remove();
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/9INBHF22/jquery-ui.js 204/238
8/2/25, 1:46 PM jquery-ui.js
=== o.min ))) {
distance = thisDistance;
closestHandle = $( this );
index = i;
}
});
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" ) ?
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 205/238
8/2/25, 1:46 PM jquery-ui.js
"vertical" : "horizontal";
},
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 206/238
8/2/25, 1:46 PM jquery-ui.js
slide callback
allowed = this._trigger( "slide", event, {
handle: this.handles[ index ],
value: newVal,
values: newValues
} );
otherVal = this.values( index ? 0 : 1 );
if ( allowed !== false ) {
this.values( index, newVal, true );
}
}
} 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/9INBHF22/jquery-ui.js 207/238
8/2/25, 1:46 PM jquery-ui.js
values: function( index, newValue ) {
var vals,
newValues,
i;
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();
break;
case "value":
this._animateOff = true;
this._refreshValue();
this._change( null, 0 );
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 208/238
8/2/25, 1:46 PM jquery-ui.js
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();
}
if ( val >= this._valueMax() ) {
return this._valueMax();
}
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 209/238
8/2/25, 1:46 PM jquery-ui.js
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/9INBHF22/jquery-ui.js 210/238
8/2/25, 1:46 PM jquery-ui.js
0;
_set[ this.orientation === "horizontal" ? "left" : "bottom" ] =
valPercent + "%";
this.handle.stop( 1, 1 )[ animate ? "animate" : "css" ]( _set,
o.animate );
_handleEvents: {
keydown: function( event ) {
/*jshint maxcomplexity:25*/
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();
break;
case $.ui.keyCode.PAGE_UP:
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 211/238
8/2/25, 1:46 PM jquery-ui.js
newVal = this._trimAlignValue( curVal + (
(this._valueMax() - this._valueMin()) / numPages ) );
break;
case $.ui.keyCode.PAGE_DOWN:
newVal = this._trimAlignValue( curVal - (
(this._valueMax() - this._valueMin()) / 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));
(function( $ ) {
function modifier( fn ) {
return function() {
var previous = this.element.val();
fn.apply( this, arguments );
this._refresh();
if ( previous !== this.element.val() ) {
this._trigger( "change" );
}
};
}
$.widget( "ui.spinner", {
version: "1.10.3",
defaultElement: "<input>",
widgetEventPrefix: "spin",
options: {
culture: null,
icons: {
down: "ui-icon-triangle-1-s",
up: "ui-icon-triangle-1-n"
},
incremental: true,
max: null,
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 212/238
8/2/25, 1:46 PM jquery-ui.js
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 );
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();
}
},
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 );
}
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 213/238
8/2/25, 1:46 PM jquery-ui.js
},
mousewheel: function( event, delta ) {
if ( !delta ) {
return;
}
if ( !this.spinning && !this._start( event ) ) {
return false;
}
// support: IE
// 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 );
});
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 214/238
8/2/25, 1:46 PM jquery-ui.js
spinner-up" ) ? 1 : -1, event );
},
"mouseup .ui-spinner-button": "_stop",
"mouseenter .ui-spinner-button": function( event ) {
// button will add ui-state-active if mouse was down while
mouseleave and kept down
if ( !$( event.currentTarget ).hasClass( "ui-state-active" ) ) {
return;
}
_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" );
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;
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 215/238
8/2/25, 1:46 PM jquery-ui.js
}
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;
}
_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 );
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 216/238
8/2/25, 1:46 PM jquery-ui.js
}
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 );
clearTimeout( this.mousewheelTimer );
this.counter = 0;
this.spinning = false;
this._trigger( "stop", event );
},
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 217/238
8/2/25, 1:46 PM jquery-ui.js
value = this._parse( value );
}
}
if ( key === "icons" ) {
this.buttons.first().find( ".ui-icon" )
.removeClass( this.options.icons.up )
.addClass( value.up );
this.buttons.last().find( ".ui-icon" )
.removeClass( this.options.icons.down )
.addClass( value.down );
}
_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/9INBHF22/jquery-ui.js 218/238
8/2/25, 1:46 PM jquery-ui.js
}
this.element.val( value );
this._refresh();
},
_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 );
},
widget: function() {
return this.uiSpinner;
}
});
}( jQuery ) );
(function( $, undefined ) {
var tabId = 0,
rhash = /#.*$/;
function getNextTabId() {
return ++tabId;
}
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 219/238
8/2/25, 1:46 PM jquery-ui.js
return anchor.hash.length > 1 &&
decodeURIComponent( anchor.href.replace( rhash, "" ) ) ===
decodeURIComponent( location.href.replace( rhash, "" ) );
}
$.widget( "ui.tabs", {
version: "1.10.3",
delay: 300,
options: {
active: null,
collapsible: false,
event: "click",
heightStyle: "content",
hide: null,
show: null,
// callbacks
activate: null,
beforeActivate: null,
beforeLoad: null,
load: null
},
_create: function() {
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 )
// Prevent users from focusing disabled tabs via click
.delegate( ".ui-tabs-nav > li", "mousedown" +
this.eventNamespace, function( event ) {
if ( $( this ).is( ".ui-state-disabled" ) ) {
event.preventDefault();
}
})
// 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();
}
});
this._processTabs();
options.active = this._initialActive();
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 220/238
8/2/25, 1:46 PM jquery-ui.js
if ( this.options.active !== false && this.anchors.length ) {
this.active = this._findActive( options.active );
} else {
this.active = $();
}
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 );
return active;
},
_getCreateEventData: function() {
return {
tab: this.active,
panel: !this.active.length ? $() : this._getPanelForTab(
this.active )
};
},
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 221/238
8/2/25, 1:46 PM jquery-ui.js
selectedIndex = this.tabs.index( focusedTab ),
goingForward = true;
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;
}
this.activating = this._delay(function() {
this.option( "active", selectedIndex );
}, this.delay );
}
},
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 222/238
8/2/25, 1:46 PM jquery-ui.js
if ( event.ctrlKey && event.keyCode === $.ui.keyCode.UP ) {
event.preventDefault();
this.active.focus();
}
},
function constrain() {
if ( index > lastTabIndex ) {
index = 0;
}
if ( index < 0 ) {
index = lastTabIndex;
}
return index;
}
return index;
},
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 223/238
8/2/25, 1:46 PM jquery-ui.js
if ( key === "event" ) {
this._setupEvents( value );
}
refresh: function() {
var options = this.options,
lis = this.tablist.children( ":has(a[href])" );
this._processTabs();
this._refresh();
},
_refresh: function() {
this._setupDisabled( this.options.disabled );
this._setupEvents( this.options.event );
this._setupHeightStyle( this.options.heightStyle );
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 224/238
8/2/25, 1:46 PM jquery-ui.js
"aria-hidden": "true"
});
_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" );
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 ( isLocal( anchor ) ) {
selector = anchor.hash;
panel = that.element.find( that._sanitizeSelector(
selector ) );
// remote tab
} else {
panelId = that._tabId( tab );
selector = "#" + panelId;
panel = that.element.find( selector );
if ( !panel.length ) {
panel = that._createPanel( panelId );
panel.insertAfter( that.panels[ i - 1 ] ||
that.tablist );
}
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 225/238
8/2/25, 1:46 PM jquery-ui.js
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": selector.substring( 1 ),
"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)
_getList: function() {
return 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;
},
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 226/238
8/2/25, 1:46 PM jquery-ui.js
}
this._focusable( this.tabs );
this._hoverable( this.tabs );
},
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
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 227/238
8/2/25, 1:46 PM jquery-ui.js
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 ) {
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" );
toHide.attr({
"aria-expanded": "false",
"aria-hidden": "true"
});
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 228/238
8/2/25, 1:46 PM jquery-ui.js
eventData.oldTab.attr( "aria-selected", "false" );
// If we're switching tabs, remove the old tab from the tab order.
// If we're opening from collapsed state, remove the previous tab from
the tab order.
// If we're collapsing, then keep the collapsing tab in the tab order.
if ( toShow.length && toHide.length ) {
eventData.oldTab.attr( "tabIndex", -1 );
} else if ( toShow.length ) {
this.tabs.filter(function() {
return $( this ).attr( "tabIndex" ) === 0;
})
.attr( "tabIndex", -1 );
}
toShow.attr({
"aria-expanded": "true",
"aria-hidden": "false"
});
eventData.newTab.attr({
"aria-selected": "true",
tabIndex: 0
});
},
return index;
},
_destroy: function() {
if ( this.xhr ) {
this.xhr.abort();
}
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 229/238
8/2/25, 1:46 PM jquery-ui.js
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.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/9INBHF22/jquery-ui.js 230/238
8/2/25, 1:46 PM jquery-ui.js
}
this._setupDisabled( disabled );
},
// not remote
if ( 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 );
}
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 231/238
8/2/25, 1:46 PM jquery-ui.js
tab.removeClass( "ui-tabs-loading" );
panel.removeAttr( "aria-busy" );
})( jQuery );
(function( $ ) {
var increments = 0;
elem.removeData( "ui-tooltip-id" );
describedby = $.trim( describedby.join( " " ) );
if ( describedby ) {
elem.attr( "aria-describedby", describedby );
} else {
elem.removeAttr( "aria-describedby" );
}
}
$.widget( "ui.tooltip", {
version: "1.10.3",
options: {
content: function() {
// support: IE<9, Opera in jQuery <1.7
// .text() can't accept undefined, so coerce to a string
var title = $( this ).attr( "title" ) || "";
// Escape title, since we're going from an attribute to raw HTML
return $( "<a>" ).text( title ).html();
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 232/238
8/2/25, 1:46 PM jquery-ui.js
},
hide: true,
// Disabled elements have inconsistent behavior across browsers (#8661)
items: "[title]:not([disabled])",
position: {
my: "left top+15",
at: "left bottom",
collision: "flipfit flip"
},
show: true,
tooltipClass: null,
track: false,
// callbacks
close: null,
open: null
},
_create: function() {
this._on({
mouseover: "open",
focusin: "open"
});
if ( this.options.disabled ) {
this._disable();
}
},
_disable: function() {
var that = this;
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 233/238
8/2/25, 1:46 PM jquery-ui.js
) )
.attr( "title", "" );
}
});
},
_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/9INBHF22/jquery-ui.js 234/238
8/2/25, 1:46 PM jquery-ui.js
if ( !content ) {
return;
}
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 235/238
8/2/25, 1:46 PM jquery-ui.js
if ( tooltip.is( ":hidden" ) ) {
return;
}
tooltip.position( positionOption );
}
if ( this.options.track && event && /^mouse/.test( event.type ) ) {
this._on( this.document, {
mousemove: position
});
// trigger once to override element-relative positioning
position( event );
} else {
tooltip.position( $.extend({
of: target
}, this.options.position ) );
}
tooltip.hide();
events = {
keyup: function( event ) {
if ( event.keyCode === $.ui.keyCode.ESCAPE ) {
var fakeEvent = $.Event(event);
fakeEvent.currentTarget = target[0];
this.close( fakeEvent, true );
}
},
remove: function() {
this._removeTooltip( tooltip );
}
};
if ( !event || event.type === "mouseover" ) {
events.mouseleave = "close";
}
if ( !event || event.type === "focusin" ) {
events.focusout = "close";
}
this._on( true, target, events );
},
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 236/238
8/2/25, 1:46 PM jquery-ui.js
removeDescribedBy( target );
tooltip.stop( true );
this._hide( tooltip, this.options.hide, function() {
that._removeTooltip( $( this ) );
});
target.removeData( "ui-tooltip-open" );
this._off( target, "mouseleave focusout keyup" );
// Remove 'remove' binding only on delegated targets
if ( target[0] !== this.element[0] ) {
this._off( target, "remove" );
}
this._off( this.document, "mousemove" );
this.closing = true;
this._trigger( "close", event, { tooltip: tooltip } );
this.closing = false;
},
_destroy: function() {
var that = this;
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 237/238
8/2/25, 1:46 PM jquery-ui.js
that.close( event, true );
}( jQuery ) );
file:///Users/ttak003/Zotero/storage/9INBHF22/jquery-ui.js 238/238