Make WordPress Core

Changeset 51794


Ignore:
Timestamp:
09/10/2021 12:01:24 AM (3 years ago)
Author:
azaozz
Message:

External Libraries: Update jQuery UI to 1.13.0-rc2.

The final release is expected at the beginning of October. Updating to rc2 now gives everybody plenty of time to test and report any issues either with UI 1.13.0 or with the WordPress implementation.

Props Clorith, mgol, azaozz.
See #52163.

Location:
trunk/src
Files:
38 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/js/_enqueues/vendor/jquery/ui/accordion.js

    r49134 r51794  
    11/*!
    2  * jQuery UI Accordion 1.12.1
     2 * jQuery UI Accordion 1.13.0-rc.2
    33 * http://jqueryui.com
    44 *
     
    1010//>>label: Accordion
    1111//>>group: Widgets
    12 // jscs:disable maximumLineLength
     12/* eslint-disable max-len */
    1313//>>description: Displays collapsible content panels for presenting information in a limited amount of space.
    14 // jscs:enable maximumLineLength
     14/* eslint-enable max-len */
    1515//>>docs: http://api.jqueryui.com/accordion/
    1616//>>demos: http://jqueryui.com/accordion/
     
    2020
    2121( function( factory ) {
     22    "use strict";
     23
    2224    if ( typeof define === "function" && define.amd ) {
    2325
     
    3234        factory( jQuery );
    3335    }
    34 }( function( $ ) {
     36} )( function( $ ) {
     37"use strict";
    3538
    3639return $.widget( "ui.accordion", {
    37     version: "1.12.1",
     40    version: "1.13.0-rc.2",
    3841    options: {
    3942        active: 0,
     
    4649        collapsible: false,
    4750        event: "click",
    48         header: "> li > :first-child, > :not(li):even",
     51        header: function( elem ) {
     52            return elem.find( "> li > :first-child" ).add( elem.find( "> :not(li)" ).even() );
     53        },
    4954        heightStyle: "auto",
    5055        icons: {
     
    277282            prevPanels = this.panels;
    278283
    279         this.headers = this.element.find( this.options.header );
     284        if ( typeof this.options.header === "function" ) {
     285            this.headers = this.options.header( this.element );
     286        } else {
     287            this.headers = this.element.find( this.options.header );
     288        }
    280289        this._addClass( this.headers, "ui-accordion-header ui-accordion-header-collapsed",
    281290            "ui-state-default" );
     
    608617} );
    609618
    610 } ) );
     619} );
  • trunk/src/js/_enqueues/vendor/jquery/ui/autocomplete.js

    r49134 r51794  
    11/*!
    2  * jQuery UI Autocomplete 1.12.1
     2 * jQuery UI Autocomplete 1.13.0-rc.2
    33 * http://jqueryui.com
    44 *
     
    1818
    1919( function( factory ) {
     20    "use strict";
     21
    2022    if ( typeof define === "function" && define.amd ) {
    2123
     
    3133        factory( jQuery );
    3234    }
    33 }( function( $ ) {
     35} )( function( $ ) {
     36"use strict";
    3437
    3538$.widget( "ui.autocomplete", {
    36     version: "1.12.1",
     39    version: "1.13.0-rc.2",
    3740    defaultElement: "<input>",
    3841    options: {
     
    197200            },
    198201            blur: function( event ) {
    199                 if ( this.cancelBlur ) {
    200                     delete this.cancelBlur;
    201                     return;
    202                 }
    203 
    204202                clearTimeout( this.searching );
    205203                this.close( event );
     
    217215            } )
    218216            .hide()
     217
     218            // Support: IE 11 only, Edge <= 14
     219            // For other browsers, we preventDefault() on the mousedown event
     220            // to keep the dropdown from taking focus from the input. This doesn't
     221            // work for IE/Edge, causing problems with selection and scrolling (#9638)
     222            // Happily, IE and Edge support an "unselectable" attribute that
     223            // prevents an element from receiving focus, exactly what we want here.
     224            .attr( {
     225                "unselectable": "on"
     226            } )
    219227            .menu( "instance" );
    220228
     
    223231            mousedown: function( event ) {
    224232
    225                 // prevent moving focus out of the text field
     233                // Prevent moving focus out of the text field
    226234                event.preventDefault();
    227 
    228                 // IE doesn't prevent moving focus even with event.preventDefault()
    229                 // so we set a flag to know when we should ignore the blur event
    230                 this.cancelBlur = true;
    231                 this._delay( function() {
    232                     delete this.cancelBlur;
    233 
    234                     // Support: IE 8 only
    235                     // Right clicking a menu item or selecting text from the menu items will
    236                     // result in focus moving out of the input. However, we've already received
    237                     // and ignored the blur event because of the cancelBlur flag set above. So
    238                     // we restore focus to ensure that the menu closes properly based on the user's
    239                     // next actions.
    240                     if ( this.element[ 0 ] !== $.ui.safeActiveElement( this.document[ 0 ] ) ) {
    241                         this.element.trigger( "focus" );
    242                     }
    243                 } );
    244235            },
    245236            menufocus: function( event, ui ) {
     
    272263                // Announce the value in the liveRegion
    273264                label = ui.item.attr( "aria-label" ) || item.value;
    274                 if ( label && $.trim( label ).length ) {
     265                if ( label && String.prototype.trim.call( label ).length ) {
    275266                    this.liveRegion.children().hide();
    276267                    $( "<div>" ).text( label ).appendTo( this.liveRegion );
     
    384375        var array, url,
    385376            that = this;
    386         if ( $.isArray( this.options.source ) ) {
     377        if ( Array.isArray( this.options.source ) ) {
    387378            array = this.options.source;
    388379            this.source = function( request, response ) {
     
    456447        var index = ++this.requestIndex;
    457448
    458         return $.proxy( function( content ) {
     449        return function( content ) {
    459450            if ( index === this.requestIndex ) {
    460451                this.__response( content );
     
    465456                this._removeClass( "ui-autocomplete-loading" );
    466457            }
    467         }, this );
     458        }.bind( this );
    468459    },
    469460
     
    625616
    626617        if ( editable === "inherit" ) {
    627           return this._isContentEditable( element.parent() );
     618            return this._isContentEditable( element.parent() );
    628619        }
    629620
     
    676667return $.ui.autocomplete;
    677668
    678 } ) );
     669} );
  • trunk/src/js/_enqueues/vendor/jquery/ui/button.js

    r49134 r51794  
    11/*!
    2  * jQuery UI Button 1.12.1
     2 * jQuery UI Button 1.13.0-rc.2
    33 * http://jqueryui.com
    44 *
     
    1818
    1919( function( factory ) {
     20    "use strict";
     21
    2022    if ( typeof define === "function" && define.amd ) {
    2123
     
    3638        factory( jQuery );
    3739    }
    38 }( function( $ ) {
     40} )( function( $ ) {
     41"use strict";
    3942
    4043$.widget( "ui.button", {
    41     version: "1.12.1",
     44    version: "1.13.0-rc.2",
    4245    defaultElement: "<button>",
    4346    options: {
     
    263266            this.element[ 0 ].disabled = value;
    264267            if ( value ) {
    265                 this.element.blur();
     268                this.element.trigger( "blur" );
    266269            }
    267270        }
     
    342345
    343346    $.fn.button = ( function( orig ) {
    344         return function() {
    345             if ( !this.length || ( this.length && this[ 0 ].tagName !== "INPUT" ) ||
    346                     ( this.length && this[ 0 ].tagName === "INPUT" && (
    347                         this.attr( "type" ) !== "checkbox" && this.attr( "type" ) !== "radio"
    348                     ) ) ) {
    349                 return orig.apply( this, arguments );
    350             }
    351             if ( !$.ui.checkboxradio ) {
    352                 $.error( "Checkboxradio widget missing" );
    353             }
    354             if ( arguments.length === 0 ) {
    355                 return this.checkboxradio( {
    356                     "icon": false
     347        return function( options ) {
     348            var isMethodCall = typeof options === "string";
     349            var args = Array.prototype.slice.call( arguments, 1 );
     350            var returnValue = this;
     351
     352            if ( isMethodCall ) {
     353
     354                // If this is an empty collection, we need to have the instance method
     355                // return undefined instead of the jQuery instance
     356                if ( !this.length && options === "instance" ) {
     357                    returnValue = undefined;
     358                } else {
     359                    this.each( function() {
     360                        var methodValue;
     361                        var type = $( this ).attr( "type" );
     362                        var name = type !== "checkbox" && type !== "radio" ?
     363                            "button" :
     364                            "checkboxradio";
     365                        var instance = $.data( this, "ui-" + name );
     366
     367                        if ( options === "instance" ) {
     368                            returnValue = instance;
     369                            return false;
     370                        }
     371
     372                        if ( !instance ) {
     373                            return $.error( "cannot call methods on button" +
     374                                " prior to initialization; " +
     375                                "attempted to call method '" + options + "'" );
     376                        }
     377
     378                        if ( typeof instance[ options ] !== "function" ||
     379                            options.charAt( 0 ) === "_" ) {
     380                            return $.error( "no such method '" + options + "' for button" +
     381                                " widget instance" );
     382                        }
     383
     384                        methodValue = instance[ options ].apply( instance, args );
     385
     386                        if ( methodValue !== instance && methodValue !== undefined ) {
     387                            returnValue = methodValue && methodValue.jquery ?
     388                                returnValue.pushStack( methodValue.get() ) :
     389                                methodValue;
     390                            return false;
     391                        }
     392                    } );
     393                }
     394            } else {
     395
     396                // Allow multiple hashes to be passed on init
     397                if ( args.length ) {
     398                    options = $.widget.extend.apply( null, [ options ].concat( args ) );
     399                }
     400
     401                this.each( function() {
     402                    var type = $( this ).attr( "type" );
     403                    var name = type !== "checkbox" && type !== "radio" ? "button" : "checkboxradio";
     404                    var instance = $.data( this, "ui-" + name );
     405
     406                    if ( instance ) {
     407                        instance.option( options || {} );
     408                        if ( instance._init ) {
     409                            instance._init();
     410                        }
     411                    } else {
     412                        if ( name === "button" ) {
     413                            orig.call( $( this ), options );
     414                            return;
     415                        }
     416
     417                        $( this ).checkboxradio( $.extend( { icon: false }, options ) );
     418                    }
    357419                } );
    358420            }
    359             return this.checkboxradio.apply( this, arguments );
     421
     422            return returnValue;
    360423        };
    361424    } )( $.fn.button );
     
    383446return $.ui.button;
    384447
    385 } ) );
     448} );
  • trunk/src/js/_enqueues/vendor/jquery/ui/checkboxradio.js

    r49134 r51794  
    11/*!
    2  * jQuery UI Checkboxradio 1.12.1
     2 * jQuery UI Checkboxradio 1.13.0-rc.2
    33 * http://jqueryui.com
    44 *
     
    1919
    2020( function( factory ) {
     21    "use strict";
     22
    2123    if ( typeof define === "function" && define.amd ) {
    2224
     
    3133        factory( jQuery );
    3234    }
    33 }( function( $ ) {
     35} )( function( $ ) {
     36"use strict";
    3437
    3538$.widget( "ui.checkboxradio", [ $.ui.formResetMixin, {
    36     version: "1.12.1",
     39    version: "1.13.0-rc.2",
    3740    options: {
    3841        disabled: null,
     
    113116        if ( checked ) {
    114117            this._addClass( this.label, "ui-checkboxradio-checked", "ui-state-active" );
    115             if ( this.icon ) {
    116                 this._addClass( this.icon, null, "ui-state-hover" );
    117             }
    118118        }
    119119
     
    150150        var group;
    151151        var name = this.element[ 0 ].name;
    152         var nameSelector = "input[name='" + $.ui.escapeSelector( name ) + "']";
     152        var nameSelector = "input[name='" + $.escapeSelector( name ) + "']";
    153153
    154154        if ( !name ) {
     
    162162            // Not inside a form, check all inputs that also are not inside a form
    163163            group = $( nameSelector ).filter( function() {
    164                 return $( this ).form().length === 0;
     164                return $( this )._form().length === 0;
    165165            } );
    166166        }
     
    281281return $.ui.checkboxradio;
    282282
    283 } ) );
     283} );
  • trunk/src/js/_enqueues/vendor/jquery/ui/controlgroup.js

    r49134 r51794  
    11/*!
    2  * jQuery UI Controlgroup 1.12.1
     2 * jQuery UI Controlgroup 1.13.0-rc.2
    33 * http://jqueryui.com
    44 *
     
    1818
    1919( function( factory ) {
     20    "use strict";
     21
    2022    if ( typeof define === "function" && define.amd ) {
    2123
     
    3032        factory( jQuery );
    3133    }
    32 }( function( $ ) {
     34} )( function( $ ) {
     35"use strict";
     36
    3337var controlgroupCornerRegex = /ui-corner-([a-z]){2,6}/g;
    3438
    3539return $.widget( "ui.controlgroup", {
    36     version: "1.12.1",
     40    version: "1.13.0-rc.2",
    3741    defaultElement: "<div>",
    3842    options: {
     
    151155        } );
    152156
    153         this.childWidgets = $( $.unique( childWidgets ) );
     157        this.childWidgets = $( $.uniqueSort( childWidgets ) );
    154158        this._addClass( this.childWidgets, "ui-controlgroup-item" );
    155159    },
     
    235239        $.each( classes, function( key ) {
    236240            var current = instance.options.classes[ key ] || "";
    237             current = $.trim( current.replace( controlgroupCornerRegex, "" ) );
     241            current = String.prototype.trim.call( current.replace( controlgroupCornerRegex, "" ) );
    238242            result[ key ] = ( current + " " + classes[ key ] ).replace( /\s+/g, " " );
    239243        } );
     
    296300    }
    297301} );
    298 } ) );
     302} );
  • trunk/src/js/_enqueues/vendor/jquery/ui/core.js

    r49134 r51794  
    1 /*! jQuery UI - v1.12.1 - 2020-09-25
     1/*! jQuery UI - v1.13.0-rc.2 - 2021-09-05
    22* http://jqueryui.com
    33* Includes: data.js, disable-selection.js, escape-selector.js, focusable.js, form-reset-mixin.js, form.js, ie.js, jquery-1-7.js, keycode.js, labels.js, plugin.js, position.js, safe-active-element.js, safe-blur.js, scroll-parent.js, tabbable.js, unique-id.js, version.js, widget.js
    44* Copyright jQuery Foundation and other contributors; Licensed  */
    55( function( factory ) {
     6    "use strict";
     7
    68    if ( typeof define === "function" && define.amd ) {
    79
     
    1416    }
    1517} ( function( $ ) {
     18"use strict";
    1619
    1720// Source: version.js
    1821$.ui = $.ui || {};
    1922
    20 $.ui.version = "1.12.1";
     23$.ui.version = "1.13.0-rc.2";
    2124
    2225// Source: data.js
    2326/*!
    24  * jQuery UI :data 1.12.1
     27 * jQuery UI :data 1.13.0-rc.2
    2528 * http://jqueryui.com
    2629 *
     
    3538//>>docs: http://api.jqueryui.com/data-selector/
    3639
    37 $.extend( $.expr[ ":" ], {
     40$.extend( $.expr.pseudos, {
    3841    data: $.expr.createPseudo ?
    3942        $.expr.createPseudo( function( dataName ) {
     
    4952} );
    5053
    51 
    5254// Source: disable-selection.js
    5355/*!
    54  * jQuery UI Disable Selection 1.12.1
     56 * jQuery UI Disable Selection 1.13.0-rc.2
    5557 * http://jqueryui.com
    5658 *
     
    8486} );
    8587
    86 // Source: escape-selector.js
    87 // Internal use only
    88 $.ui.escapeSelector = ( function() {
    89     var selectorEscape = /([!"#$%&'()*+,./:;<=>?@[\]^`{|}~])/g;
    90     return function( selector ) {
    91         return selector.replace( selectorEscape, "\\$1" );
    92     };
    93 } )();
    94 
    9588// Source: focusable.js
    9689/*!
    97  * jQuery UI Focusable 1.12.1
     90 * jQuery UI Focusable 1.13.0-rc.2
    9891 * http://jqueryui.com
    9992 *
     
    154147        visibility = element.css( "visibility" );
    155148    }
    156     return visibility !== "hidden";
     149    return visibility === "visible";
    157150}
    158151
    159 $.extend( $.expr[ ":" ], {
     152$.extend( $.expr.pseudos, {
    160153    focusable: function( element ) {
    161154        return $.ui.focusable( element, $.attr( element, "tabindex" ) != null );
     
    167160// IE8 does not support the form attribute and when it is supplied. It overwrites the form prop
    168161// with a string, so we need to find the proper form.
    169 $.fn.form = function() {
     162$.fn._form = function() {
    170163    return typeof this[ 0 ].form === "string" ? this.closest( "form" ) : $( this[ 0 ].form );
    171164};
     
    173166// Source: form-reset-mixin.js
    174167/*!
    175  * jQuery UI Form Reset Mixin 1.12.1
     168 * jQuery UI Form Reset Mixin 1.13.0-rc.2
    176169 * http://jqueryui.com
    177170 *
     
    200193
    201194    _bindFormResetHandler: function() {
    202         this.form = this.element.form();
     195        this.form = this.element._form();
    203196        if ( !this.form.length ) {
    204197            return;
     
    236229$.ui.ie = !!/msie [\w.]+/.exec( navigator.userAgent.toLowerCase() );
    237230
    238 // Source: jquery-1-7.js
     231// Source: jquery-patch.js
    239232/*!
    240  * jQuery UI Support for jQuery core 1.7.x 1.12.1
     233 * jQuery UI Support for jQuery core 1.8.x and newer 1.13.0-rc.2
    241234 * http://jqueryui.com
    242235 *
     
    247240 */
    248241
    249 //>>label: jQuery 1.7 Support
     242//>>label: jQuery 1.8+ Support
    250243//>>group: Core
    251 //>>description: Support version 1.7.x of jQuery core
    252 
    253 // Support: jQuery 1.7 only
    254 // Not a great way to check versions, but since we only support 1.7+ and only
    255 // need to detect <1.8, this is a simple check that should suffice. Checking
    256 // for "1.7." would be a bit safer, but the version string is 1.7, not 1.7.0
    257 // and we'll never reach 1.70.0 (if we do, we certainly won't be supporting
    258 // 1.7 anymore). See #11197 for why we're not using feature detection.
    259 if ( $.fn.jquery.substring( 0, 3 ) === "1.7" ) {
    260 
    261     // Setters for .innerWidth(), .innerHeight(), .outerWidth(), .outerHeight()
    262     // Unlike jQuery Core 1.8+, these only support numeric values to set the
    263     // dimensions in pixels
    264     $.each( [ "Width", "Height" ], function( i, name ) {
    265         var side = name === "Width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ],
    266             type = name.toLowerCase(),
    267             orig = {
    268                 innerWidth: $.fn.innerWidth,
    269                 innerHeight: $.fn.innerHeight,
    270                 outerWidth: $.fn.outerWidth,
    271                 outerHeight: $.fn.outerHeight
    272             };
    273 
    274         function reduce( elem, size, border, margin ) {
    275             $.each( side, function() {
    276                 size -= parseFloat( $.css( elem, "padding" + this ) ) || 0;
    277                 if ( border ) {
    278                     size -= parseFloat( $.css( elem, "border" + this + "Width" ) ) || 0;
    279                 }
    280                 if ( margin ) {
    281                     size -= parseFloat( $.css( elem, "margin" + this ) ) || 0;
    282                 }
    283             } );
    284             return size;
    285         }
    286 
    287         $.fn[ "inner" + name ] = function( size ) {
    288             if ( size === undefined ) {
    289                 return orig[ "inner" + name ].call( this );
    290             }
    291 
    292             return this.each( function() {
    293                 $( this ).css( type, reduce( this, size ) + "px" );
    294             } );
    295         };
    296 
    297         $.fn[ "outer" + name ] = function( size, margin ) {
    298             if ( typeof size !== "number" ) {
    299                 return orig[ "outer" + name ].call( this, size );
    300             }
    301 
    302             return this.each( function() {
    303                 $( this ).css( type, reduce( this, size, true, margin ) + "px" );
    304             } );
    305         };
    306     } );
    307 
    308     $.fn.addBack = function( selector ) {
    309         return this.add( selector == null ?
    310             this.prevObject : this.prevObject.filter( selector )
    311         );
     244//>>description: Support version 1.8.x and newer of jQuery core
     245
     246// Support: jQuery 1.9.x or older
     247// $.expr[ ":" ] is deprecated.
     248if ( !$.expr.pseudos ) {
     249    $.expr.pseudos = $.expr[ ":" ];
     250}
     251
     252// Support: jQuery 1.11.x or older
     253// $.unique has been renamed to $.uniqueSort
     254if ( !$.uniqueSort ) {
     255    $.uniqueSort = $.unique;
     256}
     257
     258// Support: jQuery 2.2.x or older.
     259// This method has been defined in jQuery 3.0.0.
     260// Code from https://github.com/jquery/jquery/blob/e539bac79e666bba95bba86d690b4e609dca2286/src/selector/escapeSelector.js
     261if ( !$.escapeSelector ) {
     262
     263    // CSS string/identifier serialization
     264    // https://drafts.csswg.org/cssom/#common-serializing-idioms
     265    var rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;
     266
     267    var fcssescape = function( ch, asCodePoint ) {
     268        if ( asCodePoint ) {
     269
     270            // U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER
     271            if ( ch === "\0" ) {
     272                return "\uFFFD";
     273            }
     274
     275            // Control characters and (dependent upon position) numbers get escaped as code points
     276            return ch.slice( 0, -1 ) + "\\" + ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " ";
     277        }
     278
     279        // Other potentially-special ASCII characters get backslash-escaped
     280        return "\\" + ch;
     281    };
     282
     283    $.escapeSelector = function( sel ) {
     284        return ( sel + "" ).replace( rcssescape, fcssescape );
    312285    };
    313286}
    314287
     288// Support: jQuery 3.4.x or older
     289// These methods have been defined in jQuery 3.5.0.
     290if ( !$.fn.even || !$.fn.odd ) {
     291    $.fn.extend( {
     292        even: function() {
     293            return this.filter( function( i ) {
     294                return i % 2 === 0;
     295            } );
     296        },
     297        odd: function() {
     298            return this.filter( function( i ) {
     299                return i % 2 === 1;
     300            } );
     301        }
     302    } );
     303}
     304
    315305// Source: keycode.js
    316306/*!
    317  * jQuery UI Keycode 1.12.1
     307 * jQuery UI Keycode 1.13.0-rc.2
    318308 * http://jqueryui.com
    319309 *
     
    349339// Source: labels.js
    350340/*!
    351  * jQuery UI Labels 1.12.1
     341 * jQuery UI Labels 1.13.0-rc.2
    352342 * http://jqueryui.com
    353343 *
     
    365355    var ancestor, selector, id, labels, ancestors;
    366356
     357    if ( !this.length ) {
     358        return this.pushStack( [] );
     359    }
     360
    367361    // Check control.labels first
    368362    if ( this[ 0 ].labels && this[ 0 ].labels.length ) {
     
    387381
    388382        // Create a selector for the label based on the id
    389         selector = "label[for='" + $.ui.escapeSelector( id ) + "']";
     383        selector = "label[for='" + $.escapeSelector( id ) + "']";
    390384
    391385        labels = labels.add( ancestors.find( selector ).addBack( selector ) );
     
    431425// Source: position.js
    432426/*!
    433  * jQuery UI Position 1.12.1
     427 * jQuery UI Position 1.13.0-rc.2
    434428 * http://jqueryui.com
    435429 *
     
    469463}
    470464
     465function isWindow( obj ) {
     466    return obj != null && obj === obj.window;
     467}
     468
    471469function getDimensions( elem ) {
    472470    var raw = elem[ 0 ];
     
    478476        };
    479477    }
    480     if ( $.isWindow( raw ) ) {
     478    if ( isWindow( raw ) ) {
    481479        return {
    482480            width: elem.width(),
     
    505503        }
    506504        var w1, w2,
    507             div = $( "<div " +
    508                 "style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'>" +
    509                 "<div style='height:100px;width:auto;'></div></div>" ),
     505            div = $( "<div style=" +
     506                "'display:block;position:absolute;width:200px;height:200px;overflow:hidden;'>" +
     507                "<div style='height:300px;width:auto;'></div></div>" ),
    510508            innerDiv = div.children()[ 0 ];
    511509
     
    540538    getWithinInfo: function( element ) {
    541539        var withinElement = $( element || window ),
    542             isWindow = $.isWindow( withinElement[ 0 ] ),
     540            isElemWindow = isWindow( withinElement[ 0 ] ),
    543541            isDocument = !!withinElement[ 0 ] && withinElement[ 0 ].nodeType === 9,
    544             hasOffset = !isWindow && !isDocument;
     542            hasOffset = !isElemWindow && !isDocument;
    545543        return {
    546544            element: withinElement,
    547             isWindow: isWindow,
     545            isWindow: isElemWindow,
    548546            isDocument: isDocument,
    549547            offset: hasOffset ? $( element ).offset() : { left: 0, top: 0 },
     
    565563
    566564    var atOffset, targetWidth, targetHeight, targetOffset, basePosition, dimensions,
    567         target = $( options.of ),
     565
     566        // Make sure string options are treated as CSS selectors
     567        target = typeof options.of === "string" ?
     568            $( document ).find( options.of ) :
     569            $( options.of ),
     570
    568571        within = $.position.getWithinInfo( options.within ),
    569572        scrollInfo = $.position.getScrollInfo( within ),
     
    955958// Source: scroll-parent.js
    956959/*!
    957  * jQuery UI Scroll Parent 1.12.1
     960 * jQuery UI Scroll Parent 1.13.0-rc.2
    958961 * http://jqueryui.com
    959962 *
     
    988991// Source: tabbable.js
    989992/*!
    990  * jQuery UI Tabbable 1.12.1
     993 * jQuery UI Tabbable 1.13.0-rc.2
    991994 * http://jqueryui.com
    992995 *
     
    10011004//>>docs: http://api.jqueryui.com/tabbable-selector/
    10021005
    1003 $.extend( $.expr[ ":" ], {
     1006$.extend( $.expr.pseudos, {
    10041007    tabbable: function( element ) {
    10051008        var tabIndex = $.attr( element, "tabindex" ),
     
    10111014// Source: unique-id.js
    10121015/*!
    1013  * jQuery UI Unique ID 1.12.1
     1016 * jQuery UI Unique ID 1.13.0-rc.2
    10141017 * http://jqueryui.com
    10151018 *
     
    10481051// Source: widget.js
    10491052/*!
    1050  * jQuery UI Widget 1.12.1
     1053 * jQuery UI Widget 1.13.0-rc.2
    10511054 * http://jqueryui.com
    10521055 *
     
    10631066
    10641067var widgetUuid = 0;
     1068var widgetHasOwnProperty = Array.prototype.hasOwnProperty;
    10651069var widgetSlice = Array.prototype.slice;
    10661070
     
    10691073        var events, elem, i;
    10701074        for ( i = 0; ( elem = elems[ i ] ) != null; i++ ) {
    1071             try {
    1072 
    1073                 // Only trigger remove when necessary to save time
    1074                 events = $._data( elem, "events" );
    1075                 if ( events && events.remove ) {
    1076                     $( elem ).triggerHandler( "remove" );
    1077                 }
    1078 
    1079             // Http://bugs.jquery.com/ticket/8235
    1080             } catch ( e ) {}
     1075
     1076            // Only trigger remove when necessary to save time
     1077            events = $._data( elem, "events" );
     1078            if ( events && events.remove ) {
     1079                $( elem ).triggerHandler( "remove" );
     1080            }
    10811081        }
    10821082        orig( elems );
     
    11001100    }
    11011101
    1102     if ( $.isArray( prototype ) ) {
     1102    if ( Array.isArray( prototype ) ) {
    11031103        prototype = $.extend.apply( null, [ {} ].concat( prototype ) );
    11041104    }
    11051105
    11061106    // Create selector for plugin
    1107     $.expr[ ":" ][ fullName.toLowerCase() ] = function( elem ) {
     1107    $.expr.pseudos[ fullName.toLowerCase() ] = function( elem ) {
    11081108        return !!$.data( elem, fullName );
    11091109    };
     
    11451145    basePrototype.options = $.widget.extend( {}, basePrototype.options );
    11461146    $.each( prototype, function( prop, value ) {
    1147         if ( !$.isFunction( value ) ) {
     1147        if ( typeof value !== "function" ) {
    11481148            proxiedPrototype[ prop ] = value;
    11491149            return;
     
    12241224        for ( key in input[ inputIndex ] ) {
    12251225            value = input[ inputIndex ][ key ];
    1226             if ( input[ inputIndex ].hasOwnProperty( key ) && value !== undefined ) {
     1226            if ( widgetHasOwnProperty.call( input[ inputIndex ], key ) && value !== undefined ) {
    12271227
    12281228                // Clone objects
     
    12731273                    }
    12741274
    1275                     if ( !$.isFunction( instance[ options ] ) || options.charAt( 0 ) === "_" ) {
     1275                    if ( typeof instance[ options ] !== "function" ||
     1276                        options.charAt( 0 ) === "_" ) {
    12761277                        return $.error( "no such method '" + options + "' for " + name +
    12771278                            " widget instance" );
     
    15341535        }, options );
    15351536
     1537        function bindRemoveEvent() {
     1538            options.element.each( function( _, element ) {
     1539                var isTracked = $.map( that.classesElementLookup, function( elements ) {
     1540                    return elements;
     1541                } )
     1542                    .some( function( elements ) {
     1543                        return elements.is( element );
     1544                    } );
     1545
     1546                if ( !isTracked ) {
     1547                    that._on( $( element ), {
     1548                        remove: "_untrackClassesElement"
     1549                    } );
     1550                }
     1551            } );
     1552        }
     1553
    15361554        function processClassString( classes, checkOption ) {
    15371555            var current, i;
     
    15391557                current = that.classesElementLookup[ classes[ i ] ] || $();
    15401558                if ( options.add ) {
    1541                     current = $( $.unique( current.get().concat( options.element.get() ) ) );
     1559                    bindRemoveEvent();
     1560                    current = $( $.uniqueSort( current.get().concat( options.element.get() ) ) );
    15421561                } else {
    15431562                    current = $( current.not( options.element ).get() );
     
    15501569            }
    15511570        }
    1552 
    1553         this._on( options.element, {
    1554             "remove": "_untrackClassesElement"
    1555         } );
    15561571
    15571572        if ( options.keys ) {
     
    15721587            }
    15731588        } );
     1589
     1590        this._off( $( event.target ) );
    15741591    },
    15751592
     
    16521669        eventName = ( eventName || "" ).split( " " ).join( this.eventNamespace + " " ) +
    16531670            this.eventNamespace;
    1654         element.off( eventName ).off( eventName );
     1671        element.off( eventName );
    16551672
    16561673        // Clear the stack to avoid memory leaks (#10056)
     
    17181735
    17191736        this.element.trigger( event, data );
    1720         return !( $.isFunction( callback ) &&
     1737        return !( typeof callback === "function" &&
    17211738            callback.apply( this.element[ 0 ], [ event ].concat( data ) ) === false ||
    17221739            event.isDefaultPrevented() );
     
    17401757        if ( typeof options === "number" ) {
    17411758            options = { duration: options };
     1759        } else if ( options === true ) {
     1760            options = {};
    17421761        }
    17431762
  • trunk/src/js/_enqueues/vendor/jquery/ui/datepicker.js

    r49134 r51794  
    1 // jscs:disable maximumLineLength
    2 /* jscs:disable requireCamelCaseOrUpperCaseIdentifiers */
     1/* eslint-disable max-len, camelcase */
    32/*!
    4  * jQuery UI Datepicker 1.12.1
     3 * jQuery UI Datepicker 1.13.0-rc.2
    54 * http://jqueryui.com
    65 *
     
    2019
    2120( function( factory ) {
     21    "use strict";
     22
    2223    if ( typeof define === "function" && define.amd ) {
    2324
     
    3233        factory( jQuery );
    3334    }
    34 }( function( $ ) {
    35 
    36 $.extend( $.ui, { datepicker: { version: "1.12.1" } } );
     35} )( function( $ ) {
     36"use strict";
     37
     38$.extend( $.ui, { datepicker: { version: "1.13.0-rc.2" } } );
    3739
    3840var datepicker_instActive;
     
    6264    return 0;
    6365}
     66
    6467/* Date picker manager.
    6568   Use the singleton instance of this class, $.datepicker, to interact with the date picker.
     
    8891        nextText: "Next", // Display text for next month link
    8992        currentText: "Today", // Display text for current month link
    90         monthNames: [ "January","February","March","April","May","June",
    91             "July","August","September","October","November","December" ], // Names of months for drop-down and formatting
     93        monthNames: [ "January", "February", "March", "April", "May", "June",
     94            "July", "August", "September", "October", "November", "December" ], // Names of months for drop-down and formatting
    9295        monthNamesShort: [ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" ], // For formatting
    9396        dayNames: [ "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" ], // For formatting
    9497        dayNamesShort: [ "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" ], // For formatting
    95         dayNamesMin: [ "Su","Mo","Tu","We","Th","Fr","Sa" ], // Column headings for days starting at Sunday
     98        dayNamesMin: [ "Su", "Mo", "Tu", "We", "Th", "Fr", "Sa" ], // Column headings for days starting at Sunday
    9699        weekHeader: "Wk", // Column header for week of the year
    97100        dateFormat: "mm/dd/yy", // See format options on parseDate
     
    99102        isRTL: false, // True if right-to-left language, false if left-to-right
    100103        showMonthAfterYear: false, // True if the year select precedes month, false for month then year
    101         yearSuffix: "" // Additional text to append to the year in the month headers
     104        yearSuffix: "", // Additional text to append to the year in the month headers,
     105        selectMonthLabel: "Select month", // Invisible label for month selector
     106        selectYearLabel: "Select year" // Invisible label for year selector
    102107    };
    103108    this._defaults = { // Global defaults for all the date picker instances
     
    140145        onChangeMonthYear: null, // Define a callback function when the month or year is changed
    141146        onClose: null, // Define a callback function when the datepicker is closed
     147        onUpdateDatepicker: null, // Define a callback function when the datepicker is updated
    142148        numberOfMonths: 1, // Number of months to show at a time
    143149        showCurrentAtPos: 0, // The position in multipe months at which to show the current month (starting at 0)
     
    158164
    159165$.extend( Datepicker.prototype, {
     166
    160167    /* Class name added to elements to indicate already configured with a date picker. */
    161168    markerClassName: "hasDatepicker",
     
    240247        }
    241248        if ( appendText ) {
    242             inst.append = $( "<span class='" + this._appendClass + "'>" + appendText + "</span>" );
     249            inst.append = $( "<span>" )
     250                .addClass( this._appendClass )
     251                .text( appendText );
    243252            input[ isRTL ? "before" : "after" ]( inst.append );
    244253        }
     
    257266            buttonText = this._get( inst, "buttonText" );
    258267            buttonImage = this._get( inst, "buttonImage" );
    259             inst.trigger = $( this._get( inst, "buttonImageOnly" ) ?
    260                 $( "<img/>" ).addClass( this._triggerClass ).
    261                     attr( { src: buttonImage, alt: buttonText, title: buttonText } ) :
    262                 $( "<button type='button'></button>" ).addClass( this._triggerClass ).
    263                     html( !buttonImage ? buttonText : $( "<img/>" ).attr(
    264                     { src:buttonImage, alt:buttonText, title:buttonText } ) ) );
     268
     269            if ( this._get( inst, "buttonImageOnly" ) ) {
     270                inst.trigger = $( "<img>" )
     271                    .addClass( this._triggerClass )
     272                    .attr( {
     273                        src: buttonImage,
     274                        alt: buttonText,
     275                        title: buttonText
     276                    } );
     277            } else {
     278                inst.trigger = $( "<button type='button'>" )
     279                    .addClass( this._triggerClass );
     280                if ( buttonImage ) {
     281                    inst.trigger.html(
     282                        $( "<img>" )
     283                            .attr( {
     284                                src: buttonImage,
     285                                alt: buttonText,
     286                                title: buttonText
     287                            } )
     288                    );
     289                } else {
     290                    inst.trigger.text( buttonText );
     291                }
     292            }
     293
    265294            input[ isRTL ? "before" : "after" ]( inst.trigger );
    266295            inst.trigger.on( "click", function() {
     
    408437        if ( datepicker_instActive === inst ) {
    409438            datepicker_instActive = null;
     439            this._curInst = null;
    410440        }
    411441    },
     
    427457            target.disabled = false;
    428458            inst.trigger.filter( "button" ).
    429                 each( function() { this.disabled = false; } ).end().
     459                each( function() {
     460                    this.disabled = false;
     461                } ).end().
    430462                filter( "img" ).css( { opacity: "1.0", cursor: "" } );
    431463        } else if ( nodeName === "div" || nodeName === "span" ) {
     
    436468        }
    437469        this._disabledInputs = $.map( this._disabledInputs,
    438             function( value ) { return ( value === target ? null : value ); } ); // delete entry
     470
     471            // Delete entry
     472            function( value ) {
     473                return ( value === target ? null : value );
     474            } );
    439475    },
    440476
     
    455491            target.disabled = true;
    456492            inst.trigger.filter( "button" ).
    457                 each( function() { this.disabled = true; } ).end().
     493                each( function() {
     494                    this.disabled = true;
     495                } ).end().
    458496                filter( "img" ).css( { opacity: "0.5", cursor: "default" } );
    459497        } else if ( nodeName === "div" || nodeName === "span" ) {
     
    464502        }
    465503        this._disabledInputs = $.map( this._disabledInputs,
    466             function( value ) { return ( value === target ? null : value ); } ); // delete entry
     504
     505            // Delete entry
     506            function( value ) {
     507                return ( value === target ? null : value );
     508            } );
    467509        this._disabledInputs[ this._disabledInputs.length ] = target;
    468510    },
     
    492534        try {
    493535            return $.data( target, "datepicker" );
    494         }
    495         catch ( err ) {
     536        } catch ( err ) {
    496537            throw "Missing instance data for this datepicker";
    497538        }
     
    726767                    $.datepicker._updateDatepicker( inst );
    727768                }
    728             }
    729             catch ( err ) {
     769            } catch ( err ) {
    730770            }
    731771        }
     
    832872            cols = numMonths[ 1 ],
    833873            width = 17,
    834             activeCell = inst.dpDiv.find( "." + this._dayOverClass + " a" );
     874            activeCell = inst.dpDiv.find( "." + this._dayOverClass + " a" ),
     875            onUpdateDatepicker = $.datepicker._get( inst, "onUpdateDatepicker" );
    835876
    836877        if ( activeCell.length > 0 ) {
     
    858899                //assure that inst.yearshtml didn't change.
    859900                if ( origyearshtml === inst.yearshtml && inst.yearshtml ) {
    860                     inst.dpDiv.find( "select.ui-datepicker-year:first" ).replaceWith( inst.yearshtml );
     901                    inst.dpDiv.find( "select.ui-datepicker-year" ).first().replaceWith( inst.yearshtml );
    861902                }
    862903                origyearshtml = inst.yearshtml = null;
    863904            }, 0 );
     905        }
     906
     907        if ( onUpdateDatepicker ) {
     908            onUpdateDatepicker.apply( ( inst.input ? inst.input[ 0 ] : null ), [ inst ] );
    864909        }
    865910    },
     
    900945            isRTL = this._get( inst, "isRTL" );
    901946
    902         while ( obj && ( obj.type === "hidden" || obj.nodeType !== 1 || $.expr.filters.hidden( obj ) ) ) {
     947        while ( obj && ( obj.type === "hidden" || obj.nodeType !== 1 || $.expr.pseudos.hidden( obj ) ) ) {
    903948            obj = obj[ isRTL ? "previousSibling" : "nextSibling" ];
    904949        }
     
    9881033            return;
    9891034        }
    990         this._adjustInstDate( inst, offset +
    991             ( period === "M" ? this._get( inst, "showCurrentAtPos" ) : 0 ), // undo positioning
    992             period );
     1035        this._adjustInstDate( inst, offset, period );
    9931036        this._updateDatepicker( inst );
    9941037    },
     
    10371080
    10381081        inst = this._getInst( target[ 0 ] );
    1039         inst.selectedDay = inst.currentDay = $( "a", td ).html();
     1082        inst.selectedDay = inst.currentDay = parseInt( $( "a", td ).attr( "data-date" ) );
    10401083        inst.selectedMonth = inst.currentMonth = month;
    10411084        inst.selectedYear = inst.currentYear = year;
     
    10901133            date = this._getDate( inst );
    10911134            dateStr = this.formatDate( altFormat, date, this._getFormatConfig( inst ) );
    1092             $( altField ).val( dateStr );
     1135            $( document ).find( altField ).val( dateStr );
    10931136        }
    10941137    },
     
    15291572                    return $.datepicker.parseDate( $.datepicker._get( inst, "dateFormat" ),
    15301573                        offset, $.datepicker._getFormatConfig( inst ) );
    1531                 }
    1532                 catch ( e ) {
     1574                } catch ( e ) {
    15331575
    15341576                    // Ignore
     
    17041746            this._getFormatConfig( inst ) ) );
    17051747
    1706         prev = ( this._canAdjustMonth( inst, -1, drawYear, drawMonth ) ?
    1707             "<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click'" +
    1708             " title='" + prevText + "'><span class='ui-icon ui-icon-circle-triangle-" + ( isRTL ? "e" : "w" ) + "'>" + prevText + "</span></a>" :
    1709             ( hideIfNoPrevNext ? "" : "<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='" + prevText + "'><span class='ui-icon ui-icon-circle-triangle-" + ( isRTL ? "e" : "w" ) + "'>" + prevText + "</span></a>" ) );
     1748        if ( this._canAdjustMonth( inst, -1, drawYear, drawMonth ) ) {
     1749            prev = $( "<a>" )
     1750                .attr( {
     1751                    "class": "ui-datepicker-prev ui-corner-all",
     1752                    "data-handler": "prev",
     1753                    "data-event": "click",
     1754                    title: prevText
     1755                } )
     1756                .append(
     1757                    $( "<span>" )
     1758                        .addClass( "ui-icon ui-icon-circle-triangle-" +
     1759                            ( isRTL ? "e" : "w" ) )
     1760                        .text( prevText )
     1761                )[ 0 ].outerHTML;
     1762        } else if ( hideIfNoPrevNext ) {
     1763            prev = "";
     1764        } else {
     1765            prev = $( "<a>" )
     1766                .attr( {
     1767                    "class": "ui-datepicker-prev ui-corner-all ui-state-disabled",
     1768                    title: prevText
     1769                } )
     1770                .append(
     1771                    $( "<span>" )
     1772                        .addClass( "ui-icon ui-icon-circle-triangle-" +
     1773                            ( isRTL ? "e" : "w" ) )
     1774                        .text( prevText )
     1775                )[ 0 ].outerHTML;
     1776        }
    17101777
    17111778        nextText = this._get( inst, "nextText" );
     
    17141781            this._getFormatConfig( inst ) ) );
    17151782
    1716         next = ( this._canAdjustMonth( inst, +1, drawYear, drawMonth ) ?
    1717             "<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click'" +
    1718             " title='" + nextText + "'><span class='ui-icon ui-icon-circle-triangle-" + ( isRTL ? "w" : "e" ) + "'>" + nextText + "</span></a>" :
    1719             ( hideIfNoPrevNext ? "" : "<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='" + nextText + "'><span class='ui-icon ui-icon-circle-triangle-" + ( isRTL ? "w" : "e" ) + "'>" + nextText + "</span></a>" ) );
     1783        if ( this._canAdjustMonth( inst, +1, drawYear, drawMonth ) ) {
     1784            next = $( "<a>" )
     1785                .attr( {
     1786                    "class": "ui-datepicker-next ui-corner-all",
     1787                    "data-handler": "next",
     1788                    "data-event": "click",
     1789                    title: nextText
     1790                } )
     1791                .append(
     1792                    $( "<span>" )
     1793                        .addClass( "ui-icon ui-icon-circle-triangle-" +
     1794                            ( isRTL ? "w" : "e" ) )
     1795                        .text( nextText )
     1796                )[ 0 ].outerHTML;
     1797        } else if ( hideIfNoPrevNext ) {
     1798            next = "";
     1799        } else {
     1800            next = $( "<a>" )
     1801                .attr( {
     1802                    "class": "ui-datepicker-next ui-corner-all ui-state-disabled",
     1803                    title: nextText
     1804                } )
     1805                .append(
     1806                    $( "<span>" )
     1807                        .attr( "class", "ui-icon ui-icon-circle-triangle-" +
     1808                            ( isRTL ? "w" : "e" ) )
     1809                        .text( nextText )
     1810                )[ 0 ].outerHTML;
     1811        }
    17201812
    17211813        currentText = this._get( inst, "currentText" );
     
    17241816            this.formatDate( currentText, gotoDate, this._getFormatConfig( inst ) ) );
    17251817
    1726         controls = ( !inst.inline ? "<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>" +
    1727             this._get( inst, "closeText" ) + "</button>" : "" );
    1728 
    1729         buttonPanel = ( showButtonPanel ) ? "<div class='ui-datepicker-buttonpane ui-widget-content'>" + ( isRTL ? controls : "" ) +
    1730             ( this._isInRange( inst, gotoDate ) ? "<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'" +
    1731             ">" + currentText + "</button>" : "" ) + ( isRTL ? "" : controls ) + "</div>" : "";
     1818        controls = "";
     1819        if ( !inst.inline ) {
     1820            controls = $( "<button>" )
     1821                .attr( {
     1822                    type: "button",
     1823                    "class": "ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all",
     1824                    "data-handler": "hide",
     1825                    "data-event": "click"
     1826                } )
     1827                .text( this._get( inst, "closeText" ) )[ 0 ].outerHTML;
     1828        }
     1829
     1830        buttonPanel = "";
     1831        if ( showButtonPanel ) {
     1832            buttonPanel = $( "<div class='ui-datepicker-buttonpane ui-widget-content'>" )
     1833                .append( isRTL ? controls : "" )
     1834                .append( this._isInRange( inst, gotoDate ) ?
     1835                    $( "<button>" )
     1836                        .attr( {
     1837                            type: "button",
     1838                            "class": "ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all",
     1839                            "data-handler": "today",
     1840                            "data-event": "click"
     1841                        } )
     1842                        .text( currentText ) :
     1843                    "" )
     1844                .append( isRTL ? "" : controls )[ 0 ].outerHTML;
     1845        }
    17321846
    17331847        firstDay = parseInt( this._get( inst, "firstDay" ), 10 );
     
    18171931                            ( printDate.getTime() === currentDate.getTime() ? " ui-state-active" : "" ) + // highlight selected day
    18181932                            ( otherMonth ? " ui-priority-secondary" : "" ) + // distinguish dates from other months
    1819                             "' href='#'>" + printDate.getDate() + "</a>" ) ) + "</td>"; // display selectable date
     1933                            "' href='#' aria-current='" + ( printDate.getTime() === currentDate.getTime() ? "true" : "false" ) + // mark date as selected for screen reader
     1934                            "' data-date='" + printDate.getDate() + // store date as data
     1935                            "'>" + printDate.getDate() + "</a>" ) ) + "</td>"; // display selectable date
    18201936                        printDate.setDate( printDate.getDate() + 1 );
    18211937                        printDate = this._daylightSavingAdjust( printDate );
     
    18471963            changeYear = this._get( inst, "changeYear" ),
    18481964            showMonthAfterYear = this._get( inst, "showMonthAfterYear" ),
     1965            selectMonthLabel = this._get( inst, "selectMonthLabel" ),
     1966            selectYearLabel = this._get( inst, "selectYearLabel" ),
    18491967            html = "<div class='ui-datepicker-title'>",
    18501968            monthHtml = "";
     
    18561974            inMinYear = ( minDate && minDate.getFullYear() === drawYear );
    18571975            inMaxYear = ( maxDate && maxDate.getFullYear() === drawYear );
    1858             monthHtml += "<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>";
     1976            monthHtml += "<select class='ui-datepicker-month' aria-label='" + selectMonthLabel + "' data-handler='selectMonth' data-event='change'>";
    18591977            for ( month = 0; month < 12; month++ ) {
    18601978                if ( ( !inMinYear || month >= minDate.getMonth() ) && ( !inMaxYear || month <= maxDate.getMonth() ) ) {
     
    18912009                year = ( minDate ? Math.max( year, minDate.getFullYear() ) : year );
    18922010                endYear = ( maxDate ? Math.min( endYear, maxDate.getFullYear() ) : endYear );
    1893                 inst.yearshtml += "<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";
     2011                inst.yearshtml += "<select class='ui-datepicker-year' aria-label='" + selectYearLabel + "' data-handler='selectYear' data-event='change'>";
    18942012                for ( ; year <= endYear; year++ ) {
    18952013                    inst.yearshtml += "<option value='" + year + "'" +
     
    21032221    }
    21042222    return this.each( function() {
    2105         typeof options === "string" ?
    2106             $.datepicker[ "_" + options + "Datepicker" ].
    2107                 apply( $.datepicker, [ this ].concat( otherArgs ) ) :
     2223        if ( typeof options === "string" ) {
     2224            $.datepicker[ "_" + options + "Datepicker" ]
     2225                .apply( $.datepicker, [ this ].concat( otherArgs ) );
     2226        } else {
    21082227            $.datepicker._attachDatepicker( this, options );
     2228        }
    21092229    } );
    21102230};
     
    21132233$.datepicker.initialized = false;
    21142234$.datepicker.uuid = new Date().getTime();
    2115 $.datepicker.version = "1.12.1";
     2235$.datepicker.version = "1.13.0-rc.2";
    21162236
    21172237return $.datepicker;
    21182238
    2119 } ) );
     2239} );
  • trunk/src/js/_enqueues/vendor/jquery/ui/dialog.js

    r49134 r51794  
    11/*!
    2  * jQuery UI Dialog 1.12.1
     2 * jQuery UI Dialog 1.13.0-rc.2
    33 * http://jqueryui.com
    44 *
     
    1818
    1919( function( factory ) {
     20    "use strict";
     21
    2022    if ( typeof define === "function" && define.amd ) {
    2123
     
    3436        factory( jQuery );
    3537    }
    36 }( function( $ ) {
     38} )( function( $ ) {
     39"use strict";
    3740
    3841$.widget( "ui.dialog", {
    39     version: "1.12.1",
     42    version: "1.13.0-rc.2",
    4043    options: {
    4144        appendTo: "body",
     
    282285        } );
    283286
    284         // Track the dialog immediately upon openening in case a focus event
     287        // Track the dialog immediately upon opening in case a focus event
    285288        // somehow occurs outside of the dialog before an element inside the
    286289        // dialog is focused (#10152)
     
    318321    },
    319322
     323    _restoreTabbableFocus: function() {
     324        var activeElement = $.ui.safeActiveElement( this.document[ 0 ] ),
     325            isActive = this.uiDialog[ 0 ] === activeElement ||
     326                $.contains( this.uiDialog[ 0 ], activeElement );
     327        if ( !isActive ) {
     328            this._focusTabbable();
     329        }
     330    },
     331
    320332    _keepFocus: function( event ) {
    321         function checkFocus() {
    322             var activeElement = $.ui.safeActiveElement( this.document[ 0 ] ),
    323                 isActive = this.uiDialog[ 0 ] === activeElement ||
    324                     $.contains( this.uiDialog[ 0 ], activeElement );
    325             if ( !isActive ) {
    326                 this._focusTabbable();
    327             }
    328         }
    329333        event.preventDefault();
    330         checkFocus.call( this );
     334        this._restoreTabbableFocus();
    331335
    332336        // support: IE
    333337        // IE <= 8 doesn't prevent moving focus even with event.preventDefault()
    334338        // so we check again later
    335         this._delay( checkFocus );
     339        this._delay( this._restoreTabbableFocus );
    336340    },
    337341
     
    362366                }
    363367                var tabbables = this.uiDialog.find( ":tabbable" ),
    364                     first = tabbables.filter( ":first" ),
    365                     last = tabbables.filter( ":last" );
     368                    first = tabbables.first(),
     369                    last = tabbables.last();
    366370
    367371                if ( ( event.target === last[ 0 ] || event.target === this.uiDialog[ 0 ] ) &&
     
    474478        this.uiButtonSet.empty();
    475479
    476         if ( $.isEmptyObject( buttons ) || ( $.isArray( buttons ) && !buttons.length ) ) {
     480        if ( $.isEmptyObject( buttons ) || ( Array.isArray( buttons ) && !buttons.length ) ) {
    477481            this._removeClass( this.uiDialog, "ui-dialog-buttons" );
    478482            return;
     
    481485        $.each( buttons, function( name, props ) {
    482486            var click, buttonOptions;
    483             props = $.isFunction( props ) ?
     487            props = typeof props === "function" ?
    484488                { click: props, text: name } :
    485489                props;
     
    846850        }
    847851
     852        var jqMinor = $.fn.jquery.substring( 0, 4 );
     853
    848854        // We use a delay in case the overlay is created from an
    849855        // event that we're going to be cancelling (#2804)
     
    856862
    857863            // Prevent use of anchors and inputs
    858             // Using _on() for an event handler shared across many instances is
    859             // safe because the dialogs stack and must be closed in reverse order
    860             this._on( this.document, {
    861                 focusin: function( event ) {
    862                     if ( isOpening ) {
    863                         return;
    864                     }
    865 
    866                     if ( !this._allowInteraction( event ) ) {
    867                         event.preventDefault();
    868                         this._trackingInstances()[ 0 ]._focusTabbable();
     864            // This doesn't use `_on()` because it is a shared event handler
     865            // across all open modal dialogs.
     866            this.document.on( "focusin.ui-dialog", function( event ) {
     867                if ( isOpening ) {
     868                    return;
     869                }
     870
     871                var instance = this._trackingInstances()[ 0 ];
     872                if ( !instance._allowInteraction( event ) ) {
     873                    event.preventDefault();
     874                    instance._focusTabbable();
     875
     876                    // Support: jQuery >=3.4 <3.6 only
     877                    // Focus re-triggering in jQuery 3.4/3.5 makes the original element
     878                    // have its focus event propagated last, breaking the re-targeting.
     879                    // Trigger focus in a delay in addition if needed to avoid the issue
     880                    // See https://github.com/jquery/jquery/issues/4382
     881                    if ( jqMinor === "3.4." || jqMinor === "3.5." ) {
     882                        instance._delay( instance._restoreTabbableFocus );
    869883                    }
    870884                }
    871             } );
     885            }.bind( this ) );
    872886        }
    873887
     
    892906
    893907            if ( !overlays ) {
    894                 this._off( this.document, "focusin" );
     908                this.document.off( "focusin.ui-dialog" );
    895909                this.document.removeData( "ui-dialog-overlays" );
    896910            } else {
     
    930944return $.ui.dialog;
    931945
    932 } ) );
     946} );
  • trunk/src/js/_enqueues/vendor/jquery/ui/draggable.js

    r49134 r51794  
    11/*!
    2  * jQuery UI Draggable 1.12.1
     2 * jQuery UI Draggable 1.13.0-rc.2
    33 * http://jqueryui.com
    44 *
     
    1616
    1717( function( factory ) {
     18    "use strict";
     19
    1820    if ( typeof define === "function" && define.amd ) {
    1921
     
    2931        factory( jQuery );
    3032    }
    31 }( function( $ ) {
     33} )( function( $ ) {
     34"use strict";
    3235
    3336$.widget( "ui.draggable", $.ui.mouse, {
    34     version: "1.12.1",
     37    version: "1.13.0-rc.2",
    3538    widgetEventPrefix: "drag",
    3639    options: {
     
    196199
    197200        //Adjust the mouse offset relative to the helper if "cursorAt" is supplied
    198         ( o.cursorAt && this._adjustOffsetFromHelper( o.cursorAt ) );
     201        if ( o.cursorAt ) {
     202            this._adjustOffsetFromHelper( o.cursorAt );
     203        }
    199204
    200205        //Set a containment if given in the options
     
    291296        if ( ( this.options.revert === "invalid" && !dropped ) ||
    292297                ( this.options.revert === "valid" && dropped ) ||
    293                 this.options.revert === true || ( $.isFunction( this.options.revert ) &&
     298                this.options.revert === true || ( typeof this.options.revert === "function" &&
    294299                this.options.revert.call( this.element, dropped ) )
    295300        ) {
     
    363368
    364369        var o = this.options,
    365             helperIsFunction = $.isFunction( o.helper ),
     370            helperIsFunction = typeof o.helper === "function",
    366371            helper = helperIsFunction ?
    367372                $( o.helper.apply( this.element[ 0 ], [ event ] ) ) :
     
    402407            obj = obj.split( " " );
    403408        }
    404         if ( $.isArray( obj ) ) {
     409        if ( Array.isArray( obj ) ) {
    405410            obj = { left: +obj[ 0 ], top: +obj[ 1 ] || 0 };
    406411        }
     
    11111116                    inst.snapElements[ i ].item ) ) {
    11121117                if ( inst.snapElements[ i ].snapping ) {
    1113                     ( inst.options.snap.release &&
     1118                    if ( inst.options.snap.release ) {
    11141119                        inst.options.snap.release.call(
    11151120                            inst.element,
    11161121                            event,
    11171122                            $.extend( inst._uiHash(), { snapItem: inst.snapElements[ i ].item } )
    1118                         ) );
     1123                        );
     1124                    }
    11191125                }
    11201126                inst.snapElements[ i ].snapping = false;
     
    11871193
    11881194            if ( !inst.snapElements[ i ].snapping && ( ts || bs || ls || rs || first ) ) {
    1189                 ( inst.options.snap.snap &&
     1195                if ( inst.options.snap.snap ) {
    11901196                    inst.options.snap.snap.call(
    11911197                        inst.element,
     
    11931199                        $.extend( inst._uiHash(), {
    11941200                            snapItem: inst.snapElements[ i ].item
    1195                         } ) ) );
     1201                        } ) );
     1202                }
    11961203            }
    11971204            inst.snapElements[ i ].snapping = ( ts || bs || ls || rs || first );
     
    12111218            } );
    12121219
    1213         if ( !group.length ) { return; }
     1220        if ( !group.length ) {
     1221            return;
     1222        }
    12141223
    12151224        min = parseInt( $( group[ 0 ] ).css( "zIndex" ), 10 ) || 0;
     
    12421251return $.ui.draggable;
    12431252
    1244 } ) );
     1253} );
  • trunk/src/js/_enqueues/vendor/jquery/ui/droppable.js

    r49134 r51794  
    11/*!
    2  * jQuery UI Droppable 1.12.1
     2 * jQuery UI Droppable 1.13.0-rc.2
    33 * http://jqueryui.com
    44 *
     
    1515
    1616( function( factory ) {
     17    "use strict";
     18
    1719    if ( typeof define === "function" && define.amd ) {
    1820
     
    2931        factory( jQuery );
    3032    }
    31 }( function( $ ) {
     33} )( function( $ ) {
     34"use strict";
    3235
    3336$.widget( "ui.droppable", {
    34     version: "1.12.1",
     37    version: "1.13.0-rc.2",
    3538    widgetEventPrefix: "drop",
    3639    options: {
     
    5760        this.isout = true;
    5861
    59         this.accept = $.isFunction( accept ) ? accept : function( d ) {
     62        this.accept = typeof accept === "function" ? accept : function( d ) {
    6063            return d.is( accept );
    6164        };
     
    8083        this._addToManager( o.scope );
    8184
    82         o.addClasses && this._addClass( "ui-droppable" );
     85        if ( o.addClasses ) {
     86            this._addClass( "ui-droppable" );
     87        }
    8388
    8489    },
     
    109114
    110115        if ( key === "accept" ) {
    111             this.accept = $.isFunction( value ) ? value : function( d ) {
     116            this.accept = typeof value === "function" ? value : function( d ) {
    112117                return d.is( value );
    113118            };
     
    199204                        inst.element[ 0 ], ( draggable.currentItem || draggable.element )
    200205                    ) &&
    201                     intersect(
     206                    $.ui.intersect(
    202207                        draggable,
    203208                        $.extend( inst, { offset: inst.element.offset() } ),
     
    206211                ) {
    207212                    childrenIntersection = true;
    208                     return false; }
     213                    return false;
     214                }
    209215            } );
    210216        if ( childrenIntersection ) {
     
    235241
    236242    // Extension points just to make backcompat sane and avoid duplicating logic
    237     // TODO: Remove in 1.13 along with call to it below
     243    // TODO: Remove in 1.14 along with call to it below
    238244    _addHoverClass: function() {
    239245        this._addClass( "ui-droppable-hover" );
     
    253259} );
    254260
    255 var intersect = $.ui.intersect = ( function() {
     261$.ui.intersect = ( function() {
    256262    function isOverAxis( x, reference, size ) {
    257263        return ( x >= reference ) && ( x < ( reference + size ) );
     
    361367            }
    362368            if ( !this.options.disabled && this.visible &&
    363                     intersect( draggable, this, this.options.tolerance, event ) ) {
     369                    $.ui.intersect( draggable, this, this.options.tolerance, event ) ) {
    364370                dropped = this._drop.call( this, event ) || dropped;
    365371            }
     
    402408
    403409            var parentInstance, scope, parent,
    404                 intersects = intersect( draggable, this, this.options.tolerance, event ),
     410                intersects = $.ui.intersect( draggable, this, this.options.tolerance, event ),
    405411                c = !intersects && this.isover ?
    406412                    "isout" :
     
    494500return $.ui.droppable;
    495501
    496 } ) );
     502} );
  • trunk/src/js/_enqueues/vendor/jquery/ui/effect-blind.js

    r49134 r51794  
    11/*!
    2  * jQuery UI Effects Blind 1.12.1
     2 * jQuery UI Effects Blind 1.13.0-rc.2
    33 * http://jqueryui.com
    44 *
     
    1515
    1616( function( factory ) {
     17    "use strict";
     18
    1719    if ( typeof define === "function" && define.amd ) {
    1820
     
    2729        factory( jQuery );
    2830    }
    29 }( function( $ ) {
     31} )( function( $ ) {
     32"use strict";
    3033
    3134return $.effects.define( "blind", "hide", function( options, done ) {
     
    6770} );
    6871
    69 } ) );
     72} );
  • trunk/src/js/_enqueues/vendor/jquery/ui/effect-bounce.js

    r49134 r51794  
    11/*!
    2  * jQuery UI Effects Bounce 1.12.1
     2 * jQuery UI Effects Bounce 1.13.0-rc.2
    33 * http://jqueryui.com
    44 *
     
    1515
    1616( function( factory ) {
     17    "use strict";
     18
    1719    if ( typeof define === "function" && define.amd ) {
    1820
     
    2729        factory( jQuery );
    2830    }
    29 }( function( $ ) {
     31} )( function( $ ) {
     32"use strict";
    3033
    3134return $.effects.define( "bounce", function( options, done ) {
     
    107110} );
    108111
    109 } ) );
     112} );
  • trunk/src/js/_enqueues/vendor/jquery/ui/effect-clip.js

    r49134 r51794  
    11/*!
    2  * jQuery UI Effects Clip 1.12.1
     2 * jQuery UI Effects Clip 1.13.0-rc.2
    33 * http://jqueryui.com
    44 *
     
    1515
    1616( function( factory ) {
     17    "use strict";
     18
    1719    if ( typeof define === "function" && define.amd ) {
    1820
     
    2729        factory( jQuery );
    2830    }
    29 }( function( $ ) {
     31} )( function( $ ) {
     32"use strict";
    3033
    3134return $.effects.define( "clip", "hide", function( options, done ) {
     
    6265} );
    6366
    64 } ) );
     67} );
  • trunk/src/js/_enqueues/vendor/jquery/ui/effect-drop.js

    r49134 r51794  
    11/*!
    2  * jQuery UI Effects Drop 1.12.1
     2 * jQuery UI Effects Drop 1.13.0-rc.2
    33 * http://jqueryui.com
    44 *
     
    1515
    1616( function( factory ) {
     17    "use strict";
     18
    1719    if ( typeof define === "function" && define.amd ) {
    1820
     
    2729        factory( jQuery );
    2830    }
    29 }( function( $ ) {
     31} )( function( $ ) {
     32"use strict";
    3033
    3134return $.effects.define( "drop", "hide", function( options, done ) {
     
    6669} );
    6770
    68 } ) );
     71} );
  • trunk/src/js/_enqueues/vendor/jquery/ui/effect-explode.js

    r49134 r51794  
    11/*!
    2  * jQuery UI Effects Explode 1.12.1
     2 * jQuery UI Effects Explode 1.13.0-rc.2
    33 * http://jqueryui.com
    44 *
     
    1010//>>label: Explode Effect
    1111//>>group: Effects
    12 // jscs:disable maximumLineLength
     12/* eslint-disable max-len */
    1313//>>description: Explodes an element in all directions into n pieces. Implodes an element to its original wholeness.
    14 // jscs:enable maximumLineLength
     14/* eslint-enable max-len */
    1515//>>docs: http://api.jqueryui.com/explode-effect/
    1616//>>demos: http://jqueryui.com/effect/
    1717
    1818( function( factory ) {
     19    "use strict";
     20
    1921    if ( typeof define === "function" && define.amd ) {
    2022
     
    2931        factory( jQuery );
    3032    }
    31 }( function( $ ) {
     33} )( function( $ ) {
     34"use strict";
    3235
    3336return $.effects.define( "explode", "hide", function( options, done ) {
     
    108111} );
    109112
    110 } ) );
     113} );
  • trunk/src/js/_enqueues/vendor/jquery/ui/effect-fade.js

    r49134 r51794  
    11/*!
    2  * jQuery UI Effects Fade 1.12.1
     2 * jQuery UI Effects Fade 1.13.0-rc.2
    33 * http://jqueryui.com
    44 *
     
    1515
    1616( function( factory ) {
     17    "use strict";
     18
    1719    if ( typeof define === "function" && define.amd ) {
    1820
     
    2729        factory( jQuery );
    2830    }
    29 }( function( $ ) {
     31} )( function( $ ) {
     32"use strict";
    3033
    3134return $.effects.define( "fade", "toggle", function( options, done ) {
     
    4447} );
    4548
    46 } ) );
     49} );
  • trunk/src/js/_enqueues/vendor/jquery/ui/effect-fold.js

    r49134 r51794  
    11/*!
    2  * jQuery UI Effects Fold 1.12.1
     2 * jQuery UI Effects Fold 1.13.0-rc.2
    33 * http://jqueryui.com
    44 *
     
    1515
    1616( function( factory ) {
     17    "use strict";
     18
    1719    if ( typeof define === "function" && define.amd ) {
    1820
     
    2729        factory( jQuery );
    2830    }
    29 }( function( $ ) {
     31} )( function( $ ) {
     32"use strict";
    3033
    3134return $.effects.define( "fold", "hide", function( options, done ) {
     
    8689} );
    8790
    88 } ) );
     91} );
  • trunk/src/js/_enqueues/vendor/jquery/ui/effect-highlight.js

    r49134 r51794  
    11/*!
    2  * jQuery UI Effects Highlight 1.12.1
     2 * jQuery UI Effects Highlight 1.13.0-rc.2
    33 * http://jqueryui.com
    44 *
     
    1515
    1616( function( factory ) {
     17    "use strict";
     18
    1719    if ( typeof define === "function" && define.amd ) {
    1820
     
    2729        factory( jQuery );
    2830    }
    29 }( function( $ ) {
     31} )( function( $ ) {
     32"use strict";
    3033
    3134return $.effects.define( "highlight", "show", function( options, done ) {
     
    5457} );
    5558
    56 } ) );
     59} );
  • trunk/src/js/_enqueues/vendor/jquery/ui/effect-puff.js

    r49134 r51794  
    11/*!
    2  * jQuery UI Effects Puff 1.12.1
     2 * jQuery UI Effects Puff 1.13.0-rc.2
    33 * http://jqueryui.com
    44 *
     
    1515
    1616( function( factory ) {
     17    "use strict";
     18
    1719    if ( typeof define === "function" && define.amd ) {
    1820
     
    2830        factory( jQuery );
    2931    }
    30 }( function( $ ) {
     32} )( function( $ ) {
     33"use strict";
    3134
    3235return $.effects.define( "puff", "hide", function( options, done ) {
     
    3942} );
    4043
    41 } ) );
     44} );
  • trunk/src/js/_enqueues/vendor/jquery/ui/effect-pulsate.js

    r49134 r51794  
    11/*!
    2  * jQuery UI Effects Pulsate 1.12.1
     2 * jQuery UI Effects Pulsate 1.13.0-rc.2
    33 * http://jqueryui.com
    44 *
     
    1515
    1616( function( factory ) {
     17    "use strict";
     18
    1719    if ( typeof define === "function" && define.amd ) {
    1820
     
    2729        factory( jQuery );
    2830    }
    29 }( function( $ ) {
     31} )( function( $ ) {
     32"use strict";
    3033
    3134return $.effects.define( "pulsate", "show", function( options, done ) {
     
    6164} );
    6265
    63 } ) );
     66} );
  • trunk/src/js/_enqueues/vendor/jquery/ui/effect-scale.js

    r49134 r51794  
    11/*!
    2  * jQuery UI Effects Scale 1.12.1
     2 * jQuery UI Effects Scale 1.13.0-rc.2
    33 * http://jqueryui.com
    44 *
     
    1515
    1616( function( factory ) {
     17    "use strict";
     18
    1719    if ( typeof define === "function" && define.amd ) {
    1820
     
    2830        factory( jQuery );
    2931    }
    30 }( function( $ ) {
     32} )( function( $ ) {
     33"use strict";
    3134
    3235return $.effects.define( "scale", function( options, done ) {
     
    5356} );
    5457
    55 } ) );
     58} );
  • trunk/src/js/_enqueues/vendor/jquery/ui/effect-shake.js

    r49134 r51794  
    11/*!
    2  * jQuery UI Effects Shake 1.12.1
     2 * jQuery UI Effects Shake 1.13.0-rc.2
    33 * http://jqueryui.com
    44 *
     
    1515
    1616( function( factory ) {
     17    "use strict";
     18
    1719    if ( typeof define === "function" && define.amd ) {
    1820
     
    2729        factory( jQuery );
    2830    }
    29 }( function( $ ) {
     31} )( function( $ ) {
     32"use strict";
    3033
    3134return $.effects.define( "shake", function( options, done ) {
     
    7174} );
    7275
    73 } ) );
     76} );
  • trunk/src/js/_enqueues/vendor/jquery/ui/effect-size.js

    r49134 r51794  
    11/*!
    2  * jQuery UI Effects Size 1.12.1
     2 * jQuery UI Effects Size 1.13.0-rc.2
    33 * http://jqueryui.com
    44 *
     
    1515
    1616( function( factory ) {
     17    "use strict";
     18
    1719    if ( typeof define === "function" && define.amd ) {
    1820
     
    2729        factory( jQuery );
    2830    }
    29 }( function( $ ) {
     31} )( function( $ ) {
     32"use strict";
    3033
    3134return $.effects.define( "size", function( options, done ) {
     
    105108        to.left = ( original.outerWidth - to.outerWidth ) * baseline.x + pos.left;
    106109    }
     110    delete from.outerHeight;
     111    delete from.outerWidth;
    107112    element.css( from );
    108113
     
    188193} );
    189194
    190 } ) );
     195} );
  • trunk/src/js/_enqueues/vendor/jquery/ui/effect-slide.js

    r49134 r51794  
    11/*!
    2  * jQuery UI Effects Slide 1.12.1
     2 * jQuery UI Effects Slide 1.13.0-rc.2
    33 * http://jqueryui.com
    44 *
     
    1515
    1616( function( factory ) {
     17    "use strict";
     18
    1719    if ( typeof define === "function" && define.amd ) {
    1820
     
    2729        factory( jQuery );
    2830    }
    29 }( function( $ ) {
     31} )( function( $ ) {
     32"use strict";
    3033
    3134return $.effects.define( "slide", "show", function( options, done ) {
     
    7376} );
    7477
    75 } ) );
     78} );
  • trunk/src/js/_enqueues/vendor/jquery/ui/effect-transfer.js

    r49134 r51794  
    11/*!
    2  * jQuery UI Effects Transfer 1.12.1
     2 * jQuery UI Effects Transfer 1.13.0-rc.2
    33 * http://jqueryui.com
    44 *
     
    1515
    1616( function( factory ) {
     17    "use strict";
     18
    1719    if ( typeof define === "function" && define.amd ) {
    1820
     
    2729        factory( jQuery );
    2830    }
    29 }( function( $ ) {
     31} )( function( $ ) {
     32"use strict";
    3033
    3134var effect;
     
    3740return effect;
    3841
    39 } ) );
     42} );
  • trunk/src/js/_enqueues/vendor/jquery/ui/effect.js

    r49134 r51794  
    11/*!
    2  * jQuery UI Effects 1.12.1
     2 * jQuery UI Effects 1.13.0-rc.2
    33 * http://jqueryui.com
    44 *
     
    1010//>>label: Effects Core
    1111//>>group: Effects
    12 // jscs:disable maximumLineLength
     12/* eslint-disable max-len */
    1313//>>description: Extends the internal jQuery effects. Includes morphing and easing. Required by all other effects.
    14 // jscs:enable maximumLineLength
     14/* eslint-enable max-len */
    1515//>>docs: http://api.jqueryui.com/category/effects-core/
    1616//>>demos: http://jqueryui.com/effect/
    1717
    1818( function( factory ) {
     19    "use strict";
     20
    1921    if ( typeof define === "function" && define.amd ) {
    2022
     
    2628        factory( jQuery );
    2729    }
    28 }( function( $ ) {
     30} )( function( $ ) {
     31"use strict";
    2932
    3033// Include version.js
    3134$.ui = $.ui || {};
    32 $.ui.version = "1.12.1";
    33 
    34 var dataSpace = "ui-effects-",
    35     dataSpaceStyle = "ui-effects-style",
    36     dataSpaceAnimated = "ui-effects-animated",
    37 
    38     // Create a local jQuery because jQuery Color relies on it and the
    39     // global may not exist with AMD and a custom build (#10199)
    40     jQuery = $;
    41 
    42 $.effects = {
    43     effect: {}
    44 };
     35$.ui.version = "1.13.0-rc.2";
     36
     37// Source: jquery-var-for-color.js
     38// Create a local jQuery because jQuery Color relies on it and the
     39// global may not exist with AMD and a custom build (#10199).
     40// This module is a noop if used as a regular AMD module.
     41// eslint-disable-next-line no-unused-vars
     42var jQuery = $;
     43
    4544
    4645/*!
    47  * jQuery Color Animations v2.1.2
     46 * jQuery Color Animations v2.2.0
    4847 * https://github.com/jquery/jquery-color
    4948 *
    50  * Copyright 2014 jQuery Foundation and other contributors
     49 * Copyright OpenJS Foundation and other contributors
    5150 * Released under the MIT license.
    5251 * http://jquery.org/license
    5352 *
    54  * Date: Wed Jan 16 08:47:09 2013 -0600
     53 * Date: Sun May 10 09:02:36 2020 +0200
    5554 */
    56 ( function( jQuery, undefined ) {
    5755
    5856    var stepHooks = "backgroundColor borderBottomColor borderLeftColor borderRightColor " +
    5957        "borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",
    6058
    61     // Plusequals test for += 100 -= 100
     59    class2type = {},
     60    toString = class2type.toString,
     61
     62    // plusequals test for += 100 -= 100
    6263    rplusequals = /^([\-+])=\s*(\d+\.?\d*)/,
    6364
    64     // A set of RE's that can match strings and generate color tuples.
     65    // a set of RE's that can match strings and generate color tuples.
    6566    stringParsers = [ {
    6667            re: /rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
     
    8586        }, {
    8687
    87             // This regex ignores A-F because it's compared against an already lowercased string
    88             re: /#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,
     88            // this regex ignores A-F because it's compared against an already lowercased string
     89            re: /#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})?/,
    8990            parse: function( execResult ) {
    9091                return [
    9192                    parseInt( execResult[ 1 ], 16 ),
    9293                    parseInt( execResult[ 2 ], 16 ),
    93                     parseInt( execResult[ 3 ], 16 )
     94                    parseInt( execResult[ 3 ], 16 ),
     95                    execResult[ 4 ] ?
     96                        ( parseInt( execResult[ 4 ], 16 ) / 255 ).toFixed( 2 ) :
     97                        1
    9498                ];
    9599            }
    96100        }, {
    97101
    98             // This regex ignores A-F because it's compared against an already lowercased string
    99             re: /#([a-f0-9])([a-f0-9])([a-f0-9])/,
     102            // this regex ignores A-F because it's compared against an already lowercased string
     103            re: /#([a-f0-9])([a-f0-9])([a-f0-9])([a-f0-9])?/,
    100104            parse: function( execResult ) {
    101105                return [
    102106                    parseInt( execResult[ 1 ] + execResult[ 1 ], 16 ),
    103107                    parseInt( execResult[ 2 ] + execResult[ 2 ], 16 ),
    104                     parseInt( execResult[ 3 ] + execResult[ 3 ], 16 )
     108                    parseInt( execResult[ 3 ] + execResult[ 3 ], 16 ),
     109                    execResult[ 4 ] ?
     110                        ( parseInt( execResult[ 4 ] + execResult[ 4 ], 16 ) / 255 )
     111                            .toFixed( 2 ) :
     112                        1
    105113                ];
    106114            }
     
    118126        } ],
    119127
    120     // JQuery.Color( )
     128    // jQuery.Color( )
    121129    color = jQuery.Color = function( color, green, blue, alpha ) {
    122130        return new jQuery.Color.fn.parse( color, green, blue, alpha );
     
    172180    support = color.support = {},
    173181
    174     // Element for support tests
     182    // element for support tests
    175183    supportElem = jQuery( "<p>" )[ 0 ],
    176184
    177     // Colors = jQuery.Color.names
     185    // colors = jQuery.Color.names
    178186    colors,
    179187
    180     // Local aliases of functions called often
     188    // local aliases of functions called often
    181189    each = jQuery.each;
    182190
    183 // Determine rgba support immediately
     191// determine rgba support immediately
    184192supportElem.style.cssText = "background-color:rgba(1,1,1,.5)";
    185193support.rgba = supportElem.style.backgroundColor.indexOf( "rgba" ) > -1;
    186194
    187 // Define cache name and alpha properties
     195// define cache name and alpha properties
    188196// for rgba and hsla spaces
    189197each( spaces, function( spaceName, space ) {
     
    196204} );
    197205
     206// Populate the class2type map
     207jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ),
     208    function( _i, name ) {
     209        class2type[ "[object " + name + "]" ] = name.toLowerCase();
     210    } );
     211
     212function getType( obj ) {
     213    if ( obj == null ) {
     214        return obj + "";
     215    }
     216
     217    return typeof obj === "object" ?
     218        class2type[ toString.call( obj ) ] || "object" :
     219        typeof obj;
     220}
     221
    198222function clamp( value, prop, allowEmpty ) {
    199223    var type = propTypes[ prop.type ] || {};
     
    214238    if ( type.mod ) {
    215239
    216         // We add mod before modding to make sure that negatives values
     240        // we add mod before modding to make sure that negatives values
    217241        // get converted properly: -10 -> 350
    218242        return ( value + type.mod ) % type.mod;
    219243    }
    220244
    221     // For now all property types without mod have min and max
    222     return 0 > value ? 0 : type.max < value ? type.max : value;
     245    // for now all property types without mod have min and max
     246    return Math.min( type.max, Math.max( 0, value ) );
    223247}
    224248
     
    229253    string = string.toLowerCase();
    230254
    231     each( stringParsers, function( i, parser ) {
     255    each( stringParsers, function( _i, parser ) {
    232256        var parsed,
    233257            match = parser.re.exec( string ),
     
    238262            parsed = inst[ spaceName ]( values );
    239263
    240             // If this was an rgba parse the assignment might happen twice
     264            // if this was an rgba parse the assignment might happen twice
    241265            // oh well....
    242266            inst[ spaces[ spaceName ].cache ] = parsed[ spaces[ spaceName ].cache ];
    243267            rgba = inst._rgba = parsed._rgba;
    244268
    245             // Exit each( stringParsers ) here because we matched
     269            // exit each( stringParsers ) here because we matched
    246270            return false;
    247271        }
     
    251275    if ( rgba.length ) {
    252276
    253         // If this came from a parsed string, force "transparent" when alpha is 0
     277        // if this came from a parsed string, force "transparent" when alpha is 0
    254278        // chrome, (and maybe others) return "transparent" as rgba(0,0,0,0)
    255279        if ( rgba.join() === "0,0,0,0" ) {
     
    259283    }
    260284
    261     // Named colors
     285    // named colors
    262286    return colors[ string ];
    263287}
     
    275299
    276300        var inst = this,
    277             type = jQuery.type( red ),
     301            type = getType( red ),
    278302            rgba = this._rgba = [];
    279303
    280         // More than 1 argument specified - assume ( red, green, blue, alpha )
     304        // more than 1 argument specified - assume ( red, green, blue, alpha )
    281305        if ( green !== undefined ) {
    282306            red = [ red, green, blue, alpha ];
     
    289313
    290314        if ( type === "array" ) {
    291             each( spaces.rgba.props, function( key, prop ) {
     315            each( spaces.rgba.props, function( _key, prop ) {
    292316                rgba[ prop.idx ] = clamp( red[ prop.idx ], prop );
    293317            } );
     
    297321        if ( type === "object" ) {
    298322            if ( red instanceof color ) {
    299                 each( spaces, function( spaceName, space ) {
     323                each( spaces, function( _spaceName, space ) {
    300324                    if ( red[ space.cache ] ) {
    301325                        inst[ space.cache ] = red[ space.cache ].slice();
     
    303327                } );
    304328            } else {
    305                 each( spaces, function( spaceName, space ) {
     329                each( spaces, function( _spaceName, space ) {
    306330                    var cache = space.cache;
    307331                    each( space.props, function( key, prop ) {
    308332
    309                         // If the cache doesn't exist, and we know how to convert
     333                        // if the cache doesn't exist, and we know how to convert
    310334                        if ( !inst[ cache ] && space.to ) {
    311335
    312                             // If the value was null, we don't need to copy it
     336                            // if the value was null, we don't need to copy it
    313337                            // if the key was alpha, we don't need to copy it either
    314338                            if ( key === "alpha" || red[ key ] == null ) {
     
    318342                        }
    319343
    320                         // This is the only case where we allow nulls for ALL properties.
     344                        // this is the only case where we allow nulls for ALL properties.
    321345                        // call clamp with alwaysAllowEmpty
    322346                        inst[ cache ][ prop.idx ] = clamp( red[ key ], prop, true );
    323347                    } );
    324348
    325                     // Everything defined but alpha?
    326                     if ( inst[ cache ] &&
    327                             jQuery.inArray( null, inst[ cache ].slice( 0, 3 ) ) < 0 ) {
    328 
    329                         // Use the default of 1
    330                         inst[ cache ][ 3 ] = 1;
     349                    // everything defined but alpha?
     350                    if ( inst[ cache ] && jQuery.inArray( null, inst[ cache ].slice( 0, 3 ) ) < 0 ) {
     351
     352                        // use the default of 1
     353                        if ( inst[ cache ][ 3 ] == null ) {
     354                            inst[ cache ][ 3 ] = 1;
     355                        }
     356
    331357                        if ( space.from ) {
    332358                            inst._rgba = space.from( inst[ cache ] );
     
    378404
    379405        end = end[ space.cache ];
    380         each( space.props, function( key, prop ) {
     406        each( space.props, function( _key, prop ) {
    381407            var index = prop.idx,
    382408                startValue = start[ index ],
     
    384410                type = propTypes[ prop.type ] || {};
    385411
    386             // If null, don't override start value
     412            // if null, don't override start value
    387413            if ( endValue === null ) {
    388414                return;
    389415            }
    390416
    391             // If null - use end
     417            // if null - use end
    392418            if ( startValue === null ) {
    393419                result[ index ] = endValue;
     
    407433    blend: function( opaque ) {
    408434
    409         // If we are already opaque - return ourself
     435        // if we are already opaque - return ourself
    410436        if ( this._rgba[ 3 ] === 1 ) {
    411437            return this;
     
    423449        var prefix = "rgba(",
    424450            rgba = jQuery.map( this._rgba, function( v, i ) {
    425                 return v == null ? ( i > 2 ? 1 : 0 ) : v;
     451                if ( v != null ) {
     452                    return v;
     453                }
     454                return i > 2 ? 1 : 0;
    426455            } );
    427456
     
    440469                }
    441470
    442                 // Catch 1 and 2
     471                // catch 1 and 2
    443472                if ( i && i < 3 ) {
    444473                    v = Math.round( v * 100 ) + "%";
     
    463492        return "#" + jQuery.map( rgba, function( v ) {
    464493
    465             // Default to 0 when nulls exist
     494            // default to 0 when nulls exist
    466495            v = ( v || 0 ).toString( 16 );
    467496            return v.length === 1 ? "0" + v : v;
     
    474503color.fn.parse.prototype = color.fn;
    475504
    476 // Hsla conversions adapted from:
     505// hsla conversions adapted from:
    477506// https://code.google.com/p/maashaack/source/browse/packages/graphics/trunk/src/graphics/colors/HUE2RGB.as?r=5021
    478507
     
    516545    }
    517546
    518     // Chroma (diff) == 0 means greyscale which, by definition, saturation = 0%
     547    // chroma (diff) == 0 means greyscale which, by definition, saturation = 0%
    519548    // otherwise, saturation is based on the ratio of chroma (diff) to lightness (add)
    520549    if ( diff === 0 ) {
     
    547576};
    548577
     578
    549579each( spaces, function( spaceName, space ) {
    550580    var props = space.props,
     
    553583        from = space.from;
    554584
    555     // Makes rgba() and hsla()
     585    // makes rgba() and hsla()
    556586    color.fn[ spaceName ] = function( value ) {
    557587
    558         // Generate a cache for this space if it doesn't exist
     588        // generate a cache for this space if it doesn't exist
    559589        if ( to && !this[ cache ] ) {
    560590            this[ cache ] = to( this._rgba );
     
    565595
    566596        var ret,
    567             type = jQuery.type( value ),
     597            type = getType( value ),
    568598            arr = ( type === "array" || type === "object" ) ? value : arguments,
    569599            local = this[ cache ].slice();
     
    586616    };
    587617
    588     // Makes red() green() blue() alpha() hue() saturation() lightness()
     618    // makes red() green() blue() alpha() hue() saturation() lightness()
    589619    each( props, function( key, prop ) {
    590620
    591         // Alpha is included in more than one space
     621        // alpha is included in more than one space
    592622        if ( color.fn[ key ] ) {
    593623            return;
    594624        }
    595625        color.fn[ key ] = function( value ) {
    596             var vtype = jQuery.type( value ),
    597                 fn = ( key === "alpha" ? ( this._hsla ? "hsla" : "rgba" ) : spaceName ),
    598                 local = this[ fn ](),
    599                 cur = local[ prop.idx ],
    600                 match;
     626            var local, cur, match, fn,
     627                vtype = getType( value );
     628
     629            if ( key === "alpha" ) {
     630                fn = this._hsla ? "hsla" : "rgba";
     631            } else {
     632                fn = spaceName;
     633            }
     634            local = this[ fn ]();
     635            cur = local[ prop.idx ];
    601636
    602637            if ( vtype === "undefined" ) {
     
    606641            if ( vtype === "function" ) {
    607642                value = value.call( this, cur );
    608                 vtype = jQuery.type( value );
     643                vtype = getType( value );
    609644            }
    610645            if ( value == null && prop.empty ) {
     
    623658} );
    624659
    625 // Add cssHook and .fx.step function for each named hook.
     660// add cssHook and .fx.step function for each named hook.
    626661// accept a space separated string of properties
    627662color.hook = function( hook ) {
    628663    var hooks = hook.split( " " );
    629     each( hooks, function( i, hook ) {
     664    each( hooks, function( _i, hook ) {
    630665        jQuery.cssHooks[ hook ] = {
    631666            set: function( elem, value ) {
     
    633668                    backgroundColor = "";
    634669
    635                 if ( value !== "transparent" && ( jQuery.type( value ) !== "string" ||
    636                         ( parsed = stringParse( value ) ) ) ) {
     670                if ( value !== "transparent" && ( getType( value ) !== "string" || ( parsed = stringParse( value ) ) ) ) {
    637671                    value = color( parsed || value );
    638672                    if ( !support.rgba && value._rgba[ 3 ] !== 1 ) {
     
    660694                } catch ( e ) {
    661695
    662                     // Wrapped to prevent IE from throwing errors on "invalid" values like
    663                     // 'auto' or 'inherit'
     696                    // wrapped to prevent IE from throwing errors on "invalid" values like 'auto' or 'inherit'
    664697                }
    665698            }
     
    683716        var expanded = {};
    684717
    685         each( [ "Top", "Right", "Bottom", "Left" ], function( i, part ) {
     718        each( [ "Top", "Right", "Bottom", "Left" ], function( _i, part ) {
    686719            expanded[ "border" + part + "Color" ] = value;
    687720        } );
     
    719752};
    720753
    721 } )( jQuery );
     754
     755var dataSpace = "ui-effects-",
     756    dataSpaceStyle = "ui-effects-style",
     757    dataSpaceAnimated = "ui-effects-animated";
     758
     759$.effects = {
     760    effect: {}
     761};
    722762
    723763/******************************************************************************/
     
    751791);
    752792
     793function camelCase( string ) {
     794    return string.replace( /-([\da-z])/gi, function( all, letter ) {
     795        return letter.toUpperCase();
     796    } );
     797}
     798
    753799function getElementStyles( elem ) {
    754800    var key, len,
     
    763809            key = style[ len ];
    764810            if ( typeof style[ key ] === "string" ) {
    765                 styles[ $.camelCase( key ) ] = style[ key ];
     811                styles[ camelCase( key ) ] = style[ key ];
    766812            }
    767813        }
     
    937983( function() {
    938984
    939 if ( $.expr && $.expr.filters && $.expr.filters.animated ) {
    940     $.expr.filters.animated = ( function( orig ) {
     985if ( $.expr && $.expr.pseudos && $.expr.pseudos.animated ) {
     986    $.expr.pseudos.animated = ( function( orig ) {
    941987        return function( elem ) {
    942988            return !!$( elem ).data( dataSpaceAnimated ) || orig( elem );
    943989        };
    944     } )( $.expr.filters.animated );
     990    } )( $.expr.pseudos.animated );
    945991}
    946992
     
    10111057            // https://bugzilla.mozilla.org/show_bug.cgi?id=561664
    10121058            try {
     1059                // eslint-disable-next-line no-unused-expressions
    10131060                active.id;
    10141061            } catch ( e ) {
     
    10731120
    10741121$.extend( $.effects, {
    1075     version: "1.12.1",
     1122    version: "1.13.0-rc.2",
    10761123
    10771124    define: function( name, mode, effect ) {
     
    12891336
    12901337    // Catch (effect, callback)
    1291     if ( $.isFunction( options ) ) {
     1338    if ( typeof options === "function" ) {
    12921339        callback = options;
    12931340        speed = null;
     
    13031350
    13041351    // Catch (effect, options, callback)
    1305     if ( $.isFunction( speed ) ) {
     1352    if ( typeof speed === "function" ) {
    13061353        callback = speed;
    13071354        speed = null;
     
    13371384
    13381385    // Complete callback
    1339     if ( $.isFunction( option ) ) {
     1386    if ( typeof option === "function" ) {
    13401387        return true;
    13411388    }
     
    13641411                    normalizedMode = $.effects.mode( el, mode ) || defaultMode;
    13651412
    1366                 // Sentinel for duck-punching the :animated psuedo-selector
     1413                // Sentinel for duck-punching the :animated pseudo-selector
    13671414                el.data( dataSpaceAnimated, true );
    13681415
     
    13721419                modes.push( normalizedMode );
    13731420
    1374                 // See $.uiBackCompat inside of run() for removal of defaultMode in 1.13
     1421                // See $.uiBackCompat inside of run() for removal of defaultMode in 1.14
    13751422                if ( defaultMode && ( normalizedMode === "show" ||
    13761423                        ( normalizedMode === defaultMode && normalizedMode === "hide" ) ) ) {
     
    13821429                }
    13831430
    1384                 if ( $.isFunction( next ) ) {
     1431                if ( typeof next === "function" ) {
    13851432                    next();
    13861433                }
     
    14171464
    14181465            function done() {
    1419                 if ( $.isFunction( complete ) ) {
     1466                if ( typeof complete === "function" ) {
    14201467                    complete.call( elem[ 0 ] );
    14211468                }
    14221469
    1423                 if ( $.isFunction( next ) ) {
     1470                if ( typeof next === "function" ) {
    14241471                    next();
    14251472                }
     
    15301577            },
    15311578            startPosition = element.offset(),
    1532             transfer = $( "<div class='ui-effects-transfer'></div>" )
    1533                 .appendTo( "body" )
    1534                 .addClass( options.className )
    1535                 .css( {
    1536                     top: startPosition.top - fixTop,
    1537                     left: startPosition.left - fixLeft,
    1538                     height: element.innerHeight(),
    1539                     width: element.innerWidth(),
    1540                     position: targetFixed ? "fixed" : "absolute"
    1541                 } )
    1542                 .animate( animation, options.duration, options.easing, function() {
    1543                     transfer.remove();
    1544                     if ( $.isFunction( done ) ) {
    1545                         done();
    1546                     }
    1547                 } );
     1579            transfer = $( "<div class='ui-effects-transfer'></div>" );
     1580
     1581        transfer
     1582            .appendTo( "body" )
     1583            .addClass( options.className )
     1584            .css( {
     1585                top: startPosition.top - fixTop,
     1586                left: startPosition.left - fixLeft,
     1587                height: element.innerHeight(),
     1588                width: element.innerWidth(),
     1589                position: targetFixed ? "fixed" : "absolute"
     1590            } )
     1591            .animate( animation, options.duration, options.easing, function() {
     1592                transfer.remove();
     1593                if ( typeof done === "function" ) {
     1594                    done();
     1595                }
     1596            } );
    15481597    }
    15491598} );
     
    16371686return $.effects;
    16381687
    1639 } ) );
     1688} );
  • trunk/src/js/_enqueues/vendor/jquery/ui/menu.js

    r49134 r51794  
    11/*!
    2  * jQuery UI Menu 1.12.1
     2 * jQuery UI Menu 1.13.0-rc.2
    33 * http://jqueryui.com
    44 *
     
    1818
    1919( function( factory ) {
     20    "use strict";
     21
    2022    if ( typeof define === "function" && define.amd ) {
    2123
     
    3032        factory( jQuery );
    3133    }
    32 }( function( $ ) {
     34} )( function( $ ) {
     35"use strict";
    3336
    3437return $.widget( "ui.menu", {
    35     version: "1.12.1",
     38    version: "1.13.0-rc.2",
    3639    defaultElement: "<ul>",
    3740    delay: 300,
     
    6063        // as the event bubbles up through nested menus
    6164        this.mouseHandled = false;
     65        this.lastMousePosition = { x: null, y: null };
    6266        this.element
    6367            .uniqueId()
     
    7478            "mousedown .ui-menu-item": function( event ) {
    7579                event.preventDefault();
     80
     81                this._activateItem( event );
    7682            },
    7783            "click .ui-menu-item": function( event ) {
     
    103109                }
    104110            },
    105             "mouseenter .ui-menu-item": function( event ) {
    106 
    107                 // Ignore mouse events while typeahead is active, see #10458.
    108                 // Prevents focusing the wrong item when typeahead causes a scroll while the mouse
    109                 // is over an item in the menu
    110                 if ( this.previousFilter ) {
    111                     return;
    112                 }
    113 
    114                 var actualTarget = $( event.target ).closest( ".ui-menu-item" ),
    115                     target = $( event.currentTarget );
    116 
    117                 // Ignore bubbled events on parent items, see #11641
    118                 if ( actualTarget[ 0 ] !== target[ 0 ] ) {
    119                     return;
    120                 }
    121 
    122                 // Remove ui-state-active class from siblings of the newly focused menu item
    123                 // to avoid a jump caused by adjacent elements both having a class with a border
    124                 this._removeClass( target.siblings().children( ".ui-state-active" ),
    125                     null, "ui-state-active" );
    126                 this.focus( event, target );
    127             },
     111            "mouseenter .ui-menu-item": "_activateItem",
     112            "mousemove .ui-menu-item": "_activateItem",
    128113            mouseleave: "collapseAll",
    129114            "mouseleave .ui-menu": "collapseAll",
     
    132117                // If there's already an active item, keep it active
    133118                // If not, activate the first item
    134                 var item = this.active || this.element.find( this.options.items ).eq( 0 );
     119                var item = this.active || this._menuItems().first();
    135120
    136121                if ( !keepActiveItem ) {
     
    158143            click: function( event ) {
    159144                if ( this._closeOnDocumentClick( event ) ) {
    160                     this.collapseAll( event );
     145                    this.collapseAll( event, true );
    161146                }
    162147
     
    165150            }
    166151        } );
     152    },
     153
     154    _activateItem: function( event ) {
     155
     156        // Ignore mouse events while typeahead is active, see #10458.
     157        // Prevents focusing the wrong item when typeahead causes a scroll while the mouse
     158        // is over an item in the menu
     159        if ( this.previousFilter ) {
     160            return;
     161        }
     162
     163        // If the mouse didn't actually move, but the page was scrolled, ignore the event (#9356)
     164        if ( event.clientX === this.lastMousePosition.x &&
     165                event.clientY === this.lastMousePosition.y ) {
     166            return;
     167        }
     168
     169        this.lastMousePosition = {
     170            x: event.clientX,
     171            y: event.clientY
     172        };
     173
     174        var actualTarget = $( event.target ).closest( ".ui-menu-item" ),
     175            target = $( event.currentTarget );
     176
     177        // Ignore bubbled events on parent items, see #11641
     178        if ( actualTarget[ 0 ] !== target[ 0 ] ) {
     179            return;
     180        }
     181
     182        // If the item is already active, there's nothing to do
     183        if ( target.is( ".ui-state-active" ) ) {
     184            return;
     185        }
     186
     187        // Remove ui-state-active class from siblings of the newly focused menu item
     188        // to avoid a jump caused by adjacent elements both having a class with a border
     189        this._removeClass( target.siblings().children( ".ui-state-active" ),
     190            null, "ui-state-active" );
     191        this.focus( event, target );
    167192    },
    168193
     
    498523
    499524            this.activeMenu = currentMenu;
    500         }, this.delay );
     525        }, all ? 0 : this.delay );
    501526    },
    502527
     
    534559
    535560    expand: function( event ) {
    536         var newItem = this.active &&
    537             this.active
    538                 .children( ".ui-menu " )
    539                     .find( this.options.items )
    540                         .first();
     561        var newItem = this.active && this._menuItems( this.active.children( ".ui-menu" ) ).first();
    541562
    542563        if ( newItem && newItem.length ) {
     
    564585    isLastItem: function() {
    565586        return this.active && !this.active.nextAll( ".ui-menu-item" ).length;
     587    },
     588
     589    _menuItems: function( menu ) {
     590        return ( menu || this.element )
     591            .find( this.options.items )
     592            .filter( ".ui-menu-item" );
    566593    },
    567594
     
    572599                next = this.active
    573600                    [ direction === "first" ? "prevAll" : "nextAll" ]( ".ui-menu-item" )
    574                     .eq( -1 );
     601                    .last();
    575602            } else {
    576603                next = this.active
    577604                    [ direction + "All" ]( ".ui-menu-item" )
    578                     .eq( 0 );
     605                    .first();
    579606            }
    580607        }
    581608        if ( !next || !next.length || !this.active ) {
    582             next = this.activeMenu.find( this.options.items )[ filter ]();
     609            next = this._menuItems( this.activeMenu )[ filter ]();
    583610        }
    584611
     
    598625        if ( this._hasScroll() ) {
    599626            base = this.active.offset().top;
    600             height = this.element.height();
     627            height = this.element.innerHeight();
     628
     629            // jQuery 3.2 doesn't include scrollbars in innerHeight, add it back.
     630            if ( $.fn.jquery.indexOf( "3.2." ) === 0 ) {
     631                height += this.element[ 0 ].offsetHeight - this.element.outerHeight();
     632            }
     633
    601634            this.active.nextAll( ".ui-menu-item" ).each( function() {
    602635                item = $( this );
     
    606639            this.focus( event, item );
    607640        } else {
    608             this.focus( event, this.activeMenu.find( this.options.items )
     641            this.focus( event, this._menuItems( this.activeMenu )
    609642                [ !this.active ? "first" : "last" ]() );
    610643        }
     
    622655        if ( this._hasScroll() ) {
    623656            base = this.active.offset().top;
    624             height = this.element.height();
     657            height = this.element.innerHeight();
     658
     659            // jQuery 3.2 doesn't include scrollbars in innerHeight, add it back.
     660            if ( $.fn.jquery.indexOf( "3.2." ) === 0 ) {
     661                height += this.element[ 0 ].offsetHeight - this.element.outerHeight();
     662            }
     663
    625664            this.active.prevAll( ".ui-menu-item" ).each( function() {
    626665                item = $( this );
     
    630669            this.focus( event, item );
    631670        } else {
    632             this.focus( event, this.activeMenu.find( this.options.items ).first() );
     671            this.focus( event, this._menuItems( this.activeMenu ).first() );
    633672        }
    634673    },
     
    661700                    .filter( function() {
    662701                        return regex.test(
    663                             $.trim( $( this ).children( ".ui-menu-item-wrapper" ).text() ) );
     702                            String.prototype.trim.call(
     703                                $( this ).children( ".ui-menu-item-wrapper" ).text() ) );
    664704                    } );
    665705    }
    666706} );
    667707
    668 } ) );
     708} );
  • trunk/src/js/_enqueues/vendor/jquery/ui/mouse.js

    r49134 r51794  
    11/*!
    2  * jQuery UI Mouse 1.12.1
     2 * jQuery UI Mouse 1.13.0-rc.2
    33 * http://jqueryui.com
    44 *
     
    1414
    1515( function( factory ) {
     16    "use strict";
     17
    1618    if ( typeof define === "function" && define.amd ) {
    1719
     
    2628        factory( jQuery );
    2729    }
    28 }( function( $ ) {
     30} )( function( $ ) {
     31"use strict";
    2932
    3033var mouseHandled = false;
     
    3437
    3538return $.widget( "ui.mouse", {
    36     version: "1.12.1",
     39    version: "1.13.0-rc.2",
    3740    options: {
    3841        cancel: "input, textarea, button, select, option",
     
    7982
    8083        // We may have missed mouseup (out of window)
    81         ( this._mouseStarted && this._mouseUp( event ) );
     84        if ( this._mouseStarted ) {
     85            this._mouseUp( event );
     86        }
    8287
    8388        this._mouseDownEvent = event;
     
    172177            this._mouseStarted =
    173178                ( this._mouseStart( this._mouseDownEvent, event ) !== false );
    174             ( this._mouseStarted ? this._mouseDrag( event ) : this._mouseUp( event ) );
     179            if ( this._mouseStarted ) {
     180                this._mouseDrag( event );
     181            } else {
     182                this._mouseUp( event );
     183            }
    175184        }
    176185
     
    219228    _mouseDrag: function( /* event */ ) {},
    220229    _mouseStop: function( /* event */ ) {},
    221     _mouseCapture: function( /* event */ ) { return true; }
     230    _mouseCapture: function( /* event */ ) {
     231        return true;
     232    }
    222233} );
    223234
    224 } ) );
     235} );
  • trunk/src/js/_enqueues/vendor/jquery/ui/progressbar.js

    r49134 r51794  
    11/*!
    2  * jQuery UI Progressbar 1.12.1
     2 * jQuery UI Progressbar 1.13.0-rc.2
    33 * http://jqueryui.com
    44 *
     
    1010//>>label: Progressbar
    1111//>>group: Widgets
    12 // jscs:disable maximumLineLength
     12/* eslint-disable max-len */
    1313//>>description: Displays a status indicator for loading state, standard percentage, and other progress indicators.
    14 // jscs:enable maximumLineLength
     14/* eslint-enable max-len */
    1515//>>docs: http://api.jqueryui.com/progressbar/
    1616//>>demos: http://jqueryui.com/progressbar/
     
    2020
    2121( function( factory ) {
     22    "use strict";
     23
    2224    if ( typeof define === "function" && define.amd ) {
    2325
     
    3234        factory( jQuery );
    3335    }
    34 }( function( $ ) {
     36} )( function( $ ) {
     37"use strict";
    3538
    3639return $.widget( "ui.progressbar", {
    37     version: "1.12.1",
     40    version: "1.13.0-rc.2",
    3841    options: {
    3942        classes: {
     
    175178} );
    176179
    177 } ) );
     180} );
  • trunk/src/js/_enqueues/vendor/jquery/ui/resizable.js

    r49134 r51794  
    11/*!
    2  * jQuery UI Resizable 1.12.1
     2 * jQuery UI Resizable 1.13.0-rc.2
    33 * http://jqueryui.com
    44 *
     
    1818
    1919( function( factory ) {
     20    "use strict";
     21
    2022    if ( typeof define === "function" && define.amd ) {
    2123
     
    3133        factory( jQuery );
    3234    }
    33 }( function( $ ) {
     35} )( function( $ ) {
     36"use strict";
    3437
    3538$.widget( "ui.resizable", $.ui.mouse, {
    36     version: "1.12.1",
     39    version: "1.13.0-rc.2",
    3740    widgetEventPrefix: "resize",
    3841    options: {
     
    8992        // if the element doesn't have the scroll set, see if it's possible to
    9093        // set the scroll
    91         el[ scroll ] = 1;
    92         has = ( el[ scroll ] > 0 );
    93         el[ scroll ] = 0;
     94        try {
     95            el[ scroll ] = 1;
     96            has = ( el[ scroll ] > 0 );
     97            el[ scroll ] = 0;
     98        } catch ( e ) {
     99
     100            // `el` might be a string, then setting `scroll` will throw
     101            // an error in strict mode; ignore it.
     102        }
    94103        return has;
    95104    },
     
    114123
    115124            this.element.wrap(
    116                 $( "<div class='ui-wrapper' style='overflow: hidden;'></div>" ).css( {
     125                $( "<div class='ui-wrapper'></div>" ).css( {
     126                    overflow: "hidden",
    117127                    position: this.element.css( "position" ),
    118128                    width: this.element.outerWidth(),
     
    185195
    186196        this._mouseDestroy();
     197        this._addedHandles.remove();
    187198
    188199        var wrapper,
     
    191202                    .removeData( "resizable" )
    192203                    .removeData( "ui-resizable" )
    193                     .off( ".resizable" )
    194                     .find( ".ui-resizable-handle" )
    195                         .remove();
     204                    .off( ".resizable" );
    196205            };
    197206
     
    223232            this._removeHandles();
    224233            this._setupHandles();
     234            break;
     235        case "aspectRatio":
     236            this._aspectRatio = !!value;
    225237            break;
    226238        default:
     
    245257
    246258        this._handles = $();
     259        this._addedHandles = $();
    247260        if ( this.handles.constructor === String ) {
    248261
     
    256269            for ( i = 0; i < n.length; i++ ) {
    257270
    258                 handle = $.trim( n[ i ] );
     271                handle = String.prototype.trim.call( n[ i ] );
    259272                hname = "ui-resizable-" + handle;
    260273                axis = $( "<div>" );
     
    264277
    265278                this.handles[ handle ] = ".ui-resizable-" + handle;
    266                 this.element.append( axis );
     279                if ( !this.element.children( this.handles[ handle ] ).length ) {
     280                    this.element.append( axis );
     281                    this._addedHandles = this._addedHandles.add( axis );
     282                }
    267283            }
    268284
     
    330346
    331347    _removeHandles: function() {
    332         this._handles.remove();
     348        this._addedHandles.remove();
    333349    },
    334350
     
    710726        if ( this._helper ) {
    711727
    712             this.helper = this.helper || $( "<div style='overflow:hidden;'></div>" );
     728            this.helper = this.helper || $( "<div></div>" ).css( { overflow: "hidden" } );
    713729
    714730            this._addClass( this.helper, this._helper );
     
    767783    _propagate: function( n, event ) {
    768784        $.ui.plugin.call( this, n, [ event, this.ui() ] );
    769         ( n !== "resize" && this._trigger( n, event, this.ui() ) );
     785        if ( n !== "resize" ) {
     786            this._trigger( n, event, this.ui() );
     787        }
    770788    },
    771789
     
    888906            ch = that.containerSize.height;
    889907            cw = that.containerSize.width;
    890             width = ( that._hasScroll ( ce, "left" ) ? ce.scrollWidth : cw );
    891             height = ( that._hasScroll ( ce ) ? ce.scrollHeight : ch ) ;
     908            width = ( that._hasScroll( ce, "left" ) ? ce.scrollWidth : cw );
     909            height = ( that._hasScroll( ce ) ? ce.scrollHeight : ch );
    892910
    893911            that.parentData = {
     
    11961214return $.ui.resizable;
    11971215
    1198 } ) );
     1216} );
  • trunk/src/js/_enqueues/vendor/jquery/ui/selectable.js

    r49134 r51794  
    11/*!
    2  * jQuery UI Selectable 1.12.1
     2 * jQuery UI Selectable 1.13.0-rc.2
    33 * http://jqueryui.com
    44 *
     
    1616
    1717( function( factory ) {
     18    "use strict";
     19
    1820    if ( typeof define === "function" && define.amd ) {
    1921
     
    2931        factory( jQuery );
    3032    }
    31 }( function( $ ) {
     33} )( function( $ ) {
     34"use strict";
    3235
    3336return $.widget( "ui.selectable", $.ui.mouse, {
    34     version: "1.12.1",
     37    version: "1.13.0-rc.2",
    3538    options: {
    3639        appendTo: "body",
     
    183186            y2 = event.pageY;
    184187
    185         if ( x1 > x2 ) { tmp = x2; x2 = x1; x1 = tmp; }
    186         if ( y1 > y2 ) { tmp = y2; y2 = y1; y1 = tmp; }
     188        if ( x1 > x2 ) {
     189            tmp = x2; x2 = x1; x1 = tmp;
     190        }
     191        if ( y1 > y2 ) {
     192            tmp = y2; y2 = y1; y1 = tmp;
     193        }
    187194        this.helper.css( { left: x1, top: y1, width: x2 - x1, height: y2 - y1 } );
    188195
     
    307314} );
    308315
    309 } ) );
     316} );
  • trunk/src/js/_enqueues/vendor/jquery/ui/selectmenu.js

    r49134 r51794  
    11/*!
    2  * jQuery UI Selectmenu 1.12.1
     2 * jQuery UI Selectmenu 1.13.0-rc.2
    33 * http://jqueryui.com
    44 *
     
    1010//>>label: Selectmenu
    1111//>>group: Widgets
    12 // jscs:disable maximumLineLength
     12/* eslint-disable max-len */
    1313//>>description: Duplicates and extends the functionality of a native HTML select element, allowing it to be customizable in behavior and appearance far beyond the limitations of a native select.
    14 // jscs:enable maximumLineLength
     14/* eslint-enable max-len */
    1515//>>docs: http://api.jqueryui.com/selectmenu/
    1616//>>demos: http://jqueryui.com/selectmenu/
     
    2020
    2121( function( factory ) {
     22    "use strict";
     23
    2224    if ( typeof define === "function" && define.amd ) {
    2325
     
    3335        factory( jQuery );
    3436    }
    35 }( function( $ ) {
     37} )( function( $ ) {
     38"use strict";
    3639
    3740return $.widget( "ui.selectmenu", [ $.ui.formResetMixin, {
    38     version: "1.12.1",
     41    version: "1.13.0-rc.2",
    3942    defaultElement: "<select>",
    4043    options: {
     
    9194        this._on( this.labels, {
    9295            click: function( event ) {
    93                 this.button.focus();
     96                this.button.trigger( "focus" );
    9497                event.preventDefault();
    9598            }
     
    419422
    420423            if ( !$( event.target ).closest( ".ui-selectmenu-menu, #" +
    421                     $.ui.escapeSelector( this.ids.button ) ).length ) {
     424                $.escapeSelector( this.ids.button ) ).length ) {
    422425                this.close( event );
    423426            }
     
    650653            data = [];
    651654        options.each( function( index, item ) {
     655            if ( item.hidden ) {
     656                return;
     657            }
     658
    652659            data.push( that._parseOption( $( item ), index ) );
    653660        } );
     
    678685} ] );
    679686
    680 } ) );
     687} );
  • trunk/src/js/_enqueues/vendor/jquery/ui/slider.js

    r49134 r51794  
    11/*!
    2  * jQuery UI Slider 1.12.1
     2 * jQuery UI Slider 1.13.0-rc.2
    33 * http://jqueryui.com
    44 *
     
    1818
    1919( function( factory ) {
     20    "use strict";
     21
    2022    if ( typeof define === "function" && define.amd ) {
    2123
     
    3133        factory( jQuery );
    3234    }
    33 }( function( $ ) {
     35} )( function( $ ) {
     36"use strict";
    3437
    3538return $.widget( "ui.slider", $.ui.mouse, {
    36     version: "1.12.1",
     39    version: "1.13.0-rc.2",
    3740    widgetEventPrefix: "slide",
    3841
     
    131134                } else if ( options.values.length && options.values.length !== 2 ) {
    132135                    options.values = [ options.values[ 0 ], options.values[ 0 ] ];
    133                 } else if ( $.isArray( options.values ) ) {
     136                } else if ( Array.isArray( options.values ) ) {
    134137                    options.values = options.values.slice( 0 );
    135138                }
     
    394397
    395398        if ( arguments.length ) {
    396             if ( $.isArray( arguments[ 0 ] ) ) {
     399            if ( Array.isArray( arguments[ 0 ] ) ) {
    397400                vals = this.options.values;
    398401                newValues = arguments[ 0 ];
     
    428431        }
    429432
    430         if ( $.isArray( this.options.values ) ) {
     433        if ( Array.isArray( this.options.values ) ) {
    431434            valsLength = this.options.values.length;
    432435        }
     
    748751} );
    749752
    750 } ) );
     753} );
  • trunk/src/js/_enqueues/vendor/jquery/ui/sortable.js

    r49134 r51794  
    11/*!
    2  * jQuery UI Sortable 1.12.1
     2 * jQuery UI Sortable 1.13.0-rc.2
    33 * http://jqueryui.com
    44 *
     
    1616
    1717( function( factory ) {
     18    "use strict";
     19
    1820    if ( typeof define === "function" && define.amd ) {
    1921
     
    2931        factory( jQuery );
    3032    }
    31 }( function( $ ) {
     33} )( function( $ ) {
     34"use strict";
    3235
    3336return $.widget( "ui.sortable", $.ui.mouse, {
    34     version: "1.12.1",
     37    version: "1.13.0-rc.2",
    3538    widgetEventPrefix: "sort",
    3639    ready: false,
     
    192195        this.refreshPositions();
    193196
     197        //Prepare the dragged items parent
     198        this.appendTo = $( o.appendTo !== "parent" ?
     199                o.appendTo :
     200                this.currentItem.parent() );
     201
    194202        //Create and append the visible helper
    195203        this.helper = this._createHelper( event );
     
    205213        //Cache the margins of the original element
    206214        this._cacheMargins();
    207 
    208         //Get the next scrolling parent
    209         this.scrollParent = this.helper.scrollParent();
    210215
    211216        //The element's absolute position on the page minus margins
     
    221226                top: event.pageY - this.offset.top
    222227            },
    223             parent: this._getParentOffset(),
    224228
    225229            // This is a relative to absolute position minus the actual position calculation -
     
    228232        } );
    229233
    230         // Only after we got the offset, we can change the helper's position to absolute
     234        // After we get the helper offset, but before we get the parent offset we can
     235        // change the helper's position to absolute
    231236        // TODO: Still need to figure out a way to make relative sorting possible
    232237        this.helper.css( "position", "absolute" );
    233238        this.cssPosition = this.helper.css( "position" );
    234239
    235         //Generate the original position
    236         this.originalPosition = this._generatePosition( event );
    237         this.originalPageX = event.pageX;
    238         this.originalPageY = event.pageY;
    239 
    240240        //Adjust the mouse offset relative to the helper if "cursorAt" is supplied
    241         ( o.cursorAt && this._adjustOffsetFromHelper( o.cursorAt ) );
     241        if ( o.cursorAt ) {
     242            this._adjustOffsetFromHelper( o.cursorAt );
     243        }
    242244
    243245        //Cache the former DOM position
     
    256258        this._createPlaceholder();
    257259
     260        //Get the next scrolling parent
     261        this.scrollParent = this.placeholder.scrollParent();
     262
     263        $.extend( this.offset, {
     264            parent: this._getParentOffset()
     265        } );
     266
    258267        //Set a containment if given in the options
    259268        if ( o.containment ) {
     
    272281        }
    273282
     283        // We need to make sure to grab the zIndex before setting the
     284        // opacity, because setting the opacity to anything lower than 1
     285        // causes the zIndex to change from "auto" to 0.
     286        if ( o.zIndex ) { // zIndex option
     287            if ( this.helper.css( "zIndex" ) ) {
     288                this._storedZIndex = this.helper.css( "zIndex" );
     289            }
     290            this.helper.css( "zIndex", o.zIndex );
     291        }
     292
    274293        if ( o.opacity ) { // opacity option
    275294            if ( this.helper.css( "opacity" ) ) {
     
    277296            }
    278297            this.helper.css( "opacity", o.opacity );
    279         }
    280 
    281         if ( o.zIndex ) { // zIndex option
    282             if ( this.helper.css( "zIndex" ) ) {
    283                 this._storedZIndex = this.helper.css( "zIndex" );
    284             }
    285             this.helper.css( "zIndex", o.zIndex );
    286298        }
    287299
     
    320332        this._addClass( this.helper, "ui-sortable-helper" );
    321333
    322         // Execute the drag once - this causes the helper not to be visiblebefore getting its
    323         // correct position
     334        //Move the helper, if needed
     335        if ( !this.helper.parent().is( this.appendTo ) ) {
     336            this.helper.detach().appendTo( this.appendTo );
     337
     338            //Update position
     339            this.offset.parent = this._getParentOffset();
     340        }
     341
     342        //Generate the original position
     343        this.position = this.originalPosition = this._generatePosition( event );
     344        this.originalPageX = event.pageX;
     345        this.originalPageY = event.pageY;
     346        this.lastPositionAbs = this.positionAbs = this._convertPositionTo( "absolute" );
     347
    324348        this._mouseDrag( event );
     349
    325350        return true;
    326351
     352    },
     353
     354    _scroll: function( event ) {
     355        var o = this.options,
     356            scrolled = false;
     357
     358        if ( this.scrollParent[ 0 ] !== this.document[ 0 ] &&
     359                this.scrollParent[ 0 ].tagName !== "HTML" ) {
     360
     361            if ( ( this.overflowOffset.top + this.scrollParent[ 0 ].offsetHeight ) -
     362                    event.pageY < o.scrollSensitivity ) {
     363                this.scrollParent[ 0 ].scrollTop =
     364                    scrolled = this.scrollParent[ 0 ].scrollTop + o.scrollSpeed;
     365            } else if ( event.pageY - this.overflowOffset.top < o.scrollSensitivity ) {
     366                this.scrollParent[ 0 ].scrollTop =
     367                    scrolled = this.scrollParent[ 0 ].scrollTop - o.scrollSpeed;
     368            }
     369
     370            if ( ( this.overflowOffset.left + this.scrollParent[ 0 ].offsetWidth ) -
     371                    event.pageX < o.scrollSensitivity ) {
     372                this.scrollParent[ 0 ].scrollLeft = scrolled =
     373                    this.scrollParent[ 0 ].scrollLeft + o.scrollSpeed;
     374            } else if ( event.pageX - this.overflowOffset.left < o.scrollSensitivity ) {
     375                this.scrollParent[ 0 ].scrollLeft = scrolled =
     376                    this.scrollParent[ 0 ].scrollLeft - o.scrollSpeed;
     377            }
     378
     379        } else {
     380
     381            if ( event.pageY - this.document.scrollTop() < o.scrollSensitivity ) {
     382                scrolled = this.document.scrollTop( this.document.scrollTop() - o.scrollSpeed );
     383            } else if ( this.window.height() - ( event.pageY - this.document.scrollTop() ) <
     384                    o.scrollSensitivity ) {
     385                scrolled = this.document.scrollTop( this.document.scrollTop() + o.scrollSpeed );
     386            }
     387
     388            if ( event.pageX - this.document.scrollLeft() < o.scrollSensitivity ) {
     389                scrolled = this.document.scrollLeft(
     390                    this.document.scrollLeft() - o.scrollSpeed
     391                );
     392            } else if ( this.window.width() - ( event.pageX - this.document.scrollLeft() ) <
     393                    o.scrollSensitivity ) {
     394                scrolled = this.document.scrollLeft(
     395                    this.document.scrollLeft() + o.scrollSpeed
     396                );
     397            }
     398
     399        }
     400
     401        return scrolled;
    327402    },
    328403
    329404    _mouseDrag: function( event ) {
    330405        var i, item, itemElement, intersection,
    331             o = this.options,
    332             scrolled = false;
     406            o = this.options;
    333407
    334408        //Compute the helpers position
     
    336410        this.positionAbs = this._convertPositionTo( "absolute" );
    337411
    338         if ( !this.lastPositionAbs ) {
    339             this.lastPositionAbs = this.positionAbs;
    340         }
    341 
    342         //Do scrolling
    343         if ( this.options.scroll ) {
    344             if ( this.scrollParent[ 0 ] !== this.document[ 0 ] &&
    345                     this.scrollParent[ 0 ].tagName !== "HTML" ) {
    346 
    347                 if ( ( this.overflowOffset.top + this.scrollParent[ 0 ].offsetHeight ) -
    348                         event.pageY < o.scrollSensitivity ) {
    349                     this.scrollParent[ 0 ].scrollTop =
    350                         scrolled = this.scrollParent[ 0 ].scrollTop + o.scrollSpeed;
    351                 } else if ( event.pageY - this.overflowOffset.top < o.scrollSensitivity ) {
    352                     this.scrollParent[ 0 ].scrollTop =
    353                         scrolled = this.scrollParent[ 0 ].scrollTop - o.scrollSpeed;
    354                 }
    355 
    356                 if ( ( this.overflowOffset.left + this.scrollParent[ 0 ].offsetWidth ) -
    357                         event.pageX < o.scrollSensitivity ) {
    358                     this.scrollParent[ 0 ].scrollLeft = scrolled =
    359                         this.scrollParent[ 0 ].scrollLeft + o.scrollSpeed;
    360                 } else if ( event.pageX - this.overflowOffset.left < o.scrollSensitivity ) {
    361                     this.scrollParent[ 0 ].scrollLeft = scrolled =
    362                         this.scrollParent[ 0 ].scrollLeft - o.scrollSpeed;
    363                 }
    364 
    365             } else {
    366 
    367                 if ( event.pageY - this.document.scrollTop() < o.scrollSensitivity ) {
    368                     scrolled = this.document.scrollTop( this.document.scrollTop() - o.scrollSpeed );
    369                 } else if ( this.window.height() - ( event.pageY - this.document.scrollTop() ) <
    370                         o.scrollSensitivity ) {
    371                     scrolled = this.document.scrollTop( this.document.scrollTop() + o.scrollSpeed );
    372                 }
    373 
    374                 if ( event.pageX - this.document.scrollLeft() < o.scrollSensitivity ) {
    375                     scrolled = this.document.scrollLeft(
    376                         this.document.scrollLeft() - o.scrollSpeed
    377                     );
    378                 } else if ( this.window.width() - ( event.pageX - this.document.scrollLeft() ) <
    379                         o.scrollSensitivity ) {
    380                     scrolled = this.document.scrollLeft(
    381                         this.document.scrollLeft() + o.scrollSpeed
    382                     );
    383                 }
    384 
    385             }
    386 
    387             if ( scrolled !== false && $.ui.ddmanager && !o.dropBehaviour ) {
    388                 $.ui.ddmanager.prepareOffsets( this, event );
    389             }
    390         }
    391 
    392         //Regenerate the absolute position used for position checks
    393         this.positionAbs = this._convertPositionTo( "absolute" );
    394 
    395412        //Set the helper position
    396413        if ( !this.options.axis || this.options.axis !== "y" ) {
     
    401418        }
    402419
    403         //Rearrange
    404         for ( i = this.items.length - 1; i >= 0; i-- ) {
    405 
    406             //Cache variables and intersection, continue if no intersection
    407             item = this.items[ i ];
    408             itemElement = item.item[ 0 ];
    409             intersection = this._intersectsWithPointer( item );
    410             if ( !intersection ) {
    411                 continue;
    412             }
    413 
    414             // Only put the placeholder inside the current Container, skip all
    415             // items from other containers. This works because when moving
    416             // an item from one container to another the
    417             // currentContainer is switched before the placeholder is moved.
    418             //
    419             // Without this, moving items in "sub-sortables" can cause
    420             // the placeholder to jitter between the outer and inner container.
    421             if ( item.instance !== this.currentContainer ) {
    422                 continue;
    423             }
    424 
    425             // Cannot intersect with itself
    426             // no useless actions that have been done before
    427             // no action if the item moved is the parent of the item checked
    428             if ( itemElement !== this.currentItem[ 0 ] &&
    429                 this.placeholder[ intersection === 1 ? "next" : "prev" ]()[ 0 ] !== itemElement &&
    430                 !$.contains( this.placeholder[ 0 ], itemElement ) &&
    431                 ( this.options.type === "semi-dynamic" ?
    432                     !$.contains( this.element[ 0 ], itemElement ) :
    433                     true
    434                 )
    435             ) {
    436 
    437                 this.direction = intersection === 1 ? "down" : "up";
    438 
    439                 if ( this.options.tolerance === "pointer" || this._intersectsWithSides( item ) ) {
    440                     this._rearrange( event, item );
    441                 } else {
    442                     break;
    443                 }
    444 
    445                 this._trigger( "change", event, this._uiHash() );
    446                 break;
    447             }
    448         }
    449 
    450420        //Post events to containers
    451421        this._contactContainers( event );
     422
     423        if ( this.innermostContainer !== null ) {
     424
     425            //Do scrolling
     426            if ( o.scroll ) {
     427                if ( this._scroll( event ) !== false ) {
     428
     429                    //Update item positions used in position checks
     430                    this._refreshItemPositions( true );
     431
     432                    if ( $.ui.ddmanager && !o.dropBehaviour ) {
     433                        $.ui.ddmanager.prepareOffsets( this, event );
     434                    }
     435                }
     436            }
     437
     438            this.dragDirection = {
     439                vertical: this._getDragVerticalDirection(),
     440                horizontal: this._getDragHorizontalDirection()
     441            };
     442
     443            //Rearrange
     444            for ( i = this.items.length - 1; i >= 0; i-- ) {
     445
     446                //Cache variables and intersection, continue if no intersection
     447                item = this.items[ i ];
     448                itemElement = item.item[ 0 ];
     449                intersection = this._intersectsWithPointer( item );
     450                if ( !intersection ) {
     451                    continue;
     452                }
     453
     454                // Only put the placeholder inside the current Container, skip all
     455                // items from other containers. This works because when moving
     456                // an item from one container to another the
     457                // currentContainer is switched before the placeholder is moved.
     458                //
     459                // Without this, moving items in "sub-sortables" can cause
     460                // the placeholder to jitter between the outer and inner container.
     461                if ( item.instance !== this.currentContainer ) {
     462                    continue;
     463                }
     464
     465                // Cannot intersect with itself
     466                // no useless actions that have been done before
     467                // no action if the item moved is the parent of the item checked
     468                if ( itemElement !== this.currentItem[ 0 ] &&
     469                    this.placeholder[ intersection === 1 ?
     470                    "next" : "prev" ]()[ 0 ] !== itemElement &&
     471                    !$.contains( this.placeholder[ 0 ], itemElement ) &&
     472                    ( this.options.type === "semi-dynamic" ?
     473                        !$.contains( this.element[ 0 ], itemElement ) :
     474                        true
     475                    )
     476                ) {
     477
     478                    this.direction = intersection === 1 ? "down" : "up";
     479
     480                    if ( this.options.tolerance === "pointer" ||
     481                            this._intersectsWithSides( item ) ) {
     482                        this._rearrange( event, item );
     483                    } else {
     484                        break;
     485                    }
     486
     487                    this._trigger( "change", event, this._uiHash() );
     488                    break;
     489                }
     490            }
     491        }
    452492
    453493        //Interconnect with droppables
     
    653693        }
    654694
    655         verticalDirection = this._getDragVerticalDirection();
    656         horizontalDirection = this._getDragHorizontalDirection();
     695        verticalDirection = this.dragDirection.vertical;
     696        horizontalDirection = this.dragDirection.horizontal;
    657697
    658698        return this.floating ?
    659             ( ( horizontalDirection === "right" || verticalDirection === "down" ) ? 2 : 1 )
    660             : ( verticalDirection && ( verticalDirection === "down" ? 2 : 1 ) );
     699            ( ( horizontalDirection === "right" || verticalDirection === "down" ) ? 2 : 1 ) :
     700            ( verticalDirection && ( verticalDirection === "down" ? 2 : 1 ) );
    661701
    662702    },
     
    668708            isOverRightHalf = this._isOverAxis( this.positionAbs.left +
    669709                this.offset.click.left, item.left + ( item.width / 2 ), item.width ),
    670             verticalDirection = this._getDragVerticalDirection(),
    671             horizontalDirection = this._getDragHorizontalDirection();
     710            verticalDirection = this.dragDirection.vertical,
     711            horizontalDirection = this.dragDirection.horizontal;
    672712
    673713        if ( this.floating && horizontalDirection ) {
     
    718758                    inst = $.data( cur[ j ], this.widgetFullName );
    719759                    if ( inst && inst !== this && !inst.options.disabled ) {
    720                         queries.push( [ $.isFunction( inst.options.items ) ?
     760                        queries.push( [ typeof inst.options.items === "function" ?
    721761                            inst.options.items.call( inst.element ) :
    722762                            $( inst.options.items, inst.element )
     
    728768        }
    729769
    730         queries.push( [ $.isFunction( this.options.items ) ?
     770        queries.push( [ typeof this.options.items === "function" ?
    731771            this.options.items
    732772                .call( this.element, null, { options: this.options, item: this.currentItem } ) :
     
    768808        var i, j, cur, inst, targetData, _queries, item, queriesLength,
    769809            items = this.items,
    770             queries = [ [ $.isFunction( this.options.items ) ?
     810            queries = [ [ typeof this.options.items === "function" ?
    771811                this.options.items.call( this.element[ 0 ], event, { item: this.currentItem } ) :
    772812                $( this.options.items, this.element ), this ] ],
     
    780820                    inst = $.data( cur[ j ], this.widgetFullName );
    781821                    if ( inst && inst !== this && !inst.options.disabled ) {
    782                         queries.push( [ $.isFunction( inst.options.items ) ?
     822                        queries.push( [ typeof inst.options.items === "function" ?
    783823                            inst.options.items
    784824                                .call( inst.element[ 0 ], event, { item: this.currentItem } ) :
     
    811851    },
    812852
     853    _refreshItemPositions: function( fast ) {
     854        var i, item, t, p;
     855
     856        for ( i = this.items.length - 1; i >= 0; i-- ) {
     857            item = this.items[ i ];
     858
     859            //We ignore calculating positions of all connected containers when we're not over them
     860            if ( this.currentContainer && item.instance !== this.currentContainer &&
     861                    item.item[ 0 ] !== this.currentItem[ 0 ] ) {
     862                continue;
     863            }
     864
     865            t = this.options.toleranceElement ?
     866                $( this.options.toleranceElement, item.item ) :
     867                item.item;
     868
     869            if ( !fast ) {
     870                item.width = t.outerWidth();
     871                item.height = t.outerHeight();
     872            }
     873
     874            p = t.offset();
     875            item.left = p.left;
     876            item.top = p.top;
     877        }
     878    },
     879
    813880    refreshPositions: function( fast ) {
    814881
     
    818885            false;
    819886
    820         //This has to be redone because due to the item being moved out/into the offsetParent,
    821         // the offsetParent's position will change
    822         if ( this.offsetParent && this.helper ) {
    823             this.offset.parent = this._getParentOffset();
    824         }
    825 
    826         var i, item, t, p;
    827 
    828         for ( i = this.items.length - 1; i >= 0; i-- ) {
    829             item = this.items[ i ];
    830 
    831             //We ignore calculating positions of all connected containers when we're not over them
    832             if ( item.instance !== this.currentContainer && this.currentContainer &&
    833                     item.item[ 0 ] !== this.currentItem[ 0 ] ) {
    834                 continue;
    835             }
    836 
    837             t = this.options.toleranceElement ?
    838                 $( this.options.toleranceElement, item.item ) :
    839                 item.item;
    840 
    841             if ( !fast ) {
    842                 item.width = t.outerWidth();
    843                 item.height = t.outerHeight();
    844             }
    845 
    846             p = t.offset();
    847             item.left = p.left;
    848             item.top = p.top;
    849         }
     887        if ( this.innermostContainer !== null ) {
     888            this._refreshItemPositions( fast );
     889        }
     890
     891        var i, p;
    850892
    851893        if ( this.options.custom && this.options.custom.refreshContainers ) {
     
    868910    _createPlaceholder: function( that ) {
    869911        that = that || this;
    870         var className,
     912        var className, nodeName,
    871913            o = that.options;
    872914
    873915        if ( !o.placeholder || o.placeholder.constructor === String ) {
    874916            className = o.placeholder;
     917            nodeName = that.currentItem[ 0 ].nodeName.toLowerCase();
    875918            o.placeholder = {
    876919                element: function() {
    877920
    878                     var nodeName = that.currentItem[ 0 ].nodeName.toLowerCase(),
    879                         element = $( "<" + nodeName + ">", that.document[ 0 ] );
    880 
    881                         that._addClass( element, "ui-sortable-placeholder",
    882                                 className || that.currentItem[ 0 ].className )
    883                             ._removeClass( element, "ui-sortable-helper" );
     921                    var element = $( "<" + nodeName + ">", that.document[ 0 ] );
     922
     923                    that._addClass( element, "ui-sortable-placeholder",
     924                            className || that.currentItem[ 0 ].className )
     925                        ._removeClass( element, "ui-sortable-helper" );
    884926
    885927                    if ( nodeName === "tbody" ) {
     
    910952                    }
    911953
    912                     //If the element doesn't have a actual height by itself (without styles coming
    913                     // from a stylesheet), it receives the inline height from the dragged item
    914                     if ( !p.height() ) {
     954                    // If the element doesn't have a actual height or width by itself (without
     955                    // styles coming from a stylesheet), it receives the inline height and width
     956                    // from the dragged item. Or, if it's a tbody or tr, it's going to have a height
     957                    // anyway since we're populating them with <td>s above, but they're unlikely to
     958                    // be the correct height on their own if the row heights are dynamic, so we'll
     959                    // always assign the height of the dragged item given forcePlaceholderSize
     960                    // is true.
     961                    if ( !p.height() || ( o.forcePlaceholderSize &&
     962                            ( nodeName === "tbody" || nodeName === "tr" ) ) ) {
    915963                        p.height(
    916964                            that.currentItem.innerHeight() -
     
    9871035        }
    9881036
     1037        this.innermostContainer = innermostContainer;
     1038
    9891039        // If no intersecting containers found, return
    9901040        if ( !innermostContainer ) {
     
    10451095            }
    10461096
    1047             itemWithLeastDistance ?
    1048                 this._rearrange( event, itemWithLeastDistance, null, true ) :
     1097            if ( itemWithLeastDistance ) {
     1098                this._rearrange( event, itemWithLeastDistance, null, true );
     1099            } else {
    10491100                this._rearrange( event, null, this.containers[ innermostIndex ].element, true );
     1101            }
    10501102            this._trigger( "change", event, this._uiHash() );
    10511103            this.containers[ innermostIndex ]._trigger( "change", event, this._uiHash( this ) );
     
    10551107            this.options.placeholder.update( this.currentContainer, this.placeholder );
    10561108
     1109            //Update scrollParent
     1110            this.scrollParent = this.placeholder.scrollParent();
     1111
     1112            //Update overflowOffset
     1113            if ( this.scrollParent[ 0 ] !== this.document[ 0 ] &&
     1114                    this.scrollParent[ 0 ].tagName !== "HTML" ) {
     1115                this.overflowOffset = this.scrollParent.offset();
     1116            }
     1117
    10571118            this.containers[ innermostIndex ]._trigger( "over", event, this._uiHash( this ) );
    10581119            this.containers[ innermostIndex ].containerCache.over = 1;
     
    10641125
    10651126        var o = this.options,
    1066             helper = $.isFunction( o.helper ) ?
     1127            helper = typeof o.helper === "function" ?
    10671128                $( o.helper.apply( this.element[ 0 ], [ event, this.currentItem ] ) ) :
    10681129                ( o.helper === "clone" ? this.currentItem.clone() : this.currentItem );
     
    10701131        //Add the helper to the DOM if that didn't happen already
    10711132        if ( !helper.parents( "body" ).length ) {
    1072             $( o.appendTo !== "parent" ?
    1073                 o.appendTo :
    1074                 this.currentItem[ 0 ].parentNode )[ 0 ].appendChild( helper[ 0 ] );
     1133            this.appendTo[ 0 ].appendChild( helper[ 0 ] );
    10751134        }
    10761135
     
    11001159            obj = obj.split( " " );
    11011160        }
    1102         if ( $.isArray( obj ) ) {
     1161        if ( Array.isArray( obj ) ) {
    11031162            obj = { left: +obj[ 0 ], top: +obj[ 1 ] || 0 };
    11041163        }
     
    13801439    _rearrange: function( event, i, a, hardRefresh ) {
    13811440
    1382         a ? a[ 0 ].appendChild( this.placeholder[ 0 ] ) :
     1441        if ( a ) {
     1442            a[ 0 ].appendChild( this.placeholder[ 0 ] );
     1443        } else {
    13831444            i.item[ 0 ].parentNode.insertBefore( this.placeholder[ 0 ],
    13841445                ( this.direction === "down" ? i.item[ 0 ] : i.item[ 0 ].nextSibling ) );
     1446        }
    13851447
    13861448        //Various things done here to improve the performance:
     
    15481610} );
    15491611
    1550 } ) );
     1612} );
  • trunk/src/js/_enqueues/vendor/jquery/ui/spinner.js

    r49134 r51794  
    11/*!
    2  * jQuery UI Spinner 1.12.1
     2 * jQuery UI Spinner 1.13.0-rc.2
    33 * http://jqueryui.com
    44 *
     
    1818
    1919( function( factory ) {
     20    "use strict";
     21
    2022    if ( typeof define === "function" && define.amd ) {
    2123
     
    3133        factory( jQuery );
    3234    }
    33 }( function( $ ) {
    34 
    35 function spinnerModifer( fn ) {
     35} )( function( $ ) {
     36"use strict";
     37
     38function spinnerModifier( fn ) {
    3639    return function() {
    3740        var previous = this.element.val();
     
    4548
    4649$.widget( "ui.spinner", {
    47     version: "1.12.1",
     50    version: "1.13.0-rc.2",
    4851    defaultElement: "<input>",
    4952    widgetEventPrefix: "spin",
     
    138141        },
    139142        mousewheel: function( event, delta ) {
    140             if ( !delta ) {
     143            var activeElement = $.ui.safeActiveElement( this.document[ 0 ] );
     144            var isActive = this.element[ 0 ] === activeElement;
     145
     146            if ( !isActive || !delta ) {
    141147                return;
    142148            }
     149
    143150            if ( !this.spinning && !this._start( event ) ) {
    144151                return false;
     
    338345
    339346        if ( incremental ) {
    340             return $.isFunction( incremental ) ?
     347            return typeof incremental === "function" ?
    341348                incremental( i ) :
    342349                Math.floor( i * i * i / 50000 - i * i / 500 + 17 * i / 200 + 1 );
     
    436443    },
    437444
    438     _setOptions: spinnerModifer( function( options ) {
     445    _setOptions: spinnerModifier( function( options ) {
    439446        this._super( options );
    440447    } ),
     
    503510    },
    504511
    505     stepUp: spinnerModifer( function( steps ) {
     512    stepUp: spinnerModifier( function( steps ) {
    506513        this._stepUp( steps );
    507514    } ),
     
    513520    },
    514521
    515     stepDown: spinnerModifer( function( steps ) {
     522    stepDown: spinnerModifier( function( steps ) {
    516523        this._stepDown( steps );
    517524    } ),
     
    523530    },
    524531
    525     pageUp: spinnerModifer( function( pages ) {
     532    pageUp: spinnerModifier( function( pages ) {
    526533        this._stepUp( ( pages || 1 ) * this.options.page );
    527534    } ),
    528535
    529     pageDown: spinnerModifer( function( pages ) {
     536    pageDown: spinnerModifier( function( pages ) {
    530537        this._stepDown( ( pages || 1 ) * this.options.page );
    531538    } ),
     
    535542            return this._parse( this.element.val() );
    536543        }
    537         spinnerModifer( this._value ).call( this, newVal );
     544        spinnerModifier( this._value ).call( this, newVal );
    538545    },
    539546
     
    570577return $.ui.spinner;
    571578
    572 } ) );
     579} );
  • trunk/src/js/_enqueues/vendor/jquery/ui/tabs.js

    r49134 r51794  
    11/*!
    2  * jQuery UI Tabs 1.12.1
     2 * jQuery UI Tabs 1.13.0-rc.2
    33 * http://jqueryui.com
    44 *
     
    1818
    1919( function( factory ) {
     20    "use strict";
     21
    2022    if ( typeof define === "function" && define.amd ) {
    2123
     
    3032        factory( jQuery );
    3133    }
    32 }( function( $ ) {
     34} )( function( $ ) {
     35"use strict";
    3336
    3437$.widget( "ui.tabs", {
    35     version: "1.12.1",
     38    version: "1.13.0-rc.2",
    3639    delay: 300,
    3740    options: {
     
    9194        // Take disabling tabs via class attribute from HTML
    9295        // into account and update option properly.
    93         if ( $.isArray( options.disabled ) ) {
    94             options.disabled = $.unique( options.disabled.concat(
     96        if ( Array.isArray( options.disabled ) ) {
     97            options.disabled = $.uniqueSort( options.disabled.concat(
    9598                $.map( this.tabs.filter( ".ui-state-disabled" ), function( li ) {
    9699                    return that.tabs.index( li );
     
    427430        } )
    428431            .attr( {
    429                 role: "presentation",
    430432                tabIndex: -1
    431433            } );
     
    499501        var currentItem, li, i;
    500502
    501         if ( $.isArray( disabled ) ) {
     503        if ( Array.isArray( disabled ) ) {
    502504            if ( !disabled.length ) {
    503505                disabled = false;
     
    730732        if ( typeof index === "string" ) {
    731733            index = this.anchors.index( this.anchors.filter( "[href$='" +
    732                 $.ui.escapeSelector( index ) + "']" ) );
     734                $.escapeSelector( index ) + "']" ) );
    733735        }
    734736
     
    787789        } else {
    788790            index = this._getIndex( index );
    789             if ( $.isArray( disabled ) ) {
     791            if ( Array.isArray( disabled ) ) {
    790792                disabled = $.map( disabled, function( num ) {
    791793                    return num !== index ? num : null;
     
    813815                return;
    814816            }
    815             if ( $.isArray( disabled ) ) {
     817            if ( Array.isArray( disabled ) ) {
    816818                disabled = $.merge( [ index ], disabled ).sort();
    817819            } else {
     
    917919return $.ui.tabs;
    918920
    919 } ) );
     921} );
  • trunk/src/js/_enqueues/vendor/jquery/ui/tooltip.js

    r49134 r51794  
    11/*!
    2  * jQuery UI Tooltip 1.12.1
     2 * jQuery UI Tooltip 1.13.0-rc.2
    33 * http://jqueryui.com
    44 *
     
    1818
    1919( function( factory ) {
     20    "use strict";
     21
    2022    if ( typeof define === "function" && define.amd ) {
    2123
     
    3032        factory( jQuery );
    3133    }
    32 }( function( $ ) {
     34} )( function( $ ) {
     35"use strict";
    3336
    3437$.widget( "ui.tooltip", {
    35     version: "1.12.1",
     38    version: "1.13.0-rc.2",
    3639    options: {
    3740        classes: {
     
    3942        },
    4043        content: function() {
    41 
    42             // support: IE<9, Opera in jQuery <1.7
    43             // .text() can't accept undefined, so coerce to a string
    44             var title = $( this ).attr( "title" ) || "";
     44            var title = $( this ).attr( "title" );
    4545
    4646            // Escape title, since we're going from an attribute to raw HTML
     
    6969        elem
    7070            .data( "ui-tooltip-id", id )
    71             .attr( "aria-describedby", $.trim( describedby.join( " " ) ) );
     71            .attr( "aria-describedby", String.prototype.trim.call( describedby.join( " " ) ) );
    7272    },
    7373
     
    8282
    8383        elem.removeData( "ui-tooltip-id" );
    84         describedby = $.trim( describedby.join( " " ) );
     84        describedby = String.prototype.trim.call( describedby.join( " " ) );
    8585        if ( describedby ) {
    8686            elem.attr( "aria-describedby", describedby );
     
    328328                    clearInterval( delayedShow );
    329329                }
    330             }, $.fx.interval );
     330            }, 13 );
    331331        }
    332332
     
    449449
    450450    _removeTooltip: function( tooltip ) {
     451
     452        // Clear the interval for delayed tracking tooltips
     453        clearInterval( this.delayedShow );
     454
    451455        tooltip.remove();
    452456        delete this.tooltips[ tooltip.attr( "id" ) ];
     
    514518return $.ui.tooltip;
    515519
    516 } ) );
     520} );
  • trunk/src/wp-includes/script-loader.php

    r51692 r51794  
    757757    // the source files were flattened and included with some modifications for AMD loading.
    758758    // A notable change is that 'jquery-ui-core' now contains 'jquery-ui-position' and 'jquery-ui-widget'.
    759     $scripts->add( 'jquery-ui-core', "/wp-includes/js/jquery/ui/core$suffix.js", array( 'jquery' ), '1.12.1', 1 );
    760     $scripts->add( 'jquery-effects-core', "/wp-includes/js/jquery/ui/effect$suffix.js", array( 'jquery' ), '1.12.1', 1 );
    761 
    762     $scripts->add( 'jquery-effects-blind', "/wp-includes/js/jquery/ui/effect-blind$suffix.js", array( 'jquery-effects-core' ), '1.12.1', 1 );
    763     $scripts->add( 'jquery-effects-bounce', "/wp-includes/js/jquery/ui/effect-bounce$suffix.js", array( 'jquery-effects-core' ), '1.12.1', 1 );
    764     $scripts->add( 'jquery-effects-clip', "/wp-includes/js/jquery/ui/effect-clip$suffix.js", array( 'jquery-effects-core' ), '1.12.1', 1 );
    765     $scripts->add( 'jquery-effects-drop', "/wp-includes/js/jquery/ui/effect-drop$suffix.js", array( 'jquery-effects-core' ), '1.12.1', 1 );
    766     $scripts->add( 'jquery-effects-explode', "/wp-includes/js/jquery/ui/effect-explode$suffix.js", array( 'jquery-effects-core' ), '1.12.1', 1 );
    767     $scripts->add( 'jquery-effects-fade', "/wp-includes/js/jquery/ui/effect-fade$suffix.js", array( 'jquery-effects-core' ), '1.12.1', 1 );
    768     $scripts->add( 'jquery-effects-fold', "/wp-includes/js/jquery/ui/effect-fold$suffix.js", array( 'jquery-effects-core' ), '1.12.1', 1 );
    769     $scripts->add( 'jquery-effects-highlight', "/wp-includes/js/jquery/ui/effect-highlight$suffix.js", array( 'jquery-effects-core' ), '1.12.1', 1 );
    770     $scripts->add( 'jquery-effects-puff', "/wp-includes/js/jquery/ui/effect-puff$suffix.js", array( 'jquery-effects-core', 'jquery-effects-scale' ), '1.12.1', 1 );
    771     $scripts->add( 'jquery-effects-pulsate', "/wp-includes/js/jquery/ui/effect-pulsate$suffix.js", array( 'jquery-effects-core' ), '1.12.1', 1 );
    772     $scripts->add( 'jquery-effects-scale', "/wp-includes/js/jquery/ui/effect-scale$suffix.js", array( 'jquery-effects-core', 'jquery-effects-size' ), '1.12.1', 1 );
    773     $scripts->add( 'jquery-effects-shake', "/wp-includes/js/jquery/ui/effect-shake$suffix.js", array( 'jquery-effects-core' ), '1.12.1', 1 );
    774     $scripts->add( 'jquery-effects-size', "/wp-includes/js/jquery/ui/effect-size$suffix.js", array( 'jquery-effects-core' ), '1.12.1', 1 );
    775     $scripts->add( 'jquery-effects-slide', "/wp-includes/js/jquery/ui/effect-slide$suffix.js", array( 'jquery-effects-core' ), '1.12.1', 1 );
    776     $scripts->add( 'jquery-effects-transfer', "/wp-includes/js/jquery/ui/effect-transfer$suffix.js", array( 'jquery-effects-core' ), '1.12.1', 1 );
     759    $scripts->add( 'jquery-ui-core', "/wp-includes/js/jquery/ui/core$suffix.js", array( 'jquery' ), '1.13.0-rc.2', 1 );
     760    $scripts->add( 'jquery-effects-core', "/wp-includes/js/jquery/ui/effect$suffix.js", array( 'jquery' ), '1.13.0-rc.2', 1 );
     761
     762    $scripts->add( 'jquery-effects-blind', "/wp-includes/js/jquery/ui/effect-blind$suffix.js", array( 'jquery-effects-core' ), '1.13.0-rc.2', 1 );
     763    $scripts->add( 'jquery-effects-bounce', "/wp-includes/js/jquery/ui/effect-bounce$suffix.js", array( 'jquery-effects-core' ), '1.13.0-rc.2', 1 );
     764    $scripts->add( 'jquery-effects-clip', "/wp-includes/js/jquery/ui/effect-clip$suffix.js", array( 'jquery-effects-core' ), '1.13.0-rc.2', 1 );
     765    $scripts->add( 'jquery-effects-drop', "/wp-includes/js/jquery/ui/effect-drop$suffix.js", array( 'jquery-effects-core' ), '1.13.0-rc.2', 1 );
     766    $scripts->add( 'jquery-effects-explode', "/wp-includes/js/jquery/ui/effect-explode$suffix.js", array( 'jquery-effects-core' ), '1.13.0-rc.2', 1 );
     767    $scripts->add( 'jquery-effects-fade', "/wp-includes/js/jquery/ui/effect-fade$suffix.js", array( 'jquery-effects-core' ), '1.13.0-rc.2', 1 );
     768    $scripts->add( 'jquery-effects-fold', "/wp-includes/js/jquery/ui/effect-fold$suffix.js", array( 'jquery-effects-core' ), '1.13.0-rc.2', 1 );
     769    $scripts->add( 'jquery-effects-highlight', "/wp-includes/js/jquery/ui/effect-highlight$suffix.js", array( 'jquery-effects-core' ), '1.13.0-rc.2', 1 );
     770    $scripts->add( 'jquery-effects-puff', "/wp-includes/js/jquery/ui/effect-puff$suffix.js", array( 'jquery-effects-core', 'jquery-effects-scale' ), '1.13.0-rc.2', 1 );
     771    $scripts->add( 'jquery-effects-pulsate', "/wp-includes/js/jquery/ui/effect-pulsate$suffix.js", array( 'jquery-effects-core' ), '1.13.0-rc.2', 1 );
     772    $scripts->add( 'jquery-effects-scale', "/wp-includes/js/jquery/ui/effect-scale$suffix.js", array( 'jquery-effects-core', 'jquery-effects-size' ), '1.13.0-rc.2', 1 );
     773    $scripts->add( 'jquery-effects-shake', "/wp-includes/js/jquery/ui/effect-shake$suffix.js", array( 'jquery-effects-core' ), '1.13.0-rc.2', 1 );
     774    $scripts->add( 'jquery-effects-size', "/wp-includes/js/jquery/ui/effect-size$suffix.js", array( 'jquery-effects-core' ), '1.13.0-rc.2', 1 );
     775    $scripts->add( 'jquery-effects-slide', "/wp-includes/js/jquery/ui/effect-slide$suffix.js", array( 'jquery-effects-core' ), '1.13.0-rc.2', 1 );
     776    $scripts->add( 'jquery-effects-transfer', "/wp-includes/js/jquery/ui/effect-transfer$suffix.js", array( 'jquery-effects-core' ), '1.13.0-rc.2', 1 );
    777777
    778778    // Widgets
    779     $scripts->add( 'jquery-ui-accordion', "/wp-includes/js/jquery/ui/accordion$suffix.js", array( 'jquery-ui-core' ), '1.12.1', 1 );
    780     $scripts->add( 'jquery-ui-autocomplete', "/wp-includes/js/jquery/ui/autocomplete$suffix.js", array( 'jquery-ui-menu', 'wp-a11y' ), '1.12.1', 1 );
    781     $scripts->add( 'jquery-ui-button', "/wp-includes/js/jquery/ui/button$suffix.js", array( 'jquery-ui-core', 'jquery-ui-controlgroup', 'jquery-ui-checkboxradio' ), '1.12.1', 1 );
    782     $scripts->add( 'jquery-ui-datepicker', "/wp-includes/js/jquery/ui/datepicker$suffix.js", array( 'jquery-ui-core' ), '1.12.1', 1 );
    783     $scripts->add( 'jquery-ui-dialog', "/wp-includes/js/jquery/ui/dialog$suffix.js", array( 'jquery-ui-resizable', 'jquery-ui-draggable', 'jquery-ui-button' ), '1.12.1', 1 );
    784     $scripts->add( 'jquery-ui-menu', "/wp-includes/js/jquery/ui/menu$suffix.js", array( 'jquery-ui-core' ), '1.12.1', 1 );
    785     $scripts->add( 'jquery-ui-mouse', "/wp-includes/js/jquery/ui/mouse$suffix.js", array( 'jquery-ui-core' ), '1.12.1', 1 );
    786     $scripts->add( 'jquery-ui-progressbar', "/wp-includes/js/jquery/ui/progressbar$suffix.js", array( 'jquery-ui-core' ), '1.12.1', 1 );
    787     $scripts->add( 'jquery-ui-selectmenu', "/wp-includes/js/jquery/ui/selectmenu$suffix.js", array( 'jquery-ui-menu' ), '1.12.1', 1 );
    788     $scripts->add( 'jquery-ui-slider', "/wp-includes/js/jquery/ui/slider$suffix.js", array( 'jquery-ui-mouse' ), '1.12.1', 1 );
    789     $scripts->add( 'jquery-ui-spinner', "/wp-includes/js/jquery/ui/spinner$suffix.js", array( 'jquery-ui-button' ), '1.12.1', 1 );
    790     $scripts->add( 'jquery-ui-tabs', "/wp-includes/js/jquery/ui/tabs$suffix.js", array( 'jquery-ui-core' ), '1.12.1', 1 );
    791     $scripts->add( 'jquery-ui-tooltip', "/wp-includes/js/jquery/ui/tooltip$suffix.js", array( 'jquery-ui-core' ), '1.12.1', 1 );
     779    $scripts->add( 'jquery-ui-accordion', "/wp-includes/js/jquery/ui/accordion$suffix.js", array( 'jquery-ui-core' ), '1.13.0-rc.2', 1 );
     780    $scripts->add( 'jquery-ui-autocomplete', "/wp-includes/js/jquery/ui/autocomplete$suffix.js", array( 'jquery-ui-menu', 'wp-a11y' ), '1.13.0-rc.2', 1 );
     781    $scripts->add( 'jquery-ui-button', "/wp-includes/js/jquery/ui/button$suffix.js", array( 'jquery-ui-core', 'jquery-ui-controlgroup', 'jquery-ui-checkboxradio' ), '1.13.0-rc.2', 1 );
     782    $scripts->add( 'jquery-ui-datepicker', "/wp-includes/js/jquery/ui/datepicker$suffix.js", array( 'jquery-ui-core' ), '1.13.0-rc.2', 1 );
     783    $scripts->add( 'jquery-ui-dialog', "/wp-includes/js/jquery/ui/dialog$suffix.js", array( 'jquery-ui-resizable', 'jquery-ui-draggable', 'jquery-ui-button' ), '1.13.0-rc.2', 1 );
     784    $scripts->add( 'jquery-ui-menu', "/wp-includes/js/jquery/ui/menu$suffix.js", array( 'jquery-ui-core' ), '1.13.0-rc.2', 1 );
     785    $scripts->add( 'jquery-ui-mouse', "/wp-includes/js/jquery/ui/mouse$suffix.js", array( 'jquery-ui-core' ), '1.13.0-rc.2', 1 );
     786    $scripts->add( 'jquery-ui-progressbar', "/wp-includes/js/jquery/ui/progressbar$suffix.js", array( 'jquery-ui-core' ), '1.13.0-rc.2', 1 );
     787    $scripts->add( 'jquery-ui-selectmenu', "/wp-includes/js/jquery/ui/selectmenu$suffix.js", array( 'jquery-ui-menu' ), '1.13.0-rc.2', 1 );
     788    $scripts->add( 'jquery-ui-slider', "/wp-includes/js/jquery/ui/slider$suffix.js", array( 'jquery-ui-mouse' ), '1.13.0-rc.2', 1 );
     789    $scripts->add( 'jquery-ui-spinner', "/wp-includes/js/jquery/ui/spinner$suffix.js", array( 'jquery-ui-button' ), '1.13.0-rc.2', 1 );
     790    $scripts->add( 'jquery-ui-tabs', "/wp-includes/js/jquery/ui/tabs$suffix.js", array( 'jquery-ui-core' ), '1.13.0-rc.2', 1 );
     791    $scripts->add( 'jquery-ui-tooltip', "/wp-includes/js/jquery/ui/tooltip$suffix.js", array( 'jquery-ui-core' ), '1.13.0-rc.2', 1 );
    792792
    793793    // New in 1.12.1
    794     $scripts->add( 'jquery-ui-checkboxradio', "/wp-includes/js/jquery/ui/checkboxradio$suffix.js", array( 'jquery-ui-core' ), '1.12.1', 1 );
    795     $scripts->add( 'jquery-ui-controlgroup', "/wp-includes/js/jquery/ui/controlgroup$suffix.js", array( 'jquery-ui-core' ), '1.12.1', 1 );
     794    $scripts->add( 'jquery-ui-checkboxradio', "/wp-includes/js/jquery/ui/checkboxradio$suffix.js", array( 'jquery-ui-core' ), '1.13.0-rc.2', 1 );
     795    $scripts->add( 'jquery-ui-controlgroup', "/wp-includes/js/jquery/ui/controlgroup$suffix.js", array( 'jquery-ui-core' ), '1.13.0-rc.2', 1 );
    796796
    797797    // Interactions
    798     $scripts->add( 'jquery-ui-draggable', "/wp-includes/js/jquery/ui/draggable$suffix.js", array( 'jquery-ui-mouse' ), '1.12.1', 1 );
    799     $scripts->add( 'jquery-ui-droppable', "/wp-includes/js/jquery/ui/droppable$suffix.js", array( 'jquery-ui-draggable' ), '1.12.1', 1 );
    800     $scripts->add( 'jquery-ui-resizable', "/wp-includes/js/jquery/ui/resizable$suffix.js", array( 'jquery-ui-mouse' ), '1.12.1', 1 );
    801     $scripts->add( 'jquery-ui-selectable', "/wp-includes/js/jquery/ui/selectable$suffix.js", array( 'jquery-ui-mouse' ), '1.12.1', 1 );
    802     $scripts->add( 'jquery-ui-sortable', "/wp-includes/js/jquery/ui/sortable$suffix.js", array( 'jquery-ui-mouse' ), '1.12.1', 1 );
     798    $scripts->add( 'jquery-ui-draggable', "/wp-includes/js/jquery/ui/draggable$suffix.js", array( 'jquery-ui-mouse' ), '1.13.0-rc.2', 1 );
     799    $scripts->add( 'jquery-ui-droppable', "/wp-includes/js/jquery/ui/droppable$suffix.js", array( 'jquery-ui-draggable' ), '1.13.0-rc.2', 1 );
     800    $scripts->add( 'jquery-ui-resizable', "/wp-includes/js/jquery/ui/resizable$suffix.js", array( 'jquery-ui-mouse' ), '1.13.0-rc.2', 1 );
     801    $scripts->add( 'jquery-ui-selectable', "/wp-includes/js/jquery/ui/selectable$suffix.js", array( 'jquery-ui-mouse' ), '1.13.0-rc.2', 1 );
     802    $scripts->add( 'jquery-ui-sortable', "/wp-includes/js/jquery/ui/sortable$suffix.js", array( 'jquery-ui-mouse' ), '1.13.0-rc.2', 1 );
    803803
    804804    // As of 1.12.1 `jquery-ui-position` and `jquery-ui-widget` are part of `jquery-ui-core`.
    805805    // Listed here for back-compat.
    806     $scripts->add( 'jquery-ui-position', false, array( 'jquery-ui-core' ), '1.12.1', 1 );
    807     $scripts->add( 'jquery-ui-widget', false, array( 'jquery-ui-core' ), '1.12.1', 1 );
     806    $scripts->add( 'jquery-ui-position', false, array( 'jquery-ui-core' ), '1.13.0-rc.2', 1 );
     807    $scripts->add( 'jquery-ui-widget', false, array( 'jquery-ui-core' ), '1.13.0-rc.2', 1 );
    808808
    809809    // Strings for 'jquery-ui-autocomplete' live region messages.
Note: See TracChangeset for help on using the changeset viewer.