View | Details | Raw Unified | Return to bug 30011
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/lib/jquery/jquery-ui-1.11.4.css (-971 lines)
Lines 1-971 Link Here
1
/*! jQuery UI - v1.11.4 - 2016-02-22
2
* http://jqueryui.com
3
* Includes: core.css, draggable.css, sortable.css, accordion.css, autocomplete.css, button.css, datepicker.css, menu.css, progressbar.css, slider.css, tabs.css, theme.css
4
* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Verdana%2CArial%2Csans-serif&fwDefault=normal&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=cccccc&bgTextureHeader=highlight_soft&bgImgOpacityHeader=75&borderColorHeader=aaaaaa&fcHeader=222222&iconColorHeader=222222&bgColorContent=ffffff&bgTextureContent=flat&bgImgOpacityContent=75&borderColorContent=aaaaaa&fcContent=222222&iconColorContent=222222&bgColorDefault=e6e6e6&bgTextureDefault=glass&bgImgOpacityDefault=75&borderColorDefault=d3d3d3&fcDefault=555555&iconColorDefault=888888&bgColorHover=dadada&bgTextureHover=glass&bgImgOpacityHover=75&borderColorHover=999999&fcHover=212121&iconColorHover=454545&bgColorActive=ffffff&bgTextureActive=glass&bgImgOpacityActive=65&borderColorActive=aaaaaa&fcActive=212121&iconColorActive=454545&bgColorHighlight=fbf9ee&bgTextureHighlight=glass&bgImgOpacityHighlight=55&borderColorHighlight=fcefa1&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureError=glass&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=flat&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=flat&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px
5
* Copyright jQuery Foundation and other contributors; Licensed MIT */
6
7
/* Layout helpers
8
----------------------------------*/
9
.ui-helper-hidden {
10
	display: none;
11
}
12
.ui-helper-hidden-accessible {
13
	border: 0;
14
	clip: rect(0 0 0 0);
15
	height: 1px;
16
	margin: -1px;
17
	overflow: hidden;
18
	padding: 0;
19
	position: absolute;
20
	width: 1px;
21
}
22
.ui-helper-reset {
23
	margin: 0;
24
	padding: 0;
25
	border: 0;
26
	outline: 0;
27
	line-height: 1.3;
28
	text-decoration: none;
29
	font-size: 100%;
30
	list-style: none;
31
}
32
.ui-helper-clearfix:before,
33
.ui-helper-clearfix:after {
34
	content: "";
35
	display: table;
36
	border-collapse: collapse;
37
}
38
.ui-helper-clearfix:after {
39
	clear: both;
40
}
41
.ui-helper-clearfix {
42
	min-height: 0; /* support: IE7 */
43
}
44
.ui-helper-zfix {
45
	width: 100%;
46
	height: 100%;
47
	top: 0;
48
	left: 0;
49
	position: absolute;
50
	opacity: 0;
51
	filter:Alpha(Opacity=0); /* support: IE8 */
52
}
53
54
.ui-front {
55
	z-index: 100;
56
}
57
58
59
/* Interaction Cues
60
----------------------------------*/
61
.ui-state-disabled {
62
	cursor: default !important;
63
}
64
65
66
/* Icons
67
----------------------------------*/
68
69
/* states and images */
70
.ui-icon {
71
	display: block;
72
	text-indent: -99999px;
73
	overflow: hidden;
74
	background-repeat: no-repeat;
75
}
76
77
78
/* Misc visuals
79
----------------------------------*/
80
81
/* Overlays */
82
.ui-widget-overlay {
83
	position: fixed;
84
	top: 0;
85
	left: 0;
86
	width: 100%;
87
	height: 100%;
88
}
89
.ui-draggable-handle {
90
	-ms-touch-action: none;
91
	touch-action: none;
92
}
93
.ui-sortable-handle {
94
	-ms-touch-action: none;
95
	touch-action: none;
96
}
97
.ui-accordion .ui-accordion-header {
98
	display: block;
99
	cursor: pointer;
100
	position: relative;
101
	margin: 2px 0 0 0;
102
	padding: .5em .5em .5em .7em;
103
	min-height: 0; /* support: IE7 */
104
	font-size: 100%;
105
}
106
.ui-accordion .ui-accordion-icons {
107
	padding-left: 2.2em;
108
}
109
.ui-accordion .ui-accordion-icons .ui-accordion-icons {
110
	padding-left: 2.2em;
111
}
112
.ui-accordion .ui-accordion-header .ui-accordion-header-icon {
113
	position: absolute;
114
	left: .5em;
115
	top: 50%;
116
	margin-top: -8px;
117
}
118
.ui-accordion .ui-accordion-content {
119
	padding: 1em 2.2em;
120
	border-top: 0;
121
	overflow: auto;
122
}
123
.ui-autocomplete {
124
	position: absolute;
125
	top: 0;
126
	left: 0;
127
	cursor: default;
128
}
129
.ui-button {
130
	display: inline-block;
131
	position: relative;
132
	padding: 0;
133
	line-height: normal;
134
	margin-right: .1em;
135
	cursor: pointer;
136
	vertical-align: middle;
137
	text-align: center;
138
	overflow: visible; /* removes extra width in IE */
139
}
140
.ui-button,
141
.ui-button:link,
142
.ui-button:visited,
143
.ui-button:hover,
144
.ui-button:active {
145
	text-decoration: none;
146
}
147
/* to make room for the icon, a width needs to be set here */
148
.ui-button-icon-only {
149
	width: 2.2em;
150
}
151
/* button elements seem to need a little more width */
152
button.ui-button-icon-only {
153
	width: 2.4em;
154
}
155
.ui-button-icons-only {
156
	width: 3.4em;
157
}
158
button.ui-button-icons-only {
159
	width: 3.7em;
160
}
161
162
/* button text element */
163
.ui-button .ui-button-text {
164
	display: block;
165
	line-height: normal;
166
}
167
.ui-button-text-only .ui-button-text {
168
	padding: .4em 1em;
169
}
170
.ui-button-icon-only .ui-button-text,
171
.ui-button-icons-only .ui-button-text {
172
	padding: .4em;
173
	text-indent: -9999999px;
174
}
175
.ui-button-text-icon-primary .ui-button-text,
176
.ui-button-text-icons .ui-button-text {
177
	padding: .4em 1em .4em 2.1em;
178
}
179
.ui-button-text-icon-secondary .ui-button-text,
180
.ui-button-text-icons .ui-button-text {
181
	padding: .4em 2.1em .4em 1em;
182
}
183
.ui-button-text-icons .ui-button-text {
184
	padding-left: 2.1em;
185
	padding-right: 2.1em;
186
}
187
/* no icon support for input elements, provide padding by default */
188
input.ui-button {
189
	padding: .4em 1em;
190
}
191
192
/* button icon element(s) */
193
.ui-button-icon-only .ui-icon,
194
.ui-button-text-icon-primary .ui-icon,
195
.ui-button-text-icon-secondary .ui-icon,
196
.ui-button-text-icons .ui-icon,
197
.ui-button-icons-only .ui-icon {
198
	position: absolute;
199
	top: 50%;
200
	margin-top: -8px;
201
}
202
.ui-button-icon-only .ui-icon {
203
	left: 50%;
204
	margin-left: -8px;
205
}
206
.ui-button-text-icon-primary .ui-button-icon-primary,
207
.ui-button-text-icons .ui-button-icon-primary,
208
.ui-button-icons-only .ui-button-icon-primary {
209
	left: .5em;
210
}
211
.ui-button-text-icon-secondary .ui-button-icon-secondary,
212
.ui-button-text-icons .ui-button-icon-secondary,
213
.ui-button-icons-only .ui-button-icon-secondary {
214
	right: .5em;
215
}
216
217
/* button sets */
218
.ui-buttonset {
219
	margin-right: 7px;
220
}
221
.ui-buttonset .ui-button {
222
	margin-left: 0;
223
	margin-right: -.3em;
224
}
225
226
/* workarounds */
227
/* reset extra padding in Firefox, see h5bp.com/l */
228
input.ui-button::-moz-focus-inner,
229
button.ui-button::-moz-focus-inner {
230
	border: 0;
231
	padding: 0;
232
}
233
.ui-datepicker {
234
	width: 17em;
235
	padding: .2em .2em 0;
236
	display: none;
237
}
238
.ui-datepicker .ui-datepicker-header {
239
	position: relative;
240
	padding: .2em 0;
241
}
242
.ui-datepicker .ui-datepicker-prev,
243
.ui-datepicker .ui-datepicker-next {
244
	position: absolute;
245
	top: 2px;
246
	width: 1.8em;
247
	height: 1.8em;
248
}
249
.ui-datepicker .ui-datepicker-prev-hover,
250
.ui-datepicker .ui-datepicker-next-hover {
251
	top: 1px;
252
}
253
.ui-datepicker .ui-datepicker-prev {
254
	left: 2px;
255
}
256
.ui-datepicker .ui-datepicker-next {
257
	right: 2px;
258
}
259
.ui-datepicker .ui-datepicker-prev-hover {
260
	left: 1px;
261
}
262
.ui-datepicker .ui-datepicker-next-hover {
263
	right: 1px;
264
}
265
.ui-datepicker .ui-datepicker-prev span,
266
.ui-datepicker .ui-datepicker-next span {
267
	display: block;
268
	position: absolute;
269
	left: 50%;
270
	margin-left: -8px;
271
	top: 50%;
272
	margin-top: -8px;
273
}
274
.ui-datepicker .ui-datepicker-title {
275
	margin: 0 2.3em;
276
	line-height: 1.8em;
277
	text-align: center;
278
}
279
.ui-datepicker .ui-datepicker-title select {
280
	font-size: 1em;
281
	margin: 1px 0;
282
}
283
.ui-datepicker select.ui-datepicker-month,
284
.ui-datepicker select.ui-datepicker-year {
285
	width: 45%;
286
}
287
.ui-datepicker table {
288
	width: 100%;
289
	font-size: .9em;
290
	border-collapse: collapse;
291
	margin: 0 0 .4em;
292
}
293
.ui-datepicker th {
294
	padding: .7em .3em;
295
	text-align: center;
296
	font-weight: bold;
297
	border: 0;
298
}
299
.ui-datepicker td {
300
	border: 0;
301
	padding: 1px;
302
}
303
.ui-datepicker td span,
304
.ui-datepicker td a {
305
	display: block;
306
	padding: .2em;
307
	text-align: right;
308
	text-decoration: none;
309
}
310
.ui-datepicker .ui-datepicker-buttonpane {
311
	background-image: none;
312
	margin: .7em 0 0 0;
313
	padding: 0 .2em;
314
	border-left: 0;
315
	border-right: 0;
316
	border-bottom: 0;
317
}
318
.ui-datepicker .ui-datepicker-buttonpane button {
319
	float: right;
320
	margin: .5em .2em .4em;
321
	cursor: pointer;
322
	padding: .2em .6em .3em .6em;
323
	width: auto;
324
	overflow: visible;
325
}
326
.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current {
327
	float: left;
328
}
329
330
/* with multiple calendars */
331
.ui-datepicker.ui-datepicker-multi {
332
	width: auto;
333
}
334
.ui-datepicker-multi .ui-datepicker-group {
335
	float: left;
336
}
337
.ui-datepicker-multi .ui-datepicker-group table {
338
	width: 95%;
339
	margin: 0 auto .4em;
340
}
341
.ui-datepicker-multi-2 .ui-datepicker-group {
342
	width: 50%;
343
}
344
.ui-datepicker-multi-3 .ui-datepicker-group {
345
	width: 33.3%;
346
}
347
.ui-datepicker-multi-4 .ui-datepicker-group {
348
	width: 25%;
349
}
350
.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,
351
.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header {
352
	border-left-width: 0;
353
}
354
.ui-datepicker-multi .ui-datepicker-buttonpane {
355
	clear: left;
356
}
357
.ui-datepicker-row-break {
358
	clear: both;
359
	width: 100%;
360
	font-size: 0;
361
}
362
363
/* RTL support */
364
.ui-datepicker-rtl {
365
	direction: rtl;
366
}
367
.ui-datepicker-rtl .ui-datepicker-prev {
368
	right: 2px;
369
	left: auto;
370
}
371
.ui-datepicker-rtl .ui-datepicker-next {
372
	left: 2px;
373
	right: auto;
374
}
375
.ui-datepicker-rtl .ui-datepicker-prev:hover {
376
	right: 1px;
377
	left: auto;
378
}
379
.ui-datepicker-rtl .ui-datepicker-next:hover {
380
	left: 1px;
381
	right: auto;
382
}
383
.ui-datepicker-rtl .ui-datepicker-buttonpane {
384
	clear: right;
385
}
386
.ui-datepicker-rtl .ui-datepicker-buttonpane button {
387
	float: left;
388
}
389
.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current,
390
.ui-datepicker-rtl .ui-datepicker-group {
391
	float: right;
392
}
393
.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header,
394
.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header {
395
	border-right-width: 0;
396
	border-left-width: 1px;
397
}
398
.ui-menu {
399
	list-style: none;
400
	padding: 0;
401
	margin: 0;
402
	display: block;
403
	outline: none;
404
}
405
.ui-menu .ui-menu {
406
	position: absolute;
407
}
408
.ui-menu .ui-menu-item {
409
	position: relative;
410
	margin: 0;
411
	padding: 3px 1em 3px .4em;
412
	cursor: pointer;
413
	min-height: 0; /* support: IE7 */
414
	/* support: IE10, see #8844 */
415
	list-style-image: url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7");
416
}
417
.ui-menu .ui-menu-divider {
418
	margin: 5px 0;
419
	height: 0;
420
	font-size: 0;
421
	line-height: 0;
422
	border-width: 1px 0 0 0;
423
}
424
.ui-menu .ui-state-focus,
425
.ui-menu .ui-state-active {
426
	margin: -1px;
427
}
428
429
/* icon support */
430
.ui-menu-icons {
431
	position: relative;
432
}
433
.ui-menu-icons .ui-menu-item {
434
	padding-left: 2em;
435
}
436
437
/* left-aligned */
438
.ui-menu .ui-icon {
439
	position: absolute;
440
	top: 0;
441
	bottom: 0;
442
	left: .2em;
443
	margin: auto 0;
444
}
445
446
/* right-aligned */
447
.ui-menu .ui-menu-icon {
448
	left: auto;
449
	right: 0;
450
}
451
.ui-progressbar {
452
	height: 2em;
453
	text-align: left;
454
	overflow: hidden;
455
}
456
.ui-progressbar .ui-progressbar-value {
457
	margin: -1px;
458
	height: 100%;
459
}
460
.ui-progressbar .ui-progressbar-overlay {
461
	background: url("data:image/gif;base64,R0lGODlhKAAoAIABAAAAAP///yH/C05FVFNDQVBFMi4wAwEAAAAh+QQJAQABACwAAAAAKAAoAAACkYwNqXrdC52DS06a7MFZI+4FHBCKoDeWKXqymPqGqxvJrXZbMx7Ttc+w9XgU2FB3lOyQRWET2IFGiU9m1frDVpxZZc6bfHwv4c1YXP6k1Vdy292Fb6UkuvFtXpvWSzA+HycXJHUXiGYIiMg2R6W459gnWGfHNdjIqDWVqemH2ekpObkpOlppWUqZiqr6edqqWQAAIfkECQEAAQAsAAAAACgAKAAAApSMgZnGfaqcg1E2uuzDmmHUBR8Qil95hiPKqWn3aqtLsS18y7G1SzNeowWBENtQd+T1JktP05nzPTdJZlR6vUxNWWjV+vUWhWNkWFwxl9VpZRedYcflIOLafaa28XdsH/ynlcc1uPVDZxQIR0K25+cICCmoqCe5mGhZOfeYSUh5yJcJyrkZWWpaR8doJ2o4NYq62lAAACH5BAkBAAEALAAAAAAoACgAAAKVDI4Yy22ZnINRNqosw0Bv7i1gyHUkFj7oSaWlu3ovC8GxNso5fluz3qLVhBVeT/Lz7ZTHyxL5dDalQWPVOsQWtRnuwXaFTj9jVVh8pma9JjZ4zYSj5ZOyma7uuolffh+IR5aW97cHuBUXKGKXlKjn+DiHWMcYJah4N0lYCMlJOXipGRr5qdgoSTrqWSq6WFl2ypoaUAAAIfkECQEAAQAsAAAAACgAKAAAApaEb6HLgd/iO7FNWtcFWe+ufODGjRfoiJ2akShbueb0wtI50zm02pbvwfWEMWBQ1zKGlLIhskiEPm9R6vRXxV4ZzWT2yHOGpWMyorblKlNp8HmHEb/lCXjcW7bmtXP8Xt229OVWR1fod2eWqNfHuMjXCPkIGNileOiImVmCOEmoSfn3yXlJWmoHGhqp6ilYuWYpmTqKUgAAIfkECQEAAQAsAAAAACgAKAAAApiEH6kb58biQ3FNWtMFWW3eNVcojuFGfqnZqSebuS06w5V80/X02pKe8zFwP6EFWOT1lDFk8rGERh1TTNOocQ61Hm4Xm2VexUHpzjymViHrFbiELsefVrn6XKfnt2Q9G/+Xdie499XHd2g4h7ioOGhXGJboGAnXSBnoBwKYyfioubZJ2Hn0RuRZaflZOil56Zp6iioKSXpUAAAh+QQJAQABACwAAAAAKAAoAAACkoQRqRvnxuI7kU1a1UU5bd5tnSeOZXhmn5lWK3qNTWvRdQxP8qvaC+/yaYQzXO7BMvaUEmJRd3TsiMAgswmNYrSgZdYrTX6tSHGZO73ezuAw2uxuQ+BbeZfMxsexY35+/Qe4J1inV0g4x3WHuMhIl2jXOKT2Q+VU5fgoSUI52VfZyfkJGkha6jmY+aaYdirq+lQAACH5BAkBAAEALAAAAAAoACgAAAKWBIKpYe0L3YNKToqswUlvznigd4wiR4KhZrKt9Upqip61i9E3vMvxRdHlbEFiEXfk9YARYxOZZD6VQ2pUunBmtRXo1Lf8hMVVcNl8JafV38aM2/Fu5V16Bn63r6xt97j09+MXSFi4BniGFae3hzbH9+hYBzkpuUh5aZmHuanZOZgIuvbGiNeomCnaxxap2upaCZsq+1kAACH5BAkBAAEALAAAAAAoACgAAAKXjI8By5zf4kOxTVrXNVlv1X0d8IGZGKLnNpYtm8Lr9cqVeuOSvfOW79D9aDHizNhDJidFZhNydEahOaDH6nomtJjp1tutKoNWkvA6JqfRVLHU/QUfau9l2x7G54d1fl995xcIGAdXqMfBNadoYrhH+Mg2KBlpVpbluCiXmMnZ2Sh4GBqJ+ckIOqqJ6LmKSllZmsoq6wpQAAAh+QQJAQABACwAAAAAKAAoAAAClYx/oLvoxuJDkU1a1YUZbJ59nSd2ZXhWqbRa2/gF8Gu2DY3iqs7yrq+xBYEkYvFSM8aSSObE+ZgRl1BHFZNr7pRCavZ5BW2142hY3AN/zWtsmf12p9XxxFl2lpLn1rseztfXZjdIWIf2s5dItwjYKBgo9yg5pHgzJXTEeGlZuenpyPmpGQoKOWkYmSpaSnqKileI2FAAACH5BAkBAAEALAAAAAAoACgAAAKVjB+gu+jG4kORTVrVhRlsnn2dJ3ZleFaptFrb+CXmO9OozeL5VfP99HvAWhpiUdcwkpBH3825AwYdU8xTqlLGhtCosArKMpvfa1mMRae9VvWZfeB2XfPkeLmm18lUcBj+p5dnN8jXZ3YIGEhYuOUn45aoCDkp16hl5IjYJvjWKcnoGQpqyPlpOhr3aElaqrq56Bq7VAAAOw==");
462
	height: 100%;
463
	filter: alpha(opacity=25); /* support: IE8 */
464
	opacity: 0.25;
465
}
466
.ui-progressbar-indeterminate .ui-progressbar-value {
467
	background-image: none;
468
}
469
.ui-slider {
470
	position: relative;
471
	text-align: left;
472
}
473
.ui-slider .ui-slider-handle {
474
	position: absolute;
475
	z-index: 2;
476
	width: 1.2em;
477
	height: 1.2em;
478
	cursor: default;
479
	-ms-touch-action: none;
480
	touch-action: none;
481
}
482
.ui-slider .ui-slider-range {
483
	position: absolute;
484
	z-index: 1;
485
	font-size: .7em;
486
	display: block;
487
	border: 0;
488
	background-position: 0 0;
489
}
490
491
/* support: IE8 - See #6727 */
492
.ui-slider.ui-state-disabled .ui-slider-handle,
493
.ui-slider.ui-state-disabled .ui-slider-range {
494
	filter: inherit;
495
}
496
497
.ui-slider-horizontal {
498
	height: .8em;
499
}
500
.ui-slider-horizontal .ui-slider-handle {
501
	top: -.3em;
502
	margin-left: -.6em;
503
}
504
.ui-slider-horizontal .ui-slider-range {
505
	top: 0;
506
	height: 100%;
507
}
508
.ui-slider-horizontal .ui-slider-range-min {
509
	left: 0;
510
}
511
.ui-slider-horizontal .ui-slider-range-max {
512
	right: 0;
513
}
514
515
.ui-slider-vertical {
516
	width: .8em;
517
	height: 100px;
518
}
519
.ui-slider-vertical .ui-slider-handle {
520
	left: -.3em;
521
	margin-left: 0;
522
	margin-bottom: -.6em;
523
}
524
.ui-slider-vertical .ui-slider-range {
525
	left: 0;
526
	width: 100%;
527
}
528
.ui-slider-vertical .ui-slider-range-min {
529
	bottom: 0;
530
}
531
.ui-slider-vertical .ui-slider-range-max {
532
	top: 0;
533
}
534
.ui-tabs {
535
	position: relative;/* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
536
	padding: .2em;
537
}
538
.ui-tabs .ui-tabs-nav {
539
	margin: 0;
540
	padding: .2em .2em 0;
541
}
542
.ui-tabs .ui-tabs-nav li {
543
	list-style: none;
544
	float: left;
545
	position: relative;
546
	top: 0;
547
	margin: 1px .2em 0 0;
548
	border-bottom-width: 0;
549
	padding: 0;
550
	white-space: nowrap;
551
}
552
.ui-tabs .ui-tabs-nav .ui-tabs-anchor {
553
	float: left;
554
	padding: .5em 1em;
555
	text-decoration: none;
556
}
557
.ui-tabs .ui-tabs-nav li.ui-tabs-active {
558
	margin-bottom: -1px;
559
	padding-bottom: 1px;
560
}
561
.ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor,
562
.ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor,
563
.ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor {
564
	cursor: text;
565
}
566
.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor {
567
	cursor: pointer;
568
}
569
.ui-tabs .ui-tabs-panel {
570
	display: block;
571
	border-width: 0;
572
	padding: 1em 1.4em;
573
	background: none;
574
}
575
576
/* Component containers
577
----------------------------------*/
578
.ui-widget {
579
	font-family: Verdana,Arial,sans-serif;
580
	font-size: 1.1em;
581
}
582
.ui-widget .ui-widget {
583
	font-size: 1em;
584
}
585
.ui-widget input,
586
.ui-widget select,
587
.ui-widget textarea,
588
.ui-widget button {
589
	font-family: Verdana,Arial,sans-serif;
590
	font-size: 1em;
591
}
592
.ui-widget-content {
593
	border: 1px solid #aaaaaa;
594
	background: #ffffff;
595
	color: #222222;
596
}
597
.ui-widget-content a {
598
	color: #222222;
599
}
600
.ui-widget-header {
601
	border: 1px solid #aaaaaa;
602
	background: #cccccc url("images/ui-bg_highlight-soft_75_cccccc_1x100.png") 50% 50% repeat-x;
603
	color: #222222;
604
	font-weight: bold;
605
}
606
.ui-widget-header a {
607
	color: #222222;
608
}
609
610
/* Interaction states
611
----------------------------------*/
612
.ui-state-default,
613
.ui-widget-content .ui-state-default,
614
.ui-widget-header .ui-state-default {
615
	border: 1px solid #d3d3d3;
616
	background: #e6e6e6 url("images/ui-bg_glass_75_e6e6e6_1x400.png") 50% 50% repeat-x;
617
	font-weight: normal;
618
	color: #555555;
619
}
620
.ui-state-default a,
621
.ui-state-default a:link,
622
.ui-state-default a:visited {
623
	color: #555555;
624
	text-decoration: none;
625
}
626
.ui-state-hover,
627
.ui-widget-content .ui-state-hover,
628
.ui-widget-header .ui-state-hover,
629
.ui-state-focus,
630
.ui-widget-content .ui-state-focus,
631
.ui-widget-header .ui-state-focus {
632
	border: 1px solid #999999;
633
	background: #dadada url("images/ui-bg_glass_75_dadada_1x400.png") 50% 50% repeat-x;
634
	font-weight: normal;
635
	color: #212121;
636
}
637
.ui-state-hover a,
638
.ui-state-hover a:hover,
639
.ui-state-hover a:link,
640
.ui-state-hover a:visited,
641
.ui-state-focus a,
642
.ui-state-focus a:hover,
643
.ui-state-focus a:link,
644
.ui-state-focus a:visited {
645
	color: #212121;
646
	text-decoration: none;
647
}
648
.ui-state-active,
649
.ui-widget-content .ui-state-active,
650
.ui-widget-header .ui-state-active {
651
	border: 1px solid #aaaaaa;
652
	background: #ffffff url("images/ui-bg_glass_65_ffffff_1x400.png") 50% 50% repeat-x;
653
	font-weight: normal;
654
	color: #212121;
655
}
656
.ui-state-active a,
657
.ui-state-active a:link,
658
.ui-state-active a:visited {
659
	color: #212121;
660
	text-decoration: none;
661
}
662
663
/* Interaction Cues
664
----------------------------------*/
665
.ui-state-highlight,
666
.ui-widget-content .ui-state-highlight,
667
.ui-widget-header .ui-state-highlight {
668
	border: 1px solid #fcefa1;
669
	background: #fbf9ee url("images/ui-bg_glass_55_fbf9ee_1x400.png") 50% 50% repeat-x;
670
	color: #363636;
671
}
672
.ui-state-highlight a,
673
.ui-widget-content .ui-state-highlight a,
674
.ui-widget-header .ui-state-highlight a {
675
	color: #363636;
676
}
677
.ui-state-error,
678
.ui-widget-content .ui-state-error,
679
.ui-widget-header .ui-state-error {
680
	border: 1px solid #cd0a0a;
681
	background: #fef1ec url("images/ui-bg_glass_95_fef1ec_1x400.png") 50% 50% repeat-x;
682
	color: #cd0a0a;
683
}
684
.ui-state-error a,
685
.ui-widget-content .ui-state-error a,
686
.ui-widget-header .ui-state-error a {
687
	color: #cd0a0a;
688
}
689
.ui-state-error-text,
690
.ui-widget-content .ui-state-error-text,
691
.ui-widget-header .ui-state-error-text {
692
	color: #cd0a0a;
693
}
694
.ui-priority-primary,
695
.ui-widget-content .ui-priority-primary,
696
.ui-widget-header .ui-priority-primary {
697
	font-weight: bold;
698
}
699
.ui-priority-secondary,
700
.ui-widget-content .ui-priority-secondary,
701
.ui-widget-header .ui-priority-secondary {
702
	opacity: .7;
703
	filter:Alpha(Opacity=70); /* support: IE8 */
704
	font-weight: normal;
705
}
706
.ui-state-disabled,
707
.ui-widget-content .ui-state-disabled,
708
.ui-widget-header .ui-state-disabled {
709
	opacity: .35;
710
	filter:Alpha(Opacity=35); /* support: IE8 */
711
	background-image: none;
712
}
713
.ui-state-disabled .ui-icon {
714
	filter:Alpha(Opacity=35); /* support: IE8 - See #6059 */
715
}
716
717
/* Icons
718
----------------------------------*/
719
720
/* states and images */
721
.ui-icon {
722
	width: 16px;
723
	height: 16px;
724
}
725
.ui-icon,
726
.ui-widget-content .ui-icon {
727
	background-image: url("images/ui-icons_222222_256x240.png");
728
}
729
.ui-widget-header .ui-icon {
730
	background-image: url("images/ui-icons_222222_256x240.png");
731
}
732
.ui-state-default .ui-icon {
733
	background-image: url("images/ui-icons_888888_256x240.png");
734
}
735
.ui-state-hover .ui-icon,
736
.ui-state-focus .ui-icon {
737
	background-image: url("images/ui-icons_454545_256x240.png");
738
}
739
.ui-state-active .ui-icon {
740
	background-image: url("images/ui-icons_454545_256x240.png");
741
}
742
.ui-state-highlight .ui-icon {
743
	background-image: url("images/ui-icons_2e83ff_256x240.png");
744
}
745
.ui-state-error .ui-icon,
746
.ui-state-error-text .ui-icon {
747
	background-image: url("images/ui-icons_cd0a0a_256x240.png");
748
}
749
750
/* positioning */
751
.ui-icon-blank { background-position: 16px 16px; }
752
.ui-icon-carat-1-n { background-position: 0 0; }
753
.ui-icon-carat-1-ne { background-position: -16px 0; }
754
.ui-icon-carat-1-e { background-position: -32px 0; }
755
.ui-icon-carat-1-se { background-position: -48px 0; }
756
.ui-icon-carat-1-s { background-position: -64px 0; }
757
.ui-icon-carat-1-sw { background-position: -80px 0; }
758
.ui-icon-carat-1-w { background-position: -96px 0; }
759
.ui-icon-carat-1-nw { background-position: -112px 0; }
760
.ui-icon-carat-2-n-s { background-position: -128px 0; }
761
.ui-icon-carat-2-e-w { background-position: -144px 0; }
762
.ui-icon-triangle-1-n { background-position: 0 -16px; }
763
.ui-icon-triangle-1-ne { background-position: -16px -16px; }
764
.ui-icon-triangle-1-e { background-position: -32px -16px; }
765
.ui-icon-triangle-1-se { background-position: -48px -16px; }
766
.ui-icon-triangle-1-s { background-position: -64px -16px; }
767
.ui-icon-triangle-1-sw { background-position: -80px -16px; }
768
.ui-icon-triangle-1-w { background-position: -96px -16px; }
769
.ui-icon-triangle-1-nw { background-position: -112px -16px; }
770
.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
771
.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
772
.ui-icon-arrow-1-n { background-position: 0 -32px; }
773
.ui-icon-arrow-1-ne { background-position: -16px -32px; }
774
.ui-icon-arrow-1-e { background-position: -32px -32px; }
775
.ui-icon-arrow-1-se { background-position: -48px -32px; }
776
.ui-icon-arrow-1-s { background-position: -64px -32px; }
777
.ui-icon-arrow-1-sw { background-position: -80px -32px; }
778
.ui-icon-arrow-1-w { background-position: -96px -32px; }
779
.ui-icon-arrow-1-nw { background-position: -112px -32px; }
780
.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
781
.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
782
.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
783
.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
784
.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
785
.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
786
.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
787
.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
788
.ui-icon-arrowthick-1-n { background-position: 0 -48px; }
789
.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
790
.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
791
.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
792
.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
793
.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
794
.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
795
.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
796
.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
797
.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
798
.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
799
.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
800
.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
801
.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
802
.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
803
.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
804
.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
805
.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
806
.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
807
.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
808
.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
809
.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
810
.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
811
.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
812
.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
813
.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
814
.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
815
.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
816
.ui-icon-arrow-4 { background-position: 0 -80px; }
817
.ui-icon-arrow-4-diag { background-position: -16px -80px; }
818
.ui-icon-extlink { background-position: -32px -80px; }
819
.ui-icon-newwin { background-position: -48px -80px; }
820
.ui-icon-refresh { background-position: -64px -80px; }
821
.ui-icon-shuffle { background-position: -80px -80px; }
822
.ui-icon-transfer-e-w { background-position: -96px -80px; }
823
.ui-icon-transferthick-e-w { background-position: -112px -80px; }
824
.ui-icon-folder-collapsed { background-position: 0 -96px; }
825
.ui-icon-folder-open { background-position: -16px -96px; }
826
.ui-icon-document { background-position: -32px -96px; }
827
.ui-icon-document-b { background-position: -48px -96px; }
828
.ui-icon-note { background-position: -64px -96px; }
829
.ui-icon-mail-closed { background-position: -80px -96px; }
830
.ui-icon-mail-open { background-position: -96px -96px; }
831
.ui-icon-suitcase { background-position: -112px -96px; }
832
.ui-icon-comment { background-position: -128px -96px; }
833
.ui-icon-person { background-position: -144px -96px; }
834
.ui-icon-print { background-position: -160px -96px; }
835
.ui-icon-trash { background-position: -176px -96px; }
836
.ui-icon-locked { background-position: -192px -96px; }
837
.ui-icon-unlocked { background-position: -208px -96px; }
838
.ui-icon-bookmark { background-position: -224px -96px; }
839
.ui-icon-tag { background-position: -240px -96px; }
840
.ui-icon-home { background-position: 0 -112px; }
841
.ui-icon-flag { background-position: -16px -112px; }
842
.ui-icon-calendar { background-position: -32px -112px; }
843
.ui-icon-cart { background-position: -48px -112px; }
844
.ui-icon-pencil { background-position: -64px -112px; }
845
.ui-icon-clock { background-position: -80px -112px; }
846
.ui-icon-disk { background-position: -96px -112px; }
847
.ui-icon-calculator { background-position: -112px -112px; }
848
.ui-icon-zoomin { background-position: -128px -112px; }
849
.ui-icon-zoomout { background-position: -144px -112px; }
850
.ui-icon-search { background-position: -160px -112px; }
851
.ui-icon-wrench { background-position: -176px -112px; }
852
.ui-icon-gear { background-position: -192px -112px; }
853
.ui-icon-heart { background-position: -208px -112px; }
854
.ui-icon-star { background-position: -224px -112px; }
855
.ui-icon-link { background-position: -240px -112px; }
856
.ui-icon-cancel { background-position: 0 -128px; }
857
.ui-icon-plus { background-position: -16px -128px; }
858
.ui-icon-plusthick { background-position: -32px -128px; }
859
.ui-icon-minus { background-position: -48px -128px; }
860
.ui-icon-minusthick { background-position: -64px -128px; }
861
.ui-icon-close { background-position: -80px -128px; }
862
.ui-icon-closethick { background-position: -96px -128px; }
863
.ui-icon-key { background-position: -112px -128px; }
864
.ui-icon-lightbulb { background-position: -128px -128px; }
865
.ui-icon-scissors { background-position: -144px -128px; }
866
.ui-icon-clipboard { background-position: -160px -128px; }
867
.ui-icon-copy { background-position: -176px -128px; }
868
.ui-icon-contact { background-position: -192px -128px; }
869
.ui-icon-image { background-position: -208px -128px; }
870
.ui-icon-video { background-position: -224px -128px; }
871
.ui-icon-script { background-position: -240px -128px; }
872
.ui-icon-alert { background-position: 0 -144px; }
873
.ui-icon-info { background-position: -16px -144px; }
874
.ui-icon-notice { background-position: -32px -144px; }
875
.ui-icon-help { background-position: -48px -144px; }
876
.ui-icon-check { background-position: -64px -144px; }
877
.ui-icon-bullet { background-position: -80px -144px; }
878
.ui-icon-radio-on { background-position: -96px -144px; }
879
.ui-icon-radio-off { background-position: -112px -144px; }
880
.ui-icon-pin-w { background-position: -128px -144px; }
881
.ui-icon-pin-s { background-position: -144px -144px; }
882
.ui-icon-play { background-position: 0 -160px; }
883
.ui-icon-pause { background-position: -16px -160px; }
884
.ui-icon-seek-next { background-position: -32px -160px; }
885
.ui-icon-seek-prev { background-position: -48px -160px; }
886
.ui-icon-seek-end { background-position: -64px -160px; }
887
.ui-icon-seek-start { background-position: -80px -160px; }
888
/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
889
.ui-icon-seek-first { background-position: -80px -160px; }
890
.ui-icon-stop { background-position: -96px -160px; }
891
.ui-icon-eject { background-position: -112px -160px; }
892
.ui-icon-volume-off { background-position: -128px -160px; }
893
.ui-icon-volume-on { background-position: -144px -160px; }
894
.ui-icon-power { background-position: 0 -176px; }
895
.ui-icon-signal-diag { background-position: -16px -176px; }
896
.ui-icon-signal { background-position: -32px -176px; }
897
.ui-icon-battery-0 { background-position: -48px -176px; }
898
.ui-icon-battery-1 { background-position: -64px -176px; }
899
.ui-icon-battery-2 { background-position: -80px -176px; }
900
.ui-icon-battery-3 { background-position: -96px -176px; }
901
.ui-icon-circle-plus { background-position: 0 -192px; }
902
.ui-icon-circle-minus { background-position: -16px -192px; }
903
.ui-icon-circle-close { background-position: -32px -192px; }
904
.ui-icon-circle-triangle-e { background-position: -48px -192px; }
905
.ui-icon-circle-triangle-s { background-position: -64px -192px; }
906
.ui-icon-circle-triangle-w { background-position: -80px -192px; }
907
.ui-icon-circle-triangle-n { background-position: -96px -192px; }
908
.ui-icon-circle-arrow-e { background-position: -112px -192px; }
909
.ui-icon-circle-arrow-s { background-position: -128px -192px; }
910
.ui-icon-circle-arrow-w { background-position: -144px -192px; }
911
.ui-icon-circle-arrow-n { background-position: -160px -192px; }
912
.ui-icon-circle-zoomin { background-position: -176px -192px; }
913
.ui-icon-circle-zoomout { background-position: -192px -192px; }
914
.ui-icon-circle-check { background-position: -208px -192px; }
915
.ui-icon-circlesmall-plus { background-position: 0 -208px; }
916
.ui-icon-circlesmall-minus { background-position: -16px -208px; }
917
.ui-icon-circlesmall-close { background-position: -32px -208px; }
918
.ui-icon-squaresmall-plus { background-position: -48px -208px; }
919
.ui-icon-squaresmall-minus { background-position: -64px -208px; }
920
.ui-icon-squaresmall-close { background-position: -80px -208px; }
921
.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
922
.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
923
.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
924
.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
925
.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
926
.ui-icon-grip-diagonal-se { background-position: -80px -224px; }
927
928
929
/* Misc visuals
930
----------------------------------*/
931
932
/* Corner radius */
933
.ui-corner-all,
934
.ui-corner-top,
935
.ui-corner-left,
936
.ui-corner-tl {
937
	border-top-left-radius: 4px;
938
}
939
.ui-corner-all,
940
.ui-corner-top,
941
.ui-corner-right,
942
.ui-corner-tr {
943
	border-top-right-radius: 4px;
944
}
945
.ui-corner-all,
946
.ui-corner-bottom,
947
.ui-corner-left,
948
.ui-corner-bl {
949
	border-bottom-left-radius: 4px;
950
}
951
.ui-corner-all,
952
.ui-corner-bottom,
953
.ui-corner-right,
954
.ui-corner-br {
955
	border-bottom-right-radius: 4px;
956
}
957
958
/* Overlays */
959
.ui-widget-overlay {
960
	background: #aaaaaa;
961
	opacity: .3;
962
	filter: Alpha(Opacity=30); /* support: IE8 */
963
}
964
.ui-widget-shadow {
965
	margin: -8px 0 0 -8px;
966
	padding: 8px;
967
	background: #aaaaaa;
968
	opacity: .3;
969
	filter: Alpha(Opacity=30); /* support: IE8 */
970
	border-radius: 8px;
971
}
(-)a/koha-tmpl/intranet-tmpl/lib/jquery/jquery-ui-1.11.4.js (-11711 lines)
Lines 1-11711 Link Here
1
/*! jQuery UI - v1.11.4 - 2016-02-22
2
* http://jqueryui.com
3
* Includes: core.js, widget.js, mouse.js, position.js, draggable.js, droppable.js, sortable.js, accordion.js, autocomplete.js, button.js, datepicker.js, menu.js, progressbar.js, slider.js, tabs.js, effect.js, effect-highlight.js
4
* Copyright jQuery Foundation and other contributors; Licensed MIT */
5
6
(function( factory ) {
7
	if ( typeof define === "function" && define.amd ) {
8
9
		// AMD. Register as an anonymous module.
10
		define([ "jquery" ], factory );
11
	} else {
12
13
		// Browser globals
14
		factory( jQuery );
15
	}
16
}(function( $ ) {
17
/*!
18
 * jQuery UI Core 1.11.4
19
 * http://jqueryui.com
20
 *
21
 * Copyright jQuery Foundation and other contributors
22
 * Released under the MIT license.
23
 * http://jquery.org/license
24
 *
25
 * http://api.jqueryui.com/category/ui-core/
26
 */
27
28
29
// $.ui might exist from components with no dependencies, e.g., $.ui.position
30
$.ui = $.ui || {};
31
32
$.extend( $.ui, {
33
	version: "1.11.4",
34
35
	keyCode: {
36
		BACKSPACE: 8,
37
		COMMA: 188,
38
		DELETE: 46,
39
		DOWN: 40,
40
		END: 35,
41
		ENTER: 13,
42
		ESCAPE: 27,
43
		HOME: 36,
44
		LEFT: 37,
45
		PAGE_DOWN: 34,
46
		PAGE_UP: 33,
47
		PERIOD: 190,
48
		RIGHT: 39,
49
		SPACE: 32,
50
		TAB: 9,
51
		UP: 38
52
	}
53
});
54
55
// plugins
56
$.fn.extend({
57
	scrollParent: function( includeHidden ) {
58
		var position = this.css( "position" ),
59
			excludeStaticParent = position === "absolute",
60
			overflowRegex = includeHidden ? /(auto|scroll|hidden)/ : /(auto|scroll)/,
61
			scrollParent = this.parents().filter( function() {
62
				var parent = $( this );
63
				if ( excludeStaticParent && parent.css( "position" ) === "static" ) {
64
					return false;
65
				}
66
				return overflowRegex.test( parent.css( "overflow" ) + parent.css( "overflow-y" ) + parent.css( "overflow-x" ) );
67
			}).eq( 0 );
68
69
		return position === "fixed" || !scrollParent.length ? $( this[ 0 ].ownerDocument || document ) : scrollParent;
70
	},
71
72
	uniqueId: (function() {
73
		var uuid = 0;
74
75
		return function() {
76
			return this.each(function() {
77
				if ( !this.id ) {
78
					this.id = "ui-id-" + ( ++uuid );
79
				}
80
			});
81
		};
82
	})(),
83
84
	removeUniqueId: function() {
85
		return this.each(function() {
86
			if ( /^ui-id-\d+$/.test( this.id ) ) {
87
				$( this ).removeAttr( "id" );
88
			}
89
		});
90
	}
91
});
92
93
// selectors
94
function focusable( element, isTabIndexNotNaN ) {
95
	var map, mapName, img,
96
		nodeName = element.nodeName.toLowerCase();
97
	if ( "area" === nodeName ) {
98
		map = element.parentNode;
99
		mapName = map.name;
100
		if ( !element.href || !mapName || map.nodeName.toLowerCase() !== "map" ) {
101
			return false;
102
		}
103
		img = $( "img[usemap='#" + mapName + "']" )[ 0 ];
104
		return !!img && visible( img );
105
	}
106
	return ( /^(input|select|textarea|button|object)$/.test( nodeName ) ?
107
		!element.disabled :
108
		"a" === nodeName ?
109
			element.href || isTabIndexNotNaN :
110
			isTabIndexNotNaN) &&
111
		// the element and all of its ancestors must be visible
112
		visible( element );
113
}
114
115
function visible( element ) {
116
	return $.expr.filters.visible( element ) &&
117
		!$( element ).parents().addBack().filter(function() {
118
			return $.css( this, "visibility" ) === "hidden";
119
		}).length;
120
}
121
122
$.extend( $.expr[ ":" ], {
123
	data: $.expr.createPseudo ?
124
		$.expr.createPseudo(function( dataName ) {
125
			return function( elem ) {
126
				return !!$.data( elem, dataName );
127
			};
128
		}) :
129
		// support: jQuery <1.8
130
		function( elem, i, match ) {
131
			return !!$.data( elem, match[ 3 ] );
132
		},
133
134
	focusable: function( element ) {
135
		return focusable( element, !isNaN( $.attr( element, "tabindex" ) ) );
136
	},
137
138
	tabbable: function( element ) {
139
		var tabIndex = $.attr( element, "tabindex" ),
140
			isTabIndexNaN = isNaN( tabIndex );
141
		return ( isTabIndexNaN || tabIndex >= 0 ) && focusable( element, !isTabIndexNaN );
142
	}
143
});
144
145
// support: jQuery <1.8
146
if ( !$( "<a>" ).outerWidth( 1 ).jquery ) {
147
	$.each( [ "Width", "Height" ], function( i, name ) {
148
		var side = name === "Width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ],
149
			type = name.toLowerCase(),
150
			orig = {
151
				innerWidth: $.fn.innerWidth,
152
				innerHeight: $.fn.innerHeight,
153
				outerWidth: $.fn.outerWidth,
154
				outerHeight: $.fn.outerHeight
155
			};
156
157
		function reduce( elem, size, border, margin ) {
158
			$.each( side, function() {
159
				size -= parseFloat( $.css( elem, "padding" + this ) ) || 0;
160
				if ( border ) {
161
					size -= parseFloat( $.css( elem, "border" + this + "Width" ) ) || 0;
162
				}
163
				if ( margin ) {
164
					size -= parseFloat( $.css( elem, "margin" + this ) ) || 0;
165
				}
166
			});
167
			return size;
168
		}
169
170
		$.fn[ "inner" + name ] = function( size ) {
171
			if ( size === undefined ) {
172
				return orig[ "inner" + name ].call( this );
173
			}
174
175
			return this.each(function() {
176
				$( this ).css( type, reduce( this, size ) + "px" );
177
			});
178
		};
179
180
		$.fn[ "outer" + name] = function( size, margin ) {
181
			if ( typeof size !== "number" ) {
182
				return orig[ "outer" + name ].call( this, size );
183
			}
184
185
			return this.each(function() {
186
				$( this).css( type, reduce( this, size, true, margin ) + "px" );
187
			});
188
		};
189
	});
190
}
191
192
// support: jQuery <1.8
193
if ( !$.fn.addBack ) {
194
	$.fn.addBack = function( selector ) {
195
		return this.add( selector == null ?
196
			this.prevObject : this.prevObject.filter( selector )
197
		);
198
	};
199
}
200
201
// support: jQuery 1.6.1, 1.6.2 (http://bugs.jquery.com/ticket/9413)
202
if ( $( "<a>" ).data( "a-b", "a" ).removeData( "a-b" ).data( "a-b" ) ) {
203
	$.fn.removeData = (function( removeData ) {
204
		return function( key ) {
205
			if ( arguments.length ) {
206
				return removeData.call( this, $.camelCase( key ) );
207
			} else {
208
				return removeData.call( this );
209
			}
210
		};
211
	})( $.fn.removeData );
212
}
213
214
// deprecated
215
$.ui.ie = !!/msie [\w.]+/.exec( navigator.userAgent.toLowerCase() );
216
217
$.fn.extend({
218
	focus: (function( orig ) {
219
		return function( delay, fn ) {
220
			return typeof delay === "number" ?
221
				this.each(function() {
222
					var elem = this;
223
					setTimeout(function() {
224
						$( elem ).focus();
225
						if ( fn ) {
226
							fn.call( elem );
227
						}
228
					}, delay );
229
				}) :
230
				orig.apply( this, arguments );
231
		};
232
	})( $.fn.focus ),
233
234
	disableSelection: (function() {
235
		var eventType = "onselectstart" in document.createElement( "div" ) ?
236
			"selectstart" :
237
			"mousedown";
238
239
		return function() {
240
			return this.bind( eventType + ".ui-disableSelection", function( event ) {
241
				event.preventDefault();
242
			});
243
		};
244
	})(),
245
246
	enableSelection: function() {
247
		return this.unbind( ".ui-disableSelection" );
248
	},
249
250
	zIndex: function( zIndex ) {
251
		if ( zIndex !== undefined ) {
252
			return this.css( "zIndex", zIndex );
253
		}
254
255
		if ( this.length ) {
256
			var elem = $( this[ 0 ] ), position, value;
257
			while ( elem.length && elem[ 0 ] !== document ) {
258
				// Ignore z-index if position is set to a value where z-index is ignored by the browser
259
				// This makes behavior of this function consistent across browsers
260
				// WebKit always returns auto if the element is positioned
261
				position = elem.css( "position" );
262
				if ( position === "absolute" || position === "relative" || position === "fixed" ) {
263
					// IE returns 0 when zIndex is not specified
264
					// other browsers return a string
265
					// we ignore the case of nested elements with an explicit value of 0
266
					// <div style="z-index: -10;"><div style="z-index: 0;"></div></div>
267
					value = parseInt( elem.css( "zIndex" ), 10 );
268
					if ( !isNaN( value ) && value !== 0 ) {
269
						return value;
270
					}
271
				}
272
				elem = elem.parent();
273
			}
274
		}
275
276
		return 0;
277
	}
278
});
279
280
// $.ui.plugin is deprecated. Use $.widget() extensions instead.
281
$.ui.plugin = {
282
	add: function( module, option, set ) {
283
		var i,
284
			proto = $.ui[ module ].prototype;
285
		for ( i in set ) {
286
			proto.plugins[ i ] = proto.plugins[ i ] || [];
287
			proto.plugins[ i ].push( [ option, set[ i ] ] );
288
		}
289
	},
290
	call: function( instance, name, args, allowDisconnected ) {
291
		var i,
292
			set = instance.plugins[ name ];
293
294
		if ( !set ) {
295
			return;
296
		}
297
298
		if ( !allowDisconnected && ( !instance.element[ 0 ].parentNode || instance.element[ 0 ].parentNode.nodeType === 11 ) ) {
299
			return;
300
		}
301
302
		for ( i = 0; i < set.length; i++ ) {
303
			if ( instance.options[ set[ i ][ 0 ] ] ) {
304
				set[ i ][ 1 ].apply( instance.element, args );
305
			}
306
		}
307
	}
308
};
309
310
311
/*!
312
 * jQuery UI Widget 1.11.4
313
 * http://jqueryui.com
314
 *
315
 * Copyright jQuery Foundation and other contributors
316
 * Released under the MIT license.
317
 * http://jquery.org/license
318
 *
319
 * http://api.jqueryui.com/jQuery.widget/
320
 */
321
322
323
var widget_uuid = 0,
324
	widget_slice = Array.prototype.slice;
325
326
$.cleanData = (function( orig ) {
327
	return function( elems ) {
328
		var events, elem, i;
329
		for ( i = 0; (elem = elems[i]) != null; i++ ) {
330
			try {
331
332
				// Only trigger remove when necessary to save time
333
				events = $._data( elem, "events" );
334
				if ( events && events.remove ) {
335
					$( elem ).triggerHandler( "remove" );
336
				}
337
338
			// http://bugs.jquery.com/ticket/8235
339
			} catch ( e ) {}
340
		}
341
		orig( elems );
342
	};
343
})( $.cleanData );
344
345
$.widget = function( name, base, prototype ) {
346
	var fullName, existingConstructor, constructor, basePrototype,
347
		// proxiedPrototype allows the provided prototype to remain unmodified
348
		// so that it can be used as a mixin for multiple widgets (#8876)
349
		proxiedPrototype = {},
350
		namespace = name.split( "." )[ 0 ];
351
352
	name = name.split( "." )[ 1 ];
353
	fullName = namespace + "-" + name;
354
355
	if ( !prototype ) {
356
		prototype = base;
357
		base = $.Widget;
358
	}
359
360
	// create selector for plugin
361
	$.expr[ ":" ][ fullName.toLowerCase() ] = function( elem ) {
362
		return !!$.data( elem, fullName );
363
	};
364
365
	$[ namespace ] = $[ namespace ] || {};
366
	existingConstructor = $[ namespace ][ name ];
367
	constructor = $[ namespace ][ name ] = function( options, element ) {
368
		// allow instantiation without "new" keyword
369
		if ( !this._createWidget ) {
370
			return new constructor( options, element );
371
		}
372
373
		// allow instantiation without initializing for simple inheritance
374
		// must use "new" keyword (the code above always passes args)
375
		if ( arguments.length ) {
376
			this._createWidget( options, element );
377
		}
378
	};
379
	// extend with the existing constructor to carry over any static properties
380
	$.extend( constructor, existingConstructor, {
381
		version: prototype.version,
382
		// copy the object used to create the prototype in case we need to
383
		// redefine the widget later
384
		_proto: $.extend( {}, prototype ),
385
		// track widgets that inherit from this widget in case this widget is
386
		// redefined after a widget inherits from it
387
		_childConstructors: []
388
	});
389
390
	basePrototype = new base();
391
	// we need to make the options hash a property directly on the new instance
392
	// otherwise we'll modify the options hash on the prototype that we're
393
	// inheriting from
394
	basePrototype.options = $.widget.extend( {}, basePrototype.options );
395
	$.each( prototype, function( prop, value ) {
396
		if ( !$.isFunction( value ) ) {
397
			proxiedPrototype[ prop ] = value;
398
			return;
399
		}
400
		proxiedPrototype[ prop ] = (function() {
401
			var _super = function() {
402
					return base.prototype[ prop ].apply( this, arguments );
403
				},
404
				_superApply = function( args ) {
405
					return base.prototype[ prop ].apply( this, args );
406
				};
407
			return function() {
408
				var __super = this._super,
409
					__superApply = this._superApply,
410
					returnValue;
411
412
				this._super = _super;
413
				this._superApply = _superApply;
414
415
				returnValue = value.apply( this, arguments );
416
417
				this._super = __super;
418
				this._superApply = __superApply;
419
420
				return returnValue;
421
			};
422
		})();
423
	});
424
	constructor.prototype = $.widget.extend( basePrototype, {
425
		// TODO: remove support for widgetEventPrefix
426
		// always use the name + a colon as the prefix, e.g., draggable:start
427
		// don't prefix for widgets that aren't DOM-based
428
		widgetEventPrefix: existingConstructor ? (basePrototype.widgetEventPrefix || name) : name
429
	}, proxiedPrototype, {
430
		constructor: constructor,
431
		namespace: namespace,
432
		widgetName: name,
433
		widgetFullName: fullName
434
	});
435
436
	// If this widget is being redefined then we need to find all widgets that
437
	// are inheriting from it and redefine all of them so that they inherit from
438
	// the new version of this widget. We're essentially trying to replace one
439
	// level in the prototype chain.
440
	if ( existingConstructor ) {
441
		$.each( existingConstructor._childConstructors, function( i, child ) {
442
			var childPrototype = child.prototype;
443
444
			// redefine the child widget using the same prototype that was
445
			// originally used, but inherit from the new version of the base
446
			$.widget( childPrototype.namespace + "." + childPrototype.widgetName, constructor, child._proto );
447
		});
448
		// remove the list of existing child constructors from the old constructor
449
		// so the old child constructors can be garbage collected
450
		delete existingConstructor._childConstructors;
451
	} else {
452
		base._childConstructors.push( constructor );
453
	}
454
455
	$.widget.bridge( name, constructor );
456
457
	return constructor;
458
};
459
460
$.widget.extend = function( target ) {
461
	var input = widget_slice.call( arguments, 1 ),
462
		inputIndex = 0,
463
		inputLength = input.length,
464
		key,
465
		value;
466
	for ( ; inputIndex < inputLength; inputIndex++ ) {
467
		for ( key in input[ inputIndex ] ) {
468
			value = input[ inputIndex ][ key ];
469
			if ( input[ inputIndex ].hasOwnProperty( key ) && value !== undefined ) {
470
				// Clone objects
471
				if ( $.isPlainObject( value ) ) {
472
					target[ key ] = $.isPlainObject( target[ key ] ) ?
473
						$.widget.extend( {}, target[ key ], value ) :
474
						// Don't extend strings, arrays, etc. with objects
475
						$.widget.extend( {}, value );
476
				// Copy everything else by reference
477
				} else {
478
					target[ key ] = value;
479
				}
480
			}
481
		}
482
	}
483
	return target;
484
};
485
486
$.widget.bridge = function( name, object ) {
487
	var fullName = object.prototype.widgetFullName || name;
488
	$.fn[ name ] = function( options ) {
489
		var isMethodCall = typeof options === "string",
490
			args = widget_slice.call( arguments, 1 ),
491
			returnValue = this;
492
493
		if ( isMethodCall ) {
494
			this.each(function() {
495
				var methodValue,
496
					instance = $.data( this, fullName );
497
				if ( options === "instance" ) {
498
					returnValue = instance;
499
					return false;
500
				}
501
				if ( !instance ) {
502
					return $.error( "cannot call methods on " + name + " prior to initialization; " +
503
						"attempted to call method '" + options + "'" );
504
				}
505
				if ( !$.isFunction( instance[options] ) || options.charAt( 0 ) === "_" ) {
506
					return $.error( "no such method '" + options + "' for " + name + " widget instance" );
507
				}
508
				methodValue = instance[ options ].apply( instance, args );
509
				if ( methodValue !== instance && methodValue !== undefined ) {
510
					returnValue = methodValue && methodValue.jquery ?
511
						returnValue.pushStack( methodValue.get() ) :
512
						methodValue;
513
					return false;
514
				}
515
			});
516
		} else {
517
518
			// Allow multiple hashes to be passed on init
519
			if ( args.length ) {
520
				options = $.widget.extend.apply( null, [ options ].concat(args) );
521
			}
522
523
			this.each(function() {
524
				var instance = $.data( this, fullName );
525
				if ( instance ) {
526
					instance.option( options || {} );
527
					if ( instance._init ) {
528
						instance._init();
529
					}
530
				} else {
531
					$.data( this, fullName, new object( options, this ) );
532
				}
533
			});
534
		}
535
536
		return returnValue;
537
	};
538
};
539
540
$.Widget = function( /* options, element */ ) {};
541
$.Widget._childConstructors = [];
542
543
$.Widget.prototype = {
544
	widgetName: "widget",
545
	widgetEventPrefix: "",
546
	defaultElement: "<div>",
547
	options: {
548
		disabled: false,
549
550
		// callbacks
551
		create: null
552
	},
553
	_createWidget: function( options, element ) {
554
		element = $( element || this.defaultElement || this )[ 0 ];
555
		this.element = $( element );
556
		this.uuid = widget_uuid++;
557
		this.eventNamespace = "." + this.widgetName + this.uuid;
558
559
		this.bindings = $();
560
		this.hoverable = $();
561
		this.focusable = $();
562
563
		if ( element !== this ) {
564
			$.data( element, this.widgetFullName, this );
565
			this._on( true, this.element, {
566
				remove: function( event ) {
567
					if ( event.target === element ) {
568
						this.destroy();
569
					}
570
				}
571
			});
572
			this.document = $( element.style ?
573
				// element within the document
574
				element.ownerDocument :
575
				// element is window or document
576
				element.document || element );
577
			this.window = $( this.document[0].defaultView || this.document[0].parentWindow );
578
		}
579
580
		this.options = $.widget.extend( {},
581
			this.options,
582
			this._getCreateOptions(),
583
			options );
584
585
		this._create();
586
		this._trigger( "create", null, this._getCreateEventData() );
587
		this._init();
588
	},
589
	_getCreateOptions: $.noop,
590
	_getCreateEventData: $.noop,
591
	_create: $.noop,
592
	_init: $.noop,
593
594
	destroy: function() {
595
		this._destroy();
596
		// we can probably remove the unbind calls in 2.0
597
		// all event bindings should go through this._on()
598
		this.element
599
			.unbind( this.eventNamespace )
600
			.removeData( this.widgetFullName )
601
			// support: jquery <1.6.3
602
			// http://bugs.jquery.com/ticket/9413
603
			.removeData( $.camelCase( this.widgetFullName ) );
604
		this.widget()
605
			.unbind( this.eventNamespace )
606
			.removeAttr( "aria-disabled" )
607
			.removeClass(
608
				this.widgetFullName + "-disabled " +
609
				"ui-state-disabled" );
610
611
		// clean up events and states
612
		this.bindings.unbind( this.eventNamespace );
613
		this.hoverable.removeClass( "ui-state-hover" );
614
		this.focusable.removeClass( "ui-state-focus" );
615
	},
616
	_destroy: $.noop,
617
618
	widget: function() {
619
		return this.element;
620
	},
621
622
	option: function( key, value ) {
623
		var options = key,
624
			parts,
625
			curOption,
626
			i;
627
628
		if ( arguments.length === 0 ) {
629
			// don't return a reference to the internal hash
630
			return $.widget.extend( {}, this.options );
631
		}
632
633
		if ( typeof key === "string" ) {
634
			// handle nested keys, e.g., "foo.bar" => { foo: { bar: ___ } }
635
			options = {};
636
			parts = key.split( "." );
637
			key = parts.shift();
638
			if ( parts.length ) {
639
				curOption = options[ key ] = $.widget.extend( {}, this.options[ key ] );
640
				for ( i = 0; i < parts.length - 1; i++ ) {
641
					curOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {};
642
					curOption = curOption[ parts[ i ] ];
643
				}
644
				key = parts.pop();
645
				if ( arguments.length === 1 ) {
646
					return curOption[ key ] === undefined ? null : curOption[ key ];
647
				}
648
				curOption[ key ] = value;
649
			} else {
650
				if ( arguments.length === 1 ) {
651
					return this.options[ key ] === undefined ? null : this.options[ key ];
652
				}
653
				options[ key ] = value;
654
			}
655
		}
656
657
		this._setOptions( options );
658
659
		return this;
660
	},
661
	_setOptions: function( options ) {
662
		var key;
663
664
		for ( key in options ) {
665
			this._setOption( key, options[ key ] );
666
		}
667
668
		return this;
669
	},
670
	_setOption: function( key, value ) {
671
		this.options[ key ] = value;
672
673
		if ( key === "disabled" ) {
674
			this.widget()
675
				.toggleClass( this.widgetFullName + "-disabled", !!value );
676
677
			// If the widget is becoming disabled, then nothing is interactive
678
			if ( value ) {
679
				this.hoverable.removeClass( "ui-state-hover" );
680
				this.focusable.removeClass( "ui-state-focus" );
681
			}
682
		}
683
684
		return this;
685
	},
686
687
	enable: function() {
688
		return this._setOptions({ disabled: false });
689
	},
690
	disable: function() {
691
		return this._setOptions({ disabled: true });
692
	},
693
694
	_on: function( suppressDisabledCheck, element, handlers ) {
695
		var delegateElement,
696
			instance = this;
697
698
		// no suppressDisabledCheck flag, shuffle arguments
699
		if ( typeof suppressDisabledCheck !== "boolean" ) {
700
			handlers = element;
701
			element = suppressDisabledCheck;
702
			suppressDisabledCheck = false;
703
		}
704
705
		// no element argument, shuffle and use this.element
706
		if ( !handlers ) {
707
			handlers = element;
708
			element = this.element;
709
			delegateElement = this.widget();
710
		} else {
711
			element = delegateElement = $( element );
712
			this.bindings = this.bindings.add( element );
713
		}
714
715
		$.each( handlers, function( event, handler ) {
716
			function handlerProxy() {
717
				// allow widgets to customize the disabled handling
718
				// - disabled as an array instead of boolean
719
				// - disabled class as method for disabling individual parts
720
				if ( !suppressDisabledCheck &&
721
						( instance.options.disabled === true ||
722
							$( this ).hasClass( "ui-state-disabled" ) ) ) {
723
					return;
724
				}
725
				return ( typeof handler === "string" ? instance[ handler ] : handler )
726
					.apply( instance, arguments );
727
			}
728
729
			// copy the guid so direct unbinding works
730
			if ( typeof handler !== "string" ) {
731
				handlerProxy.guid = handler.guid =
732
					handler.guid || handlerProxy.guid || $.guid++;
733
			}
734
735
			var match = event.match( /^([\w:-]*)\s*(.*)$/ ),
736
				eventName = match[1] + instance.eventNamespace,
737
				selector = match[2];
738
			if ( selector ) {
739
				delegateElement.delegate( selector, eventName, handlerProxy );
740
			} else {
741
				element.bind( eventName, handlerProxy );
742
			}
743
		});
744
	},
745
746
	_off: function( element, eventName ) {
747
		eventName = (eventName || "").split( " " ).join( this.eventNamespace + " " ) +
748
			this.eventNamespace;
749
		element.unbind( eventName ).undelegate( eventName );
750
751
		// Clear the stack to avoid memory leaks (#10056)
752
		this.bindings = $( this.bindings.not( element ).get() );
753
		this.focusable = $( this.focusable.not( element ).get() );
754
		this.hoverable = $( this.hoverable.not( element ).get() );
755
	},
756
757
	_delay: function( handler, delay ) {
758
		function handlerProxy() {
759
			return ( typeof handler === "string" ? instance[ handler ] : handler )
760
				.apply( instance, arguments );
761
		}
762
		var instance = this;
763
		return setTimeout( handlerProxy, delay || 0 );
764
	},
765
766
	_hoverable: function( element ) {
767
		this.hoverable = this.hoverable.add( element );
768
		this._on( element, {
769
			mouseenter: function( event ) {
770
				$( event.currentTarget ).addClass( "ui-state-hover" );
771
			},
772
			mouseleave: function( event ) {
773
				$( event.currentTarget ).removeClass( "ui-state-hover" );
774
			}
775
		});
776
	},
777
778
	_focusable: function( element ) {
779
		this.focusable = this.focusable.add( element );
780
		this._on( element, {
781
			focusin: function( event ) {
782
				$( event.currentTarget ).addClass( "ui-state-focus" );
783
			},
784
			focusout: function( event ) {
785
				$( event.currentTarget ).removeClass( "ui-state-focus" );
786
			}
787
		});
788
	},
789
790
	_trigger: function( type, event, data ) {
791
		var prop, orig,
792
			callback = this.options[ type ];
793
794
		data = data || {};
795
		event = $.Event( event );
796
		event.type = ( type === this.widgetEventPrefix ?
797
			type :
798
			this.widgetEventPrefix + type ).toLowerCase();
799
		// the original event may come from any element
800
		// so we need to reset the target on the new event
801
		event.target = this.element[ 0 ];
802
803
		// copy original event properties over to the new event
804
		orig = event.originalEvent;
805
		if ( orig ) {
806
			for ( prop in orig ) {
807
				if ( !( prop in event ) ) {
808
					event[ prop ] = orig[ prop ];
809
				}
810
			}
811
		}
812
813
		this.element.trigger( event, data );
814
		return !( $.isFunction( callback ) &&
815
			callback.apply( this.element[0], [ event ].concat( data ) ) === false ||
816
			event.isDefaultPrevented() );
817
	}
818
};
819
820
$.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) {
821
	$.Widget.prototype[ "_" + method ] = function( element, options, callback ) {
822
		if ( typeof options === "string" ) {
823
			options = { effect: options };
824
		}
825
		var hasOptions,
826
			effectName = !options ?
827
				method :
828
				options === true || typeof options === "number" ?
829
					defaultEffect :
830
					options.effect || defaultEffect;
831
		options = options || {};
832
		if ( typeof options === "number" ) {
833
			options = { duration: options };
834
		}
835
		hasOptions = !$.isEmptyObject( options );
836
		options.complete = callback;
837
		if ( options.delay ) {
838
			element.delay( options.delay );
839
		}
840
		if ( hasOptions && $.effects && $.effects.effect[ effectName ] ) {
841
			element[ method ]( options );
842
		} else if ( effectName !== method && element[ effectName ] ) {
843
			element[ effectName ]( options.duration, options.easing, callback );
844
		} else {
845
			element.queue(function( next ) {
846
				$( this )[ method ]();
847
				if ( callback ) {
848
					callback.call( element[ 0 ] );
849
				}
850
				next();
851
			});
852
		}
853
	};
854
});
855
856
var widget = $.widget;
857
858
859
/*!
860
 * jQuery UI Mouse 1.11.4
861
 * http://jqueryui.com
862
 *
863
 * Copyright jQuery Foundation and other contributors
864
 * Released under the MIT license.
865
 * http://jquery.org/license
866
 *
867
 * http://api.jqueryui.com/mouse/
868
 */
869
870
871
var mouseHandled = false;
872
$( document ).mouseup( function() {
873
	mouseHandled = false;
874
});
875
876
var mouse = $.widget("ui.mouse", {
877
	version: "1.11.4",
878
	options: {
879
		cancel: "input,textarea,button,select,option",
880
		distance: 1,
881
		delay: 0
882
	},
883
	_mouseInit: function() {
884
		var that = this;
885
886
		this.element
887
			.bind("mousedown." + this.widgetName, function(event) {
888
				return that._mouseDown(event);
889
			})
890
			.bind("click." + this.widgetName, function(event) {
891
				if (true === $.data(event.target, that.widgetName + ".preventClickEvent")) {
892
					$.removeData(event.target, that.widgetName + ".preventClickEvent");
893
					event.stopImmediatePropagation();
894
					return false;
895
				}
896
			});
897
898
		this.started = false;
899
	},
900
901
	// TODO: make sure destroying one instance of mouse doesn't mess with
902
	// other instances of mouse
903
	_mouseDestroy: function() {
904
		this.element.unbind("." + this.widgetName);
905
		if ( this._mouseMoveDelegate ) {
906
			this.document
907
				.unbind("mousemove." + this.widgetName, this._mouseMoveDelegate)
908
				.unbind("mouseup." + this.widgetName, this._mouseUpDelegate);
909
		}
910
	},
911
912
	_mouseDown: function(event) {
913
		// don't let more than one widget handle mouseStart
914
		if ( mouseHandled ) {
915
			return;
916
		}
917
918
		this._mouseMoved = false;
919
920
		// we may have missed mouseup (out of window)
921
		(this._mouseStarted && this._mouseUp(event));
922
923
		this._mouseDownEvent = event;
924
925
		var that = this,
926
			btnIsLeft = (event.which === 1),
927
			// event.target.nodeName works around a bug in IE 8 with
928
			// disabled inputs (#7620)
929
			elIsCancel = (typeof this.options.cancel === "string" && event.target.nodeName ? $(event.target).closest(this.options.cancel).length : false);
930
		if (!btnIsLeft || elIsCancel || !this._mouseCapture(event)) {
931
			return true;
932
		}
933
934
		this.mouseDelayMet = !this.options.delay;
935
		if (!this.mouseDelayMet) {
936
			this._mouseDelayTimer = setTimeout(function() {
937
				that.mouseDelayMet = true;
938
			}, this.options.delay);
939
		}
940
941
		if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) {
942
			this._mouseStarted = (this._mouseStart(event) !== false);
943
			if (!this._mouseStarted) {
944
				event.preventDefault();
945
				return true;
946
			}
947
		}
948
949
		// Click event may never have fired (Gecko & Opera)
950
		if (true === $.data(event.target, this.widgetName + ".preventClickEvent")) {
951
			$.removeData(event.target, this.widgetName + ".preventClickEvent");
952
		}
953
954
		// these delegates are required to keep context
955
		this._mouseMoveDelegate = function(event) {
956
			return that._mouseMove(event);
957
		};
958
		this._mouseUpDelegate = function(event) {
959
			return that._mouseUp(event);
960
		};
961
962
		this.document
963
			.bind( "mousemove." + this.widgetName, this._mouseMoveDelegate )
964
			.bind( "mouseup." + this.widgetName, this._mouseUpDelegate );
965
966
		event.preventDefault();
967
968
		mouseHandled = true;
969
		return true;
970
	},
971
972
	_mouseMove: function(event) {
973
		// Only check for mouseups outside the document if you've moved inside the document
974
		// at least once. This prevents the firing of mouseup in the case of IE<9, which will
975
		// fire a mousemove event if content is placed under the cursor. See #7778
976
		// Support: IE <9
977
		if ( this._mouseMoved ) {
978
			// IE mouseup check - mouseup happened when mouse was out of window
979
			if ($.ui.ie && ( !document.documentMode || document.documentMode < 9 ) && !event.button) {
980
				return this._mouseUp(event);
981
982
			// Iframe mouseup check - mouseup occurred in another document
983
			} else if ( !event.which ) {
984
				return this._mouseUp( event );
985
			}
986
		}
987
988
		if ( event.which || event.button ) {
989
			this._mouseMoved = true;
990
		}
991
992
		if (this._mouseStarted) {
993
			this._mouseDrag(event);
994
			return event.preventDefault();
995
		}
996
997
		if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) {
998
			this._mouseStarted =
999
				(this._mouseStart(this._mouseDownEvent, event) !== false);
1000
			(this._mouseStarted ? this._mouseDrag(event) : this._mouseUp(event));
1001
		}
1002
1003
		return !this._mouseStarted;
1004
	},
1005
1006
	_mouseUp: function(event) {
1007
		this.document
1008
			.unbind( "mousemove." + this.widgetName, this._mouseMoveDelegate )
1009
			.unbind( "mouseup." + this.widgetName, this._mouseUpDelegate );
1010
1011
		if (this._mouseStarted) {
1012
			this._mouseStarted = false;
1013
1014
			if (event.target === this._mouseDownEvent.target) {
1015
				$.data(event.target, this.widgetName + ".preventClickEvent", true);
1016
			}
1017
1018
			this._mouseStop(event);
1019
		}
1020
1021
		mouseHandled = false;
1022
		return false;
1023
	},
1024
1025
	_mouseDistanceMet: function(event) {
1026
		return (Math.max(
1027
				Math.abs(this._mouseDownEvent.pageX - event.pageX),
1028
				Math.abs(this._mouseDownEvent.pageY - event.pageY)
1029
			) >= this.options.distance
1030
		);
1031
	},
1032
1033
	_mouseDelayMet: function(/* event */) {
1034
		return this.mouseDelayMet;
1035
	},
1036
1037
	// These are placeholder methods, to be overriden by extending plugin
1038
	_mouseStart: function(/* event */) {},
1039
	_mouseDrag: function(/* event */) {},
1040
	_mouseStop: function(/* event */) {},
1041
	_mouseCapture: function(/* event */) { return true; }
1042
});
1043
1044
1045
/*!
1046
 * jQuery UI Position 1.11.4
1047
 * http://jqueryui.com
1048
 *
1049
 * Copyright jQuery Foundation and other contributors
1050
 * Released under the MIT license.
1051
 * http://jquery.org/license
1052
 *
1053
 * http://api.jqueryui.com/position/
1054
 */
1055
1056
(function() {
1057
1058
$.ui = $.ui || {};
1059
1060
var cachedScrollbarWidth, supportsOffsetFractions,
1061
	max = Math.max,
1062
	abs = Math.abs,
1063
	round = Math.round,
1064
	rhorizontal = /left|center|right/,
1065
	rvertical = /top|center|bottom/,
1066
	roffset = /[\+\-]\d+(\.[\d]+)?%?/,
1067
	rposition = /^\w+/,
1068
	rpercent = /%$/,
1069
	_position = $.fn.position;
1070
1071
function getOffsets( offsets, width, height ) {
1072
	return [
1073
		parseFloat( offsets[ 0 ] ) * ( rpercent.test( offsets[ 0 ] ) ? width / 100 : 1 ),
1074
		parseFloat( offsets[ 1 ] ) * ( rpercent.test( offsets[ 1 ] ) ? height / 100 : 1 )
1075
	];
1076
}
1077
1078
function parseCss( element, property ) {
1079
	return parseInt( $.css( element, property ), 10 ) || 0;
1080
}
1081
1082
function getDimensions( elem ) {
1083
	var raw = elem[0];
1084
	if ( raw.nodeType === 9 ) {
1085
		return {
1086
			width: elem.width(),
1087
			height: elem.height(),
1088
			offset: { top: 0, left: 0 }
1089
		};
1090
	}
1091
	if ( $.isWindow( raw ) ) {
1092
		return {
1093
			width: elem.width(),
1094
			height: elem.height(),
1095
			offset: { top: elem.scrollTop(), left: elem.scrollLeft() }
1096
		};
1097
	}
1098
	if ( raw.preventDefault ) {
1099
		return {
1100
			width: 0,
1101
			height: 0,
1102
			offset: { top: raw.pageY, left: raw.pageX }
1103
		};
1104
	}
1105
	return {
1106
		width: elem.outerWidth(),
1107
		height: elem.outerHeight(),
1108
		offset: elem.offset()
1109
	};
1110
}
1111
1112
$.position = {
1113
	scrollbarWidth: function() {
1114
		if ( cachedScrollbarWidth !== undefined ) {
1115
			return cachedScrollbarWidth;
1116
		}
1117
		var w1, w2,
1118
			div = $( "<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>" ),
1119
			innerDiv = div.children()[0];
1120
1121
		$( "body" ).append( div );
1122
		w1 = innerDiv.offsetWidth;
1123
		div.css( "overflow", "scroll" );
1124
1125
		w2 = innerDiv.offsetWidth;
1126
1127
		if ( w1 === w2 ) {
1128
			w2 = div[0].clientWidth;
1129
		}
1130
1131
		div.remove();
1132
1133
		return (cachedScrollbarWidth = w1 - w2);
1134
	},
1135
	getScrollInfo: function( within ) {
1136
		var overflowX = within.isWindow || within.isDocument ? "" :
1137
				within.element.css( "overflow-x" ),
1138
			overflowY = within.isWindow || within.isDocument ? "" :
1139
				within.element.css( "overflow-y" ),
1140
			hasOverflowX = overflowX === "scroll" ||
1141
				( overflowX === "auto" && within.width < within.element[0].scrollWidth ),
1142
			hasOverflowY = overflowY === "scroll" ||
1143
				( overflowY === "auto" && within.height < within.element[0].scrollHeight );
1144
		return {
1145
			width: hasOverflowY ? $.position.scrollbarWidth() : 0,
1146
			height: hasOverflowX ? $.position.scrollbarWidth() : 0
1147
		};
1148
	},
1149
	getWithinInfo: function( element ) {
1150
		var withinElement = $( element || window ),
1151
			isWindow = $.isWindow( withinElement[0] ),
1152
			isDocument = !!withinElement[ 0 ] && withinElement[ 0 ].nodeType === 9;
1153
		return {
1154
			element: withinElement,
1155
			isWindow: isWindow,
1156
			isDocument: isDocument,
1157
			offset: withinElement.offset() || { left: 0, top: 0 },
1158
			scrollLeft: withinElement.scrollLeft(),
1159
			scrollTop: withinElement.scrollTop(),
1160
1161
			// support: jQuery 1.6.x
1162
			// jQuery 1.6 doesn't support .outerWidth/Height() on documents or windows
1163
			width: isWindow || isDocument ? withinElement.width() : withinElement.outerWidth(),
1164
			height: isWindow || isDocument ? withinElement.height() : withinElement.outerHeight()
1165
		};
1166
	}
1167
};
1168
1169
$.fn.position = function( options ) {
1170
	if ( !options || !options.of ) {
1171
		return _position.apply( this, arguments );
1172
	}
1173
1174
	// make a copy, we don't want to modify arguments
1175
	options = $.extend( {}, options );
1176
1177
	var atOffset, targetWidth, targetHeight, targetOffset, basePosition, dimensions,
1178
		target = $( options.of ),
1179
		within = $.position.getWithinInfo( options.within ),
1180
		scrollInfo = $.position.getScrollInfo( within ),
1181
		collision = ( options.collision || "flip" ).split( " " ),
1182
		offsets = {};
1183
1184
	dimensions = getDimensions( target );
1185
	if ( target[0].preventDefault ) {
1186
		// force left top to allow flipping
1187
		options.at = "left top";
1188
	}
1189
	targetWidth = dimensions.width;
1190
	targetHeight = dimensions.height;
1191
	targetOffset = dimensions.offset;
1192
	// clone to reuse original targetOffset later
1193
	basePosition = $.extend( {}, targetOffset );
1194
1195
	// force my and at to have valid horizontal and vertical positions
1196
	// if a value is missing or invalid, it will be converted to center
1197
	$.each( [ "my", "at" ], function() {
1198
		var pos = ( options[ this ] || "" ).split( " " ),
1199
			horizontalOffset,
1200
			verticalOffset;
1201
1202
		if ( pos.length === 1) {
1203
			pos = rhorizontal.test( pos[ 0 ] ) ?
1204
				pos.concat( [ "center" ] ) :
1205
				rvertical.test( pos[ 0 ] ) ?
1206
					[ "center" ].concat( pos ) :
1207
					[ "center", "center" ];
1208
		}
1209
		pos[ 0 ] = rhorizontal.test( pos[ 0 ] ) ? pos[ 0 ] : "center";
1210
		pos[ 1 ] = rvertical.test( pos[ 1 ] ) ? pos[ 1 ] : "center";
1211
1212
		// calculate offsets
1213
		horizontalOffset = roffset.exec( pos[ 0 ] );
1214
		verticalOffset = roffset.exec( pos[ 1 ] );
1215
		offsets[ this ] = [
1216
			horizontalOffset ? horizontalOffset[ 0 ] : 0,
1217
			verticalOffset ? verticalOffset[ 0 ] : 0
1218
		];
1219
1220
		// reduce to just the positions without the offsets
1221
		options[ this ] = [
1222
			rposition.exec( pos[ 0 ] )[ 0 ],
1223
			rposition.exec( pos[ 1 ] )[ 0 ]
1224
		];
1225
	});
1226
1227
	// normalize collision option
1228
	if ( collision.length === 1 ) {
1229
		collision[ 1 ] = collision[ 0 ];
1230
	}
1231
1232
	if ( options.at[ 0 ] === "right" ) {
1233
		basePosition.left += targetWidth;
1234
	} else if ( options.at[ 0 ] === "center" ) {
1235
		basePosition.left += targetWidth / 2;
1236
	}
1237
1238
	if ( options.at[ 1 ] === "bottom" ) {
1239
		basePosition.top += targetHeight;
1240
	} else if ( options.at[ 1 ] === "center" ) {
1241
		basePosition.top += targetHeight / 2;
1242
	}
1243
1244
	atOffset = getOffsets( offsets.at, targetWidth, targetHeight );
1245
	basePosition.left += atOffset[ 0 ];
1246
	basePosition.top += atOffset[ 1 ];
1247
1248
	return this.each(function() {
1249
		var collisionPosition, using,
1250
			elem = $( this ),
1251
			elemWidth = elem.outerWidth(),
1252
			elemHeight = elem.outerHeight(),
1253
			marginLeft = parseCss( this, "marginLeft" ),
1254
			marginTop = parseCss( this, "marginTop" ),
1255
			collisionWidth = elemWidth + marginLeft + parseCss( this, "marginRight" ) + scrollInfo.width,
1256
			collisionHeight = elemHeight + marginTop + parseCss( this, "marginBottom" ) + scrollInfo.height,
1257
			position = $.extend( {}, basePosition ),
1258
			myOffset = getOffsets( offsets.my, elem.outerWidth(), elem.outerHeight() );
1259
1260
		if ( options.my[ 0 ] === "right" ) {
1261
			position.left -= elemWidth;
1262
		} else if ( options.my[ 0 ] === "center" ) {
1263
			position.left -= elemWidth / 2;
1264
		}
1265
1266
		if ( options.my[ 1 ] === "bottom" ) {
1267
			position.top -= elemHeight;
1268
		} else if ( options.my[ 1 ] === "center" ) {
1269
			position.top -= elemHeight / 2;
1270
		}
1271
1272
		position.left += myOffset[ 0 ];
1273
		position.top += myOffset[ 1 ];
1274
1275
		// if the browser doesn't support fractions, then round for consistent results
1276
		if ( !supportsOffsetFractions ) {
1277
			position.left = round( position.left );
1278
			position.top = round( position.top );
1279
		}
1280
1281
		collisionPosition = {
1282
			marginLeft: marginLeft,
1283
			marginTop: marginTop
1284
		};
1285
1286
		$.each( [ "left", "top" ], function( i, dir ) {
1287
			if ( $.ui.position[ collision[ i ] ] ) {
1288
				$.ui.position[ collision[ i ] ][ dir ]( position, {
1289
					targetWidth: targetWidth,
1290
					targetHeight: targetHeight,
1291
					elemWidth: elemWidth,
1292
					elemHeight: elemHeight,
1293
					collisionPosition: collisionPosition,
1294
					collisionWidth: collisionWidth,
1295
					collisionHeight: collisionHeight,
1296
					offset: [ atOffset[ 0 ] + myOffset[ 0 ], atOffset [ 1 ] + myOffset[ 1 ] ],
1297
					my: options.my,
1298
					at: options.at,
1299
					within: within,
1300
					elem: elem
1301
				});
1302
			}
1303
		});
1304
1305
		if ( options.using ) {
1306
			// adds feedback as second argument to using callback, if present
1307
			using = function( props ) {
1308
				var left = targetOffset.left - position.left,
1309
					right = left + targetWidth - elemWidth,
1310
					top = targetOffset.top - position.top,
1311
					bottom = top + targetHeight - elemHeight,
1312
					feedback = {
1313
						target: {
1314
							element: target,
1315
							left: targetOffset.left,
1316
							top: targetOffset.top,
1317
							width: targetWidth,
1318
							height: targetHeight
1319
						},
1320
						element: {
1321
							element: elem,
1322
							left: position.left,
1323
							top: position.top,
1324
							width: elemWidth,
1325
							height: elemHeight
1326
						},
1327
						horizontal: right < 0 ? "left" : left > 0 ? "right" : "center",
1328
						vertical: bottom < 0 ? "top" : top > 0 ? "bottom" : "middle"
1329
					};
1330
				if ( targetWidth < elemWidth && abs( left + right ) < targetWidth ) {
1331
					feedback.horizontal = "center";
1332
				}
1333
				if ( targetHeight < elemHeight && abs( top + bottom ) < targetHeight ) {
1334
					feedback.vertical = "middle";
1335
				}
1336
				if ( max( abs( left ), abs( right ) ) > max( abs( top ), abs( bottom ) ) ) {
1337
					feedback.important = "horizontal";
1338
				} else {
1339
					feedback.important = "vertical";
1340
				}
1341
				options.using.call( this, props, feedback );
1342
			};
1343
		}
1344
1345
		elem.offset( $.extend( position, { using: using } ) );
1346
	});
1347
};
1348
1349
$.ui.position = {
1350
	fit: {
1351
		left: function( position, data ) {
1352
			var within = data.within,
1353
				withinOffset = within.isWindow ? within.scrollLeft : within.offset.left,
1354
				outerWidth = within.width,
1355
				collisionPosLeft = position.left - data.collisionPosition.marginLeft,
1356
				overLeft = withinOffset - collisionPosLeft,
1357
				overRight = collisionPosLeft + data.collisionWidth - outerWidth - withinOffset,
1358
				newOverRight;
1359
1360
			// element is wider than within
1361
			if ( data.collisionWidth > outerWidth ) {
1362
				// element is initially over the left side of within
1363
				if ( overLeft > 0 && overRight <= 0 ) {
1364
					newOverRight = position.left + overLeft + data.collisionWidth - outerWidth - withinOffset;
1365
					position.left += overLeft - newOverRight;
1366
				// element is initially over right side of within
1367
				} else if ( overRight > 0 && overLeft <= 0 ) {
1368
					position.left = withinOffset;
1369
				// element is initially over both left and right sides of within
1370
				} else {
1371
					if ( overLeft > overRight ) {
1372
						position.left = withinOffset + outerWidth - data.collisionWidth;
1373
					} else {
1374
						position.left = withinOffset;
1375
					}
1376
				}
1377
			// too far left -> align with left edge
1378
			} else if ( overLeft > 0 ) {
1379
				position.left += overLeft;
1380
			// too far right -> align with right edge
1381
			} else if ( overRight > 0 ) {
1382
				position.left -= overRight;
1383
			// adjust based on position and margin
1384
			} else {
1385
				position.left = max( position.left - collisionPosLeft, position.left );
1386
			}
1387
		},
1388
		top: function( position, data ) {
1389
			var within = data.within,
1390
				withinOffset = within.isWindow ? within.scrollTop : within.offset.top,
1391
				outerHeight = data.within.height,
1392
				collisionPosTop = position.top - data.collisionPosition.marginTop,
1393
				overTop = withinOffset - collisionPosTop,
1394
				overBottom = collisionPosTop + data.collisionHeight - outerHeight - withinOffset,
1395
				newOverBottom;
1396
1397
			// element is taller than within
1398
			if ( data.collisionHeight > outerHeight ) {
1399
				// element is initially over the top of within
1400
				if ( overTop > 0 && overBottom <= 0 ) {
1401
					newOverBottom = position.top + overTop + data.collisionHeight - outerHeight - withinOffset;
1402
					position.top += overTop - newOverBottom;
1403
				// element is initially over bottom of within
1404
				} else if ( overBottom > 0 && overTop <= 0 ) {
1405
					position.top = withinOffset;
1406
				// element is initially over both top and bottom of within
1407
				} else {
1408
					if ( overTop > overBottom ) {
1409
						position.top = withinOffset + outerHeight - data.collisionHeight;
1410
					} else {
1411
						position.top = withinOffset;
1412
					}
1413
				}
1414
			// too far up -> align with top
1415
			} else if ( overTop > 0 ) {
1416
				position.top += overTop;
1417
			// too far down -> align with bottom edge
1418
			} else if ( overBottom > 0 ) {
1419
				position.top -= overBottom;
1420
			// adjust based on position and margin
1421
			} else {
1422
				position.top = max( position.top - collisionPosTop, position.top );
1423
			}
1424
		}
1425
	},
1426
	flip: {
1427
		left: function( position, data ) {
1428
			var within = data.within,
1429
				withinOffset = within.offset.left + within.scrollLeft,
1430
				outerWidth = within.width,
1431
				offsetLeft = within.isWindow ? within.scrollLeft : within.offset.left,
1432
				collisionPosLeft = position.left - data.collisionPosition.marginLeft,
1433
				overLeft = collisionPosLeft - offsetLeft,
1434
				overRight = collisionPosLeft + data.collisionWidth - outerWidth - offsetLeft,
1435
				myOffset = data.my[ 0 ] === "left" ?
1436
					-data.elemWidth :
1437
					data.my[ 0 ] === "right" ?
1438
						data.elemWidth :
1439
						0,
1440
				atOffset = data.at[ 0 ] === "left" ?
1441
					data.targetWidth :
1442
					data.at[ 0 ] === "right" ?
1443
						-data.targetWidth :
1444
						0,
1445
				offset = -2 * data.offset[ 0 ],
1446
				newOverRight,
1447
				newOverLeft;
1448
1449
			if ( overLeft < 0 ) {
1450
				newOverRight = position.left + myOffset + atOffset + offset + data.collisionWidth - outerWidth - withinOffset;
1451
				if ( newOverRight < 0 || newOverRight < abs( overLeft ) ) {
1452
					position.left += myOffset + atOffset + offset;
1453
				}
1454
			} else if ( overRight > 0 ) {
1455
				newOverLeft = position.left - data.collisionPosition.marginLeft + myOffset + atOffset + offset - offsetLeft;
1456
				if ( newOverLeft > 0 || abs( newOverLeft ) < overRight ) {
1457
					position.left += myOffset + atOffset + offset;
1458
				}
1459
			}
1460
		},
1461
		top: function( position, data ) {
1462
			var within = data.within,
1463
				withinOffset = within.offset.top + within.scrollTop,
1464
				outerHeight = within.height,
1465
				offsetTop = within.isWindow ? within.scrollTop : within.offset.top,
1466
				collisionPosTop = position.top - data.collisionPosition.marginTop,
1467
				overTop = collisionPosTop - offsetTop,
1468
				overBottom = collisionPosTop + data.collisionHeight - outerHeight - offsetTop,
1469
				top = data.my[ 1 ] === "top",
1470
				myOffset = top ?
1471
					-data.elemHeight :
1472
					data.my[ 1 ] === "bottom" ?
1473
						data.elemHeight :
1474
						0,
1475
				atOffset = data.at[ 1 ] === "top" ?
1476
					data.targetHeight :
1477
					data.at[ 1 ] === "bottom" ?
1478
						-data.targetHeight :
1479
						0,
1480
				offset = -2 * data.offset[ 1 ],
1481
				newOverTop,
1482
				newOverBottom;
1483
			if ( overTop < 0 ) {
1484
				newOverBottom = position.top + myOffset + atOffset + offset + data.collisionHeight - outerHeight - withinOffset;
1485
				if ( newOverBottom < 0 || newOverBottom < abs( overTop ) ) {
1486
					position.top += myOffset + atOffset + offset;
1487
				}
1488
			} else if ( overBottom > 0 ) {
1489
				newOverTop = position.top - data.collisionPosition.marginTop + myOffset + atOffset + offset - offsetTop;
1490
				if ( newOverTop > 0 || abs( newOverTop ) < overBottom ) {
1491
					position.top += myOffset + atOffset + offset;
1492
				}
1493
			}
1494
		}
1495
	},
1496
	flipfit: {
1497
		left: function() {
1498
			$.ui.position.flip.left.apply( this, arguments );
1499
			$.ui.position.fit.left.apply( this, arguments );
1500
		},
1501
		top: function() {
1502
			$.ui.position.flip.top.apply( this, arguments );
1503
			$.ui.position.fit.top.apply( this, arguments );
1504
		}
1505
	}
1506
};
1507
1508
// fraction support test
1509
(function() {
1510
	var testElement, testElementParent, testElementStyle, offsetLeft, i,
1511
		body = document.getElementsByTagName( "body" )[ 0 ],
1512
		div = document.createElement( "div" );
1513
1514
	//Create a "fake body" for testing based on method used in jQuery.support
1515
	testElement = document.createElement( body ? "div" : "body" );
1516
	testElementStyle = {
1517
		visibility: "hidden",
1518
		width: 0,
1519
		height: 0,
1520
		border: 0,
1521
		margin: 0,
1522
		background: "none"
1523
	};
1524
	if ( body ) {
1525
		$.extend( testElementStyle, {
1526
			position: "absolute",
1527
			left: "-1000px",
1528
			top: "-1000px"
1529
		});
1530
	}
1531
	for ( i in testElementStyle ) {
1532
		testElement.style[ i ] = testElementStyle[ i ];
1533
	}
1534
	testElement.appendChild( div );
1535
	testElementParent = body || document.documentElement;
1536
	testElementParent.insertBefore( testElement, testElementParent.firstChild );
1537
1538
	div.style.cssText = "position: absolute; left: 10.7432222px;";
1539
1540
	offsetLeft = $( div ).offset().left;
1541
	supportsOffsetFractions = offsetLeft > 10 && offsetLeft < 11;
1542
1543
	testElement.innerHTML = "";
1544
	testElementParent.removeChild( testElement );
1545
})();
1546
1547
})();
1548
1549
var position = $.ui.position;
1550
1551
1552
/*!
1553
 * jQuery UI Draggable 1.11.4
1554
 * http://jqueryui.com
1555
 *
1556
 * Copyright jQuery Foundation and other contributors
1557
 * Released under the MIT license.
1558
 * http://jquery.org/license
1559
 *
1560
 * http://api.jqueryui.com/draggable/
1561
 */
1562
1563
1564
$.widget("ui.draggable", $.ui.mouse, {
1565
	version: "1.11.4",
1566
	widgetEventPrefix: "drag",
1567
	options: {
1568
		addClasses: true,
1569
		appendTo: "parent",
1570
		axis: false,
1571
		connectToSortable: false,
1572
		containment: false,
1573
		cursor: "auto",
1574
		cursorAt: false,
1575
		grid: false,
1576
		handle: false,
1577
		helper: "original",
1578
		iframeFix: false,
1579
		opacity: false,
1580
		refreshPositions: false,
1581
		revert: false,
1582
		revertDuration: 500,
1583
		scope: "default",
1584
		scroll: true,
1585
		scrollSensitivity: 20,
1586
		scrollSpeed: 20,
1587
		snap: false,
1588
		snapMode: "both",
1589
		snapTolerance: 20,
1590
		stack: false,
1591
		zIndex: false,
1592
1593
		// callbacks
1594
		drag: null,
1595
		start: null,
1596
		stop: null
1597
	},
1598
	_create: function() {
1599
1600
		if ( this.options.helper === "original" ) {
1601
			this._setPositionRelative();
1602
		}
1603
		if (this.options.addClasses){
1604
			this.element.addClass("ui-draggable");
1605
		}
1606
		if (this.options.disabled){
1607
			this.element.addClass("ui-draggable-disabled");
1608
		}
1609
		this._setHandleClassName();
1610
1611
		this._mouseInit();
1612
	},
1613
1614
	_setOption: function( key, value ) {
1615
		this._super( key, value );
1616
		if ( key === "handle" ) {
1617
			this._removeHandleClassName();
1618
			this._setHandleClassName();
1619
		}
1620
	},
1621
1622
	_destroy: function() {
1623
		if ( ( this.helper || this.element ).is( ".ui-draggable-dragging" ) ) {
1624
			this.destroyOnClear = true;
1625
			return;
1626
		}
1627
		this.element.removeClass( "ui-draggable ui-draggable-dragging ui-draggable-disabled" );
1628
		this._removeHandleClassName();
1629
		this._mouseDestroy();
1630
	},
1631
1632
	_mouseCapture: function(event) {
1633
		var o = this.options;
1634
1635
		this._blurActiveElement( event );
1636
1637
		// among others, prevent a drag on a resizable-handle
1638
		if (this.helper || o.disabled || $(event.target).closest(".ui-resizable-handle").length > 0) {
1639
			return false;
1640
		}
1641
1642
		//Quit if we're not on a valid handle
1643
		this.handle = this._getHandle(event);
1644
		if (!this.handle) {
1645
			return false;
1646
		}
1647
1648
		this._blockFrames( o.iframeFix === true ? "iframe" : o.iframeFix );
1649
1650
		return true;
1651
1652
	},
1653
1654
	_blockFrames: function( selector ) {
1655
		this.iframeBlocks = this.document.find( selector ).map(function() {
1656
			var iframe = $( this );
1657
1658
			return $( "<div>" )
1659
				.css( "position", "absolute" )
1660
				.appendTo( iframe.parent() )
1661
				.outerWidth( iframe.outerWidth() )
1662
				.outerHeight( iframe.outerHeight() )
1663
				.offset( iframe.offset() )[ 0 ];
1664
		});
1665
	},
1666
1667
	_unblockFrames: function() {
1668
		if ( this.iframeBlocks ) {
1669
			this.iframeBlocks.remove();
1670
			delete this.iframeBlocks;
1671
		}
1672
	},
1673
1674
	_blurActiveElement: function( event ) {
1675
		var document = this.document[ 0 ];
1676
1677
		// Only need to blur if the event occurred on the draggable itself, see #10527
1678
		if ( !this.handleElement.is( event.target ) ) {
1679
			return;
1680
		}
1681
1682
		// support: IE9
1683
		// IE9 throws an "Unspecified error" accessing document.activeElement from an <iframe>
1684
		try {
1685
1686
			// Support: IE9, IE10
1687
			// If the <body> is blurred, IE will switch windows, see #9520
1688
			if ( document.activeElement && document.activeElement.nodeName.toLowerCase() !== "body" ) {
1689
1690
				// Blur any element that currently has focus, see #4261
1691
				$( document.activeElement ).blur();
1692
			}
1693
		} catch ( error ) {}
1694
	},
1695
1696
	_mouseStart: function(event) {
1697
1698
		var o = this.options;
1699
1700
		//Create and append the visible helper
1701
		this.helper = this._createHelper(event);
1702
1703
		this.helper.addClass("ui-draggable-dragging");
1704
1705
		//Cache the helper size
1706
		this._cacheHelperProportions();
1707
1708
		//If ddmanager is used for droppables, set the global draggable
1709
		if ($.ui.ddmanager) {
1710
			$.ui.ddmanager.current = this;
1711
		}
1712
1713
		/*
1714
		 * - Position generation -
1715
		 * This block generates everything position related - it's the core of draggables.
1716
		 */
1717
1718
		//Cache the margins of the original element
1719
		this._cacheMargins();
1720
1721
		//Store the helper's css position
1722
		this.cssPosition = this.helper.css( "position" );
1723
		this.scrollParent = this.helper.scrollParent( true );
1724
		this.offsetParent = this.helper.offsetParent();
1725
		this.hasFixedAncestor = this.helper.parents().filter(function() {
1726
				return $( this ).css( "position" ) === "fixed";
1727
			}).length > 0;
1728
1729
		//The element's absolute position on the page minus margins
1730
		this.positionAbs = this.element.offset();
1731
		this._refreshOffsets( event );
1732
1733
		//Generate the original position
1734
		this.originalPosition = this.position = this._generatePosition( event, false );
1735
		this.originalPageX = event.pageX;
1736
		this.originalPageY = event.pageY;
1737
1738
		//Adjust the mouse offset relative to the helper if "cursorAt" is supplied
1739
		(o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt));
1740
1741
		//Set a containment if given in the options
1742
		this._setContainment();
1743
1744
		//Trigger event + callbacks
1745
		if (this._trigger("start", event) === false) {
1746
			this._clear();
1747
			return false;
1748
		}
1749
1750
		//Recache the helper size
1751
		this._cacheHelperProportions();
1752
1753
		//Prepare the droppable offsets
1754
		if ($.ui.ddmanager && !o.dropBehaviour) {
1755
			$.ui.ddmanager.prepareOffsets(this, event);
1756
		}
1757
1758
		// Reset helper's right/bottom css if they're set and set explicit width/height instead
1759
		// as this prevents resizing of elements with right/bottom set (see #7772)
1760
		this._normalizeRightBottom();
1761
1762
		this._mouseDrag(event, true); //Execute the drag once - this causes the helper not to be visible before getting its correct position
1763
1764
		//If the ddmanager is used for droppables, inform the manager that dragging has started (see #5003)
1765
		if ( $.ui.ddmanager ) {
1766
			$.ui.ddmanager.dragStart(this, event);
1767
		}
1768
1769
		return true;
1770
	},
1771
1772
	_refreshOffsets: function( event ) {
1773
		this.offset = {
1774
			top: this.positionAbs.top - this.margins.top,
1775
			left: this.positionAbs.left - this.margins.left,
1776
			scroll: false,
1777
			parent: this._getParentOffset(),
1778
			relative: this._getRelativeOffset()
1779
		};
1780
1781
		this.offset.click = {
1782
			left: event.pageX - this.offset.left,
1783
			top: event.pageY - this.offset.top
1784
		};
1785
	},
1786
1787
	_mouseDrag: function(event, noPropagation) {
1788
		// reset any necessary cached properties (see #5009)
1789
		if ( this.hasFixedAncestor ) {
1790
			this.offset.parent = this._getParentOffset();
1791
		}
1792
1793
		//Compute the helpers position
1794
		this.position = this._generatePosition( event, true );
1795
		this.positionAbs = this._convertPositionTo("absolute");
1796
1797
		//Call plugins and callbacks and use the resulting position if something is returned
1798
		if (!noPropagation) {
1799
			var ui = this._uiHash();
1800
			if (this._trigger("drag", event, ui) === false) {
1801
				this._mouseUp({});
1802
				return false;
1803
			}
1804
			this.position = ui.position;
1805
		}
1806
1807
		this.helper[ 0 ].style.left = this.position.left + "px";
1808
		this.helper[ 0 ].style.top = this.position.top + "px";
1809
1810
		if ($.ui.ddmanager) {
1811
			$.ui.ddmanager.drag(this, event);
1812
		}
1813
1814
		return false;
1815
	},
1816
1817
	_mouseStop: function(event) {
1818
1819
		//If we are using droppables, inform the manager about the drop
1820
		var that = this,
1821
			dropped = false;
1822
		if ($.ui.ddmanager && !this.options.dropBehaviour) {
1823
			dropped = $.ui.ddmanager.drop(this, event);
1824
		}
1825
1826
		//if a drop comes from outside (a sortable)
1827
		if (this.dropped) {
1828
			dropped = this.dropped;
1829
			this.dropped = false;
1830
		}
1831
1832
		if ((this.options.revert === "invalid" && !dropped) || (this.options.revert === "valid" && dropped) || this.options.revert === true || ($.isFunction(this.options.revert) && this.options.revert.call(this.element, dropped))) {
1833
			$(this.helper).animate(this.originalPosition, parseInt(this.options.revertDuration, 10), function() {
1834
				if (that._trigger("stop", event) !== false) {
1835
					that._clear();
1836
				}
1837
			});
1838
		} else {
1839
			if (this._trigger("stop", event) !== false) {
1840
				this._clear();
1841
			}
1842
		}
1843
1844
		return false;
1845
	},
1846
1847
	_mouseUp: function( event ) {
1848
		this._unblockFrames();
1849
1850
		//If the ddmanager is used for droppables, inform the manager that dragging has stopped (see #5003)
1851
		if ( $.ui.ddmanager ) {
1852
			$.ui.ddmanager.dragStop(this, event);
1853
		}
1854
1855
		// Only need to focus if the event occurred on the draggable itself, see #10527
1856
		if ( this.handleElement.is( event.target ) ) {
1857
			// The interaction is over; whether or not the click resulted in a drag, focus the element
1858
			this.element.focus();
1859
		}
1860
1861
		return $.ui.mouse.prototype._mouseUp.call(this, event);
1862
	},
1863
1864
	cancel: function() {
1865
1866
		if (this.helper.is(".ui-draggable-dragging")) {
1867
			this._mouseUp({});
1868
		} else {
1869
			this._clear();
1870
		}
1871
1872
		return this;
1873
1874
	},
1875
1876
	_getHandle: function(event) {
1877
		return this.options.handle ?
1878
			!!$( event.target ).closest( this.element.find( this.options.handle ) ).length :
1879
			true;
1880
	},
1881
1882
	_setHandleClassName: function() {
1883
		this.handleElement = this.options.handle ?
1884
			this.element.find( this.options.handle ) : this.element;
1885
		this.handleElement.addClass( "ui-draggable-handle" );
1886
	},
1887
1888
	_removeHandleClassName: function() {
1889
		this.handleElement.removeClass( "ui-draggable-handle" );
1890
	},
1891
1892
	_createHelper: function(event) {
1893
1894
		var o = this.options,
1895
			helperIsFunction = $.isFunction( o.helper ),
1896
			helper = helperIsFunction ?
1897
				$( o.helper.apply( this.element[ 0 ], [ event ] ) ) :
1898
				( o.helper === "clone" ?
1899
					this.element.clone().removeAttr( "id" ) :
1900
					this.element );
1901
1902
		if (!helper.parents("body").length) {
1903
			helper.appendTo((o.appendTo === "parent" ? this.element[0].parentNode : o.appendTo));
1904
		}
1905
1906
		// http://bugs.jqueryui.com/ticket/9446
1907
		// a helper function can return the original element
1908
		// which wouldn't have been set to relative in _create
1909
		if ( helperIsFunction && helper[ 0 ] === this.element[ 0 ] ) {
1910
			this._setPositionRelative();
1911
		}
1912
1913
		if (helper[0] !== this.element[0] && !(/(fixed|absolute)/).test(helper.css("position"))) {
1914
			helper.css("position", "absolute");
1915
		}
1916
1917
		return helper;
1918
1919
	},
1920
1921
	_setPositionRelative: function() {
1922
		if ( !( /^(?:r|a|f)/ ).test( this.element.css( "position" ) ) ) {
1923
			this.element[ 0 ].style.position = "relative";
1924
		}
1925
	},
1926
1927
	_adjustOffsetFromHelper: function(obj) {
1928
		if (typeof obj === "string") {
1929
			obj = obj.split(" ");
1930
		}
1931
		if ($.isArray(obj)) {
1932
			obj = { left: +obj[0], top: +obj[1] || 0 };
1933
		}
1934
		if ("left" in obj) {
1935
			this.offset.click.left = obj.left + this.margins.left;
1936
		}
1937
		if ("right" in obj) {
1938
			this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left;
1939
		}
1940
		if ("top" in obj) {
1941
			this.offset.click.top = obj.top + this.margins.top;
1942
		}
1943
		if ("bottom" in obj) {
1944
			this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top;
1945
		}
1946
	},
1947
1948
	_isRootNode: function( element ) {
1949
		return ( /(html|body)/i ).test( element.tagName ) || element === this.document[ 0 ];
1950
	},
1951
1952
	_getParentOffset: function() {
1953
1954
		//Get the offsetParent and cache its position
1955
		var po = this.offsetParent.offset(),
1956
			document = this.document[ 0 ];
1957
1958
		// This is a special case where we need to modify a offset calculated on start, since the following happened:
1959
		// 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent
1960
		// 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that
1961
		//    the scroll is included in the initial calculation of the offset of the parent, and never recalculated upon drag
1962
		if (this.cssPosition === "absolute" && this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) {
1963
			po.left += this.scrollParent.scrollLeft();
1964
			po.top += this.scrollParent.scrollTop();
1965
		}
1966
1967
		if ( this._isRootNode( this.offsetParent[ 0 ] ) ) {
1968
			po = { top: 0, left: 0 };
1969
		}
1970
1971
		return {
1972
			top: po.top + (parseInt(this.offsetParent.css("borderTopWidth"), 10) || 0),
1973
			left: po.left + (parseInt(this.offsetParent.css("borderLeftWidth"), 10) || 0)
1974
		};
1975
1976
	},
1977
1978
	_getRelativeOffset: function() {
1979
		if ( this.cssPosition !== "relative" ) {
1980
			return { top: 0, left: 0 };
1981
		}
1982
1983
		var p = this.element.position(),
1984
			scrollIsRootNode = this._isRootNode( this.scrollParent[ 0 ] );
1985
1986
		return {
1987
			top: p.top - ( parseInt(this.helper.css( "top" ), 10) || 0 ) + ( !scrollIsRootNode ? this.scrollParent.scrollTop() : 0 ),
1988
			left: p.left - ( parseInt(this.helper.css( "left" ), 10) || 0 ) + ( !scrollIsRootNode ? this.scrollParent.scrollLeft() : 0 )
1989
		};
1990
1991
	},
1992
1993
	_cacheMargins: function() {
1994
		this.margins = {
1995
			left: (parseInt(this.element.css("marginLeft"), 10) || 0),
1996
			top: (parseInt(this.element.css("marginTop"), 10) || 0),
1997
			right: (parseInt(this.element.css("marginRight"), 10) || 0),
1998
			bottom: (parseInt(this.element.css("marginBottom"), 10) || 0)
1999
		};
2000
	},
2001
2002
	_cacheHelperProportions: function() {
2003
		this.helperProportions = {
2004
			width: this.helper.outerWidth(),
2005
			height: this.helper.outerHeight()
2006
		};
2007
	},
2008
2009
	_setContainment: function() {
2010
2011
		var isUserScrollable, c, ce,
2012
			o = this.options,
2013
			document = this.document[ 0 ];
2014
2015
		this.relativeContainer = null;
2016
2017
		if ( !o.containment ) {
2018
			this.containment = null;
2019
			return;
2020
		}
2021
2022
		if ( o.containment === "window" ) {
2023
			this.containment = [
2024
				$( window ).scrollLeft() - this.offset.relative.left - this.offset.parent.left,
2025
				$( window ).scrollTop() - this.offset.relative.top - this.offset.parent.top,
2026
				$( window ).scrollLeft() + $( window ).width() - this.helperProportions.width - this.margins.left,
2027
				$( window ).scrollTop() + ( $( window ).height() || document.body.parentNode.scrollHeight ) - this.helperProportions.height - this.margins.top
2028
			];
2029
			return;
2030
		}
2031
2032
		if ( o.containment === "document") {
2033
			this.containment = [
2034
				0,
2035
				0,
2036
				$( document ).width() - this.helperProportions.width - this.margins.left,
2037
				( $( document ).height() || document.body.parentNode.scrollHeight ) - this.helperProportions.height - this.margins.top
2038
			];
2039
			return;
2040
		}
2041
2042
		if ( o.containment.constructor === Array ) {
2043
			this.containment = o.containment;
2044
			return;
2045
		}
2046
2047
		if ( o.containment === "parent" ) {
2048
			o.containment = this.helper[ 0 ].parentNode;
2049
		}
2050
2051
		c = $( o.containment );
2052
		ce = c[ 0 ];
2053
2054
		if ( !ce ) {
2055
			return;
2056
		}
2057
2058
		isUserScrollable = /(scroll|auto)/.test( c.css( "overflow" ) );
2059
2060
		this.containment = [
2061
			( parseInt( c.css( "borderLeftWidth" ), 10 ) || 0 ) + ( parseInt( c.css( "paddingLeft" ), 10 ) || 0 ),
2062
			( parseInt( c.css( "borderTopWidth" ), 10 ) || 0 ) + ( parseInt( c.css( "paddingTop" ), 10 ) || 0 ),
2063
			( isUserScrollable ? Math.max( ce.scrollWidth, ce.offsetWidth ) : ce.offsetWidth ) -
2064
				( parseInt( c.css( "borderRightWidth" ), 10 ) || 0 ) -
2065
				( parseInt( c.css( "paddingRight" ), 10 ) || 0 ) -
2066
				this.helperProportions.width -
2067
				this.margins.left -
2068
				this.margins.right,
2069
			( isUserScrollable ? Math.max( ce.scrollHeight, ce.offsetHeight ) : ce.offsetHeight ) -
2070
				( parseInt( c.css( "borderBottomWidth" ), 10 ) || 0 ) -
2071
				( parseInt( c.css( "paddingBottom" ), 10 ) || 0 ) -
2072
				this.helperProportions.height -
2073
				this.margins.top -
2074
				this.margins.bottom
2075
		];
2076
		this.relativeContainer = c;
2077
	},
2078
2079
	_convertPositionTo: function(d, pos) {
2080
2081
		if (!pos) {
2082
			pos = this.position;
2083
		}
2084
2085
		var mod = d === "absolute" ? 1 : -1,
2086
			scrollIsRootNode = this._isRootNode( this.scrollParent[ 0 ] );
2087
2088
		return {
2089
			top: (
2090
				pos.top	+																// The absolute mouse position
2091
				this.offset.relative.top * mod +										// Only for relative positioned nodes: Relative offset from element to offset parent
2092
				this.offset.parent.top * mod -										// The offsetParent's offset without borders (offset + border)
2093
				( ( this.cssPosition === "fixed" ? -this.offset.scroll.top : ( scrollIsRootNode ? 0 : this.offset.scroll.top ) ) * mod)
2094
			),
2095
			left: (
2096
				pos.left +																// The absolute mouse position
2097
				this.offset.relative.left * mod +										// Only for relative positioned nodes: Relative offset from element to offset parent
2098
				this.offset.parent.left * mod	-										// The offsetParent's offset without borders (offset + border)
2099
				( ( this.cssPosition === "fixed" ? -this.offset.scroll.left : ( scrollIsRootNode ? 0 : this.offset.scroll.left ) ) * mod)
2100
			)
2101
		};
2102
2103
	},
2104
2105
	_generatePosition: function( event, constrainPosition ) {
2106
2107
		var containment, co, top, left,
2108
			o = this.options,
2109
			scrollIsRootNode = this._isRootNode( this.scrollParent[ 0 ] ),
2110
			pageX = event.pageX,
2111
			pageY = event.pageY;
2112
2113
		// Cache the scroll
2114
		if ( !scrollIsRootNode || !this.offset.scroll ) {
2115
			this.offset.scroll = {
2116
				top: this.scrollParent.scrollTop(),
2117
				left: this.scrollParent.scrollLeft()
2118
			};
2119
		}
2120
2121
		/*
2122
		 * - Position constraining -
2123
		 * Constrain the position to a mix of grid, containment.
2124
		 */
2125
2126
		// If we are not dragging yet, we won't check for options
2127
		if ( constrainPosition ) {
2128
			if ( this.containment ) {
2129
				if ( this.relativeContainer ){
2130
					co = this.relativeContainer.offset();
2131
					containment = [
2132
						this.containment[ 0 ] + co.left,
2133
						this.containment[ 1 ] + co.top,
2134
						this.containment[ 2 ] + co.left,
2135
						this.containment[ 3 ] + co.top
2136
					];
2137
				} else {
2138
					containment = this.containment;
2139
				}
2140
2141
				if (event.pageX - this.offset.click.left < containment[0]) {
2142
					pageX = containment[0] + this.offset.click.left;
2143
				}
2144
				if (event.pageY - this.offset.click.top < containment[1]) {
2145
					pageY = containment[1] + this.offset.click.top;
2146
				}
2147
				if (event.pageX - this.offset.click.left > containment[2]) {
2148
					pageX = containment[2] + this.offset.click.left;
2149
				}
2150
				if (event.pageY - this.offset.click.top > containment[3]) {
2151
					pageY = containment[3] + this.offset.click.top;
2152
				}
2153
			}
2154
2155
			if (o.grid) {
2156
				//Check for grid elements set to 0 to prevent divide by 0 error causing invalid argument errors in IE (see ticket #6950)
2157
				top = o.grid[1] ? this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1] : this.originalPageY;
2158
				pageY = containment ? ((top - this.offset.click.top >= containment[1] || top - this.offset.click.top > containment[3]) ? top : ((top - this.offset.click.top >= containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top;
2159
2160
				left = o.grid[0] ? this.originalPageX + Math.round((pageX - this.originalPageX) / o.grid[0]) * o.grid[0] : this.originalPageX;
2161
				pageX = containment ? ((left - this.offset.click.left >= containment[0] || left - this.offset.click.left > containment[2]) ? left : ((left - this.offset.click.left >= containment[0]) ? left - o.grid[0] : left + o.grid[0])) : left;
2162
			}
2163
2164
			if ( o.axis === "y" ) {
2165
				pageX = this.originalPageX;
2166
			}
2167
2168
			if ( o.axis === "x" ) {
2169
				pageY = this.originalPageY;
2170
			}
2171
		}
2172
2173
		return {
2174
			top: (
2175
				pageY -																	// The absolute mouse position
2176
				this.offset.click.top	-												// Click offset (relative to the element)
2177
				this.offset.relative.top -												// Only for relative positioned nodes: Relative offset from element to offset parent
2178
				this.offset.parent.top +												// The offsetParent's offset without borders (offset + border)
2179
				( this.cssPosition === "fixed" ? -this.offset.scroll.top : ( scrollIsRootNode ? 0 : this.offset.scroll.top ) )
2180
			),
2181
			left: (
2182
				pageX -																	// The absolute mouse position
2183
				this.offset.click.left -												// Click offset (relative to the element)
2184
				this.offset.relative.left -												// Only for relative positioned nodes: Relative offset from element to offset parent
2185
				this.offset.parent.left +												// The offsetParent's offset without borders (offset + border)
2186
				( this.cssPosition === "fixed" ? -this.offset.scroll.left : ( scrollIsRootNode ? 0 : this.offset.scroll.left ) )
2187
			)
2188
		};
2189
2190
	},
2191
2192
	_clear: function() {
2193
		this.helper.removeClass("ui-draggable-dragging");
2194
		if (this.helper[0] !== this.element[0] && !this.cancelHelperRemoval) {
2195
			this.helper.remove();
2196
		}
2197
		this.helper = null;
2198
		this.cancelHelperRemoval = false;
2199
		if ( this.destroyOnClear ) {
2200
			this.destroy();
2201
		}
2202
	},
2203
2204
	_normalizeRightBottom: function() {
2205
		if ( this.options.axis !== "y" && this.helper.css( "right" ) !== "auto" ) {
2206
			this.helper.width( this.helper.width() );
2207
			this.helper.css( "right", "auto" );
2208
		}
2209
		if ( this.options.axis !== "x" && this.helper.css( "bottom" ) !== "auto" ) {
2210
			this.helper.height( this.helper.height() );
2211
			this.helper.css( "bottom", "auto" );
2212
		}
2213
	},
2214
2215
	// From now on bulk stuff - mainly helpers
2216
2217
	_trigger: function( type, event, ui ) {
2218
		ui = ui || this._uiHash();
2219
		$.ui.plugin.call( this, type, [ event, ui, this ], true );
2220
2221
		// Absolute position and offset (see #6884 ) have to be recalculated after plugins
2222
		if ( /^(drag|start|stop)/.test( type ) ) {
2223
			this.positionAbs = this._convertPositionTo( "absolute" );
2224
			ui.offset = this.positionAbs;
2225
		}
2226
		return $.Widget.prototype._trigger.call( this, type, event, ui );
2227
	},
2228
2229
	plugins: {},
2230
2231
	_uiHash: function() {
2232
		return {
2233
			helper: this.helper,
2234
			position: this.position,
2235
			originalPosition: this.originalPosition,
2236
			offset: this.positionAbs
2237
		};
2238
	}
2239
2240
});
2241
2242
$.ui.plugin.add( "draggable", "connectToSortable", {
2243
	start: function( event, ui, draggable ) {
2244
		var uiSortable = $.extend( {}, ui, {
2245
			item: draggable.element
2246
		});
2247
2248
		draggable.sortables = [];
2249
		$( draggable.options.connectToSortable ).each(function() {
2250
			var sortable = $( this ).sortable( "instance" );
2251
2252
			if ( sortable && !sortable.options.disabled ) {
2253
				draggable.sortables.push( sortable );
2254
2255
				// refreshPositions is called at drag start to refresh the containerCache
2256
				// which is used in drag. This ensures it's initialized and synchronized
2257
				// with any changes that might have happened on the page since initialization.
2258
				sortable.refreshPositions();
2259
				sortable._trigger("activate", event, uiSortable);
2260
			}
2261
		});
2262
	},
2263
	stop: function( event, ui, draggable ) {
2264
		var uiSortable = $.extend( {}, ui, {
2265
			item: draggable.element
2266
		});
2267
2268
		draggable.cancelHelperRemoval = false;
2269
2270
		$.each( draggable.sortables, function() {
2271
			var sortable = this;
2272
2273
			if ( sortable.isOver ) {
2274
				sortable.isOver = 0;
2275
2276
				// Allow this sortable to handle removing the helper
2277
				draggable.cancelHelperRemoval = true;
2278
				sortable.cancelHelperRemoval = false;
2279
2280
				// Use _storedCSS To restore properties in the sortable,
2281
				// as this also handles revert (#9675) since the draggable
2282
				// may have modified them in unexpected ways (#8809)
2283
				sortable._storedCSS = {
2284
					position: sortable.placeholder.css( "position" ),
2285
					top: sortable.placeholder.css( "top" ),
2286
					left: sortable.placeholder.css( "left" )
2287
				};
2288
2289
				sortable._mouseStop(event);
2290
2291
				// Once drag has ended, the sortable should return to using
2292
				// its original helper, not the shared helper from draggable
2293
				sortable.options.helper = sortable.options._helper;
2294
			} else {
2295
				// Prevent this Sortable from removing the helper.
2296
				// However, don't set the draggable to remove the helper
2297
				// either as another connected Sortable may yet handle the removal.
2298
				sortable.cancelHelperRemoval = true;
2299
2300
				sortable._trigger( "deactivate", event, uiSortable );
2301
			}
2302
		});
2303
	},
2304
	drag: function( event, ui, draggable ) {
2305
		$.each( draggable.sortables, function() {
2306
			var innermostIntersecting = false,
2307
				sortable = this;
2308
2309
			// Copy over variables that sortable's _intersectsWith uses
2310
			sortable.positionAbs = draggable.positionAbs;
2311
			sortable.helperProportions = draggable.helperProportions;
2312
			sortable.offset.click = draggable.offset.click;
2313
2314
			if ( sortable._intersectsWith( sortable.containerCache ) ) {
2315
				innermostIntersecting = true;
2316
2317
				$.each( draggable.sortables, function() {
2318
					// Copy over variables that sortable's _intersectsWith uses
2319
					this.positionAbs = draggable.positionAbs;
2320
					this.helperProportions = draggable.helperProportions;
2321
					this.offset.click = draggable.offset.click;
2322
2323
					if ( this !== sortable &&
2324
							this._intersectsWith( this.containerCache ) &&
2325
							$.contains( sortable.element[ 0 ], this.element[ 0 ] ) ) {
2326
						innermostIntersecting = false;
2327
					}
2328
2329
					return innermostIntersecting;
2330
				});
2331
			}
2332
2333
			if ( innermostIntersecting ) {
2334
				// If it intersects, we use a little isOver variable and set it once,
2335
				// so that the move-in stuff gets fired only once.
2336
				if ( !sortable.isOver ) {
2337
					sortable.isOver = 1;
2338
2339
					// Store draggable's parent in case we need to reappend to it later.
2340
					draggable._parent = ui.helper.parent();
2341
2342
					sortable.currentItem = ui.helper
2343
						.appendTo( sortable.element )
2344
						.data( "ui-sortable-item", true );
2345
2346
					// Store helper option to later restore it
2347
					sortable.options._helper = sortable.options.helper;
2348
2349
					sortable.options.helper = function() {
2350
						return ui.helper[ 0 ];
2351
					};
2352
2353
					// Fire the start events of the sortable with our passed browser event,
2354
					// and our own helper (so it doesn't create a new one)
2355
					event.target = sortable.currentItem[ 0 ];
2356
					sortable._mouseCapture( event, true );
2357
					sortable._mouseStart( event, true, true );
2358
2359
					// Because the browser event is way off the new appended portlet,
2360
					// modify necessary variables to reflect the changes
2361
					sortable.offset.click.top = draggable.offset.click.top;
2362
					sortable.offset.click.left = draggable.offset.click.left;
2363
					sortable.offset.parent.left -= draggable.offset.parent.left -
2364
						sortable.offset.parent.left;
2365
					sortable.offset.parent.top -= draggable.offset.parent.top -
2366
						sortable.offset.parent.top;
2367
2368
					draggable._trigger( "toSortable", event );
2369
2370
					// Inform draggable that the helper is in a valid drop zone,
2371
					// used solely in the revert option to handle "valid/invalid".
2372
					draggable.dropped = sortable.element;
2373
2374
					// Need to refreshPositions of all sortables in the case that
2375
					// adding to one sortable changes the location of the other sortables (#9675)
2376
					$.each( draggable.sortables, function() {
2377
						this.refreshPositions();
2378
					});
2379
2380
					// hack so receive/update callbacks work (mostly)
2381
					draggable.currentItem = draggable.element;
2382
					sortable.fromOutside = draggable;
2383
				}
2384
2385
				if ( sortable.currentItem ) {
2386
					sortable._mouseDrag( event );
2387
					// Copy the sortable's position because the draggable's can potentially reflect
2388
					// a relative position, while sortable is always absolute, which the dragged
2389
					// element has now become. (#8809)
2390
					ui.position = sortable.position;
2391
				}
2392
			} else {
2393
				// If it doesn't intersect with the sortable, and it intersected before,
2394
				// we fake the drag stop of the sortable, but make sure it doesn't remove
2395
				// the helper by using cancelHelperRemoval.
2396
				if ( sortable.isOver ) {
2397
2398
					sortable.isOver = 0;
2399
					sortable.cancelHelperRemoval = true;
2400
2401
					// Calling sortable's mouseStop would trigger a revert,
2402
					// so revert must be temporarily false until after mouseStop is called.
2403
					sortable.options._revert = sortable.options.revert;
2404
					sortable.options.revert = false;
2405
2406
					sortable._trigger( "out", event, sortable._uiHash( sortable ) );
2407
					sortable._mouseStop( event, true );
2408
2409
					// restore sortable behaviors that were modfied
2410
					// when the draggable entered the sortable area (#9481)
2411
					sortable.options.revert = sortable.options._revert;
2412
					sortable.options.helper = sortable.options._helper;
2413
2414
					if ( sortable.placeholder ) {
2415
						sortable.placeholder.remove();
2416
					}
2417
2418
					// Restore and recalculate the draggable's offset considering the sortable
2419
					// may have modified them in unexpected ways. (#8809, #10669)
2420
					ui.helper.appendTo( draggable._parent );
2421
					draggable._refreshOffsets( event );
2422
					ui.position = draggable._generatePosition( event, true );
2423
2424
					draggable._trigger( "fromSortable", event );
2425
2426
					// Inform draggable that the helper is no longer in a valid drop zone
2427
					draggable.dropped = false;
2428
2429
					// Need to refreshPositions of all sortables just in case removing
2430
					// from one sortable changes the location of other sortables (#9675)
2431
					$.each( draggable.sortables, function() {
2432
						this.refreshPositions();
2433
					});
2434
				}
2435
			}
2436
		});
2437
	}
2438
});
2439
2440
$.ui.plugin.add("draggable", "cursor", {
2441
	start: function( event, ui, instance ) {
2442
		var t = $( "body" ),
2443
			o = instance.options;
2444
2445
		if (t.css("cursor")) {
2446
			o._cursor = t.css("cursor");
2447
		}
2448
		t.css("cursor", o.cursor);
2449
	},
2450
	stop: function( event, ui, instance ) {
2451
		var o = instance.options;
2452
		if (o._cursor) {
2453
			$("body").css("cursor", o._cursor);
2454
		}
2455
	}
2456
});
2457
2458
$.ui.plugin.add("draggable", "opacity", {
2459
	start: function( event, ui, instance ) {
2460
		var t = $( ui.helper ),
2461
			o = instance.options;
2462
		if (t.css("opacity")) {
2463
			o._opacity = t.css("opacity");
2464
		}
2465
		t.css("opacity", o.opacity);
2466
	},
2467
	stop: function( event, ui, instance ) {
2468
		var o = instance.options;
2469
		if (o._opacity) {
2470
			$(ui.helper).css("opacity", o._opacity);
2471
		}
2472
	}
2473
});
2474
2475
$.ui.plugin.add("draggable", "scroll", {
2476
	start: function( event, ui, i ) {
2477
		if ( !i.scrollParentNotHidden ) {
2478
			i.scrollParentNotHidden = i.helper.scrollParent( false );
2479
		}
2480
2481
		if ( i.scrollParentNotHidden[ 0 ] !== i.document[ 0 ] && i.scrollParentNotHidden[ 0 ].tagName !== "HTML" ) {
2482
			i.overflowOffset = i.scrollParentNotHidden.offset();
2483
		}
2484
	},
2485
	drag: function( event, ui, i  ) {
2486
2487
		var o = i.options,
2488
			scrolled = false,
2489
			scrollParent = i.scrollParentNotHidden[ 0 ],
2490
			document = i.document[ 0 ];
2491
2492
		if ( scrollParent !== document && scrollParent.tagName !== "HTML" ) {
2493
			if ( !o.axis || o.axis !== "x" ) {
2494
				if ( ( i.overflowOffset.top + scrollParent.offsetHeight ) - event.pageY < o.scrollSensitivity ) {
2495
					scrollParent.scrollTop = scrolled = scrollParent.scrollTop + o.scrollSpeed;
2496
				} else if ( event.pageY - i.overflowOffset.top < o.scrollSensitivity ) {
2497
					scrollParent.scrollTop = scrolled = scrollParent.scrollTop - o.scrollSpeed;
2498
				}
2499
			}
2500
2501
			if ( !o.axis || o.axis !== "y" ) {
2502
				if ( ( i.overflowOffset.left + scrollParent.offsetWidth ) - event.pageX < o.scrollSensitivity ) {
2503
					scrollParent.scrollLeft = scrolled = scrollParent.scrollLeft + o.scrollSpeed;
2504
				} else if ( event.pageX - i.overflowOffset.left < o.scrollSensitivity ) {
2505
					scrollParent.scrollLeft = scrolled = scrollParent.scrollLeft - o.scrollSpeed;
2506
				}
2507
			}
2508
2509
		} else {
2510
2511
			if (!o.axis || o.axis !== "x") {
2512
				if (event.pageY - $(document).scrollTop() < o.scrollSensitivity) {
2513
					scrolled = $(document).scrollTop($(document).scrollTop() - o.scrollSpeed);
2514
				} else if ($(window).height() - (event.pageY - $(document).scrollTop()) < o.scrollSensitivity) {
2515
					scrolled = $(document).scrollTop($(document).scrollTop() + o.scrollSpeed);
2516
				}
2517
			}
2518
2519
			if (!o.axis || o.axis !== "y") {
2520
				if (event.pageX - $(document).scrollLeft() < o.scrollSensitivity) {
2521
					scrolled = $(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed);
2522
				} else if ($(window).width() - (event.pageX - $(document).scrollLeft()) < o.scrollSensitivity) {
2523
					scrolled = $(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed);
2524
				}
2525
			}
2526
2527
		}
2528
2529
		if (scrolled !== false && $.ui.ddmanager && !o.dropBehaviour) {
2530
			$.ui.ddmanager.prepareOffsets(i, event);
2531
		}
2532
2533
	}
2534
});
2535
2536
$.ui.plugin.add("draggable", "snap", {
2537
	start: function( event, ui, i ) {
2538
2539
		var o = i.options;
2540
2541
		i.snapElements = [];
2542
2543
		$(o.snap.constructor !== String ? ( o.snap.items || ":data(ui-draggable)" ) : o.snap).each(function() {
2544
			var $t = $(this),
2545
				$o = $t.offset();
2546
			if (this !== i.element[0]) {
2547
				i.snapElements.push({
2548
					item: this,
2549
					width: $t.outerWidth(), height: $t.outerHeight(),
2550
					top: $o.top, left: $o.left
2551
				});
2552
			}
2553
		});
2554
2555
	},
2556
	drag: function( event, ui, inst ) {
2557
2558
		var ts, bs, ls, rs, l, r, t, b, i, first,
2559
			o = inst.options,
2560
			d = o.snapTolerance,
2561
			x1 = ui.offset.left, x2 = x1 + inst.helperProportions.width,
2562
			y1 = ui.offset.top, y2 = y1 + inst.helperProportions.height;
2563
2564
		for (i = inst.snapElements.length - 1; i >= 0; i--){
2565
2566
			l = inst.snapElements[i].left - inst.margins.left;
2567
			r = l + inst.snapElements[i].width;
2568
			t = inst.snapElements[i].top - inst.margins.top;
2569
			b = t + inst.snapElements[i].height;
2570
2571
			if ( x2 < l - d || x1 > r + d || y2 < t - d || y1 > b + d || !$.contains( inst.snapElements[ i ].item.ownerDocument, inst.snapElements[ i ].item ) ) {
2572
				if (inst.snapElements[i].snapping) {
2573
					(inst.options.snap.release && inst.options.snap.release.call(inst.element, event, $.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item })));
2574
				}
2575
				inst.snapElements[i].snapping = false;
2576
				continue;
2577
			}
2578
2579
			if (o.snapMode !== "inner") {
2580
				ts = Math.abs(t - y2) <= d;
2581
				bs = Math.abs(b - y1) <= d;
2582
				ls = Math.abs(l - x2) <= d;
2583
				rs = Math.abs(r - x1) <= d;
2584
				if (ts) {
2585
					ui.position.top = inst._convertPositionTo("relative", { top: t - inst.helperProportions.height, left: 0 }).top;
2586
				}
2587
				if (bs) {
2588
					ui.position.top = inst._convertPositionTo("relative", { top: b, left: 0 }).top;
2589
				}
2590
				if (ls) {
2591
					ui.position.left = inst._convertPositionTo("relative", { top: 0, left: l - inst.helperProportions.width }).left;
2592
				}
2593
				if (rs) {
2594
					ui.position.left = inst._convertPositionTo("relative", { top: 0, left: r }).left;
2595
				}
2596
			}
2597
2598
			first = (ts || bs || ls || rs);
2599
2600
			if (o.snapMode !== "outer") {
2601
				ts = Math.abs(t - y1) <= d;
2602
				bs = Math.abs(b - y2) <= d;
2603
				ls = Math.abs(l - x1) <= d;
2604
				rs = Math.abs(r - x2) <= d;
2605
				if (ts) {
2606
					ui.position.top = inst._convertPositionTo("relative", { top: t, left: 0 }).top;
2607
				}
2608
				if (bs) {
2609
					ui.position.top = inst._convertPositionTo("relative", { top: b - inst.helperProportions.height, left: 0 }).top;
2610
				}
2611
				if (ls) {
2612
					ui.position.left = inst._convertPositionTo("relative", { top: 0, left: l }).left;
2613
				}
2614
				if (rs) {
2615
					ui.position.left = inst._convertPositionTo("relative", { top: 0, left: r - inst.helperProportions.width }).left;
2616
				}
2617
			}
2618
2619
			if (!inst.snapElements[i].snapping && (ts || bs || ls || rs || first)) {
2620
				(inst.options.snap.snap && inst.options.snap.snap.call(inst.element, event, $.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item })));
2621
			}
2622
			inst.snapElements[i].snapping = (ts || bs || ls || rs || first);
2623
2624
		}
2625
2626
	}
2627
});
2628
2629
$.ui.plugin.add("draggable", "stack", {
2630
	start: function( event, ui, instance ) {
2631
		var min,
2632
			o = instance.options,
2633
			group = $.makeArray($(o.stack)).sort(function(a, b) {
2634
				return (parseInt($(a).css("zIndex"), 10) || 0) - (parseInt($(b).css("zIndex"), 10) || 0);
2635
			});
2636
2637
		if (!group.length) { return; }
2638
2639
		min = parseInt($(group[0]).css("zIndex"), 10) || 0;
2640
		$(group).each(function(i) {
2641
			$(this).css("zIndex", min + i);
2642
		});
2643
		this.css("zIndex", (min + group.length));
2644
	}
2645
});
2646
2647
$.ui.plugin.add("draggable", "zIndex", {
2648
	start: function( event, ui, instance ) {
2649
		var t = $( ui.helper ),
2650
			o = instance.options;
2651
2652
		if (t.css("zIndex")) {
2653
			o._zIndex = t.css("zIndex");
2654
		}
2655
		t.css("zIndex", o.zIndex);
2656
	},
2657
	stop: function( event, ui, instance ) {
2658
		var o = instance.options;
2659
2660
		if (o._zIndex) {
2661
			$(ui.helper).css("zIndex", o._zIndex);
2662
		}
2663
	}
2664
});
2665
2666
var draggable = $.ui.draggable;
2667
2668
2669
/*!
2670
 * jQuery UI Droppable 1.11.4
2671
 * http://jqueryui.com
2672
 *
2673
 * Copyright jQuery Foundation and other contributors
2674
 * Released under the MIT license.
2675
 * http://jquery.org/license
2676
 *
2677
 * http://api.jqueryui.com/droppable/
2678
 */
2679
2680
2681
$.widget( "ui.droppable", {
2682
	version: "1.11.4",
2683
	widgetEventPrefix: "drop",
2684
	options: {
2685
		accept: "*",
2686
		activeClass: false,
2687
		addClasses: true,
2688
		greedy: false,
2689
		hoverClass: false,
2690
		scope: "default",
2691
		tolerance: "intersect",
2692
2693
		// callbacks
2694
		activate: null,
2695
		deactivate: null,
2696
		drop: null,
2697
		out: null,
2698
		over: null
2699
	},
2700
	_create: function() {
2701
2702
		var proportions,
2703
			o = this.options,
2704
			accept = o.accept;
2705
2706
		this.isover = false;
2707
		this.isout = true;
2708
2709
		this.accept = $.isFunction( accept ) ? accept : function( d ) {
2710
			return d.is( accept );
2711
		};
2712
2713
		this.proportions = function( /* valueToWrite */ ) {
2714
			if ( arguments.length ) {
2715
				// Store the droppable's proportions
2716
				proportions = arguments[ 0 ];
2717
			} else {
2718
				// Retrieve or derive the droppable's proportions
2719
				return proportions ?
2720
					proportions :
2721
					proportions = {
2722
						width: this.element[ 0 ].offsetWidth,
2723
						height: this.element[ 0 ].offsetHeight
2724
					};
2725
			}
2726
		};
2727
2728
		this._addToManager( o.scope );
2729
2730
		o.addClasses && this.element.addClass( "ui-droppable" );
2731
2732
	},
2733
2734
	_addToManager: function( scope ) {
2735
		// Add the reference and positions to the manager
2736
		$.ui.ddmanager.droppables[ scope ] = $.ui.ddmanager.droppables[ scope ] || [];
2737
		$.ui.ddmanager.droppables[ scope ].push( this );
2738
	},
2739
2740
	_splice: function( drop ) {
2741
		var i = 0;
2742
		for ( ; i < drop.length; i++ ) {
2743
			if ( drop[ i ] === this ) {
2744
				drop.splice( i, 1 );
2745
			}
2746
		}
2747
	},
2748
2749
	_destroy: function() {
2750
		var drop = $.ui.ddmanager.droppables[ this.options.scope ];
2751
2752
		this._splice( drop );
2753
2754
		this.element.removeClass( "ui-droppable ui-droppable-disabled" );
2755
	},
2756
2757
	_setOption: function( key, value ) {
2758
2759
		if ( key === "accept" ) {
2760
			this.accept = $.isFunction( value ) ? value : function( d ) {
2761
				return d.is( value );
2762
			};
2763
		} else if ( key === "scope" ) {
2764
			var drop = $.ui.ddmanager.droppables[ this.options.scope ];
2765
2766
			this._splice( drop );
2767
			this._addToManager( value );
2768
		}
2769
2770
		this._super( key, value );
2771
	},
2772
2773
	_activate: function( event ) {
2774
		var draggable = $.ui.ddmanager.current;
2775
		if ( this.options.activeClass ) {
2776
			this.element.addClass( this.options.activeClass );
2777
		}
2778
		if ( draggable ){
2779
			this._trigger( "activate", event, this.ui( draggable ) );
2780
		}
2781
	},
2782
2783
	_deactivate: function( event ) {
2784
		var draggable = $.ui.ddmanager.current;
2785
		if ( this.options.activeClass ) {
2786
			this.element.removeClass( this.options.activeClass );
2787
		}
2788
		if ( draggable ){
2789
			this._trigger( "deactivate", event, this.ui( draggable ) );
2790
		}
2791
	},
2792
2793
	_over: function( event ) {
2794
2795
		var draggable = $.ui.ddmanager.current;
2796
2797
		// Bail if draggable and droppable are same element
2798
		if ( !draggable || ( draggable.currentItem || draggable.element )[ 0 ] === this.element[ 0 ] ) {
2799
			return;
2800
		}
2801
2802
		if ( this.accept.call( this.element[ 0 ], ( draggable.currentItem || draggable.element ) ) ) {
2803
			if ( this.options.hoverClass ) {
2804
				this.element.addClass( this.options.hoverClass );
2805
			}
2806
			this._trigger( "over", event, this.ui( draggable ) );
2807
		}
2808
2809
	},
2810
2811
	_out: function( event ) {
2812
2813
		var draggable = $.ui.ddmanager.current;
2814
2815
		// Bail if draggable and droppable are same element
2816
		if ( !draggable || ( draggable.currentItem || draggable.element )[ 0 ] === this.element[ 0 ] ) {
2817
			return;
2818
		}
2819
2820
		if ( this.accept.call( this.element[ 0 ], ( draggable.currentItem || draggable.element ) ) ) {
2821
			if ( this.options.hoverClass ) {
2822
				this.element.removeClass( this.options.hoverClass );
2823
			}
2824
			this._trigger( "out", event, this.ui( draggable ) );
2825
		}
2826
2827
	},
2828
2829
	_drop: function( event, custom ) {
2830
2831
		var draggable = custom || $.ui.ddmanager.current,
2832
			childrenIntersection = false;
2833
2834
		// Bail if draggable and droppable are same element
2835
		if ( !draggable || ( draggable.currentItem || draggable.element )[ 0 ] === this.element[ 0 ] ) {
2836
			return false;
2837
		}
2838
2839
		this.element.find( ":data(ui-droppable)" ).not( ".ui-draggable-dragging" ).each(function() {
2840
			var inst = $( this ).droppable( "instance" );
2841
			if (
2842
				inst.options.greedy &&
2843
				!inst.options.disabled &&
2844
				inst.options.scope === draggable.options.scope &&
2845
				inst.accept.call( inst.element[ 0 ], ( draggable.currentItem || draggable.element ) ) &&
2846
				$.ui.intersect( draggable, $.extend( inst, { offset: inst.element.offset() } ), inst.options.tolerance, event )
2847
			) { childrenIntersection = true; return false; }
2848
		});
2849
		if ( childrenIntersection ) {
2850
			return false;
2851
		}
2852
2853
		if ( this.accept.call( this.element[ 0 ], ( draggable.currentItem || draggable.element ) ) ) {
2854
			if ( this.options.activeClass ) {
2855
				this.element.removeClass( this.options.activeClass );
2856
			}
2857
			if ( this.options.hoverClass ) {
2858
				this.element.removeClass( this.options.hoverClass );
2859
			}
2860
			this._trigger( "drop", event, this.ui( draggable ) );
2861
			return this.element;
2862
		}
2863
2864
		return false;
2865
2866
	},
2867
2868
	ui: function( c ) {
2869
		return {
2870
			draggable: ( c.currentItem || c.element ),
2871
			helper: c.helper,
2872
			position: c.position,
2873
			offset: c.positionAbs
2874
		};
2875
	}
2876
2877
});
2878
2879
$.ui.intersect = (function() {
2880
	function isOverAxis( x, reference, size ) {
2881
		return ( x >= reference ) && ( x < ( reference + size ) );
2882
	}
2883
2884
	return function( draggable, droppable, toleranceMode, event ) {
2885
2886
		if ( !droppable.offset ) {
2887
			return false;
2888
		}
2889
2890
		var x1 = ( draggable.positionAbs || draggable.position.absolute ).left + draggable.margins.left,
2891
			y1 = ( draggable.positionAbs || draggable.position.absolute ).top + draggable.margins.top,
2892
			x2 = x1 + draggable.helperProportions.width,
2893
			y2 = y1 + draggable.helperProportions.height,
2894
			l = droppable.offset.left,
2895
			t = droppable.offset.top,
2896
			r = l + droppable.proportions().width,
2897
			b = t + droppable.proportions().height;
2898
2899
		switch ( toleranceMode ) {
2900
		case "fit":
2901
			return ( l <= x1 && x2 <= r && t <= y1 && y2 <= b );
2902
		case "intersect":
2903
			return ( l < x1 + ( draggable.helperProportions.width / 2 ) && // Right Half
2904
				x2 - ( draggable.helperProportions.width / 2 ) < r && // Left Half
2905
				t < y1 + ( draggable.helperProportions.height / 2 ) && // Bottom Half
2906
				y2 - ( draggable.helperProportions.height / 2 ) < b ); // Top Half
2907
		case "pointer":
2908
			return isOverAxis( event.pageY, t, droppable.proportions().height ) && isOverAxis( event.pageX, l, droppable.proportions().width );
2909
		case "touch":
2910
			return (
2911
				( y1 >= t && y1 <= b ) || // Top edge touching
2912
				( y2 >= t && y2 <= b ) || // Bottom edge touching
2913
				( y1 < t && y2 > b ) // Surrounded vertically
2914
			) && (
2915
				( x1 >= l && x1 <= r ) || // Left edge touching
2916
				( x2 >= l && x2 <= r ) || // Right edge touching
2917
				( x1 < l && x2 > r ) // Surrounded horizontally
2918
			);
2919
		default:
2920
			return false;
2921
		}
2922
	};
2923
})();
2924
2925
/*
2926
	This manager tracks offsets of draggables and droppables
2927
*/
2928
$.ui.ddmanager = {
2929
	current: null,
2930
	droppables: { "default": [] },
2931
	prepareOffsets: function( t, event ) {
2932
2933
		var i, j,
2934
			m = $.ui.ddmanager.droppables[ t.options.scope ] || [],
2935
			type = event ? event.type : null, // workaround for #2317
2936
			list = ( t.currentItem || t.element ).find( ":data(ui-droppable)" ).addBack();
2937
2938
		droppablesLoop: for ( i = 0; i < m.length; i++ ) {
2939
2940
			// No disabled and non-accepted
2941
			if ( m[ i ].options.disabled || ( t && !m[ i ].accept.call( m[ i ].element[ 0 ], ( t.currentItem || t.element ) ) ) ) {
2942
				continue;
2943
			}
2944
2945
			// Filter out elements in the current dragged item
2946
			for ( j = 0; j < list.length; j++ ) {
2947
				if ( list[ j ] === m[ i ].element[ 0 ] ) {
2948
					m[ i ].proportions().height = 0;
2949
					continue droppablesLoop;
2950
				}
2951
			}
2952
2953
			m[ i ].visible = m[ i ].element.css( "display" ) !== "none";
2954
			if ( !m[ i ].visible ) {
2955
				continue;
2956
			}
2957
2958
			// Activate the droppable if used directly from draggables
2959
			if ( type === "mousedown" ) {
2960
				m[ i ]._activate.call( m[ i ], event );
2961
			}
2962
2963
			m[ i ].offset = m[ i ].element.offset();
2964
			m[ i ].proportions({ width: m[ i ].element[ 0 ].offsetWidth, height: m[ i ].element[ 0 ].offsetHeight });
2965
2966
		}
2967
2968
	},
2969
	drop: function( draggable, event ) {
2970
2971
		var dropped = false;
2972
		// Create a copy of the droppables in case the list changes during the drop (#9116)
2973
		$.each( ( $.ui.ddmanager.droppables[ draggable.options.scope ] || [] ).slice(), function() {
2974
2975
			if ( !this.options ) {
2976
				return;
2977
			}
2978
			if ( !this.options.disabled && this.visible && $.ui.intersect( draggable, this, this.options.tolerance, event ) ) {
2979
				dropped = this._drop.call( this, event ) || dropped;
2980
			}
2981
2982
			if ( !this.options.disabled && this.visible && this.accept.call( this.element[ 0 ], ( draggable.currentItem || draggable.element ) ) ) {
2983
				this.isout = true;
2984
				this.isover = false;
2985
				this._deactivate.call( this, event );
2986
			}
2987
2988
		});
2989
		return dropped;
2990
2991
	},
2992
	dragStart: function( draggable, event ) {
2993
		// Listen for scrolling so that if the dragging causes scrolling the position of the droppables can be recalculated (see #5003)
2994
		draggable.element.parentsUntil( "body" ).bind( "scroll.droppable", function() {
2995
			if ( !draggable.options.refreshPositions ) {
2996
				$.ui.ddmanager.prepareOffsets( draggable, event );
2997
			}
2998
		});
2999
	},
3000
	drag: function( draggable, event ) {
3001
3002
		// If you have a highly dynamic page, you might try this option. It renders positions every time you move the mouse.
3003
		if ( draggable.options.refreshPositions ) {
3004
			$.ui.ddmanager.prepareOffsets( draggable, event );
3005
		}
3006
3007
		// Run through all droppables and check their positions based on specific tolerance options
3008
		$.each( $.ui.ddmanager.droppables[ draggable.options.scope ] || [], function() {
3009
3010
			if ( this.options.disabled || this.greedyChild || !this.visible ) {
3011
				return;
3012
			}
3013
3014
			var parentInstance, scope, parent,
3015
				intersects = $.ui.intersect( draggable, this, this.options.tolerance, event ),
3016
				c = !intersects && this.isover ? "isout" : ( intersects && !this.isover ? "isover" : null );
3017
			if ( !c ) {
3018
				return;
3019
			}
3020
3021
			if ( this.options.greedy ) {
3022
				// find droppable parents with same scope
3023
				scope = this.options.scope;
3024
				parent = this.element.parents( ":data(ui-droppable)" ).filter(function() {
3025
					return $( this ).droppable( "instance" ).options.scope === scope;
3026
				});
3027
3028
				if ( parent.length ) {
3029
					parentInstance = $( parent[ 0 ] ).droppable( "instance" );
3030
					parentInstance.greedyChild = ( c === "isover" );
3031
				}
3032
			}
3033
3034
			// we just moved into a greedy child
3035
			if ( parentInstance && c === "isover" ) {
3036
				parentInstance.isover = false;
3037
				parentInstance.isout = true;
3038
				parentInstance._out.call( parentInstance, event );
3039
			}
3040
3041
			this[ c ] = true;
3042
			this[c === "isout" ? "isover" : "isout"] = false;
3043
			this[c === "isover" ? "_over" : "_out"].call( this, event );
3044
3045
			// we just moved out of a greedy child
3046
			if ( parentInstance && c === "isout" ) {
3047
				parentInstance.isout = false;
3048
				parentInstance.isover = true;
3049
				parentInstance._over.call( parentInstance, event );
3050
			}
3051
		});
3052
3053
	},
3054
	dragStop: function( draggable, event ) {
3055
		draggable.element.parentsUntil( "body" ).unbind( "scroll.droppable" );
3056
		// Call prepareOffsets one final time since IE does not fire return scroll events when overflow was caused by drag (see #5003)
3057
		if ( !draggable.options.refreshPositions ) {
3058
			$.ui.ddmanager.prepareOffsets( draggable, event );
3059
		}
3060
	}
3061
};
3062
3063
var droppable = $.ui.droppable;
3064
3065
3066
/*!
3067
 * jQuery UI Sortable 1.11.4
3068
 * http://jqueryui.com
3069
 *
3070
 * Copyright jQuery Foundation and other contributors
3071
 * Released under the MIT license.
3072
 * http://jquery.org/license
3073
 *
3074
 * http://api.jqueryui.com/sortable/
3075
 */
3076
3077
3078
var sortable = $.widget("ui.sortable", $.ui.mouse, {
3079
	version: "1.11.4",
3080
	widgetEventPrefix: "sort",
3081
	ready: false,
3082
	options: {
3083
		appendTo: "parent",
3084
		axis: false,
3085
		connectWith: false,
3086
		containment: false,
3087
		cursor: "auto",
3088
		cursorAt: false,
3089
		dropOnEmpty: true,
3090
		forcePlaceholderSize: false,
3091
		forceHelperSize: false,
3092
		grid: false,
3093
		handle: false,
3094
		helper: "original",
3095
		items: "> *",
3096
		opacity: false,
3097
		placeholder: false,
3098
		revert: false,
3099
		scroll: true,
3100
		scrollSensitivity: 20,
3101
		scrollSpeed: 20,
3102
		scope: "default",
3103
		tolerance: "intersect",
3104
		zIndex: 1000,
3105
3106
		// callbacks
3107
		activate: null,
3108
		beforeStop: null,
3109
		change: null,
3110
		deactivate: null,
3111
		out: null,
3112
		over: null,
3113
		receive: null,
3114
		remove: null,
3115
		sort: null,
3116
		start: null,
3117
		stop: null,
3118
		update: null
3119
	},
3120
3121
	_isOverAxis: function( x, reference, size ) {
3122
		return ( x >= reference ) && ( x < ( reference + size ) );
3123
	},
3124
3125
	_isFloating: function( item ) {
3126
		return (/left|right/).test(item.css("float")) || (/inline|table-cell/).test(item.css("display"));
3127
	},
3128
3129
	_create: function() {
3130
		this.containerCache = {};
3131
		this.element.addClass("ui-sortable");
3132
3133
		//Get the items
3134
		this.refresh();
3135
3136
		//Let's determine the parent's offset
3137
		this.offset = this.element.offset();
3138
3139
		//Initialize mouse events for interaction
3140
		this._mouseInit();
3141
3142
		this._setHandleClassName();
3143
3144
		//We're ready to go
3145
		this.ready = true;
3146
3147
	},
3148
3149
	_setOption: function( key, value ) {
3150
		this._super( key, value );
3151
3152
		if ( key === "handle" ) {
3153
			this._setHandleClassName();
3154
		}
3155
	},
3156
3157
	_setHandleClassName: function() {
3158
		this.element.find( ".ui-sortable-handle" ).removeClass( "ui-sortable-handle" );
3159
		$.each( this.items, function() {
3160
			( this.instance.options.handle ?
3161
				this.item.find( this.instance.options.handle ) : this.item )
3162
				.addClass( "ui-sortable-handle" );
3163
		});
3164
	},
3165
3166
	_destroy: function() {
3167
		this.element
3168
			.removeClass( "ui-sortable ui-sortable-disabled" )
3169
			.find( ".ui-sortable-handle" )
3170
				.removeClass( "ui-sortable-handle" );
3171
		this._mouseDestroy();
3172
3173
		for ( var i = this.items.length - 1; i >= 0; i-- ) {
3174
			this.items[i].item.removeData(this.widgetName + "-item");
3175
		}
3176
3177
		return this;
3178
	},
3179
3180
	_mouseCapture: function(event, overrideHandle) {
3181
		var currentItem = null,
3182
			validHandle = false,
3183
			that = this;
3184
3185
		if (this.reverting) {
3186
			return false;
3187
		}
3188
3189
		if(this.options.disabled || this.options.type === "static") {
3190
			return false;
3191
		}
3192
3193
		//We have to refresh the items data once first
3194
		this._refreshItems(event);
3195
3196
		//Find out if the clicked node (or one of its parents) is a actual item in this.items
3197
		$(event.target).parents().each(function() {
3198
			if($.data(this, that.widgetName + "-item") === that) {
3199
				currentItem = $(this);
3200
				return false;
3201
			}
3202
		});
3203
		if($.data(event.target, that.widgetName + "-item") === that) {
3204
			currentItem = $(event.target);
3205
		}
3206
3207
		if(!currentItem) {
3208
			return false;
3209
		}
3210
		if(this.options.handle && !overrideHandle) {
3211
			$(this.options.handle, currentItem).find("*").addBack().each(function() {
3212
				if(this === event.target) {
3213
					validHandle = true;
3214
				}
3215
			});
3216
			if(!validHandle) {
3217
				return false;
3218
			}
3219
		}
3220
3221
		this.currentItem = currentItem;
3222
		this._removeCurrentsFromItems();
3223
		return true;
3224
3225
	},
3226
3227
	_mouseStart: function(event, overrideHandle, noActivation) {
3228
3229
		var i, body,
3230
			o = this.options;
3231
3232
		this.currentContainer = this;
3233
3234
		//We only need to call refreshPositions, because the refreshItems call has been moved to mouseCapture
3235
		this.refreshPositions();
3236
3237
		//Create and append the visible helper
3238
		this.helper = this._createHelper(event);
3239
3240
		//Cache the helper size
3241
		this._cacheHelperProportions();
3242
3243
		/*
3244
		 * - Position generation -
3245
		 * This block generates everything position related - it's the core of draggables.
3246
		 */
3247
3248
		//Cache the margins of the original element
3249
		this._cacheMargins();
3250
3251
		//Get the next scrolling parent
3252
		this.scrollParent = this.helper.scrollParent();
3253
3254
		//The element's absolute position on the page minus margins
3255
		this.offset = this.currentItem.offset();
3256
		this.offset = {
3257
			top: this.offset.top - this.margins.top,
3258
			left: this.offset.left - this.margins.left
3259
		};
3260
3261
		$.extend(this.offset, {
3262
			click: { //Where the click happened, relative to the element
3263
				left: event.pageX - this.offset.left,
3264
				top: event.pageY - this.offset.top
3265
			},
3266
			parent: this._getParentOffset(),
3267
			relative: this._getRelativeOffset() //This is a relative to absolute position minus the actual position calculation - only used for relative positioned helper
3268
		});
3269
3270
		// Only after we got the offset, we can change the helper's position to absolute
3271
		// TODO: Still need to figure out a way to make relative sorting possible
3272
		this.helper.css("position", "absolute");
3273
		this.cssPosition = this.helper.css("position");
3274
3275
		//Generate the original position
3276
		this.originalPosition = this._generatePosition(event);
3277
		this.originalPageX = event.pageX;
3278
		this.originalPageY = event.pageY;
3279
3280
		//Adjust the mouse offset relative to the helper if "cursorAt" is supplied
3281
		(o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt));
3282
3283
		//Cache the former DOM position
3284
		this.domPosition = { prev: this.currentItem.prev()[0], parent: this.currentItem.parent()[0] };
3285
3286
		//If the helper is not the original, hide the original so it's not playing any role during the drag, won't cause anything bad this way
3287
		if(this.helper[0] !== this.currentItem[0]) {
3288
			this.currentItem.hide();
3289
		}
3290
3291
		//Create the placeholder
3292
		this._createPlaceholder();
3293
3294
		//Set a containment if given in the options
3295
		if(o.containment) {
3296
			this._setContainment();
3297
		}
3298
3299
		if( o.cursor && o.cursor !== "auto" ) { // cursor option
3300
			body = this.document.find( "body" );
3301
3302
			// support: IE
3303
			this.storedCursor = body.css( "cursor" );
3304
			body.css( "cursor", o.cursor );
3305
3306
			this.storedStylesheet = $( "<style>*{ cursor: "+o.cursor+" !important; }</style>" ).appendTo( body );
3307
		}
3308
3309
		if(o.opacity) { // opacity option
3310
			if (this.helper.css("opacity")) {
3311
				this._storedOpacity = this.helper.css("opacity");
3312
			}
3313
			this.helper.css("opacity", o.opacity);
3314
		}
3315
3316
		if(o.zIndex) { // zIndex option
3317
			if (this.helper.css("zIndex")) {
3318
				this._storedZIndex = this.helper.css("zIndex");
3319
			}
3320
			this.helper.css("zIndex", o.zIndex);
3321
		}
3322
3323
		//Prepare scrolling
3324
		if(this.scrollParent[0] !== this.document[0] && this.scrollParent[0].tagName !== "HTML") {
3325
			this.overflowOffset = this.scrollParent.offset();
3326
		}
3327
3328
		//Call callbacks
3329
		this._trigger("start", event, this._uiHash());
3330
3331
		//Recache the helper size
3332
		if(!this._preserveHelperProportions) {
3333
			this._cacheHelperProportions();
3334
		}
3335
3336
3337
		//Post "activate" events to possible containers
3338
		if( !noActivation ) {
3339
			for ( i = this.containers.length - 1; i >= 0; i-- ) {
3340
				this.containers[ i ]._trigger( "activate", event, this._uiHash( this ) );
3341
			}
3342
		}
3343
3344
		//Prepare possible droppables
3345
		if($.ui.ddmanager) {
3346
			$.ui.ddmanager.current = this;
3347
		}
3348
3349
		if ($.ui.ddmanager && !o.dropBehaviour) {
3350
			$.ui.ddmanager.prepareOffsets(this, event);
3351
		}
3352
3353
		this.dragging = true;
3354
3355
		this.helper.addClass("ui-sortable-helper");
3356
		this._mouseDrag(event); //Execute the drag once - this causes the helper not to be visible before getting its correct position
3357
		return true;
3358
3359
	},
3360
3361
	_mouseDrag: function(event) {
3362
		var i, item, itemElement, intersection,
3363
			o = this.options,
3364
			scrolled = false;
3365
3366
		//Compute the helpers position
3367
		this.position = this._generatePosition(event);
3368
		this.positionAbs = this._convertPositionTo("absolute");
3369
3370
		if (!this.lastPositionAbs) {
3371
			this.lastPositionAbs = this.positionAbs;
3372
		}
3373
3374
		//Do scrolling
3375
		if(this.options.scroll) {
3376
			if(this.scrollParent[0] !== this.document[0] && this.scrollParent[0].tagName !== "HTML") {
3377
3378
				if((this.overflowOffset.top + this.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity) {
3379
					this.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop + o.scrollSpeed;
3380
				} else if(event.pageY - this.overflowOffset.top < o.scrollSensitivity) {
3381
					this.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop - o.scrollSpeed;
3382
				}
3383
3384
				if((this.overflowOffset.left + this.scrollParent[0].offsetWidth) - event.pageX < o.scrollSensitivity) {
3385
					this.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft + o.scrollSpeed;
3386
				} else if(event.pageX - this.overflowOffset.left < o.scrollSensitivity) {
3387
					this.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft - o.scrollSpeed;
3388
				}
3389
3390
			} else {
3391
3392
				if(event.pageY - this.document.scrollTop() < o.scrollSensitivity) {
3393
					scrolled = this.document.scrollTop(this.document.scrollTop() - o.scrollSpeed);
3394
				} else if(this.window.height() - (event.pageY - this.document.scrollTop()) < o.scrollSensitivity) {
3395
					scrolled = this.document.scrollTop(this.document.scrollTop() + o.scrollSpeed);
3396
				}
3397
3398
				if(event.pageX - this.document.scrollLeft() < o.scrollSensitivity) {
3399
					scrolled = this.document.scrollLeft(this.document.scrollLeft() - o.scrollSpeed);
3400
				} else if(this.window.width() - (event.pageX - this.document.scrollLeft()) < o.scrollSensitivity) {
3401
					scrolled = this.document.scrollLeft(this.document.scrollLeft() + o.scrollSpeed);
3402
				}
3403
3404
			}
3405
3406
			if(scrolled !== false && $.ui.ddmanager && !o.dropBehaviour) {
3407
				$.ui.ddmanager.prepareOffsets(this, event);
3408
			}
3409
		}
3410
3411
		//Regenerate the absolute position used for position checks
3412
		this.positionAbs = this._convertPositionTo("absolute");
3413
3414
		//Set the helper position
3415
		if(!this.options.axis || this.options.axis !== "y") {
3416
			this.helper[0].style.left = this.position.left+"px";
3417
		}
3418
		if(!this.options.axis || this.options.axis !== "x") {
3419
			this.helper[0].style.top = this.position.top+"px";
3420
		}
3421
3422
		//Rearrange
3423
		for (i = this.items.length - 1; i >= 0; i--) {
3424
3425
			//Cache variables and intersection, continue if no intersection
3426
			item = this.items[i];
3427
			itemElement = item.item[0];
3428
			intersection = this._intersectsWithPointer(item);
3429
			if (!intersection) {
3430
				continue;
3431
			}
3432
3433
			// Only put the placeholder inside the current Container, skip all
3434
			// items from other containers. This works because when moving
3435
			// an item from one container to another the
3436
			// currentContainer is switched before the placeholder is moved.
3437
			//
3438
			// Without this, moving items in "sub-sortables" can cause
3439
			// the placeholder to jitter between the outer and inner container.
3440
			if (item.instance !== this.currentContainer) {
3441
				continue;
3442
			}
3443
3444
			// cannot intersect with itself
3445
			// no useless actions that have been done before
3446
			// no action if the item moved is the parent of the item checked
3447
			if (itemElement !== this.currentItem[0] &&
3448
				this.placeholder[intersection === 1 ? "next" : "prev"]()[0] !== itemElement &&
3449
				!$.contains(this.placeholder[0], itemElement) &&
3450
				(this.options.type === "semi-dynamic" ? !$.contains(this.element[0], itemElement) : true)
3451
			) {
3452
3453
				this.direction = intersection === 1 ? "down" : "up";
3454
3455
				if (this.options.tolerance === "pointer" || this._intersectsWithSides(item)) {
3456
					this._rearrange(event, item);
3457
				} else {
3458
					break;
3459
				}
3460
3461
				this._trigger("change", event, this._uiHash());
3462
				break;
3463
			}
3464
		}
3465
3466
		//Post events to containers
3467
		this._contactContainers(event);
3468
3469
		//Interconnect with droppables
3470
		if($.ui.ddmanager) {
3471
			$.ui.ddmanager.drag(this, event);
3472
		}
3473
3474
		//Call callbacks
3475
		this._trigger("sort", event, this._uiHash());
3476
3477
		this.lastPositionAbs = this.positionAbs;
3478
		return false;
3479
3480
	},
3481
3482
	_mouseStop: function(event, noPropagation) {
3483
3484
		if(!event) {
3485
			return;
3486
		}
3487
3488
		//If we are using droppables, inform the manager about the drop
3489
		if ($.ui.ddmanager && !this.options.dropBehaviour) {
3490
			$.ui.ddmanager.drop(this, event);
3491
		}
3492
3493
		if(this.options.revert) {
3494
			var that = this,
3495
				cur = this.placeholder.offset(),
3496
				axis = this.options.axis,
3497
				animation = {};
3498
3499
			if ( !axis || axis === "x" ) {
3500
				animation.left = cur.left - this.offset.parent.left - this.margins.left + (this.offsetParent[0] === this.document[0].body ? 0 : this.offsetParent[0].scrollLeft);
3501
			}
3502
			if ( !axis || axis === "y" ) {
3503
				animation.top = cur.top - this.offset.parent.top - this.margins.top + (this.offsetParent[0] === this.document[0].body ? 0 : this.offsetParent[0].scrollTop);
3504
			}
3505
			this.reverting = true;
3506
			$(this.helper).animate( animation, parseInt(this.options.revert, 10) || 500, function() {
3507
				that._clear(event);
3508
			});
3509
		} else {
3510
			this._clear(event, noPropagation);
3511
		}
3512
3513
		return false;
3514
3515
	},
3516
3517
	cancel: function() {
3518
3519
		if(this.dragging) {
3520
3521
			this._mouseUp({ target: null });
3522
3523
			if(this.options.helper === "original") {
3524
				this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper");
3525
			} else {
3526
				this.currentItem.show();
3527
			}
3528
3529
			//Post deactivating events to containers
3530
			for (var i = this.containers.length - 1; i >= 0; i--){
3531
				this.containers[i]._trigger("deactivate", null, this._uiHash(this));
3532
				if(this.containers[i].containerCache.over) {
3533
					this.containers[i]._trigger("out", null, this._uiHash(this));
3534
					this.containers[i].containerCache.over = 0;
3535
				}
3536
			}
3537
3538
		}
3539
3540
		if (this.placeholder) {
3541
			//$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node!
3542
			if(this.placeholder[0].parentNode) {
3543
				this.placeholder[0].parentNode.removeChild(this.placeholder[0]);
3544
			}
3545
			if(this.options.helper !== "original" && this.helper && this.helper[0].parentNode) {
3546
				this.helper.remove();
3547
			}
3548
3549
			$.extend(this, {
3550
				helper: null,
3551
				dragging: false,
3552
				reverting: false,
3553
				_noFinalSort: null
3554
			});
3555
3556
			if(this.domPosition.prev) {
3557
				$(this.domPosition.prev).after(this.currentItem);
3558
			} else {
3559
				$(this.domPosition.parent).prepend(this.currentItem);
3560
			}
3561
		}
3562
3563
		return this;
3564
3565
	},
3566
3567
	serialize: function(o) {
3568
3569
		var items = this._getItemsAsjQuery(o && o.connected),
3570
			str = [];
3571
		o = o || {};
3572
3573
		$(items).each(function() {
3574
			var res = ($(o.item || this).attr(o.attribute || "id") || "").match(o.expression || (/(.+)[\-=_](.+)/));
3575
			if (res) {
3576
				str.push((o.key || res[1]+"[]")+"="+(o.key && o.expression ? res[1] : res[2]));
3577
			}
3578
		});
3579
3580
		if(!str.length && o.key) {
3581
			str.push(o.key + "=");
3582
		}
3583
3584
		return str.join("&");
3585
3586
	},
3587
3588
	toArray: function(o) {
3589
3590
		var items = this._getItemsAsjQuery(o && o.connected),
3591
			ret = [];
3592
3593
		o = o || {};
3594
3595
		items.each(function() { ret.push($(o.item || this).attr(o.attribute || "id") || ""); });
3596
		return ret;
3597
3598
	},
3599
3600
	/* Be careful with the following core functions */
3601
	_intersectsWith: function(item) {
3602
3603
		var x1 = this.positionAbs.left,
3604
			x2 = x1 + this.helperProportions.width,
3605
			y1 = this.positionAbs.top,
3606
			y2 = y1 + this.helperProportions.height,
3607
			l = item.left,
3608
			r = l + item.width,
3609
			t = item.top,
3610
			b = t + item.height,
3611
			dyClick = this.offset.click.top,
3612
			dxClick = this.offset.click.left,
3613
			isOverElementHeight = ( this.options.axis === "x" ) || ( ( y1 + dyClick ) > t && ( y1 + dyClick ) < b ),
3614
			isOverElementWidth = ( this.options.axis === "y" ) || ( ( x1 + dxClick ) > l && ( x1 + dxClick ) < r ),
3615
			isOverElement = isOverElementHeight && isOverElementWidth;
3616
3617
		if ( this.options.tolerance === "pointer" ||
3618
			this.options.forcePointerForContainers ||
3619
			(this.options.tolerance !== "pointer" && this.helperProportions[this.floating ? "width" : "height"] > item[this.floating ? "width" : "height"])
3620
		) {
3621
			return isOverElement;
3622
		} else {
3623
3624
			return (l < x1 + (this.helperProportions.width / 2) && // Right Half
3625
				x2 - (this.helperProportions.width / 2) < r && // Left Half
3626
				t < y1 + (this.helperProportions.height / 2) && // Bottom Half
3627
				y2 - (this.helperProportions.height / 2) < b ); // Top Half
3628
3629
		}
3630
	},
3631
3632
	_intersectsWithPointer: function(item) {
3633
3634
		var isOverElementHeight = (this.options.axis === "x") || this._isOverAxis(this.positionAbs.top + this.offset.click.top, item.top, item.height),
3635
			isOverElementWidth = (this.options.axis === "y") || this._isOverAxis(this.positionAbs.left + this.offset.click.left, item.left, item.width),
3636
			isOverElement = isOverElementHeight && isOverElementWidth,
3637
			verticalDirection = this._getDragVerticalDirection(),
3638
			horizontalDirection = this._getDragHorizontalDirection();
3639
3640
		if (!isOverElement) {
3641
			return false;
3642
		}
3643
3644
		return this.floating ?
3645
			( ((horizontalDirection && horizontalDirection === "right") || verticalDirection === "down") ? 2 : 1 )
3646
			: ( verticalDirection && (verticalDirection === "down" ? 2 : 1) );
3647
3648
	},
3649
3650
	_intersectsWithSides: function(item) {
3651
3652
		var isOverBottomHalf = this._isOverAxis(this.positionAbs.top + this.offset.click.top, item.top + (item.height/2), item.height),
3653
			isOverRightHalf = this._isOverAxis(this.positionAbs.left + this.offset.click.left, item.left + (item.width/2), item.width),
3654
			verticalDirection = this._getDragVerticalDirection(),
3655
			horizontalDirection = this._getDragHorizontalDirection();
3656
3657
		if (this.floating && horizontalDirection) {
3658
			return ((horizontalDirection === "right" && isOverRightHalf) || (horizontalDirection === "left" && !isOverRightHalf));
3659
		} else {
3660
			return verticalDirection && ((verticalDirection === "down" && isOverBottomHalf) || (verticalDirection === "up" && !isOverBottomHalf));
3661
		}
3662
3663
	},
3664
3665
	_getDragVerticalDirection: function() {
3666
		var delta = this.positionAbs.top - this.lastPositionAbs.top;
3667
		return delta !== 0 && (delta > 0 ? "down" : "up");
3668
	},
3669
3670
	_getDragHorizontalDirection: function() {
3671
		var delta = this.positionAbs.left - this.lastPositionAbs.left;
3672
		return delta !== 0 && (delta > 0 ? "right" : "left");
3673
	},
3674
3675
	refresh: function(event) {
3676
		this._refreshItems(event);
3677
		this._setHandleClassName();
3678
		this.refreshPositions();
3679
		return this;
3680
	},
3681
3682
	_connectWith: function() {
3683
		var options = this.options;
3684
		return options.connectWith.constructor === String ? [options.connectWith] : options.connectWith;
3685
	},
3686
3687
	_getItemsAsjQuery: function(connected) {
3688
3689
		var i, j, cur, inst,
3690
			items = [],
3691
			queries = [],
3692
			connectWith = this._connectWith();
3693
3694
		if(connectWith && connected) {
3695
			for (i = connectWith.length - 1; i >= 0; i--){
3696
				cur = $(connectWith[i], this.document[0]);
3697
				for ( j = cur.length - 1; j >= 0; j--){
3698
					inst = $.data(cur[j], this.widgetFullName);
3699
					if(inst && inst !== this && !inst.options.disabled) {
3700
						queries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element) : $(inst.options.items, inst.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), inst]);
3701
					}
3702
				}
3703
			}
3704
		}
3705
3706
		queries.push([$.isFunction(this.options.items) ? this.options.items.call(this.element, null, { options: this.options, item: this.currentItem }) : $(this.options.items, this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), this]);
3707
3708
		function addItems() {
3709
			items.push( this );
3710
		}
3711
		for (i = queries.length - 1; i >= 0; i--){
3712
			queries[i][0].each( addItems );
3713
		}
3714
3715
		return $(items);
3716
3717
	},
3718
3719
	_removeCurrentsFromItems: function() {
3720
3721
		var list = this.currentItem.find(":data(" + this.widgetName + "-item)");
3722
3723
		this.items = $.grep(this.items, function (item) {
3724
			for (var j=0; j < list.length; j++) {
3725
				if(list[j] === item.item[0]) {
3726
					return false;
3727
				}
3728
			}
3729
			return true;
3730
		});
3731
3732
	},
3733
3734
	_refreshItems: function(event) {
3735
3736
		this.items = [];
3737
		this.containers = [this];
3738
3739
		var i, j, cur, inst, targetData, _queries, item, queriesLength,
3740
			items = this.items,
3741
			queries = [[$.isFunction(this.options.items) ? this.options.items.call(this.element[0], event, { item: this.currentItem }) : $(this.options.items, this.element), this]],
3742
			connectWith = this._connectWith();
3743
3744
		if(connectWith && this.ready) { //Shouldn't be run the first time through due to massive slow-down
3745
			for (i = connectWith.length - 1; i >= 0; i--){
3746
				cur = $(connectWith[i], this.document[0]);
3747
				for (j = cur.length - 1; j >= 0; j--){
3748
					inst = $.data(cur[j], this.widgetFullName);
3749
					if(inst && inst !== this && !inst.options.disabled) {
3750
						queries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element[0], event, { item: this.currentItem }) : $(inst.options.items, inst.element), inst]);
3751
						this.containers.push(inst);
3752
					}
3753
				}
3754
			}
3755
		}
3756
3757
		for (i = queries.length - 1; i >= 0; i--) {
3758
			targetData = queries[i][1];
3759
			_queries = queries[i][0];
3760
3761
			for (j=0, queriesLength = _queries.length; j < queriesLength; j++) {
3762
				item = $(_queries[j]);
3763
3764
				item.data(this.widgetName + "-item", targetData); // Data for target checking (mouse manager)
3765
3766
				items.push({
3767
					item: item,
3768
					instance: targetData,
3769
					width: 0, height: 0,
3770
					left: 0, top: 0
3771
				});
3772
			}
3773
		}
3774
3775
	},
3776
3777
	refreshPositions: function(fast) {
3778
3779
		// Determine whether items are being displayed horizontally
3780
		this.floating = this.items.length ?
3781
			this.options.axis === "x" || this._isFloating( this.items[ 0 ].item ) :
3782
			false;
3783
3784
		//This has to be redone because due to the item being moved out/into the offsetParent, the offsetParent's position will change
3785
		if(this.offsetParent && this.helper) {
3786
			this.offset.parent = this._getParentOffset();
3787
		}
3788
3789
		var i, item, t, p;
3790
3791
		for (i = this.items.length - 1; i >= 0; i--){
3792
			item = this.items[i];
3793
3794
			//We ignore calculating positions of all connected containers when we're not over them
3795
			if(item.instance !== this.currentContainer && this.currentContainer && item.item[0] !== this.currentItem[0]) {
3796
				continue;
3797
			}
3798
3799
			t = this.options.toleranceElement ? $(this.options.toleranceElement, item.item) : item.item;
3800
3801
			if (!fast) {
3802
				item.width = t.outerWidth();
3803
				item.height = t.outerHeight();
3804
			}
3805
3806
			p = t.offset();
3807
			item.left = p.left;
3808
			item.top = p.top;
3809
		}
3810
3811
		if(this.options.custom && this.options.custom.refreshContainers) {
3812
			this.options.custom.refreshContainers.call(this);
3813
		} else {
3814
			for (i = this.containers.length - 1; i >= 0; i--){
3815
				p = this.containers[i].element.offset();
3816
				this.containers[i].containerCache.left = p.left;
3817
				this.containers[i].containerCache.top = p.top;
3818
				this.containers[i].containerCache.width = this.containers[i].element.outerWidth();
3819
				this.containers[i].containerCache.height = this.containers[i].element.outerHeight();
3820
			}
3821
		}
3822
3823
		return this;
3824
	},
3825
3826
	_createPlaceholder: function(that) {
3827
		that = that || this;
3828
		var className,
3829
			o = that.options;
3830
3831
		if(!o.placeholder || o.placeholder.constructor === String) {
3832
			className = o.placeholder;
3833
			o.placeholder = {
3834
				element: function() {
3835
3836
					var nodeName = that.currentItem[0].nodeName.toLowerCase(),
3837
						element = $( "<" + nodeName + ">", that.document[0] )
3838
							.addClass(className || that.currentItem[0].className+" ui-sortable-placeholder")
3839
							.removeClass("ui-sortable-helper");
3840
3841
					if ( nodeName === "tbody" ) {
3842
						that._createTrPlaceholder(
3843
							that.currentItem.find( "tr" ).eq( 0 ),
3844
							$( "<tr>", that.document[ 0 ] ).appendTo( element )
3845
						);
3846
					} else if ( nodeName === "tr" ) {
3847
						that._createTrPlaceholder( that.currentItem, element );
3848
					} else if ( nodeName === "img" ) {
3849
						element.attr( "src", that.currentItem.attr( "src" ) );
3850
					}
3851
3852
					if ( !className ) {
3853
						element.css( "visibility", "hidden" );
3854
					}
3855
3856
					return element;
3857
				},
3858
				update: function(container, p) {
3859
3860
					// 1. If a className is set as 'placeholder option, we don't force sizes - the class is responsible for that
3861
					// 2. The option 'forcePlaceholderSize can be enabled to force it even if a class name is specified
3862
					if(className && !o.forcePlaceholderSize) {
3863
						return;
3864
					}
3865
3866
					//If the element doesn't have a actual height by itself (without styles coming from a stylesheet), it receives the inline height from the dragged item
3867
					if(!p.height()) { p.height(that.currentItem.innerHeight() - parseInt(that.currentItem.css("paddingTop")||0, 10) - parseInt(that.currentItem.css("paddingBottom")||0, 10)); }
3868
					if(!p.width()) { p.width(that.currentItem.innerWidth() - parseInt(that.currentItem.css("paddingLeft")||0, 10) - parseInt(that.currentItem.css("paddingRight")||0, 10)); }
3869
				}
3870
			};
3871
		}
3872
3873
		//Create the placeholder
3874
		that.placeholder = $(o.placeholder.element.call(that.element, that.currentItem));
3875
3876
		//Append it after the actual current item
3877
		that.currentItem.after(that.placeholder);
3878
3879
		//Update the size of the placeholder (TODO: Logic to fuzzy, see line 316/317)
3880
		o.placeholder.update(that, that.placeholder);
3881
3882
	},
3883
3884
	_createTrPlaceholder: function( sourceTr, targetTr ) {
3885
		var that = this;
3886
3887
		sourceTr.children().each(function() {
3888
			$( "<td>&#160;</td>", that.document[ 0 ] )
3889
				.attr( "colspan", $( this ).attr( "colspan" ) || 1 )
3890
				.appendTo( targetTr );
3891
		});
3892
	},
3893
3894
	_contactContainers: function(event) {
3895
		var i, j, dist, itemWithLeastDistance, posProperty, sizeProperty, cur, nearBottom, floating, axis,
3896
			innermostContainer = null,
3897
			innermostIndex = null;
3898
3899
		// get innermost container that intersects with item
3900
		for (i = this.containers.length - 1; i >= 0; i--) {
3901
3902
			// never consider a container that's located within the item itself
3903
			if($.contains(this.currentItem[0], this.containers[i].element[0])) {
3904
				continue;
3905
			}
3906
3907
			if(this._intersectsWith(this.containers[i].containerCache)) {
3908
3909
				// if we've already found a container and it's more "inner" than this, then continue
3910
				if(innermostContainer && $.contains(this.containers[i].element[0], innermostContainer.element[0])) {
3911
					continue;
3912
				}
3913
3914
				innermostContainer = this.containers[i];
3915
				innermostIndex = i;
3916
3917
			} else {
3918
				// container doesn't intersect. trigger "out" event if necessary
3919
				if(this.containers[i].containerCache.over) {
3920
					this.containers[i]._trigger("out", event, this._uiHash(this));
3921
					this.containers[i].containerCache.over = 0;
3922
				}
3923
			}
3924
3925
		}
3926
3927
		// if no intersecting containers found, return
3928
		if(!innermostContainer) {
3929
			return;
3930
		}
3931
3932
		// move the item into the container if it's not there already
3933
		if(this.containers.length === 1) {
3934
			if (!this.containers[innermostIndex].containerCache.over) {
3935
				this.containers[innermostIndex]._trigger("over", event, this._uiHash(this));
3936
				this.containers[innermostIndex].containerCache.over = 1;
3937
			}
3938
		} else {
3939
3940
			//When entering a new container, we will find the item with the least distance and append our item near it
3941
			dist = 10000;
3942
			itemWithLeastDistance = null;
3943
			floating = innermostContainer.floating || this._isFloating(this.currentItem);
3944
			posProperty = floating ? "left" : "top";
3945
			sizeProperty = floating ? "width" : "height";
3946
			axis = floating ? "clientX" : "clientY";
3947
3948
			for (j = this.items.length - 1; j >= 0; j--) {
3949
				if(!$.contains(this.containers[innermostIndex].element[0], this.items[j].item[0])) {
3950
					continue;
3951
				}
3952
				if(this.items[j].item[0] === this.currentItem[0]) {
3953
					continue;
3954
				}
3955
3956
				cur = this.items[j].item.offset()[posProperty];
3957
				nearBottom = false;
3958
				if ( event[ axis ] - cur > this.items[ j ][ sizeProperty ] / 2 ) {
3959
					nearBottom = true;
3960
				}
3961
3962
				if ( Math.abs( event[ axis ] - cur ) < dist ) {
3963
					dist = Math.abs( event[ axis ] - cur );
3964
					itemWithLeastDistance = this.items[ j ];
3965
					this.direction = nearBottom ? "up": "down";
3966
				}
3967
			}
3968
3969
			//Check if dropOnEmpty is enabled
3970
			if(!itemWithLeastDistance && !this.options.dropOnEmpty) {
3971
				return;
3972
			}
3973
3974
			if(this.currentContainer === this.containers[innermostIndex]) {
3975
				if ( !this.currentContainer.containerCache.over ) {
3976
					this.containers[ innermostIndex ]._trigger( "over", event, this._uiHash() );
3977
					this.currentContainer.containerCache.over = 1;
3978
				}
3979
				return;
3980
			}
3981
3982
			itemWithLeastDistance ? this._rearrange(event, itemWithLeastDistance, null, true) : this._rearrange(event, null, this.containers[innermostIndex].element, true);
3983
			this._trigger("change", event, this._uiHash());
3984
			this.containers[innermostIndex]._trigger("change", event, this._uiHash(this));
3985
			this.currentContainer = this.containers[innermostIndex];
3986
3987
			//Update the placeholder
3988
			this.options.placeholder.update(this.currentContainer, this.placeholder);
3989
3990
			this.containers[innermostIndex]._trigger("over", event, this._uiHash(this));
3991
			this.containers[innermostIndex].containerCache.over = 1;
3992
		}
3993
3994
3995
	},
3996
3997
	_createHelper: function(event) {
3998
3999
		var o = this.options,
4000
			helper = $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], [event, this.currentItem])) : (o.helper === "clone" ? this.currentItem.clone() : this.currentItem);
4001
4002
		//Add the helper to the DOM if that didn't happen already
4003
		if(!helper.parents("body").length) {
4004
			$(o.appendTo !== "parent" ? o.appendTo : this.currentItem[0].parentNode)[0].appendChild(helper[0]);
4005
		}
4006
4007
		if(helper[0] === this.currentItem[0]) {
4008
			this._storedCSS = { width: this.currentItem[0].style.width, height: this.currentItem[0].style.height, position: this.currentItem.css("position"), top: this.currentItem.css("top"), left: this.currentItem.css("left") };
4009
		}
4010
4011
		if(!helper[0].style.width || o.forceHelperSize) {
4012
			helper.width(this.currentItem.width());
4013
		}
4014
		if(!helper[0].style.height || o.forceHelperSize) {
4015
			helper.height(this.currentItem.height());
4016
		}
4017
4018
		return helper;
4019
4020
	},
4021
4022
	_adjustOffsetFromHelper: function(obj) {
4023
		if (typeof obj === "string") {
4024
			obj = obj.split(" ");
4025
		}
4026
		if ($.isArray(obj)) {
4027
			obj = {left: +obj[0], top: +obj[1] || 0};
4028
		}
4029
		if ("left" in obj) {
4030
			this.offset.click.left = obj.left + this.margins.left;
4031
		}
4032
		if ("right" in obj) {
4033
			this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left;
4034
		}
4035
		if ("top" in obj) {
4036
			this.offset.click.top = obj.top + this.margins.top;
4037
		}
4038
		if ("bottom" in obj) {
4039
			this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top;
4040
		}
4041
	},
4042
4043
	_getParentOffset: function() {
4044
4045
4046
		//Get the offsetParent and cache its position
4047
		this.offsetParent = this.helper.offsetParent();
4048
		var po = this.offsetParent.offset();
4049
4050
		// This is a special case where we need to modify a offset calculated on start, since the following happened:
4051
		// 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent
4052
		// 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that
4053
		//    the scroll is included in the initial calculation of the offset of the parent, and never recalculated upon drag
4054
		if(this.cssPosition === "absolute" && this.scrollParent[0] !== this.document[0] && $.contains(this.scrollParent[0], this.offsetParent[0])) {
4055
			po.left += this.scrollParent.scrollLeft();
4056
			po.top += this.scrollParent.scrollTop();
4057
		}
4058
4059
		// This needs to be actually done for all browsers, since pageX/pageY includes this information
4060
		// with an ugly IE fix
4061
		if( this.offsetParent[0] === this.document[0].body || (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() === "html" && $.ui.ie)) {
4062
			po = { top: 0, left: 0 };
4063
		}
4064
4065
		return {
4066
			top: po.top + (parseInt(this.offsetParent.css("borderTopWidth"),10) || 0),
4067
			left: po.left + (parseInt(this.offsetParent.css("borderLeftWidth"),10) || 0)
4068
		};
4069
4070
	},
4071
4072
	_getRelativeOffset: function() {
4073
4074
		if(this.cssPosition === "relative") {
4075
			var p = this.currentItem.position();
4076
			return {
4077
				top: p.top - (parseInt(this.helper.css("top"),10) || 0) + this.scrollParent.scrollTop(),
4078
				left: p.left - (parseInt(this.helper.css("left"),10) || 0) + this.scrollParent.scrollLeft()
4079
			};
4080
		} else {
4081
			return { top: 0, left: 0 };
4082
		}
4083
4084
	},
4085
4086
	_cacheMargins: function() {
4087
		this.margins = {
4088
			left: (parseInt(this.currentItem.css("marginLeft"),10) || 0),
4089
			top: (parseInt(this.currentItem.css("marginTop"),10) || 0)
4090
		};
4091
	},
4092
4093
	_cacheHelperProportions: function() {
4094
		this.helperProportions = {
4095
			width: this.helper.outerWidth(),
4096
			height: this.helper.outerHeight()
4097
		};
4098
	},
4099
4100
	_setContainment: function() {
4101
4102
		var ce, co, over,
4103
			o = this.options;
4104
		if(o.containment === "parent") {
4105
			o.containment = this.helper[0].parentNode;
4106
		}
4107
		if(o.containment === "document" || o.containment === "window") {
4108
			this.containment = [
4109
				0 - this.offset.relative.left - this.offset.parent.left,
4110
				0 - this.offset.relative.top - this.offset.parent.top,
4111
				o.containment === "document" ? this.document.width() : this.window.width() - this.helperProportions.width - this.margins.left,
4112
				(o.containment === "document" ? this.document.width() : this.window.height() || this.document[0].body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top
4113
			];
4114
		}
4115
4116
		if(!(/^(document|window|parent)$/).test(o.containment)) {
4117
			ce = $(o.containment)[0];
4118
			co = $(o.containment).offset();
4119
			over = ($(ce).css("overflow") !== "hidden");
4120
4121
			this.containment = [
4122
				co.left + (parseInt($(ce).css("borderLeftWidth"),10) || 0) + (parseInt($(ce).css("paddingLeft"),10) || 0) - this.margins.left,
4123
				co.top + (parseInt($(ce).css("borderTopWidth"),10) || 0) + (parseInt($(ce).css("paddingTop"),10) || 0) - this.margins.top,
4124
				co.left+(over ? Math.max(ce.scrollWidth,ce.offsetWidth) : ce.offsetWidth) - (parseInt($(ce).css("borderLeftWidth"),10) || 0) - (parseInt($(ce).css("paddingRight"),10) || 0) - this.helperProportions.width - this.margins.left,
4125
				co.top+(over ? Math.max(ce.scrollHeight,ce.offsetHeight) : ce.offsetHeight) - (parseInt($(ce).css("borderTopWidth"),10) || 0) - (parseInt($(ce).css("paddingBottom"),10) || 0) - this.helperProportions.height - this.margins.top
4126
			];
4127
		}
4128
4129
	},
4130
4131
	_convertPositionTo: function(d, pos) {
4132
4133
		if(!pos) {
4134
			pos = this.position;
4135
		}
4136
		var mod = d === "absolute" ? 1 : -1,
4137
			scroll = this.cssPosition === "absolute" && !(this.scrollParent[0] !== this.document[0] && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent,
4138
			scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
4139
4140
		return {
4141
			top: (
4142
				pos.top	+																// The absolute mouse position
4143
				this.offset.relative.top * mod +										// Only for relative positioned nodes: Relative offset from element to offset parent
4144
				this.offset.parent.top * mod -											// The offsetParent's offset without borders (offset + border)
4145
				( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod)
4146
			),
4147
			left: (
4148
				pos.left +																// The absolute mouse position
4149
				this.offset.relative.left * mod +										// Only for relative positioned nodes: Relative offset from element to offset parent
4150
				this.offset.parent.left * mod	-										// The offsetParent's offset without borders (offset + border)
4151
				( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ) * mod)
4152
			)
4153
		};
4154
4155
	},
4156
4157
	_generatePosition: function(event) {
4158
4159
		var top, left,
4160
			o = this.options,
4161
			pageX = event.pageX,
4162
			pageY = event.pageY,
4163
			scroll = this.cssPosition === "absolute" && !(this.scrollParent[0] !== this.document[0] && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
4164
4165
		// This is another very weird special case that only happens for relative elements:
4166
		// 1. If the css position is relative
4167
		// 2. and the scroll parent is the document or similar to the offset parent
4168
		// we have to refresh the relative offset during the scroll so there are no jumps
4169
		if(this.cssPosition === "relative" && !(this.scrollParent[0] !== this.document[0] && this.scrollParent[0] !== this.offsetParent[0])) {
4170
			this.offset.relative = this._getRelativeOffset();
4171
		}
4172
4173
		/*
4174
		 * - Position constraining -
4175
		 * Constrain the position to a mix of grid, containment.
4176
		 */
4177
4178
		if(this.originalPosition) { //If we are not dragging yet, we won't check for options
4179
4180
			if(this.containment) {
4181
				if(event.pageX - this.offset.click.left < this.containment[0]) {
4182
					pageX = this.containment[0] + this.offset.click.left;
4183
				}
4184
				if(event.pageY - this.offset.click.top < this.containment[1]) {
4185
					pageY = this.containment[1] + this.offset.click.top;
4186
				}
4187
				if(event.pageX - this.offset.click.left > this.containment[2]) {
4188
					pageX = this.containment[2] + this.offset.click.left;
4189
				}
4190
				if(event.pageY - this.offset.click.top > this.containment[3]) {
4191
					pageY = this.containment[3] + this.offset.click.top;
4192
				}
4193
			}
4194
4195
			if(o.grid) {
4196
				top = this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1];
4197
				pageY = this.containment ? ( (top - this.offset.click.top >= this.containment[1] && top - this.offset.click.top <= this.containment[3]) ? top : ((top - this.offset.click.top >= this.containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top;
4198
4199
				left = this.originalPageX + Math.round((pageX - this.originalPageX) / o.grid[0]) * o.grid[0];
4200
				pageX = this.containment ? ( (left - this.offset.click.left >= this.containment[0] && left - this.offset.click.left <= this.containment[2]) ? left : ((left - this.offset.click.left >= this.containment[0]) ? left - o.grid[0] : left + o.grid[0])) : left;
4201
			}
4202
4203
		}
4204
4205
		return {
4206
			top: (
4207
				pageY -																// The absolute mouse position
4208
				this.offset.click.top -													// Click offset (relative to the element)
4209
				this.offset.relative.top	-											// Only for relative positioned nodes: Relative offset from element to offset parent
4210
				this.offset.parent.top +												// The offsetParent's offset without borders (offset + border)
4211
				( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ))
4212
			),
4213
			left: (
4214
				pageX -																// The absolute mouse position
4215
				this.offset.click.left -												// Click offset (relative to the element)
4216
				this.offset.relative.left	-											// Only for relative positioned nodes: Relative offset from element to offset parent
4217
				this.offset.parent.left +												// The offsetParent's offset without borders (offset + border)
4218
				( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ))
4219
			)
4220
		};
4221
4222
	},
4223
4224
	_rearrange: function(event, i, a, hardRefresh) {
4225
4226
		a ? a[0].appendChild(this.placeholder[0]) : i.item[0].parentNode.insertBefore(this.placeholder[0], (this.direction === "down" ? i.item[0] : i.item[0].nextSibling));
4227
4228
		//Various things done here to improve the performance:
4229
		// 1. we create a setTimeout, that calls refreshPositions
4230
		// 2. on the instance, we have a counter variable, that get's higher after every append
4231
		// 3. on the local scope, we copy the counter variable, and check in the timeout, if it's still the same
4232
		// 4. this lets only the last addition to the timeout stack through
4233
		this.counter = this.counter ? ++this.counter : 1;
4234
		var counter = this.counter;
4235
4236
		this._delay(function() {
4237
			if(counter === this.counter) {
4238
				this.refreshPositions(!hardRefresh); //Precompute after each DOM insertion, NOT on mousemove
4239
			}
4240
		});
4241
4242
	},
4243
4244
	_clear: function(event, noPropagation) {
4245
4246
		this.reverting = false;
4247
		// We delay all events that have to be triggered to after the point where the placeholder has been removed and
4248
		// everything else normalized again
4249
		var i,
4250
			delayedTriggers = [];
4251
4252
		// We first have to update the dom position of the actual currentItem
4253
		// Note: don't do it if the current item is already removed (by a user), or it gets reappended (see #4088)
4254
		if(!this._noFinalSort && this.currentItem.parent().length) {
4255
			this.placeholder.before(this.currentItem);
4256
		}
4257
		this._noFinalSort = null;
4258
4259
		if(this.helper[0] === this.currentItem[0]) {
4260
			for(i in this._storedCSS) {
4261
				if(this._storedCSS[i] === "auto" || this._storedCSS[i] === "static") {
4262
					this._storedCSS[i] = "";
4263
				}
4264
			}
4265
			this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper");
4266
		} else {
4267
			this.currentItem.show();
4268
		}
4269
4270
		if(this.fromOutside && !noPropagation) {
4271
			delayedTriggers.push(function(event) { this._trigger("receive", event, this._uiHash(this.fromOutside)); });
4272
		}
4273
		if((this.fromOutside || this.domPosition.prev !== this.currentItem.prev().not(".ui-sortable-helper")[0] || this.domPosition.parent !== this.currentItem.parent()[0]) && !noPropagation) {
4274
			delayedTriggers.push(function(event) { this._trigger("update", event, this._uiHash()); }); //Trigger update callback if the DOM position has changed
4275
		}
4276
4277
		// Check if the items Container has Changed and trigger appropriate
4278
		// events.
4279
		if (this !== this.currentContainer) {
4280
			if(!noPropagation) {
4281
				delayedTriggers.push(function(event) { this._trigger("remove", event, this._uiHash()); });
4282
				delayedTriggers.push((function(c) { return function(event) { c._trigger("receive", event, this._uiHash(this)); };  }).call(this, this.currentContainer));
4283
				delayedTriggers.push((function(c) { return function(event) { c._trigger("update", event, this._uiHash(this));  }; }).call(this, this.currentContainer));
4284
			}
4285
		}
4286
4287
4288
		//Post events to containers
4289
		function delayEvent( type, instance, container ) {
4290
			return function( event ) {
4291
				container._trigger( type, event, instance._uiHash( instance ) );
4292
			};
4293
		}
4294
		for (i = this.containers.length - 1; i >= 0; i--){
4295
			if (!noPropagation) {
4296
				delayedTriggers.push( delayEvent( "deactivate", this, this.containers[ i ] ) );
4297
			}
4298
			if(this.containers[i].containerCache.over) {
4299
				delayedTriggers.push( delayEvent( "out", this, this.containers[ i ] ) );
4300
				this.containers[i].containerCache.over = 0;
4301
			}
4302
		}
4303
4304
		//Do what was originally in plugins
4305
		if ( this.storedCursor ) {
4306
			this.document.find( "body" ).css( "cursor", this.storedCursor );
4307
			this.storedStylesheet.remove();
4308
		}
4309
		if(this._storedOpacity) {
4310
			this.helper.css("opacity", this._storedOpacity);
4311
		}
4312
		if(this._storedZIndex) {
4313
			this.helper.css("zIndex", this._storedZIndex === "auto" ? "" : this._storedZIndex);
4314
		}
4315
4316
		this.dragging = false;
4317
4318
		if(!noPropagation) {
4319
			this._trigger("beforeStop", event, this._uiHash());
4320
		}
4321
4322
		//$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node!
4323
		this.placeholder[0].parentNode.removeChild(this.placeholder[0]);
4324
4325
		if ( !this.cancelHelperRemoval ) {
4326
			if ( this.helper[ 0 ] !== this.currentItem[ 0 ] ) {
4327
				this.helper.remove();
4328
			}
4329
			this.helper = null;
4330
		}
4331
4332
		if(!noPropagation) {
4333
			for (i=0; i < delayedTriggers.length; i++) {
4334
				delayedTriggers[i].call(this, event);
4335
			} //Trigger all delayed events
4336
			this._trigger("stop", event, this._uiHash());
4337
		}
4338
4339
		this.fromOutside = false;
4340
		return !this.cancelHelperRemoval;
4341
4342
	},
4343
4344
	_trigger: function() {
4345
		if ($.Widget.prototype._trigger.apply(this, arguments) === false) {
4346
			this.cancel();
4347
		}
4348
	},
4349
4350
	_uiHash: function(_inst) {
4351
		var inst = _inst || this;
4352
		return {
4353
			helper: inst.helper,
4354
			placeholder: inst.placeholder || $([]),
4355
			position: inst.position,
4356
			originalPosition: inst.originalPosition,
4357
			offset: inst.positionAbs,
4358
			item: inst.currentItem,
4359
			sender: _inst ? _inst.element : null
4360
		};
4361
	}
4362
4363
});
4364
4365
4366
/*!
4367
 * jQuery UI Accordion 1.11.4
4368
 * http://jqueryui.com
4369
 *
4370
 * Copyright jQuery Foundation and other contributors
4371
 * Released under the MIT license.
4372
 * http://jquery.org/license
4373
 *
4374
 * http://api.jqueryui.com/accordion/
4375
 */
4376
4377
4378
var accordion = $.widget( "ui.accordion", {
4379
	version: "1.11.4",
4380
	options: {
4381
		active: 0,
4382
		animate: {},
4383
		collapsible: false,
4384
		event: "click",
4385
		header: "> li > :first-child,> :not(li):even",
4386
		heightStyle: "auto",
4387
		icons: {
4388
			activeHeader: "ui-icon-triangle-1-s",
4389
			header: "ui-icon-triangle-1-e"
4390
		},
4391
4392
		// callbacks
4393
		activate: null,
4394
		beforeActivate: null
4395
	},
4396
4397
	hideProps: {
4398
		borderTopWidth: "hide",
4399
		borderBottomWidth: "hide",
4400
		paddingTop: "hide",
4401
		paddingBottom: "hide",
4402
		height: "hide"
4403
	},
4404
4405
	showProps: {
4406
		borderTopWidth: "show",
4407
		borderBottomWidth: "show",
4408
		paddingTop: "show",
4409
		paddingBottom: "show",
4410
		height: "show"
4411
	},
4412
4413
	_create: function() {
4414
		var options = this.options;
4415
		this.prevShow = this.prevHide = $();
4416
		this.element.addClass( "ui-accordion ui-widget ui-helper-reset" )
4417
			// ARIA
4418
			.attr( "role", "tablist" );
4419
4420
		// don't allow collapsible: false and active: false / null
4421
		if ( !options.collapsible && (options.active === false || options.active == null) ) {
4422
			options.active = 0;
4423
		}
4424
4425
		this._processPanels();
4426
		// handle negative values
4427
		if ( options.active < 0 ) {
4428
			options.active += this.headers.length;
4429
		}
4430
		this._refresh();
4431
	},
4432
4433
	_getCreateEventData: function() {
4434
		return {
4435
			header: this.active,
4436
			panel: !this.active.length ? $() : this.active.next()
4437
		};
4438
	},
4439
4440
	_createIcons: function() {
4441
		var icons = this.options.icons;
4442
		if ( icons ) {
4443
			$( "<span>" )
4444
				.addClass( "ui-accordion-header-icon ui-icon " + icons.header )
4445
				.prependTo( this.headers );
4446
			this.active.children( ".ui-accordion-header-icon" )
4447
				.removeClass( icons.header )
4448
				.addClass( icons.activeHeader );
4449
			this.headers.addClass( "ui-accordion-icons" );
4450
		}
4451
	},
4452
4453
	_destroyIcons: function() {
4454
		this.headers
4455
			.removeClass( "ui-accordion-icons" )
4456
			.children( ".ui-accordion-header-icon" )
4457
				.remove();
4458
	},
4459
4460
	_destroy: function() {
4461
		var contents;
4462
4463
		// clean up main element
4464
		this.element
4465
			.removeClass( "ui-accordion ui-widget ui-helper-reset" )
4466
			.removeAttr( "role" );
4467
4468
		// clean up headers
4469
		this.headers
4470
			.removeClass( "ui-accordion-header ui-accordion-header-active ui-state-default " +
4471
				"ui-corner-all ui-state-active ui-state-disabled ui-corner-top" )
4472
			.removeAttr( "role" )
4473
			.removeAttr( "aria-expanded" )
4474
			.removeAttr( "aria-selected" )
4475
			.removeAttr( "aria-controls" )
4476
			.removeAttr( "tabIndex" )
4477
			.removeUniqueId();
4478
4479
		this._destroyIcons();
4480
4481
		// clean up content panels
4482
		contents = this.headers.next()
4483
			.removeClass( "ui-helper-reset ui-widget-content ui-corner-bottom " +
4484
				"ui-accordion-content ui-accordion-content-active ui-state-disabled" )
4485
			.css( "display", "" )
4486
			.removeAttr( "role" )
4487
			.removeAttr( "aria-hidden" )
4488
			.removeAttr( "aria-labelledby" )
4489
			.removeUniqueId();
4490
4491
		if ( this.options.heightStyle !== "content" ) {
4492
			contents.css( "height", "" );
4493
		}
4494
	},
4495
4496
	_setOption: function( key, value ) {
4497
		if ( key === "active" ) {
4498
			// _activate() will handle invalid values and update this.options
4499
			this._activate( value );
4500
			return;
4501
		}
4502
4503
		if ( key === "event" ) {
4504
			if ( this.options.event ) {
4505
				this._off( this.headers, this.options.event );
4506
			}
4507
			this._setupEvents( value );
4508
		}
4509
4510
		this._super( key, value );
4511
4512
		// setting collapsible: false while collapsed; open first panel
4513
		if ( key === "collapsible" && !value && this.options.active === false ) {
4514
			this._activate( 0 );
4515
		}
4516
4517
		if ( key === "icons" ) {
4518
			this._destroyIcons();
4519
			if ( value ) {
4520
				this._createIcons();
4521
			}
4522
		}
4523
4524
		// #5332 - opacity doesn't cascade to positioned elements in IE
4525
		// so we need to add the disabled class to the headers and panels
4526
		if ( key === "disabled" ) {
4527
			this.element
4528
				.toggleClass( "ui-state-disabled", !!value )
4529
				.attr( "aria-disabled", value );
4530
			this.headers.add( this.headers.next() )
4531
				.toggleClass( "ui-state-disabled", !!value );
4532
		}
4533
	},
4534
4535
	_keydown: function( event ) {
4536
		if ( event.altKey || event.ctrlKey ) {
4537
			return;
4538
		}
4539
4540
		var keyCode = $.ui.keyCode,
4541
			length = this.headers.length,
4542
			currentIndex = this.headers.index( event.target ),
4543
			toFocus = false;
4544
4545
		switch ( event.keyCode ) {
4546
			case keyCode.RIGHT:
4547
			case keyCode.DOWN:
4548
				toFocus = this.headers[ ( currentIndex + 1 ) % length ];
4549
				break;
4550
			case keyCode.LEFT:
4551
			case keyCode.UP:
4552
				toFocus = this.headers[ ( currentIndex - 1 + length ) % length ];
4553
				break;
4554
			case keyCode.SPACE:
4555
			case keyCode.ENTER:
4556
				this._eventHandler( event );
4557
				break;
4558
			case keyCode.HOME:
4559
				toFocus = this.headers[ 0 ];
4560
				break;
4561
			case keyCode.END:
4562
				toFocus = this.headers[ length - 1 ];
4563
				break;
4564
		}
4565
4566
		if ( toFocus ) {
4567
			$( event.target ).attr( "tabIndex", -1 );
4568
			$( toFocus ).attr( "tabIndex", 0 );
4569
			toFocus.focus();
4570
			event.preventDefault();
4571
		}
4572
	},
4573
4574
	_panelKeyDown: function( event ) {
4575
		if ( event.keyCode === $.ui.keyCode.UP && event.ctrlKey ) {
4576
			$( event.currentTarget ).prev().focus();
4577
		}
4578
	},
4579
4580
	refresh: function() {
4581
		var options = this.options;
4582
		this._processPanels();
4583
4584
		// was collapsed or no panel
4585
		if ( ( options.active === false && options.collapsible === true ) || !this.headers.length ) {
4586
			options.active = false;
4587
			this.active = $();
4588
		// active false only when collapsible is true
4589
		} else if ( options.active === false ) {
4590
			this._activate( 0 );
4591
		// was active, but active panel is gone
4592
		} else if ( this.active.length && !$.contains( this.element[ 0 ], this.active[ 0 ] ) ) {
4593
			// all remaining panel are disabled
4594
			if ( this.headers.length === this.headers.find(".ui-state-disabled").length ) {
4595
				options.active = false;
4596
				this.active = $();
4597
			// activate previous panel
4598
			} else {
4599
				this._activate( Math.max( 0, options.active - 1 ) );
4600
			}
4601
		// was active, active panel still exists
4602
		} else {
4603
			// make sure active index is correct
4604
			options.active = this.headers.index( this.active );
4605
		}
4606
4607
		this._destroyIcons();
4608
4609
		this._refresh();
4610
	},
4611
4612
	_processPanels: function() {
4613
		var prevHeaders = this.headers,
4614
			prevPanels = this.panels;
4615
4616
		this.headers = this.element.find( this.options.header )
4617
			.addClass( "ui-accordion-header ui-state-default ui-corner-all" );
4618
4619
		this.panels = this.headers.next()
4620
			.addClass( "ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom" )
4621
			.filter( ":not(.ui-accordion-content-active)" )
4622
			.hide();
4623
4624
		// Avoid memory leaks (#10056)
4625
		if ( prevPanels ) {
4626
			this._off( prevHeaders.not( this.headers ) );
4627
			this._off( prevPanels.not( this.panels ) );
4628
		}
4629
	},
4630
4631
	_refresh: function() {
4632
		var maxHeight,
4633
			options = this.options,
4634
			heightStyle = options.heightStyle,
4635
			parent = this.element.parent();
4636
4637
		this.active = this._findActive( options.active )
4638
			.addClass( "ui-accordion-header-active ui-state-active ui-corner-top" )
4639
			.removeClass( "ui-corner-all" );
4640
		this.active.next()
4641
			.addClass( "ui-accordion-content-active" )
4642
			.show();
4643
4644
		this.headers
4645
			.attr( "role", "tab" )
4646
			.each(function() {
4647
				var header = $( this ),
4648
					headerId = header.uniqueId().attr( "id" ),
4649
					panel = header.next(),
4650
					panelId = panel.uniqueId().attr( "id" );
4651
				header.attr( "aria-controls", panelId );
4652
				panel.attr( "aria-labelledby", headerId );
4653
			})
4654
			.next()
4655
				.attr( "role", "tabpanel" );
4656
4657
		this.headers
4658
			.not( this.active )
4659
			.attr({
4660
				"aria-selected": "false",
4661
				"aria-expanded": "false",
4662
				tabIndex: -1
4663
			})
4664
			.next()
4665
				.attr({
4666
					"aria-hidden": "true"
4667
				})
4668
				.hide();
4669
4670
		// make sure at least one header is in the tab order
4671
		if ( !this.active.length ) {
4672
			this.headers.eq( 0 ).attr( "tabIndex", 0 );
4673
		} else {
4674
			this.active.attr({
4675
				"aria-selected": "true",
4676
				"aria-expanded": "true",
4677
				tabIndex: 0
4678
			})
4679
			.next()
4680
				.attr({
4681
					"aria-hidden": "false"
4682
				});
4683
		}
4684
4685
		this._createIcons();
4686
4687
		this._setupEvents( options.event );
4688
4689
		if ( heightStyle === "fill" ) {
4690
			maxHeight = parent.height();
4691
			this.element.siblings( ":visible" ).each(function() {
4692
				var elem = $( this ),
4693
					position = elem.css( "position" );
4694
4695
				if ( position === "absolute" || position === "fixed" ) {
4696
					return;
4697
				}
4698
				maxHeight -= elem.outerHeight( true );
4699
			});
4700
4701
			this.headers.each(function() {
4702
				maxHeight -= $( this ).outerHeight( true );
4703
			});
4704
4705
			this.headers.next()
4706
				.each(function() {
4707
					$( this ).height( Math.max( 0, maxHeight -
4708
						$( this ).innerHeight() + $( this ).height() ) );
4709
				})
4710
				.css( "overflow", "auto" );
4711
		} else if ( heightStyle === "auto" ) {
4712
			maxHeight = 0;
4713
			this.headers.next()
4714
				.each(function() {
4715
					maxHeight = Math.max( maxHeight, $( this ).css( "height", "" ).height() );
4716
				})
4717
				.height( maxHeight );
4718
		}
4719
	},
4720
4721
	_activate: function( index ) {
4722
		var active = this._findActive( index )[ 0 ];
4723
4724
		// trying to activate the already active panel
4725
		if ( active === this.active[ 0 ] ) {
4726
			return;
4727
		}
4728
4729
		// trying to collapse, simulate a click on the currently active header
4730
		active = active || this.active[ 0 ];
4731
4732
		this._eventHandler({
4733
			target: active,
4734
			currentTarget: active,
4735
			preventDefault: $.noop
4736
		});
4737
	},
4738
4739
	_findActive: function( selector ) {
4740
		return typeof selector === "number" ? this.headers.eq( selector ) : $();
4741
	},
4742
4743
	_setupEvents: function( event ) {
4744
		var events = {
4745
			keydown: "_keydown"
4746
		};
4747
		if ( event ) {
4748
			$.each( event.split( " " ), function( index, eventName ) {
4749
				events[ eventName ] = "_eventHandler";
4750
			});
4751
		}
4752
4753
		this._off( this.headers.add( this.headers.next() ) );
4754
		this._on( this.headers, events );
4755
		this._on( this.headers.next(), { keydown: "_panelKeyDown" });
4756
		this._hoverable( this.headers );
4757
		this._focusable( this.headers );
4758
	},
4759
4760
	_eventHandler: function( event ) {
4761
		var options = this.options,
4762
			active = this.active,
4763
			clicked = $( event.currentTarget ),
4764
			clickedIsActive = clicked[ 0 ] === active[ 0 ],
4765
			collapsing = clickedIsActive && options.collapsible,
4766
			toShow = collapsing ? $() : clicked.next(),
4767
			toHide = active.next(),
4768
			eventData = {
4769
				oldHeader: active,
4770
				oldPanel: toHide,
4771
				newHeader: collapsing ? $() : clicked,
4772
				newPanel: toShow
4773
			};
4774
4775
		event.preventDefault();
4776
4777
		if (
4778
				// click on active header, but not collapsible
4779
				( clickedIsActive && !options.collapsible ) ||
4780
				// allow canceling activation
4781
				( this._trigger( "beforeActivate", event, eventData ) === false ) ) {
4782
			return;
4783
		}
4784
4785
		options.active = collapsing ? false : this.headers.index( clicked );
4786
4787
		// when the call to ._toggle() comes after the class changes
4788
		// it causes a very odd bug in IE 8 (see #6720)
4789
		this.active = clickedIsActive ? $() : clicked;
4790
		this._toggle( eventData );
4791
4792
		// switch classes
4793
		// corner classes on the previously active header stay after the animation
4794
		active.removeClass( "ui-accordion-header-active ui-state-active" );
4795
		if ( options.icons ) {
4796
			active.children( ".ui-accordion-header-icon" )
4797
				.removeClass( options.icons.activeHeader )
4798
				.addClass( options.icons.header );
4799
		}
4800
4801
		if ( !clickedIsActive ) {
4802
			clicked
4803
				.removeClass( "ui-corner-all" )
4804
				.addClass( "ui-accordion-header-active ui-state-active ui-corner-top" );
4805
			if ( options.icons ) {
4806
				clicked.children( ".ui-accordion-header-icon" )
4807
					.removeClass( options.icons.header )
4808
					.addClass( options.icons.activeHeader );
4809
			}
4810
4811
			clicked
4812
				.next()
4813
				.addClass( "ui-accordion-content-active" );
4814
		}
4815
	},
4816
4817
	_toggle: function( data ) {
4818
		var toShow = data.newPanel,
4819
			toHide = this.prevShow.length ? this.prevShow : data.oldPanel;
4820
4821
		// handle activating a panel during the animation for another activation
4822
		this.prevShow.add( this.prevHide ).stop( true, true );
4823
		this.prevShow = toShow;
4824
		this.prevHide = toHide;
4825
4826
		if ( this.options.animate ) {
4827
			this._animate( toShow, toHide, data );
4828
		} else {
4829
			toHide.hide();
4830
			toShow.show();
4831
			this._toggleComplete( data );
4832
		}
4833
4834
		toHide.attr({
4835
			"aria-hidden": "true"
4836
		});
4837
		toHide.prev().attr({
4838
			"aria-selected": "false",
4839
			"aria-expanded": "false"
4840
		});
4841
		// if we're switching panels, remove the old header from the tab order
4842
		// if we're opening from collapsed state, remove the previous header from the tab order
4843
		// if we're collapsing, then keep the collapsing header in the tab order
4844
		if ( toShow.length && toHide.length ) {
4845
			toHide.prev().attr({
4846
				"tabIndex": -1,
4847
				"aria-expanded": "false"
4848
			});
4849
		} else if ( toShow.length ) {
4850
			this.headers.filter(function() {
4851
				return parseInt( $( this ).attr( "tabIndex" ), 10 ) === 0;
4852
			})
4853
			.attr( "tabIndex", -1 );
4854
		}
4855
4856
		toShow
4857
			.attr( "aria-hidden", "false" )
4858
			.prev()
4859
				.attr({
4860
					"aria-selected": "true",
4861
					"aria-expanded": "true",
4862
					tabIndex: 0
4863
				});
4864
	},
4865
4866
	_animate: function( toShow, toHide, data ) {
4867
		var total, easing, duration,
4868
			that = this,
4869
			adjust = 0,
4870
			boxSizing = toShow.css( "box-sizing" ),
4871
			down = toShow.length &&
4872
				( !toHide.length || ( toShow.index() < toHide.index() ) ),
4873
			animate = this.options.animate || {},
4874
			options = down && animate.down || animate,
4875
			complete = function() {
4876
				that._toggleComplete( data );
4877
			};
4878
4879
		if ( typeof options === "number" ) {
4880
			duration = options;
4881
		}
4882
		if ( typeof options === "string" ) {
4883
			easing = options;
4884
		}
4885
		// fall back from options to animation in case of partial down settings
4886
		easing = easing || options.easing || animate.easing;
4887
		duration = duration || options.duration || animate.duration;
4888
4889
		if ( !toHide.length ) {
4890
			return toShow.animate( this.showProps, duration, easing, complete );
4891
		}
4892
		if ( !toShow.length ) {
4893
			return toHide.animate( this.hideProps, duration, easing, complete );
4894
		}
4895
4896
		total = toShow.show().outerHeight();
4897
		toHide.animate( this.hideProps, {
4898
			duration: duration,
4899
			easing: easing,
4900
			step: function( now, fx ) {
4901
				fx.now = Math.round( now );
4902
			}
4903
		});
4904
		toShow
4905
			.hide()
4906
			.animate( this.showProps, {
4907
				duration: duration,
4908
				easing: easing,
4909
				complete: complete,
4910
				step: function( now, fx ) {
4911
					fx.now = Math.round( now );
4912
					if ( fx.prop !== "height" ) {
4913
						if ( boxSizing === "content-box" ) {
4914
							adjust += fx.now;
4915
						}
4916
					} else if ( that.options.heightStyle !== "content" ) {
4917
						fx.now = Math.round( total - toHide.outerHeight() - adjust );
4918
						adjust = 0;
4919
					}
4920
				}
4921
			});
4922
	},
4923
4924
	_toggleComplete: function( data ) {
4925
		var toHide = data.oldPanel;
4926
4927
		toHide
4928
			.removeClass( "ui-accordion-content-active" )
4929
			.prev()
4930
				.removeClass( "ui-corner-top" )
4931
				.addClass( "ui-corner-all" );
4932
4933
		// Work around for rendering bug in IE (#5421)
4934
		if ( toHide.length ) {
4935
			toHide.parent()[ 0 ].className = toHide.parent()[ 0 ].className;
4936
		}
4937
		this._trigger( "activate", null, data );
4938
	}
4939
});
4940
4941
4942
/*!
4943
 * jQuery UI Menu 1.11.4
4944
 * http://jqueryui.com
4945
 *
4946
 * Copyright jQuery Foundation and other contributors
4947
 * Released under the MIT license.
4948
 * http://jquery.org/license
4949
 *
4950
 * http://api.jqueryui.com/menu/
4951
 */
4952
4953
4954
var menu = $.widget( "ui.menu", {
4955
	version: "1.11.4",
4956
	defaultElement: "<ul>",
4957
	delay: 300,
4958
	options: {
4959
		icons: {
4960
			submenu: "ui-icon-carat-1-e"
4961
		},
4962
		items: "> *",
4963
		menus: "ul",
4964
		position: {
4965
			my: "left-1 top",
4966
			at: "right top"
4967
		},
4968
		role: "menu",
4969
4970
		// callbacks
4971
		blur: null,
4972
		focus: null,
4973
		select: null
4974
	},
4975
4976
	_create: function() {
4977
		this.activeMenu = this.element;
4978
4979
		// Flag used to prevent firing of the click handler
4980
		// as the event bubbles up through nested menus
4981
		this.mouseHandled = false;
4982
		this.element
4983
			.uniqueId()
4984
			.addClass( "ui-menu ui-widget ui-widget-content" )
4985
			.toggleClass( "ui-menu-icons", !!this.element.find( ".ui-icon" ).length )
4986
			.attr({
4987
				role: this.options.role,
4988
				tabIndex: 0
4989
			});
4990
4991
		if ( this.options.disabled ) {
4992
			this.element
4993
				.addClass( "ui-state-disabled" )
4994
				.attr( "aria-disabled", "true" );
4995
		}
4996
4997
		this._on({
4998
			// Prevent focus from sticking to links inside menu after clicking
4999
			// them (focus should always stay on UL during navigation).
5000
			"mousedown .ui-menu-item": function( event ) {
5001
				event.preventDefault();
5002
			},
5003
			"click .ui-menu-item": function( event ) {
5004
				var target = $( event.target );
5005
				if ( !this.mouseHandled && target.not( ".ui-state-disabled" ).length ) {
5006
					this.select( event );
5007
5008
					// Only set the mouseHandled flag if the event will bubble, see #9469.
5009
					if ( !event.isPropagationStopped() ) {
5010
						this.mouseHandled = true;
5011
					}
5012
5013
					// Open submenu on click
5014
					if ( target.has( ".ui-menu" ).length ) {
5015
						this.expand( event );
5016
					} else if ( !this.element.is( ":focus" ) && $( this.document[ 0 ].activeElement ).closest( ".ui-menu" ).length ) {
5017
5018
						// Redirect focus to the menu
5019
						this.element.trigger( "focus", [ true ] );
5020
5021
						// If the active item is on the top level, let it stay active.
5022
						// Otherwise, blur the active item since it is no longer visible.
5023
						if ( this.active && this.active.parents( ".ui-menu" ).length === 1 ) {
5024
							clearTimeout( this.timer );
5025
						}
5026
					}
5027
				}
5028
			},
5029
			"mouseenter .ui-menu-item": function( event ) {
5030
				// Ignore mouse events while typeahead is active, see #10458.
5031
				// Prevents focusing the wrong item when typeahead causes a scroll while the mouse
5032
				// is over an item in the menu
5033
				if ( this.previousFilter ) {
5034
					return;
5035
				}
5036
				var target = $( event.currentTarget );
5037
				// Remove ui-state-active class from siblings of the newly focused menu item
5038
				// to avoid a jump caused by adjacent elements both having a class with a border
5039
				target.siblings( ".ui-state-active" ).removeClass( "ui-state-active" );
5040
				this.focus( event, target );
5041
			},
5042
			mouseleave: "collapseAll",
5043
			"mouseleave .ui-menu": "collapseAll",
5044
			focus: function( event, keepActiveItem ) {
5045
				// If there's already an active item, keep it active
5046
				// If not, activate the first item
5047
				var item = this.active || this.element.find( this.options.items ).eq( 0 );
5048
5049
				if ( !keepActiveItem ) {
5050
					this.focus( event, item );
5051
				}
5052
			},
5053
			blur: function( event ) {
5054
				this._delay(function() {
5055
					if ( !$.contains( this.element[0], this.document[0].activeElement ) ) {
5056
						this.collapseAll( event );
5057
					}
5058
				});
5059
			},
5060
			keydown: "_keydown"
5061
		});
5062
5063
		this.refresh();
5064
5065
		// Clicks outside of a menu collapse any open menus
5066
		this._on( this.document, {
5067
			click: function( event ) {
5068
				if ( this._closeOnDocumentClick( event ) ) {
5069
					this.collapseAll( event );
5070
				}
5071
5072
				// Reset the mouseHandled flag
5073
				this.mouseHandled = false;
5074
			}
5075
		});
5076
	},
5077
5078
	_destroy: function() {
5079
		// Destroy (sub)menus
5080
		this.element
5081
			.removeAttr( "aria-activedescendant" )
5082
			.find( ".ui-menu" ).addBack()
5083
				.removeClass( "ui-menu ui-widget ui-widget-content ui-menu-icons ui-front" )
5084
				.removeAttr( "role" )
5085
				.removeAttr( "tabIndex" )
5086
				.removeAttr( "aria-labelledby" )
5087
				.removeAttr( "aria-expanded" )
5088
				.removeAttr( "aria-hidden" )
5089
				.removeAttr( "aria-disabled" )
5090
				.removeUniqueId()
5091
				.show();
5092
5093
		// Destroy menu items
5094
		this.element.find( ".ui-menu-item" )
5095
			.removeClass( "ui-menu-item" )
5096
			.removeAttr( "role" )
5097
			.removeAttr( "aria-disabled" )
5098
			.removeUniqueId()
5099
			.removeClass( "ui-state-hover" )
5100
			.removeAttr( "tabIndex" )
5101
			.removeAttr( "role" )
5102
			.removeAttr( "aria-haspopup" )
5103
			.children().each( function() {
5104
				var elem = $( this );
5105
				if ( elem.data( "ui-menu-submenu-carat" ) ) {
5106
					elem.remove();
5107
				}
5108
			});
5109
5110
		// Destroy menu dividers
5111
		this.element.find( ".ui-menu-divider" ).removeClass( "ui-menu-divider ui-widget-content" );
5112
	},
5113
5114
	_keydown: function( event ) {
5115
		var match, prev, character, skip,
5116
			preventDefault = true;
5117
5118
		switch ( event.keyCode ) {
5119
		case $.ui.keyCode.PAGE_UP:
5120
			this.previousPage( event );
5121
			break;
5122
		case $.ui.keyCode.PAGE_DOWN:
5123
			this.nextPage( event );
5124
			break;
5125
		case $.ui.keyCode.HOME:
5126
			this._move( "first", "first", event );
5127
			break;
5128
		case $.ui.keyCode.END:
5129
			this._move( "last", "last", event );
5130
			break;
5131
		case $.ui.keyCode.UP:
5132
			this.previous( event );
5133
			break;
5134
		case $.ui.keyCode.DOWN:
5135
			this.next( event );
5136
			break;
5137
		case $.ui.keyCode.LEFT:
5138
			this.collapse( event );
5139
			break;
5140
		case $.ui.keyCode.RIGHT:
5141
			if ( this.active && !this.active.is( ".ui-state-disabled" ) ) {
5142
				this.expand( event );
5143
			}
5144
			break;
5145
		case $.ui.keyCode.ENTER:
5146
		case $.ui.keyCode.SPACE:
5147
			this._activate( event );
5148
			break;
5149
		case $.ui.keyCode.ESCAPE:
5150
			this.collapse( event );
5151
			break;
5152
		default:
5153
			preventDefault = false;
5154
			prev = this.previousFilter || "";
5155
			character = String.fromCharCode( event.keyCode );
5156
			skip = false;
5157
5158
			clearTimeout( this.filterTimer );
5159
5160
			if ( character === prev ) {
5161
				skip = true;
5162
			} else {
5163
				character = prev + character;
5164
			}
5165
5166
			match = this._filterMenuItems( character );
5167
			match = skip && match.index( this.active.next() ) !== -1 ?
5168
				this.active.nextAll( ".ui-menu-item" ) :
5169
				match;
5170
5171
			// If no matches on the current filter, reset to the last character pressed
5172
			// to move down the menu to the first item that starts with that character
5173
			if ( !match.length ) {
5174
				character = String.fromCharCode( event.keyCode );
5175
				match = this._filterMenuItems( character );
5176
			}
5177
5178
			if ( match.length ) {
5179
				this.focus( event, match );
5180
				this.previousFilter = character;
5181
				this.filterTimer = this._delay(function() {
5182
					delete this.previousFilter;
5183
				}, 1000 );
5184
			} else {
5185
				delete this.previousFilter;
5186
			}
5187
		}
5188
5189
		if ( preventDefault ) {
5190
			event.preventDefault();
5191
		}
5192
	},
5193
5194
	_activate: function( event ) {
5195
		if ( !this.active.is( ".ui-state-disabled" ) ) {
5196
			if ( this.active.is( "[aria-haspopup='true']" ) ) {
5197
				this.expand( event );
5198
			} else {
5199
				this.select( event );
5200
			}
5201
		}
5202
	},
5203
5204
	refresh: function() {
5205
		var menus, items,
5206
			that = this,
5207
			icon = this.options.icons.submenu,
5208
			submenus = this.element.find( this.options.menus );
5209
5210
		this.element.toggleClass( "ui-menu-icons", !!this.element.find( ".ui-icon" ).length );
5211
5212
		// Initialize nested menus
5213
		submenus.filter( ":not(.ui-menu)" )
5214
			.addClass( "ui-menu ui-widget ui-widget-content ui-front" )
5215
			.hide()
5216
			.attr({
5217
				role: this.options.role,
5218
				"aria-hidden": "true",
5219
				"aria-expanded": "false"
5220
			})
5221
			.each(function() {
5222
				var menu = $( this ),
5223
					item = menu.parent(),
5224
					submenuCarat = $( "<span>" )
5225
						.addClass( "ui-menu-icon ui-icon " + icon )
5226
						.data( "ui-menu-submenu-carat", true );
5227
5228
				item
5229
					.attr( "aria-haspopup", "true" )
5230
					.prepend( submenuCarat );
5231
				menu.attr( "aria-labelledby", item.attr( "id" ) );
5232
			});
5233
5234
		menus = submenus.add( this.element );
5235
		items = menus.find( this.options.items );
5236
5237
		// Initialize menu-items containing spaces and/or dashes only as dividers
5238
		items.not( ".ui-menu-item" ).each(function() {
5239
			var item = $( this );
5240
			if ( that._isDivider( item ) ) {
5241
				item.addClass( "ui-widget-content ui-menu-divider" );
5242
			}
5243
		});
5244
5245
		// Don't refresh list items that are already adapted
5246
		items.not( ".ui-menu-item, .ui-menu-divider" )
5247
			.addClass( "ui-menu-item" )
5248
			.uniqueId()
5249
			.attr({
5250
				tabIndex: -1,
5251
				role: this._itemRole()
5252
			});
5253
5254
		// Add aria-disabled attribute to any disabled menu item
5255
		items.filter( ".ui-state-disabled" ).attr( "aria-disabled", "true" );
5256
5257
		// If the active item has been removed, blur the menu
5258
		if ( this.active && !$.contains( this.element[ 0 ], this.active[ 0 ] ) ) {
5259
			this.blur();
5260
		}
5261
	},
5262
5263
	_itemRole: function() {
5264
		return {
5265
			menu: "menuitem",
5266
			listbox: "option"
5267
		}[ this.options.role ];
5268
	},
5269
5270
	_setOption: function( key, value ) {
5271
		if ( key === "icons" ) {
5272
			this.element.find( ".ui-menu-icon" )
5273
				.removeClass( this.options.icons.submenu )
5274
				.addClass( value.submenu );
5275
		}
5276
		if ( key === "disabled" ) {
5277
			this.element
5278
				.toggleClass( "ui-state-disabled", !!value )
5279
				.attr( "aria-disabled", value );
5280
		}
5281
		this._super( key, value );
5282
	},
5283
5284
	focus: function( event, item ) {
5285
		var nested, focused;
5286
		this.blur( event, event && event.type === "focus" );
5287
5288
		this._scrollIntoView( item );
5289
5290
		this.active = item.first();
5291
		focused = this.active.addClass( "ui-state-focus" ).removeClass( "ui-state-active" );
5292
		// Only update aria-activedescendant if there's a role
5293
		// otherwise we assume focus is managed elsewhere
5294
		if ( this.options.role ) {
5295
			this.element.attr( "aria-activedescendant", focused.attr( "id" ) );
5296
		}
5297
5298
		// Highlight active parent menu item, if any
5299
		this.active
5300
			.parent()
5301
			.closest( ".ui-menu-item" )
5302
			.addClass( "ui-state-active" );
5303
5304
		if ( event && event.type === "keydown" ) {
5305
			this._close();
5306
		} else {
5307
			this.timer = this._delay(function() {
5308
				this._close();
5309
			}, this.delay );
5310
		}
5311
5312
		nested = item.children( ".ui-menu" );
5313
		if ( nested.length && event && ( /^mouse/.test( event.type ) ) ) {
5314
			this._startOpening(nested);
5315
		}
5316
		this.activeMenu = item.parent();
5317
5318
		this._trigger( "focus", event, { item: item } );
5319
	},
5320
5321
	_scrollIntoView: function( item ) {
5322
		var borderTop, paddingTop, offset, scroll, elementHeight, itemHeight;
5323
		if ( this._hasScroll() ) {
5324
			borderTop = parseFloat( $.css( this.activeMenu[0], "borderTopWidth" ) ) || 0;
5325
			paddingTop = parseFloat( $.css( this.activeMenu[0], "paddingTop" ) ) || 0;
5326
			offset = item.offset().top - this.activeMenu.offset().top - borderTop - paddingTop;
5327
			scroll = this.activeMenu.scrollTop();
5328
			elementHeight = this.activeMenu.height();
5329
			itemHeight = item.outerHeight();
5330
5331
			if ( offset < 0 ) {
5332
				this.activeMenu.scrollTop( scroll + offset );
5333
			} else if ( offset + itemHeight > elementHeight ) {
5334
				this.activeMenu.scrollTop( scroll + offset - elementHeight + itemHeight );
5335
			}
5336
		}
5337
	},
5338
5339
	blur: function( event, fromFocus ) {
5340
		if ( !fromFocus ) {
5341
			clearTimeout( this.timer );
5342
		}
5343
5344
		if ( !this.active ) {
5345
			return;
5346
		}
5347
5348
		this.active.removeClass( "ui-state-focus" );
5349
		this.active = null;
5350
5351
		this._trigger( "blur", event, { item: this.active } );
5352
	},
5353
5354
	_startOpening: function( submenu ) {
5355
		clearTimeout( this.timer );
5356
5357
		// Don't open if already open fixes a Firefox bug that caused a .5 pixel
5358
		// shift in the submenu position when mousing over the carat icon
5359
		if ( submenu.attr( "aria-hidden" ) !== "true" ) {
5360
			return;
5361
		}
5362
5363
		this.timer = this._delay(function() {
5364
			this._close();
5365
			this._open( submenu );
5366
		}, this.delay );
5367
	},
5368
5369
	_open: function( submenu ) {
5370
		var position = $.extend({
5371
			of: this.active
5372
		}, this.options.position );
5373
5374
		clearTimeout( this.timer );
5375
		this.element.find( ".ui-menu" ).not( submenu.parents( ".ui-menu" ) )
5376
			.hide()
5377
			.attr( "aria-hidden", "true" );
5378
5379
		submenu
5380
			.show()
5381
			.removeAttr( "aria-hidden" )
5382
			.attr( "aria-expanded", "true" )
5383
			.position( position );
5384
	},
5385
5386
	collapseAll: function( event, all ) {
5387
		clearTimeout( this.timer );
5388
		this.timer = this._delay(function() {
5389
			// If we were passed an event, look for the submenu that contains the event
5390
			var currentMenu = all ? this.element :
5391
				$( event && event.target ).closest( this.element.find( ".ui-menu" ) );
5392
5393
			// If we found no valid submenu ancestor, use the main menu to close all sub menus anyway
5394
			if ( !currentMenu.length ) {
5395
				currentMenu = this.element;
5396
			}
5397
5398
			this._close( currentMenu );
5399
5400
			this.blur( event );
5401
			this.activeMenu = currentMenu;
5402
		}, this.delay );
5403
	},
5404
5405
	// With no arguments, closes the currently active menu - if nothing is active
5406
	// it closes all menus.  If passed an argument, it will search for menus BELOW
5407
	_close: function( startMenu ) {
5408
		if ( !startMenu ) {
5409
			startMenu = this.active ? this.active.parent() : this.element;
5410
		}
5411
5412
		startMenu
5413
			.find( ".ui-menu" )
5414
				.hide()
5415
				.attr( "aria-hidden", "true" )
5416
				.attr( "aria-expanded", "false" )
5417
			.end()
5418
			.find( ".ui-state-active" ).not( ".ui-state-focus" )
5419
				.removeClass( "ui-state-active" );
5420
	},
5421
5422
	_closeOnDocumentClick: function( event ) {
5423
		return !$( event.target ).closest( ".ui-menu" ).length;
5424
	},
5425
5426
	_isDivider: function( item ) {
5427
5428
		// Match hyphen, em dash, en dash
5429
		return !/[^\-\u2014\u2013\s]/.test( item.text() );
5430
	},
5431
5432
	collapse: function( event ) {
5433
		var newItem = this.active &&
5434
			this.active.parent().closest( ".ui-menu-item", this.element );
5435
		if ( newItem && newItem.length ) {
5436
			this._close();
5437
			this.focus( event, newItem );
5438
		}
5439
	},
5440
5441
	expand: function( event ) {
5442
		var newItem = this.active &&
5443
			this.active
5444
				.children( ".ui-menu " )
5445
				.find( this.options.items )
5446
				.first();
5447
5448
		if ( newItem && newItem.length ) {
5449
			this._open( newItem.parent() );
5450
5451
			// Delay so Firefox will not hide activedescendant change in expanding submenu from AT
5452
			this._delay(function() {
5453
				this.focus( event, newItem );
5454
			});
5455
		}
5456
	},
5457
5458
	next: function( event ) {
5459
		this._move( "next", "first", event );
5460
	},
5461
5462
	previous: function( event ) {
5463
		this._move( "prev", "last", event );
5464
	},
5465
5466
	isFirstItem: function() {
5467
		return this.active && !this.active.prevAll( ".ui-menu-item" ).length;
5468
	},
5469
5470
	isLastItem: function() {
5471
		return this.active && !this.active.nextAll( ".ui-menu-item" ).length;
5472
	},
5473
5474
	_move: function( direction, filter, event ) {
5475
		var next;
5476
		if ( this.active ) {
5477
			if ( direction === "first" || direction === "last" ) {
5478
				next = this.active
5479
					[ direction === "first" ? "prevAll" : "nextAll" ]( ".ui-menu-item" )
5480
					.eq( -1 );
5481
			} else {
5482
				next = this.active
5483
					[ direction + "All" ]( ".ui-menu-item" )
5484
					.eq( 0 );
5485
			}
5486
		}
5487
		if ( !next || !next.length || !this.active ) {
5488
			next = this.activeMenu.find( this.options.items )[ filter ]();
5489
		}
5490
5491
		this.focus( event, next );
5492
	},
5493
5494
	nextPage: function( event ) {
5495
		var item, base, height;
5496
5497
		if ( !this.active ) {
5498
			this.next( event );
5499
			return;
5500
		}
5501
		if ( this.isLastItem() ) {
5502
			return;
5503
		}
5504
		if ( this._hasScroll() ) {
5505
			base = this.active.offset().top;
5506
			height = this.element.height();
5507
			this.active.nextAll( ".ui-menu-item" ).each(function() {
5508
				item = $( this );
5509
				return item.offset().top - base - height < 0;
5510
			});
5511
5512
			this.focus( event, item );
5513
		} else {
5514
			this.focus( event, this.activeMenu.find( this.options.items )
5515
				[ !this.active ? "first" : "last" ]() );
5516
		}
5517
	},
5518
5519
	previousPage: function( event ) {
5520
		var item, base, height;
5521
		if ( !this.active ) {
5522
			this.next( event );
5523
			return;
5524
		}
5525
		if ( this.isFirstItem() ) {
5526
			return;
5527
		}
5528
		if ( this._hasScroll() ) {
5529
			base = this.active.offset().top;
5530
			height = this.element.height();
5531
			this.active.prevAll( ".ui-menu-item" ).each(function() {
5532
				item = $( this );
5533
				return item.offset().top - base + height > 0;
5534
			});
5535
5536
			this.focus( event, item );
5537
		} else {
5538
			this.focus( event, this.activeMenu.find( this.options.items ).first() );
5539
		}
5540
	},
5541
5542
	_hasScroll: function() {
5543
		return this.element.outerHeight() < this.element.prop( "scrollHeight" );
5544
	},
5545
5546
	select: function( event ) {
5547
		// TODO: It should never be possible to not have an active item at this
5548
		// point, but the tests don't trigger mouseenter before click.
5549
		this.active = this.active || $( event.target ).closest( ".ui-menu-item" );
5550
		var ui = { item: this.active };
5551
		if ( !this.active.has( ".ui-menu" ).length ) {
5552
			this.collapseAll( event, true );
5553
		}
5554
		this._trigger( "select", event, ui );
5555
	},
5556
5557
	_filterMenuItems: function(character) {
5558
		var escapedCharacter = character.replace( /[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&" ),
5559
			regex = new RegExp( "^" + escapedCharacter, "i" );
5560
5561
		return this.activeMenu
5562
			.find( this.options.items )
5563
5564
			// Only match on items, not dividers or other content (#10571)
5565
			.filter( ".ui-menu-item" )
5566
			.filter(function() {
5567
				return regex.test( $.trim( $( this ).text() ) );
5568
			});
5569
	}
5570
});
5571
5572
5573
/*!
5574
 * jQuery UI Autocomplete 1.11.4
5575
 * http://jqueryui.com
5576
 *
5577
 * Copyright jQuery Foundation and other contributors
5578
 * Released under the MIT license.
5579
 * http://jquery.org/license
5580
 *
5581
 * http://api.jqueryui.com/autocomplete/
5582
 */
5583
5584
5585
$.widget( "ui.autocomplete", {
5586
	version: "1.11.4",
5587
	defaultElement: "<input>",
5588
	options: {
5589
		appendTo: null,
5590
		autoFocus: false,
5591
		delay: 300,
5592
		minLength: 1,
5593
		position: {
5594
			my: "left top",
5595
			at: "left bottom",
5596
			collision: "none"
5597
		},
5598
		source: null,
5599
5600
		// callbacks
5601
		change: null,
5602
		close: null,
5603
		focus: null,
5604
		open: null,
5605
		response: null,
5606
		search: null,
5607
		select: null
5608
	},
5609
5610
	requestIndex: 0,
5611
	pending: 0,
5612
5613
	_create: function() {
5614
		// Some browsers only repeat keydown events, not keypress events,
5615
		// so we use the suppressKeyPress flag to determine if we've already
5616
		// handled the keydown event. #7269
5617
		// Unfortunately the code for & in keypress is the same as the up arrow,
5618
		// so we use the suppressKeyPressRepeat flag to avoid handling keypress
5619
		// events when we know the keydown event was used to modify the
5620
		// search term. #7799
5621
		var suppressKeyPress, suppressKeyPressRepeat, suppressInput,
5622
			nodeName = this.element[ 0 ].nodeName.toLowerCase(),
5623
			isTextarea = nodeName === "textarea",
5624
			isInput = nodeName === "input";
5625
5626
		this.isMultiLine =
5627
			// Textareas are always multi-line
5628
			isTextarea ? true :
5629
			// Inputs are always single-line, even if inside a contentEditable element
5630
			// IE also treats inputs as contentEditable
5631
			isInput ? false :
5632
			// All other element types are determined by whether or not they're contentEditable
5633
			this.element.prop( "isContentEditable" );
5634
5635
		this.valueMethod = this.element[ isTextarea || isInput ? "val" : "text" ];
5636
		this.isNewMenu = true;
5637
5638
		this.element
5639
			.addClass( "ui-autocomplete-input" )
5640
			.attr( "autocomplete", "off" );
5641
5642
		this._on( this.element, {
5643
			keydown: function( event ) {
5644
				if ( this.element.prop( "readOnly" ) ) {
5645
					suppressKeyPress = true;
5646
					suppressInput = true;
5647
					suppressKeyPressRepeat = true;
5648
					return;
5649
				}
5650
5651
				suppressKeyPress = false;
5652
				suppressInput = false;
5653
				suppressKeyPressRepeat = false;
5654
				var keyCode = $.ui.keyCode;
5655
				switch ( event.keyCode ) {
5656
				case keyCode.PAGE_UP:
5657
					suppressKeyPress = true;
5658
					this._move( "previousPage", event );
5659
					break;
5660
				case keyCode.PAGE_DOWN:
5661
					suppressKeyPress = true;
5662
					this._move( "nextPage", event );
5663
					break;
5664
				case keyCode.UP:
5665
					suppressKeyPress = true;
5666
					this._keyEvent( "previous", event );
5667
					break;
5668
				case keyCode.DOWN:
5669
					suppressKeyPress = true;
5670
					this._keyEvent( "next", event );
5671
					break;
5672
				case keyCode.ENTER:
5673
					// when menu is open and has focus
5674
					if ( this.menu.active ) {
5675
						// #6055 - Opera still allows the keypress to occur
5676
						// which causes forms to submit
5677
						suppressKeyPress = true;
5678
						event.preventDefault();
5679
						this.menu.select( event );
5680
					}
5681
					break;
5682
				case keyCode.TAB:
5683
					if ( this.menu.active ) {
5684
						this.menu.select( event );
5685
					}
5686
					break;
5687
				case keyCode.ESCAPE:
5688
					if ( this.menu.element.is( ":visible" ) ) {
5689
						if ( !this.isMultiLine ) {
5690
							this._value( this.term );
5691
						}
5692
						this.close( event );
5693
						// Different browsers have different default behavior for escape
5694
						// Single press can mean undo or clear
5695
						// Double press in IE means clear the whole form
5696
						event.preventDefault();
5697
					}
5698
					break;
5699
				default:
5700
					suppressKeyPressRepeat = true;
5701
					// search timeout should be triggered before the input value is changed
5702
					this._searchTimeout( event );
5703
					break;
5704
				}
5705
			},
5706
			keypress: function( event ) {
5707
				if ( suppressKeyPress ) {
5708
					suppressKeyPress = false;
5709
					if ( !this.isMultiLine || this.menu.element.is( ":visible" ) ) {
5710
						event.preventDefault();
5711
					}
5712
					return;
5713
				}
5714
				if ( suppressKeyPressRepeat ) {
5715
					return;
5716
				}
5717
5718
				// replicate some key handlers to allow them to repeat in Firefox and Opera
5719
				var keyCode = $.ui.keyCode;
5720
				switch ( event.keyCode ) {
5721
				case keyCode.PAGE_UP:
5722
					this._move( "previousPage", event );
5723
					break;
5724
				case keyCode.PAGE_DOWN:
5725
					this._move( "nextPage", event );
5726
					break;
5727
				case keyCode.UP:
5728
					this._keyEvent( "previous", event );
5729
					break;
5730
				case keyCode.DOWN:
5731
					this._keyEvent( "next", event );
5732
					break;
5733
				}
5734
			},
5735
			input: function( event ) {
5736
				if ( suppressInput ) {
5737
					suppressInput = false;
5738
					event.preventDefault();
5739
					return;
5740
				}
5741
				this._searchTimeout( event );
5742
			},
5743
			focus: function() {
5744
				this.selectedItem = null;
5745
				this.previous = this._value();
5746
			},
5747
			blur: function( event ) {
5748
				if ( this.cancelBlur ) {
5749
					delete this.cancelBlur;
5750
					return;
5751
				}
5752
5753
				clearTimeout( this.searching );
5754
				this.close( event );
5755
				this._change( event );
5756
			}
5757
		});
5758
5759
		this._initSource();
5760
		this.menu = $( "<ul>" )
5761
			.addClass( "ui-autocomplete ui-front" )
5762
			.appendTo( this._appendTo() )
5763
			.menu({
5764
				// disable ARIA support, the live region takes care of that
5765
				role: null
5766
			})
5767
			.hide()
5768
			.menu( "instance" );
5769
5770
		this._on( this.menu.element, {
5771
			mousedown: function( event ) {
5772
				// prevent moving focus out of the text field
5773
				event.preventDefault();
5774
5775
				// IE doesn't prevent moving focus even with event.preventDefault()
5776
				// so we set a flag to know when we should ignore the blur event
5777
				this.cancelBlur = true;
5778
				this._delay(function() {
5779
					delete this.cancelBlur;
5780
				});
5781
5782
				// clicking on the scrollbar causes focus to shift to the body
5783
				// but we can't detect a mouseup or a click immediately afterward
5784
				// so we have to track the next mousedown and close the menu if
5785
				// the user clicks somewhere outside of the autocomplete
5786
				var menuElement = this.menu.element[ 0 ];
5787
				if ( !$( event.target ).closest( ".ui-menu-item" ).length ) {
5788
					this._delay(function() {
5789
						var that = this;
5790
						this.document.one( "mousedown", function( event ) {
5791
							if ( event.target !== that.element[ 0 ] &&
5792
									event.target !== menuElement &&
5793
									!$.contains( menuElement, event.target ) ) {
5794
								that.close();
5795
							}
5796
						});
5797
					});
5798
				}
5799
			},
5800
			menufocus: function( event, ui ) {
5801
				var label, item;
5802
				// support: Firefox
5803
				// Prevent accidental activation of menu items in Firefox (#7024 #9118)
5804
				if ( this.isNewMenu ) {
5805
					this.isNewMenu = false;
5806
					if ( event.originalEvent && /^mouse/.test( event.originalEvent.type ) ) {
5807
						this.menu.blur();
5808
5809
						this.document.one( "mousemove", function() {
5810
							$( event.target ).trigger( event.originalEvent );
5811
						});
5812
5813
						return;
5814
					}
5815
				}
5816
5817
				item = ui.item.data( "ui-autocomplete-item" );
5818
				if ( false !== this._trigger( "focus", event, { item: item } ) ) {
5819
					// use value to match what will end up in the input, if it was a key event
5820
					if ( event.originalEvent && /^key/.test( event.originalEvent.type ) ) {
5821
						this._value( item.value );
5822
					}
5823
				}
5824
5825
				// Announce the value in the liveRegion
5826
				label = ui.item.attr( "aria-label" ) || item.value;
5827
				if ( label && $.trim( label ).length ) {
5828
					this.liveRegion.children().hide();
5829
					$( "<div>" ).text( label ).appendTo( this.liveRegion );
5830
				}
5831
			},
5832
			menuselect: function( event, ui ) {
5833
				var item = ui.item.data( "ui-autocomplete-item" ),
5834
					previous = this.previous;
5835
5836
				// only trigger when focus was lost (click on menu)
5837
				if ( this.element[ 0 ] !== this.document[ 0 ].activeElement ) {
5838
					this.element.focus();
5839
					this.previous = previous;
5840
					// #6109 - IE triggers two focus events and the second
5841
					// is asynchronous, so we need to reset the previous
5842
					// term synchronously and asynchronously :-(
5843
					this._delay(function() {
5844
						this.previous = previous;
5845
						this.selectedItem = item;
5846
					});
5847
				}
5848
5849
				if ( false !== this._trigger( "select", event, { item: item } ) ) {
5850
					this._value( item.value );
5851
				}
5852
				// reset the term after the select event
5853
				// this allows custom select handling to work properly
5854
				this.term = this._value();
5855
5856
				this.close( event );
5857
				this.selectedItem = item;
5858
			}
5859
		});
5860
5861
		this.liveRegion = $( "<span>", {
5862
				role: "status",
5863
				"aria-live": "assertive",
5864
				"aria-relevant": "additions"
5865
			})
5866
			.addClass( "ui-helper-hidden-accessible" )
5867
			.appendTo( this.document[ 0 ].body );
5868
5869
		// turning off autocomplete prevents the browser from remembering the
5870
		// value when navigating through history, so we re-enable autocomplete
5871
		// if the page is unloaded before the widget is destroyed. #7790
5872
		this._on( this.window, {
5873
			beforeunload: function() {
5874
				this.element.removeAttr( "autocomplete" );
5875
			}
5876
		});
5877
	},
5878
5879
	_destroy: function() {
5880
		clearTimeout( this.searching );
5881
		this.element
5882
			.removeClass( "ui-autocomplete-input" )
5883
			.removeAttr( "autocomplete" );
5884
		this.menu.element.remove();
5885
		this.liveRegion.remove();
5886
	},
5887
5888
	_setOption: function( key, value ) {
5889
		this._super( key, value );
5890
		if ( key === "source" ) {
5891
			this._initSource();
5892
		}
5893
		if ( key === "appendTo" ) {
5894
			this.menu.element.appendTo( this._appendTo() );
5895
		}
5896
		if ( key === "disabled" && value && this.xhr ) {
5897
			this.xhr.abort();
5898
		}
5899
	},
5900
5901
	_appendTo: function() {
5902
		var element = this.options.appendTo;
5903
5904
		if ( element ) {
5905
			element = element.jquery || element.nodeType ?
5906
				$( element ) :
5907
				this.document.find( element ).eq( 0 );
5908
		}
5909
5910
		if ( !element || !element[ 0 ] ) {
5911
			element = this.element.closest( ".ui-front" );
5912
		}
5913
5914
		if ( !element.length ) {
5915
			element = this.document[ 0 ].body;
5916
		}
5917
5918
		return element;
5919
	},
5920
5921
	_initSource: function() {
5922
		var array, url,
5923
			that = this;
5924
		if ( $.isArray( this.options.source ) ) {
5925
			array = this.options.source;
5926
			this.source = function( request, response ) {
5927
				response( $.ui.autocomplete.filter( array, request.term ) );
5928
			};
5929
		} else if ( typeof this.options.source === "string" ) {
5930
			url = this.options.source;
5931
			this.source = function( request, response ) {
5932
				if ( that.xhr ) {
5933
					that.xhr.abort();
5934
				}
5935
				that.xhr = $.ajax({
5936
					url: url,
5937
					data: request,
5938
					dataType: "json",
5939
					success: function( data ) {
5940
						response( data );
5941
					},
5942
					error: function() {
5943
						response([]);
5944
					}
5945
				});
5946
			};
5947
		} else {
5948
			this.source = this.options.source;
5949
		}
5950
	},
5951
5952
	_searchTimeout: function( event ) {
5953
		clearTimeout( this.searching );
5954
		this.searching = this._delay(function() {
5955
5956
			// Search if the value has changed, or if the user retypes the same value (see #7434)
5957
			var equalValues = this.term === this._value(),
5958
				menuVisible = this.menu.element.is( ":visible" ),
5959
				modifierKey = event.altKey || event.ctrlKey || event.metaKey || event.shiftKey;
5960
5961
			if ( !equalValues || ( equalValues && !menuVisible && !modifierKey ) ) {
5962
				this.selectedItem = null;
5963
				this.search( null, event );
5964
			}
5965
		}, this.options.delay );
5966
	},
5967
5968
	search: function( value, event ) {
5969
		value = value != null ? value : this._value();
5970
5971
		// always save the actual value, not the one passed as an argument
5972
		this.term = this._value();
5973
5974
		if ( value.length < this.options.minLength ) {
5975
			return this.close( event );
5976
		}
5977
5978
		if ( this._trigger( "search", event ) === false ) {
5979
			return;
5980
		}
5981
5982
		return this._search( value );
5983
	},
5984
5985
	_search: function( value ) {
5986
		this.pending++;
5987
		this.element.addClass( "ui-autocomplete-loading" );
5988
		this.cancelSearch = false;
5989
5990
		this.source( { term: value }, this._response() );
5991
	},
5992
5993
	_response: function() {
5994
		var index = ++this.requestIndex;
5995
5996
		return $.proxy(function( content ) {
5997
			if ( index === this.requestIndex ) {
5998
				this.__response( content );
5999
			}
6000
6001
			this.pending--;
6002
			if ( !this.pending ) {
6003
				this.element.removeClass( "ui-autocomplete-loading" );
6004
			}
6005
		}, this );
6006
	},
6007
6008
	__response: function( content ) {
6009
		if ( content ) {
6010
			content = this._normalize( content );
6011
		}
6012
		this._trigger( "response", null, { content: content } );
6013
		if ( !this.options.disabled && content && content.length && !this.cancelSearch ) {
6014
			this._suggest( content );
6015
			this._trigger( "open" );
6016
		} else {
6017
			// use ._close() instead of .close() so we don't cancel future searches
6018
			this._close();
6019
		}
6020
	},
6021
6022
	close: function( event ) {
6023
		this.cancelSearch = true;
6024
		this._close( event );
6025
	},
6026
6027
	_close: function( event ) {
6028
		if ( this.menu.element.is( ":visible" ) ) {
6029
			this.menu.element.hide();
6030
			this.menu.blur();
6031
			this.isNewMenu = true;
6032
			this._trigger( "close", event );
6033
		}
6034
	},
6035
6036
	_change: function( event ) {
6037
		if ( this.previous !== this._value() ) {
6038
			this._trigger( "change", event, { item: this.selectedItem } );
6039
		}
6040
	},
6041
6042
	_normalize: function( items ) {
6043
		// assume all items have the right format when the first item is complete
6044
		if ( items.length && items[ 0 ].label && items[ 0 ].value ) {
6045
			return items;
6046
		}
6047
		return $.map( items, function( item ) {
6048
			if ( typeof item === "string" ) {
6049
				return {
6050
					label: item,
6051
					value: item
6052
				};
6053
			}
6054
			return $.extend( {}, item, {
6055
				label: item.label || item.value,
6056
				value: item.value || item.label
6057
			});
6058
		});
6059
	},
6060
6061
	_suggest: function( items ) {
6062
		var ul = this.menu.element.empty();
6063
		this._renderMenu( ul, items );
6064
		this.isNewMenu = true;
6065
		this.menu.refresh();
6066
6067
		// size and position menu
6068
		ul.show();
6069
		this._resizeMenu();
6070
		ul.position( $.extend({
6071
			of: this.element
6072
		}, this.options.position ) );
6073
6074
		if ( this.options.autoFocus ) {
6075
			this.menu.next();
6076
		}
6077
	},
6078
6079
	_resizeMenu: function() {
6080
		var ul = this.menu.element;
6081
		ul.outerWidth( Math.max(
6082
			// Firefox wraps long text (possibly a rounding bug)
6083
			// so we add 1px to avoid the wrapping (#7513)
6084
			ul.width( "" ).outerWidth() + 1,
6085
			this.element.outerWidth()
6086
		) );
6087
	},
6088
6089
	_renderMenu: function( ul, items ) {
6090
		var that = this;
6091
		$.each( items, function( index, item ) {
6092
			that._renderItemData( ul, item );
6093
		});
6094
	},
6095
6096
	_renderItemData: function( ul, item ) {
6097
		return this._renderItem( ul, item ).data( "ui-autocomplete-item", item );
6098
	},
6099
6100
	_renderItem: function( ul, item ) {
6101
		return $( "<li>" ).text( item.label ).appendTo( ul );
6102
	},
6103
6104
	_move: function( direction, event ) {
6105
		if ( !this.menu.element.is( ":visible" ) ) {
6106
			this.search( null, event );
6107
			return;
6108
		}
6109
		if ( this.menu.isFirstItem() && /^previous/.test( direction ) ||
6110
				this.menu.isLastItem() && /^next/.test( direction ) ) {
6111
6112
			if ( !this.isMultiLine ) {
6113
				this._value( this.term );
6114
			}
6115
6116
			this.menu.blur();
6117
			return;
6118
		}
6119
		this.menu[ direction ]( event );
6120
	},
6121
6122
	widget: function() {
6123
		return this.menu.element;
6124
	},
6125
6126
	_value: function() {
6127
		return this.valueMethod.apply( this.element, arguments );
6128
	},
6129
6130
	_keyEvent: function( keyEvent, event ) {
6131
		if ( !this.isMultiLine || this.menu.element.is( ":visible" ) ) {
6132
			this._move( keyEvent, event );
6133
6134
			// prevents moving cursor to beginning/end of the text field in some browsers
6135
			event.preventDefault();
6136
		}
6137
	}
6138
});
6139
6140
$.extend( $.ui.autocomplete, {
6141
	escapeRegex: function( value ) {
6142
		return value.replace( /[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&" );
6143
	},
6144
	filter: function( array, term ) {
6145
		var matcher = new RegExp( $.ui.autocomplete.escapeRegex( term ), "i" );
6146
		return $.grep( array, function( value ) {
6147
			return matcher.test( value.label || value.value || value );
6148
		});
6149
	}
6150
});
6151
6152
// live region extension, adding a `messages` option
6153
// NOTE: This is an experimental API. We are still investigating
6154
// a full solution for string manipulation and internationalization.
6155
$.widget( "ui.autocomplete", $.ui.autocomplete, {
6156
	options: {
6157
		messages: {
6158
			noResults: "No search results.",
6159
			results: function( amount ) {
6160
				return amount + ( amount > 1 ? " results are" : " result is" ) +
6161
					" available, use up and down arrow keys to navigate.";
6162
			}
6163
		}
6164
	},
6165
6166
	__response: function( content ) {
6167
		var message;
6168
		this._superApply( arguments );
6169
		if ( this.options.disabled || this.cancelSearch ) {
6170
			return;
6171
		}
6172
		if ( content && content.length ) {
6173
			message = this.options.messages.results( content.length );
6174
		} else {
6175
			message = this.options.messages.noResults;
6176
		}
6177
		this.liveRegion.children().hide();
6178
		$( "<div>" ).text( message ).appendTo( this.liveRegion );
6179
	}
6180
});
6181
6182
var autocomplete = $.ui.autocomplete;
6183
6184
6185
/*!
6186
 * jQuery UI Button 1.11.4
6187
 * http://jqueryui.com
6188
 *
6189
 * Copyright jQuery Foundation and other contributors
6190
 * Released under the MIT license.
6191
 * http://jquery.org/license
6192
 *
6193
 * http://api.jqueryui.com/button/
6194
 */
6195
6196
6197
var lastActive,
6198
	baseClasses = "ui-button ui-widget ui-state-default ui-corner-all",
6199
	typeClasses = "ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",
6200
	formResetHandler = function() {
6201
		var form = $( this );
6202
		setTimeout(function() {
6203
			form.find( ":ui-button" ).button( "refresh" );
6204
		}, 1 );
6205
	},
6206
	radioGroup = function( radio ) {
6207
		var name = radio.name,
6208
			form = radio.form,
6209
			radios = $( [] );
6210
		if ( name ) {
6211
			name = name.replace( /'/g, "\\'" );
6212
			if ( form ) {
6213
				radios = $( form ).find( "[name='" + name + "'][type=radio]" );
6214
			} else {
6215
				radios = $( "[name='" + name + "'][type=radio]", radio.ownerDocument )
6216
					.filter(function() {
6217
						return !this.form;
6218
					});
6219
			}
6220
		}
6221
		return radios;
6222
	};
6223
6224
$.widget( "ui.button", {
6225
	version: "1.11.4",
6226
	defaultElement: "<button>",
6227
	options: {
6228
		disabled: null,
6229
		text: true,
6230
		label: null,
6231
		icons: {
6232
			primary: null,
6233
			secondary: null
6234
		}
6235
	},
6236
	_create: function() {
6237
		this.element.closest( "form" )
6238
			.unbind( "reset" + this.eventNamespace )
6239
			.bind( "reset" + this.eventNamespace, formResetHandler );
6240
6241
		if ( typeof this.options.disabled !== "boolean" ) {
6242
			this.options.disabled = !!this.element.prop( "disabled" );
6243
		} else {
6244
			this.element.prop( "disabled", this.options.disabled );
6245
		}
6246
6247
		this._determineButtonType();
6248
		this.hasTitle = !!this.buttonElement.attr( "title" );
6249
6250
		var that = this,
6251
			options = this.options,
6252
			toggleButton = this.type === "checkbox" || this.type === "radio",
6253
			activeClass = !toggleButton ? "ui-state-active" : "";
6254
6255
		if ( options.label === null ) {
6256
			options.label = (this.type === "input" ? this.buttonElement.val() : this.buttonElement.html());
6257
		}
6258
6259
		this._hoverable( this.buttonElement );
6260
6261
		this.buttonElement
6262
			.addClass( baseClasses )
6263
			.attr( "role", "button" )
6264
			.bind( "mouseenter" + this.eventNamespace, function() {
6265
				if ( options.disabled ) {
6266
					return;
6267
				}
6268
				if ( this === lastActive ) {
6269
					$( this ).addClass( "ui-state-active" );
6270
				}
6271
			})
6272
			.bind( "mouseleave" + this.eventNamespace, function() {
6273
				if ( options.disabled ) {
6274
					return;
6275
				}
6276
				$( this ).removeClass( activeClass );
6277
			})
6278
			.bind( "click" + this.eventNamespace, function( event ) {
6279
				if ( options.disabled ) {
6280
					event.preventDefault();
6281
					event.stopImmediatePropagation();
6282
				}
6283
			});
6284
6285
		// Can't use _focusable() because the element that receives focus
6286
		// and the element that gets the ui-state-focus class are different
6287
		this._on({
6288
			focus: function() {
6289
				this.buttonElement.addClass( "ui-state-focus" );
6290
			},
6291
			blur: function() {
6292
				this.buttonElement.removeClass( "ui-state-focus" );
6293
			}
6294
		});
6295
6296
		if ( toggleButton ) {
6297
			this.element.bind( "change" + this.eventNamespace, function() {
6298
				that.refresh();
6299
			});
6300
		}
6301
6302
		if ( this.type === "checkbox" ) {
6303
			this.buttonElement.bind( "click" + this.eventNamespace, function() {
6304
				if ( options.disabled ) {
6305
					return false;
6306
				}
6307
			});
6308
		} else if ( this.type === "radio" ) {
6309
			this.buttonElement.bind( "click" + this.eventNamespace, function() {
6310
				if ( options.disabled ) {
6311
					return false;
6312
				}
6313
				$( this ).addClass( "ui-state-active" );
6314
				that.buttonElement.attr( "aria-pressed", "true" );
6315
6316
				var radio = that.element[ 0 ];
6317
				radioGroup( radio )
6318
					.not( radio )
6319
					.map(function() {
6320
						return $( this ).button( "widget" )[ 0 ];
6321
					})
6322
					.removeClass( "ui-state-active" )
6323
					.attr( "aria-pressed", "false" );
6324
			});
6325
		} else {
6326
			this.buttonElement
6327
				.bind( "mousedown" + this.eventNamespace, function() {
6328
					if ( options.disabled ) {
6329
						return false;
6330
					}
6331
					$( this ).addClass( "ui-state-active" );
6332
					lastActive = this;
6333
					that.document.one( "mouseup", function() {
6334
						lastActive = null;
6335
					});
6336
				})
6337
				.bind( "mouseup" + this.eventNamespace, function() {
6338
					if ( options.disabled ) {
6339
						return false;
6340
					}
6341
					$( this ).removeClass( "ui-state-active" );
6342
				})
6343
				.bind( "keydown" + this.eventNamespace, function(event) {
6344
					if ( options.disabled ) {
6345
						return false;
6346
					}
6347
					if ( event.keyCode === $.ui.keyCode.SPACE || event.keyCode === $.ui.keyCode.ENTER ) {
6348
						$( this ).addClass( "ui-state-active" );
6349
					}
6350
				})
6351
				// see #8559, we bind to blur here in case the button element loses
6352
				// focus between keydown and keyup, it would be left in an "active" state
6353
				.bind( "keyup" + this.eventNamespace + " blur" + this.eventNamespace, function() {
6354
					$( this ).removeClass( "ui-state-active" );
6355
				});
6356
6357
			if ( this.buttonElement.is("a") ) {
6358
				this.buttonElement.keyup(function(event) {
6359
					if ( event.keyCode === $.ui.keyCode.SPACE ) {
6360
						// TODO pass through original event correctly (just as 2nd argument doesn't work)
6361
						$( this ).click();
6362
					}
6363
				});
6364
			}
6365
		}
6366
6367
		this._setOption( "disabled", options.disabled );
6368
		this._resetButton();
6369
	},
6370
6371
	_determineButtonType: function() {
6372
		var ancestor, labelSelector, checked;
6373
6374
		if ( this.element.is("[type=checkbox]") ) {
6375
			this.type = "checkbox";
6376
		} else if ( this.element.is("[type=radio]") ) {
6377
			this.type = "radio";
6378
		} else if ( this.element.is("input") ) {
6379
			this.type = "input";
6380
		} else {
6381
			this.type = "button";
6382
		}
6383
6384
		if ( this.type === "checkbox" || this.type === "radio" ) {
6385
			// we don't search against the document in case the element
6386
			// is disconnected from the DOM
6387
			ancestor = this.element.parents().last();
6388
			labelSelector = "label[for='" + this.element.attr("id") + "']";
6389
			this.buttonElement = ancestor.find( labelSelector );
6390
			if ( !this.buttonElement.length ) {
6391
				ancestor = ancestor.length ? ancestor.siblings() : this.element.siblings();
6392
				this.buttonElement = ancestor.filter( labelSelector );
6393
				if ( !this.buttonElement.length ) {
6394
					this.buttonElement = ancestor.find( labelSelector );
6395
				}
6396
			}
6397
			this.element.addClass( "ui-helper-hidden-accessible" );
6398
6399
			checked = this.element.is( ":checked" );
6400
			if ( checked ) {
6401
				this.buttonElement.addClass( "ui-state-active" );
6402
			}
6403
			this.buttonElement.prop( "aria-pressed", checked );
6404
		} else {
6405
			this.buttonElement = this.element;
6406
		}
6407
	},
6408
6409
	widget: function() {
6410
		return this.buttonElement;
6411
	},
6412
6413
	_destroy: function() {
6414
		this.element
6415
			.removeClass( "ui-helper-hidden-accessible" );
6416
		this.buttonElement
6417
			.removeClass( baseClasses + " ui-state-active " + typeClasses )
6418
			.removeAttr( "role" )
6419
			.removeAttr( "aria-pressed" )
6420
			.html( this.buttonElement.find(".ui-button-text").html() );
6421
6422
		if ( !this.hasTitle ) {
6423
			this.buttonElement.removeAttr( "title" );
6424
		}
6425
	},
6426
6427
	_setOption: function( key, value ) {
6428
		this._super( key, value );
6429
		if ( key === "disabled" ) {
6430
			this.widget().toggleClass( "ui-state-disabled", !!value );
6431
			this.element.prop( "disabled", !!value );
6432
			if ( value ) {
6433
				if ( this.type === "checkbox" || this.type === "radio" ) {
6434
					this.buttonElement.removeClass( "ui-state-focus" );
6435
				} else {
6436
					this.buttonElement.removeClass( "ui-state-focus ui-state-active" );
6437
				}
6438
			}
6439
			return;
6440
		}
6441
		this._resetButton();
6442
	},
6443
6444
	refresh: function() {
6445
		//See #8237 & #8828
6446
		var isDisabled = this.element.is( "input, button" ) ? this.element.is( ":disabled" ) : this.element.hasClass( "ui-button-disabled" );
6447
6448
		if ( isDisabled !== this.options.disabled ) {
6449
			this._setOption( "disabled", isDisabled );
6450
		}
6451
		if ( this.type === "radio" ) {
6452
			radioGroup( this.element[0] ).each(function() {
6453
				if ( $( this ).is( ":checked" ) ) {
6454
					$( this ).button( "widget" )
6455
						.addClass( "ui-state-active" )
6456
						.attr( "aria-pressed", "true" );
6457
				} else {
6458
					$( this ).button( "widget" )
6459
						.removeClass( "ui-state-active" )
6460
						.attr( "aria-pressed", "false" );
6461
				}
6462
			});
6463
		} else if ( this.type === "checkbox" ) {
6464
			if ( this.element.is( ":checked" ) ) {
6465
				this.buttonElement
6466
					.addClass( "ui-state-active" )
6467
					.attr( "aria-pressed", "true" );
6468
			} else {
6469
				this.buttonElement
6470
					.removeClass( "ui-state-active" )
6471
					.attr( "aria-pressed", "false" );
6472
			}
6473
		}
6474
	},
6475
6476
	_resetButton: function() {
6477
		if ( this.type === "input" ) {
6478
			if ( this.options.label ) {
6479
				this.element.val( this.options.label );
6480
			}
6481
			return;
6482
		}
6483
		var buttonElement = this.buttonElement.removeClass( typeClasses ),
6484
			buttonText = $( "<span></span>", this.document[0] )
6485
				.addClass( "ui-button-text" )
6486
				.html( this.options.label )
6487
				.appendTo( buttonElement.empty() )
6488
				.text(),
6489
			icons = this.options.icons,
6490
			multipleIcons = icons.primary && icons.secondary,
6491
			buttonClasses = [];
6492
6493
		if ( icons.primary || icons.secondary ) {
6494
			if ( this.options.text ) {
6495
				buttonClasses.push( "ui-button-text-icon" + ( multipleIcons ? "s" : ( icons.primary ? "-primary" : "-secondary" ) ) );
6496
			}
6497
6498
			if ( icons.primary ) {
6499
				buttonElement.prepend( "<span class='ui-button-icon-primary ui-icon " + icons.primary + "'></span>" );
6500
			}
6501
6502
			if ( icons.secondary ) {
6503
				buttonElement.append( "<span class='ui-button-icon-secondary ui-icon " + icons.secondary + "'></span>" );
6504
			}
6505
6506
			if ( !this.options.text ) {
6507
				buttonClasses.push( multipleIcons ? "ui-button-icons-only" : "ui-button-icon-only" );
6508
6509
				if ( !this.hasTitle ) {
6510
					buttonElement.attr( "title", $.trim( buttonText ) );
6511
				}
6512
			}
6513
		} else {
6514
			buttonClasses.push( "ui-button-text-only" );
6515
		}
6516
		buttonElement.addClass( buttonClasses.join( " " ) );
6517
	}
6518
});
6519
6520
$.widget( "ui.buttonset", {
6521
	version: "1.11.4",
6522
	options: {
6523
		items: "button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)"
6524
	},
6525
6526
	_create: function() {
6527
		this.element.addClass( "ui-buttonset" );
6528
	},
6529
6530
	_init: function() {
6531
		this.refresh();
6532
	},
6533
6534
	_setOption: function( key, value ) {
6535
		if ( key === "disabled" ) {
6536
			this.buttons.button( "option", key, value );
6537
		}
6538
6539
		this._super( key, value );
6540
	},
6541
6542
	refresh: function() {
6543
		var rtl = this.element.css( "direction" ) === "rtl",
6544
			allButtons = this.element.find( this.options.items ),
6545
			existingButtons = allButtons.filter( ":ui-button" );
6546
6547
		// Initialize new buttons
6548
		allButtons.not( ":ui-button" ).button();
6549
6550
		// Refresh existing buttons
6551
		existingButtons.button( "refresh" );
6552
6553
		this.buttons = allButtons
6554
			.map(function() {
6555
				return $( this ).button( "widget" )[ 0 ];
6556
			})
6557
				.removeClass( "ui-corner-all ui-corner-left ui-corner-right" )
6558
				.filter( ":first" )
6559
					.addClass( rtl ? "ui-corner-right" : "ui-corner-left" )
6560
				.end()
6561
				.filter( ":last" )
6562
					.addClass( rtl ? "ui-corner-left" : "ui-corner-right" )
6563
				.end()
6564
			.end();
6565
	},
6566
6567
	_destroy: function() {
6568
		this.element.removeClass( "ui-buttonset" );
6569
		this.buttons
6570
			.map(function() {
6571
				return $( this ).button( "widget" )[ 0 ];
6572
			})
6573
				.removeClass( "ui-corner-left ui-corner-right" )
6574
			.end()
6575
			.button( "destroy" );
6576
	}
6577
});
6578
6579
var button = $.ui.button;
6580
6581
6582
/*!
6583
 * jQuery UI Datepicker 1.11.4
6584
 * http://jqueryui.com
6585
 *
6586
 * Copyright jQuery Foundation and other contributors
6587
 * Released under the MIT license.
6588
 * http://jquery.org/license
6589
 *
6590
 * http://api.jqueryui.com/datepicker/
6591
 */
6592
6593
6594
$.extend($.ui, { datepicker: { version: "1.11.4" } });
6595
6596
var datepicker_instActive;
6597
6598
function datepicker_getZindex( elem ) {
6599
	var position, value;
6600
	while ( elem.length && elem[ 0 ] !== document ) {
6601
		// Ignore z-index if position is set to a value where z-index is ignored by the browser
6602
		// This makes behavior of this function consistent across browsers
6603
		// WebKit always returns auto if the element is positioned
6604
		position = elem.css( "position" );
6605
		if ( position === "absolute" || position === "relative" || position === "fixed" ) {
6606
			// IE returns 0 when zIndex is not specified
6607
			// other browsers return a string
6608
			// we ignore the case of nested elements with an explicit value of 0
6609
			// <div style="z-index: -10;"><div style="z-index: 0;"></div></div>
6610
			value = parseInt( elem.css( "zIndex" ), 10 );
6611
			if ( !isNaN( value ) && value !== 0 ) {
6612
				return value;
6613
			}
6614
		}
6615
		elem = elem.parent();
6616
	}
6617
6618
	return 0;
6619
}
6620
/* Date picker manager.
6621
   Use the singleton instance of this class, $.datepicker, to interact with the date picker.
6622
   Settings for (groups of) date pickers are maintained in an instance object,
6623
   allowing multiple different settings on the same page. */
6624
6625
function Datepicker() {
6626
	this._curInst = null; // The current instance in use
6627
	this._keyEvent = false; // If the last event was a key event
6628
	this._disabledInputs = []; // List of date picker inputs that have been disabled
6629
	this._datepickerShowing = false; // True if the popup picker is showing , false if not
6630
	this._inDialog = false; // True if showing within a "dialog", false if not
6631
	this._mainDivId = "ui-datepicker-div"; // The ID of the main datepicker division
6632
	this._inlineClass = "ui-datepicker-inline"; // The name of the inline marker class
6633
	this._appendClass = "ui-datepicker-append"; // The name of the append marker class
6634
	this._triggerClass = "ui-datepicker-trigger"; // The name of the trigger marker class
6635
	this._dialogClass = "ui-datepicker-dialog"; // The name of the dialog marker class
6636
	this._disableClass = "ui-datepicker-disabled"; // The name of the disabled covering marker class
6637
	this._unselectableClass = "ui-datepicker-unselectable"; // The name of the unselectable cell marker class
6638
	this._currentClass = "ui-datepicker-current-day"; // The name of the current day marker class
6639
	this._dayOverClass = "ui-datepicker-days-cell-over"; // The name of the day hover marker class
6640
	this.regional = []; // Available regional settings, indexed by language code
6641
	this.regional[""] = { // Default regional settings
6642
		closeText: "Done", // Display text for close link
6643
		prevText: "Prev", // Display text for previous month link
6644
		nextText: "Next", // Display text for next month link
6645
		currentText: "Today", // Display text for current month link
6646
		monthNames: ["January","February","March","April","May","June",
6647
			"July","August","September","October","November","December"], // Names of months for drop-down and formatting
6648
		monthNamesShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], // For formatting
6649
		dayNames: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], // For formatting
6650
		dayNamesShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], // For formatting
6651
		dayNamesMin: ["Su","Mo","Tu","We","Th","Fr","Sa"], // Column headings for days starting at Sunday
6652
		weekHeader: "Wk", // Column header for week of the year
6653
		dateFormat: "mm/dd/yy", // See format options on parseDate
6654
		firstDay: 0, // The first day of the week, Sun = 0, Mon = 1, ...
6655
		isRTL: false, // True if right-to-left language, false if left-to-right
6656
		showMonthAfterYear: false, // True if the year select precedes month, false for month then year
6657
		yearSuffix: "" // Additional text to append to the year in the month headers
6658
	};
6659
	this._defaults = { // Global defaults for all the date picker instances
6660
		showOn: "focus", // "focus" for popup on focus,
6661
			// "button" for trigger button, or "both" for either
6662
		showAnim: "fadeIn", // Name of jQuery animation for popup
6663
		showOptions: {}, // Options for enhanced animations
6664
		defaultDate: null, // Used when field is blank: actual date,
6665
			// +/-number for offset from today, null for today
6666
		appendText: "", // Display text following the input box, e.g. showing the format
6667
		buttonText: "...", // Text for trigger button
6668
		buttonImage: "", // URL for trigger button image
6669
		buttonImageOnly: false, // True if the image appears alone, false if it appears on a button
6670
		hideIfNoPrevNext: false, // True to hide next/previous month links
6671
			// if not applicable, false to just disable them
6672
		navigationAsDateFormat: false, // True if date formatting applied to prev/today/next links
6673
		gotoCurrent: false, // True if today link goes back to current selection instead
6674
		changeMonth: false, // True if month can be selected directly, false if only prev/next
6675
		changeYear: false, // True if year can be selected directly, false if only prev/next
6676
		yearRange: "c-10:c+10", // Range of years to display in drop-down,
6677
			// either relative to today's year (-nn:+nn), relative to currently displayed year
6678
			// (c-nn:c+nn), absolute (nnnn:nnnn), or a combination of the above (nnnn:-n)
6679
		showOtherMonths: false, // True to show dates in other months, false to leave blank
6680
		selectOtherMonths: false, // True to allow selection of dates in other months, false for unselectable
6681
		showWeek: false, // True to show week of the year, false to not show it
6682
		calculateWeek: this.iso8601Week, // How to calculate the week of the year,
6683
			// takes a Date and returns the number of the week for it
6684
		shortYearCutoff: "+10", // Short year values < this are in the current century,
6685
			// > this are in the previous century,
6686
			// string value starting with "+" for current year + value
6687
		minDate: null, // The earliest selectable date, or null for no limit
6688
		maxDate: null, // The latest selectable date, or null for no limit
6689
		duration: "fast", // Duration of display/closure
6690
		beforeShowDay: null, // Function that takes a date and returns an array with
6691
			// [0] = true if selectable, false if not, [1] = custom CSS class name(s) or "",
6692
			// [2] = cell title (optional), e.g. $.datepicker.noWeekends
6693
		beforeShow: null, // Function that takes an input field and
6694
			// returns a set of custom settings for the date picker
6695
		onSelect: null, // Define a callback function when a date is selected
6696
		onChangeMonthYear: null, // Define a callback function when the month or year is changed
6697
		onClose: null, // Define a callback function when the datepicker is closed
6698
		numberOfMonths: 1, // Number of months to show at a time
6699
		showCurrentAtPos: 0, // The position in multipe months at which to show the current month (starting at 0)
6700
		stepMonths: 1, // Number of months to step back/forward
6701
		stepBigMonths: 12, // Number of months to step back/forward for the big links
6702
		altField: "", // Selector for an alternate field to store selected dates into
6703
		altFormat: "", // The date format to use for the alternate field
6704
		constrainInput: true, // The input is constrained by the current date format
6705
		showButtonPanel: false, // True to show button panel, false to not show it
6706
		autoSize: false, // True to size the input for the date format, false to leave as is
6707
		disabled: false // The initial disabled state
6708
	};
6709
	$.extend(this._defaults, this.regional[""]);
6710
	this.regional.en = $.extend( true, {}, this.regional[ "" ]);
6711
	this.regional[ "en-US" ] = $.extend( true, {}, this.regional.en );
6712
	this.dpDiv = datepicker_bindHover($("<div id='" + this._mainDivId + "' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"));
6713
}
6714
6715
$.extend(Datepicker.prototype, {
6716
	/* Class name added to elements to indicate already configured with a date picker. */
6717
	markerClassName: "hasDatepicker",
6718
6719
	//Keep track of the maximum number of rows displayed (see #7043)
6720
	maxRows: 4,
6721
6722
	// TODO rename to "widget" when switching to widget factory
6723
	_widgetDatepicker: function() {
6724
		return this.dpDiv;
6725
	},
6726
6727
	/* Override the default settings for all instances of the date picker.
6728
	 * @param  settings  object - the new settings to use as defaults (anonymous object)
6729
	 * @return the manager object
6730
	 */
6731
	setDefaults: function(settings) {
6732
		datepicker_extendRemove(this._defaults, settings || {});
6733
		return this;
6734
	},
6735
6736
	/* Attach the date picker to a jQuery selection.
6737
	 * @param  target	element - the target input field or division or span
6738
	 * @param  settings  object - the new settings to use for this date picker instance (anonymous)
6739
	 */
6740
	_attachDatepicker: function(target, settings) {
6741
		var nodeName, inline, inst;
6742
		nodeName = target.nodeName.toLowerCase();
6743
		inline = (nodeName === "div" || nodeName === "span");
6744
		if (!target.id) {
6745
			this.uuid += 1;
6746
			target.id = "dp" + this.uuid;
6747
		}
6748
		inst = this._newInst($(target), inline);
6749
		inst.settings = $.extend({}, settings || {});
6750
		if (nodeName === "input") {
6751
			this._connectDatepicker(target, inst);
6752
		} else if (inline) {
6753
			this._inlineDatepicker(target, inst);
6754
		}
6755
	},
6756
6757
	/* Create a new instance object. */
6758
	_newInst: function(target, inline) {
6759
		var id = target[0].id.replace(/([^A-Za-z0-9_\-])/g, "\\\\$1"); // escape jQuery meta chars
6760
		return {id: id, input: target, // associated target
6761
			selectedDay: 0, selectedMonth: 0, selectedYear: 0, // current selection
6762
			drawMonth: 0, drawYear: 0, // month being drawn
6763
			inline: inline, // is datepicker inline or not
6764
			dpDiv: (!inline ? this.dpDiv : // presentation div
6765
			datepicker_bindHover($("<div class='" + this._inlineClass + " ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")))};
6766
	},
6767
6768
	/* Attach the date picker to an input field. */
6769
	_connectDatepicker: function(target, inst) {
6770
		var input = $(target);
6771
		inst.append = $([]);
6772
		inst.trigger = $([]);
6773
		if (input.hasClass(this.markerClassName)) {
6774
			return;
6775
		}
6776
		this._attachments(input, inst);
6777
		input.addClass(this.markerClassName).keydown(this._doKeyDown).
6778
			keypress(this._doKeyPress).keyup(this._doKeyUp);
6779
		this._autoSize(inst);
6780
		$.data(target, "datepicker", inst);
6781
		//If disabled option is true, disable the datepicker once it has been attached to the input (see ticket #5665)
6782
		if( inst.settings.disabled ) {
6783
			this._disableDatepicker( target );
6784
		}
6785
	},
6786
6787
	/* Make attachments based on settings. */
6788
	_attachments: function(input, inst) {
6789
		var showOn, buttonText, buttonImage,
6790
			appendText = this._get(inst, "appendText"),
6791
			isRTL = this._get(inst, "isRTL");
6792
6793
		if (inst.append) {
6794
			inst.append.remove();
6795
		}
6796
		if (appendText) {
6797
			inst.append = $("<span class='" + this._appendClass + "'>" + appendText + "</span>");
6798
			input[isRTL ? "before" : "after"](inst.append);
6799
		}
6800
6801
		input.unbind("focus", this._showDatepicker);
6802
6803
		if (inst.trigger) {
6804
			inst.trigger.remove();
6805
		}
6806
6807
		showOn = this._get(inst, "showOn");
6808
		if (showOn === "focus" || showOn === "both") { // pop-up date picker when in the marked field
6809
			input.focus(this._showDatepicker);
6810
		}
6811
		if (showOn === "button" || showOn === "both") { // pop-up date picker when button clicked
6812
			buttonText = this._get(inst, "buttonText");
6813
			buttonImage = this._get(inst, "buttonImage");
6814
			inst.trigger = $(this._get(inst, "buttonImageOnly") ?
6815
				$("<img/>").addClass(this._triggerClass).
6816
					attr({ src: buttonImage, alt: buttonText, title: buttonText }) :
6817
				$("<button type='button'></button>").addClass(this._triggerClass).
6818
					html(!buttonImage ? buttonText : $("<img/>").attr(
6819
					{ src:buttonImage, alt:buttonText, title:buttonText })));
6820
			input[isRTL ? "before" : "after"](inst.trigger);
6821
			inst.trigger.click(function() {
6822
				if ($.datepicker._datepickerShowing && $.datepicker._lastInput === input[0]) {
6823
					$.datepicker._hideDatepicker();
6824
				} else if ($.datepicker._datepickerShowing && $.datepicker._lastInput !== input[0]) {
6825
					$.datepicker._hideDatepicker();
6826
					$.datepicker._showDatepicker(input[0]);
6827
				} else {
6828
					$.datepicker._showDatepicker(input[0]);
6829
				}
6830
				return false;
6831
			});
6832
		}
6833
	},
6834
6835
	/* Apply the maximum length for the date format. */
6836
	_autoSize: function(inst) {
6837
		if (this._get(inst, "autoSize") && !inst.inline) {
6838
			var findMax, max, maxI, i,
6839
				date = new Date(2009, 12 - 1, 20), // Ensure double digits
6840
				dateFormat = this._get(inst, "dateFormat");
6841
6842
			if (dateFormat.match(/[DM]/)) {
6843
				findMax = function(names) {
6844
					max = 0;
6845
					maxI = 0;
6846
					for (i = 0; i < names.length; i++) {
6847
						if (names[i].length > max) {
6848
							max = names[i].length;
6849
							maxI = i;
6850
						}
6851
					}
6852
					return maxI;
6853
				};
6854
				date.setMonth(findMax(this._get(inst, (dateFormat.match(/MM/) ?
6855
					"monthNames" : "monthNamesShort"))));
6856
				date.setDate(findMax(this._get(inst, (dateFormat.match(/DD/) ?
6857
					"dayNames" : "dayNamesShort"))) + 20 - date.getDay());
6858
			}
6859
			inst.input.attr("size", this._formatDate(inst, date).length);
6860
		}
6861
	},
6862
6863
	/* Attach an inline date picker to a div. */
6864
	_inlineDatepicker: function(target, inst) {
6865
		var divSpan = $(target);
6866
		if (divSpan.hasClass(this.markerClassName)) {
6867
			return;
6868
		}
6869
		divSpan.addClass(this.markerClassName).append(inst.dpDiv);
6870
		$.data(target, "datepicker", inst);
6871
		this._setDate(inst, this._getDefaultDate(inst), true);
6872
		this._updateDatepicker(inst);
6873
		this._updateAlternate(inst);
6874
		//If disabled option is true, disable the datepicker before showing it (see ticket #5665)
6875
		if( inst.settings.disabled ) {
6876
			this._disableDatepicker( target );
6877
		}
6878
		// Set display:block in place of inst.dpDiv.show() which won't work on disconnected elements
6879
		// http://bugs.jqueryui.com/ticket/7552 - A Datepicker created on a detached div has zero height
6880
		inst.dpDiv.css( "display", "block" );
6881
	},
6882
6883
	/* Pop-up the date picker in a "dialog" box.
6884
	 * @param  input element - ignored
6885
	 * @param  date	string or Date - the initial date to display
6886
	 * @param  onSelect  function - the function to call when a date is selected
6887
	 * @param  settings  object - update the dialog date picker instance's settings (anonymous object)
6888
	 * @param  pos int[2] - coordinates for the dialog's position within the screen or
6889
	 *					event - with x/y coordinates or
6890
	 *					leave empty for default (screen centre)
6891
	 * @return the manager object
6892
	 */
6893
	_dialogDatepicker: function(input, date, onSelect, settings, pos) {
6894
		var id, browserWidth, browserHeight, scrollX, scrollY,
6895
			inst = this._dialogInst; // internal instance
6896
6897
		if (!inst) {
6898
			this.uuid += 1;
6899
			id = "dp" + this.uuid;
6900
			this._dialogInput = $("<input type='text' id='" + id +
6901
				"' style='position: absolute; top: -100px; width: 0px;'/>");
6902
			this._dialogInput.keydown(this._doKeyDown);
6903
			$("body").append(this._dialogInput);
6904
			inst = this._dialogInst = this._newInst(this._dialogInput, false);
6905
			inst.settings = {};
6906
			$.data(this._dialogInput[0], "datepicker", inst);
6907
		}
6908
		datepicker_extendRemove(inst.settings, settings || {});
6909
		date = (date && date.constructor === Date ? this._formatDate(inst, date) : date);
6910
		this._dialogInput.val(date);
6911
6912
		this._pos = (pos ? (pos.length ? pos : [pos.pageX, pos.pageY]) : null);
6913
		if (!this._pos) {
6914
			browserWidth = document.documentElement.clientWidth;
6915
			browserHeight = document.documentElement.clientHeight;
6916
			scrollX = document.documentElement.scrollLeft || document.body.scrollLeft;
6917
			scrollY = document.documentElement.scrollTop || document.body.scrollTop;
6918
			this._pos = // should use actual width/height below
6919
				[(browserWidth / 2) - 100 + scrollX, (browserHeight / 2) - 150 + scrollY];
6920
		}
6921
6922
		// move input on screen for focus, but hidden behind dialog
6923
		this._dialogInput.css("left", (this._pos[0] + 20) + "px").css("top", this._pos[1] + "px");
6924
		inst.settings.onSelect = onSelect;
6925
		this._inDialog = true;
6926
		this.dpDiv.addClass(this._dialogClass);
6927
		this._showDatepicker(this._dialogInput[0]);
6928
		if ($.blockUI) {
6929
			$.blockUI(this.dpDiv);
6930
		}
6931
		$.data(this._dialogInput[0], "datepicker", inst);
6932
		return this;
6933
	},
6934
6935
	/* Detach a datepicker from its control.
6936
	 * @param  target	element - the target input field or division or span
6937
	 */
6938
	_destroyDatepicker: function(target) {
6939
		var nodeName,
6940
			$target = $(target),
6941
			inst = $.data(target, "datepicker");
6942
6943
		if (!$target.hasClass(this.markerClassName)) {
6944
			return;
6945
		}
6946
6947
		nodeName = target.nodeName.toLowerCase();
6948
		$.removeData(target, "datepicker");
6949
		if (nodeName === "input") {
6950
			inst.append.remove();
6951
			inst.trigger.remove();
6952
			$target.removeClass(this.markerClassName).
6953
				unbind("focus", this._showDatepicker).
6954
				unbind("keydown", this._doKeyDown).
6955
				unbind("keypress", this._doKeyPress).
6956
				unbind("keyup", this._doKeyUp);
6957
		} else if (nodeName === "div" || nodeName === "span") {
6958
			$target.removeClass(this.markerClassName).empty();
6959
		}
6960
6961
		if ( datepicker_instActive === inst ) {
6962
			datepicker_instActive = null;
6963
		}
6964
	},
6965
6966
	/* Enable the date picker to a jQuery selection.
6967
	 * @param  target	element - the target input field or division or span
6968
	 */
6969
	_enableDatepicker: function(target) {
6970
		var nodeName, inline,
6971
			$target = $(target),
6972
			inst = $.data(target, "datepicker");
6973
6974
		if (!$target.hasClass(this.markerClassName)) {
6975
			return;
6976
		}
6977
6978
		nodeName = target.nodeName.toLowerCase();
6979
		if (nodeName === "input") {
6980
			target.disabled = false;
6981
			inst.trigger.filter("button").
6982
				each(function() { this.disabled = false; }).end().
6983
				filter("img").css({opacity: "1.0", cursor: ""});
6984
		} else if (nodeName === "div" || nodeName === "span") {
6985
			inline = $target.children("." + this._inlineClass);
6986
			inline.children().removeClass("ui-state-disabled");
6987
			inline.find("select.ui-datepicker-month, select.ui-datepicker-year").
6988
				prop("disabled", false);
6989
		}
6990
		this._disabledInputs = $.map(this._disabledInputs,
6991
			function(value) { return (value === target ? null : value); }); // delete entry
6992
	},
6993
6994
	/* Disable the date picker to a jQuery selection.
6995
	 * @param  target	element - the target input field or division or span
6996
	 */
6997
	_disableDatepicker: function(target) {
6998
		var nodeName, inline,
6999
			$target = $(target),
7000
			inst = $.data(target, "datepicker");
7001
7002
		if (!$target.hasClass(this.markerClassName)) {
7003
			return;
7004
		}
7005
7006
		nodeName = target.nodeName.toLowerCase();
7007
		if (nodeName === "input") {
7008
			target.disabled = true;
7009
			inst.trigger.filter("button").
7010
				each(function() { this.disabled = true; }).end().
7011
				filter("img").css({opacity: "0.5", cursor: "default"});
7012
		} else if (nodeName === "div" || nodeName === "span") {
7013
			inline = $target.children("." + this._inlineClass);
7014
			inline.children().addClass("ui-state-disabled");
7015
			inline.find("select.ui-datepicker-month, select.ui-datepicker-year").
7016
				prop("disabled", true);
7017
		}
7018
		this._disabledInputs = $.map(this._disabledInputs,
7019
			function(value) { return (value === target ? null : value); }); // delete entry
7020
		this._disabledInputs[this._disabledInputs.length] = target;
7021
	},
7022
7023
	/* Is the first field in a jQuery collection disabled as a datepicker?
7024
	 * @param  target	element - the target input field or division or span
7025
	 * @return boolean - true if disabled, false if enabled
7026
	 */
7027
	_isDisabledDatepicker: function(target) {
7028
		if (!target) {
7029
			return false;
7030
		}
7031
		for (var i = 0; i < this._disabledInputs.length; i++) {
7032
			if (this._disabledInputs[i] === target) {
7033
				return true;
7034
			}
7035
		}
7036
		return false;
7037
	},
7038
7039
	/* Retrieve the instance data for the target control.
7040
	 * @param  target  element - the target input field or division or span
7041
	 * @return  object - the associated instance data
7042
	 * @throws  error if a jQuery problem getting data
7043
	 */
7044
	_getInst: function(target) {
7045
		try {
7046
			return $.data(target, "datepicker");
7047
		}
7048
		catch (err) {
7049
			throw "Missing instance data for this datepicker";
7050
		}
7051
	},
7052
7053
	/* Update or retrieve the settings for a date picker attached to an input field or division.
7054
	 * @param  target  element - the target input field or division or span
7055
	 * @param  name	object - the new settings to update or
7056
	 *				string - the name of the setting to change or retrieve,
7057
	 *				when retrieving also "all" for all instance settings or
7058
	 *				"defaults" for all global defaults
7059
	 * @param  value   any - the new value for the setting
7060
	 *				(omit if above is an object or to retrieve a value)
7061
	 */
7062
	_optionDatepicker: function(target, name, value) {
7063
		var settings, date, minDate, maxDate,
7064
			inst = this._getInst(target);
7065
7066
		if (arguments.length === 2 && typeof name === "string") {
7067
			return (name === "defaults" ? $.extend({}, $.datepicker._defaults) :
7068
				(inst ? (name === "all" ? $.extend({}, inst.settings) :
7069
				this._get(inst, name)) : null));
7070
		}
7071
7072
		settings = name || {};
7073
		if (typeof name === "string") {
7074
			settings = {};
7075
			settings[name] = value;
7076
		}
7077
7078
		if (inst) {
7079
			if (this._curInst === inst) {
7080
				this._hideDatepicker();
7081
			}
7082
7083
			date = this._getDateDatepicker(target, true);
7084
			minDate = this._getMinMaxDate(inst, "min");
7085
			maxDate = this._getMinMaxDate(inst, "max");
7086
			datepicker_extendRemove(inst.settings, settings);
7087
			// reformat the old minDate/maxDate values if dateFormat changes and a new minDate/maxDate isn't provided
7088
			if (minDate !== null && settings.dateFormat !== undefined && settings.minDate === undefined) {
7089
				inst.settings.minDate = this._formatDate(inst, minDate);
7090
			}
7091
			if (maxDate !== null && settings.dateFormat !== undefined && settings.maxDate === undefined) {
7092
				inst.settings.maxDate = this._formatDate(inst, maxDate);
7093
			}
7094
			if ( "disabled" in settings ) {
7095
				if ( settings.disabled ) {
7096
					this._disableDatepicker(target);
7097
				} else {
7098
					this._enableDatepicker(target);
7099
				}
7100
			}
7101
			this._attachments($(target), inst);
7102
			this._autoSize(inst);
7103
			this._setDate(inst, date);
7104
			this._updateAlternate(inst);
7105
			this._updateDatepicker(inst);
7106
		}
7107
	},
7108
7109
	// change method deprecated
7110
	_changeDatepicker: function(target, name, value) {
7111
		this._optionDatepicker(target, name, value);
7112
	},
7113
7114
	/* Redraw the date picker attached to an input field or division.
7115
	 * @param  target  element - the target input field or division or span
7116
	 */
7117
	_refreshDatepicker: function(target) {
7118
		var inst = this._getInst(target);
7119
		if (inst) {
7120
			this._updateDatepicker(inst);
7121
		}
7122
	},
7123
7124
	/* Set the dates for a jQuery selection.
7125
	 * @param  target element - the target input field or division or span
7126
	 * @param  date	Date - the new date
7127
	 */
7128
	_setDateDatepicker: function(target, date) {
7129
		var inst = this._getInst(target);
7130
		if (inst) {
7131
			this._setDate(inst, date);
7132
			this._updateDatepicker(inst);
7133
			this._updateAlternate(inst);
7134
		}
7135
	},
7136
7137
	/* Get the date(s) for the first entry in a jQuery selection.
7138
	 * @param  target element - the target input field or division or span
7139
	 * @param  noDefault boolean - true if no default date is to be used
7140
	 * @return Date - the current date
7141
	 */
7142
	_getDateDatepicker: function(target, noDefault) {
7143
		var inst = this._getInst(target);
7144
		if (inst && !inst.inline) {
7145
			this._setDateFromField(inst, noDefault);
7146
		}
7147
		return (inst ? this._getDate(inst) : null);
7148
	},
7149
7150
	/* Handle keystrokes. */
7151
	_doKeyDown: function(event) {
7152
		var onSelect, dateStr, sel,
7153
			inst = $.datepicker._getInst(event.target),
7154
			handled = true,
7155
			isRTL = inst.dpDiv.is(".ui-datepicker-rtl");
7156
7157
		inst._keyEvent = true;
7158
		if ($.datepicker._datepickerShowing) {
7159
			switch (event.keyCode) {
7160
				case 9: $.datepicker._hideDatepicker();
7161
						handled = false;
7162
						break; // hide on tab out
7163
				case 13: sel = $("td." + $.datepicker._dayOverClass + ":not(." +
7164
									$.datepicker._currentClass + ")", inst.dpDiv);
7165
						if (sel[0]) {
7166
							$.datepicker._selectDay(event.target, inst.selectedMonth, inst.selectedYear, sel[0]);
7167
						}
7168
7169
						onSelect = $.datepicker._get(inst, "onSelect");
7170
						if (onSelect) {
7171
							dateStr = $.datepicker._formatDate(inst);
7172
7173
							// trigger custom callback
7174
							onSelect.apply((inst.input ? inst.input[0] : null), [dateStr, inst]);
7175
						} else {
7176
							$.datepicker._hideDatepicker();
7177
						}
7178
7179
						return false; // don't submit the form
7180
				case 27: $.datepicker._hideDatepicker();
7181
						break; // hide on escape
7182
				case 33: $.datepicker._adjustDate(event.target, (event.ctrlKey ?
7183
							-$.datepicker._get(inst, "stepBigMonths") :
7184
							-$.datepicker._get(inst, "stepMonths")), "M");
7185
						break; // previous month/year on page up/+ ctrl
7186
				case 34: $.datepicker._adjustDate(event.target, (event.ctrlKey ?
7187
							+$.datepicker._get(inst, "stepBigMonths") :
7188
							+$.datepicker._get(inst, "stepMonths")), "M");
7189
						break; // next month/year on page down/+ ctrl
7190
				case 35: if (event.ctrlKey || event.metaKey) {
7191
							$.datepicker._clearDate(event.target);
7192
						}
7193
						handled = event.ctrlKey || event.metaKey;
7194
						break; // clear on ctrl or command +end
7195
				case 36: if (event.ctrlKey || event.metaKey) {
7196
							$.datepicker._gotoToday(event.target);
7197
						}
7198
						handled = event.ctrlKey || event.metaKey;
7199
						break; // current on ctrl or command +home
7200
				case 37: if (event.ctrlKey || event.metaKey) {
7201
							$.datepicker._adjustDate(event.target, (isRTL ? +1 : -1), "D");
7202
						}
7203
						handled = event.ctrlKey || event.metaKey;
7204
						// -1 day on ctrl or command +left
7205
						if (event.originalEvent.altKey) {
7206
							$.datepicker._adjustDate(event.target, (event.ctrlKey ?
7207
								-$.datepicker._get(inst, "stepBigMonths") :
7208
								-$.datepicker._get(inst, "stepMonths")), "M");
7209
						}
7210
						// next month/year on alt +left on Mac
7211
						break;
7212
				case 38: if (event.ctrlKey || event.metaKey) {
7213
							$.datepicker._adjustDate(event.target, -7, "D");
7214
						}
7215
						handled = event.ctrlKey || event.metaKey;
7216
						break; // -1 week on ctrl or command +up
7217
				case 39: if (event.ctrlKey || event.metaKey) {
7218
							$.datepicker._adjustDate(event.target, (isRTL ? -1 : +1), "D");
7219
						}
7220
						handled = event.ctrlKey || event.metaKey;
7221
						// +1 day on ctrl or command +right
7222
						if (event.originalEvent.altKey) {
7223
							$.datepicker._adjustDate(event.target, (event.ctrlKey ?
7224
								+$.datepicker._get(inst, "stepBigMonths") :
7225
								+$.datepicker._get(inst, "stepMonths")), "M");
7226
						}
7227
						// next month/year on alt +right
7228
						break;
7229
				case 40: if (event.ctrlKey || event.metaKey) {
7230
							$.datepicker._adjustDate(event.target, +7, "D");
7231
						}
7232
						handled = event.ctrlKey || event.metaKey;
7233
						break; // +1 week on ctrl or command +down
7234
				default: handled = false;
7235
			}
7236
		} else if (event.keyCode === 36 && event.ctrlKey) { // display the date picker on ctrl+home
7237
			$.datepicker._showDatepicker(this);
7238
		} else {
7239
			handled = false;
7240
		}
7241
7242
		if (handled) {
7243
			event.preventDefault();
7244
			event.stopPropagation();
7245
		}
7246
	},
7247
7248
	/* Filter entered characters - based on date format. */
7249
	_doKeyPress: function(event) {
7250
		var chars, chr,
7251
			inst = $.datepicker._getInst(event.target);
7252
7253
		if ($.datepicker._get(inst, "constrainInput")) {
7254
			chars = $.datepicker._possibleChars($.datepicker._get(inst, "dateFormat"));
7255
			chr = String.fromCharCode(event.charCode == null ? event.keyCode : event.charCode);
7256
			return event.ctrlKey || event.metaKey || (chr < " " || !chars || chars.indexOf(chr) > -1);
7257
		}
7258
	},
7259
7260
	/* Synchronise manual entry and field/alternate field. */
7261
	_doKeyUp: function(event) {
7262
		var date,
7263
			inst = $.datepicker._getInst(event.target);
7264
7265
		if (inst.input.val() !== inst.lastVal) {
7266
			try {
7267
				date = $.datepicker.parseDate($.datepicker._get(inst, "dateFormat"),
7268
					(inst.input ? inst.input.val() : null),
7269
					$.datepicker._getFormatConfig(inst));
7270
7271
				if (date) { // only if valid
7272
					$.datepicker._setDateFromField(inst);
7273
					$.datepicker._updateAlternate(inst);
7274
					$.datepicker._updateDatepicker(inst);
7275
				}
7276
			}
7277
			catch (err) {
7278
			}
7279
		}
7280
		return true;
7281
	},
7282
7283
	/* Pop-up the date picker for a given input field.
7284
	 * If false returned from beforeShow event handler do not show.
7285
	 * @param  input  element - the input field attached to the date picker or
7286
	 *					event - if triggered by focus
7287
	 */
7288
	_showDatepicker: function(input) {
7289
		input = input.target || input;
7290
		if (input.nodeName.toLowerCase() !== "input") { // find from button/image trigger
7291
			input = $("input", input.parentNode)[0];
7292
		}
7293
7294
		if ($.datepicker._isDisabledDatepicker(input) || $.datepicker._lastInput === input) { // already here
7295
			return;
7296
		}
7297
7298
		var inst, beforeShow, beforeShowSettings, isFixed,
7299
			offset, showAnim, duration;
7300
7301
		inst = $.datepicker._getInst(input);
7302
		if ($.datepicker._curInst && $.datepicker._curInst !== inst) {
7303
			$.datepicker._curInst.dpDiv.stop(true, true);
7304
			if ( inst && $.datepicker._datepickerShowing ) {
7305
				$.datepicker._hideDatepicker( $.datepicker._curInst.input[0] );
7306
			}
7307
		}
7308
7309
		beforeShow = $.datepicker._get(inst, "beforeShow");
7310
		beforeShowSettings = beforeShow ? beforeShow.apply(input, [input, inst]) : {};
7311
		if(beforeShowSettings === false){
7312
			return;
7313
		}
7314
		datepicker_extendRemove(inst.settings, beforeShowSettings);
7315
7316
		inst.lastVal = null;
7317
		$.datepicker._lastInput = input;
7318
		$.datepicker._setDateFromField(inst);
7319
7320
		if ($.datepicker._inDialog) { // hide cursor
7321
			input.value = "";
7322
		}
7323
		if (!$.datepicker._pos) { // position below input
7324
			$.datepicker._pos = $.datepicker._findPos(input);
7325
			$.datepicker._pos[1] += input.offsetHeight; // add the height
7326
		}
7327
7328
		isFixed = false;
7329
		$(input).parents().each(function() {
7330
			isFixed |= $(this).css("position") === "fixed";
7331
			return !isFixed;
7332
		});
7333
7334
		offset = {left: $.datepicker._pos[0], top: $.datepicker._pos[1]};
7335
		$.datepicker._pos = null;
7336
		//to avoid flashes on Firefox
7337
		inst.dpDiv.empty();
7338
		// determine sizing offscreen
7339
		inst.dpDiv.css({position: "absolute", display: "block", top: "-1000px"});
7340
		$.datepicker._updateDatepicker(inst);
7341
		// fix width for dynamic number of date pickers
7342
		// and adjust position before showing
7343
		offset = $.datepicker._checkOffset(inst, offset, isFixed);
7344
		inst.dpDiv.css({position: ($.datepicker._inDialog && $.blockUI ?
7345
			"static" : (isFixed ? "fixed" : "absolute")), display: "none",
7346
			left: offset.left + "px", top: offset.top + "px"});
7347
7348
		if (!inst.inline) {
7349
			showAnim = $.datepicker._get(inst, "showAnim");
7350
			duration = $.datepicker._get(inst, "duration");
7351
			inst.dpDiv.css( "z-index", datepicker_getZindex( $( input ) ) + 1 );
7352
			$.datepicker._datepickerShowing = true;
7353
7354
			if ( $.effects && $.effects.effect[ showAnim ] ) {
7355
				inst.dpDiv.show(showAnim, $.datepicker._get(inst, "showOptions"), duration);
7356
			} else {
7357
				inst.dpDiv[showAnim || "show"](showAnim ? duration : null);
7358
			}
7359
7360
			if ( $.datepicker._shouldFocusInput( inst ) ) {
7361
				inst.input.focus();
7362
			}
7363
7364
			$.datepicker._curInst = inst;
7365
		}
7366
	},
7367
7368
	/* Generate the date picker content. */
7369
	_updateDatepicker: function(inst) {
7370
		this.maxRows = 4; //Reset the max number of rows being displayed (see #7043)
7371
		datepicker_instActive = inst; // for delegate hover events
7372
		inst.dpDiv.empty().append(this._generateHTML(inst));
7373
		this._attachHandlers(inst);
7374
7375
		var origyearshtml,
7376
			numMonths = this._getNumberOfMonths(inst),
7377
			cols = numMonths[1],
7378
			width = 17,
7379
			activeCell = inst.dpDiv.find( "." + this._dayOverClass + " a" );
7380
7381
		if ( activeCell.length > 0 ) {
7382
			datepicker_handleMouseover.apply( activeCell.get( 0 ) );
7383
		}
7384
7385
		inst.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("");
7386
		if (cols > 1) {
7387
			inst.dpDiv.addClass("ui-datepicker-multi-" + cols).css("width", (width * cols) + "em");
7388
		}
7389
		inst.dpDiv[(numMonths[0] !== 1 || numMonths[1] !== 1 ? "add" : "remove") +
7390
			"Class"]("ui-datepicker-multi");
7391
		inst.dpDiv[(this._get(inst, "isRTL") ? "add" : "remove") +
7392
			"Class"]("ui-datepicker-rtl");
7393
7394
		if (inst === $.datepicker._curInst && $.datepicker._datepickerShowing && $.datepicker._shouldFocusInput( inst ) ) {
7395
			inst.input.focus();
7396
		}
7397
7398
		// deffered render of the years select (to avoid flashes on Firefox)
7399
		if( inst.yearshtml ){
7400
			origyearshtml = inst.yearshtml;
7401
			setTimeout(function(){
7402
				//assure that inst.yearshtml didn't change.
7403
				if( origyearshtml === inst.yearshtml && inst.yearshtml ){
7404
					inst.dpDiv.find("select.ui-datepicker-year:first").replaceWith(inst.yearshtml);
7405
				}
7406
				origyearshtml = inst.yearshtml = null;
7407
			}, 0);
7408
		}
7409
	},
7410
7411
	// #6694 - don't focus the input if it's already focused
7412
	// this breaks the change event in IE
7413
	// Support: IE and jQuery <1.9
7414
	_shouldFocusInput: function( inst ) {
7415
		return inst.input && inst.input.is( ":visible" ) && !inst.input.is( ":disabled" ) && !inst.input.is( ":focus" );
7416
	},
7417
7418
	/* Check positioning to remain on screen. */
7419
	_checkOffset: function(inst, offset, isFixed) {
7420
		var dpWidth = inst.dpDiv.outerWidth(),
7421
			dpHeight = inst.dpDiv.outerHeight(),
7422
			inputWidth = inst.input ? inst.input.outerWidth() : 0,
7423
			inputHeight = inst.input ? inst.input.outerHeight() : 0,
7424
			viewWidth = document.documentElement.clientWidth + (isFixed ? 0 : $(document).scrollLeft()),
7425
			viewHeight = document.documentElement.clientHeight + (isFixed ? 0 : $(document).scrollTop());
7426
7427
		offset.left -= (this._get(inst, "isRTL") ? (dpWidth - inputWidth) : 0);
7428
		offset.left -= (isFixed && offset.left === inst.input.offset().left) ? $(document).scrollLeft() : 0;
7429
		offset.top -= (isFixed && offset.top === (inst.input.offset().top + inputHeight)) ? $(document).scrollTop() : 0;
7430
7431
		// now check if datepicker is showing outside window viewport - move to a better place if so.
7432
		offset.left -= Math.min(offset.left, (offset.left + dpWidth > viewWidth && viewWidth > dpWidth) ?
7433
			Math.abs(offset.left + dpWidth - viewWidth) : 0);
7434
		offset.top -= Math.min(offset.top, (offset.top + dpHeight > viewHeight && viewHeight > dpHeight) ?
7435
			Math.abs(dpHeight + inputHeight) : 0);
7436
7437
		return offset;
7438
	},
7439
7440
	/* Find an object's position on the screen. */
7441
	_findPos: function(obj) {
7442
		var position,
7443
			inst = this._getInst(obj),
7444
			isRTL = this._get(inst, "isRTL");
7445
7446
		while (obj && (obj.type === "hidden" || obj.nodeType !== 1 || $.expr.filters.hidden(obj))) {
7447
			obj = obj[isRTL ? "previousSibling" : "nextSibling"];
7448
		}
7449
7450
		position = $(obj).offset();
7451
		return [position.left, position.top];
7452
	},
7453
7454
	/* Hide the date picker from view.
7455
	 * @param  input  element - the input field attached to the date picker
7456
	 */
7457
	_hideDatepicker: function(input) {
7458
		var showAnim, duration, postProcess, onClose,
7459
			inst = this._curInst;
7460
7461
		if (!inst || (input && inst !== $.data(input, "datepicker"))) {
7462
			return;
7463
		}
7464
7465
		if (this._datepickerShowing) {
7466
			showAnim = this._get(inst, "showAnim");
7467
			duration = this._get(inst, "duration");
7468
			postProcess = function() {
7469
				$.datepicker._tidyDialog(inst);
7470
			};
7471
7472
			// DEPRECATED: after BC for 1.8.x $.effects[ showAnim ] is not needed
7473
			if ( $.effects && ( $.effects.effect[ showAnim ] || $.effects[ showAnim ] ) ) {
7474
				inst.dpDiv.hide(showAnim, $.datepicker._get(inst, "showOptions"), duration, postProcess);
7475
			} else {
7476
				inst.dpDiv[(showAnim === "slideDown" ? "slideUp" :
7477
					(showAnim === "fadeIn" ? "fadeOut" : "hide"))]((showAnim ? duration : null), postProcess);
7478
			}
7479
7480
			if (!showAnim) {
7481
				postProcess();
7482
			}
7483
			this._datepickerShowing = false;
7484
7485
			onClose = this._get(inst, "onClose");
7486
			if (onClose) {
7487
				onClose.apply((inst.input ? inst.input[0] : null), [(inst.input ? inst.input.val() : ""), inst]);
7488
			}
7489
7490
			this._lastInput = null;
7491
			if (this._inDialog) {
7492
				this._dialogInput.css({ position: "absolute", left: "0", top: "-100px" });
7493
				if ($.blockUI) {
7494
					$.unblockUI();
7495
					$("body").append(this.dpDiv);
7496
				}
7497
			}
7498
			this._inDialog = false;
7499
		}
7500
	},
7501
7502
	/* Tidy up after a dialog display. */
7503
	_tidyDialog: function(inst) {
7504
		inst.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar");
7505
	},
7506
7507
	/* Close date picker if clicked elsewhere. */
7508
	_checkExternalClick: function(event) {
7509
		if (!$.datepicker._curInst) {
7510
			return;
7511
		}
7512
7513
		var $target = $(event.target),
7514
			inst = $.datepicker._getInst($target[0]);
7515
7516
		if ( ( ( $target[0].id !== $.datepicker._mainDivId &&
7517
				$target.parents("#" + $.datepicker._mainDivId).length === 0 &&
7518
				!$target.hasClass($.datepicker.markerClassName) &&
7519
				!$target.closest("." + $.datepicker._triggerClass).length &&
7520
				$.datepicker._datepickerShowing && !($.datepicker._inDialog && $.blockUI) ) ) ||
7521
			( $target.hasClass($.datepicker.markerClassName) && $.datepicker._curInst !== inst ) ) {
7522
				$.datepicker._hideDatepicker();
7523
		}
7524
	},
7525
7526
	/* Adjust one of the date sub-fields. */
7527
	_adjustDate: function(id, offset, period) {
7528
		var target = $(id),
7529
			inst = this._getInst(target[0]);
7530
7531
		if (this._isDisabledDatepicker(target[0])) {
7532
			return;
7533
		}
7534
		this._adjustInstDate(inst, offset +
7535
			(period === "M" ? this._get(inst, "showCurrentAtPos") : 0), // undo positioning
7536
			period);
7537
		this._updateDatepicker(inst);
7538
	},
7539
7540
	/* Action for current link. */
7541
	_gotoToday: function(id) {
7542
		var date,
7543
			target = $(id),
7544
			inst = this._getInst(target[0]);
7545
7546
		if (this._get(inst, "gotoCurrent") && inst.currentDay) {
7547
			inst.selectedDay = inst.currentDay;
7548
			inst.drawMonth = inst.selectedMonth = inst.currentMonth;
7549
			inst.drawYear = inst.selectedYear = inst.currentYear;
7550
		} else {
7551
			date = new Date();
7552
			inst.selectedDay = date.getDate();
7553
			inst.drawMonth = inst.selectedMonth = date.getMonth();
7554
			inst.drawYear = inst.selectedYear = date.getFullYear();
7555
		}
7556
		this._notifyChange(inst);
7557
		this._adjustDate(target);
7558
	},
7559
7560
	/* Action for selecting a new month/year. */
7561
	_selectMonthYear: function(id, select, period) {
7562
		var target = $(id),
7563
			inst = this._getInst(target[0]);
7564
7565
		inst["selected" + (period === "M" ? "Month" : "Year")] =
7566
		inst["draw" + (period === "M" ? "Month" : "Year")] =
7567
			parseInt(select.options[select.selectedIndex].value,10);
7568
7569
		this._notifyChange(inst);
7570
		this._adjustDate(target);
7571
	},
7572
7573
	/* Action for selecting a day. */
7574
	_selectDay: function(id, month, year, td) {
7575
		var inst,
7576
			target = $(id);
7577
7578
		if ($(td).hasClass(this._unselectableClass) || this._isDisabledDatepicker(target[0])) {
7579
			return;
7580
		}
7581
7582
		inst = this._getInst(target[0]);
7583
		inst.selectedDay = inst.currentDay = $("a", td).html();
7584
		inst.selectedMonth = inst.currentMonth = month;
7585
		inst.selectedYear = inst.currentYear = year;
7586
		this._selectDate(id, this._formatDate(inst,
7587
			inst.currentDay, inst.currentMonth, inst.currentYear));
7588
	},
7589
7590
	/* Erase the input field and hide the date picker. */
7591
	_clearDate: function(id) {
7592
		var target = $(id);
7593
		this._selectDate(target, "");
7594
	},
7595
7596
	/* Update the input field with the selected date. */
7597
	_selectDate: function(id, dateStr) {
7598
		var onSelect,
7599
			target = $(id),
7600
			inst = this._getInst(target[0]);
7601
7602
		dateStr = (dateStr != null ? dateStr : this._formatDate(inst));
7603
		if (inst.input) {
7604
			inst.input.val(dateStr);
7605
		}
7606
		this._updateAlternate(inst);
7607
7608
		onSelect = this._get(inst, "onSelect");
7609
		if (onSelect) {
7610
			onSelect.apply((inst.input ? inst.input[0] : null), [dateStr, inst]);  // trigger custom callback
7611
		} else if (inst.input) {
7612
			inst.input.trigger("change"); // fire the change event
7613
		}
7614
7615
		if (inst.inline){
7616
			this._updateDatepicker(inst);
7617
		} else {
7618
			this._hideDatepicker();
7619
			this._lastInput = inst.input[0];
7620
			if (typeof(inst.input[0]) !== "object") {
7621
				inst.input.focus(); // restore focus
7622
			}
7623
			this._lastInput = null;
7624
		}
7625
	},
7626
7627
	/* Update any alternate field to synchronise with the main field. */
7628
	_updateAlternate: function(inst) {
7629
		var altFormat, date, dateStr,
7630
			altField = this._get(inst, "altField");
7631
7632
		if (altField) { // update alternate field too
7633
			altFormat = this._get(inst, "altFormat") || this._get(inst, "dateFormat");
7634
			date = this._getDate(inst);
7635
			dateStr = this.formatDate(altFormat, date, this._getFormatConfig(inst));
7636
			$(altField).each(function() { $(this).val(dateStr); });
7637
		}
7638
	},
7639
7640
	/* Set as beforeShowDay function to prevent selection of weekends.
7641
	 * @param  date  Date - the date to customise
7642
	 * @return [boolean, string] - is this date selectable?, what is its CSS class?
7643
	 */
7644
	noWeekends: function(date) {
7645
		var day = date.getDay();
7646
		return [(day > 0 && day < 6), ""];
7647
	},
7648
7649
	/* Set as calculateWeek to determine the week of the year based on the ISO 8601 definition.
7650
	 * @param  date  Date - the date to get the week for
7651
	 * @return  number - the number of the week within the year that contains this date
7652
	 */
7653
	iso8601Week: function(date) {
7654
		var time,
7655
			checkDate = new Date(date.getTime());
7656
7657
		// Find Thursday of this week starting on Monday
7658
		checkDate.setDate(checkDate.getDate() + 4 - (checkDate.getDay() || 7));
7659
7660
		time = checkDate.getTime();
7661
		checkDate.setMonth(0); // Compare with Jan 1
7662
		checkDate.setDate(1);
7663
		return Math.floor(Math.round((time - checkDate) / 86400000) / 7) + 1;
7664
	},
7665
7666
	/* Parse a string value into a date object.
7667
	 * See formatDate below for the possible formats.
7668
	 *
7669
	 * @param  format string - the expected format of the date
7670
	 * @param  value string - the date in the above format
7671
	 * @param  settings Object - attributes include:
7672
	 *					shortYearCutoff  number - the cutoff year for determining the century (optional)
7673
	 *					dayNamesShort	string[7] - abbreviated names of the days from Sunday (optional)
7674
	 *					dayNames		string[7] - names of the days from Sunday (optional)
7675
	 *					monthNamesShort string[12] - abbreviated names of the months (optional)
7676
	 *					monthNames		string[12] - names of the months (optional)
7677
	 * @return  Date - the extracted date value or null if value is blank
7678
	 */
7679
	parseDate: function (format, value, settings) {
7680
		if (format == null || value == null) {
7681
			throw "Invalid arguments";
7682
		}
7683
7684
		value = (typeof value === "object" ? value.toString() : value + "");
7685
		if (value === "") {
7686
			return null;
7687
		}
7688
7689
		var iFormat, dim, extra,
7690
			iValue = 0,
7691
			shortYearCutoffTemp = (settings ? settings.shortYearCutoff : null) || this._defaults.shortYearCutoff,
7692
			shortYearCutoff = (typeof shortYearCutoffTemp !== "string" ? shortYearCutoffTemp :
7693
				new Date().getFullYear() % 100 + parseInt(shortYearCutoffTemp, 10)),
7694
			dayNamesShort = (settings ? settings.dayNamesShort : null) || this._defaults.dayNamesShort,
7695
			dayNames = (settings ? settings.dayNames : null) || this._defaults.dayNames,
7696
			monthNamesShort = (settings ? settings.monthNamesShort : null) || this._defaults.monthNamesShort,
7697
			monthNames = (settings ? settings.monthNames : null) || this._defaults.monthNames,
7698
			year = -1,
7699
			month = -1,
7700
			day = -1,
7701
			doy = -1,
7702
			literal = false,
7703
			date,
7704
			// Check whether a format character is doubled
7705
			lookAhead = function(match) {
7706
				var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) === match);
7707
				if (matches) {
7708
					iFormat++;
7709
				}
7710
				return matches;
7711
			},
7712
			// Extract a number from the string value
7713
			getNumber = function(match) {
7714
				var isDoubled = lookAhead(match),
7715
					size = (match === "@" ? 14 : (match === "!" ? 20 :
7716
					(match === "y" && isDoubled ? 4 : (match === "o" ? 3 : 2)))),
7717
					minSize = (match === "y" ? size : 1),
7718
					digits = new RegExp("^\\d{" + minSize + "," + size + "}"),
7719
					num = value.substring(iValue).match(digits);
7720
				if (!num) {
7721
					throw "Missing number at position " + iValue;
7722
				}
7723
				iValue += num[0].length;
7724
				return parseInt(num[0], 10);
7725
			},
7726
			// Extract a name from the string value and convert to an index
7727
			getName = function(match, shortNames, longNames) {
7728
				var index = -1,
7729
					names = $.map(lookAhead(match) ? longNames : shortNames, function (v, k) {
7730
						return [ [k, v] ];
7731
					}).sort(function (a, b) {
7732
						return -(a[1].length - b[1].length);
7733
					});
7734
7735
				$.each(names, function (i, pair) {
7736
					var name = pair[1];
7737
					if (value.substr(iValue, name.length).toLowerCase() === name.toLowerCase()) {
7738
						index = pair[0];
7739
						iValue += name.length;
7740
						return false;
7741
					}
7742
				});
7743
				if (index !== -1) {
7744
					return index + 1;
7745
				} else {
7746
					throw "Unknown name at position " + iValue;
7747
				}
7748
			},
7749
			// Confirm that a literal character matches the string value
7750
			checkLiteral = function() {
7751
				if (value.charAt(iValue) !== format.charAt(iFormat)) {
7752
					throw "Unexpected literal at position " + iValue;
7753
				}
7754
				iValue++;
7755
			};
7756
7757
		for (iFormat = 0; iFormat < format.length; iFormat++) {
7758
			if (literal) {
7759
				if (format.charAt(iFormat) === "'" && !lookAhead("'")) {
7760
					literal = false;
7761
				} else {
7762
					checkLiteral();
7763
				}
7764
			} else {
7765
				switch (format.charAt(iFormat)) {
7766
					case "d":
7767
						day = getNumber("d");
7768
						break;
7769
					case "D":
7770
						getName("D", dayNamesShort, dayNames);
7771
						break;
7772
					case "o":
7773
						doy = getNumber("o");
7774
						break;
7775
					case "m":
7776
						month = getNumber("m");
7777
						break;
7778
					case "M":
7779
						month = getName("M", monthNamesShort, monthNames);
7780
						break;
7781
					case "y":
7782
						year = getNumber("y");
7783
						break;
7784
					case "@":
7785
						date = new Date(getNumber("@"));
7786
						year = date.getFullYear();
7787
						month = date.getMonth() + 1;
7788
						day = date.getDate();
7789
						break;
7790
					case "!":
7791
						date = new Date((getNumber("!") - this._ticksTo1970) / 10000);
7792
						year = date.getFullYear();
7793
						month = date.getMonth() + 1;
7794
						day = date.getDate();
7795
						break;
7796
					case "'":
7797
						if (lookAhead("'")){
7798
							checkLiteral();
7799
						} else {
7800
							literal = true;
7801
						}
7802
						break;
7803
					default:
7804
						checkLiteral();
7805
				}
7806
			}
7807
		}
7808
7809
		if (iValue < value.length){
7810
			extra = value.substr(iValue);
7811
			if (!/^\s+/.test(extra)) {
7812
				throw "Extra/unparsed characters found in date: " + extra;
7813
			}
7814
		}
7815
7816
		if (year === -1) {
7817
			year = new Date().getFullYear();
7818
		} else if (year < 100) {
7819
			year += new Date().getFullYear() - new Date().getFullYear() % 100 +
7820
				(year <= shortYearCutoff ? 0 : -100);
7821
		}
7822
7823
		if (doy > -1) {
7824
			month = 1;
7825
			day = doy;
7826
			do {
7827
				dim = this._getDaysInMonth(year, month - 1);
7828
				if (day <= dim) {
7829
					break;
7830
				}
7831
				month++;
7832
				day -= dim;
7833
			} while (true);
7834
		}
7835
7836
		date = this._daylightSavingAdjust(new Date(year, month - 1, day));
7837
		if (date.getFullYear() !== year || date.getMonth() + 1 !== month || date.getDate() !== day) {
7838
			throw "Invalid date"; // E.g. 31/02/00
7839
		}
7840
		return date;
7841
	},
7842
7843
	/* Standard date formats. */
7844
	ATOM: "yy-mm-dd", // RFC 3339 (ISO 8601)
7845
	COOKIE: "D, dd M yy",
7846
	ISO_8601: "yy-mm-dd",
7847
	RFC_822: "D, d M y",
7848
	RFC_850: "DD, dd-M-y",
7849
	RFC_1036: "D, d M y",
7850
	RFC_1123: "D, d M yy",
7851
	RFC_2822: "D, d M yy",
7852
	RSS: "D, d M y", // RFC 822
7853
	TICKS: "!",
7854
	TIMESTAMP: "@",
7855
	W3C: "yy-mm-dd", // ISO 8601
7856
7857
	_ticksTo1970: (((1970 - 1) * 365 + Math.floor(1970 / 4) - Math.floor(1970 / 100) +
7858
		Math.floor(1970 / 400)) * 24 * 60 * 60 * 10000000),
7859
7860
	/* Format a date object into a string value.
7861
	 * The format can be combinations of the following:
7862
	 * d  - day of month (no leading zero)
7863
	 * dd - day of month (two digit)
7864
	 * o  - day of year (no leading zeros)
7865
	 * oo - day of year (three digit)
7866
	 * D  - day name short
7867
	 * DD - day name long
7868
	 * m  - month of year (no leading zero)
7869
	 * mm - month of year (two digit)
7870
	 * M  - month name short
7871
	 * MM - month name long
7872
	 * y  - year (two digit)
7873
	 * yy - year (four digit)
7874
	 * @ - Unix timestamp (ms since 01/01/1970)
7875
	 * ! - Windows ticks (100ns since 01/01/0001)
7876
	 * "..." - literal text
7877
	 * '' - single quote
7878
	 *
7879
	 * @param  format string - the desired format of the date
7880
	 * @param  date Date - the date value to format
7881
	 * @param  settings Object - attributes include:
7882
	 *					dayNamesShort	string[7] - abbreviated names of the days from Sunday (optional)
7883
	 *					dayNames		string[7] - names of the days from Sunday (optional)
7884
	 *					monthNamesShort string[12] - abbreviated names of the months (optional)
7885
	 *					monthNames		string[12] - names of the months (optional)
7886
	 * @return  string - the date in the above format
7887
	 */
7888
	formatDate: function (format, date, settings) {
7889
		if (!date) {
7890
			return "";
7891
		}
7892
7893
		var iFormat,
7894
			dayNamesShort = (settings ? settings.dayNamesShort : null) || this._defaults.dayNamesShort,
7895
			dayNames = (settings ? settings.dayNames : null) || this._defaults.dayNames,
7896
			monthNamesShort = (settings ? settings.monthNamesShort : null) || this._defaults.monthNamesShort,
7897
			monthNames = (settings ? settings.monthNames : null) || this._defaults.monthNames,
7898
			// Check whether a format character is doubled
7899
			lookAhead = function(match) {
7900
				var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) === match);
7901
				if (matches) {
7902
					iFormat++;
7903
				}
7904
				return matches;
7905
			},
7906
			// Format a number, with leading zero if necessary
7907
			formatNumber = function(match, value, len) {
7908
				var num = "" + value;
7909
				if (lookAhead(match)) {
7910
					while (num.length < len) {
7911
						num = "0" + num;
7912
					}
7913
				}
7914
				return num;
7915
			},
7916
			// Format a name, short or long as requested
7917
			formatName = function(match, value, shortNames, longNames) {
7918
				return (lookAhead(match) ? longNames[value] : shortNames[value]);
7919
			},
7920
			output = "",
7921
			literal = false;
7922
7923
		if (date) {
7924
			for (iFormat = 0; iFormat < format.length; iFormat++) {
7925
				if (literal) {
7926
					if (format.charAt(iFormat) === "'" && !lookAhead("'")) {
7927
						literal = false;
7928
					} else {
7929
						output += format.charAt(iFormat);
7930
					}
7931
				} else {
7932
					switch (format.charAt(iFormat)) {
7933
						case "d":
7934
							output += formatNumber("d", date.getDate(), 2);
7935
							break;
7936
						case "D":
7937
							output += formatName("D", date.getDay(), dayNamesShort, dayNames);
7938
							break;
7939
						case "o":
7940
							output += formatNumber("o",
7941
								Math.round((new Date(date.getFullYear(), date.getMonth(), date.getDate()).getTime() - new Date(date.getFullYear(), 0, 0).getTime()) / 86400000), 3);
7942
							break;
7943
						case "m":
7944
							output += formatNumber("m", date.getMonth() + 1, 2);
7945
							break;
7946
						case "M":
7947
							output += formatName("M", date.getMonth(), monthNamesShort, monthNames);
7948
							break;
7949
						case "y":
7950
							output += (lookAhead("y") ? date.getFullYear() :
7951
								(date.getYear() % 100 < 10 ? "0" : "") + date.getYear() % 100);
7952
							break;
7953
						case "@":
7954
							output += date.getTime();
7955
							break;
7956
						case "!":
7957
							output += date.getTime() * 10000 + this._ticksTo1970;
7958
							break;
7959
						case "'":
7960
							if (lookAhead("'")) {
7961
								output += "'";
7962
							} else {
7963
								literal = true;
7964
							}
7965
							break;
7966
						default:
7967
							output += format.charAt(iFormat);
7968
					}
7969
				}
7970
			}
7971
		}
7972
		return output;
7973
	},
7974
7975
	/* Extract all possible characters from the date format. */
7976
	_possibleChars: function (format) {
7977
		var iFormat,
7978
			chars = "",
7979
			literal = false,
7980
			// Check whether a format character is doubled
7981
			lookAhead = function(match) {
7982
				var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) === match);
7983
				if (matches) {
7984
					iFormat++;
7985
				}
7986
				return matches;
7987
			};
7988
7989
		for (iFormat = 0; iFormat < format.length; iFormat++) {
7990
			if (literal) {
7991
				if (format.charAt(iFormat) === "'" && !lookAhead("'")) {
7992
					literal = false;
7993
				} else {
7994
					chars += format.charAt(iFormat);
7995
				}
7996
			} else {
7997
				switch (format.charAt(iFormat)) {
7998
					case "d": case "m": case "y": case "@":
7999
						chars += "0123456789";
8000
						break;
8001
					case "D": case "M":
8002
						return null; // Accept anything
8003
					case "'":
8004
						if (lookAhead("'")) {
8005
							chars += "'";
8006
						} else {
8007
							literal = true;
8008
						}
8009
						break;
8010
					default:
8011
						chars += format.charAt(iFormat);
8012
				}
8013
			}
8014
		}
8015
		return chars;
8016
	},
8017
8018
	/* Get a setting value, defaulting if necessary. */
8019
	_get: function(inst, name) {
8020
		return inst.settings[name] !== undefined ?
8021
			inst.settings[name] : this._defaults[name];
8022
	},
8023
8024
	/* Parse existing date and initialise date picker. */
8025
	_setDateFromField: function(inst, noDefault) {
8026
		if (inst.input.val() === inst.lastVal) {
8027
			return;
8028
		}
8029
8030
		var dateFormat = this._get(inst, "dateFormat"),
8031
			dates = inst.lastVal = inst.input ? inst.input.val() : null,
8032
			defaultDate = this._getDefaultDate(inst),
8033
			date = defaultDate,
8034
			settings = this._getFormatConfig(inst);
8035
8036
		try {
8037
			date = this.parseDate(dateFormat, dates, settings) || defaultDate;
8038
		} catch (event) {
8039
			dates = (noDefault ? "" : dates);
8040
		}
8041
		inst.selectedDay = date.getDate();
8042
		inst.drawMonth = inst.selectedMonth = date.getMonth();
8043
		inst.drawYear = inst.selectedYear = date.getFullYear();
8044
		inst.currentDay = (dates ? date.getDate() : 0);
8045
		inst.currentMonth = (dates ? date.getMonth() : 0);
8046
		inst.currentYear = (dates ? date.getFullYear() : 0);
8047
		this._adjustInstDate(inst);
8048
	},
8049
8050
	/* Retrieve the default date shown on opening. */
8051
	_getDefaultDate: function(inst) {
8052
		return this._restrictMinMax(inst,
8053
			this._determineDate(inst, this._get(inst, "defaultDate"), new Date()));
8054
	},
8055
8056
	/* A date may be specified as an exact value or a relative one. */
8057
	_determineDate: function(inst, date, defaultDate) {
8058
		var offsetNumeric = function(offset) {
8059
				var date = new Date();
8060
				date.setDate(date.getDate() + offset);
8061
				return date;
8062
			},
8063
			offsetString = function(offset) {
8064
				try {
8065
					return $.datepicker.parseDate($.datepicker._get(inst, "dateFormat"),
8066
						offset, $.datepicker._getFormatConfig(inst));
8067
				}
8068
				catch (e) {
8069
					// Ignore
8070
				}
8071
8072
				var date = (offset.toLowerCase().match(/^c/) ?
8073
					$.datepicker._getDate(inst) : null) || new Date(),
8074
					year = date.getFullYear(),
8075
					month = date.getMonth(),
8076
					day = date.getDate(),
8077
					pattern = /([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,
8078
					matches = pattern.exec(offset);
8079
8080
				while (matches) {
8081
					switch (matches[2] || "d") {
8082
						case "d" : case "D" :
8083
							day += parseInt(matches[1],10); break;
8084
						case "w" : case "W" :
8085
							day += parseInt(matches[1],10) * 7; break;
8086
						case "m" : case "M" :
8087
							month += parseInt(matches[1],10);
8088
							day = Math.min(day, $.datepicker._getDaysInMonth(year, month));
8089
							break;
8090
						case "y": case "Y" :
8091
							year += parseInt(matches[1],10);
8092
							day = Math.min(day, $.datepicker._getDaysInMonth(year, month));
8093
							break;
8094
					}
8095
					matches = pattern.exec(offset);
8096
				}
8097
				return new Date(year, month, day);
8098
			},
8099
			newDate = (date == null || date === "" ? defaultDate : (typeof date === "string" ? offsetString(date) :
8100
				(typeof date === "number" ? (isNaN(date) ? defaultDate : offsetNumeric(date)) : new Date(date.getTime()))));
8101
8102
		newDate = (newDate && newDate.toString() === "Invalid Date" ? defaultDate : newDate);
8103
		if (newDate) {
8104
			newDate.setHours(0);
8105
			newDate.setMinutes(0);
8106
			newDate.setSeconds(0);
8107
			newDate.setMilliseconds(0);
8108
		}
8109
		return this._daylightSavingAdjust(newDate);
8110
	},
8111
8112
	/* Handle switch to/from daylight saving.
8113
	 * Hours may be non-zero on daylight saving cut-over:
8114
	 * > 12 when midnight changeover, but then cannot generate
8115
	 * midnight datetime, so jump to 1AM, otherwise reset.
8116
	 * @param  date  (Date) the date to check
8117
	 * @return  (Date) the corrected date
8118
	 */
8119
	_daylightSavingAdjust: function(date) {
8120
		if (!date) {
8121
			return null;
8122
		}
8123
		date.setHours(date.getHours() > 12 ? date.getHours() + 2 : 0);
8124
		return date;
8125
	},
8126
8127
	/* Set the date(s) directly. */
8128
	_setDate: function(inst, date, noChange) {
8129
		var clear = !date,
8130
			origMonth = inst.selectedMonth,
8131
			origYear = inst.selectedYear,
8132
			newDate = this._restrictMinMax(inst, this._determineDate(inst, date, new Date()));
8133
8134
		inst.selectedDay = inst.currentDay = newDate.getDate();
8135
		inst.drawMonth = inst.selectedMonth = inst.currentMonth = newDate.getMonth();
8136
		inst.drawYear = inst.selectedYear = inst.currentYear = newDate.getFullYear();
8137
		if ((origMonth !== inst.selectedMonth || origYear !== inst.selectedYear) && !noChange) {
8138
			this._notifyChange(inst);
8139
		}
8140
		this._adjustInstDate(inst);
8141
		if (inst.input) {
8142
			inst.input.val(clear ? "" : this._formatDate(inst));
8143
		}
8144
	},
8145
8146
	/* Retrieve the date(s) directly. */
8147
	_getDate: function(inst) {
8148
		var startDate = (!inst.currentYear || (inst.input && inst.input.val() === "") ? null :
8149
			this._daylightSavingAdjust(new Date(
8150
			inst.currentYear, inst.currentMonth, inst.currentDay)));
8151
			return startDate;
8152
	},
8153
8154
	/* Attach the onxxx handlers.  These are declared statically so
8155
	 * they work with static code transformers like Caja.
8156
	 */
8157
	_attachHandlers: function(inst) {
8158
		var stepMonths = this._get(inst, "stepMonths"),
8159
			id = "#" + inst.id.replace( /\\\\/g, "\\" );
8160
		inst.dpDiv.find("[data-handler]").map(function () {
8161
			var handler = {
8162
				prev: function () {
8163
					$.datepicker._adjustDate(id, -stepMonths, "M");
8164
				},
8165
				next: function () {
8166
					$.datepicker._adjustDate(id, +stepMonths, "M");
8167
				},
8168
				hide: function () {
8169
					$.datepicker._hideDatepicker();
8170
				},
8171
				today: function () {
8172
					$.datepicker._gotoToday(id);
8173
				},
8174
				selectDay: function () {
8175
					$.datepicker._selectDay(id, +this.getAttribute("data-month"), +this.getAttribute("data-year"), this);
8176
					return false;
8177
				},
8178
				selectMonth: function () {
8179
					$.datepicker._selectMonthYear(id, this, "M");
8180
					return false;
8181
				},
8182
				selectYear: function () {
8183
					$.datepicker._selectMonthYear(id, this, "Y");
8184
					return false;
8185
				}
8186
			};
8187
			$(this).bind(this.getAttribute("data-event"), handler[this.getAttribute("data-handler")]);
8188
		});
8189
	},
8190
8191
	/* Generate the HTML for the current state of the date picker. */
8192
	_generateHTML: function(inst) {
8193
		var maxDraw, prevText, prev, nextText, next, currentText, gotoDate,
8194
			controls, buttonPanel, firstDay, showWeek, dayNames, dayNamesMin,
8195
			monthNames, monthNamesShort, beforeShowDay, showOtherMonths,
8196
			selectOtherMonths, defaultDate, html, dow, row, group, col, selectedDate,
8197
			cornerClass, calender, thead, day, daysInMonth, leadDays, curRows, numRows,
8198
			printDate, dRow, tbody, daySettings, otherMonth, unselectable,
8199
			tempDate = new Date(),
8200
			today = this._daylightSavingAdjust(
8201
				new Date(tempDate.getFullYear(), tempDate.getMonth(), tempDate.getDate())), // clear time
8202
			isRTL = this._get(inst, "isRTL"),
8203
			showButtonPanel = this._get(inst, "showButtonPanel"),
8204
			hideIfNoPrevNext = this._get(inst, "hideIfNoPrevNext"),
8205
			navigationAsDateFormat = this._get(inst, "navigationAsDateFormat"),
8206
			numMonths = this._getNumberOfMonths(inst),
8207
			showCurrentAtPos = this._get(inst, "showCurrentAtPos"),
8208
			stepMonths = this._get(inst, "stepMonths"),
8209
			isMultiMonth = (numMonths[0] !== 1 || numMonths[1] !== 1),
8210
			currentDate = this._daylightSavingAdjust((!inst.currentDay ? new Date(9999, 9, 9) :
8211
				new Date(inst.currentYear, inst.currentMonth, inst.currentDay))),
8212
			minDate = this._getMinMaxDate(inst, "min"),
8213
			maxDate = this._getMinMaxDate(inst, "max"),
8214
			drawMonth = inst.drawMonth - showCurrentAtPos,
8215
			drawYear = inst.drawYear;
8216
8217
		if (drawMonth < 0) {
8218
			drawMonth += 12;
8219
			drawYear--;
8220
		}
8221
		if (maxDate) {
8222
			maxDraw = this._daylightSavingAdjust(new Date(maxDate.getFullYear(),
8223
				maxDate.getMonth() - (numMonths[0] * numMonths[1]) + 1, maxDate.getDate()));
8224
			maxDraw = (minDate && maxDraw < minDate ? minDate : maxDraw);
8225
			while (this._daylightSavingAdjust(new Date(drawYear, drawMonth, 1)) > maxDraw) {
8226
				drawMonth--;
8227
				if (drawMonth < 0) {
8228
					drawMonth = 11;
8229
					drawYear--;
8230
				}
8231
			}
8232
		}
8233
		inst.drawMonth = drawMonth;
8234
		inst.drawYear = drawYear;
8235
8236
		prevText = this._get(inst, "prevText");
8237
		prevText = (!navigationAsDateFormat ? prevText : this.formatDate(prevText,
8238
			this._daylightSavingAdjust(new Date(drawYear, drawMonth - stepMonths, 1)),
8239
			this._getFormatConfig(inst)));
8240
8241
		prev = (this._canAdjustMonth(inst, -1, drawYear, drawMonth) ?
8242
			"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click'" +
8243
			" title='" + prevText + "'><span class='ui-icon ui-icon-circle-triangle-" + ( isRTL ? "e" : "w") + "'>" + prevText + "</span></a>" :
8244
			(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>"));
8245
8246
		nextText = this._get(inst, "nextText");
8247
		nextText = (!navigationAsDateFormat ? nextText : this.formatDate(nextText,
8248
			this._daylightSavingAdjust(new Date(drawYear, drawMonth + stepMonths, 1)),
8249
			this._getFormatConfig(inst)));
8250
8251
		next = (this._canAdjustMonth(inst, +1, drawYear, drawMonth) ?
8252
			"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click'" +
8253
			" title='" + nextText + "'><span class='ui-icon ui-icon-circle-triangle-" + ( isRTL ? "w" : "e") + "'>" + nextText + "</span></a>" :
8254
			(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>"));
8255
8256
		currentText = this._get(inst, "currentText");
8257
		gotoDate = (this._get(inst, "gotoCurrent") && inst.currentDay ? currentDate : today);
8258
		currentText = (!navigationAsDateFormat ? currentText :
8259
			this.formatDate(currentText, gotoDate, this._getFormatConfig(inst)));
8260
8261
		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'>" +
8262
			this._get(inst, "closeText") + "</button>" : "");
8263
8264
		buttonPanel = (showButtonPanel) ? "<div class='ui-datepicker-buttonpane ui-widget-content'>" + (isRTL ? controls : "") +
8265
			(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'" +
8266
			">" + currentText + "</button>" : "") + (isRTL ? "" : controls) + "</div>" : "";
8267
8268
		firstDay = parseInt(this._get(inst, "firstDay"),10);
8269
		firstDay = (isNaN(firstDay) ? 0 : firstDay);
8270
8271
		showWeek = this._get(inst, "showWeek");
8272
		dayNames = this._get(inst, "dayNames");
8273
		dayNamesMin = this._get(inst, "dayNamesMin");
8274
		monthNames = this._get(inst, "monthNames");
8275
		monthNamesShort = this._get(inst, "monthNamesShort");
8276
		beforeShowDay = this._get(inst, "beforeShowDay");
8277
		showOtherMonths = this._get(inst, "showOtherMonths");
8278
		selectOtherMonths = this._get(inst, "selectOtherMonths");
8279
		defaultDate = this._getDefaultDate(inst);
8280
		html = "";
8281
		dow;
8282
		for (row = 0; row < numMonths[0]; row++) {
8283
			group = "";
8284
			this.maxRows = 4;
8285
			for (col = 0; col < numMonths[1]; col++) {
8286
				selectedDate = this._daylightSavingAdjust(new Date(drawYear, drawMonth, inst.selectedDay));
8287
				cornerClass = " ui-corner-all";
8288
				calender = "";
8289
				if (isMultiMonth) {
8290
					calender += "<div class='ui-datepicker-group";
8291
					if (numMonths[1] > 1) {
8292
						switch (col) {
8293
							case 0: calender += " ui-datepicker-group-first";
8294
								cornerClass = " ui-corner-" + (isRTL ? "right" : "left"); break;
8295
							case numMonths[1]-1: calender += " ui-datepicker-group-last";
8296
								cornerClass = " ui-corner-" + (isRTL ? "left" : "right"); break;
8297
							default: calender += " ui-datepicker-group-middle"; cornerClass = ""; break;
8298
						}
8299
					}
8300
					calender += "'>";
8301
				}
8302
				calender += "<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix" + cornerClass + "'>" +
8303
					(/all|left/.test(cornerClass) && row === 0 ? (isRTL ? next : prev) : "") +
8304
					(/all|right/.test(cornerClass) && row === 0 ? (isRTL ? prev : next) : "") +
8305
					this._generateMonthYearHeader(inst, drawMonth, drawYear, minDate, maxDate,
8306
					row > 0 || col > 0, monthNames, monthNamesShort) + // draw month headers
8307
					"</div><table class='ui-datepicker-calendar'><thead>" +
8308
					"<tr>";
8309
				thead = (showWeek ? "<th class='ui-datepicker-week-col'>" + this._get(inst, "weekHeader") + "</th>" : "");
8310
				for (dow = 0; dow < 7; dow++) { // days of the week
8311
					day = (dow + firstDay) % 7;
8312
					thead += "<th scope='col'" + ((dow + firstDay + 6) % 7 >= 5 ? " class='ui-datepicker-week-end'" : "") + ">" +
8313
						"<span title='" + dayNames[day] + "'>" + dayNamesMin[day] + "</span></th>";
8314
				}
8315
				calender += thead + "</tr></thead><tbody>";
8316
				daysInMonth = this._getDaysInMonth(drawYear, drawMonth);
8317
				if (drawYear === inst.selectedYear && drawMonth === inst.selectedMonth) {
8318
					inst.selectedDay = Math.min(inst.selectedDay, daysInMonth);
8319
				}
8320
				leadDays = (this._getFirstDayOfMonth(drawYear, drawMonth) - firstDay + 7) % 7;
8321
				curRows = Math.ceil((leadDays + daysInMonth) / 7); // calculate the number of rows to generate
8322
				numRows = (isMultiMonth ? this.maxRows > curRows ? this.maxRows : curRows : curRows); //If multiple months, use the higher number of rows (see #7043)
8323
				this.maxRows = numRows;
8324
				printDate = this._daylightSavingAdjust(new Date(drawYear, drawMonth, 1 - leadDays));
8325
				for (dRow = 0; dRow < numRows; dRow++) { // create date picker rows
8326
					calender += "<tr>";
8327
					tbody = (!showWeek ? "" : "<td class='ui-datepicker-week-col'>" +
8328
						this._get(inst, "calculateWeek")(printDate) + "</td>");
8329
					for (dow = 0; dow < 7; dow++) { // create date picker days
8330
						daySettings = (beforeShowDay ?
8331
							beforeShowDay.apply((inst.input ? inst.input[0] : null), [printDate]) : [true, ""]);
8332
						otherMonth = (printDate.getMonth() !== drawMonth);
8333
						unselectable = (otherMonth && !selectOtherMonths) || !daySettings[0] ||
8334
							(minDate && printDate < minDate) || (maxDate && printDate > maxDate);
8335
						tbody += "<td class='" +
8336
							((dow + firstDay + 6) % 7 >= 5 ? " ui-datepicker-week-end" : "") + // highlight weekends
8337
							(otherMonth ? " ui-datepicker-other-month" : "") + // highlight days from other months
8338
							((printDate.getTime() === selectedDate.getTime() && drawMonth === inst.selectedMonth && inst._keyEvent) || // user pressed key
8339
							(defaultDate.getTime() === printDate.getTime() && defaultDate.getTime() === selectedDate.getTime()) ?
8340
							// or defaultDate is current printedDate and defaultDate is selectedDate
8341
							" " + this._dayOverClass : "") + // highlight selected day
8342
							(unselectable ? " " + this._unselectableClass + " ui-state-disabled": "") +  // highlight unselectable days
8343
							(otherMonth && !showOtherMonths ? "" : " " + daySettings[1] + // highlight custom dates
8344
							(printDate.getTime() === currentDate.getTime() ? " " + this._currentClass : "") + // highlight selected day
8345
							(printDate.getTime() === today.getTime() ? " ui-datepicker-today" : "")) + "'" + // highlight today (if different)
8346
							((!otherMonth || showOtherMonths) && daySettings[2] ? " title='" + daySettings[2].replace(/'/g, "&#39;") + "'" : "") + // cell title
8347
							(unselectable ? "" : " data-handler='selectDay' data-event='click' data-month='" + printDate.getMonth() + "' data-year='" + printDate.getFullYear() + "'") + ">" + // actions
8348
							(otherMonth && !showOtherMonths ? "&#xa0;" : // display for other months
8349
							(unselectable ? "<span class='ui-state-default'>" + printDate.getDate() + "</span>" : "<a class='ui-state-default" +
8350
							(printDate.getTime() === today.getTime() ? " ui-state-highlight" : "") +
8351
							(printDate.getTime() === currentDate.getTime() ? " ui-state-active" : "") + // highlight selected day
8352
							(otherMonth ? " ui-priority-secondary" : "") + // distinguish dates from other months
8353
							"' href='#'>" + printDate.getDate() + "</a>")) + "</td>"; // display selectable date
8354
						printDate.setDate(printDate.getDate() + 1);
8355
						printDate = this._daylightSavingAdjust(printDate);
8356
					}
8357
					calender += tbody + "</tr>";
8358
				}
8359
				drawMonth++;
8360
				if (drawMonth > 11) {
8361
					drawMonth = 0;
8362
					drawYear++;
8363
				}
8364
				calender += "</tbody></table>" + (isMultiMonth ? "</div>" +
8365
							((numMonths[0] > 0 && col === numMonths[1]-1) ? "<div class='ui-datepicker-row-break'></div>" : "") : "");
8366
				group += calender;
8367
			}
8368
			html += group;
8369
		}
8370
		html += buttonPanel;
8371
		inst._keyEvent = false;
8372
		return html;
8373
	},
8374
8375
	/* Generate the month and year header. */
8376
	_generateMonthYearHeader: function(inst, drawMonth, drawYear, minDate, maxDate,
8377
			secondary, monthNames, monthNamesShort) {
8378
8379
		var inMinYear, inMaxYear, month, years, thisYear, determineYear, year, endYear,
8380
			changeMonth = this._get(inst, "changeMonth"),
8381
			changeYear = this._get(inst, "changeYear"),
8382
			showMonthAfterYear = this._get(inst, "showMonthAfterYear"),
8383
			html = "<div class='ui-datepicker-title'>",
8384
			monthHtml = "";
8385
8386
		// month selection
8387
		if (secondary || !changeMonth) {
8388
			monthHtml += "<span class='ui-datepicker-month'>" + monthNames[drawMonth] + "</span>";
8389
		} else {
8390
			inMinYear = (minDate && minDate.getFullYear() === drawYear);
8391
			inMaxYear = (maxDate && maxDate.getFullYear() === drawYear);
8392
			monthHtml += "<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>";
8393
			for ( month = 0; month < 12; month++) {
8394
				if ((!inMinYear || month >= minDate.getMonth()) && (!inMaxYear || month <= maxDate.getMonth())) {
8395
					monthHtml += "<option value='" + month + "'" +
8396
						(month === drawMonth ? " selected='selected'" : "") +
8397
						">" + monthNamesShort[month] + "</option>";
8398
				}
8399
			}
8400
			monthHtml += "</select>";
8401
		}
8402
8403
		if (!showMonthAfterYear) {
8404
			html += monthHtml + (secondary || !(changeMonth && changeYear) ? "&#xa0;" : "");
8405
		}
8406
8407
		// year selection
8408
		if ( !inst.yearshtml ) {
8409
			inst.yearshtml = "";
8410
			if (secondary || !changeYear) {
8411
				html += "<span class='ui-datepicker-year'>" + drawYear + "</span>";
8412
			} else {
8413
				// determine range of years to display
8414
				years = this._get(inst, "yearRange").split(":");
8415
				thisYear = new Date().getFullYear();
8416
				determineYear = function(value) {
8417
					var year = (value.match(/c[+\-].*/) ? drawYear + parseInt(value.substring(1), 10) :
8418
						(value.match(/[+\-].*/) ? thisYear + parseInt(value, 10) :
8419
						parseInt(value, 10)));
8420
					return (isNaN(year) ? thisYear : year);
8421
				};
8422
				year = determineYear(years[0]);
8423
				endYear = Math.max(year, determineYear(years[1] || ""));
8424
				year = (minDate ? Math.max(year, minDate.getFullYear()) : year);
8425
				endYear = (maxDate ? Math.min(endYear, maxDate.getFullYear()) : endYear);
8426
				inst.yearshtml += "<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";
8427
				for (; year <= endYear; year++) {
8428
					inst.yearshtml += "<option value='" + year + "'" +
8429
						(year === drawYear ? " selected='selected'" : "") +
8430
						">" + year + "</option>";
8431
				}
8432
				inst.yearshtml += "</select>";
8433
8434
				html += inst.yearshtml;
8435
				inst.yearshtml = null;
8436
			}
8437
		}
8438
8439
		html += this._get(inst, "yearSuffix");
8440
		if (showMonthAfterYear) {
8441
			html += (secondary || !(changeMonth && changeYear) ? "&#xa0;" : "") + monthHtml;
8442
		}
8443
		html += "</div>"; // Close datepicker_header
8444
		return html;
8445
	},
8446
8447
	/* Adjust one of the date sub-fields. */
8448
	_adjustInstDate: function(inst, offset, period) {
8449
		var year = inst.drawYear + (period === "Y" ? offset : 0),
8450
			month = inst.drawMonth + (period === "M" ? offset : 0),
8451
			day = Math.min(inst.selectedDay, this._getDaysInMonth(year, month)) + (period === "D" ? offset : 0),
8452
			date = this._restrictMinMax(inst, this._daylightSavingAdjust(new Date(year, month, day)));
8453
8454
		inst.selectedDay = date.getDate();
8455
		inst.drawMonth = inst.selectedMonth = date.getMonth();
8456
		inst.drawYear = inst.selectedYear = date.getFullYear();
8457
		if (period === "M" || period === "Y") {
8458
			this._notifyChange(inst);
8459
		}
8460
	},
8461
8462
	/* Ensure a date is within any min/max bounds. */
8463
	_restrictMinMax: function(inst, date) {
8464
		var minDate = this._getMinMaxDate(inst, "min"),
8465
			maxDate = this._getMinMaxDate(inst, "max"),
8466
			newDate = (minDate && date < minDate ? minDate : date);
8467
		return (maxDate && newDate > maxDate ? maxDate : newDate);
8468
	},
8469
8470
	/* Notify change of month/year. */
8471
	_notifyChange: function(inst) {
8472
		var onChange = this._get(inst, "onChangeMonthYear");
8473
		if (onChange) {
8474
			onChange.apply((inst.input ? inst.input[0] : null),
8475
				[inst.selectedYear, inst.selectedMonth + 1, inst]);
8476
		}
8477
	},
8478
8479
	/* Determine the number of months to show. */
8480
	_getNumberOfMonths: function(inst) {
8481
		var numMonths = this._get(inst, "numberOfMonths");
8482
		return (numMonths == null ? [1, 1] : (typeof numMonths === "number" ? [1, numMonths] : numMonths));
8483
	},
8484
8485
	/* Determine the current maximum date - ensure no time components are set. */
8486
	_getMinMaxDate: function(inst, minMax) {
8487
		return this._determineDate(inst, this._get(inst, minMax + "Date"), null);
8488
	},
8489
8490
	/* Find the number of days in a given month. */
8491
	_getDaysInMonth: function(year, month) {
8492
		return 32 - this._daylightSavingAdjust(new Date(year, month, 32)).getDate();
8493
	},
8494
8495
	/* Find the day of the week of the first of a month. */
8496
	_getFirstDayOfMonth: function(year, month) {
8497
		return new Date(year, month, 1).getDay();
8498
	},
8499
8500
	/* Determines if we should allow a "next/prev" month display change. */
8501
	_canAdjustMonth: function(inst, offset, curYear, curMonth) {
8502
		var numMonths = this._getNumberOfMonths(inst),
8503
			date = this._daylightSavingAdjust(new Date(curYear,
8504
			curMonth + (offset < 0 ? offset : numMonths[0] * numMonths[1]), 1));
8505
8506
		if (offset < 0) {
8507
			date.setDate(this._getDaysInMonth(date.getFullYear(), date.getMonth()));
8508
		}
8509
		return this._isInRange(inst, date);
8510
	},
8511
8512
	/* Is the given date in the accepted range? */
8513
	_isInRange: function(inst, date) {
8514
		var yearSplit, currentYear,
8515
			minDate = this._getMinMaxDate(inst, "min"),
8516
			maxDate = this._getMinMaxDate(inst, "max"),
8517
			minYear = null,
8518
			maxYear = null,
8519
			years = this._get(inst, "yearRange");
8520
			if (years){
8521
				yearSplit = years.split(":");
8522
				currentYear = new Date().getFullYear();
8523
				minYear = parseInt(yearSplit[0], 10);
8524
				maxYear = parseInt(yearSplit[1], 10);
8525
				if ( yearSplit[0].match(/[+\-].*/) ) {
8526
					minYear += currentYear;
8527
				}
8528
				if ( yearSplit[1].match(/[+\-].*/) ) {
8529
					maxYear += currentYear;
8530
				}
8531
			}
8532
8533
		return ((!minDate || date.getTime() >= minDate.getTime()) &&
8534
			(!maxDate || date.getTime() <= maxDate.getTime()) &&
8535
			(!minYear || date.getFullYear() >= minYear) &&
8536
			(!maxYear || date.getFullYear() <= maxYear));
8537
	},
8538
8539
	/* Provide the configuration settings for formatting/parsing. */
8540
	_getFormatConfig: function(inst) {
8541
		var shortYearCutoff = this._get(inst, "shortYearCutoff");
8542
		shortYearCutoff = (typeof shortYearCutoff !== "string" ? shortYearCutoff :
8543
			new Date().getFullYear() % 100 + parseInt(shortYearCutoff, 10));
8544
		return {shortYearCutoff: shortYearCutoff,
8545
			dayNamesShort: this._get(inst, "dayNamesShort"), dayNames: this._get(inst, "dayNames"),
8546
			monthNamesShort: this._get(inst, "monthNamesShort"), monthNames: this._get(inst, "monthNames")};
8547
	},
8548
8549
	/* Format the given date for display. */
8550
	_formatDate: function(inst, day, month, year) {
8551
		if (!day) {
8552
			inst.currentDay = inst.selectedDay;
8553
			inst.currentMonth = inst.selectedMonth;
8554
			inst.currentYear = inst.selectedYear;
8555
		}
8556
		var date = (day ? (typeof day === "object" ? day :
8557
			this._daylightSavingAdjust(new Date(year, month, day))) :
8558
			this._daylightSavingAdjust(new Date(inst.currentYear, inst.currentMonth, inst.currentDay)));
8559
		return this.formatDate(this._get(inst, "dateFormat"), date, this._getFormatConfig(inst));
8560
	}
8561
});
8562
8563
/*
8564
 * Bind hover events for datepicker elements.
8565
 * Done via delegate so the binding only occurs once in the lifetime of the parent div.
8566
 * Global datepicker_instActive, set by _updateDatepicker allows the handlers to find their way back to the active picker.
8567
 */
8568
function datepicker_bindHover(dpDiv) {
8569
	var selector = "button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";
8570
	return dpDiv.delegate(selector, "mouseout", function() {
8571
			$(this).removeClass("ui-state-hover");
8572
			if (this.className.indexOf("ui-datepicker-prev") !== -1) {
8573
				$(this).removeClass("ui-datepicker-prev-hover");
8574
			}
8575
			if (this.className.indexOf("ui-datepicker-next") !== -1) {
8576
				$(this).removeClass("ui-datepicker-next-hover");
8577
			}
8578
		})
8579
		.delegate( selector, "mouseover", datepicker_handleMouseover );
8580
}
8581
8582
function datepicker_handleMouseover() {
8583
	if (!$.datepicker._isDisabledDatepicker( datepicker_instActive.inline? datepicker_instActive.dpDiv.parent()[0] : datepicker_instActive.input[0])) {
8584
		$(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover");
8585
		$(this).addClass("ui-state-hover");
8586
		if (this.className.indexOf("ui-datepicker-prev") !== -1) {
8587
			$(this).addClass("ui-datepicker-prev-hover");
8588
		}
8589
		if (this.className.indexOf("ui-datepicker-next") !== -1) {
8590
			$(this).addClass("ui-datepicker-next-hover");
8591
		}
8592
	}
8593
}
8594
8595
/* jQuery extend now ignores nulls! */
8596
function datepicker_extendRemove(target, props) {
8597
	$.extend(target, props);
8598
	for (var name in props) {
8599
		if (props[name] == null) {
8600
			target[name] = props[name];
8601
		}
8602
	}
8603
	return target;
8604
}
8605
8606
/* Invoke the datepicker functionality.
8607
   @param  options  string - a command, optionally followed by additional parameters or
8608
					Object - settings for attaching new datepicker functionality
8609
   @return  jQuery object */
8610
$.fn.datepicker = function(options){
8611
8612
	/* Verify an empty collection wasn't passed - Fixes #6976 */
8613
	if ( !this.length ) {
8614
		return this;
8615
	}
8616
8617
	/* Initialise the date picker. */
8618
	if (!$.datepicker.initialized) {
8619
		$(document).mousedown($.datepicker._checkExternalClick);
8620
		$.datepicker.initialized = true;
8621
	}
8622
8623
	/* Append datepicker main container to body if not exist. */
8624
	if ($("#"+$.datepicker._mainDivId).length === 0) {
8625
		$("body").append($.datepicker.dpDiv);
8626
	}
8627
8628
	var otherArgs = Array.prototype.slice.call(arguments, 1);
8629
	if (typeof options === "string" && (options === "isDisabled" || options === "getDate" || options === "widget")) {
8630
		return $.datepicker["_" + options + "Datepicker"].
8631
			apply($.datepicker, [this[0]].concat(otherArgs));
8632
	}
8633
	if (options === "option" && arguments.length === 2 && typeof arguments[1] === "string") {
8634
		return $.datepicker["_" + options + "Datepicker"].
8635
			apply($.datepicker, [this[0]].concat(otherArgs));
8636
	}
8637
	return this.each(function() {
8638
		typeof options === "string" ?
8639
			$.datepicker["_" + options + "Datepicker"].
8640
				apply($.datepicker, [this].concat(otherArgs)) :
8641
			$.datepicker._attachDatepicker(this, options);
8642
	});
8643
};
8644
8645
$.datepicker = new Datepicker(); // singleton instance
8646
$.datepicker.initialized = false;
8647
$.datepicker.uuid = new Date().getTime();
8648
$.datepicker.version = "1.11.4";
8649
8650
var datepicker = $.datepicker;
8651
8652
8653
/*!
8654
 * jQuery UI Progressbar 1.11.4
8655
 * http://jqueryui.com
8656
 *
8657
 * Copyright jQuery Foundation and other contributors
8658
 * Released under the MIT license.
8659
 * http://jquery.org/license
8660
 *
8661
 * http://api.jqueryui.com/progressbar/
8662
 */
8663
8664
8665
var progressbar = $.widget( "ui.progressbar", {
8666
	version: "1.11.4",
8667
	options: {
8668
		max: 100,
8669
		value: 0,
8670
8671
		change: null,
8672
		complete: null
8673
	},
8674
8675
	min: 0,
8676
8677
	_create: function() {
8678
		// Constrain initial value
8679
		this.oldValue = this.options.value = this._constrainedValue();
8680
8681
		this.element
8682
			.addClass( "ui-progressbar ui-widget ui-widget-content ui-corner-all" )
8683
			.attr({
8684
				// Only set static values, aria-valuenow and aria-valuemax are
8685
				// set inside _refreshValue()
8686
				role: "progressbar",
8687
				"aria-valuemin": this.min
8688
			});
8689
8690
		this.valueDiv = $( "<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>" )
8691
			.appendTo( this.element );
8692
8693
		this._refreshValue();
8694
	},
8695
8696
	_destroy: function() {
8697
		this.element
8698
			.removeClass( "ui-progressbar ui-widget ui-widget-content ui-corner-all" )
8699
			.removeAttr( "role" )
8700
			.removeAttr( "aria-valuemin" )
8701
			.removeAttr( "aria-valuemax" )
8702
			.removeAttr( "aria-valuenow" );
8703
8704
		this.valueDiv.remove();
8705
	},
8706
8707
	value: function( newValue ) {
8708
		if ( newValue === undefined ) {
8709
			return this.options.value;
8710
		}
8711
8712
		this.options.value = this._constrainedValue( newValue );
8713
		this._refreshValue();
8714
	},
8715
8716
	_constrainedValue: function( newValue ) {
8717
		if ( newValue === undefined ) {
8718
			newValue = this.options.value;
8719
		}
8720
8721
		this.indeterminate = newValue === false;
8722
8723
		// sanitize value
8724
		if ( typeof newValue !== "number" ) {
8725
			newValue = 0;
8726
		}
8727
8728
		return this.indeterminate ? false :
8729
			Math.min( this.options.max, Math.max( this.min, newValue ) );
8730
	},
8731
8732
	_setOptions: function( options ) {
8733
		// Ensure "value" option is set after other values (like max)
8734
		var value = options.value;
8735
		delete options.value;
8736
8737
		this._super( options );
8738
8739
		this.options.value = this._constrainedValue( value );
8740
		this._refreshValue();
8741
	},
8742
8743
	_setOption: function( key, value ) {
8744
		if ( key === "max" ) {
8745
			// Don't allow a max less than min
8746
			value = Math.max( this.min, value );
8747
		}
8748
		if ( key === "disabled" ) {
8749
			this.element
8750
				.toggleClass( "ui-state-disabled", !!value )
8751
				.attr( "aria-disabled", value );
8752
		}
8753
		this._super( key, value );
8754
	},
8755
8756
	_percentage: function() {
8757
		return this.indeterminate ? 100 : 100 * ( this.options.value - this.min ) / ( this.options.max - this.min );
8758
	},
8759
8760
	_refreshValue: function() {
8761
		var value = this.options.value,
8762
			percentage = this._percentage();
8763
8764
		this.valueDiv
8765
			.toggle( this.indeterminate || value > this.min )
8766
			.toggleClass( "ui-corner-right", value === this.options.max )
8767
			.width( percentage.toFixed(0) + "%" );
8768
8769
		this.element.toggleClass( "ui-progressbar-indeterminate", this.indeterminate );
8770
8771
		if ( this.indeterminate ) {
8772
			this.element.removeAttr( "aria-valuenow" );
8773
			if ( !this.overlayDiv ) {
8774
				this.overlayDiv = $( "<div class='ui-progressbar-overlay'></div>" ).appendTo( this.valueDiv );
8775
			}
8776
		} else {
8777
			this.element.attr({
8778
				"aria-valuemax": this.options.max,
8779
				"aria-valuenow": value
8780
			});
8781
			if ( this.overlayDiv ) {
8782
				this.overlayDiv.remove();
8783
				this.overlayDiv = null;
8784
			}
8785
		}
8786
8787
		if ( this.oldValue !== value ) {
8788
			this.oldValue = value;
8789
			this._trigger( "change" );
8790
		}
8791
		if ( value === this.options.max ) {
8792
			this._trigger( "complete" );
8793
		}
8794
	}
8795
});
8796
8797
8798
/*!
8799
 * jQuery UI Slider 1.11.4
8800
 * http://jqueryui.com
8801
 *
8802
 * Copyright jQuery Foundation and other contributors
8803
 * Released under the MIT license.
8804
 * http://jquery.org/license
8805
 *
8806
 * http://api.jqueryui.com/slider/
8807
 */
8808
8809
8810
var slider = $.widget( "ui.slider", $.ui.mouse, {
8811
	version: "1.11.4",
8812
	widgetEventPrefix: "slide",
8813
8814
	options: {
8815
		animate: false,
8816
		distance: 0,
8817
		max: 100,
8818
		min: 0,
8819
		orientation: "horizontal",
8820
		range: false,
8821
		step: 1,
8822
		value: 0,
8823
		values: null,
8824
8825
		// callbacks
8826
		change: null,
8827
		slide: null,
8828
		start: null,
8829
		stop: null
8830
	},
8831
8832
	// number of pages in a slider
8833
	// (how many times can you page up/down to go through the whole range)
8834
	numPages: 5,
8835
8836
	_create: function() {
8837
		this._keySliding = false;
8838
		this._mouseSliding = false;
8839
		this._animateOff = true;
8840
		this._handleIndex = null;
8841
		this._detectOrientation();
8842
		this._mouseInit();
8843
		this._calculateNewMax();
8844
8845
		this.element
8846
			.addClass( "ui-slider" +
8847
				" ui-slider-" + this.orientation +
8848
				" ui-widget" +
8849
				" ui-widget-content" +
8850
				" ui-corner-all");
8851
8852
		this._refresh();
8853
		this._setOption( "disabled", this.options.disabled );
8854
8855
		this._animateOff = false;
8856
	},
8857
8858
	_refresh: function() {
8859
		this._createRange();
8860
		this._createHandles();
8861
		this._setupEvents();
8862
		this._refreshValue();
8863
	},
8864
8865
	_createHandles: function() {
8866
		var i, handleCount,
8867
			options = this.options,
8868
			existingHandles = this.element.find( ".ui-slider-handle" ).addClass( "ui-state-default ui-corner-all" ),
8869
			handle = "<span class='ui-slider-handle ui-state-default ui-corner-all' tabindex='0'></span>",
8870
			handles = [];
8871
8872
		handleCount = ( options.values && options.values.length ) || 1;
8873
8874
		if ( existingHandles.length > handleCount ) {
8875
			existingHandles.slice( handleCount ).remove();
8876
			existingHandles = existingHandles.slice( 0, handleCount );
8877
		}
8878
8879
		for ( i = existingHandles.length; i < handleCount; i++ ) {
8880
			handles.push( handle );
8881
		}
8882
8883
		this.handles = existingHandles.add( $( handles.join( "" ) ).appendTo( this.element ) );
8884
8885
		this.handle = this.handles.eq( 0 );
8886
8887
		this.handles.each(function( i ) {
8888
			$( this ).data( "ui-slider-handle-index", i );
8889
		});
8890
	},
8891
8892
	_createRange: function() {
8893
		var options = this.options,
8894
			classes = "";
8895
8896
		if ( options.range ) {
8897
			if ( options.range === true ) {
8898
				if ( !options.values ) {
8899
					options.values = [ this._valueMin(), this._valueMin() ];
8900
				} else if ( options.values.length && options.values.length !== 2 ) {
8901
					options.values = [ options.values[0], options.values[0] ];
8902
				} else if ( $.isArray( options.values ) ) {
8903
					options.values = options.values.slice(0);
8904
				}
8905
			}
8906
8907
			if ( !this.range || !this.range.length ) {
8908
				this.range = $( "<div></div>" )
8909
					.appendTo( this.element );
8910
8911
				classes = "ui-slider-range" +
8912
				// note: this isn't the most fittingly semantic framework class for this element,
8913
				// but worked best visually with a variety of themes
8914
				" ui-widget-header ui-corner-all";
8915
			} else {
8916
				this.range.removeClass( "ui-slider-range-min ui-slider-range-max" )
8917
					// Handle range switching from true to min/max
8918
					.css({
8919
						"left": "",
8920
						"bottom": ""
8921
					});
8922
			}
8923
8924
			this.range.addClass( classes +
8925
				( ( options.range === "min" || options.range === "max" ) ? " ui-slider-range-" + options.range : "" ) );
8926
		} else {
8927
			if ( this.range ) {
8928
				this.range.remove();
8929
			}
8930
			this.range = null;
8931
		}
8932
	},
8933
8934
	_setupEvents: function() {
8935
		this._off( this.handles );
8936
		this._on( this.handles, this._handleEvents );
8937
		this._hoverable( this.handles );
8938
		this._focusable( this.handles );
8939
	},
8940
8941
	_destroy: function() {
8942
		this.handles.remove();
8943
		if ( this.range ) {
8944
			this.range.remove();
8945
		}
8946
8947
		this.element
8948
			.removeClass( "ui-slider" +
8949
				" ui-slider-horizontal" +
8950
				" ui-slider-vertical" +
8951
				" ui-widget" +
8952
				" ui-widget-content" +
8953
				" ui-corner-all" );
8954
8955
		this._mouseDestroy();
8956
	},
8957
8958
	_mouseCapture: function( event ) {
8959
		var position, normValue, distance, closestHandle, index, allowed, offset, mouseOverHandle,
8960
			that = this,
8961
			o = this.options;
8962
8963
		if ( o.disabled ) {
8964
			return false;
8965
		}
8966
8967
		this.elementSize = {
8968
			width: this.element.outerWidth(),
8969
			height: this.element.outerHeight()
8970
		};
8971
		this.elementOffset = this.element.offset();
8972
8973
		position = { x: event.pageX, y: event.pageY };
8974
		normValue = this._normValueFromMouse( position );
8975
		distance = this._valueMax() - this._valueMin() + 1;
8976
		this.handles.each(function( i ) {
8977
			var thisDistance = Math.abs( normValue - that.values(i) );
8978
			if (( distance > thisDistance ) ||
8979
				( distance === thisDistance &&
8980
					(i === that._lastChangedValue || that.values(i) === o.min ))) {
8981
				distance = thisDistance;
8982
				closestHandle = $( this );
8983
				index = i;
8984
			}
8985
		});
8986
8987
		allowed = this._start( event, index );
8988
		if ( allowed === false ) {
8989
			return false;
8990
		}
8991
		this._mouseSliding = true;
8992
8993
		this._handleIndex = index;
8994
8995
		closestHandle
8996
			.addClass( "ui-state-active" )
8997
			.focus();
8998
8999
		offset = closestHandle.offset();
9000
		mouseOverHandle = !$( event.target ).parents().addBack().is( ".ui-slider-handle" );
9001
		this._clickOffset = mouseOverHandle ? { left: 0, top: 0 } : {
9002
			left: event.pageX - offset.left - ( closestHandle.width() / 2 ),
9003
			top: event.pageY - offset.top -
9004
				( closestHandle.height() / 2 ) -
9005
				( parseInt( closestHandle.css("borderTopWidth"), 10 ) || 0 ) -
9006
				( parseInt( closestHandle.css("borderBottomWidth"), 10 ) || 0) +
9007
				( parseInt( closestHandle.css("marginTop"), 10 ) || 0)
9008
		};
9009
9010
		if ( !this.handles.hasClass( "ui-state-hover" ) ) {
9011
			this._slide( event, index, normValue );
9012
		}
9013
		this._animateOff = true;
9014
		return true;
9015
	},
9016
9017
	_mouseStart: function() {
9018
		return true;
9019
	},
9020
9021
	_mouseDrag: function( event ) {
9022
		var position = { x: event.pageX, y: event.pageY },
9023
			normValue = this._normValueFromMouse( position );
9024
9025
		this._slide( event, this._handleIndex, normValue );
9026
9027
		return false;
9028
	},
9029
9030
	_mouseStop: function( event ) {
9031
		this.handles.removeClass( "ui-state-active" );
9032
		this._mouseSliding = false;
9033
9034
		this._stop( event, this._handleIndex );
9035
		this._change( event, this._handleIndex );
9036
9037
		this._handleIndex = null;
9038
		this._clickOffset = null;
9039
		this._animateOff = false;
9040
9041
		return false;
9042
	},
9043
9044
	_detectOrientation: function() {
9045
		this.orientation = ( this.options.orientation === "vertical" ) ? "vertical" : "horizontal";
9046
	},
9047
9048
	_normValueFromMouse: function( position ) {
9049
		var pixelTotal,
9050
			pixelMouse,
9051
			percentMouse,
9052
			valueTotal,
9053
			valueMouse;
9054
9055
		if ( this.orientation === "horizontal" ) {
9056
			pixelTotal = this.elementSize.width;
9057
			pixelMouse = position.x - this.elementOffset.left - ( this._clickOffset ? this._clickOffset.left : 0 );
9058
		} else {
9059
			pixelTotal = this.elementSize.height;
9060
			pixelMouse = position.y - this.elementOffset.top - ( this._clickOffset ? this._clickOffset.top : 0 );
9061
		}
9062
9063
		percentMouse = ( pixelMouse / pixelTotal );
9064
		if ( percentMouse > 1 ) {
9065
			percentMouse = 1;
9066
		}
9067
		if ( percentMouse < 0 ) {
9068
			percentMouse = 0;
9069
		}
9070
		if ( this.orientation === "vertical" ) {
9071
			percentMouse = 1 - percentMouse;
9072
		}
9073
9074
		valueTotal = this._valueMax() - this._valueMin();
9075
		valueMouse = this._valueMin() + percentMouse * valueTotal;
9076
9077
		return this._trimAlignValue( valueMouse );
9078
	},
9079
9080
	_start: function( event, index ) {
9081
		var uiHash = {
9082
			handle: this.handles[ index ],
9083
			value: this.value()
9084
		};
9085
		if ( this.options.values && this.options.values.length ) {
9086
			uiHash.value = this.values( index );
9087
			uiHash.values = this.values();
9088
		}
9089
		return this._trigger( "start", event, uiHash );
9090
	},
9091
9092
	_slide: function( event, index, newVal ) {
9093
		var otherVal,
9094
			newValues,
9095
			allowed;
9096
9097
		if ( this.options.values && this.options.values.length ) {
9098
			otherVal = this.values( index ? 0 : 1 );
9099
9100
			if ( ( this.options.values.length === 2 && this.options.range === true ) &&
9101
					( ( index === 0 && newVal > otherVal) || ( index === 1 && newVal < otherVal ) )
9102
				) {
9103
				newVal = otherVal;
9104
			}
9105
9106
			if ( newVal !== this.values( index ) ) {
9107
				newValues = this.values();
9108
				newValues[ index ] = newVal;
9109
				// A slide can be canceled by returning false from the slide callback
9110
				allowed = this._trigger( "slide", event, {
9111
					handle: this.handles[ index ],
9112
					value: newVal,
9113
					values: newValues
9114
				} );
9115
				otherVal = this.values( index ? 0 : 1 );
9116
				if ( allowed !== false ) {
9117
					this.values( index, newVal );
9118
				}
9119
			}
9120
		} else {
9121
			if ( newVal !== this.value() ) {
9122
				// A slide can be canceled by returning false from the slide callback
9123
				allowed = this._trigger( "slide", event, {
9124
					handle: this.handles[ index ],
9125
					value: newVal
9126
				} );
9127
				if ( allowed !== false ) {
9128
					this.value( newVal );
9129
				}
9130
			}
9131
		}
9132
	},
9133
9134
	_stop: function( event, index ) {
9135
		var uiHash = {
9136
			handle: this.handles[ index ],
9137
			value: this.value()
9138
		};
9139
		if ( this.options.values && this.options.values.length ) {
9140
			uiHash.value = this.values( index );
9141
			uiHash.values = this.values();
9142
		}
9143
9144
		this._trigger( "stop", event, uiHash );
9145
	},
9146
9147
	_change: function( event, index ) {
9148
		if ( !this._keySliding && !this._mouseSliding ) {
9149
			var uiHash = {
9150
				handle: this.handles[ index ],
9151
				value: this.value()
9152
			};
9153
			if ( this.options.values && this.options.values.length ) {
9154
				uiHash.value = this.values( index );
9155
				uiHash.values = this.values();
9156
			}
9157
9158
			//store the last changed value index for reference when handles overlap
9159
			this._lastChangedValue = index;
9160
9161
			this._trigger( "change", event, uiHash );
9162
		}
9163
	},
9164
9165
	value: function( newValue ) {
9166
		if ( arguments.length ) {
9167
			this.options.value = this._trimAlignValue( newValue );
9168
			this._refreshValue();
9169
			this._change( null, 0 );
9170
			return;
9171
		}
9172
9173
		return this._value();
9174
	},
9175
9176
	values: function( index, newValue ) {
9177
		var vals,
9178
			newValues,
9179
			i;
9180
9181
		if ( arguments.length > 1 ) {
9182
			this.options.values[ index ] = this._trimAlignValue( newValue );
9183
			this._refreshValue();
9184
			this._change( null, index );
9185
			return;
9186
		}
9187
9188
		if ( arguments.length ) {
9189
			if ( $.isArray( arguments[ 0 ] ) ) {
9190
				vals = this.options.values;
9191
				newValues = arguments[ 0 ];
9192
				for ( i = 0; i < vals.length; i += 1 ) {
9193
					vals[ i ] = this._trimAlignValue( newValues[ i ] );
9194
					this._change( null, i );
9195
				}
9196
				this._refreshValue();
9197
			} else {
9198
				if ( this.options.values && this.options.values.length ) {
9199
					return this._values( index );
9200
				} else {
9201
					return this.value();
9202
				}
9203
			}
9204
		} else {
9205
			return this._values();
9206
		}
9207
	},
9208
9209
	_setOption: function( key, value ) {
9210
		var i,
9211
			valsLength = 0;
9212
9213
		if ( key === "range" && this.options.range === true ) {
9214
			if ( value === "min" ) {
9215
				this.options.value = this._values( 0 );
9216
				this.options.values = null;
9217
			} else if ( value === "max" ) {
9218
				this.options.value = this._values( this.options.values.length - 1 );
9219
				this.options.values = null;
9220
			}
9221
		}
9222
9223
		if ( $.isArray( this.options.values ) ) {
9224
			valsLength = this.options.values.length;
9225
		}
9226
9227
		if ( key === "disabled" ) {
9228
			this.element.toggleClass( "ui-state-disabled", !!value );
9229
		}
9230
9231
		this._super( key, value );
9232
9233
		switch ( key ) {
9234
			case "orientation":
9235
				this._detectOrientation();
9236
				this.element
9237
					.removeClass( "ui-slider-horizontal ui-slider-vertical" )
9238
					.addClass( "ui-slider-" + this.orientation );
9239
				this._refreshValue();
9240
9241
				// Reset positioning from previous orientation
9242
				this.handles.css( value === "horizontal" ? "bottom" : "left", "" );
9243
				break;
9244
			case "value":
9245
				this._animateOff = true;
9246
				this._refreshValue();
9247
				this._change( null, 0 );
9248
				this._animateOff = false;
9249
				break;
9250
			case "values":
9251
				this._animateOff = true;
9252
				this._refreshValue();
9253
				for ( i = 0; i < valsLength; i += 1 ) {
9254
					this._change( null, i );
9255
				}
9256
				this._animateOff = false;
9257
				break;
9258
			case "step":
9259
			case "min":
9260
			case "max":
9261
				this._animateOff = true;
9262
				this._calculateNewMax();
9263
				this._refreshValue();
9264
				this._animateOff = false;
9265
				break;
9266
			case "range":
9267
				this._animateOff = true;
9268
				this._refresh();
9269
				this._animateOff = false;
9270
				break;
9271
		}
9272
	},
9273
9274
	//internal value getter
9275
	// _value() returns value trimmed by min and max, aligned by step
9276
	_value: function() {
9277
		var val = this.options.value;
9278
		val = this._trimAlignValue( val );
9279
9280
		return val;
9281
	},
9282
9283
	//internal values getter
9284
	// _values() returns array of values trimmed by min and max, aligned by step
9285
	// _values( index ) returns single value trimmed by min and max, aligned by step
9286
	_values: function( index ) {
9287
		var val,
9288
			vals,
9289
			i;
9290
9291
		if ( arguments.length ) {
9292
			val = this.options.values[ index ];
9293
			val = this._trimAlignValue( val );
9294
9295
			return val;
9296
		} else if ( this.options.values && this.options.values.length ) {
9297
			// .slice() creates a copy of the array
9298
			// this copy gets trimmed by min and max and then returned
9299
			vals = this.options.values.slice();
9300
			for ( i = 0; i < vals.length; i += 1) {
9301
				vals[ i ] = this._trimAlignValue( vals[ i ] );
9302
			}
9303
9304
			return vals;
9305
		} else {
9306
			return [];
9307
		}
9308
	},
9309
9310
	// returns the step-aligned value that val is closest to, between (inclusive) min and max
9311
	_trimAlignValue: function( val ) {
9312
		if ( val <= this._valueMin() ) {
9313
			return this._valueMin();
9314
		}
9315
		if ( val >= this._valueMax() ) {
9316
			return this._valueMax();
9317
		}
9318
		var step = ( this.options.step > 0 ) ? this.options.step : 1,
9319
			valModStep = (val - this._valueMin()) % step,
9320
			alignValue = val - valModStep;
9321
9322
		if ( Math.abs(valModStep) * 2 >= step ) {
9323
			alignValue += ( valModStep > 0 ) ? step : ( -step );
9324
		}
9325
9326
		// Since JavaScript has problems with large floats, round
9327
		// the final value to 5 digits after the decimal point (see #4124)
9328
		return parseFloat( alignValue.toFixed(5) );
9329
	},
9330
9331
	_calculateNewMax: function() {
9332
		var max = this.options.max,
9333
			min = this._valueMin(),
9334
			step = this.options.step,
9335
			aboveMin = Math.floor( ( +( max - min ).toFixed( this._precision() ) ) / step ) * step;
9336
		max = aboveMin + min;
9337
		this.max = parseFloat( max.toFixed( this._precision() ) );
9338
	},
9339
9340
	_precision: function() {
9341
		var precision = this._precisionOf( this.options.step );
9342
		if ( this.options.min !== null ) {
9343
			precision = Math.max( precision, this._precisionOf( this.options.min ) );
9344
		}
9345
		return precision;
9346
	},
9347
9348
	_precisionOf: function( num ) {
9349
		var str = num.toString(),
9350
			decimal = str.indexOf( "." );
9351
		return decimal === -1 ? 0 : str.length - decimal - 1;
9352
	},
9353
9354
	_valueMin: function() {
9355
		return this.options.min;
9356
	},
9357
9358
	_valueMax: function() {
9359
		return this.max;
9360
	},
9361
9362
	_refreshValue: function() {
9363
		var lastValPercent, valPercent, value, valueMin, valueMax,
9364
			oRange = this.options.range,
9365
			o = this.options,
9366
			that = this,
9367
			animate = ( !this._animateOff ) ? o.animate : false,
9368
			_set = {};
9369
9370
		if ( this.options.values && this.options.values.length ) {
9371
			this.handles.each(function( i ) {
9372
				valPercent = ( that.values(i) - that._valueMin() ) / ( that._valueMax() - that._valueMin() ) * 100;
9373
				_set[ that.orientation === "horizontal" ? "left" : "bottom" ] = valPercent + "%";
9374
				$( this ).stop( 1, 1 )[ animate ? "animate" : "css" ]( _set, o.animate );
9375
				if ( that.options.range === true ) {
9376
					if ( that.orientation === "horizontal" ) {
9377
						if ( i === 0 ) {
9378
							that.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { left: valPercent + "%" }, o.animate );
9379
						}
9380
						if ( i === 1 ) {
9381
							that.range[ animate ? "animate" : "css" ]( { width: ( valPercent - lastValPercent ) + "%" }, { queue: false, duration: o.animate } );
9382
						}
9383
					} else {
9384
						if ( i === 0 ) {
9385
							that.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { bottom: ( valPercent ) + "%" }, o.animate );
9386
						}
9387
						if ( i === 1 ) {
9388
							that.range[ animate ? "animate" : "css" ]( { height: ( valPercent - lastValPercent ) + "%" }, { queue: false, duration: o.animate } );
9389
						}
9390
					}
9391
				}
9392
				lastValPercent = valPercent;
9393
			});
9394
		} else {
9395
			value = this.value();
9396
			valueMin = this._valueMin();
9397
			valueMax = this._valueMax();
9398
			valPercent = ( valueMax !== valueMin ) ?
9399
					( value - valueMin ) / ( valueMax - valueMin ) * 100 :
9400
					0;
9401
			_set[ this.orientation === "horizontal" ? "left" : "bottom" ] = valPercent + "%";
9402
			this.handle.stop( 1, 1 )[ animate ? "animate" : "css" ]( _set, o.animate );
9403
9404
			if ( oRange === "min" && this.orientation === "horizontal" ) {
9405
				this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { width: valPercent + "%" }, o.animate );
9406
			}
9407
			if ( oRange === "max" && this.orientation === "horizontal" ) {
9408
				this.range[ animate ? "animate" : "css" ]( { width: ( 100 - valPercent ) + "%" }, { queue: false, duration: o.animate } );
9409
			}
9410
			if ( oRange === "min" && this.orientation === "vertical" ) {
9411
				this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { height: valPercent + "%" }, o.animate );
9412
			}
9413
			if ( oRange === "max" && this.orientation === "vertical" ) {
9414
				this.range[ animate ? "animate" : "css" ]( { height: ( 100 - valPercent ) + "%" }, { queue: false, duration: o.animate } );
9415
			}
9416
		}
9417
	},
9418
9419
	_handleEvents: {
9420
		keydown: function( event ) {
9421
			var allowed, curVal, newVal, step,
9422
				index = $( event.target ).data( "ui-slider-handle-index" );
9423
9424
			switch ( event.keyCode ) {
9425
				case $.ui.keyCode.HOME:
9426
				case $.ui.keyCode.END:
9427
				case $.ui.keyCode.PAGE_UP:
9428
				case $.ui.keyCode.PAGE_DOWN:
9429
				case $.ui.keyCode.UP:
9430
				case $.ui.keyCode.RIGHT:
9431
				case $.ui.keyCode.DOWN:
9432
				case $.ui.keyCode.LEFT:
9433
					event.preventDefault();
9434
					if ( !this._keySliding ) {
9435
						this._keySliding = true;
9436
						$( event.target ).addClass( "ui-state-active" );
9437
						allowed = this._start( event, index );
9438
						if ( allowed === false ) {
9439
							return;
9440
						}
9441
					}
9442
					break;
9443
			}
9444
9445
			step = this.options.step;
9446
			if ( this.options.values && this.options.values.length ) {
9447
				curVal = newVal = this.values( index );
9448
			} else {
9449
				curVal = newVal = this.value();
9450
			}
9451
9452
			switch ( event.keyCode ) {
9453
				case $.ui.keyCode.HOME:
9454
					newVal = this._valueMin();
9455
					break;
9456
				case $.ui.keyCode.END:
9457
					newVal = this._valueMax();
9458
					break;
9459
				case $.ui.keyCode.PAGE_UP:
9460
					newVal = this._trimAlignValue(
9461
						curVal + ( ( this._valueMax() - this._valueMin() ) / this.numPages )
9462
					);
9463
					break;
9464
				case $.ui.keyCode.PAGE_DOWN:
9465
					newVal = this._trimAlignValue(
9466
						curVal - ( (this._valueMax() - this._valueMin()) / this.numPages ) );
9467
					break;
9468
				case $.ui.keyCode.UP:
9469
				case $.ui.keyCode.RIGHT:
9470
					if ( curVal === this._valueMax() ) {
9471
						return;
9472
					}
9473
					newVal = this._trimAlignValue( curVal + step );
9474
					break;
9475
				case $.ui.keyCode.DOWN:
9476
				case $.ui.keyCode.LEFT:
9477
					if ( curVal === this._valueMin() ) {
9478
						return;
9479
					}
9480
					newVal = this._trimAlignValue( curVal - step );
9481
					break;
9482
			}
9483
9484
			this._slide( event, index, newVal );
9485
		},
9486
		keyup: function( event ) {
9487
			var index = $( event.target ).data( "ui-slider-handle-index" );
9488
9489
			if ( this._keySliding ) {
9490
				this._keySliding = false;
9491
				this._stop( event, index );
9492
				this._change( event, index );
9493
				$( event.target ).removeClass( "ui-state-active" );
9494
			}
9495
		}
9496
	}
9497
});
9498
9499
9500
/*!
9501
 * jQuery UI Tabs 1.11.4
9502
 * http://jqueryui.com
9503
 *
9504
 * Copyright jQuery Foundation and other contributors
9505
 * Released under the MIT license.
9506
 * http://jquery.org/license
9507
 *
9508
 * http://api.jqueryui.com/tabs/
9509
 */
9510
9511
9512
var tabs = $.widget( "ui.tabs", {
9513
	version: "1.11.4",
9514
	delay: 300,
9515
	options: {
9516
		active: null,
9517
		collapsible: false,
9518
		event: "click",
9519
		heightStyle: "content",
9520
		hide: null,
9521
		show: null,
9522
9523
		// callbacks
9524
		activate: null,
9525
		beforeActivate: null,
9526
		beforeLoad: null,
9527
		load: null
9528
	},
9529
9530
	_isLocal: (function() {
9531
		var rhash = /#.*$/;
9532
9533
		return function( anchor ) {
9534
			var anchorUrl, locationUrl;
9535
9536
			// support: IE7
9537
			// IE7 doesn't normalize the href property when set via script (#9317)
9538
			anchor = anchor.cloneNode( false );
9539
9540
			anchorUrl = anchor.href.replace( rhash, "" );
9541
			locationUrl = location.href.replace( rhash, "" );
9542
9543
			// decoding may throw an error if the URL isn't UTF-8 (#9518)
9544
			try {
9545
				anchorUrl = decodeURIComponent( anchorUrl );
9546
			} catch ( error ) {}
9547
			try {
9548
				locationUrl = decodeURIComponent( locationUrl );
9549
			} catch ( error ) {}
9550
9551
			return anchor.hash.length > 1 && anchorUrl === locationUrl;
9552
		};
9553
	})(),
9554
9555
	_create: function() {
9556
		var that = this,
9557
			options = this.options;
9558
9559
		this.running = false;
9560
9561
		this.element
9562
			.addClass( "ui-tabs ui-widget ui-widget-content ui-corner-all" )
9563
			.toggleClass( "ui-tabs-collapsible", options.collapsible );
9564
9565
		this._processTabs();
9566
		options.active = this._initialActive();
9567
9568
		// Take disabling tabs via class attribute from HTML
9569
		// into account and update option properly.
9570
		if ( $.isArray( options.disabled ) ) {
9571
			options.disabled = $.unique( options.disabled.concat(
9572
				$.map( this.tabs.filter( ".ui-state-disabled" ), function( li ) {
9573
					return that.tabs.index( li );
9574
				})
9575
			) ).sort();
9576
		}
9577
9578
		// check for length avoids error when initializing empty list
9579
		if ( this.options.active !== false && this.anchors.length ) {
9580
			this.active = this._findActive( options.active );
9581
		} else {
9582
			this.active = $();
9583
		}
9584
9585
		this._refresh();
9586
9587
		if ( this.active.length ) {
9588
			this.load( options.active );
9589
		}
9590
	},
9591
9592
	_initialActive: function() {
9593
		var active = this.options.active,
9594
			collapsible = this.options.collapsible,
9595
			locationHash = location.hash.substring( 1 );
9596
9597
		if ( active === null ) {
9598
			// check the fragment identifier in the URL
9599
			if ( locationHash ) {
9600
				this.tabs.each(function( i, tab ) {
9601
					if ( $( tab ).attr( "aria-controls" ) === locationHash ) {
9602
						active = i;
9603
						return false;
9604
					}
9605
				});
9606
			}
9607
9608
			// check for a tab marked active via a class
9609
			if ( active === null ) {
9610
				active = this.tabs.index( this.tabs.filter( ".ui-tabs-active" ) );
9611
			}
9612
9613
			// no active tab, set to false
9614
			if ( active === null || active === -1 ) {
9615
				active = this.tabs.length ? 0 : false;
9616
			}
9617
		}
9618
9619
		// handle numbers: negative, out of range
9620
		if ( active !== false ) {
9621
			active = this.tabs.index( this.tabs.eq( active ) );
9622
			if ( active === -1 ) {
9623
				active = collapsible ? false : 0;
9624
			}
9625
		}
9626
9627
		// don't allow collapsible: false and active: false
9628
		if ( !collapsible && active === false && this.anchors.length ) {
9629
			active = 0;
9630
		}
9631
9632
		return active;
9633
	},
9634
9635
	_getCreateEventData: function() {
9636
		return {
9637
			tab: this.active,
9638
			panel: !this.active.length ? $() : this._getPanelForTab( this.active )
9639
		};
9640
	},
9641
9642
	_tabKeydown: function( event ) {
9643
		var focusedTab = $( this.document[0].activeElement ).closest( "li" ),
9644
			selectedIndex = this.tabs.index( focusedTab ),
9645
			goingForward = true;
9646
9647
		if ( this._handlePageNav( event ) ) {
9648
			return;
9649
		}
9650
9651
		switch ( event.keyCode ) {
9652
			case $.ui.keyCode.RIGHT:
9653
			case $.ui.keyCode.DOWN:
9654
				selectedIndex++;
9655
				break;
9656
			case $.ui.keyCode.UP:
9657
			case $.ui.keyCode.LEFT:
9658
				goingForward = false;
9659
				selectedIndex--;
9660
				break;
9661
			case $.ui.keyCode.END:
9662
				selectedIndex = this.anchors.length - 1;
9663
				break;
9664
			case $.ui.keyCode.HOME:
9665
				selectedIndex = 0;
9666
				break;
9667
			case $.ui.keyCode.SPACE:
9668
				// Activate only, no collapsing
9669
				event.preventDefault();
9670
				clearTimeout( this.activating );
9671
				this._activate( selectedIndex );
9672
				return;
9673
			case $.ui.keyCode.ENTER:
9674
				// Toggle (cancel delayed activation, allow collapsing)
9675
				event.preventDefault();
9676
				clearTimeout( this.activating );
9677
				// Determine if we should collapse or activate
9678
				this._activate( selectedIndex === this.options.active ? false : selectedIndex );
9679
				return;
9680
			default:
9681
				return;
9682
		}
9683
9684
		// Focus the appropriate tab, based on which key was pressed
9685
		event.preventDefault();
9686
		clearTimeout( this.activating );
9687
		selectedIndex = this._focusNextTab( selectedIndex, goingForward );
9688
9689
		// Navigating with control/command key will prevent automatic activation
9690
		if ( !event.ctrlKey && !event.metaKey ) {
9691
9692
			// Update aria-selected immediately so that AT think the tab is already selected.
9693
			// Otherwise AT may confuse the user by stating that they need to activate the tab,
9694
			// but the tab will already be activated by the time the announcement finishes.
9695
			focusedTab.attr( "aria-selected", "false" );
9696
			this.tabs.eq( selectedIndex ).attr( "aria-selected", "true" );
9697
9698
			this.activating = this._delay(function() {
9699
				this.option( "active", selectedIndex );
9700
			}, this.delay );
9701
		}
9702
	},
9703
9704
	_panelKeydown: function( event ) {
9705
		if ( this._handlePageNav( event ) ) {
9706
			return;
9707
		}
9708
9709
		// Ctrl+up moves focus to the current tab
9710
		if ( event.ctrlKey && event.keyCode === $.ui.keyCode.UP ) {
9711
			event.preventDefault();
9712
			this.active.focus();
9713
		}
9714
	},
9715
9716
	// Alt+page up/down moves focus to the previous/next tab (and activates)
9717
	_handlePageNav: function( event ) {
9718
		if ( event.altKey && event.keyCode === $.ui.keyCode.PAGE_UP ) {
9719
			this._activate( this._focusNextTab( this.options.active - 1, false ) );
9720
			return true;
9721
		}
9722
		if ( event.altKey && event.keyCode === $.ui.keyCode.PAGE_DOWN ) {
9723
			this._activate( this._focusNextTab( this.options.active + 1, true ) );
9724
			return true;
9725
		}
9726
	},
9727
9728
	_findNextTab: function( index, goingForward ) {
9729
		var lastTabIndex = this.tabs.length - 1;
9730
9731
		function constrain() {
9732
			if ( index > lastTabIndex ) {
9733
				index = 0;
9734
			}
9735
			if ( index < 0 ) {
9736
				index = lastTabIndex;
9737
			}
9738
			return index;
9739
		}
9740
9741
		while ( $.inArray( constrain(), this.options.disabled ) !== -1 ) {
9742
			index = goingForward ? index + 1 : index - 1;
9743
		}
9744
9745
		return index;
9746
	},
9747
9748
	_focusNextTab: function( index, goingForward ) {
9749
		index = this._findNextTab( index, goingForward );
9750
		this.tabs.eq( index ).focus();
9751
		return index;
9752
	},
9753
9754
	_setOption: function( key, value ) {
9755
		if ( key === "active" ) {
9756
			// _activate() will handle invalid values and update this.options
9757
			this._activate( value );
9758
			return;
9759
		}
9760
9761
		if ( key === "disabled" ) {
9762
			// don't use the widget factory's disabled handling
9763
			this._setupDisabled( value );
9764
			return;
9765
		}
9766
9767
		this._super( key, value);
9768
9769
		if ( key === "collapsible" ) {
9770
			this.element.toggleClass( "ui-tabs-collapsible", value );
9771
			// Setting collapsible: false while collapsed; open first panel
9772
			if ( !value && this.options.active === false ) {
9773
				this._activate( 0 );
9774
			}
9775
		}
9776
9777
		if ( key === "event" ) {
9778
			this._setupEvents( value );
9779
		}
9780
9781
		if ( key === "heightStyle" ) {
9782
			this._setupHeightStyle( value );
9783
		}
9784
	},
9785
9786
	_sanitizeSelector: function( hash ) {
9787
		return hash ? hash.replace( /[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g, "\\$&" ) : "";
9788
	},
9789
9790
	refresh: function() {
9791
		var options = this.options,
9792
			lis = this.tablist.children( ":has(a[href])" );
9793
9794
		// get disabled tabs from class attribute from HTML
9795
		// this will get converted to a boolean if needed in _refresh()
9796
		options.disabled = $.map( lis.filter( ".ui-state-disabled" ), function( tab ) {
9797
			return lis.index( tab );
9798
		});
9799
9800
		this._processTabs();
9801
9802
		// was collapsed or no tabs
9803
		if ( options.active === false || !this.anchors.length ) {
9804
			options.active = false;
9805
			this.active = $();
9806
		// was active, but active tab is gone
9807
		} else if ( this.active.length && !$.contains( this.tablist[ 0 ], this.active[ 0 ] ) ) {
9808
			// all remaining tabs are disabled
9809
			if ( this.tabs.length === options.disabled.length ) {
9810
				options.active = false;
9811
				this.active = $();
9812
			// activate previous tab
9813
			} else {
9814
				this._activate( this._findNextTab( Math.max( 0, options.active - 1 ), false ) );
9815
			}
9816
		// was active, active tab still exists
9817
		} else {
9818
			// make sure active index is correct
9819
			options.active = this.tabs.index( this.active );
9820
		}
9821
9822
		this._refresh();
9823
	},
9824
9825
	_refresh: function() {
9826
		this._setupDisabled( this.options.disabled );
9827
		this._setupEvents( this.options.event );
9828
		this._setupHeightStyle( this.options.heightStyle );
9829
9830
		this.tabs.not( this.active ).attr({
9831
			"aria-selected": "false",
9832
			"aria-expanded": "false",
9833
			tabIndex: -1
9834
		});
9835
		this.panels.not( this._getPanelForTab( this.active ) )
9836
			.hide()
9837
			.attr({
9838
				"aria-hidden": "true"
9839
			});
9840
9841
		// Make sure one tab is in the tab order
9842
		if ( !this.active.length ) {
9843
			this.tabs.eq( 0 ).attr( "tabIndex", 0 );
9844
		} else {
9845
			this.active
9846
				.addClass( "ui-tabs-active ui-state-active" )
9847
				.attr({
9848
					"aria-selected": "true",
9849
					"aria-expanded": "true",
9850
					tabIndex: 0
9851
				});
9852
			this._getPanelForTab( this.active )
9853
				.show()
9854
				.attr({
9855
					"aria-hidden": "false"
9856
				});
9857
		}
9858
	},
9859
9860
	_processTabs: function() {
9861
		var that = this,
9862
			prevTabs = this.tabs,
9863
			prevAnchors = this.anchors,
9864
			prevPanels = this.panels;
9865
9866
		this.tablist = this._getList()
9867
			.addClass( "ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all" )
9868
			.attr( "role", "tablist" )
9869
9870
			// Prevent users from focusing disabled tabs via click
9871
			.delegate( "> li", "mousedown" + this.eventNamespace, function( event ) {
9872
				if ( $( this ).is( ".ui-state-disabled" ) ) {
9873
					event.preventDefault();
9874
				}
9875
			})
9876
9877
			// support: IE <9
9878
			// Preventing the default action in mousedown doesn't prevent IE
9879
			// from focusing the element, so if the anchor gets focused, blur.
9880
			// We don't have to worry about focusing the previously focused
9881
			// element since clicking on a non-focusable element should focus
9882
			// the body anyway.
9883
			.delegate( ".ui-tabs-anchor", "focus" + this.eventNamespace, function() {
9884
				if ( $( this ).closest( "li" ).is( ".ui-state-disabled" ) ) {
9885
					this.blur();
9886
				}
9887
			});
9888
9889
		this.tabs = this.tablist.find( "> li:has(a[href])" )
9890
			.addClass( "ui-state-default ui-corner-top" )
9891
			.attr({
9892
				role: "tab",
9893
				tabIndex: -1
9894
			});
9895
9896
		this.anchors = this.tabs.map(function() {
9897
				return $( "a", this )[ 0 ];
9898
			})
9899
			.addClass( "ui-tabs-anchor" )
9900
			.attr({
9901
				role: "presentation",
9902
				tabIndex: -1
9903
			});
9904
9905
		this.panels = $();
9906
9907
		this.anchors.each(function( i, anchor ) {
9908
			var selector, panel, panelId,
9909
				anchorId = $( anchor ).uniqueId().attr( "id" ),
9910
				tab = $( anchor ).closest( "li" ),
9911
				originalAriaControls = tab.attr( "aria-controls" );
9912
9913
			// inline tab
9914
			if ( that._isLocal( anchor ) ) {
9915
				selector = anchor.hash;
9916
				panelId = selector.substring( 1 );
9917
				panel = that.element.find( that._sanitizeSelector( selector ) );
9918
			// remote tab
9919
			} else {
9920
				// If the tab doesn't already have aria-controls,
9921
				// generate an id by using a throw-away element
9922
				panelId = tab.attr( "aria-controls" ) || $( {} ).uniqueId()[ 0 ].id;
9923
				selector = "#" + panelId;
9924
				panel = that.element.find( selector );
9925
				if ( !panel.length ) {
9926
					panel = that._createPanel( panelId );
9927
					panel.insertAfter( that.panels[ i - 1 ] || that.tablist );
9928
				}
9929
				panel.attr( "aria-live", "polite" );
9930
			}
9931
9932
			if ( panel.length) {
9933
				that.panels = that.panels.add( panel );
9934
			}
9935
			if ( originalAriaControls ) {
9936
				tab.data( "ui-tabs-aria-controls", originalAriaControls );
9937
			}
9938
			tab.attr({
9939
				"aria-controls": panelId,
9940
				"aria-labelledby": anchorId
9941
			});
9942
			panel.attr( "aria-labelledby", anchorId );
9943
		});
9944
9945
		this.panels
9946
			.addClass( "ui-tabs-panel ui-widget-content ui-corner-bottom" )
9947
			.attr( "role", "tabpanel" );
9948
9949
		// Avoid memory leaks (#10056)
9950
		if ( prevTabs ) {
9951
			this._off( prevTabs.not( this.tabs ) );
9952
			this._off( prevAnchors.not( this.anchors ) );
9953
			this._off( prevPanels.not( this.panels ) );
9954
		}
9955
	},
9956
9957
	// allow overriding how to find the list for rare usage scenarios (#7715)
9958
	_getList: function() {
9959
		return this.tablist || this.element.find( "ol,ul" ).eq( 0 );
9960
	},
9961
9962
	_createPanel: function( id ) {
9963
		return $( "<div>" )
9964
			.attr( "id", id )
9965
			.addClass( "ui-tabs-panel ui-widget-content ui-corner-bottom" )
9966
			.data( "ui-tabs-destroy", true );
9967
	},
9968
9969
	_setupDisabled: function( disabled ) {
9970
		if ( $.isArray( disabled ) ) {
9971
			if ( !disabled.length ) {
9972
				disabled = false;
9973
			} else if ( disabled.length === this.anchors.length ) {
9974
				disabled = true;
9975
			}
9976
		}
9977
9978
		// disable tabs
9979
		for ( var i = 0, li; ( li = this.tabs[ i ] ); i++ ) {
9980
			if ( disabled === true || $.inArray( i, disabled ) !== -1 ) {
9981
				$( li )
9982
					.addClass( "ui-state-disabled" )
9983
					.attr( "aria-disabled", "true" );
9984
			} else {
9985
				$( li )
9986
					.removeClass( "ui-state-disabled" )
9987
					.removeAttr( "aria-disabled" );
9988
			}
9989
		}
9990
9991
		this.options.disabled = disabled;
9992
	},
9993
9994
	_setupEvents: function( event ) {
9995
		var events = {};
9996
		if ( event ) {
9997
			$.each( event.split(" "), function( index, eventName ) {
9998
				events[ eventName ] = "_eventHandler";
9999
			});
10000
		}
10001
10002
		this._off( this.anchors.add( this.tabs ).add( this.panels ) );
10003
		// Always prevent the default action, even when disabled
10004
		this._on( true, this.anchors, {
10005
			click: function( event ) {
10006
				event.preventDefault();
10007
			}
10008
		});
10009
		this._on( this.anchors, events );
10010
		this._on( this.tabs, { keydown: "_tabKeydown" } );
10011
		this._on( this.panels, { keydown: "_panelKeydown" } );
10012
10013
		this._focusable( this.tabs );
10014
		this._hoverable( this.tabs );
10015
	},
10016
10017
	_setupHeightStyle: function( heightStyle ) {
10018
		var maxHeight,
10019
			parent = this.element.parent();
10020
10021
		if ( heightStyle === "fill" ) {
10022
			maxHeight = parent.height();
10023
			maxHeight -= this.element.outerHeight() - this.element.height();
10024
10025
			this.element.siblings( ":visible" ).each(function() {
10026
				var elem = $( this ),
10027
					position = elem.css( "position" );
10028
10029
				if ( position === "absolute" || position === "fixed" ) {
10030
					return;
10031
				}
10032
				maxHeight -= elem.outerHeight( true );
10033
			});
10034
10035
			this.element.children().not( this.panels ).each(function() {
10036
				maxHeight -= $( this ).outerHeight( true );
10037
			});
10038
10039
			this.panels.each(function() {
10040
				$( this ).height( Math.max( 0, maxHeight -
10041
					$( this ).innerHeight() + $( this ).height() ) );
10042
			})
10043
			.css( "overflow", "auto" );
10044
		} else if ( heightStyle === "auto" ) {
10045
			maxHeight = 0;
10046
			this.panels.each(function() {
10047
				maxHeight = Math.max( maxHeight, $( this ).height( "" ).height() );
10048
			}).height( maxHeight );
10049
		}
10050
	},
10051
10052
	_eventHandler: function( event ) {
10053
		var options = this.options,
10054
			active = this.active,
10055
			anchor = $( event.currentTarget ),
10056
			tab = anchor.closest( "li" ),
10057
			clickedIsActive = tab[ 0 ] === active[ 0 ],
10058
			collapsing = clickedIsActive && options.collapsible,
10059
			toShow = collapsing ? $() : this._getPanelForTab( tab ),
10060
			toHide = !active.length ? $() : this._getPanelForTab( active ),
10061
			eventData = {
10062
				oldTab: active,
10063
				oldPanel: toHide,
10064
				newTab: collapsing ? $() : tab,
10065
				newPanel: toShow
10066
			};
10067
10068
		event.preventDefault();
10069
10070
		if ( tab.hasClass( "ui-state-disabled" ) ||
10071
				// tab is already loading
10072
				tab.hasClass( "ui-tabs-loading" ) ||
10073
				// can't switch durning an animation
10074
				this.running ||
10075
				// click on active header, but not collapsible
10076
				( clickedIsActive && !options.collapsible ) ||
10077
				// allow canceling activation
10078
				( this._trigger( "beforeActivate", event, eventData ) === false ) ) {
10079
			return;
10080
		}
10081
10082
		options.active = collapsing ? false : this.tabs.index( tab );
10083
10084
		this.active = clickedIsActive ? $() : tab;
10085
		if ( this.xhr ) {
10086
			this.xhr.abort();
10087
		}
10088
10089
		if ( !toHide.length && !toShow.length ) {
10090
			$.error( "jQuery UI Tabs: Mismatching fragment identifier." );
10091
		}
10092
10093
		if ( toShow.length ) {
10094
			this.load( this.tabs.index( tab ), event );
10095
		}
10096
		this._toggle( event, eventData );
10097
	},
10098
10099
	// handles show/hide for selecting tabs
10100
	_toggle: function( event, eventData ) {
10101
		var that = this,
10102
			toShow = eventData.newPanel,
10103
			toHide = eventData.oldPanel;
10104
10105
		this.running = true;
10106
10107
		function complete() {
10108
			that.running = false;
10109
			that._trigger( "activate", event, eventData );
10110
		}
10111
10112
		function show() {
10113
			eventData.newTab.closest( "li" ).addClass( "ui-tabs-active ui-state-active" );
10114
10115
			if ( toShow.length && that.options.show ) {
10116
				that._show( toShow, that.options.show, complete );
10117
			} else {
10118
				toShow.show();
10119
				complete();
10120
			}
10121
		}
10122
10123
		// start out by hiding, then showing, then completing
10124
		if ( toHide.length && this.options.hide ) {
10125
			this._hide( toHide, this.options.hide, function() {
10126
				eventData.oldTab.closest( "li" ).removeClass( "ui-tabs-active ui-state-active" );
10127
				show();
10128
			});
10129
		} else {
10130
			eventData.oldTab.closest( "li" ).removeClass( "ui-tabs-active ui-state-active" );
10131
			toHide.hide();
10132
			show();
10133
		}
10134
10135
		toHide.attr( "aria-hidden", "true" );
10136
		eventData.oldTab.attr({
10137
			"aria-selected": "false",
10138
			"aria-expanded": "false"
10139
		});
10140
		// If we're switching tabs, remove the old tab from the tab order.
10141
		// If we're opening from collapsed state, remove the previous tab from the tab order.
10142
		// If we're collapsing, then keep the collapsing tab in the tab order.
10143
		if ( toShow.length && toHide.length ) {
10144
			eventData.oldTab.attr( "tabIndex", -1 );
10145
		} else if ( toShow.length ) {
10146
			this.tabs.filter(function() {
10147
				return $( this ).attr( "tabIndex" ) === 0;
10148
			})
10149
			.attr( "tabIndex", -1 );
10150
		}
10151
10152
		toShow.attr( "aria-hidden", "false" );
10153
		eventData.newTab.attr({
10154
			"aria-selected": "true",
10155
			"aria-expanded": "true",
10156
			tabIndex: 0
10157
		});
10158
	},
10159
10160
	_activate: function( index ) {
10161
		var anchor,
10162
			active = this._findActive( index );
10163
10164
		// trying to activate the already active panel
10165
		if ( active[ 0 ] === this.active[ 0 ] ) {
10166
			return;
10167
		}
10168
10169
		// trying to collapse, simulate a click on the current active header
10170
		if ( !active.length ) {
10171
			active = this.active;
10172
		}
10173
10174
		anchor = active.find( ".ui-tabs-anchor" )[ 0 ];
10175
		this._eventHandler({
10176
			target: anchor,
10177
			currentTarget: anchor,
10178
			preventDefault: $.noop
10179
		});
10180
	},
10181
10182
	_findActive: function( index ) {
10183
		return index === false ? $() : this.tabs.eq( index );
10184
	},
10185
10186
	_getIndex: function( index ) {
10187
		// meta-function to give users option to provide a href string instead of a numerical index.
10188
		if ( typeof index === "string" ) {
10189
			index = this.anchors.index( this.anchors.filter( "[href$='" + index + "']" ) );
10190
		}
10191
10192
		return index;
10193
	},
10194
10195
	_destroy: function() {
10196
		if ( this.xhr ) {
10197
			this.xhr.abort();
10198
		}
10199
10200
		this.element.removeClass( "ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible" );
10201
10202
		this.tablist
10203
			.removeClass( "ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all" )
10204
			.removeAttr( "role" );
10205
10206
		this.anchors
10207
			.removeClass( "ui-tabs-anchor" )
10208
			.removeAttr( "role" )
10209
			.removeAttr( "tabIndex" )
10210
			.removeUniqueId();
10211
10212
		this.tablist.unbind( this.eventNamespace );
10213
10214
		this.tabs.add( this.panels ).each(function() {
10215
			if ( $.data( this, "ui-tabs-destroy" ) ) {
10216
				$( this ).remove();
10217
			} else {
10218
				$( this )
10219
					.removeClass( "ui-state-default ui-state-active ui-state-disabled " +
10220
						"ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel" )
10221
					.removeAttr( "tabIndex" )
10222
					.removeAttr( "aria-live" )
10223
					.removeAttr( "aria-busy" )
10224
					.removeAttr( "aria-selected" )
10225
					.removeAttr( "aria-labelledby" )
10226
					.removeAttr( "aria-hidden" )
10227
					.removeAttr( "aria-expanded" )
10228
					.removeAttr( "role" );
10229
			}
10230
		});
10231
10232
		this.tabs.each(function() {
10233
			var li = $( this ),
10234
				prev = li.data( "ui-tabs-aria-controls" );
10235
			if ( prev ) {
10236
				li
10237
					.attr( "aria-controls", prev )
10238
					.removeData( "ui-tabs-aria-controls" );
10239
			} else {
10240
				li.removeAttr( "aria-controls" );
10241
			}
10242
		});
10243
10244
		this.panels.show();
10245
10246
		if ( this.options.heightStyle !== "content" ) {
10247
			this.panels.css( "height", "" );
10248
		}
10249
	},
10250
10251
	enable: function( index ) {
10252
		var disabled = this.options.disabled;
10253
		if ( disabled === false ) {
10254
			return;
10255
		}
10256
10257
		if ( index === undefined ) {
10258
			disabled = false;
10259
		} else {
10260
			index = this._getIndex( index );
10261
			if ( $.isArray( disabled ) ) {
10262
				disabled = $.map( disabled, function( num ) {
10263
					return num !== index ? num : null;
10264
				});
10265
			} else {
10266
				disabled = $.map( this.tabs, function( li, num ) {
10267
					return num !== index ? num : null;
10268
				});
10269
			}
10270
		}
10271
		this._setupDisabled( disabled );
10272
	},
10273
10274
	disable: function( index ) {
10275
		var disabled = this.options.disabled;
10276
		if ( disabled === true ) {
10277
			return;
10278
		}
10279
10280
		if ( index === undefined ) {
10281
			disabled = true;
10282
		} else {
10283
			index = this._getIndex( index );
10284
			if ( $.inArray( index, disabled ) !== -1 ) {
10285
				return;
10286
			}
10287
			if ( $.isArray( disabled ) ) {
10288
				disabled = $.merge( [ index ], disabled ).sort();
10289
			} else {
10290
				disabled = [ index ];
10291
			}
10292
		}
10293
		this._setupDisabled( disabled );
10294
	},
10295
10296
	load: function( index, event ) {
10297
		index = this._getIndex( index );
10298
		var that = this,
10299
			tab = this.tabs.eq( index ),
10300
			anchor = tab.find( ".ui-tabs-anchor" ),
10301
			panel = this._getPanelForTab( tab ),
10302
			eventData = {
10303
				tab: tab,
10304
				panel: panel
10305
			},
10306
			complete = function( jqXHR, status ) {
10307
				if ( status === "abort" ) {
10308
					that.panels.stop( false, true );
10309
				}
10310
10311
				tab.removeClass( "ui-tabs-loading" );
10312
				panel.removeAttr( "aria-busy" );
10313
10314
				if ( jqXHR === that.xhr ) {
10315
					delete that.xhr;
10316
				}
10317
			};
10318
10319
		// not remote
10320
		if ( this._isLocal( anchor[ 0 ] ) ) {
10321
			return;
10322
		}
10323
10324
		this.xhr = $.ajax( this._ajaxSettings( anchor, event, eventData ) );
10325
10326
		// support: jQuery <1.8
10327
		// jQuery <1.8 returns false if the request is canceled in beforeSend,
10328
		// but as of 1.8, $.ajax() always returns a jqXHR object.
10329
		if ( this.xhr && this.xhr.statusText !== "canceled" ) {
10330
			tab.addClass( "ui-tabs-loading" );
10331
			panel.attr( "aria-busy", "true" );
10332
10333
			this.xhr
10334
				.done(function( response, status, jqXHR ) {
10335
					// support: jQuery <1.8
10336
					// http://bugs.jquery.com/ticket/11778
10337
					setTimeout(function() {
10338
						panel.html( response );
10339
						that._trigger( "load", event, eventData );
10340
10341
						complete( jqXHR, status );
10342
					}, 1 );
10343
				})
10344
				.fail(function( jqXHR, status ) {
10345
					// support: jQuery <1.8
10346
					// http://bugs.jquery.com/ticket/11778
10347
					setTimeout(function() {
10348
						complete( jqXHR, status );
10349
					}, 1 );
10350
				});
10351
		}
10352
	},
10353
10354
	_ajaxSettings: function( anchor, event, eventData ) {
10355
		var that = this;
10356
		return {
10357
			url: anchor.attr( "href" ),
10358
			beforeSend: function( jqXHR, settings ) {
10359
				return that._trigger( "beforeLoad", event,
10360
					$.extend( { jqXHR: jqXHR, ajaxSettings: settings }, eventData ) );
10361
			}
10362
		};
10363
	},
10364
10365
	_getPanelForTab: function( tab ) {
10366
		var id = $( tab ).attr( "aria-controls" );
10367
		return this.element.find( this._sanitizeSelector( "#" + id ) );
10368
	}
10369
});
10370
10371
10372
/*!
10373
 * jQuery UI Effects 1.11.4
10374
 * http://jqueryui.com
10375
 *
10376
 * Copyright jQuery Foundation and other contributors
10377
 * Released under the MIT license.
10378
 * http://jquery.org/license
10379
 *
10380
 * http://api.jqueryui.com/category/effects-core/
10381
 */
10382
10383
10384
var dataSpace = "ui-effects-",
10385
10386
	// Create a local jQuery because jQuery Color relies on it and the
10387
	// global may not exist with AMD and a custom build (#10199)
10388
	jQuery = $;
10389
10390
$.effects = {
10391
	effect: {}
10392
};
10393
10394
/*!
10395
 * jQuery Color Animations v2.1.2
10396
 * https://github.com/jquery/jquery-color
10397
 *
10398
 * Copyright 2014 jQuery Foundation and other contributors
10399
 * Released under the MIT license.
10400
 * http://jquery.org/license
10401
 *
10402
 * Date: Wed Jan 16 08:47:09 2013 -0600
10403
 */
10404
(function( jQuery, undefined ) {
10405
10406
	var stepHooks = "backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",
10407
10408
	// plusequals test for += 100 -= 100
10409
	rplusequals = /^([\-+])=\s*(\d+\.?\d*)/,
10410
	// a set of RE's that can match strings and generate color tuples.
10411
	stringParsers = [ {
10412
			re: /rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
10413
			parse: function( execResult ) {
10414
				return [
10415
					execResult[ 1 ],
10416
					execResult[ 2 ],
10417
					execResult[ 3 ],
10418
					execResult[ 4 ]
10419
				];
10420
			}
10421
		}, {
10422
			re: /rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
10423
			parse: function( execResult ) {
10424
				return [
10425
					execResult[ 1 ] * 2.55,
10426
					execResult[ 2 ] * 2.55,
10427
					execResult[ 3 ] * 2.55,
10428
					execResult[ 4 ]
10429
				];
10430
			}
10431
		}, {
10432
			// this regex ignores A-F because it's compared against an already lowercased string
10433
			re: /#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,
10434
			parse: function( execResult ) {
10435
				return [
10436
					parseInt( execResult[ 1 ], 16 ),
10437
					parseInt( execResult[ 2 ], 16 ),
10438
					parseInt( execResult[ 3 ], 16 )
10439
				];
10440
			}
10441
		}, {
10442
			// this regex ignores A-F because it's compared against an already lowercased string
10443
			re: /#([a-f0-9])([a-f0-9])([a-f0-9])/,
10444
			parse: function( execResult ) {
10445
				return [
10446
					parseInt( execResult[ 1 ] + execResult[ 1 ], 16 ),
10447
					parseInt( execResult[ 2 ] + execResult[ 2 ], 16 ),
10448
					parseInt( execResult[ 3 ] + execResult[ 3 ], 16 )
10449
				];
10450
			}
10451
		}, {
10452
			re: /hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
10453
			space: "hsla",
10454
			parse: function( execResult ) {
10455
				return [
10456
					execResult[ 1 ],
10457
					execResult[ 2 ] / 100,
10458
					execResult[ 3 ] / 100,
10459
					execResult[ 4 ]
10460
				];
10461
			}
10462
		} ],
10463
10464
	// jQuery.Color( )
10465
	color = jQuery.Color = function( color, green, blue, alpha ) {
10466
		return new jQuery.Color.fn.parse( color, green, blue, alpha );
10467
	},
10468
	spaces = {
10469
		rgba: {
10470
			props: {
10471
				red: {
10472
					idx: 0,
10473
					type: "byte"
10474
				},
10475
				green: {
10476
					idx: 1,
10477
					type: "byte"
10478
				},
10479
				blue: {
10480
					idx: 2,
10481
					type: "byte"
10482
				}
10483
			}
10484
		},
10485
10486
		hsla: {
10487
			props: {
10488
				hue: {
10489
					idx: 0,
10490
					type: "degrees"
10491
				},
10492
				saturation: {
10493
					idx: 1,
10494
					type: "percent"
10495
				},
10496
				lightness: {
10497
					idx: 2,
10498
					type: "percent"
10499
				}
10500
			}
10501
		}
10502
	},
10503
	propTypes = {
10504
		"byte": {
10505
			floor: true,
10506
			max: 255
10507
		},
10508
		"percent": {
10509
			max: 1
10510
		},
10511
		"degrees": {
10512
			mod: 360,
10513
			floor: true
10514
		}
10515
	},
10516
	support = color.support = {},
10517
10518
	// element for support tests
10519
	supportElem = jQuery( "<p>" )[ 0 ],
10520
10521
	// colors = jQuery.Color.names
10522
	colors,
10523
10524
	// local aliases of functions called often
10525
	each = jQuery.each;
10526
10527
// determine rgba support immediately
10528
supportElem.style.cssText = "background-color:rgba(1,1,1,.5)";
10529
support.rgba = supportElem.style.backgroundColor.indexOf( "rgba" ) > -1;
10530
10531
// define cache name and alpha properties
10532
// for rgba and hsla spaces
10533
each( spaces, function( spaceName, space ) {
10534
	space.cache = "_" + spaceName;
10535
	space.props.alpha = {
10536
		idx: 3,
10537
		type: "percent",
10538
		def: 1
10539
	};
10540
});
10541
10542
function clamp( value, prop, allowEmpty ) {
10543
	var type = propTypes[ prop.type ] || {};
10544
10545
	if ( value == null ) {
10546
		return (allowEmpty || !prop.def) ? null : prop.def;
10547
	}
10548
10549
	// ~~ is an short way of doing floor for positive numbers
10550
	value = type.floor ? ~~value : parseFloat( value );
10551
10552
	// IE will pass in empty strings as value for alpha,
10553
	// which will hit this case
10554
	if ( isNaN( value ) ) {
10555
		return prop.def;
10556
	}
10557
10558
	if ( type.mod ) {
10559
		// we add mod before modding to make sure that negatives values
10560
		// get converted properly: -10 -> 350
10561
		return (value + type.mod) % type.mod;
10562
	}
10563
10564
	// for now all property types without mod have min and max
10565
	return 0 > value ? 0 : type.max < value ? type.max : value;
10566
}
10567
10568
function stringParse( string ) {
10569
	var inst = color(),
10570
		rgba = inst._rgba = [];
10571
10572
	string = string.toLowerCase();
10573
10574
	each( stringParsers, function( i, parser ) {
10575
		var parsed,
10576
			match = parser.re.exec( string ),
10577
			values = match && parser.parse( match ),
10578
			spaceName = parser.space || "rgba";
10579
10580
		if ( values ) {
10581
			parsed = inst[ spaceName ]( values );
10582
10583
			// if this was an rgba parse the assignment might happen twice
10584
			// oh well....
10585
			inst[ spaces[ spaceName ].cache ] = parsed[ spaces[ spaceName ].cache ];
10586
			rgba = inst._rgba = parsed._rgba;
10587
10588
			// exit each( stringParsers ) here because we matched
10589
			return false;
10590
		}
10591
	});
10592
10593
	// Found a stringParser that handled it
10594
	if ( rgba.length ) {
10595
10596
		// if this came from a parsed string, force "transparent" when alpha is 0
10597
		// chrome, (and maybe others) return "transparent" as rgba(0,0,0,0)
10598
		if ( rgba.join() === "0,0,0,0" ) {
10599
			jQuery.extend( rgba, colors.transparent );
10600
		}
10601
		return inst;
10602
	}
10603
10604
	// named colors
10605
	return colors[ string ];
10606
}
10607
10608
color.fn = jQuery.extend( color.prototype, {
10609
	parse: function( red, green, blue, alpha ) {
10610
		if ( red === undefined ) {
10611
			this._rgba = [ null, null, null, null ];
10612
			return this;
10613
		}
10614
		if ( red.jquery || red.nodeType ) {
10615
			red = jQuery( red ).css( green );
10616
			green = undefined;
10617
		}
10618
10619
		var inst = this,
10620
			type = jQuery.type( red ),
10621
			rgba = this._rgba = [];
10622
10623
		// more than 1 argument specified - assume ( red, green, blue, alpha )
10624
		if ( green !== undefined ) {
10625
			red = [ red, green, blue, alpha ];
10626
			type = "array";
10627
		}
10628
10629
		if ( type === "string" ) {
10630
			return this.parse( stringParse( red ) || colors._default );
10631
		}
10632
10633
		if ( type === "array" ) {
10634
			each( spaces.rgba.props, function( key, prop ) {
10635
				rgba[ prop.idx ] = clamp( red[ prop.idx ], prop );
10636
			});
10637
			return this;
10638
		}
10639
10640
		if ( type === "object" ) {
10641
			if ( red instanceof color ) {
10642
				each( spaces, function( spaceName, space ) {
10643
					if ( red[ space.cache ] ) {
10644
						inst[ space.cache ] = red[ space.cache ].slice();
10645
					}
10646
				});
10647
			} else {
10648
				each( spaces, function( spaceName, space ) {
10649
					var cache = space.cache;
10650
					each( space.props, function( key, prop ) {
10651
10652
						// if the cache doesn't exist, and we know how to convert
10653
						if ( !inst[ cache ] && space.to ) {
10654
10655
							// if the value was null, we don't need to copy it
10656
							// if the key was alpha, we don't need to copy it either
10657
							if ( key === "alpha" || red[ key ] == null ) {
10658
								return;
10659
							}
10660
							inst[ cache ] = space.to( inst._rgba );
10661
						}
10662
10663
						// this is the only case where we allow nulls for ALL properties.
10664
						// call clamp with alwaysAllowEmpty
10665
						inst[ cache ][ prop.idx ] = clamp( red[ key ], prop, true );
10666
					});
10667
10668
					// everything defined but alpha?
10669
					if ( inst[ cache ] && jQuery.inArray( null, inst[ cache ].slice( 0, 3 ) ) < 0 ) {
10670
						// use the default of 1
10671
						inst[ cache ][ 3 ] = 1;
10672
						if ( space.from ) {
10673
							inst._rgba = space.from( inst[ cache ] );
10674
						}
10675
					}
10676
				});
10677
			}
10678
			return this;
10679
		}
10680
	},
10681
	is: function( compare ) {
10682
		var is = color( compare ),
10683
			same = true,
10684
			inst = this;
10685
10686
		each( spaces, function( _, space ) {
10687
			var localCache,
10688
				isCache = is[ space.cache ];
10689
			if (isCache) {
10690
				localCache = inst[ space.cache ] || space.to && space.to( inst._rgba ) || [];
10691
				each( space.props, function( _, prop ) {
10692
					if ( isCache[ prop.idx ] != null ) {
10693
						same = ( isCache[ prop.idx ] === localCache[ prop.idx ] );
10694
						return same;
10695
					}
10696
				});
10697
			}
10698
			return same;
10699
		});
10700
		return same;
10701
	},
10702
	_space: function() {
10703
		var used = [],
10704
			inst = this;
10705
		each( spaces, function( spaceName, space ) {
10706
			if ( inst[ space.cache ] ) {
10707
				used.push( spaceName );
10708
			}
10709
		});
10710
		return used.pop();
10711
	},
10712
	transition: function( other, distance ) {
10713
		var end = color( other ),
10714
			spaceName = end._space(),
10715
			space = spaces[ spaceName ],
10716
			startColor = this.alpha() === 0 ? color( "transparent" ) : this,
10717
			start = startColor[ space.cache ] || space.to( startColor._rgba ),
10718
			result = start.slice();
10719
10720
		end = end[ space.cache ];
10721
		each( space.props, function( key, prop ) {
10722
			var index = prop.idx,
10723
				startValue = start[ index ],
10724
				endValue = end[ index ],
10725
				type = propTypes[ prop.type ] || {};
10726
10727
			// if null, don't override start value
10728
			if ( endValue === null ) {
10729
				return;
10730
			}
10731
			// if null - use end
10732
			if ( startValue === null ) {
10733
				result[ index ] = endValue;
10734
			} else {
10735
				if ( type.mod ) {
10736
					if ( endValue - startValue > type.mod / 2 ) {
10737
						startValue += type.mod;
10738
					} else if ( startValue - endValue > type.mod / 2 ) {
10739
						startValue -= type.mod;
10740
					}
10741
				}
10742
				result[ index ] = clamp( ( endValue - startValue ) * distance + startValue, prop );
10743
			}
10744
		});
10745
		return this[ spaceName ]( result );
10746
	},
10747
	blend: function( opaque ) {
10748
		// if we are already opaque - return ourself
10749
		if ( this._rgba[ 3 ] === 1 ) {
10750
			return this;
10751
		}
10752
10753
		var rgb = this._rgba.slice(),
10754
			a = rgb.pop(),
10755
			blend = color( opaque )._rgba;
10756
10757
		return color( jQuery.map( rgb, function( v, i ) {
10758
			return ( 1 - a ) * blend[ i ] + a * v;
10759
		}));
10760
	},
10761
	toRgbaString: function() {
10762
		var prefix = "rgba(",
10763
			rgba = jQuery.map( this._rgba, function( v, i ) {
10764
				return v == null ? ( i > 2 ? 1 : 0 ) : v;
10765
			});
10766
10767
		if ( rgba[ 3 ] === 1 ) {
10768
			rgba.pop();
10769
			prefix = "rgb(";
10770
		}
10771
10772
		return prefix + rgba.join() + ")";
10773
	},
10774
	toHslaString: function() {
10775
		var prefix = "hsla(",
10776
			hsla = jQuery.map( this.hsla(), function( v, i ) {
10777
				if ( v == null ) {
10778
					v = i > 2 ? 1 : 0;
10779
				}
10780
10781
				// catch 1 and 2
10782
				if ( i && i < 3 ) {
10783
					v = Math.round( v * 100 ) + "%";
10784
				}
10785
				return v;
10786
			});
10787
10788
		if ( hsla[ 3 ] === 1 ) {
10789
			hsla.pop();
10790
			prefix = "hsl(";
10791
		}
10792
		return prefix + hsla.join() + ")";
10793
	},
10794
	toHexString: function( includeAlpha ) {
10795
		var rgba = this._rgba.slice(),
10796
			alpha = rgba.pop();
10797
10798
		if ( includeAlpha ) {
10799
			rgba.push( ~~( alpha * 255 ) );
10800
		}
10801
10802
		return "#" + jQuery.map( rgba, function( v ) {
10803
10804
			// default to 0 when nulls exist
10805
			v = ( v || 0 ).toString( 16 );
10806
			return v.length === 1 ? "0" + v : v;
10807
		}).join("");
10808
	},
10809
	toString: function() {
10810
		return this._rgba[ 3 ] === 0 ? "transparent" : this.toRgbaString();
10811
	}
10812
});
10813
color.fn.parse.prototype = color.fn;
10814
10815
// hsla conversions adapted from:
10816
// https://code.google.com/p/maashaack/source/browse/packages/graphics/trunk/src/graphics/colors/HUE2RGB.as?r=5021
10817
10818
function hue2rgb( p, q, h ) {
10819
	h = ( h + 1 ) % 1;
10820
	if ( h * 6 < 1 ) {
10821
		return p + ( q - p ) * h * 6;
10822
	}
10823
	if ( h * 2 < 1) {
10824
		return q;
10825
	}
10826
	if ( h * 3 < 2 ) {
10827
		return p + ( q - p ) * ( ( 2 / 3 ) - h ) * 6;
10828
	}
10829
	return p;
10830
}
10831
10832
spaces.hsla.to = function( rgba ) {
10833
	if ( rgba[ 0 ] == null || rgba[ 1 ] == null || rgba[ 2 ] == null ) {
10834
		return [ null, null, null, rgba[ 3 ] ];
10835
	}
10836
	var r = rgba[ 0 ] / 255,
10837
		g = rgba[ 1 ] / 255,
10838
		b = rgba[ 2 ] / 255,
10839
		a = rgba[ 3 ],
10840
		max = Math.max( r, g, b ),
10841
		min = Math.min( r, g, b ),
10842
		diff = max - min,
10843
		add = max + min,
10844
		l = add * 0.5,
10845
		h, s;
10846
10847
	if ( min === max ) {
10848
		h = 0;
10849
	} else if ( r === max ) {
10850
		h = ( 60 * ( g - b ) / diff ) + 360;
10851
	} else if ( g === max ) {
10852
		h = ( 60 * ( b - r ) / diff ) + 120;
10853
	} else {
10854
		h = ( 60 * ( r - g ) / diff ) + 240;
10855
	}
10856
10857
	// chroma (diff) == 0 means greyscale which, by definition, saturation = 0%
10858
	// otherwise, saturation is based on the ratio of chroma (diff) to lightness (add)
10859
	if ( diff === 0 ) {
10860
		s = 0;
10861
	} else if ( l <= 0.5 ) {
10862
		s = diff / add;
10863
	} else {
10864
		s = diff / ( 2 - add );
10865
	}
10866
	return [ Math.round(h) % 360, s, l, a == null ? 1 : a ];
10867
};
10868
10869
spaces.hsla.from = function( hsla ) {
10870
	if ( hsla[ 0 ] == null || hsla[ 1 ] == null || hsla[ 2 ] == null ) {
10871
		return [ null, null, null, hsla[ 3 ] ];
10872
	}
10873
	var h = hsla[ 0 ] / 360,
10874
		s = hsla[ 1 ],
10875
		l = hsla[ 2 ],
10876
		a = hsla[ 3 ],
10877
		q = l <= 0.5 ? l * ( 1 + s ) : l + s - l * s,
10878
		p = 2 * l - q;
10879
10880
	return [
10881
		Math.round( hue2rgb( p, q, h + ( 1 / 3 ) ) * 255 ),
10882
		Math.round( hue2rgb( p, q, h ) * 255 ),
10883
		Math.round( hue2rgb( p, q, h - ( 1 / 3 ) ) * 255 ),
10884
		a
10885
	];
10886
};
10887
10888
each( spaces, function( spaceName, space ) {
10889
	var props = space.props,
10890
		cache = space.cache,
10891
		to = space.to,
10892
		from = space.from;
10893
10894
	// makes rgba() and hsla()
10895
	color.fn[ spaceName ] = function( value ) {
10896
10897
		// generate a cache for this space if it doesn't exist
10898
		if ( to && !this[ cache ] ) {
10899
			this[ cache ] = to( this._rgba );
10900
		}
10901
		if ( value === undefined ) {
10902
			return this[ cache ].slice();
10903
		}
10904
10905
		var ret,
10906
			type = jQuery.type( value ),
10907
			arr = ( type === "array" || type === "object" ) ? value : arguments,
10908
			local = this[ cache ].slice();
10909
10910
		each( props, function( key, prop ) {
10911
			var val = arr[ type === "object" ? key : prop.idx ];
10912
			if ( val == null ) {
10913
				val = local[ prop.idx ];
10914
			}
10915
			local[ prop.idx ] = clamp( val, prop );
10916
		});
10917
10918
		if ( from ) {
10919
			ret = color( from( local ) );
10920
			ret[ cache ] = local;
10921
			return ret;
10922
		} else {
10923
			return color( local );
10924
		}
10925
	};
10926
10927
	// makes red() green() blue() alpha() hue() saturation() lightness()
10928
	each( props, function( key, prop ) {
10929
		// alpha is included in more than one space
10930
		if ( color.fn[ key ] ) {
10931
			return;
10932
		}
10933
		color.fn[ key ] = function( value ) {
10934
			var vtype = jQuery.type( value ),
10935
				fn = ( key === "alpha" ? ( this._hsla ? "hsla" : "rgba" ) : spaceName ),
10936
				local = this[ fn ](),
10937
				cur = local[ prop.idx ],
10938
				match;
10939
10940
			if ( vtype === "undefined" ) {
10941
				return cur;
10942
			}
10943
10944
			if ( vtype === "function" ) {
10945
				value = value.call( this, cur );
10946
				vtype = jQuery.type( value );
10947
			}
10948
			if ( value == null && prop.empty ) {
10949
				return this;
10950
			}
10951
			if ( vtype === "string" ) {
10952
				match = rplusequals.exec( value );
10953
				if ( match ) {
10954
					value = cur + parseFloat( match[ 2 ] ) * ( match[ 1 ] === "+" ? 1 : -1 );
10955
				}
10956
			}
10957
			local[ prop.idx ] = value;
10958
			return this[ fn ]( local );
10959
		};
10960
	});
10961
});
10962
10963
// add cssHook and .fx.step function for each named hook.
10964
// accept a space separated string of properties
10965
color.hook = function( hook ) {
10966
	var hooks = hook.split( " " );
10967
	each( hooks, function( i, hook ) {
10968
		jQuery.cssHooks[ hook ] = {
10969
			set: function( elem, value ) {
10970
				var parsed, curElem,
10971
					backgroundColor = "";
10972
10973
				if ( value !== "transparent" && ( jQuery.type( value ) !== "string" || ( parsed = stringParse( value ) ) ) ) {
10974
					value = color( parsed || value );
10975
					if ( !support.rgba && value._rgba[ 3 ] !== 1 ) {
10976
						curElem = hook === "backgroundColor" ? elem.parentNode : elem;
10977
						while (
10978
							(backgroundColor === "" || backgroundColor === "transparent") &&
10979
							curElem && curElem.style
10980
						) {
10981
							try {
10982
								backgroundColor = jQuery.css( curElem, "backgroundColor" );
10983
								curElem = curElem.parentNode;
10984
							} catch ( e ) {
10985
							}
10986
						}
10987
10988
						value = value.blend( backgroundColor && backgroundColor !== "transparent" ?
10989
							backgroundColor :
10990
							"_default" );
10991
					}
10992
10993
					value = value.toRgbaString();
10994
				}
10995
				try {
10996
					elem.style[ hook ] = value;
10997
				} catch ( e ) {
10998
					// wrapped to prevent IE from throwing errors on "invalid" values like 'auto' or 'inherit'
10999
				}
11000
			}
11001
		};
11002
		jQuery.fx.step[ hook ] = function( fx ) {
11003
			if ( !fx.colorInit ) {
11004
				fx.start = color( fx.elem, hook );
11005
				fx.end = color( fx.end );
11006
				fx.colorInit = true;
11007
			}
11008
			jQuery.cssHooks[ hook ].set( fx.elem, fx.start.transition( fx.end, fx.pos ) );
11009
		};
11010
	});
11011
11012
};
11013
11014
color.hook( stepHooks );
11015
11016
jQuery.cssHooks.borderColor = {
11017
	expand: function( value ) {
11018
		var expanded = {};
11019
11020
		each( [ "Top", "Right", "Bottom", "Left" ], function( i, part ) {
11021
			expanded[ "border" + part + "Color" ] = value;
11022
		});
11023
		return expanded;
11024
	}
11025
};
11026
11027
// Basic color names only.
11028
// Usage of any of the other color names requires adding yourself or including
11029
// jquery.color.svg-names.js.
11030
colors = jQuery.Color.names = {
11031
	// 4.1. Basic color keywords
11032
	aqua: "#00ffff",
11033
	black: "#000000",
11034
	blue: "#0000ff",
11035
	fuchsia: "#ff00ff",
11036
	gray: "#808080",
11037
	green: "#008000",
11038
	lime: "#00ff00",
11039
	maroon: "#800000",
11040
	navy: "#000080",
11041
	olive: "#808000",
11042
	purple: "#800080",
11043
	red: "#ff0000",
11044
	silver: "#c0c0c0",
11045
	teal: "#008080",
11046
	white: "#ffffff",
11047
	yellow: "#ffff00",
11048
11049
	// 4.2.3. "transparent" color keyword
11050
	transparent: [ null, null, null, 0 ],
11051
11052
	_default: "#ffffff"
11053
};
11054
11055
})( jQuery );
11056
11057
/******************************************************************************/
11058
/****************************** CLASS ANIMATIONS ******************************/
11059
/******************************************************************************/
11060
(function() {
11061
11062
var classAnimationActions = [ "add", "remove", "toggle" ],
11063
	shorthandStyles = {
11064
		border: 1,
11065
		borderBottom: 1,
11066
		borderColor: 1,
11067
		borderLeft: 1,
11068
		borderRight: 1,
11069
		borderTop: 1,
11070
		borderWidth: 1,
11071
		margin: 1,
11072
		padding: 1
11073
	};
11074
11075
$.each([ "borderLeftStyle", "borderRightStyle", "borderBottomStyle", "borderTopStyle" ], function( _, prop ) {
11076
	$.fx.step[ prop ] = function( fx ) {
11077
		if ( fx.end !== "none" && !fx.setAttr || fx.pos === 1 && !fx.setAttr ) {
11078
			jQuery.style( fx.elem, prop, fx.end );
11079
			fx.setAttr = true;
11080
		}
11081
	};
11082
});
11083
11084
function getElementStyles( elem ) {
11085
	var key, len,
11086
		style = elem.ownerDocument.defaultView ?
11087
			elem.ownerDocument.defaultView.getComputedStyle( elem, null ) :
11088
			elem.currentStyle,
11089
		styles = {};
11090
11091
	if ( style && style.length && style[ 0 ] && style[ style[ 0 ] ] ) {
11092
		len = style.length;
11093
		while ( len-- ) {
11094
			key = style[ len ];
11095
			if ( typeof style[ key ] === "string" ) {
11096
				styles[ $.camelCase( key ) ] = style[ key ];
11097
			}
11098
		}
11099
	// support: Opera, IE <9
11100
	} else {
11101
		for ( key in style ) {
11102
			if ( typeof style[ key ] === "string" ) {
11103
				styles[ key ] = style[ key ];
11104
			}
11105
		}
11106
	}
11107
11108
	return styles;
11109
}
11110
11111
function styleDifference( oldStyle, newStyle ) {
11112
	var diff = {},
11113
		name, value;
11114
11115
	for ( name in newStyle ) {
11116
		value = newStyle[ name ];
11117
		if ( oldStyle[ name ] !== value ) {
11118
			if ( !shorthandStyles[ name ] ) {
11119
				if ( $.fx.step[ name ] || !isNaN( parseFloat( value ) ) ) {
11120
					diff[ name ] = value;
11121
				}
11122
			}
11123
		}
11124
	}
11125
11126
	return diff;
11127
}
11128
11129
// support: jQuery <1.8
11130
if ( !$.fn.addBack ) {
11131
	$.fn.addBack = function( selector ) {
11132
		return this.add( selector == null ?
11133
			this.prevObject : this.prevObject.filter( selector )
11134
		);
11135
	};
11136
}
11137
11138
$.effects.animateClass = function( value, duration, easing, callback ) {
11139
	var o = $.speed( duration, easing, callback );
11140
11141
	return this.queue( function() {
11142
		var animated = $( this ),
11143
			baseClass = animated.attr( "class" ) || "",
11144
			applyClassChange,
11145
			allAnimations = o.children ? animated.find( "*" ).addBack() : animated;
11146
11147
		// map the animated objects to store the original styles.
11148
		allAnimations = allAnimations.map(function() {
11149
			var el = $( this );
11150
			return {
11151
				el: el,
11152
				start: getElementStyles( this )
11153
			};
11154
		});
11155
11156
		// apply class change
11157
		applyClassChange = function() {
11158
			$.each( classAnimationActions, function(i, action) {
11159
				if ( value[ action ] ) {
11160
					animated[ action + "Class" ]( value[ action ] );
11161
				}
11162
			});
11163
		};
11164
		applyClassChange();
11165
11166
		// map all animated objects again - calculate new styles and diff
11167
		allAnimations = allAnimations.map(function() {
11168
			this.end = getElementStyles( this.el[ 0 ] );
11169
			this.diff = styleDifference( this.start, this.end );
11170
			return this;
11171
		});
11172
11173
		// apply original class
11174
		animated.attr( "class", baseClass );
11175
11176
		// map all animated objects again - this time collecting a promise
11177
		allAnimations = allAnimations.map(function() {
11178
			var styleInfo = this,
11179
				dfd = $.Deferred(),
11180
				opts = $.extend({}, o, {
11181
					queue: false,
11182
					complete: function() {
11183
						dfd.resolve( styleInfo );
11184
					}
11185
				});
11186
11187
			this.el.animate( this.diff, opts );
11188
			return dfd.promise();
11189
		});
11190
11191
		// once all animations have completed:
11192
		$.when.apply( $, allAnimations.get() ).done(function() {
11193
11194
			// set the final class
11195
			applyClassChange();
11196
11197
			// for each animated element,
11198
			// clear all css properties that were animated
11199
			$.each( arguments, function() {
11200
				var el = this.el;
11201
				$.each( this.diff, function(key) {
11202
					el.css( key, "" );
11203
				});
11204
			});
11205
11206
			// this is guarnteed to be there if you use jQuery.speed()
11207
			// it also handles dequeuing the next anim...
11208
			o.complete.call( animated[ 0 ] );
11209
		});
11210
	});
11211
};
11212
11213
$.fn.extend({
11214
	addClass: (function( orig ) {
11215
		return function( classNames, speed, easing, callback ) {
11216
			return speed ?
11217
				$.effects.animateClass.call( this,
11218
					{ add: classNames }, speed, easing, callback ) :
11219
				orig.apply( this, arguments );
11220
		};
11221
	})( $.fn.addClass ),
11222
11223
	removeClass: (function( orig ) {
11224
		return function( classNames, speed, easing, callback ) {
11225
			return arguments.length > 1 ?
11226
				$.effects.animateClass.call( this,
11227
					{ remove: classNames }, speed, easing, callback ) :
11228
				orig.apply( this, arguments );
11229
		};
11230
	})( $.fn.removeClass ),
11231
11232
	toggleClass: (function( orig ) {
11233
		return function( classNames, force, speed, easing, callback ) {
11234
			if ( typeof force === "boolean" || force === undefined ) {
11235
				if ( !speed ) {
11236
					// without speed parameter
11237
					return orig.apply( this, arguments );
11238
				} else {
11239
					return $.effects.animateClass.call( this,
11240
						(force ? { add: classNames } : { remove: classNames }),
11241
						speed, easing, callback );
11242
				}
11243
			} else {
11244
				// without force parameter
11245
				return $.effects.animateClass.call( this,
11246
					{ toggle: classNames }, force, speed, easing );
11247
			}
11248
		};
11249
	})( $.fn.toggleClass ),
11250
11251
	switchClass: function( remove, add, speed, easing, callback) {
11252
		return $.effects.animateClass.call( this, {
11253
			add: add,
11254
			remove: remove
11255
		}, speed, easing, callback );
11256
	}
11257
});
11258
11259
})();
11260
11261
/******************************************************************************/
11262
/*********************************** EFFECTS **********************************/
11263
/******************************************************************************/
11264
11265
(function() {
11266
11267
$.extend( $.effects, {
11268
	version: "1.11.4",
11269
11270
	// Saves a set of properties in a data storage
11271
	save: function( element, set ) {
11272
		for ( var i = 0; i < set.length; i++ ) {
11273
			if ( set[ i ] !== null ) {
11274
				element.data( dataSpace + set[ i ], element[ 0 ].style[ set[ i ] ] );
11275
			}
11276
		}
11277
	},
11278
11279
	// Restores a set of previously saved properties from a data storage
11280
	restore: function( element, set ) {
11281
		var val, i;
11282
		for ( i = 0; i < set.length; i++ ) {
11283
			if ( set[ i ] !== null ) {
11284
				val = element.data( dataSpace + set[ i ] );
11285
				// support: jQuery 1.6.2
11286
				// http://bugs.jquery.com/ticket/9917
11287
				// jQuery 1.6.2 incorrectly returns undefined for any falsy value.
11288
				// We can't differentiate between "" and 0 here, so we just assume
11289
				// empty string since it's likely to be a more common value...
11290
				if ( val === undefined ) {
11291
					val = "";
11292
				}
11293
				element.css( set[ i ], val );
11294
			}
11295
		}
11296
	},
11297
11298
	setMode: function( el, mode ) {
11299
		if (mode === "toggle") {
11300
			mode = el.is( ":hidden" ) ? "show" : "hide";
11301
		}
11302
		return mode;
11303
	},
11304
11305
	// Translates a [top,left] array into a baseline value
11306
	// this should be a little more flexible in the future to handle a string & hash
11307
	getBaseline: function( origin, original ) {
11308
		var y, x;
11309
		switch ( origin[ 0 ] ) {
11310
			case "top": y = 0; break;
11311
			case "middle": y = 0.5; break;
11312
			case "bottom": y = 1; break;
11313
			default: y = origin[ 0 ] / original.height;
11314
		}
11315
		switch ( origin[ 1 ] ) {
11316
			case "left": x = 0; break;
11317
			case "center": x = 0.5; break;
11318
			case "right": x = 1; break;
11319
			default: x = origin[ 1 ] / original.width;
11320
		}
11321
		return {
11322
			x: x,
11323
			y: y
11324
		};
11325
	},
11326
11327
	// Wraps the element around a wrapper that copies position properties
11328
	createWrapper: function( element ) {
11329
11330
		// if the element is already wrapped, return it
11331
		if ( element.parent().is( ".ui-effects-wrapper" )) {
11332
			return element.parent();
11333
		}
11334
11335
		// wrap the element
11336
		var props = {
11337
				width: element.outerWidth(true),
11338
				height: element.outerHeight(true),
11339
				"float": element.css( "float" )
11340
			},
11341
			wrapper = $( "<div></div>" )
11342
				.addClass( "ui-effects-wrapper" )
11343
				.css({
11344
					fontSize: "100%",
11345
					background: "transparent",
11346
					border: "none",
11347
					margin: 0,
11348
					padding: 0
11349
				}),
11350
			// Store the size in case width/height are defined in % - Fixes #5245
11351
			size = {
11352
				width: element.width(),
11353
				height: element.height()
11354
			},
11355
			active = document.activeElement;
11356
11357
		// support: Firefox
11358
		// Firefox incorrectly exposes anonymous content
11359
		// https://bugzilla.mozilla.org/show_bug.cgi?id=561664
11360
		try {
11361
			active.id;
11362
		} catch ( e ) {
11363
			active = document.body;
11364
		}
11365
11366
		element.wrap( wrapper );
11367
11368
		// Fixes #7595 - Elements lose focus when wrapped.
11369
		if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) {
11370
			$( active ).focus();
11371
		}
11372
11373
		wrapper = element.parent(); //Hotfix for jQuery 1.4 since some change in wrap() seems to actually lose the reference to the wrapped element
11374
11375
		// transfer positioning properties to the wrapper
11376
		if ( element.css( "position" ) === "static" ) {
11377
			wrapper.css({ position: "relative" });
11378
			element.css({ position: "relative" });
11379
		} else {
11380
			$.extend( props, {
11381
				position: element.css( "position" ),
11382
				zIndex: element.css( "z-index" )
11383
			});
11384
			$.each([ "top", "left", "bottom", "right" ], function(i, pos) {
11385
				props[ pos ] = element.css( pos );
11386
				if ( isNaN( parseInt( props[ pos ], 10 ) ) ) {
11387
					props[ pos ] = "auto";
11388
				}
11389
			});
11390
			element.css({
11391
				position: "relative",
11392
				top: 0,
11393
				left: 0,
11394
				right: "auto",
11395
				bottom: "auto"
11396
			});
11397
		}
11398
		element.css(size);
11399
11400
		return wrapper.css( props ).show();
11401
	},
11402
11403
	removeWrapper: function( element ) {
11404
		var active = document.activeElement;
11405
11406
		if ( element.parent().is( ".ui-effects-wrapper" ) ) {
11407
			element.parent().replaceWith( element );
11408
11409
			// Fixes #7595 - Elements lose focus when wrapped.
11410
			if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) {
11411
				$( active ).focus();
11412
			}
11413
		}
11414
11415
		return element;
11416
	},
11417
11418
	setTransition: function( element, list, factor, value ) {
11419
		value = value || {};
11420
		$.each( list, function( i, x ) {
11421
			var unit = element.cssUnit( x );
11422
			if ( unit[ 0 ] > 0 ) {
11423
				value[ x ] = unit[ 0 ] * factor + unit[ 1 ];
11424
			}
11425
		});
11426
		return value;
11427
	}
11428
});
11429
11430
// return an effect options object for the given parameters:
11431
function _normalizeArguments( effect, options, speed, callback ) {
11432
11433
	// allow passing all options as the first parameter
11434
	if ( $.isPlainObject( effect ) ) {
11435
		options = effect;
11436
		effect = effect.effect;
11437
	}
11438
11439
	// convert to an object
11440
	effect = { effect: effect };
11441
11442
	// catch (effect, null, ...)
11443
	if ( options == null ) {
11444
		options = {};
11445
	}
11446
11447
	// catch (effect, callback)
11448
	if ( $.isFunction( options ) ) {
11449
		callback = options;
11450
		speed = null;
11451
		options = {};
11452
	}
11453
11454
	// catch (effect, speed, ?)
11455
	if ( typeof options === "number" || $.fx.speeds[ options ] ) {
11456
		callback = speed;
11457
		speed = options;
11458
		options = {};
11459
	}
11460
11461
	// catch (effect, options, callback)
11462
	if ( $.isFunction( speed ) ) {
11463
		callback = speed;
11464
		speed = null;
11465
	}
11466
11467
	// add options to effect
11468
	if ( options ) {
11469
		$.extend( effect, options );
11470
	}
11471
11472
	speed = speed || options.duration;
11473
	effect.duration = $.fx.off ? 0 :
11474
		typeof speed === "number" ? speed :
11475
		speed in $.fx.speeds ? $.fx.speeds[ speed ] :
11476
		$.fx.speeds._default;
11477
11478
	effect.complete = callback || options.complete;
11479
11480
	return effect;
11481
}
11482
11483
function standardAnimationOption( option ) {
11484
	// Valid standard speeds (nothing, number, named speed)
11485
	if ( !option || typeof option === "number" || $.fx.speeds[ option ] ) {
11486
		return true;
11487
	}
11488
11489
	// Invalid strings - treat as "normal" speed
11490
	if ( typeof option === "string" && !$.effects.effect[ option ] ) {
11491
		return true;
11492
	}
11493
11494
	// Complete callback
11495
	if ( $.isFunction( option ) ) {
11496
		return true;
11497
	}
11498
11499
	// Options hash (but not naming an effect)
11500
	if ( typeof option === "object" && !option.effect ) {
11501
		return true;
11502
	}
11503
11504
	// Didn't match any standard API
11505
	return false;
11506
}
11507
11508
$.fn.extend({
11509
	effect: function( /* effect, options, speed, callback */ ) {
11510
		var args = _normalizeArguments.apply( this, arguments ),
11511
			mode = args.mode,
11512
			queue = args.queue,
11513
			effectMethod = $.effects.effect[ args.effect ];
11514
11515
		if ( $.fx.off || !effectMethod ) {
11516
			// delegate to the original method (e.g., .show()) if possible
11517
			if ( mode ) {
11518
				return this[ mode ]( args.duration, args.complete );
11519
			} else {
11520
				return this.each( function() {
11521
					if ( args.complete ) {
11522
						args.complete.call( this );
11523
					}
11524
				});
11525
			}
11526
		}
11527
11528
		function run( next ) {
11529
			var elem = $( this ),
11530
				complete = args.complete,
11531
				mode = args.mode;
11532
11533
			function done() {
11534
				if ( $.isFunction( complete ) ) {
11535
					complete.call( elem[0] );
11536
				}
11537
				if ( $.isFunction( next ) ) {
11538
					next();
11539
				}
11540
			}
11541
11542
			// If the element already has the correct final state, delegate to
11543
			// the core methods so the internal tracking of "olddisplay" works.
11544
			if ( elem.is( ":hidden" ) ? mode === "hide" : mode === "show" ) {
11545
				elem[ mode ]();
11546
				done();
11547
			} else {
11548
				effectMethod.call( elem[0], args, done );
11549
			}
11550
		}
11551
11552
		return queue === false ? this.each( run ) : this.queue( queue || "fx", run );
11553
	},
11554
11555
	show: (function( orig ) {
11556
		return function( option ) {
11557
			if ( standardAnimationOption( option ) ) {
11558
				return orig.apply( this, arguments );
11559
			} else {
11560
				var args = _normalizeArguments.apply( this, arguments );
11561
				args.mode = "show";
11562
				return this.effect.call( this, args );
11563
			}
11564
		};
11565
	})( $.fn.show ),
11566
11567
	hide: (function( orig ) {
11568
		return function( option ) {
11569
			if ( standardAnimationOption( option ) ) {
11570
				return orig.apply( this, arguments );
11571
			} else {
11572
				var args = _normalizeArguments.apply( this, arguments );
11573
				args.mode = "hide";
11574
				return this.effect.call( this, args );
11575
			}
11576
		};
11577
	})( $.fn.hide ),
11578
11579
	toggle: (function( orig ) {
11580
		return function( option ) {
11581
			if ( standardAnimationOption( option ) || typeof option === "boolean" ) {
11582
				return orig.apply( this, arguments );
11583
			} else {
11584
				var args = _normalizeArguments.apply( this, arguments );
11585
				args.mode = "toggle";
11586
				return this.effect.call( this, args );
11587
			}
11588
		};
11589
	})( $.fn.toggle ),
11590
11591
	// helper functions
11592
	cssUnit: function(key) {
11593
		var style = this.css( key ),
11594
			val = [];
11595
11596
		$.each( [ "em", "px", "%", "pt" ], function( i, unit ) {
11597
			if ( style.indexOf( unit ) > 0 ) {
11598
				val = [ parseFloat( style ), unit ];
11599
			}
11600
		});
11601
		return val;
11602
	}
11603
});
11604
11605
})();
11606
11607
/******************************************************************************/
11608
/*********************************** EASING ***********************************/
11609
/******************************************************************************/
11610
11611
(function() {
11612
11613
// based on easing equations from Robert Penner (http://www.robertpenner.com/easing)
11614
11615
var baseEasings = {};
11616
11617
$.each( [ "Quad", "Cubic", "Quart", "Quint", "Expo" ], function( i, name ) {
11618
	baseEasings[ name ] = function( p ) {
11619
		return Math.pow( p, i + 2 );
11620
	};
11621
});
11622
11623
$.extend( baseEasings, {
11624
	Sine: function( p ) {
11625
		return 1 - Math.cos( p * Math.PI / 2 );
11626
	},
11627
	Circ: function( p ) {
11628
		return 1 - Math.sqrt( 1 - p * p );
11629
	},
11630
	Elastic: function( p ) {
11631
		return p === 0 || p === 1 ? p :
11632
			-Math.pow( 2, 8 * (p - 1) ) * Math.sin( ( (p - 1) * 80 - 7.5 ) * Math.PI / 15 );
11633
	},
11634
	Back: function( p ) {
11635
		return p * p * ( 3 * p - 2 );
11636
	},
11637
	Bounce: function( p ) {
11638
		var pow2,
11639
			bounce = 4;
11640
11641
		while ( p < ( ( pow2 = Math.pow( 2, --bounce ) ) - 1 ) / 11 ) {}
11642
		return 1 / Math.pow( 4, 3 - bounce ) - 7.5625 * Math.pow( ( pow2 * 3 - 2 ) / 22 - p, 2 );
11643
	}
11644
});
11645
11646
$.each( baseEasings, function( name, easeIn ) {
11647
	$.easing[ "easeIn" + name ] = easeIn;
11648
	$.easing[ "easeOut" + name ] = function( p ) {
11649
		return 1 - easeIn( 1 - p );
11650
	};
11651
	$.easing[ "easeInOut" + name ] = function( p ) {
11652
		return p < 0.5 ?
11653
			easeIn( p * 2 ) / 2 :
11654
			1 - easeIn( p * -2 + 2 ) / 2;
11655
	};
11656
});
11657
11658
})();
11659
11660
var effect = $.effects;
11661
11662
11663
/*!
11664
 * jQuery UI Effects Highlight 1.11.4
11665
 * http://jqueryui.com
11666
 *
11667
 * Copyright jQuery Foundation and other contributors
11668
 * Released under the MIT license.
11669
 * http://jquery.org/license
11670
 *
11671
 * http://api.jqueryui.com/highlight-effect/
11672
 */
11673
11674
11675
var effectHighlight = $.effects.effect.highlight = function( o, done ) {
11676
	var elem = $( this ),
11677
		props = [ "backgroundImage", "backgroundColor", "opacity" ],
11678
		mode = $.effects.setMode( elem, o.mode || "show" ),
11679
		animation = {
11680
			backgroundColor: elem.css( "backgroundColor" )
11681
		};
11682
11683
	if (mode === "hide") {
11684
		animation.opacity = 0;
11685
	}
11686
11687
	$.effects.save( elem, props );
11688
11689
	elem
11690
		.show()
11691
		.css({
11692
			backgroundImage: "none",
11693
			backgroundColor: o.color || "#ffff99"
11694
		})
11695
		.animate( animation, {
11696
			queue: false,
11697
			duration: o.duration,
11698
			easing: o.easing,
11699
			complete: function() {
11700
				if ( mode === "hide" ) {
11701
					elem.hide();
11702
				}
11703
				$.effects.restore( elem, props );
11704
				done();
11705
			}
11706
		});
11707
};
11708
11709
11710
11711
}));
(-)a/koha-tmpl/intranet-tmpl/lib/jquery/jquery-ui-1.11.4.min.css (-7 lines)
Lines 1-7 Link Here
1
/*! jQuery UI - v1.11.4 - 2016-02-22
2
* http://jqueryui.com
3
* Includes: core.css, draggable.css, sortable.css, accordion.css, autocomplete.css, button.css, datepicker.css, menu.css, progressbar.css, slider.css, tabs.css, theme.css
4
* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Verdana%2CArial%2Csans-serif&fwDefault=normal&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=cccccc&bgTextureHeader=highlight_soft&bgImgOpacityHeader=75&borderColorHeader=aaaaaa&fcHeader=222222&iconColorHeader=222222&bgColorContent=ffffff&bgTextureContent=flat&bgImgOpacityContent=75&borderColorContent=aaaaaa&fcContent=222222&iconColorContent=222222&bgColorDefault=e6e6e6&bgTextureDefault=glass&bgImgOpacityDefault=75&borderColorDefault=d3d3d3&fcDefault=555555&iconColorDefault=888888&bgColorHover=dadada&bgTextureHover=glass&bgImgOpacityHover=75&borderColorHover=999999&fcHover=212121&iconColorHover=454545&bgColorActive=ffffff&bgTextureActive=glass&bgImgOpacityActive=65&borderColorActive=aaaaaa&fcActive=212121&iconColorActive=454545&bgColorHighlight=fbf9ee&bgTextureHighlight=glass&bgImgOpacityHighlight=55&borderColorHighlight=fcefa1&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureError=glass&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=flat&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=flat&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px
5
* Copyright jQuery Foundation and other contributors; Licensed MIT */
6
7
.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-clearfix{min-height:0}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important}.ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-draggable-handle{-ms-touch-action:none;touch-action:none}.ui-sortable-handle{-ms-touch-action:none;touch-action:none}.ui-accordion .ui-accordion-header{display:block;cursor:pointer;position:relative;margin:2px 0 0 0;padding:.5em .5em .5em .7em;min-height:0;font-size:100%}.ui-accordion .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-icons .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-header .ui-accordion-header-icon{position:absolute;left:.5em;top:50%;margin-top:-8px}.ui-accordion .ui-accordion-content{padding:1em 2.2em;border-top:0;overflow:auto}.ui-autocomplete{position:absolute;top:0;left:0;cursor:default}.ui-button{display:inline-block;position:relative;padding:0;line-height:normal;margin-right:.1em;cursor:pointer;vertical-align:middle;text-align:center;overflow:visible}.ui-button,.ui-button:link,.ui-button:visited,.ui-button:hover,.ui-button:active{text-decoration:none}.ui-button-icon-only{width:2.2em}button.ui-button-icon-only{width:2.4em}.ui-button-icons-only{width:3.4em}button.ui-button-icons-only{width:3.7em}.ui-button .ui-button-text{display:block;line-height:normal}.ui-button-text-only .ui-button-text{padding:.4em 1em}.ui-button-icon-only .ui-button-text,.ui-button-icons-only .ui-button-text{padding:.4em;text-indent:-9999999px}.ui-button-text-icon-primary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 1em .4em 2.1em}.ui-button-text-icon-secondary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 2.1em .4em 1em}.ui-button-text-icons .ui-button-text{padding-left:2.1em;padding-right:2.1em}input.ui-button{padding:.4em 1em}.ui-button-icon-only .ui-icon,.ui-button-text-icon-primary .ui-icon,.ui-button-text-icon-secondary .ui-icon,.ui-button-text-icons .ui-icon,.ui-button-icons-only .ui-icon{position:absolute;top:50%;margin-top:-8px}.ui-button-icon-only .ui-icon{left:50%;margin-left:-8px}.ui-button-text-icon-primary .ui-button-icon-primary,.ui-button-text-icons .ui-button-icon-primary,.ui-button-icons-only .ui-button-icon-primary{left:.5em}.ui-button-text-icon-secondary .ui-button-icon-secondary,.ui-button-text-icons .ui-button-icon-secondary,.ui-button-icons-only .ui-button-icon-secondary{right:.5em}.ui-buttonset{margin-right:7px}.ui-buttonset .ui-button{margin-left:0;margin-right:-.3em}input.ui-button::-moz-focus-inner,button.ui-button::-moz-focus-inner{border:0;padding:0}.ui-datepicker{width:17em;padding:.2em .2em 0;display:none}.ui-datepicker .ui-datepicker-header{position:relative;padding:.2em 0}.ui-datepicker .ui-datepicker-prev,.ui-datepicker .ui-datepicker-next{position:absolute;top:2px;width:1.8em;height:1.8em}.ui-datepicker .ui-datepicker-prev-hover,.ui-datepicker .ui-datepicker-next-hover{top:1px}.ui-datepicker .ui-datepicker-prev{left:2px}.ui-datepicker .ui-datepicker-next{right:2px}.ui-datepicker .ui-datepicker-prev-hover{left:1px}.ui-datepicker .ui-datepicker-next-hover{right:1px}.ui-datepicker .ui-datepicker-prev span,.ui-datepicker .ui-datepicker-next span{display:block;position:absolute;left:50%;margin-left:-8px;top:50%;margin-top:-8px}.ui-datepicker .ui-datepicker-title{margin:0 2.3em;line-height:1.8em;text-align:center}.ui-datepicker .ui-datepicker-title select{font-size:1em;margin:1px 0}.ui-datepicker select.ui-datepicker-month,.ui-datepicker select.ui-datepicker-year{width:45%}.ui-datepicker table{width:100%;font-size:.9em;border-collapse:collapse;margin:0 0 .4em}.ui-datepicker th{padding:.7em .3em;text-align:center;font-weight:bold;border:0}.ui-datepicker td{border:0;padding:1px}.ui-datepicker td span,.ui-datepicker td a{display:block;padding:.2em;text-align:right;text-decoration:none}.ui-datepicker .ui-datepicker-buttonpane{background-image:none;margin:.7em 0 0 0;padding:0 .2em;border-left:0;border-right:0;border-bottom:0}.ui-datepicker .ui-datepicker-buttonpane button{float:right;margin:.5em .2em .4em;cursor:pointer;padding:.2em .6em .3em .6em;width:auto;overflow:visible}.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current{float:left}.ui-datepicker.ui-datepicker-multi{width:auto}.ui-datepicker-multi .ui-datepicker-group{float:left}.ui-datepicker-multi .ui-datepicker-group table{width:95%;margin:0 auto .4em}.ui-datepicker-multi-2 .ui-datepicker-group{width:50%}.ui-datepicker-multi-3 .ui-datepicker-group{width:33.3%}.ui-datepicker-multi-4 .ui-datepicker-group{width:25%}.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header{border-left-width:0}.ui-datepicker-multi .ui-datepicker-buttonpane{clear:left}.ui-datepicker-row-break{clear:both;width:100%;font-size:0}.ui-datepicker-rtl{direction:rtl}.ui-datepicker-rtl .ui-datepicker-prev{right:2px;left:auto}.ui-datepicker-rtl .ui-datepicker-next{left:2px;right:auto}.ui-datepicker-rtl .ui-datepicker-prev:hover{right:1px;left:auto}.ui-datepicker-rtl .ui-datepicker-next:hover{left:1px;right:auto}.ui-datepicker-rtl .ui-datepicker-buttonpane{clear:right}.ui-datepicker-rtl .ui-datepicker-buttonpane button{float:left}.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current,.ui-datepicker-rtl .ui-datepicker-group{float:right}.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header{border-right-width:0;border-left-width:1px}.ui-menu{list-style:none;padding:0;margin:0;display:block;outline:none}.ui-menu .ui-menu{position:absolute}.ui-menu .ui-menu-item{position:relative;margin:0;padding:3px 1em 3px .4em;cursor:pointer;min-height:0;list-style-image:url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7")}.ui-menu .ui-menu-divider{margin:5px 0;height:0;font-size:0;line-height:0;border-width:1px 0 0 0}.ui-menu .ui-state-focus,.ui-menu .ui-state-active{margin:-1px}.ui-menu-icons{position:relative}.ui-menu-icons .ui-menu-item{padding-left:2em}.ui-menu .ui-icon{position:absolute;top:0;bottom:0;left:.2em;margin:auto 0}.ui-menu .ui-menu-icon{left:auto;right:0}.ui-progressbar{height:2em;text-align:left;overflow:hidden}.ui-progressbar .ui-progressbar-value{margin:-1px;height:100%}.ui-progressbar .ui-progressbar-overlay{background:url("data:image/gif;base64,R0lGODlhKAAoAIABAAAAAP///yH/C05FVFNDQVBFMi4wAwEAAAAh+QQJAQABACwAAAAAKAAoAAACkYwNqXrdC52DS06a7MFZI+4FHBCKoDeWKXqymPqGqxvJrXZbMx7Ttc+w9XgU2FB3lOyQRWET2IFGiU9m1frDVpxZZc6bfHwv4c1YXP6k1Vdy292Fb6UkuvFtXpvWSzA+HycXJHUXiGYIiMg2R6W459gnWGfHNdjIqDWVqemH2ekpObkpOlppWUqZiqr6edqqWQAAIfkECQEAAQAsAAAAACgAKAAAApSMgZnGfaqcg1E2uuzDmmHUBR8Qil95hiPKqWn3aqtLsS18y7G1SzNeowWBENtQd+T1JktP05nzPTdJZlR6vUxNWWjV+vUWhWNkWFwxl9VpZRedYcflIOLafaa28XdsH/ynlcc1uPVDZxQIR0K25+cICCmoqCe5mGhZOfeYSUh5yJcJyrkZWWpaR8doJ2o4NYq62lAAACH5BAkBAAEALAAAAAAoACgAAAKVDI4Yy22ZnINRNqosw0Bv7i1gyHUkFj7oSaWlu3ovC8GxNso5fluz3qLVhBVeT/Lz7ZTHyxL5dDalQWPVOsQWtRnuwXaFTj9jVVh8pma9JjZ4zYSj5ZOyma7uuolffh+IR5aW97cHuBUXKGKXlKjn+DiHWMcYJah4N0lYCMlJOXipGRr5qdgoSTrqWSq6WFl2ypoaUAAAIfkECQEAAQAsAAAAACgAKAAAApaEb6HLgd/iO7FNWtcFWe+ufODGjRfoiJ2akShbueb0wtI50zm02pbvwfWEMWBQ1zKGlLIhskiEPm9R6vRXxV4ZzWT2yHOGpWMyorblKlNp8HmHEb/lCXjcW7bmtXP8Xt229OVWR1fod2eWqNfHuMjXCPkIGNileOiImVmCOEmoSfn3yXlJWmoHGhqp6ilYuWYpmTqKUgAAIfkECQEAAQAsAAAAACgAKAAAApiEH6kb58biQ3FNWtMFWW3eNVcojuFGfqnZqSebuS06w5V80/X02pKe8zFwP6EFWOT1lDFk8rGERh1TTNOocQ61Hm4Xm2VexUHpzjymViHrFbiELsefVrn6XKfnt2Q9G/+Xdie499XHd2g4h7ioOGhXGJboGAnXSBnoBwKYyfioubZJ2Hn0RuRZaflZOil56Zp6iioKSXpUAAAh+QQJAQABACwAAAAAKAAoAAACkoQRqRvnxuI7kU1a1UU5bd5tnSeOZXhmn5lWK3qNTWvRdQxP8qvaC+/yaYQzXO7BMvaUEmJRd3TsiMAgswmNYrSgZdYrTX6tSHGZO73ezuAw2uxuQ+BbeZfMxsexY35+/Qe4J1inV0g4x3WHuMhIl2jXOKT2Q+VU5fgoSUI52VfZyfkJGkha6jmY+aaYdirq+lQAACH5BAkBAAEALAAAAAAoACgAAAKWBIKpYe0L3YNKToqswUlvznigd4wiR4KhZrKt9Upqip61i9E3vMvxRdHlbEFiEXfk9YARYxOZZD6VQ2pUunBmtRXo1Lf8hMVVcNl8JafV38aM2/Fu5V16Bn63r6xt97j09+MXSFi4BniGFae3hzbH9+hYBzkpuUh5aZmHuanZOZgIuvbGiNeomCnaxxap2upaCZsq+1kAACH5BAkBAAEALAAAAAAoACgAAAKXjI8By5zf4kOxTVrXNVlv1X0d8IGZGKLnNpYtm8Lr9cqVeuOSvfOW79D9aDHizNhDJidFZhNydEahOaDH6nomtJjp1tutKoNWkvA6JqfRVLHU/QUfau9l2x7G54d1fl995xcIGAdXqMfBNadoYrhH+Mg2KBlpVpbluCiXmMnZ2Sh4GBqJ+ckIOqqJ6LmKSllZmsoq6wpQAAAh+QQJAQABACwAAAAAKAAoAAAClYx/oLvoxuJDkU1a1YUZbJ59nSd2ZXhWqbRa2/gF8Gu2DY3iqs7yrq+xBYEkYvFSM8aSSObE+ZgRl1BHFZNr7pRCavZ5BW2142hY3AN/zWtsmf12p9XxxFl2lpLn1rseztfXZjdIWIf2s5dItwjYKBgo9yg5pHgzJXTEeGlZuenpyPmpGQoKOWkYmSpaSnqKileI2FAAACH5BAkBAAEALAAAAAAoACgAAAKVjB+gu+jG4kORTVrVhRlsnn2dJ3ZleFaptFrb+CXmO9OozeL5VfP99HvAWhpiUdcwkpBH3825AwYdU8xTqlLGhtCosArKMpvfa1mMRae9VvWZfeB2XfPkeLmm18lUcBj+p5dnN8jXZ3YIGEhYuOUn45aoCDkp16hl5IjYJvjWKcnoGQpqyPlpOhr3aElaqrq56Bq7VAAAOw==");height:100%;filter:alpha(opacity=25);opacity:0.25}.ui-progressbar-indeterminate .ui-progressbar-value{background-image:none}.ui-slider{position:relative;text-align:left}.ui-slider .ui-slider-handle{position:absolute;z-index:2;width:1.2em;height:1.2em;cursor:default;-ms-touch-action:none;touch-action:none}.ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;background-position:0 0}.ui-slider.ui-state-disabled .ui-slider-handle,.ui-slider.ui-state-disabled .ui-slider-range{filter:inherit}.ui-slider-horizontal{height:.8em}.ui-slider-horizontal .ui-slider-handle{top:-.3em;margin-left:-.6em}.ui-slider-horizontal .ui-slider-range{top:0;height:100%}.ui-slider-horizontal .ui-slider-range-min{left:0}.ui-slider-horizontal .ui-slider-range-max{right:0}.ui-slider-vertical{width:.8em;height:100px}.ui-slider-vertical .ui-slider-handle{left:-.3em;margin-left:0;margin-bottom:-.6em}.ui-slider-vertical .ui-slider-range{left:0;width:100%}.ui-slider-vertical .ui-slider-range-min{bottom:0}.ui-slider-vertical .ui-slider-range-max{top:0}.ui-tabs{position:relative;padding:.2em}.ui-tabs .ui-tabs-nav{margin:0;padding:.2em .2em 0}.ui-tabs .ui-tabs-nav li{list-style:none;float:left;position:relative;top:0;margin:1px .2em 0 0;border-bottom-width:0;padding:0;white-space:nowrap}.ui-tabs .ui-tabs-nav .ui-tabs-anchor{float:left;padding:.5em 1em;text-decoration:none}.ui-tabs .ui-tabs-nav li.ui-tabs-active{margin-bottom:-1px;padding-bottom:1px}.ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor,.ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor,.ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor{cursor:text}.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor{cursor:pointer}.ui-tabs .ui-tabs-panel{display:block;border-width:0;padding:1em 1.4em;background:none}.ui-widget{font-family:Verdana,Arial,sans-serif;font-size:1.1em}.ui-widget .ui-widget{font-size:1em}.ui-widget input,.ui-widget select,.ui-widget textarea,.ui-widget button{font-family:Verdana,Arial,sans-serif;font-size:1em}.ui-widget-content{border:1px solid #aaa;background:#fff;color:#222}.ui-widget-content a{color:#222}.ui-widget-header{border:1px solid #aaa;background:#ccc url("images/ui-bg_highlight-soft_75_cccccc_1x100.png") 50% 50% repeat-x;color:#222;font-weight:bold}.ui-widget-header a{color:#222}.ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default{border:1px solid #d3d3d3;background:#e6e6e6 url("images/ui-bg_glass_75_e6e6e6_1x400.png") 50% 50% repeat-x;font-weight:normal;color:#555}.ui-state-default a,.ui-state-default a:link,.ui-state-default a:visited{color:#555;text-decoration:none}.ui-state-hover,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-hover,.ui-state-focus,.ui-widget-content .ui-state-focus,.ui-widget-header .ui-state-focus{border:1px solid #999;background:#dadada url("images/ui-bg_glass_75_dadada_1x400.png") 50% 50% repeat-x;font-weight:normal;color:#212121}.ui-state-hover a,.ui-state-hover a:hover,.ui-state-hover a:link,.ui-state-hover a:visited,.ui-state-focus a,.ui-state-focus a:hover,.ui-state-focus a:link,.ui-state-focus a:visited{color:#212121;text-decoration:none}.ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active{border:1px solid #aaa;background:#fff url("images/ui-bg_glass_65_ffffff_1x400.png") 50% 50% repeat-x;font-weight:normal;color:#212121}.ui-state-active a,.ui-state-active a:link,.ui-state-active a:visited{color:#212121;text-decoration:none}.ui-state-highlight,.ui-widget-content .ui-state-highlight,.ui-widget-header .ui-state-highlight{border:1px solid #fcefa1;background:#fbf9ee url("images/ui-bg_glass_55_fbf9ee_1x400.png") 50% 50% repeat-x;color:#363636}.ui-state-highlight a,.ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a{color:#363636}.ui-state-error,.ui-widget-content .ui-state-error,.ui-widget-header .ui-state-error{border:1px solid #cd0a0a;background:#fef1ec url("images/ui-bg_glass_95_fef1ec_1x400.png") 50% 50% repeat-x;color:#cd0a0a}.ui-state-error a,.ui-widget-content .ui-state-error a,.ui-widget-header .ui-state-error a{color:#cd0a0a}.ui-state-error-text,.ui-widget-content .ui-state-error-text,.ui-widget-header .ui-state-error-text{color:#cd0a0a}.ui-priority-primary,.ui-widget-content .ui-priority-primary,.ui-widget-header .ui-priority-primary{font-weight:bold}.ui-priority-secondary,.ui-widget-content .ui-priority-secondary,.ui-widget-header .ui-priority-secondary{opacity:.7;filter:Alpha(Opacity=70);font-weight:normal}.ui-state-disabled,.ui-widget-content .ui-state-disabled,.ui-widget-header .ui-state-disabled{opacity:.35;filter:Alpha(Opacity=35);background-image:none}.ui-state-disabled .ui-icon{filter:Alpha(Opacity=35)}.ui-icon{width:16px;height:16px}.ui-icon,.ui-widget-content .ui-icon{background-image:url("images/ui-icons_222222_256x240.png")}.ui-widget-header .ui-icon{background-image:url("images/ui-icons_222222_256x240.png")}.ui-state-default .ui-icon{background-image:url("images/ui-icons_888888_256x240.png")}.ui-state-hover .ui-icon,.ui-state-focus .ui-icon{background-image:url("images/ui-icons_454545_256x240.png")}.ui-state-active .ui-icon{background-image:url("images/ui-icons_454545_256x240.png")}.ui-state-highlight .ui-icon{background-image:url("images/ui-icons_2e83ff_256x240.png")}.ui-state-error .ui-icon,.ui-state-error-text .ui-icon{background-image:url("images/ui-icons_cd0a0a_256x240.png")}.ui-icon-blank{background-position:16px 16px}.ui-icon-carat-1-n{background-position:0 0}.ui-icon-carat-1-ne{background-position:-16px 0}.ui-icon-carat-1-e{background-position:-32px 0}.ui-icon-carat-1-se{background-position:-48px 0}.ui-icon-carat-1-s{background-position:-64px 0}.ui-icon-carat-1-sw{background-position:-80px 0}.ui-icon-carat-1-w{background-position:-96px 0}.ui-icon-carat-1-nw{background-position:-112px 0}.ui-icon-carat-2-n-s{background-position:-128px 0}.ui-icon-carat-2-e-w{background-position:-144px 0}.ui-icon-triangle-1-n{background-position:0 -16px}.ui-icon-triangle-1-ne{background-position:-16px -16px}.ui-icon-triangle-1-e{background-position:-32px -16px}.ui-icon-triangle-1-se{background-position:-48px -16px}.ui-icon-triangle-1-s{background-position:-64px -16px}.ui-icon-triangle-1-sw{background-position:-80px -16px}.ui-icon-triangle-1-w{background-position:-96px -16px}.ui-icon-triangle-1-nw{background-position:-112px -16px}.ui-icon-triangle-2-n-s{background-position:-128px -16px}.ui-icon-triangle-2-e-w{background-position:-144px -16px}.ui-icon-arrow-1-n{background-position:0 -32px}.ui-icon-arrow-1-ne{background-position:-16px -32px}.ui-icon-arrow-1-e{background-position:-32px -32px}.ui-icon-arrow-1-se{background-position:-48px -32px}.ui-icon-arrow-1-s{background-position:-64px -32px}.ui-icon-arrow-1-sw{background-position:-80px -32px}.ui-icon-arrow-1-w{background-position:-96px -32px}.ui-icon-arrow-1-nw{background-position:-112px -32px}.ui-icon-arrow-2-n-s{background-position:-128px -32px}.ui-icon-arrow-2-ne-sw{background-position:-144px -32px}.ui-icon-arrow-2-e-w{background-position:-160px -32px}.ui-icon-arrow-2-se-nw{background-position:-176px -32px}.ui-icon-arrowstop-1-n{background-position:-192px -32px}.ui-icon-arrowstop-1-e{background-position:-208px -32px}.ui-icon-arrowstop-1-s{background-position:-224px -32px}.ui-icon-arrowstop-1-w{background-position:-240px -32px}.ui-icon-arrowthick-1-n{background-position:0 -48px}.ui-icon-arrowthick-1-ne{background-position:-16px -48px}.ui-icon-arrowthick-1-e{background-position:-32px -48px}.ui-icon-arrowthick-1-se{background-position:-48px -48px}.ui-icon-arrowthick-1-s{background-position:-64px -48px}.ui-icon-arrowthick-1-sw{background-position:-80px -48px}.ui-icon-arrowthick-1-w{background-position:-96px -48px}.ui-icon-arrowthick-1-nw{background-position:-112px -48px}.ui-icon-arrowthick-2-n-s{background-position:-128px -48px}.ui-icon-arrowthick-2-ne-sw{background-position:-144px -48px}.ui-icon-arrowthick-2-e-w{background-position:-160px -48px}.ui-icon-arrowthick-2-se-nw{background-position:-176px -48px}.ui-icon-arrowthickstop-1-n{background-position:-192px -48px}.ui-icon-arrowthickstop-1-e{background-position:-208px -48px}.ui-icon-arrowthickstop-1-s{background-position:-224px -48px}.ui-icon-arrowthickstop-1-w{background-position:-240px -48px}.ui-icon-arrowreturnthick-1-w{background-position:0 -64px}.ui-icon-arrowreturnthick-1-n{background-position:-16px -64px}.ui-icon-arrowreturnthick-1-e{background-position:-32px -64px}.ui-icon-arrowreturnthick-1-s{background-position:-48px -64px}.ui-icon-arrowreturn-1-w{background-position:-64px -64px}.ui-icon-arrowreturn-1-n{background-position:-80px -64px}.ui-icon-arrowreturn-1-e{background-position:-96px -64px}.ui-icon-arrowreturn-1-s{background-position:-112px -64px}.ui-icon-arrowrefresh-1-w{background-position:-128px -64px}.ui-icon-arrowrefresh-1-n{background-position:-144px -64px}.ui-icon-arrowrefresh-1-e{background-position:-160px -64px}.ui-icon-arrowrefresh-1-s{background-position:-176px -64px}.ui-icon-arrow-4{background-position:0 -80px}.ui-icon-arrow-4-diag{background-position:-16px -80px}.ui-icon-extlink{background-position:-32px -80px}.ui-icon-newwin{background-position:-48px -80px}.ui-icon-refresh{background-position:-64px -80px}.ui-icon-shuffle{background-position:-80px -80px}.ui-icon-transfer-e-w{background-position:-96px -80px}.ui-icon-transferthick-e-w{background-position:-112px -80px}.ui-icon-folder-collapsed{background-position:0 -96px}.ui-icon-folder-open{background-position:-16px -96px}.ui-icon-document{background-position:-32px -96px}.ui-icon-document-b{background-position:-48px -96px}.ui-icon-note{background-position:-64px -96px}.ui-icon-mail-closed{background-position:-80px -96px}.ui-icon-mail-open{background-position:-96px -96px}.ui-icon-suitcase{background-position:-112px -96px}.ui-icon-comment{background-position:-128px -96px}.ui-icon-person{background-position:-144px -96px}.ui-icon-print{background-position:-160px -96px}.ui-icon-trash{background-position:-176px -96px}.ui-icon-locked{background-position:-192px -96px}.ui-icon-unlocked{background-position:-208px -96px}.ui-icon-bookmark{background-position:-224px -96px}.ui-icon-tag{background-position:-240px -96px}.ui-icon-home{background-position:0 -112px}.ui-icon-flag{background-position:-16px -112px}.ui-icon-calendar{background-position:-32px -112px}.ui-icon-cart{background-position:-48px -112px}.ui-icon-pencil{background-position:-64px -112px}.ui-icon-clock{background-position:-80px -112px}.ui-icon-disk{background-position:-96px -112px}.ui-icon-calculator{background-position:-112px -112px}.ui-icon-zoomin{background-position:-128px -112px}.ui-icon-zoomout{background-position:-144px -112px}.ui-icon-search{background-position:-160px -112px}.ui-icon-wrench{background-position:-176px -112px}.ui-icon-gear{background-position:-192px -112px}.ui-icon-heart{background-position:-208px -112px}.ui-icon-star{background-position:-224px -112px}.ui-icon-link{background-position:-240px -112px}.ui-icon-cancel{background-position:0 -128px}.ui-icon-plus{background-position:-16px -128px}.ui-icon-plusthick{background-position:-32px -128px}.ui-icon-minus{background-position:-48px -128px}.ui-icon-minusthick{background-position:-64px -128px}.ui-icon-close{background-position:-80px -128px}.ui-icon-closethick{background-position:-96px -128px}.ui-icon-key{background-position:-112px -128px}.ui-icon-lightbulb{background-position:-128px -128px}.ui-icon-scissors{background-position:-144px -128px}.ui-icon-clipboard{background-position:-160px -128px}.ui-icon-copy{background-position:-176px -128px}.ui-icon-contact{background-position:-192px -128px}.ui-icon-image{background-position:-208px -128px}.ui-icon-video{background-position:-224px -128px}.ui-icon-script{background-position:-240px -128px}.ui-icon-alert{background-position:0 -144px}.ui-icon-info{background-position:-16px -144px}.ui-icon-notice{background-position:-32px -144px}.ui-icon-help{background-position:-48px -144px}.ui-icon-check{background-position:-64px -144px}.ui-icon-bullet{background-position:-80px -144px}.ui-icon-radio-on{background-position:-96px -144px}.ui-icon-radio-off{background-position:-112px -144px}.ui-icon-pin-w{background-position:-128px -144px}.ui-icon-pin-s{background-position:-144px -144px}.ui-icon-play{background-position:0 -160px}.ui-icon-pause{background-position:-16px -160px}.ui-icon-seek-next{background-position:-32px -160px}.ui-icon-seek-prev{background-position:-48px -160px}.ui-icon-seek-end{background-position:-64px -160px}.ui-icon-seek-start{background-position:-80px -160px}.ui-icon-seek-first{background-position:-80px -160px}.ui-icon-stop{background-position:-96px -160px}.ui-icon-eject{background-position:-112px -160px}.ui-icon-volume-off{background-position:-128px -160px}.ui-icon-volume-on{background-position:-144px -160px}.ui-icon-power{background-position:0 -176px}.ui-icon-signal-diag{background-position:-16px -176px}.ui-icon-signal{background-position:-32px -176px}.ui-icon-battery-0{background-position:-48px -176px}.ui-icon-battery-1{background-position:-64px -176px}.ui-icon-battery-2{background-position:-80px -176px}.ui-icon-battery-3{background-position:-96px -176px}.ui-icon-circle-plus{background-position:0 -192px}.ui-icon-circle-minus{background-position:-16px -192px}.ui-icon-circle-close{background-position:-32px -192px}.ui-icon-circle-triangle-e{background-position:-48px -192px}.ui-icon-circle-triangle-s{background-position:-64px -192px}.ui-icon-circle-triangle-w{background-position:-80px -192px}.ui-icon-circle-triangle-n{background-position:-96px -192px}.ui-icon-circle-arrow-e{background-position:-112px -192px}.ui-icon-circle-arrow-s{background-position:-128px -192px}.ui-icon-circle-arrow-w{background-position:-144px -192px}.ui-icon-circle-arrow-n{background-position:-160px -192px}.ui-icon-circle-zoomin{background-position:-176px -192px}.ui-icon-circle-zoomout{background-position:-192px -192px}.ui-icon-circle-check{background-position:-208px -192px}.ui-icon-circlesmall-plus{background-position:0 -208px}.ui-icon-circlesmall-minus{background-position:-16px -208px}.ui-icon-circlesmall-close{background-position:-32px -208px}.ui-icon-squaresmall-plus{background-position:-48px -208px}.ui-icon-squaresmall-minus{background-position:-64px -208px}.ui-icon-squaresmall-close{background-position:-80px -208px}.ui-icon-grip-dotted-vertical{background-position:0 -224px}.ui-icon-grip-dotted-horizontal{background-position:-16px -224px}.ui-icon-grip-solid-vertical{background-position:-32px -224px}.ui-icon-grip-solid-horizontal{background-position:-48px -224px}.ui-icon-gripsmall-diagonal-se{background-position:-64px -224px}.ui-icon-grip-diagonal-se{background-position:-80px -224px}.ui-corner-all,.ui-corner-top,.ui-corner-left,.ui-corner-tl{border-top-left-radius:4px}.ui-corner-all,.ui-corner-top,.ui-corner-right,.ui-corner-tr{border-top-right-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-left,.ui-corner-bl{border-bottom-left-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-right,.ui-corner-br{border-bottom-right-radius:4px}.ui-widget-overlay{background:#aaa;opacity:.3;filter:Alpha(Opacity=30)}.ui-widget-shadow{margin:-8px 0 0 -8px;padding:8px;background:#aaa;opacity:.3;filter:Alpha(Opacity=30);border-radius:8px}
(-)a/koha-tmpl/intranet-tmpl/lib/jquery/jquery-ui-1.11.4.min.js (-11 lines)
Lines 1-11 Link Here
1
/*! jQuery UI - v1.11.4 - 2016-02-22
2
* http://jqueryui.com
3
* Includes: core.js, widget.js, mouse.js, position.js, draggable.js, droppable.js, sortable.js, accordion.js, autocomplete.js, button.js, datepicker.js, menu.js, progressbar.js, slider.js, tabs.js, effect.js, effect-highlight.js
4
* Copyright jQuery Foundation and other contributors; Licensed MIT */
5
6
(function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e(jQuery)})(function(e){function t(t,s){var n,a,o,r=t.nodeName.toLowerCase();return"area"===r?(n=t.parentNode,a=n.name,t.href&&a&&"map"===n.nodeName.toLowerCase()?(o=e("img[usemap='#"+a+"']")[0],!!o&&i(o)):!1):(/^(input|select|textarea|button|object)$/.test(r)?!t.disabled:"a"===r?t.href||s:s)&&i(t)}function i(t){return e.expr.filters.visible(t)&&!e(t).parents().addBack().filter(function(){return"hidden"===e.css(this,"visibility")}).length}function s(e){for(var t,i;e.length&&e[0]!==document;){if(t=e.css("position"),("absolute"===t||"relative"===t||"fixed"===t)&&(i=parseInt(e.css("zIndex"),10),!isNaN(i)&&0!==i))return i;e=e.parent()}return 0}function n(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},e.extend(this._defaults,this.regional[""]),this.regional.en=e.extend(!0,{},this.regional[""]),this.regional["en-US"]=e.extend(!0,{},this.regional.en),this.dpDiv=a(e("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function a(t){var i="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return t.delegate(i,"mouseout",function(){e(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&e(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&e(this).removeClass("ui-datepicker-next-hover")}).delegate(i,"mouseover",o)}function o(){e.datepicker._isDisabledDatepicker(g.inline?g.dpDiv.parent()[0]:g.input[0])||(e(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),e(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&e(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&e(this).addClass("ui-datepicker-next-hover"))}function r(t,i){e.extend(t,i);for(var s in i)null==i[s]&&(t[s]=i[s]);return t}e.ui=e.ui||{},e.extend(e.ui,{version:"1.11.4",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),e.fn.extend({scrollParent:function(t){var i=this.css("position"),s="absolute"===i,n=t?/(auto|scroll|hidden)/:/(auto|scroll)/,a=this.parents().filter(function(){var t=e(this);return s&&"static"===t.css("position")?!1:n.test(t.css("overflow")+t.css("overflow-y")+t.css("overflow-x"))}).eq(0);return"fixed"!==i&&a.length?a:e(this[0].ownerDocument||document)},uniqueId:function(){var e=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++e)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&e(this).removeAttr("id")})}}),e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(i){return!!e.data(i,t)}}):function(t,i,s){return!!e.data(t,s[3])},focusable:function(i){return t(i,!isNaN(e.attr(i,"tabindex")))},tabbable:function(i){var s=e.attr(i,"tabindex"),n=isNaN(s);return(n||s>=0)&&t(i,!n)}}),e("<a>").outerWidth(1).jquery||e.each(["Width","Height"],function(t,i){function s(t,i,s,a){return e.each(n,function(){i-=parseFloat(e.css(t,"padding"+this))||0,s&&(i-=parseFloat(e.css(t,"border"+this+"Width"))||0),a&&(i-=parseFloat(e.css(t,"margin"+this))||0)}),i}var n="Width"===i?["Left","Right"]:["Top","Bottom"],a=i.toLowerCase(),o={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn["inner"+i]=function(t){return void 0===t?o["inner"+i].call(this):this.each(function(){e(this).css(a,s(this,t)+"px")})},e.fn["outer"+i]=function(t,n){return"number"!=typeof t?o["outer"+i].call(this,t):this.each(function(){e(this).css(a,s(this,t,!0,n)+"px")})}}),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(e.fn.removeData=function(t){return function(i){return arguments.length?t.call(this,e.camelCase(i)):t.call(this)}}(e.fn.removeData)),e.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),e.fn.extend({focus:function(t){return function(i,s){return"number"==typeof i?this.each(function(){var t=this;setTimeout(function(){e(t).focus(),s&&s.call(t)},i)}):t.apply(this,arguments)}}(e.fn.focus),disableSelection:function(){var e="onselectstart"in document.createElement("div")?"selectstart":"mousedown";return function(){return this.bind(e+".ui-disableSelection",function(e){e.preventDefault()})}}(),enableSelection:function(){return this.unbind(".ui-disableSelection")},zIndex:function(t){if(void 0!==t)return this.css("zIndex",t);if(this.length)for(var i,s,n=e(this[0]);n.length&&n[0]!==document;){if(i=n.css("position"),("absolute"===i||"relative"===i||"fixed"===i)&&(s=parseInt(n.css("zIndex"),10),!isNaN(s)&&0!==s))return s;n=n.parent()}return 0}}),e.ui.plugin={add:function(t,i,s){var n,a=e.ui[t].prototype;for(n in s)a.plugins[n]=a.plugins[n]||[],a.plugins[n].push([i,s[n]])},call:function(e,t,i,s){var n,a=e.plugins[t];if(a&&(s||e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType))for(n=0;a.length>n;n++)e.options[a[n][0]]&&a[n][1].apply(e.element,i)}};var h=0,l=Array.prototype.slice;e.cleanData=function(t){return function(i){var s,n,a;for(a=0;null!=(n=i[a]);a++)try{s=e._data(n,"events"),s&&s.remove&&e(n).triggerHandler("remove")}catch(o){}t(i)}}(e.cleanData),e.widget=function(t,i,s){var n,a,o,r,h={},l=t.split(".")[0];return t=t.split(".")[1],n=l+"-"+t,s||(s=i,i=e.Widget),e.expr[":"][n.toLowerCase()]=function(t){return!!e.data(t,n)},e[l]=e[l]||{},a=e[l][t],o=e[l][t]=function(e,t){return this._createWidget?(arguments.length&&this._createWidget(e,t),void 0):new o(e,t)},e.extend(o,a,{version:s.version,_proto:e.extend({},s),_childConstructors:[]}),r=new i,r.options=e.widget.extend({},r.options),e.each(s,function(t,s){return e.isFunction(s)?(h[t]=function(){var e=function(){return i.prototype[t].apply(this,arguments)},n=function(e){return i.prototype[t].apply(this,e)};return function(){var t,i=this._super,a=this._superApply;return this._super=e,this._superApply=n,t=s.apply(this,arguments),this._super=i,this._superApply=a,t}}(),void 0):(h[t]=s,void 0)}),o.prototype=e.widget.extend(r,{widgetEventPrefix:a?r.widgetEventPrefix||t:t},h,{constructor:o,namespace:l,widgetName:t,widgetFullName:n}),a?(e.each(a._childConstructors,function(t,i){var s=i.prototype;e.widget(s.namespace+"."+s.widgetName,o,i._proto)}),delete a._childConstructors):i._childConstructors.push(o),e.widget.bridge(t,o),o},e.widget.extend=function(t){for(var i,s,n=l.call(arguments,1),a=0,o=n.length;o>a;a++)for(i in n[a])s=n[a][i],n[a].hasOwnProperty(i)&&void 0!==s&&(t[i]=e.isPlainObject(s)?e.isPlainObject(t[i])?e.widget.extend({},t[i],s):e.widget.extend({},s):s);return t},e.widget.bridge=function(t,i){var s=i.prototype.widgetFullName||t;e.fn[t]=function(n){var a="string"==typeof n,o=l.call(arguments,1),r=this;return a?this.each(function(){var i,a=e.data(this,s);return"instance"===n?(r=a,!1):a?e.isFunction(a[n])&&"_"!==n.charAt(0)?(i=a[n].apply(a,o),i!==a&&void 0!==i?(r=i&&i.jquery?r.pushStack(i.get()):i,!1):void 0):e.error("no such method '"+n+"' for "+t+" widget instance"):e.error("cannot call methods on "+t+" prior to initialization; "+"attempted to call method '"+n+"'")}):(o.length&&(n=e.widget.extend.apply(null,[n].concat(o))),this.each(function(){var t=e.data(this,s);t?(t.option(n||{}),t._init&&t._init()):e.data(this,s,new i(n,this))})),r}},e.Widget=function(){},e.Widget._childConstructors=[],e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(t,i){i=e(i||this.defaultElement||this)[0],this.element=e(i),this.uuid=h++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=e(),this.hoverable=e(),this.focusable=e(),i!==this&&(e.data(i,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===i&&this.destroy()}}),this.document=e(i.style?i.ownerDocument:i.document||i),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this.options=e.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:e.noop,_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetFullName).removeData(e.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled "+"ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:e.noop,widget:function(){return this.element},option:function(t,i){var s,n,a,o=t;if(0===arguments.length)return e.widget.extend({},this.options);if("string"==typeof t)if(o={},s=t.split("."),t=s.shift(),s.length){for(n=o[t]=e.widget.extend({},this.options[t]),a=0;s.length-1>a;a++)n[s[a]]=n[s[a]]||{},n=n[s[a]];if(t=s.pop(),1===arguments.length)return void 0===n[t]?null:n[t];n[t]=i}else{if(1===arguments.length)return void 0===this.options[t]?null:this.options[t];o[t]=i}return this._setOptions(o),this},_setOptions:function(e){var t;for(t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){return this.options[e]=t,"disabled"===e&&(this.widget().toggleClass(this.widgetFullName+"-disabled",!!t),t&&(this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus"))),this},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_on:function(t,i,s){var n,a=this;"boolean"!=typeof t&&(s=i,i=t,t=!1),s?(i=n=e(i),this.bindings=this.bindings.add(i)):(s=i,i=this.element,n=this.widget()),e.each(s,function(s,o){function r(){return t||a.options.disabled!==!0&&!e(this).hasClass("ui-state-disabled")?("string"==typeof o?a[o]:o).apply(a,arguments):void 0}"string"!=typeof o&&(r.guid=o.guid=o.guid||r.guid||e.guid++);var h=s.match(/^([\w:-]*)\s*(.*)$/),l=h[1]+a.eventNamespace,u=h[2];u?n.delegate(u,l,r):i.bind(l,r)})},_off:function(t,i){i=(i||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.unbind(i).undelegate(i),this.bindings=e(this.bindings.not(t).get()),this.focusable=e(this.focusable.not(t).get()),this.hoverable=e(this.hoverable.not(t).get())},_delay:function(e,t){function i(){return("string"==typeof e?s[e]:e).apply(s,arguments)}var s=this;return setTimeout(i,t||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){e(t.currentTarget).addClass("ui-state-hover")},mouseleave:function(t){e(t.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){e(t.currentTarget).addClass("ui-state-focus")},focusout:function(t){e(t.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(t,i,s){var n,a,o=this.options[t];if(s=s||{},i=e.Event(i),i.type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),i.target=this.element[0],a=i.originalEvent)for(n in a)n in i||(i[n]=a[n]);return this.element.trigger(i,s),!(e.isFunction(o)&&o.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},e.each({show:"fadeIn",hide:"fadeOut"},function(t,i){e.Widget.prototype["_"+t]=function(s,n,a){"string"==typeof n&&(n={effect:n});var o,r=n?n===!0||"number"==typeof n?i:n.effect||i:t;n=n||{},"number"==typeof n&&(n={duration:n}),o=!e.isEmptyObject(n),n.complete=a,n.delay&&s.delay(n.delay),o&&e.effects&&e.effects.effect[r]?s[t](n):r!==t&&s[r]?s[r](n.duration,n.easing,a):s.queue(function(i){e(this)[t](),a&&a.call(s[0]),i()})}}),e.widget;var u=!1;e(document).mouseup(function(){u=!1}),e.widget("ui.mouse",{version:"1.11.4",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.bind("mousedown."+this.widgetName,function(e){return t._mouseDown(e)}).bind("click."+this.widgetName,function(i){return!0===e.data(i.target,t.widgetName+".preventClickEvent")?(e.removeData(i.target,t.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):void 0}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(t){if(!u){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(t),this._mouseDownEvent=t;var i=this,s=1===t.which,n="string"==typeof this.options.cancel&&t.target.nodeName?e(t.target).closest(this.options.cancel).length:!1;return s&&!n&&this._mouseCapture(t)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){i.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(t)!==!1,!this._mouseStarted)?(t.preventDefault(),!0):(!0===e.data(t.target,this.widgetName+".preventClickEvent")&&e.removeData(t.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(e){return i._mouseMove(e)},this._mouseUpDelegate=function(e){return i._mouseUp(e)},this.document.bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),t.preventDefault(),u=!0,!0)):!0}},_mouseMove:function(t){if(this._mouseMoved){if(e.ui.ie&&(!document.documentMode||9>document.documentMode)&&!t.button)return this._mouseUp(t);if(!t.which)return this._mouseUp(t)}return(t.which||t.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,t)!==!1,this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted)},_mouseUp:function(t){return this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&e.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t)),u=!1,!1},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),function(){function t(e,t,i){return[parseFloat(e[0])*(p.test(e[0])?t/100:1),parseFloat(e[1])*(p.test(e[1])?i/100:1)]}function i(t,i){return parseInt(e.css(t,i),10)||0}function s(t){var i=t[0];return 9===i.nodeType?{width:t.width(),height:t.height(),offset:{top:0,left:0}}:e.isWindow(i)?{width:t.width(),height:t.height(),offset:{top:t.scrollTop(),left:t.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:t.outerWidth(),height:t.outerHeight(),offset:t.offset()}}e.ui=e.ui||{};var n,a,o=Math.max,r=Math.abs,h=Math.round,l=/left|center|right/,u=/top|center|bottom/,c=/[\+\-]\d+(\.[\d]+)?%?/,d=/^\w+/,p=/%$/,f=e.fn.position;e.position={scrollbarWidth:function(){if(void 0!==n)return n;var t,i,s=e("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),a=s.children()[0];return e("body").append(s),t=a.offsetWidth,s.css("overflow","scroll"),i=a.offsetWidth,t===i&&(i=s[0].clientWidth),s.remove(),n=t-i},getScrollInfo:function(t){var i=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),s=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),n="scroll"===i||"auto"===i&&t.width<t.element[0].scrollWidth,a="scroll"===s||"auto"===s&&t.height<t.element[0].scrollHeight;return{width:a?e.position.scrollbarWidth():0,height:n?e.position.scrollbarWidth():0}},getWithinInfo:function(t){var i=e(t||window),s=e.isWindow(i[0]),n=!!i[0]&&9===i[0].nodeType;return{element:i,isWindow:s,isDocument:n,offset:i.offset()||{left:0,top:0},scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:s||n?i.width():i.outerWidth(),height:s||n?i.height():i.outerHeight()}}},e.fn.position=function(n){if(!n||!n.of)return f.apply(this,arguments);n=e.extend({},n);var p,m,g,v,_,b,y=e(n.of),x=e.position.getWithinInfo(n.within),w=e.position.getScrollInfo(x),k=(n.collision||"flip").split(" "),D={};return b=s(y),y[0].preventDefault&&(n.at="left top"),m=b.width,g=b.height,v=b.offset,_=e.extend({},v),e.each(["my","at"],function(){var e,t,i=(n[this]||"").split(" ");1===i.length&&(i=l.test(i[0])?i.concat(["center"]):u.test(i[0])?["center"].concat(i):["center","center"]),i[0]=l.test(i[0])?i[0]:"center",i[1]=u.test(i[1])?i[1]:"center",e=c.exec(i[0]),t=c.exec(i[1]),D[this]=[e?e[0]:0,t?t[0]:0],n[this]=[d.exec(i[0])[0],d.exec(i[1])[0]]}),1===k.length&&(k[1]=k[0]),"right"===n.at[0]?_.left+=m:"center"===n.at[0]&&(_.left+=m/2),"bottom"===n.at[1]?_.top+=g:"center"===n.at[1]&&(_.top+=g/2),p=t(D.at,m,g),_.left+=p[0],_.top+=p[1],this.each(function(){var s,l,u=e(this),c=u.outerWidth(),d=u.outerHeight(),f=i(this,"marginLeft"),b=i(this,"marginTop"),T=c+f+i(this,"marginRight")+w.width,S=d+b+i(this,"marginBottom")+w.height,M=e.extend({},_),N=t(D.my,u.outerWidth(),u.outerHeight());"right"===n.my[0]?M.left-=c:"center"===n.my[0]&&(M.left-=c/2),"bottom"===n.my[1]?M.top-=d:"center"===n.my[1]&&(M.top-=d/2),M.left+=N[0],M.top+=N[1],a||(M.left=h(M.left),M.top=h(M.top)),s={marginLeft:f,marginTop:b},e.each(["left","top"],function(t,i){e.ui.position[k[t]]&&e.ui.position[k[t]][i](M,{targetWidth:m,targetHeight:g,elemWidth:c,elemHeight:d,collisionPosition:s,collisionWidth:T,collisionHeight:S,offset:[p[0]+N[0],p[1]+N[1]],my:n.my,at:n.at,within:x,elem:u})}),n.using&&(l=function(e){var t=v.left-M.left,i=t+m-c,s=v.top-M.top,a=s+g-d,h={target:{element:y,left:v.left,top:v.top,width:m,height:g},element:{element:u,left:M.left,top:M.top,width:c,height:d},horizontal:0>i?"left":t>0?"right":"center",vertical:0>a?"top":s>0?"bottom":"middle"};c>m&&m>r(t+i)&&(h.horizontal="center"),d>g&&g>r(s+a)&&(h.vertical="middle"),h.important=o(r(t),r(i))>o(r(s),r(a))?"horizontal":"vertical",n.using.call(this,e,h)}),u.offset(e.extend(M,{using:l}))})},e.ui.position={fit:{left:function(e,t){var i,s=t.within,n=s.isWindow?s.scrollLeft:s.offset.left,a=s.width,r=e.left-t.collisionPosition.marginLeft,h=n-r,l=r+t.collisionWidth-a-n;t.collisionWidth>a?h>0&&0>=l?(i=e.left+h+t.collisionWidth-a-n,e.left+=h-i):e.left=l>0&&0>=h?n:h>l?n+a-t.collisionWidth:n:h>0?e.left+=h:l>0?e.left-=l:e.left=o(e.left-r,e.left)},top:function(e,t){var i,s=t.within,n=s.isWindow?s.scrollTop:s.offset.top,a=t.within.height,r=e.top-t.collisionPosition.marginTop,h=n-r,l=r+t.collisionHeight-a-n;t.collisionHeight>a?h>0&&0>=l?(i=e.top+h+t.collisionHeight-a-n,e.top+=h-i):e.top=l>0&&0>=h?n:h>l?n+a-t.collisionHeight:n:h>0?e.top+=h:l>0?e.top-=l:e.top=o(e.top-r,e.top)}},flip:{left:function(e,t){var i,s,n=t.within,a=n.offset.left+n.scrollLeft,o=n.width,h=n.isWindow?n.scrollLeft:n.offset.left,l=e.left-t.collisionPosition.marginLeft,u=l-h,c=l+t.collisionWidth-o-h,d="left"===t.my[0]?-t.elemWidth:"right"===t.my[0]?t.elemWidth:0,p="left"===t.at[0]?t.targetWidth:"right"===t.at[0]?-t.targetWidth:0,f=-2*t.offset[0];0>u?(i=e.left+d+p+f+t.collisionWidth-o-a,(0>i||r(u)>i)&&(e.left+=d+p+f)):c>0&&(s=e.left-t.collisionPosition.marginLeft+d+p+f-h,(s>0||c>r(s))&&(e.left+=d+p+f))},top:function(e,t){var i,s,n=t.within,a=n.offset.top+n.scrollTop,o=n.height,h=n.isWindow?n.scrollTop:n.offset.top,l=e.top-t.collisionPosition.marginTop,u=l-h,c=l+t.collisionHeight-o-h,d="top"===t.my[1],p=d?-t.elemHeight:"bottom"===t.my[1]?t.elemHeight:0,f="top"===t.at[1]?t.targetHeight:"bottom"===t.at[1]?-t.targetHeight:0,m=-2*t.offset[1];0>u?(s=e.top+p+f+m+t.collisionHeight-o-a,(0>s||r(u)>s)&&(e.top+=p+f+m)):c>0&&(i=e.top-t.collisionPosition.marginTop+p+f+m-h,(i>0||c>r(i))&&(e.top+=p+f+m))}},flipfit:{left:function(){e.ui.position.flip.left.apply(this,arguments),e.ui.position.fit.left.apply(this,arguments)},top:function(){e.ui.position.flip.top.apply(this,arguments),e.ui.position.fit.top.apply(this,arguments)}}},function(){var t,i,s,n,o,r=document.getElementsByTagName("body")[0],h=document.createElement("div");t=document.createElement(r?"div":"body"),s={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},r&&e.extend(s,{position:"absolute",left:"-1000px",top:"-1000px"});for(o in s)t.style[o]=s[o];t.appendChild(h),i=r||document.documentElement,i.insertBefore(t,i.firstChild),h.style.cssText="position: absolute; left: 10.7432222px;",n=e(h).offset().left,a=n>10&&11>n,t.innerHTML="",i.removeChild(t)}()}(),e.ui.position,e.widget("ui.draggable",e.ui.mouse,{version:"1.11.4",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"===this.options.helper&&this._setPositionRelative(),this.options.addClasses&&this.element.addClass("ui-draggable"),this.options.disabled&&this.element.addClass("ui-draggable-disabled"),this._setHandleClassName(),this._mouseInit()},_setOption:function(e,t){this._super(e,t),"handle"===e&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){return(this.helper||this.element).is(".ui-draggable-dragging")?(this.destroyOnClear=!0,void 0):(this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._removeHandleClassName(),this._mouseDestroy(),void 0)},_mouseCapture:function(t){var i=this.options;return this._blurActiveElement(t),this.helper||i.disabled||e(t.target).closest(".ui-resizable-handle").length>0?!1:(this.handle=this._getHandle(t),this.handle?(this._blockFrames(i.iframeFix===!0?"iframe":i.iframeFix),!0):!1)},_blockFrames:function(t){this.iframeBlocks=this.document.find(t).map(function(){var t=e(this);return e("<div>").css("position","absolute").appendTo(t.parent()).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()).offset(t.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(t){var i=this.document[0];if(this.handleElement.is(t.target))try{i.activeElement&&"body"!==i.activeElement.nodeName.toLowerCase()&&e(i.activeElement).blur()}catch(s){}},_mouseStart:function(t){var i=this.options;return this.helper=this._createHelper(t),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),e.ui.ddmanager&&(e.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=this.helper.parents().filter(function(){return"fixed"===e(this).css("position")}).length>0,this.positionAbs=this.element.offset(),this._refreshOffsets(t),this.originalPosition=this.position=this._generatePosition(t,!1),this.originalPageX=t.pageX,this.originalPageY=t.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),this._setContainment(),this._trigger("start",t)===!1?(this._clear(),!1):(this._cacheHelperProportions(),e.ui.ddmanager&&!i.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this._normalizeRightBottom(),this._mouseDrag(t,!0),e.ui.ddmanager&&e.ui.ddmanager.dragStart(this,t),!0)},_refreshOffsets:function(e){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:!1,parent:this._getParentOffset(),relative:this._getRelativeOffset()},this.offset.click={left:e.pageX-this.offset.left,top:e.pageY-this.offset.top}},_mouseDrag:function(t,i){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(t,!0),this.positionAbs=this._convertPositionTo("absolute"),!i){var s=this._uiHash();if(this._trigger("drag",t,s)===!1)return this._mouseUp({}),!1;this.position=s.position}return this.helper[0].style.left=this.position.left+"px",this.helper[0].style.top=this.position.top+"px",e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),!1},_mouseStop:function(t){var i=this,s=!1;return e.ui.ddmanager&&!this.options.dropBehaviour&&(s=e.ui.ddmanager.drop(this,t)),this.dropped&&(s=this.dropped,this.dropped=!1),"invalid"===this.options.revert&&!s||"valid"===this.options.revert&&s||this.options.revert===!0||e.isFunction(this.options.revert)&&this.options.revert.call(this.element,s)?e(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){i._trigger("stop",t)!==!1&&i._clear()}):this._trigger("stop",t)!==!1&&this._clear(),!1},_mouseUp:function(t){return this._unblockFrames(),e.ui.ddmanager&&e.ui.ddmanager.dragStop(this,t),this.handleElement.is(t.target)&&this.element.focus(),e.ui.mouse.prototype._mouseUp.call(this,t)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(t){return this.options.handle?!!e(t.target).closest(this.element.find(this.options.handle)).length:!0},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element,this.handleElement.addClass("ui-draggable-handle")},_removeHandleClassName:function(){this.handleElement.removeClass("ui-draggable-handle")},_createHelper:function(t){var i=this.options,s=e.isFunction(i.helper),n=s?e(i.helper.apply(this.element[0],[t])):"clone"===i.helper?this.element.clone().removeAttr("id"):this.element;return n.parents("body").length||n.appendTo("parent"===i.appendTo?this.element[0].parentNode:i.appendTo),s&&n[0]===this.element[0]&&this._setPositionRelative(),n[0]===this.element[0]||/(fixed|absolute)/.test(n.css("position"))||n.css("position","absolute"),n},_setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative")},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),e.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_isRootNode:function(e){return/(html|body)/i.test(e.tagName)||e===this.document[0]},_getParentOffset:function(){var t=this.offsetParent.offset(),i=this.document[0];return"absolute"===this.cssPosition&&this.scrollParent[0]!==i&&e.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),this._isRootNode(this.offsetParent[0])&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var e=this.element.position(),t=this._isRootNode(this.scrollParent[0]);return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+(t?0:this.scrollParent.scrollTop()),left:e.left-(parseInt(this.helper.css("left"),10)||0)+(t?0:this.scrollParent.scrollLeft())}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,i,s,n=this.options,a=this.document[0];return this.relativeContainer=null,n.containment?"window"===n.containment?(this.containment=[e(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,e(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,e(window).scrollLeft()+e(window).width()-this.helperProportions.width-this.margins.left,e(window).scrollTop()+(e(window).height()||a.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],void 0):"document"===n.containment?(this.containment=[0,0,e(a).width()-this.helperProportions.width-this.margins.left,(e(a).height()||a.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],void 0):n.containment.constructor===Array?(this.containment=n.containment,void 0):("parent"===n.containment&&(n.containment=this.helper[0].parentNode),i=e(n.containment),s=i[0],s&&(t=/(scroll|auto)/.test(i.css("overflow")),this.containment=[(parseInt(i.css("borderLeftWidth"),10)||0)+(parseInt(i.css("paddingLeft"),10)||0),(parseInt(i.css("borderTopWidth"),10)||0)+(parseInt(i.css("paddingTop"),10)||0),(t?Math.max(s.scrollWidth,s.offsetWidth):s.offsetWidth)-(parseInt(i.css("borderRightWidth"),10)||0)-(parseInt(i.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(t?Math.max(s.scrollHeight,s.offsetHeight):s.offsetHeight)-(parseInt(i.css("borderBottomWidth"),10)||0)-(parseInt(i.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=i),void 0):(this.containment=null,void 0)},_convertPositionTo:function(e,t){t||(t=this.position);var i="absolute"===e?1:-1,s=this._isRootNode(this.scrollParent[0]);return{top:t.top+this.offset.relative.top*i+this.offset.parent.top*i-("fixed"===this.cssPosition?-this.offset.scroll.top:s?0:this.offset.scroll.top)*i,left:t.left+this.offset.relative.left*i+this.offset.parent.left*i-("fixed"===this.cssPosition?-this.offset.scroll.left:s?0:this.offset.scroll.left)*i}},_generatePosition:function(e,t){var i,s,n,a,o=this.options,r=this._isRootNode(this.scrollParent[0]),h=e.pageX,l=e.pageY;return r&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),t&&(this.containment&&(this.relativeContainer?(s=this.relativeContainer.offset(),i=[this.containment[0]+s.left,this.containment[1]+s.top,this.containment[2]+s.left,this.containment[3]+s.top]):i=this.containment,e.pageX-this.offset.click.left<i[0]&&(h=i[0]+this.offset.click.left),e.pageY-this.offset.click.top<i[1]&&(l=i[1]+this.offset.click.top),e.pageX-this.offset.click.left>i[2]&&(h=i[2]+this.offset.click.left),e.pageY-this.offset.click.top>i[3]&&(l=i[3]+this.offset.click.top)),o.grid&&(n=o.grid[1]?this.originalPageY+Math.round((l-this.originalPageY)/o.grid[1])*o.grid[1]:this.originalPageY,l=i?n-this.offset.click.top>=i[1]||n-this.offset.click.top>i[3]?n:n-this.offset.click.top>=i[1]?n-o.grid[1]:n+o.grid[1]:n,a=o.grid[0]?this.originalPageX+Math.round((h-this.originalPageX)/o.grid[0])*o.grid[0]:this.originalPageX,h=i?a-this.offset.click.left>=i[0]||a-this.offset.click.left>i[2]?a:a-this.offset.click.left>=i[0]?a-o.grid[0]:a+o.grid[0]:a),"y"===o.axis&&(h=this.originalPageX),"x"===o.axis&&(l=this.originalPageY)),{top:l-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:r?0:this.offset.scroll.top),left:h-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:r?0:this.offset.scroll.left)}
7
},_clear:function(){this.helper.removeClass("ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_normalizeRightBottom:function(){"y"!==this.options.axis&&"auto"!==this.helper.css("right")&&(this.helper.width(this.helper.width()),this.helper.css("right","auto")),"x"!==this.options.axis&&"auto"!==this.helper.css("bottom")&&(this.helper.height(this.helper.height()),this.helper.css("bottom","auto"))},_trigger:function(t,i,s){return s=s||this._uiHash(),e.ui.plugin.call(this,t,[i,s,this],!0),/^(drag|start|stop)/.test(t)&&(this.positionAbs=this._convertPositionTo("absolute"),s.offset=this.positionAbs),e.Widget.prototype._trigger.call(this,t,i,s)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),e.ui.plugin.add("draggable","connectToSortable",{start:function(t,i,s){var n=e.extend({},i,{item:s.element});s.sortables=[],e(s.options.connectToSortable).each(function(){var i=e(this).sortable("instance");i&&!i.options.disabled&&(s.sortables.push(i),i.refreshPositions(),i._trigger("activate",t,n))})},stop:function(t,i,s){var n=e.extend({},i,{item:s.element});s.cancelHelperRemoval=!1,e.each(s.sortables,function(){var e=this;e.isOver?(e.isOver=0,s.cancelHelperRemoval=!0,e.cancelHelperRemoval=!1,e._storedCSS={position:e.placeholder.css("position"),top:e.placeholder.css("top"),left:e.placeholder.css("left")},e._mouseStop(t),e.options.helper=e.options._helper):(e.cancelHelperRemoval=!0,e._trigger("deactivate",t,n))})},drag:function(t,i,s){e.each(s.sortables,function(){var n=!1,a=this;a.positionAbs=s.positionAbs,a.helperProportions=s.helperProportions,a.offset.click=s.offset.click,a._intersectsWith(a.containerCache)&&(n=!0,e.each(s.sortables,function(){return this.positionAbs=s.positionAbs,this.helperProportions=s.helperProportions,this.offset.click=s.offset.click,this!==a&&this._intersectsWith(this.containerCache)&&e.contains(a.element[0],this.element[0])&&(n=!1),n})),n?(a.isOver||(a.isOver=1,s._parent=i.helper.parent(),a.currentItem=i.helper.appendTo(a.element).data("ui-sortable-item",!0),a.options._helper=a.options.helper,a.options.helper=function(){return i.helper[0]},t.target=a.currentItem[0],a._mouseCapture(t,!0),a._mouseStart(t,!0,!0),a.offset.click.top=s.offset.click.top,a.offset.click.left=s.offset.click.left,a.offset.parent.left-=s.offset.parent.left-a.offset.parent.left,a.offset.parent.top-=s.offset.parent.top-a.offset.parent.top,s._trigger("toSortable",t),s.dropped=a.element,e.each(s.sortables,function(){this.refreshPositions()}),s.currentItem=s.element,a.fromOutside=s),a.currentItem&&(a._mouseDrag(t),i.position=a.position)):a.isOver&&(a.isOver=0,a.cancelHelperRemoval=!0,a.options._revert=a.options.revert,a.options.revert=!1,a._trigger("out",t,a._uiHash(a)),a._mouseStop(t,!0),a.options.revert=a.options._revert,a.options.helper=a.options._helper,a.placeholder&&a.placeholder.remove(),i.helper.appendTo(s._parent),s._refreshOffsets(t),i.position=s._generatePosition(t,!0),s._trigger("fromSortable",t),s.dropped=!1,e.each(s.sortables,function(){this.refreshPositions()}))})}}),e.ui.plugin.add("draggable","cursor",{start:function(t,i,s){var n=e("body"),a=s.options;n.css("cursor")&&(a._cursor=n.css("cursor")),n.css("cursor",a.cursor)},stop:function(t,i,s){var n=s.options;n._cursor&&e("body").css("cursor",n._cursor)}}),e.ui.plugin.add("draggable","opacity",{start:function(t,i,s){var n=e(i.helper),a=s.options;n.css("opacity")&&(a._opacity=n.css("opacity")),n.css("opacity",a.opacity)},stop:function(t,i,s){var n=s.options;n._opacity&&e(i.helper).css("opacity",n._opacity)}}),e.ui.plugin.add("draggable","scroll",{start:function(e,t,i){i.scrollParentNotHidden||(i.scrollParentNotHidden=i.helper.scrollParent(!1)),i.scrollParentNotHidden[0]!==i.document[0]&&"HTML"!==i.scrollParentNotHidden[0].tagName&&(i.overflowOffset=i.scrollParentNotHidden.offset())},drag:function(t,i,s){var n=s.options,a=!1,o=s.scrollParentNotHidden[0],r=s.document[0];o!==r&&"HTML"!==o.tagName?(n.axis&&"x"===n.axis||(s.overflowOffset.top+o.offsetHeight-t.pageY<n.scrollSensitivity?o.scrollTop=a=o.scrollTop+n.scrollSpeed:t.pageY-s.overflowOffset.top<n.scrollSensitivity&&(o.scrollTop=a=o.scrollTop-n.scrollSpeed)),n.axis&&"y"===n.axis||(s.overflowOffset.left+o.offsetWidth-t.pageX<n.scrollSensitivity?o.scrollLeft=a=o.scrollLeft+n.scrollSpeed:t.pageX-s.overflowOffset.left<n.scrollSensitivity&&(o.scrollLeft=a=o.scrollLeft-n.scrollSpeed))):(n.axis&&"x"===n.axis||(t.pageY-e(r).scrollTop()<n.scrollSensitivity?a=e(r).scrollTop(e(r).scrollTop()-n.scrollSpeed):e(window).height()-(t.pageY-e(r).scrollTop())<n.scrollSensitivity&&(a=e(r).scrollTop(e(r).scrollTop()+n.scrollSpeed))),n.axis&&"y"===n.axis||(t.pageX-e(r).scrollLeft()<n.scrollSensitivity?a=e(r).scrollLeft(e(r).scrollLeft()-n.scrollSpeed):e(window).width()-(t.pageX-e(r).scrollLeft())<n.scrollSensitivity&&(a=e(r).scrollLeft(e(r).scrollLeft()+n.scrollSpeed)))),a!==!1&&e.ui.ddmanager&&!n.dropBehaviour&&e.ui.ddmanager.prepareOffsets(s,t)}}),e.ui.plugin.add("draggable","snap",{start:function(t,i,s){var n=s.options;s.snapElements=[],e(n.snap.constructor!==String?n.snap.items||":data(ui-draggable)":n.snap).each(function(){var t=e(this),i=t.offset();this!==s.element[0]&&s.snapElements.push({item:this,width:t.outerWidth(),height:t.outerHeight(),top:i.top,left:i.left})})},drag:function(t,i,s){var n,a,o,r,h,l,u,c,d,p,f=s.options,m=f.snapTolerance,g=i.offset.left,v=g+s.helperProportions.width,_=i.offset.top,b=_+s.helperProportions.height;for(d=s.snapElements.length-1;d>=0;d--)h=s.snapElements[d].left-s.margins.left,l=h+s.snapElements[d].width,u=s.snapElements[d].top-s.margins.top,c=u+s.snapElements[d].height,h-m>v||g>l+m||u-m>b||_>c+m||!e.contains(s.snapElements[d].item.ownerDocument,s.snapElements[d].item)?(s.snapElements[d].snapping&&s.options.snap.release&&s.options.snap.release.call(s.element,t,e.extend(s._uiHash(),{snapItem:s.snapElements[d].item})),s.snapElements[d].snapping=!1):("inner"!==f.snapMode&&(n=m>=Math.abs(u-b),a=m>=Math.abs(c-_),o=m>=Math.abs(h-v),r=m>=Math.abs(l-g),n&&(i.position.top=s._convertPositionTo("relative",{top:u-s.helperProportions.height,left:0}).top),a&&(i.position.top=s._convertPositionTo("relative",{top:c,left:0}).top),o&&(i.position.left=s._convertPositionTo("relative",{top:0,left:h-s.helperProportions.width}).left),r&&(i.position.left=s._convertPositionTo("relative",{top:0,left:l}).left)),p=n||a||o||r,"outer"!==f.snapMode&&(n=m>=Math.abs(u-_),a=m>=Math.abs(c-b),o=m>=Math.abs(h-g),r=m>=Math.abs(l-v),n&&(i.position.top=s._convertPositionTo("relative",{top:u,left:0}).top),a&&(i.position.top=s._convertPositionTo("relative",{top:c-s.helperProportions.height,left:0}).top),o&&(i.position.left=s._convertPositionTo("relative",{top:0,left:h}).left),r&&(i.position.left=s._convertPositionTo("relative",{top:0,left:l-s.helperProportions.width}).left)),!s.snapElements[d].snapping&&(n||a||o||r||p)&&s.options.snap.snap&&s.options.snap.snap.call(s.element,t,e.extend(s._uiHash(),{snapItem:s.snapElements[d].item})),s.snapElements[d].snapping=n||a||o||r||p)}}),e.ui.plugin.add("draggable","stack",{start:function(t,i,s){var n,a=s.options,o=e.makeArray(e(a.stack)).sort(function(t,i){return(parseInt(e(t).css("zIndex"),10)||0)-(parseInt(e(i).css("zIndex"),10)||0)});o.length&&(n=parseInt(e(o[0]).css("zIndex"),10)||0,e(o).each(function(t){e(this).css("zIndex",n+t)}),this.css("zIndex",n+o.length))}}),e.ui.plugin.add("draggable","zIndex",{start:function(t,i,s){var n=e(i.helper),a=s.options;n.css("zIndex")&&(a._zIndex=n.css("zIndex")),n.css("zIndex",a.zIndex)},stop:function(t,i,s){var n=s.options;n._zIndex&&e(i.helper).css("zIndex",n._zIndex)}}),e.ui.draggable,e.widget("ui.droppable",{version:"1.11.4",widgetEventPrefix:"drop",options:{accept:"*",activeClass:!1,addClasses:!0,greedy:!1,hoverClass:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var t,i=this.options,s=i.accept;this.isover=!1,this.isout=!0,this.accept=e.isFunction(s)?s:function(e){return e.is(s)},this.proportions=function(){return arguments.length?(t=arguments[0],void 0):t?t:t={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight}},this._addToManager(i.scope),i.addClasses&&this.element.addClass("ui-droppable")},_addToManager:function(t){e.ui.ddmanager.droppables[t]=e.ui.ddmanager.droppables[t]||[],e.ui.ddmanager.droppables[t].push(this)},_splice:function(e){for(var t=0;e.length>t;t++)e[t]===this&&e.splice(t,1)},_destroy:function(){var t=e.ui.ddmanager.droppables[this.options.scope];this._splice(t),this.element.removeClass("ui-droppable ui-droppable-disabled")},_setOption:function(t,i){if("accept"===t)this.accept=e.isFunction(i)?i:function(e){return e.is(i)};else if("scope"===t){var s=e.ui.ddmanager.droppables[this.options.scope];this._splice(s),this._addToManager(i)}this._super(t,i)},_activate:function(t){var i=e.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass),i&&this._trigger("activate",t,this.ui(i))},_deactivate:function(t){var i=e.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass),i&&this._trigger("deactivate",t,this.ui(i))},_over:function(t){var i=e.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.addClass(this.options.hoverClass),this._trigger("over",t,this.ui(i)))},_out:function(t){var i=e.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("out",t,this.ui(i)))},_drop:function(t,i){var s=i||e.ui.ddmanager.current,n=!1;return s&&(s.currentItem||s.element)[0]!==this.element[0]?(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var i=e(this).droppable("instance");return i.options.greedy&&!i.options.disabled&&i.options.scope===s.options.scope&&i.accept.call(i.element[0],s.currentItem||s.element)&&e.ui.intersect(s,e.extend(i,{offset:i.element.offset()}),i.options.tolerance,t)?(n=!0,!1):void 0}),n?!1:this.accept.call(this.element[0],s.currentItem||s.element)?(this.options.activeClass&&this.element.removeClass(this.options.activeClass),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("drop",t,this.ui(s)),this.element):!1):!1},ui:function(e){return{draggable:e.currentItem||e.element,helper:e.helper,position:e.position,offset:e.positionAbs}}}),e.ui.intersect=function(){function e(e,t,i){return e>=t&&t+i>e}return function(t,i,s,n){if(!i.offset)return!1;var a=(t.positionAbs||t.position.absolute).left+t.margins.left,o=(t.positionAbs||t.position.absolute).top+t.margins.top,r=a+t.helperProportions.width,h=o+t.helperProportions.height,l=i.offset.left,u=i.offset.top,c=l+i.proportions().width,d=u+i.proportions().height;switch(s){case"fit":return a>=l&&c>=r&&o>=u&&d>=h;case"intersect":return a+t.helperProportions.width/2>l&&c>r-t.helperProportions.width/2&&o+t.helperProportions.height/2>u&&d>h-t.helperProportions.height/2;case"pointer":return e(n.pageY,u,i.proportions().height)&&e(n.pageX,l,i.proportions().width);case"touch":return(o>=u&&d>=o||h>=u&&d>=h||u>o&&h>d)&&(a>=l&&c>=a||r>=l&&c>=r||l>a&&r>c);default:return!1}}}(),e.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(t,i){var s,n,a=e.ui.ddmanager.droppables[t.options.scope]||[],o=i?i.type:null,r=(t.currentItem||t.element).find(":data(ui-droppable)").addBack();e:for(s=0;a.length>s;s++)if(!(a[s].options.disabled||t&&!a[s].accept.call(a[s].element[0],t.currentItem||t.element))){for(n=0;r.length>n;n++)if(r[n]===a[s].element[0]){a[s].proportions().height=0;continue e}a[s].visible="none"!==a[s].element.css("display"),a[s].visible&&("mousedown"===o&&a[s]._activate.call(a[s],i),a[s].offset=a[s].element.offset(),a[s].proportions({width:a[s].element[0].offsetWidth,height:a[s].element[0].offsetHeight}))}},drop:function(t,i){var s=!1;return e.each((e.ui.ddmanager.droppables[t.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&e.ui.intersect(t,this,this.options.tolerance,i)&&(s=this._drop.call(this,i)||s),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],t.currentItem||t.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,i)))}),s},dragStart:function(t,i){t.element.parentsUntil("body").bind("scroll.droppable",function(){t.options.refreshPositions||e.ui.ddmanager.prepareOffsets(t,i)})},drag:function(t,i){t.options.refreshPositions&&e.ui.ddmanager.prepareOffsets(t,i),e.each(e.ui.ddmanager.droppables[t.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var s,n,a,o=e.ui.intersect(t,this,this.options.tolerance,i),r=!o&&this.isover?"isout":o&&!this.isover?"isover":null;r&&(this.options.greedy&&(n=this.options.scope,a=this.element.parents(":data(ui-droppable)").filter(function(){return e(this).droppable("instance").options.scope===n}),a.length&&(s=e(a[0]).droppable("instance"),s.greedyChild="isover"===r)),s&&"isover"===r&&(s.isover=!1,s.isout=!0,s._out.call(s,i)),this[r]=!0,this["isout"===r?"isover":"isout"]=!1,this["isover"===r?"_over":"_out"].call(this,i),s&&"isout"===r&&(s.isout=!1,s.isover=!0,s._over.call(s,i)))}})},dragStop:function(t,i){t.element.parentsUntil("body").unbind("scroll.droppable"),t.options.refreshPositions||e.ui.ddmanager.prepareOffsets(t,i)}},e.ui.droppable,e.widget("ui.sortable",e.ui.mouse,{version:"1.11.4",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_isOverAxis:function(e,t,i){return e>=t&&t+i>e},_isFloating:function(e){return/left|right/.test(e.css("float"))||/inline|table-cell/.test(e.css("display"))},_create:function(){this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.offset=this.element.offset(),this._mouseInit(),this._setHandleClassName(),this.ready=!0},_setOption:function(e,t){this._super(e,t),"handle"===e&&this._setHandleClassName()},_setHandleClassName:function(){this.element.find(".ui-sortable-handle").removeClass("ui-sortable-handle"),e.each(this.items,function(){(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item).addClass("ui-sortable-handle")})},_destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").find(".ui-sortable-handle").removeClass("ui-sortable-handle"),this._mouseDestroy();for(var e=this.items.length-1;e>=0;e--)this.items[e].item.removeData(this.widgetName+"-item");return this},_mouseCapture:function(t,i){var s=null,n=!1,a=this;return this.reverting?!1:this.options.disabled||"static"===this.options.type?!1:(this._refreshItems(t),e(t.target).parents().each(function(){return e.data(this,a.widgetName+"-item")===a?(s=e(this),!1):void 0}),e.data(t.target,a.widgetName+"-item")===a&&(s=e(t.target)),s?!this.options.handle||i||(e(this.options.handle,s).find("*").addBack().each(function(){this===t.target&&(n=!0)}),n)?(this.currentItem=s,this._removeCurrentsFromItems(),!0):!1:!1)},_mouseStart:function(t,i,s){var n,a,o=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(t),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},e.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,o.cursorAt&&this._adjustOffsetFromHelper(o.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),o.containment&&this._setContainment(),o.cursor&&"auto"!==o.cursor&&(a=this.document.find("body"),this.storedCursor=a.css("cursor"),a.css("cursor",o.cursor),this.storedStylesheet=e("<style>*{ cursor: "+o.cursor+" !important; }</style>").appendTo(a)),o.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",o.opacity)),o.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",o.zIndex)),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",t,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!s)for(n=this.containers.length-1;n>=0;n--)this.containers[n]._trigger("activate",t,this._uiHash(this));return e.ui.ddmanager&&(e.ui.ddmanager.current=this),e.ui.ddmanager&&!o.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(t),!0},_mouseDrag:function(t){var i,s,n,a,o=this.options,r=!1;for(this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-t.pageY<o.scrollSensitivity?this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop+o.scrollSpeed:t.pageY-this.overflowOffset.top<o.scrollSensitivity&&(this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop-o.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-t.pageX<o.scrollSensitivity?this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft+o.scrollSpeed:t.pageX-this.overflowOffset.left<o.scrollSensitivity&&(this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft-o.scrollSpeed)):(t.pageY-this.document.scrollTop()<o.scrollSensitivity?r=this.document.scrollTop(this.document.scrollTop()-o.scrollSpeed):this.window.height()-(t.pageY-this.document.scrollTop())<o.scrollSensitivity&&(r=this.document.scrollTop(this.document.scrollTop()+o.scrollSpeed)),t.pageX-this.document.scrollLeft()<o.scrollSensitivity?r=this.document.scrollLeft(this.document.scrollLeft()-o.scrollSpeed):this.window.width()-(t.pageX-this.document.scrollLeft())<o.scrollSensitivity&&(r=this.document.scrollLeft(this.document.scrollLeft()+o.scrollSpeed))),r!==!1&&e.ui.ddmanager&&!o.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t)),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),i=this.items.length-1;i>=0;i--)if(s=this.items[i],n=s.item[0],a=this._intersectsWithPointer(s),a&&s.instance===this.currentContainer&&n!==this.currentItem[0]&&this.placeholder[1===a?"next":"prev"]()[0]!==n&&!e.contains(this.placeholder[0],n)&&("semi-dynamic"===this.options.type?!e.contains(this.element[0],n):!0)){if(this.direction=1===a?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(s))break;this._rearrange(t,s),this._trigger("change",t,this._uiHash());break}return this._contactContainers(t),e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),this._trigger("sort",t,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(t,i){if(t){if(e.ui.ddmanager&&!this.options.dropBehaviour&&e.ui.ddmanager.drop(this,t),this.options.revert){var s=this,n=this.placeholder.offset(),a=this.options.axis,o={};a&&"x"!==a||(o.left=n.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollLeft)),a&&"y"!==a||(o.top=n.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,e(this.helper).animate(o,parseInt(this.options.revert,10)||500,function(){s._clear(t)})}else this._clear(t,i);return!1}},cancel:function(){if(this.dragging){this._mouseUp({target:null}),"original"===this.options.helper?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var t=this.containers.length-1;t>=0;t--)this.containers[t]._trigger("deactivate",null,this._uiHash(this)),this.containers[t].containerCache.over&&(this.containers[t]._trigger("out",null,this._uiHash(this)),this.containers[t].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),e.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?e(this.domPosition.prev).after(this.currentItem):e(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(t){var i=this._getItemsAsjQuery(t&&t.connected),s=[];return t=t||{},e(i).each(function(){var i=(e(t.item||this).attr(t.attribute||"id")||"").match(t.expression||/(.+)[\-=_](.+)/);i&&s.push((t.key||i[1]+"[]")+"="+(t.key&&t.expression?i[1]:i[2]))}),!s.length&&t.key&&s.push(t.key+"="),s.join("&")},toArray:function(t){var i=this._getItemsAsjQuery(t&&t.connected),s=[];return t=t||{},i.each(function(){s.push(e(t.item||this).attr(t.attribute||"id")||"")}),s},_intersectsWith:function(e){var t=this.positionAbs.left,i=t+this.helperProportions.width,s=this.positionAbs.top,n=s+this.helperProportions.height,a=e.left,o=a+e.width,r=e.top,h=r+e.height,l=this.offset.click.top,u=this.offset.click.left,c="x"===this.options.axis||s+l>r&&h>s+l,d="y"===this.options.axis||t+u>a&&o>t+u,p=c&&d;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>e[this.floating?"width":"height"]?p:t+this.helperProportions.width/2>a&&o>i-this.helperProportions.width/2&&s+this.helperProportions.height/2>r&&h>n-this.helperProportions.height/2},_intersectsWithPointer:function(e){var t="x"===this.options.axis||this._isOverAxis(this.positionAbs.top+this.offset.click.top,e.top,e.height),i="y"===this.options.axis||this._isOverAxis(this.positionAbs.left+this.offset.click.left,e.left,e.width),s=t&&i,n=this._getDragVerticalDirection(),a=this._getDragHorizontalDirection();return s?this.floating?a&&"right"===a||"down"===n?2:1:n&&("down"===n?2:1):!1},_intersectsWithSides:function(e){var t=this._isOverAxis(this.positionAbs.top+this.offset.click.top,e.top+e.height/2,e.height),i=this._isOverAxis(this.positionAbs.left+this.offset.click.left,e.left+e.width/2,e.width),s=this._getDragVerticalDirection(),n=this._getDragHorizontalDirection();return this.floating&&n?"right"===n&&i||"left"===n&&!i:s&&("down"===s&&t||"up"===s&&!t)},_getDragVerticalDirection:function(){var e=this.positionAbs.top-this.lastPositionAbs.top;return 0!==e&&(e>0?"down":"up")},_getDragHorizontalDirection:function(){var e=this.positionAbs.left-this.lastPositionAbs.left;return 0!==e&&(e>0?"right":"left")},refresh:function(e){return this._refreshItems(e),this._setHandleClassName(),this.refreshPositions(),this},_connectWith:function(){var e=this.options;return e.connectWith.constructor===String?[e.connectWith]:e.connectWith},_getItemsAsjQuery:function(t){function i(){r.push(this)}var s,n,a,o,r=[],h=[],l=this._connectWith();if(l&&t)for(s=l.length-1;s>=0;s--)for(a=e(l[s],this.document[0]),n=a.length-1;n>=0;n--)o=e.data(a[n],this.widgetFullName),o&&o!==this&&!o.options.disabled&&h.push([e.isFunction(o.options.items)?o.options.items.call(o.element):e(o.options.items,o.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),o]);for(h.push([e.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):e(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),s=h.length-1;s>=0;s--)h[s][0].each(i);return e(r)},_removeCurrentsFromItems:function(){var t=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=e.grep(this.items,function(e){for(var i=0;t.length>i;i++)if(t[i]===e.item[0])return!1;return!0})},_refreshItems:function(t){this.items=[],this.containers=[this];var i,s,n,a,o,r,h,l,u=this.items,c=[[e.isFunction(this.options.items)?this.options.items.call(this.element[0],t,{item:this.currentItem}):e(this.options.items,this.element),this]],d=this._connectWith();if(d&&this.ready)for(i=d.length-1;i>=0;i--)for(n=e(d[i],this.document[0]),s=n.length-1;s>=0;s--)a=e.data(n[s],this.widgetFullName),a&&a!==this&&!a.options.disabled&&(c.push([e.isFunction(a.options.items)?a.options.items.call(a.element[0],t,{item:this.currentItem}):e(a.options.items,a.element),a]),this.containers.push(a));for(i=c.length-1;i>=0;i--)for(o=c[i][1],r=c[i][0],s=0,l=r.length;l>s;s++)h=e(r[s]),h.data(this.widgetName+"-item",o),u.push({item:h,instance:o,width:0,height:0,left:0,top:0})},refreshPositions:function(t){this.floating=this.items.length?"x"===this.options.axis||this._isFloating(this.items[0].item):!1,this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());var i,s,n,a;for(i=this.items.length-1;i>=0;i--)s=this.items[i],s.instance!==this.currentContainer&&this.currentContainer&&s.item[0]!==this.currentItem[0]||(n=this.options.toleranceElement?e(this.options.toleranceElement,s.item):s.item,t||(s.width=n.outerWidth(),s.height=n.outerHeight()),a=n.offset(),s.left=a.left,s.top=a.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(i=this.containers.length-1;i>=0;i--)a=this.containers[i].element.offset(),this.containers[i].containerCache.left=a.left,this.containers[i].containerCache.top=a.top,this.containers[i].containerCache.width=this.containers[i].element.outerWidth(),this.containers[i].containerCache.height=this.containers[i].element.outerHeight();return this},_createPlaceholder:function(t){t=t||this;var i,s=t.options;s.placeholder&&s.placeholder.constructor!==String||(i=s.placeholder,s.placeholder={element:function(){var s=t.currentItem[0].nodeName.toLowerCase(),n=e("<"+s+">",t.document[0]).addClass(i||t.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper");return"tbody"===s?t._createTrPlaceholder(t.currentItem.find("tr").eq(0),e("<tr>",t.document[0]).appendTo(n)):"tr"===s?t._createTrPlaceholder(t.currentItem,n):"img"===s&&n.attr("src",t.currentItem.attr("src")),i||n.css("visibility","hidden"),n},update:function(e,n){(!i||s.forcePlaceholderSize)&&(n.height()||n.height(t.currentItem.innerHeight()-parseInt(t.currentItem.css("paddingTop")||0,10)-parseInt(t.currentItem.css("paddingBottom")||0,10)),n.width()||n.width(t.currentItem.innerWidth()-parseInt(t.currentItem.css("paddingLeft")||0,10)-parseInt(t.currentItem.css("paddingRight")||0,10)))}}),t.placeholder=e(s.placeholder.element.call(t.element,t.currentItem)),t.currentItem.after(t.placeholder),s.placeholder.update(t,t.placeholder)},_createTrPlaceholder:function(t,i){var s=this;t.children().each(function(){e("<td>&#160;</td>",s.document[0]).attr("colspan",e(this).attr("colspan")||1).appendTo(i)})},_contactContainers:function(t){var i,s,n,a,o,r,h,l,u,c,d=null,p=null;for(i=this.containers.length-1;i>=0;i--)if(!e.contains(this.currentItem[0],this.containers[i].element[0]))if(this._intersectsWith(this.containers[i].containerCache)){if(d&&e.contains(this.containers[i].element[0],d.element[0]))continue;d=this.containers[i],p=i}else this.containers[i].containerCache.over&&(this.containers[i]._trigger("out",t,this._uiHash(this)),this.containers[i].containerCache.over=0);if(d)if(1===this.containers.length)this.containers[p].containerCache.over||(this.containers[p]._trigger("over",t,this._uiHash(this)),this.containers[p].containerCache.over=1);else{for(n=1e4,a=null,u=d.floating||this._isFloating(this.currentItem),o=u?"left":"top",r=u?"width":"height",c=u?"clientX":"clientY",s=this.items.length-1;s>=0;s--)e.contains(this.containers[p].element[0],this.items[s].item[0])&&this.items[s].item[0]!==this.currentItem[0]&&(h=this.items[s].item.offset()[o],l=!1,t[c]-h>this.items[s][r]/2&&(l=!0),n>Math.abs(t[c]-h)&&(n=Math.abs(t[c]-h),a=this.items[s],this.direction=l?"up":"down"));if(!a&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[p])return this.currentContainer.containerCache.over||(this.containers[p]._trigger("over",t,this._uiHash()),this.currentContainer.containerCache.over=1),void 0;a?this._rearrange(t,a,null,!0):this._rearrange(t,null,this.containers[p].element,!0),this._trigger("change",t,this._uiHash()),this.containers[p]._trigger("change",t,this._uiHash(this)),this.currentContainer=this.containers[p],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[p]._trigger("over",t,this._uiHash(this)),this.containers[p].containerCache.over=1}},_createHelper:function(t){var i=this.options,s=e.isFunction(i.helper)?e(i.helper.apply(this.element[0],[t,this.currentItem])):"clone"===i.helper?this.currentItem.clone():this.currentItem;return s.parents("body").length||e("parent"!==i.appendTo?i.appendTo:this.currentItem[0].parentNode)[0].appendChild(s[0]),s[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),(!s[0].style.width||i.forceHelperSize)&&s.width(this.currentItem.width()),(!s[0].style.height||i.forceHelperSize)&&s.height(this.currentItem.height()),s},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),e.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var t=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==this.document[0]&&e.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===this.document[0].body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&e.ui.ie)&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var e=this.currentItem.position();return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:e.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,i,s,n=this.options;
8
"parent"===n.containment&&(n.containment=this.helper[0].parentNode),("document"===n.containment||"window"===n.containment)&&(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,"document"===n.containment?this.document.width():this.window.width()-this.helperProportions.width-this.margins.left,("document"===n.containment?this.document.width():this.window.height()||this.document[0].body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(n.containment)||(t=e(n.containment)[0],i=e(n.containment).offset(),s="hidden"!==e(t).css("overflow"),this.containment=[i.left+(parseInt(e(t).css("borderLeftWidth"),10)||0)+(parseInt(e(t).css("paddingLeft"),10)||0)-this.margins.left,i.top+(parseInt(e(t).css("borderTopWidth"),10)||0)+(parseInt(e(t).css("paddingTop"),10)||0)-this.margins.top,i.left+(s?Math.max(t.scrollWidth,t.offsetWidth):t.offsetWidth)-(parseInt(e(t).css("borderLeftWidth"),10)||0)-(parseInt(e(t).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,i.top+(s?Math.max(t.scrollHeight,t.offsetHeight):t.offsetHeight)-(parseInt(e(t).css("borderTopWidth"),10)||0)-(parseInt(e(t).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(t,i){i||(i=this.position);var s="absolute"===t?1:-1,n="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,a=/(html|body)/i.test(n[0].tagName);return{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():a?0:n.scrollTop())*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():a?0:n.scrollLeft())*s}},_generatePosition:function(t){var i,s,n=this.options,a=t.pageX,o=t.pageY,r="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,h=/(html|body)/i.test(r[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(t.pageX-this.offset.click.left<this.containment[0]&&(a=this.containment[0]+this.offset.click.left),t.pageY-this.offset.click.top<this.containment[1]&&(o=this.containment[1]+this.offset.click.top),t.pageX-this.offset.click.left>this.containment[2]&&(a=this.containment[2]+this.offset.click.left),t.pageY-this.offset.click.top>this.containment[3]&&(o=this.containment[3]+this.offset.click.top)),n.grid&&(i=this.originalPageY+Math.round((o-this.originalPageY)/n.grid[1])*n.grid[1],o=this.containment?i-this.offset.click.top>=this.containment[1]&&i-this.offset.click.top<=this.containment[3]?i:i-this.offset.click.top>=this.containment[1]?i-n.grid[1]:i+n.grid[1]:i,s=this.originalPageX+Math.round((a-this.originalPageX)/n.grid[0])*n.grid[0],a=this.containment?s-this.offset.click.left>=this.containment[0]&&s-this.offset.click.left<=this.containment[2]?s:s-this.offset.click.left>=this.containment[0]?s-n.grid[0]:s+n.grid[0]:s)),{top:o-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():h?0:r.scrollTop()),left:a-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():h?0:r.scrollLeft())}},_rearrange:function(e,t,i,s){i?i[0].appendChild(this.placeholder[0]):t.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?t.item[0]:t.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var n=this.counter;this._delay(function(){n===this.counter&&this.refreshPositions(!s)})},_clear:function(e,t){function i(e,t,i){return function(s){i._trigger(e,s,t._uiHash(t))}}this.reverting=!1;var s,n=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(s in this._storedCSS)("auto"===this._storedCSS[s]||"static"===this._storedCSS[s])&&(this._storedCSS[s]="");this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();for(this.fromOutside&&!t&&n.push(function(e){this._trigger("receive",e,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||t||n.push(function(e){this._trigger("update",e,this._uiHash())}),this!==this.currentContainer&&(t||(n.push(function(e){this._trigger("remove",e,this._uiHash())}),n.push(function(e){return function(t){e._trigger("receive",t,this._uiHash(this))}}.call(this,this.currentContainer)),n.push(function(e){return function(t){e._trigger("update",t,this._uiHash(this))}}.call(this,this.currentContainer)))),s=this.containers.length-1;s>=0;s--)t||n.push(i("deactivate",this,this.containers[s])),this.containers[s].containerCache.over&&(n.push(i("out",this,this.containers[s])),this.containers[s].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,t||this._trigger("beforeStop",e,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!t){for(s=0;n.length>s;s++)n[s].call(this,e);this._trigger("stop",e,this._uiHash())}return this.fromOutside=!1,!this.cancelHelperRemoval},_trigger:function(){e.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(t){var i=t||this;return{helper:i.helper,placeholder:i.placeholder||e([]),position:i.position,originalPosition:i.originalPosition,offset:i.positionAbs,item:i.currentItem,sender:t?t.element:null}}}),e.widget("ui.accordion",{version:"1.11.4",options:{active:0,animate:{},collapsible:!1,event:"click",header:"> li > :first-child,> :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},hideProps:{borderTopWidth:"hide",borderBottomWidth:"hide",paddingTop:"hide",paddingBottom:"hide",height:"hide"},showProps:{borderTopWidth:"show",borderBottomWidth:"show",paddingTop:"show",paddingBottom:"show",height:"show"},_create:function(){var t=this.options;this.prevShow=this.prevHide=e(),this.element.addClass("ui-accordion ui-widget ui-helper-reset").attr("role","tablist"),t.collapsible||t.active!==!1&&null!=t.active||(t.active=0),this._processPanels(),0>t.active&&(t.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():e()}},_createIcons:function(){var t=this.options.icons;t&&(e("<span>").addClass("ui-accordion-header-icon ui-icon "+t.header).prependTo(this.headers),this.active.children(".ui-accordion-header-icon").removeClass(t.header).addClass(t.activeHeader),this.headers.addClass("ui-accordion-icons"))},_destroyIcons:function(){this.headers.removeClass("ui-accordion-icons").children(".ui-accordion-header-icon").remove()},_destroy:function(){var e;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role"),this.headers.removeClass("ui-accordion-header ui-accordion-header-active ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-selected").removeAttr("aria-controls").removeAttr("tabIndex").removeUniqueId(),this._destroyIcons(),e=this.headers.next().removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled").css("display","").removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeUniqueId(),"content"!==this.options.heightStyle&&e.css("height","")},_setOption:function(e,t){return"active"===e?(this._activate(t),void 0):("event"===e&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(t)),this._super(e,t),"collapsible"!==e||t||this.options.active!==!1||this._activate(0),"icons"===e&&(this._destroyIcons(),t&&this._createIcons()),"disabled"===e&&(this.element.toggleClass("ui-state-disabled",!!t).attr("aria-disabled",t),this.headers.add(this.headers.next()).toggleClass("ui-state-disabled",!!t)),void 0)},_keydown:function(t){if(!t.altKey&&!t.ctrlKey){var i=e.ui.keyCode,s=this.headers.length,n=this.headers.index(t.target),a=!1;switch(t.keyCode){case i.RIGHT:case i.DOWN:a=this.headers[(n+1)%s];break;case i.LEFT:case i.UP:a=this.headers[(n-1+s)%s];break;case i.SPACE:case i.ENTER:this._eventHandler(t);break;case i.HOME:a=this.headers[0];break;case i.END:a=this.headers[s-1]}a&&(e(t.target).attr("tabIndex",-1),e(a).attr("tabIndex",0),a.focus(),t.preventDefault())}},_panelKeyDown:function(t){t.keyCode===e.ui.keyCode.UP&&t.ctrlKey&&e(t.currentTarget).prev().focus()},refresh:function(){var t=this.options;this._processPanels(),t.active===!1&&t.collapsible===!0||!this.headers.length?(t.active=!1,this.active=e()):t.active===!1?this._activate(0):this.active.length&&!e.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(t.active=!1,this.active=e()):this._activate(Math.max(0,t.active-1)):t.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){var e=this.headers,t=this.panels;this.headers=this.element.find(this.options.header).addClass("ui-accordion-header ui-state-default ui-corner-all"),this.panels=this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").filter(":not(.ui-accordion-content-active)").hide(),t&&(this._off(e.not(this.headers)),this._off(t.not(this.panels)))},_refresh:function(){var t,i=this.options,s=i.heightStyle,n=this.element.parent();this.active=this._findActive(i.active).addClass("ui-accordion-header-active ui-state-active ui-corner-top").removeClass("ui-corner-all"),this.active.next().addClass("ui-accordion-content-active").show(),this.headers.attr("role","tab").each(function(){var t=e(this),i=t.uniqueId().attr("id"),s=t.next(),n=s.uniqueId().attr("id");t.attr("aria-controls",n),s.attr("aria-labelledby",i)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}).next().attr({"aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}).next().attr({"aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(i.event),"fill"===s?(t=n.height(),this.element.siblings(":visible").each(function(){var i=e(this),s=i.css("position");"absolute"!==s&&"fixed"!==s&&(t-=i.outerHeight(!0))}),this.headers.each(function(){t-=e(this).outerHeight(!0)}),this.headers.next().each(function(){e(this).height(Math.max(0,t-e(this).innerHeight()+e(this).height()))}).css("overflow","auto")):"auto"===s&&(t=0,this.headers.next().each(function(){t=Math.max(t,e(this).css("height","").height())}).height(t))},_activate:function(t){var i=this._findActive(t)[0];i!==this.active[0]&&(i=i||this.active[0],this._eventHandler({target:i,currentTarget:i,preventDefault:e.noop}))},_findActive:function(t){return"number"==typeof t?this.headers.eq(t):e()},_setupEvents:function(t){var i={keydown:"_keydown"};t&&e.each(t.split(" "),function(e,t){i[t]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,i),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(t){var i=this.options,s=this.active,n=e(t.currentTarget),a=n[0]===s[0],o=a&&i.collapsible,r=o?e():n.next(),h=s.next(),l={oldHeader:s,oldPanel:h,newHeader:o?e():n,newPanel:r};t.preventDefault(),a&&!i.collapsible||this._trigger("beforeActivate",t,l)===!1||(i.active=o?!1:this.headers.index(n),this.active=a?e():n,this._toggle(l),s.removeClass("ui-accordion-header-active ui-state-active"),i.icons&&s.children(".ui-accordion-header-icon").removeClass(i.icons.activeHeader).addClass(i.icons.header),a||(n.removeClass("ui-corner-all").addClass("ui-accordion-header-active ui-state-active ui-corner-top"),i.icons&&n.children(".ui-accordion-header-icon").removeClass(i.icons.header).addClass(i.icons.activeHeader),n.next().addClass("ui-accordion-content-active")))},_toggle:function(t){var i=t.newPanel,s=this.prevShow.length?this.prevShow:t.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=i,this.prevHide=s,this.options.animate?this._animate(i,s,t):(s.hide(),i.show(),this._toggleComplete(t)),s.attr({"aria-hidden":"true"}),s.prev().attr({"aria-selected":"false","aria-expanded":"false"}),i.length&&s.length?s.prev().attr({tabIndex:-1,"aria-expanded":"false"}):i.length&&this.headers.filter(function(){return 0===parseInt(e(this).attr("tabIndex"),10)}).attr("tabIndex",-1),i.attr("aria-hidden","false").prev().attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_animate:function(e,t,i){var s,n,a,o=this,r=0,h=e.css("box-sizing"),l=e.length&&(!t.length||e.index()<t.index()),u=this.options.animate||{},c=l&&u.down||u,d=function(){o._toggleComplete(i)};return"number"==typeof c&&(a=c),"string"==typeof c&&(n=c),n=n||c.easing||u.easing,a=a||c.duration||u.duration,t.length?e.length?(s=e.show().outerHeight(),t.animate(this.hideProps,{duration:a,easing:n,step:function(e,t){t.now=Math.round(e)}}),e.hide().animate(this.showProps,{duration:a,easing:n,complete:d,step:function(e,i){i.now=Math.round(e),"height"!==i.prop?"content-box"===h&&(r+=i.now):"content"!==o.options.heightStyle&&(i.now=Math.round(s-t.outerHeight()-r),r=0)}}),void 0):t.animate(this.hideProps,a,n,d):e.animate(this.showProps,a,n,d)},_toggleComplete:function(e){var t=e.oldPanel;t.removeClass("ui-accordion-content-active").prev().removeClass("ui-corner-top").addClass("ui-corner-all"),t.length&&(t.parent()[0].className=t.parent()[0].className),this._trigger("activate",null,e)}}),e.widget("ui.menu",{version:"1.11.4",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},items:"> *",menus:"ul",position:{my:"left-1 top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0}),this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true"),this._on({"mousedown .ui-menu-item":function(e){e.preventDefault()},"click .ui-menu-item":function(t){var i=e(t.target);!this.mouseHandled&&i.not(".ui-state-disabled").length&&(this.select(t),t.isPropagationStopped()||(this.mouseHandled=!0),i.has(".ui-menu").length?this.expand(t):!this.element.is(":focus")&&e(this.document[0].activeElement).closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(t){if(!this.previousFilter){var i=e(t.currentTarget);i.siblings(".ui-state-active").removeClass("ui-state-active"),this.focus(t,i)}},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(e,t){var i=this.active||this.element.find(this.options.items).eq(0);t||this.focus(e,i)},blur:function(t){this._delay(function(){e.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(t)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(e){this._closeOnDocumentClick(e)&&this.collapseAll(e),this.mouseHandled=!1}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeClass("ui-menu ui-widget ui-widget-content ui-menu-icons ui-front").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show(),this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").removeUniqueId().removeClass("ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var t=e(this);t.data("ui-menu-submenu-carat")&&t.remove()}),this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(t){var i,s,n,a,o=!0;switch(t.keyCode){case e.ui.keyCode.PAGE_UP:this.previousPage(t);break;case e.ui.keyCode.PAGE_DOWN:this.nextPage(t);break;case e.ui.keyCode.HOME:this._move("first","first",t);break;case e.ui.keyCode.END:this._move("last","last",t);break;case e.ui.keyCode.UP:this.previous(t);break;case e.ui.keyCode.DOWN:this.next(t);break;case e.ui.keyCode.LEFT:this.collapse(t);break;case e.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(t);break;case e.ui.keyCode.ENTER:case e.ui.keyCode.SPACE:this._activate(t);break;case e.ui.keyCode.ESCAPE:this.collapse(t);break;default:o=!1,s=this.previousFilter||"",n=String.fromCharCode(t.keyCode),a=!1,clearTimeout(this.filterTimer),n===s?a=!0:n=s+n,i=this._filterMenuItems(n),i=a&&-1!==i.index(this.active.next())?this.active.nextAll(".ui-menu-item"):i,i.length||(n=String.fromCharCode(t.keyCode),i=this._filterMenuItems(n)),i.length?(this.focus(t,i),this.previousFilter=n,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}o&&t.preventDefault()},_activate:function(e){this.active.is(".ui-state-disabled")||(this.active.is("[aria-haspopup='true']")?this.expand(e):this.select(e))},refresh:function(){var t,i,s=this,n=this.options.icons.submenu,a=this.element.find(this.options.menus);this.element.toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length),a.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-front").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var t=e(this),i=t.parent(),s=e("<span>").addClass("ui-menu-icon ui-icon "+n).data("ui-menu-submenu-carat",!0);i.attr("aria-haspopup","true").prepend(s),t.attr("aria-labelledby",i.attr("id"))}),t=a.add(this.element),i=t.find(this.options.items),i.not(".ui-menu-item").each(function(){var t=e(this);s._isDivider(t)&&t.addClass("ui-widget-content ui-menu-divider")}),i.not(".ui-menu-item, .ui-menu-divider").addClass("ui-menu-item").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),i.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!e.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(e,t){"icons"===e&&this.element.find(".ui-menu-icon").removeClass(this.options.icons.submenu).addClass(t.submenu),"disabled"===e&&this.element.toggleClass("ui-state-disabled",!!t).attr("aria-disabled",t),this._super(e,t)},focus:function(e,t){var i,s;this.blur(e,e&&"focus"===e.type),this._scrollIntoView(t),this.active=t.first(),s=this.active.addClass("ui-state-focus").removeClass("ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",s.attr("id")),this.active.parent().closest(".ui-menu-item").addClass("ui-state-active"),e&&"keydown"===e.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),i=t.children(".ui-menu"),i.length&&e&&/^mouse/.test(e.type)&&this._startOpening(i),this.activeMenu=t.parent(),this._trigger("focus",e,{item:t})},_scrollIntoView:function(t){var i,s,n,a,o,r;this._hasScroll()&&(i=parseFloat(e.css(this.activeMenu[0],"borderTopWidth"))||0,s=parseFloat(e.css(this.activeMenu[0],"paddingTop"))||0,n=t.offset().top-this.activeMenu.offset().top-i-s,a=this.activeMenu.scrollTop(),o=this.activeMenu.height(),r=t.outerHeight(),0>n?this.activeMenu.scrollTop(a+n):n+r>o&&this.activeMenu.scrollTop(a+n-o+r))},blur:function(e,t){t||clearTimeout(this.timer),this.active&&(this.active.removeClass("ui-state-focus"),this.active=null,this._trigger("blur",e,{item:this.active}))},_startOpening:function(e){clearTimeout(this.timer),"true"===e.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(e)},this.delay))},_open:function(t){var i=e.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(t.parents(".ui-menu")).hide().attr("aria-hidden","true"),t.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(i)},collapseAll:function(t,i){clearTimeout(this.timer),this.timer=this._delay(function(){var s=i?this.element:e(t&&t.target).closest(this.element.find(".ui-menu"));s.length||(s=this.element),this._close(s),this.blur(t),this.activeMenu=s},this.delay)},_close:function(e){e||(e=this.active?this.active.parent():this.element),e.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false").end().find(".ui-state-active").not(".ui-state-focus").removeClass("ui-state-active")},_closeOnDocumentClick:function(t){return!e(t.target).closest(".ui-menu").length},_isDivider:function(e){return!/[^\-\u2014\u2013\s]/.test(e.text())},collapse:function(e){var t=this.active&&this.active.parent().closest(".ui-menu-item",this.element);t&&t.length&&(this._close(),this.focus(e,t))},expand:function(e){var t=this.active&&this.active.children(".ui-menu ").find(this.options.items).first();t&&t.length&&(this._open(t.parent()),this._delay(function(){this.focus(e,t)}))},next:function(e){this._move("next","first",e)},previous:function(e){this._move("prev","last",e)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(e,t,i){var s;this.active&&(s="first"===e||"last"===e?this.active["first"===e?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[e+"All"](".ui-menu-item").eq(0)),s&&s.length&&this.active||(s=this.activeMenu.find(this.options.items)[t]()),this.focus(i,s)},nextPage:function(t){var i,s,n;return this.active?(this.isLastItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return i=e(this),0>i.offset().top-s-n}),this.focus(t,i)):this.focus(t,this.activeMenu.find(this.options.items)[this.active?"last":"first"]())),void 0):(this.next(t),void 0)},previousPage:function(t){var i,s,n;return this.active?(this.isFirstItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return i=e(this),i.offset().top-s+n>0}),this.focus(t,i)):this.focus(t,this.activeMenu.find(this.options.items).first())),void 0):(this.next(t),void 0)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(t){this.active=this.active||e(t.target).closest(".ui-menu-item");var i={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(t,!0),this._trigger("select",t,i)},_filterMenuItems:function(t){var i=t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"),s=RegExp("^"+i,"i");return this.activeMenu.find(this.options.items).filter(".ui-menu-item").filter(function(){return s.test(e.trim(e(this).text()))})}}),e.widget("ui.autocomplete",{version:"1.11.4",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,_create:function(){var t,i,s,n=this.element[0].nodeName.toLowerCase(),a="textarea"===n,o="input"===n;this.isMultiLine=a?!0:o?!1:this.element.prop("isContentEditable"),this.valueMethod=this.element[a||o?"val":"text"],this.isNewMenu=!0,this.element.addClass("ui-autocomplete-input").attr("autocomplete","off"),this._on(this.element,{keydown:function(n){if(this.element.prop("readOnly"))return t=!0,s=!0,i=!0,void 0;t=!1,s=!1,i=!1;var a=e.ui.keyCode;switch(n.keyCode){case a.PAGE_UP:t=!0,this._move("previousPage",n);break;case a.PAGE_DOWN:t=!0,this._move("nextPage",n);break;case a.UP:t=!0,this._keyEvent("previous",n);break;case a.DOWN:t=!0,this._keyEvent("next",n);break;case a.ENTER:this.menu.active&&(t=!0,n.preventDefault(),this.menu.select(n));break;case a.TAB:this.menu.active&&this.menu.select(n);break;case a.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(n),n.preventDefault());break;default:i=!0,this._searchTimeout(n)}},keypress:function(s){if(t)return t=!1,(!this.isMultiLine||this.menu.element.is(":visible"))&&s.preventDefault(),void 0;if(!i){var n=e.ui.keyCode;switch(s.keyCode){case n.PAGE_UP:this._move("previousPage",s);break;case n.PAGE_DOWN:this._move("nextPage",s);break;case n.UP:this._keyEvent("previous",s);break;case n.DOWN:this._keyEvent("next",s)}}},input:function(e){return s?(s=!1,e.preventDefault(),void 0):(this._searchTimeout(e),void 0)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(e){return this.cancelBlur?(delete this.cancelBlur,void 0):(clearTimeout(this.searching),this.close(e),this._change(e),void 0)}}),this._initSource(),this.menu=e("<ul>").addClass("ui-autocomplete ui-front").appendTo(this._appendTo()).menu({role:null}).hide().menu("instance"),this._on(this.menu.element,{mousedown:function(t){t.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur});var i=this.menu.element[0];e(t.target).closest(".ui-menu-item").length||this._delay(function(){var t=this;this.document.one("mousedown",function(s){s.target===t.element[0]||s.target===i||e.contains(i,s.target)||t.close()})})},menufocus:function(t,i){var s,n;return this.isNewMenu&&(this.isNewMenu=!1,t.originalEvent&&/^mouse/.test(t.originalEvent.type))?(this.menu.blur(),this.document.one("mousemove",function(){e(t.target).trigger(t.originalEvent)}),void 0):(n=i.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",t,{item:n})&&t.originalEvent&&/^key/.test(t.originalEvent.type)&&this._value(n.value),s=i.item.attr("aria-label")||n.value,s&&e.trim(s).length&&(this.liveRegion.children().hide(),e("<div>").text(s).appendTo(this.liveRegion)),void 0)},menuselect:function(e,t){var i=t.item.data("ui-autocomplete-item"),s=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.focus(),this.previous=s,this._delay(function(){this.previous=s,this.selectedItem=i})),!1!==this._trigger("select",e,{item:i})&&this._value(i.value),this.term=this._value(),this.close(e),this.selectedItem=i}}),this.liveRegion=e("<span>",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).addClass("ui-helper-hidden-accessible").appendTo(this.document[0].body),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(e,t){this._super(e,t),"source"===e&&this._initSource(),"appendTo"===e&&this.menu.element.appendTo(this._appendTo()),"disabled"===e&&t&&this.xhr&&this.xhr.abort()},_appendTo:function(){var t=this.options.appendTo;return t&&(t=t.jquery||t.nodeType?e(t):this.document.find(t).eq(0)),t&&t[0]||(t=this.element.closest(".ui-front")),t.length||(t=this.document[0].body),t},_initSource:function(){var t,i,s=this;e.isArray(this.options.source)?(t=this.options.source,this.source=function(i,s){s(e.ui.autocomplete.filter(t,i.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(t,n){s.xhr&&s.xhr.abort(),s.xhr=e.ajax({url:i,data:t,dataType:"json",success:function(e){n(e)},error:function(){n([])}})}):this.source=this.options.source},_searchTimeout:function(e){clearTimeout(this.searching),this.searching=this._delay(function(){var t=this.term===this._value(),i=this.menu.element.is(":visible"),s=e.altKey||e.ctrlKey||e.metaKey||e.shiftKey;(!t||t&&!i&&!s)&&(this.selectedItem=null,this.search(null,e))},this.options.delay)},search:function(e,t){return e=null!=e?e:this._value(),this.term=this._value(),e.length<this.options.minLength?this.close(t):this._trigger("search",t)!==!1?this._search(e):void 0},_search:function(e){this.pending++,this.element.addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:e},this._response())},_response:function(){var t=++this.requestIndex;return e.proxy(function(e){t===this.requestIndex&&this.__response(e),this.pending--,this.pending||this.element.removeClass("ui-autocomplete-loading")},this)},__response:function(e){e&&(e=this._normalize(e)),this._trigger("response",null,{content:e}),!this.options.disabled&&e&&e.length&&!this.cancelSearch?(this._suggest(e),this._trigger("open")):this._close()},close:function(e){this.cancelSearch=!0,this._close(e)},_close:function(e){this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",e))},_change:function(e){this.previous!==this._value()&&this._trigger("change",e,{item:this.selectedItem})},_normalize:function(t){return t.length&&t[0].label&&t[0].value?t:e.map(t,function(t){return"string"==typeof t?{label:t,value:t}:e.extend({},t,{label:t.label||t.value,value:t.value||t.label})})},_suggest:function(t){var i=this.menu.element.empty();this._renderMenu(i,t),this.isNewMenu=!0,this.menu.refresh(),i.show(),this._resizeMenu(),i.position(e.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next()},_resizeMenu:function(){var e=this.menu.element;e.outerWidth(Math.max(e.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(t,i){var s=this;e.each(i,function(e,i){s._renderItemData(t,i)})},_renderItemData:function(e,t){return this._renderItem(e,t).data("ui-autocomplete-item",t)},_renderItem:function(t,i){return e("<li>").text(i.label).appendTo(t)},_move:function(e,t){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(e)||this.menu.isLastItem()&&/^next/.test(e)?(this.isMultiLine||this._value(this.term),this.menu.blur(),void 0):(this.menu[e](t),void 0):(this.search(null,t),void 0)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(e,t){(!this.isMultiLine||this.menu.element.is(":visible"))&&(this._move(e,t),t.preventDefault())}}),e.extend(e.ui.autocomplete,{escapeRegex:function(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(t,i){var s=RegExp(e.ui.autocomplete.escapeRegex(i),"i");return e.grep(t,function(e){return s.test(e.label||e.value||e)})}}),e.widget("ui.autocomplete",e.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(e){return e+(e>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(t){var i;this._superApply(arguments),this.options.disabled||this.cancelSearch||(i=t&&t.length?this.options.messages.results(t.length):this.options.messages.noResults,this.liveRegion.children().hide(),e("<div>").text(i).appendTo(this.liveRegion))}}),e.ui.autocomplete;var c,d="ui-button ui-widget ui-state-default ui-corner-all",p="ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",f=function(){var t=e(this);setTimeout(function(){t.find(":ui-button").button("refresh")},1)},m=function(t){var i=t.name,s=t.form,n=e([]);
9
return i&&(i=i.replace(/'/g,"\\'"),n=s?e(s).find("[name='"+i+"'][type=radio]"):e("[name='"+i+"'][type=radio]",t.ownerDocument).filter(function(){return!this.form})),n};e.widget("ui.button",{version:"1.11.4",defaultElement:"<button>",options:{disabled:null,text:!0,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset"+this.eventNamespace).bind("reset"+this.eventNamespace,f),"boolean"!=typeof this.options.disabled?this.options.disabled=!!this.element.prop("disabled"):this.element.prop("disabled",this.options.disabled),this._determineButtonType(),this.hasTitle=!!this.buttonElement.attr("title");var t=this,i=this.options,s="checkbox"===this.type||"radio"===this.type,n=s?"":"ui-state-active";null===i.label&&(i.label="input"===this.type?this.buttonElement.val():this.buttonElement.html()),this._hoverable(this.buttonElement),this.buttonElement.addClass(d).attr("role","button").bind("mouseenter"+this.eventNamespace,function(){i.disabled||this===c&&e(this).addClass("ui-state-active")}).bind("mouseleave"+this.eventNamespace,function(){i.disabled||e(this).removeClass(n)}).bind("click"+this.eventNamespace,function(e){i.disabled&&(e.preventDefault(),e.stopImmediatePropagation())}),this._on({focus:function(){this.buttonElement.addClass("ui-state-focus")},blur:function(){this.buttonElement.removeClass("ui-state-focus")}}),s&&this.element.bind("change"+this.eventNamespace,function(){t.refresh()}),"checkbox"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){return i.disabled?!1:void 0}):"radio"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){if(i.disabled)return!1;e(this).addClass("ui-state-active"),t.buttonElement.attr("aria-pressed","true");var s=t.element[0];m(s).not(s).map(function(){return e(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed","false")}):(this.buttonElement.bind("mousedown"+this.eventNamespace,function(){return i.disabled?!1:(e(this).addClass("ui-state-active"),c=this,t.document.one("mouseup",function(){c=null}),void 0)}).bind("mouseup"+this.eventNamespace,function(){return i.disabled?!1:(e(this).removeClass("ui-state-active"),void 0)}).bind("keydown"+this.eventNamespace,function(t){return i.disabled?!1:((t.keyCode===e.ui.keyCode.SPACE||t.keyCode===e.ui.keyCode.ENTER)&&e(this).addClass("ui-state-active"),void 0)}).bind("keyup"+this.eventNamespace+" blur"+this.eventNamespace,function(){e(this).removeClass("ui-state-active")}),this.buttonElement.is("a")&&this.buttonElement.keyup(function(t){t.keyCode===e.ui.keyCode.SPACE&&e(this).click()})),this._setOption("disabled",i.disabled),this._resetButton()},_determineButtonType:function(){var e,t,i;this.type=this.element.is("[type=checkbox]")?"checkbox":this.element.is("[type=radio]")?"radio":this.element.is("input")?"input":"button","checkbox"===this.type||"radio"===this.type?(e=this.element.parents().last(),t="label[for='"+this.element.attr("id")+"']",this.buttonElement=e.find(t),this.buttonElement.length||(e=e.length?e.siblings():this.element.siblings(),this.buttonElement=e.filter(t),this.buttonElement.length||(this.buttonElement=e.find(t))),this.element.addClass("ui-helper-hidden-accessible"),i=this.element.is(":checked"),i&&this.buttonElement.addClass("ui-state-active"),this.buttonElement.prop("aria-pressed",i)):this.buttonElement=this.element},widget:function(){return this.buttonElement},_destroy:function(){this.element.removeClass("ui-helper-hidden-accessible"),this.buttonElement.removeClass(d+" ui-state-active "+p).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html()),this.hasTitle||this.buttonElement.removeAttr("title")},_setOption:function(e,t){return this._super(e,t),"disabled"===e?(this.widget().toggleClass("ui-state-disabled",!!t),this.element.prop("disabled",!!t),t&&("checkbox"===this.type||"radio"===this.type?this.buttonElement.removeClass("ui-state-focus"):this.buttonElement.removeClass("ui-state-focus ui-state-active")),void 0):(this._resetButton(),void 0)},refresh:function(){var t=this.element.is("input, button")?this.element.is(":disabled"):this.element.hasClass("ui-button-disabled");t!==this.options.disabled&&this._setOption("disabled",t),"radio"===this.type?m(this.element[0]).each(function(){e(this).is(":checked")?e(this).button("widget").addClass("ui-state-active").attr("aria-pressed","true"):e(this).button("widget").removeClass("ui-state-active").attr("aria-pressed","false")}):"checkbox"===this.type&&(this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed","true"):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed","false"))},_resetButton:function(){if("input"===this.type)return this.options.label&&this.element.val(this.options.label),void 0;var t=this.buttonElement.removeClass(p),i=e("<span></span>",this.document[0]).addClass("ui-button-text").html(this.options.label).appendTo(t.empty()).text(),s=this.options.icons,n=s.primary&&s.secondary,a=[];s.primary||s.secondary?(this.options.text&&a.push("ui-button-text-icon"+(n?"s":s.primary?"-primary":"-secondary")),s.primary&&t.prepend("<span class='ui-button-icon-primary ui-icon "+s.primary+"'></span>"),s.secondary&&t.append("<span class='ui-button-icon-secondary ui-icon "+s.secondary+"'></span>"),this.options.text||(a.push(n?"ui-button-icons-only":"ui-button-icon-only"),this.hasTitle||t.attr("title",e.trim(i)))):a.push("ui-button-text-only"),t.addClass(a.join(" "))}}),e.widget("ui.buttonset",{version:"1.11.4",options:{items:"button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(e,t){"disabled"===e&&this.buttons.button("option",e,t),this._super(e,t)},refresh:function(){var t="rtl"===this.element.css("direction"),i=this.element.find(this.options.items),s=i.filter(":ui-button");i.not(":ui-button").button(),s.button("refresh"),this.buttons=i.map(function(){return e(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(t?"ui-corner-right":"ui-corner-left").end().filter(":last").addClass(t?"ui-corner-left":"ui-corner-right").end().end()},_destroy:function(){this.element.removeClass("ui-buttonset"),this.buttons.map(function(){return e(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy")}}),e.ui.button,e.extend(e.ui,{datepicker:{version:"1.11.4"}});var g;e.extend(n.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(e){return r(this._defaults,e||{}),this},_attachDatepicker:function(t,i){var s,n,a;s=t.nodeName.toLowerCase(),n="div"===s||"span"===s,t.id||(this.uuid+=1,t.id="dp"+this.uuid),a=this._newInst(e(t),n),a.settings=e.extend({},i||{}),"input"===s?this._connectDatepicker(t,a):n&&this._inlineDatepicker(t,a)},_newInst:function(t,i){var s=t[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1");return{id:s,input:t,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:i,dpDiv:i?a(e("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(t,i){var s=e(t);i.append=e([]),i.trigger=e([]),s.hasClass(this.markerClassName)||(this._attachments(s,i),s.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp),this._autoSize(i),e.data(t,"datepicker",i),i.settings.disabled&&this._disableDatepicker(t))},_attachments:function(t,i){var s,n,a,o=this._get(i,"appendText"),r=this._get(i,"isRTL");i.append&&i.append.remove(),o&&(i.append=e("<span class='"+this._appendClass+"'>"+o+"</span>"),t[r?"before":"after"](i.append)),t.unbind("focus",this._showDatepicker),i.trigger&&i.trigger.remove(),s=this._get(i,"showOn"),("focus"===s||"both"===s)&&t.focus(this._showDatepicker),("button"===s||"both"===s)&&(n=this._get(i,"buttonText"),a=this._get(i,"buttonImage"),i.trigger=e(this._get(i,"buttonImageOnly")?e("<img/>").addClass(this._triggerClass).attr({src:a,alt:n,title:n}):e("<button type='button'></button>").addClass(this._triggerClass).html(a?e("<img/>").attr({src:a,alt:n,title:n}):n)),t[r?"before":"after"](i.trigger),i.trigger.click(function(){return e.datepicker._datepickerShowing&&e.datepicker._lastInput===t[0]?e.datepicker._hideDatepicker():e.datepicker._datepickerShowing&&e.datepicker._lastInput!==t[0]?(e.datepicker._hideDatepicker(),e.datepicker._showDatepicker(t[0])):e.datepicker._showDatepicker(t[0]),!1}))},_autoSize:function(e){if(this._get(e,"autoSize")&&!e.inline){var t,i,s,n,a=new Date(2009,11,20),o=this._get(e,"dateFormat");o.match(/[DM]/)&&(t=function(e){for(i=0,s=0,n=0;e.length>n;n++)e[n].length>i&&(i=e[n].length,s=n);return s},a.setMonth(t(this._get(e,o.match(/MM/)?"monthNames":"monthNamesShort"))),a.setDate(t(this._get(e,o.match(/DD/)?"dayNames":"dayNamesShort"))+20-a.getDay())),e.input.attr("size",this._formatDate(e,a).length)}},_inlineDatepicker:function(t,i){var s=e(t);s.hasClass(this.markerClassName)||(s.addClass(this.markerClassName).append(i.dpDiv),e.data(t,"datepicker",i),this._setDate(i,this._getDefaultDate(i),!0),this._updateDatepicker(i),this._updateAlternate(i),i.settings.disabled&&this._disableDatepicker(t),i.dpDiv.css("display","block"))},_dialogDatepicker:function(t,i,s,n,a){var o,h,l,u,c,d=this._dialogInst;return d||(this.uuid+=1,o="dp"+this.uuid,this._dialogInput=e("<input type='text' id='"+o+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.keydown(this._doKeyDown),e("body").append(this._dialogInput),d=this._dialogInst=this._newInst(this._dialogInput,!1),d.settings={},e.data(this._dialogInput[0],"datepicker",d)),r(d.settings,n||{}),i=i&&i.constructor===Date?this._formatDate(d,i):i,this._dialogInput.val(i),this._pos=a?a.length?a:[a.pageX,a.pageY]:null,this._pos||(h=document.documentElement.clientWidth,l=document.documentElement.clientHeight,u=document.documentElement.scrollLeft||document.body.scrollLeft,c=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[h/2-100+u,l/2-150+c]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),d.settings.onSelect=s,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),e.blockUI&&e.blockUI(this.dpDiv),e.data(this._dialogInput[0],"datepicker",d),this},_destroyDatepicker:function(t){var i,s=e(t),n=e.data(t,"datepicker");s.hasClass(this.markerClassName)&&(i=t.nodeName.toLowerCase(),e.removeData(t,"datepicker"),"input"===i?(n.append.remove(),n.trigger.remove(),s.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):("div"===i||"span"===i)&&s.removeClass(this.markerClassName).empty(),g===n&&(g=null))},_enableDatepicker:function(t){var i,s,n=e(t),a=e.data(t,"datepicker");n.hasClass(this.markerClassName)&&(i=t.nodeName.toLowerCase(),"input"===i?(t.disabled=!1,a.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):("div"===i||"span"===i)&&(s=n.children("."+this._inlineClass),s.children().removeClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=e.map(this._disabledInputs,function(e){return e===t?null:e}))},_disableDatepicker:function(t){var i,s,n=e(t),a=e.data(t,"datepicker");n.hasClass(this.markerClassName)&&(i=t.nodeName.toLowerCase(),"input"===i?(t.disabled=!0,a.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):("div"===i||"span"===i)&&(s=n.children("."+this._inlineClass),s.children().addClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=e.map(this._disabledInputs,function(e){return e===t?null:e}),this._disabledInputs[this._disabledInputs.length]=t)},_isDisabledDatepicker:function(e){if(!e)return!1;for(var t=0;this._disabledInputs.length>t;t++)if(this._disabledInputs[t]===e)return!0;return!1},_getInst:function(t){try{return e.data(t,"datepicker")}catch(i){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(t,i,s){var n,a,o,h,l=this._getInst(t);return 2===arguments.length&&"string"==typeof i?"defaults"===i?e.extend({},e.datepicker._defaults):l?"all"===i?e.extend({},l.settings):this._get(l,i):null:(n=i||{},"string"==typeof i&&(n={},n[i]=s),l&&(this._curInst===l&&this._hideDatepicker(),a=this._getDateDatepicker(t,!0),o=this._getMinMaxDate(l,"min"),h=this._getMinMaxDate(l,"max"),r(l.settings,n),null!==o&&void 0!==n.dateFormat&&void 0===n.minDate&&(l.settings.minDate=this._formatDate(l,o)),null!==h&&void 0!==n.dateFormat&&void 0===n.maxDate&&(l.settings.maxDate=this._formatDate(l,h)),"disabled"in n&&(n.disabled?this._disableDatepicker(t):this._enableDatepicker(t)),this._attachments(e(t),l),this._autoSize(l),this._setDate(l,a),this._updateAlternate(l),this._updateDatepicker(l)),void 0)},_changeDatepicker:function(e,t,i){this._optionDatepicker(e,t,i)},_refreshDatepicker:function(e){var t=this._getInst(e);t&&this._updateDatepicker(t)},_setDateDatepicker:function(e,t){var i=this._getInst(e);i&&(this._setDate(i,t),this._updateDatepicker(i),this._updateAlternate(i))},_getDateDatepicker:function(e,t){var i=this._getInst(e);return i&&!i.inline&&this._setDateFromField(i,t),i?this._getDate(i):null},_doKeyDown:function(t){var i,s,n,a=e.datepicker._getInst(t.target),o=!0,r=a.dpDiv.is(".ui-datepicker-rtl");if(a._keyEvent=!0,e.datepicker._datepickerShowing)switch(t.keyCode){case 9:e.datepicker._hideDatepicker(),o=!1;break;case 13:return n=e("td."+e.datepicker._dayOverClass+":not(."+e.datepicker._currentClass+")",a.dpDiv),n[0]&&e.datepicker._selectDay(t.target,a.selectedMonth,a.selectedYear,n[0]),i=e.datepicker._get(a,"onSelect"),i?(s=e.datepicker._formatDate(a),i.apply(a.input?a.input[0]:null,[s,a])):e.datepicker._hideDatepicker(),!1;case 27:e.datepicker._hideDatepicker();break;case 33:e.datepicker._adjustDate(t.target,t.ctrlKey?-e.datepicker._get(a,"stepBigMonths"):-e.datepicker._get(a,"stepMonths"),"M");break;case 34:e.datepicker._adjustDate(t.target,t.ctrlKey?+e.datepicker._get(a,"stepBigMonths"):+e.datepicker._get(a,"stepMonths"),"M");break;case 35:(t.ctrlKey||t.metaKey)&&e.datepicker._clearDate(t.target),o=t.ctrlKey||t.metaKey;break;case 36:(t.ctrlKey||t.metaKey)&&e.datepicker._gotoToday(t.target),o=t.ctrlKey||t.metaKey;break;case 37:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,r?1:-1,"D"),o=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&e.datepicker._adjustDate(t.target,t.ctrlKey?-e.datepicker._get(a,"stepBigMonths"):-e.datepicker._get(a,"stepMonths"),"M");break;case 38:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,-7,"D"),o=t.ctrlKey||t.metaKey;break;case 39:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,r?-1:1,"D"),o=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&e.datepicker._adjustDate(t.target,t.ctrlKey?+e.datepicker._get(a,"stepBigMonths"):+e.datepicker._get(a,"stepMonths"),"M");break;case 40:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,7,"D"),o=t.ctrlKey||t.metaKey;break;default:o=!1}else 36===t.keyCode&&t.ctrlKey?e.datepicker._showDatepicker(this):o=!1;o&&(t.preventDefault(),t.stopPropagation())},_doKeyPress:function(t){var i,s,n=e.datepicker._getInst(t.target);return e.datepicker._get(n,"constrainInput")?(i=e.datepicker._possibleChars(e.datepicker._get(n,"dateFormat")),s=String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),t.ctrlKey||t.metaKey||" ">s||!i||i.indexOf(s)>-1):void 0},_doKeyUp:function(t){var i,s=e.datepicker._getInst(t.target);if(s.input.val()!==s.lastVal)try{i=e.datepicker.parseDate(e.datepicker._get(s,"dateFormat"),s.input?s.input.val():null,e.datepicker._getFormatConfig(s)),i&&(e.datepicker._setDateFromField(s),e.datepicker._updateAlternate(s),e.datepicker._updateDatepicker(s))}catch(n){}return!0},_showDatepicker:function(t){if(t=t.target||t,"input"!==t.nodeName.toLowerCase()&&(t=e("input",t.parentNode)[0]),!e.datepicker._isDisabledDatepicker(t)&&e.datepicker._lastInput!==t){var i,n,a,o,h,l,u;i=e.datepicker._getInst(t),e.datepicker._curInst&&e.datepicker._curInst!==i&&(e.datepicker._curInst.dpDiv.stop(!0,!0),i&&e.datepicker._datepickerShowing&&e.datepicker._hideDatepicker(e.datepicker._curInst.input[0])),n=e.datepicker._get(i,"beforeShow"),a=n?n.apply(t,[t,i]):{},a!==!1&&(r(i.settings,a),i.lastVal=null,e.datepicker._lastInput=t,e.datepicker._setDateFromField(i),e.datepicker._inDialog&&(t.value=""),e.datepicker._pos||(e.datepicker._pos=e.datepicker._findPos(t),e.datepicker._pos[1]+=t.offsetHeight),o=!1,e(t).parents().each(function(){return o|="fixed"===e(this).css("position"),!o}),h={left:e.datepicker._pos[0],top:e.datepicker._pos[1]},e.datepicker._pos=null,i.dpDiv.empty(),i.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),e.datepicker._updateDatepicker(i),h=e.datepicker._checkOffset(i,h,o),i.dpDiv.css({position:e.datepicker._inDialog&&e.blockUI?"static":o?"fixed":"absolute",display:"none",left:h.left+"px",top:h.top+"px"}),i.inline||(l=e.datepicker._get(i,"showAnim"),u=e.datepicker._get(i,"duration"),i.dpDiv.css("z-index",s(e(t))+1),e.datepicker._datepickerShowing=!0,e.effects&&e.effects.effect[l]?i.dpDiv.show(l,e.datepicker._get(i,"showOptions"),u):i.dpDiv[l||"show"](l?u:null),e.datepicker._shouldFocusInput(i)&&i.input.focus(),e.datepicker._curInst=i))}},_updateDatepicker:function(t){this.maxRows=4,g=t,t.dpDiv.empty().append(this._generateHTML(t)),this._attachHandlers(t);var i,s=this._getNumberOfMonths(t),n=s[1],a=17,r=t.dpDiv.find("."+this._dayOverClass+" a");r.length>0&&o.apply(r.get(0)),t.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),n>1&&t.dpDiv.addClass("ui-datepicker-multi-"+n).css("width",a*n+"em"),t.dpDiv[(1!==s[0]||1!==s[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),t.dpDiv[(this._get(t,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),t===e.datepicker._curInst&&e.datepicker._datepickerShowing&&e.datepicker._shouldFocusInput(t)&&t.input.focus(),t.yearshtml&&(i=t.yearshtml,setTimeout(function(){i===t.yearshtml&&t.yearshtml&&t.dpDiv.find("select.ui-datepicker-year:first").replaceWith(t.yearshtml),i=t.yearshtml=null},0))},_shouldFocusInput:function(e){return e.input&&e.input.is(":visible")&&!e.input.is(":disabled")&&!e.input.is(":focus")},_checkOffset:function(t,i,s){var n=t.dpDiv.outerWidth(),a=t.dpDiv.outerHeight(),o=t.input?t.input.outerWidth():0,r=t.input?t.input.outerHeight():0,h=document.documentElement.clientWidth+(s?0:e(document).scrollLeft()),l=document.documentElement.clientHeight+(s?0:e(document).scrollTop());return i.left-=this._get(t,"isRTL")?n-o:0,i.left-=s&&i.left===t.input.offset().left?e(document).scrollLeft():0,i.top-=s&&i.top===t.input.offset().top+r?e(document).scrollTop():0,i.left-=Math.min(i.left,i.left+n>h&&h>n?Math.abs(i.left+n-h):0),i.top-=Math.min(i.top,i.top+a>l&&l>a?Math.abs(a+r):0),i},_findPos:function(t){for(var i,s=this._getInst(t),n=this._get(s,"isRTL");t&&("hidden"===t.type||1!==t.nodeType||e.expr.filters.hidden(t));)t=t[n?"previousSibling":"nextSibling"];return i=e(t).offset(),[i.left,i.top]},_hideDatepicker:function(t){var i,s,n,a,o=this._curInst;!o||t&&o!==e.data(t,"datepicker")||this._datepickerShowing&&(i=this._get(o,"showAnim"),s=this._get(o,"duration"),n=function(){e.datepicker._tidyDialog(o)},e.effects&&(e.effects.effect[i]||e.effects[i])?o.dpDiv.hide(i,e.datepicker._get(o,"showOptions"),s,n):o.dpDiv["slideDown"===i?"slideUp":"fadeIn"===i?"fadeOut":"hide"](i?s:null,n),i||n(),this._datepickerShowing=!1,a=this._get(o,"onClose"),a&&a.apply(o.input?o.input[0]:null,[o.input?o.input.val():"",o]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),e.blockUI&&(e.unblockUI(),e("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(e){e.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(t){if(e.datepicker._curInst){var i=e(t.target),s=e.datepicker._getInst(i[0]);(i[0].id!==e.datepicker._mainDivId&&0===i.parents("#"+e.datepicker._mainDivId).length&&!i.hasClass(e.datepicker.markerClassName)&&!i.closest("."+e.datepicker._triggerClass).length&&e.datepicker._datepickerShowing&&(!e.datepicker._inDialog||!e.blockUI)||i.hasClass(e.datepicker.markerClassName)&&e.datepicker._curInst!==s)&&e.datepicker._hideDatepicker()}},_adjustDate:function(t,i,s){var n=e(t),a=this._getInst(n[0]);this._isDisabledDatepicker(n[0])||(this._adjustInstDate(a,i+("M"===s?this._get(a,"showCurrentAtPos"):0),s),this._updateDatepicker(a))},_gotoToday:function(t){var i,s=e(t),n=this._getInst(s[0]);this._get(n,"gotoCurrent")&&n.currentDay?(n.selectedDay=n.currentDay,n.drawMonth=n.selectedMonth=n.currentMonth,n.drawYear=n.selectedYear=n.currentYear):(i=new Date,n.selectedDay=i.getDate(),n.drawMonth=n.selectedMonth=i.getMonth(),n.drawYear=n.selectedYear=i.getFullYear()),this._notifyChange(n),this._adjustDate(s)},_selectMonthYear:function(t,i,s){var n=e(t),a=this._getInst(n[0]);a["selected"+("M"===s?"Month":"Year")]=a["draw"+("M"===s?"Month":"Year")]=parseInt(i.options[i.selectedIndex].value,10),this._notifyChange(a),this._adjustDate(n)},_selectDay:function(t,i,s,n){var a,o=e(t);e(n).hasClass(this._unselectableClass)||this._isDisabledDatepicker(o[0])||(a=this._getInst(o[0]),a.selectedDay=a.currentDay=e("a",n).html(),a.selectedMonth=a.currentMonth=i,a.selectedYear=a.currentYear=s,this._selectDate(t,this._formatDate(a,a.currentDay,a.currentMonth,a.currentYear)))},_clearDate:function(t){var i=e(t);this._selectDate(i,"")},_selectDate:function(t,i){var s,n=e(t),a=this._getInst(n[0]);i=null!=i?i:this._formatDate(a),a.input&&a.input.val(i),this._updateAlternate(a),s=this._get(a,"onSelect"),s?s.apply(a.input?a.input[0]:null,[i,a]):a.input&&a.input.trigger("change"),a.inline?this._updateDatepicker(a):(this._hideDatepicker(),this._lastInput=a.input[0],"object"!=typeof a.input[0]&&a.input.focus(),this._lastInput=null)},_updateAlternate:function(t){var i,s,n,a=this._get(t,"altField");a&&(i=this._get(t,"altFormat")||this._get(t,"dateFormat"),s=this._getDate(t),n=this.formatDate(i,s,this._getFormatConfig(t)),e(a).each(function(){e(this).val(n)}))},noWeekends:function(e){var t=e.getDay();return[t>0&&6>t,""]},iso8601Week:function(e){var t,i=new Date(e.getTime());return i.setDate(i.getDate()+4-(i.getDay()||7)),t=i.getTime(),i.setMonth(0),i.setDate(1),Math.floor(Math.round((t-i)/864e5)/7)+1},parseDate:function(t,i,s){if(null==t||null==i)throw"Invalid arguments";if(i="object"==typeof i?""+i:i+"",""===i)return null;var n,a,o,r,h=0,l=(s?s.shortYearCutoff:null)||this._defaults.shortYearCutoff,u="string"!=typeof l?l:(new Date).getFullYear()%100+parseInt(l,10),c=(s?s.dayNamesShort:null)||this._defaults.dayNamesShort,d=(s?s.dayNames:null)||this._defaults.dayNames,p=(s?s.monthNamesShort:null)||this._defaults.monthNamesShort,f=(s?s.monthNames:null)||this._defaults.monthNames,m=-1,g=-1,v=-1,_=-1,b=!1,y=function(e){var i=t.length>n+1&&t.charAt(n+1)===e;return i&&n++,i},x=function(e){var t=y(e),s="@"===e?14:"!"===e?20:"y"===e&&t?4:"o"===e?3:2,n="y"===e?s:1,a=RegExp("^\\d{"+n+","+s+"}"),o=i.substring(h).match(a);if(!o)throw"Missing number at position "+h;return h+=o[0].length,parseInt(o[0],10)},w=function(t,s,n){var a=-1,o=e.map(y(t)?n:s,function(e,t){return[[t,e]]}).sort(function(e,t){return-(e[1].length-t[1].length)});if(e.each(o,function(e,t){var s=t[1];return i.substr(h,s.length).toLowerCase()===s.toLowerCase()?(a=t[0],h+=s.length,!1):void 0}),-1!==a)return a+1;throw"Unknown name at position "+h},k=function(){if(i.charAt(h)!==t.charAt(n))throw"Unexpected literal at position "+h;h++};for(n=0;t.length>n;n++)if(b)"'"!==t.charAt(n)||y("'")?k():b=!1;else switch(t.charAt(n)){case"d":v=x("d");break;case"D":w("D",c,d);break;case"o":_=x("o");break;case"m":g=x("m");break;case"M":g=w("M",p,f);break;case"y":m=x("y");break;case"@":r=new Date(x("@")),m=r.getFullYear(),g=r.getMonth()+1,v=r.getDate();break;case"!":r=new Date((x("!")-this._ticksTo1970)/1e4),m=r.getFullYear(),g=r.getMonth()+1,v=r.getDate();break;case"'":y("'")?k():b=!0;break;default:k()}if(i.length>h&&(o=i.substr(h),!/^\s+/.test(o)))throw"Extra/unparsed characters found in date: "+o;if(-1===m?m=(new Date).getFullYear():100>m&&(m+=(new Date).getFullYear()-(new Date).getFullYear()%100+(u>=m?0:-100)),_>-1)for(g=1,v=_;;){if(a=this._getDaysInMonth(m,g-1),a>=v)break;g++,v-=a}if(r=this._daylightSavingAdjust(new Date(m,g-1,v)),r.getFullYear()!==m||r.getMonth()+1!==g||r.getDate()!==v)throw"Invalid date";return r},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:1e7*60*60*24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925)),formatDate:function(e,t,i){if(!t)return"";var s,n=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,a=(i?i.dayNames:null)||this._defaults.dayNames,o=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,r=(i?i.monthNames:null)||this._defaults.monthNames,h=function(t){var i=e.length>s+1&&e.charAt(s+1)===t;return i&&s++,i},l=function(e,t,i){var s=""+t;if(h(e))for(;i>s.length;)s="0"+s;return s},u=function(e,t,i,s){return h(e)?s[t]:i[t]},c="",d=!1;if(t)for(s=0;e.length>s;s++)if(d)"'"!==e.charAt(s)||h("'")?c+=e.charAt(s):d=!1;else switch(e.charAt(s)){case"d":c+=l("d",t.getDate(),2);break;case"D":c+=u("D",t.getDay(),n,a);break;case"o":c+=l("o",Math.round((new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime()-new Date(t.getFullYear(),0,0).getTime())/864e5),3);break;case"m":c+=l("m",t.getMonth()+1,2);break;case"M":c+=u("M",t.getMonth(),o,r);break;case"y":c+=h("y")?t.getFullYear():(10>t.getYear()%100?"0":"")+t.getYear()%100;break;case"@":c+=t.getTime();break;case"!":c+=1e4*t.getTime()+this._ticksTo1970;break;case"'":h("'")?c+="'":d=!0;break;default:c+=e.charAt(s)}return c},_possibleChars:function(e){var t,i="",s=!1,n=function(i){var s=e.length>t+1&&e.charAt(t+1)===i;return s&&t++,s};for(t=0;e.length>t;t++)if(s)"'"!==e.charAt(t)||n("'")?i+=e.charAt(t):s=!1;else switch(e.charAt(t)){case"d":case"m":case"y":case"@":i+="0123456789";break;case"D":case"M":return null;case"'":n("'")?i+="'":s=!0;break;default:i+=e.charAt(t)}return i},_get:function(e,t){return void 0!==e.settings[t]?e.settings[t]:this._defaults[t]},_setDateFromField:function(e,t){if(e.input.val()!==e.lastVal){var i=this._get(e,"dateFormat"),s=e.lastVal=e.input?e.input.val():null,n=this._getDefaultDate(e),a=n,o=this._getFormatConfig(e);try{a=this.parseDate(i,s,o)||n}catch(r){s=t?"":s}e.selectedDay=a.getDate(),e.drawMonth=e.selectedMonth=a.getMonth(),e.drawYear=e.selectedYear=a.getFullYear(),e.currentDay=s?a.getDate():0,e.currentMonth=s?a.getMonth():0,e.currentYear=s?a.getFullYear():0,this._adjustInstDate(e)}},_getDefaultDate:function(e){return this._restrictMinMax(e,this._determineDate(e,this._get(e,"defaultDate"),new Date))},_determineDate:function(t,i,s){var n=function(e){var t=new Date;return t.setDate(t.getDate()+e),t},a=function(i){try{return e.datepicker.parseDate(e.datepicker._get(t,"dateFormat"),i,e.datepicker._getFormatConfig(t))}catch(s){}for(var n=(i.toLowerCase().match(/^c/)?e.datepicker._getDate(t):null)||new Date,a=n.getFullYear(),o=n.getMonth(),r=n.getDate(),h=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,l=h.exec(i);l;){switch(l[2]||"d"){case"d":case"D":r+=parseInt(l[1],10);break;case"w":case"W":r+=7*parseInt(l[1],10);break;case"m":case"M":o+=parseInt(l[1],10),r=Math.min(r,e.datepicker._getDaysInMonth(a,o));break;case"y":case"Y":a+=parseInt(l[1],10),r=Math.min(r,e.datepicker._getDaysInMonth(a,o))}l=h.exec(i)}return new Date(a,o,r)},o=null==i||""===i?s:"string"==typeof i?a(i):"number"==typeof i?isNaN(i)?s:n(i):new Date(i.getTime());return o=o&&"Invalid Date"==""+o?s:o,o&&(o.setHours(0),o.setMinutes(0),o.setSeconds(0),o.setMilliseconds(0)),this._daylightSavingAdjust(o)},_daylightSavingAdjust:function(e){return e?(e.setHours(e.getHours()>12?e.getHours()+2:0),e):null},_setDate:function(e,t,i){var s=!t,n=e.selectedMonth,a=e.selectedYear,o=this._restrictMinMax(e,this._determineDate(e,t,new Date));e.selectedDay=e.currentDay=o.getDate(),e.drawMonth=e.selectedMonth=e.currentMonth=o.getMonth(),e.drawYear=e.selectedYear=e.currentYear=o.getFullYear(),n===e.selectedMonth&&a===e.selectedYear||i||this._notifyChange(e),this._adjustInstDate(e),e.input&&e.input.val(s?"":this._formatDate(e))},_getDate:function(e){var t=!e.currentYear||e.input&&""===e.input.val()?null:this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));return t},_attachHandlers:function(t){var i=this._get(t,"stepMonths"),s="#"+t.id.replace(/\\\\/g,"\\");t.dpDiv.find("[data-handler]").map(function(){var t={prev:function(){e.datepicker._adjustDate(s,-i,"M")},next:function(){e.datepicker._adjustDate(s,+i,"M")},hide:function(){e.datepicker._hideDatepicker()},today:function(){e.datepicker._gotoToday(s)},selectDay:function(){return e.datepicker._selectDay(s,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return e.datepicker._selectMonthYear(s,this,"M"),!1},selectYear:function(){return e.datepicker._selectMonthYear(s,this,"Y"),!1}};e(this).bind(this.getAttribute("data-event"),t[this.getAttribute("data-handler")])})},_generateHTML:function(e){var t,i,s,n,a,o,r,h,l,u,c,d,p,f,m,g,v,_,b,y,x,w,k,D,T,S,M,N,C,P,A,I,H,z,F,E,W,O,L,R=new Date,j=this._daylightSavingAdjust(new Date(R.getFullYear(),R.getMonth(),R.getDate())),Y=this._get(e,"isRTL"),B=this._get(e,"showButtonPanel"),J=this._get(e,"hideIfNoPrevNext"),K=this._get(e,"navigationAsDateFormat"),U=this._getNumberOfMonths(e),V=this._get(e,"showCurrentAtPos"),q=this._get(e,"stepMonths"),G=1!==U[0]||1!==U[1],X=this._daylightSavingAdjust(e.currentDay?new Date(e.currentYear,e.currentMonth,e.currentDay):new Date(9999,9,9)),$=this._getMinMaxDate(e,"min"),Q=this._getMinMaxDate(e,"max"),Z=e.drawMonth-V,et=e.drawYear;if(0>Z&&(Z+=12,et--),Q)for(t=this._daylightSavingAdjust(new Date(Q.getFullYear(),Q.getMonth()-U[0]*U[1]+1,Q.getDate())),t=$&&$>t?$:t;this._daylightSavingAdjust(new Date(et,Z,1))>t;)Z--,0>Z&&(Z=11,et--);for(e.drawMonth=Z,e.drawYear=et,i=this._get(e,"prevText"),i=K?this.formatDate(i,this._daylightSavingAdjust(new Date(et,Z-q,1)),this._getFormatConfig(e)):i,s=this._canAdjustMonth(e,-1,et,Z)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"e":"w")+"'>"+i+"</span></a>":J?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"e":"w")+"'>"+i+"</span></a>",n=this._get(e,"nextText"),n=K?this.formatDate(n,this._daylightSavingAdjust(new Date(et,Z+q,1)),this._getFormatConfig(e)):n,a=this._canAdjustMonth(e,1,et,Z)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"w":"e")+"'>"+n+"</span></a>":J?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"w":"e")+"'>"+n+"</span></a>",o=this._get(e,"currentText"),r=this._get(e,"gotoCurrent")&&e.currentDay?X:j,o=K?this.formatDate(o,r,this._getFormatConfig(e)):o,h=e.inline?"":"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>"+this._get(e,"closeText")+"</button>",l=B?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(Y?h:"")+(this._isInRange(e,r)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+o+"</button>":"")+(Y?"":h)+"</div>":"",u=parseInt(this._get(e,"firstDay"),10),u=isNaN(u)?0:u,c=this._get(e,"showWeek"),d=this._get(e,"dayNames"),p=this._get(e,"dayNamesMin"),f=this._get(e,"monthNames"),m=this._get(e,"monthNamesShort"),g=this._get(e,"beforeShowDay"),v=this._get(e,"showOtherMonths"),_=this._get(e,"selectOtherMonths"),b=this._getDefaultDate(e),y="",w=0;U[0]>w;w++){for(k="",this.maxRows=4,D=0;U[1]>D;D++){if(T=this._daylightSavingAdjust(new Date(et,Z,e.selectedDay)),S=" ui-corner-all",M="",G){if(M+="<div class='ui-datepicker-group",U[1]>1)switch(D){case 0:M+=" ui-datepicker-group-first",S=" ui-corner-"+(Y?"right":"left");
10
break;case U[1]-1:M+=" ui-datepicker-group-last",S=" ui-corner-"+(Y?"left":"right");break;default:M+=" ui-datepicker-group-middle",S=""}M+="'>"}for(M+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+S+"'>"+(/all|left/.test(S)&&0===w?Y?a:s:"")+(/all|right/.test(S)&&0===w?Y?s:a:"")+this._generateMonthYearHeader(e,Z,et,$,Q,w>0||D>0,f,m)+"</div><table class='ui-datepicker-calendar'><thead>"+"<tr>",N=c?"<th class='ui-datepicker-week-col'>"+this._get(e,"weekHeader")+"</th>":"",x=0;7>x;x++)C=(x+u)%7,N+="<th scope='col'"+((x+u+6)%7>=5?" class='ui-datepicker-week-end'":"")+">"+"<span title='"+d[C]+"'>"+p[C]+"</span></th>";for(M+=N+"</tr></thead><tbody>",P=this._getDaysInMonth(et,Z),et===e.selectedYear&&Z===e.selectedMonth&&(e.selectedDay=Math.min(e.selectedDay,P)),A=(this._getFirstDayOfMonth(et,Z)-u+7)%7,I=Math.ceil((A+P)/7),H=G?this.maxRows>I?this.maxRows:I:I,this.maxRows=H,z=this._daylightSavingAdjust(new Date(et,Z,1-A)),F=0;H>F;F++){for(M+="<tr>",E=c?"<td class='ui-datepicker-week-col'>"+this._get(e,"calculateWeek")(z)+"</td>":"",x=0;7>x;x++)W=g?g.apply(e.input?e.input[0]:null,[z]):[!0,""],O=z.getMonth()!==Z,L=O&&!_||!W[0]||$&&$>z||Q&&z>Q,E+="<td class='"+((x+u+6)%7>=5?" ui-datepicker-week-end":"")+(O?" ui-datepicker-other-month":"")+(z.getTime()===T.getTime()&&Z===e.selectedMonth&&e._keyEvent||b.getTime()===z.getTime()&&b.getTime()===T.getTime()?" "+this._dayOverClass:"")+(L?" "+this._unselectableClass+" ui-state-disabled":"")+(O&&!v?"":" "+W[1]+(z.getTime()===X.getTime()?" "+this._currentClass:"")+(z.getTime()===j.getTime()?" ui-datepicker-today":""))+"'"+(O&&!v||!W[2]?"":" title='"+W[2].replace(/'/g,"&#39;")+"'")+(L?"":" data-handler='selectDay' data-event='click' data-month='"+z.getMonth()+"' data-year='"+z.getFullYear()+"'")+">"+(O&&!v?"&#xa0;":L?"<span class='ui-state-default'>"+z.getDate()+"</span>":"<a class='ui-state-default"+(z.getTime()===j.getTime()?" ui-state-highlight":"")+(z.getTime()===X.getTime()?" ui-state-active":"")+(O?" ui-priority-secondary":"")+"' href='#'>"+z.getDate()+"</a>")+"</td>",z.setDate(z.getDate()+1),z=this._daylightSavingAdjust(z);M+=E+"</tr>"}Z++,Z>11&&(Z=0,et++),M+="</tbody></table>"+(G?"</div>"+(U[0]>0&&D===U[1]-1?"<div class='ui-datepicker-row-break'></div>":""):""),k+=M}y+=k}return y+=l,e._keyEvent=!1,y},_generateMonthYearHeader:function(e,t,i,s,n,a,o,r){var h,l,u,c,d,p,f,m,g=this._get(e,"changeMonth"),v=this._get(e,"changeYear"),_=this._get(e,"showMonthAfterYear"),b="<div class='ui-datepicker-title'>",y="";if(a||!g)y+="<span class='ui-datepicker-month'>"+o[t]+"</span>";else{for(h=s&&s.getFullYear()===i,l=n&&n.getFullYear()===i,y+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",u=0;12>u;u++)(!h||u>=s.getMonth())&&(!l||n.getMonth()>=u)&&(y+="<option value='"+u+"'"+(u===t?" selected='selected'":"")+">"+r[u]+"</option>");y+="</select>"}if(_||(b+=y+(!a&&g&&v?"":"&#xa0;")),!e.yearshtml)if(e.yearshtml="",a||!v)b+="<span class='ui-datepicker-year'>"+i+"</span>";else{for(c=this._get(e,"yearRange").split(":"),d=(new Date).getFullYear(),p=function(e){var t=e.match(/c[+\-].*/)?i+parseInt(e.substring(1),10):e.match(/[+\-].*/)?d+parseInt(e,10):parseInt(e,10);return isNaN(t)?d:t},f=p(c[0]),m=Math.max(f,p(c[1]||"")),f=s?Math.max(f,s.getFullYear()):f,m=n?Math.min(m,n.getFullYear()):m,e.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";m>=f;f++)e.yearshtml+="<option value='"+f+"'"+(f===i?" selected='selected'":"")+">"+f+"</option>";e.yearshtml+="</select>",b+=e.yearshtml,e.yearshtml=null}return b+=this._get(e,"yearSuffix"),_&&(b+=(!a&&g&&v?"":"&#xa0;")+y),b+="</div>"},_adjustInstDate:function(e,t,i){var s=e.drawYear+("Y"===i?t:0),n=e.drawMonth+("M"===i?t:0),a=Math.min(e.selectedDay,this._getDaysInMonth(s,n))+("D"===i?t:0),o=this._restrictMinMax(e,this._daylightSavingAdjust(new Date(s,n,a)));e.selectedDay=o.getDate(),e.drawMonth=e.selectedMonth=o.getMonth(),e.drawYear=e.selectedYear=o.getFullYear(),("M"===i||"Y"===i)&&this._notifyChange(e)},_restrictMinMax:function(e,t){var i=this._getMinMaxDate(e,"min"),s=this._getMinMaxDate(e,"max"),n=i&&i>t?i:t;return s&&n>s?s:n},_notifyChange:function(e){var t=this._get(e,"onChangeMonthYear");t&&t.apply(e.input?e.input[0]:null,[e.selectedYear,e.selectedMonth+1,e])},_getNumberOfMonths:function(e){var t=this._get(e,"numberOfMonths");return null==t?[1,1]:"number"==typeof t?[1,t]:t},_getMinMaxDate:function(e,t){return this._determineDate(e,this._get(e,t+"Date"),null)},_getDaysInMonth:function(e,t){return 32-this._daylightSavingAdjust(new Date(e,t,32)).getDate()},_getFirstDayOfMonth:function(e,t){return new Date(e,t,1).getDay()},_canAdjustMonth:function(e,t,i,s){var n=this._getNumberOfMonths(e),a=this._daylightSavingAdjust(new Date(i,s+(0>t?t:n[0]*n[1]),1));return 0>t&&a.setDate(this._getDaysInMonth(a.getFullYear(),a.getMonth())),this._isInRange(e,a)},_isInRange:function(e,t){var i,s,n=this._getMinMaxDate(e,"min"),a=this._getMinMaxDate(e,"max"),o=null,r=null,h=this._get(e,"yearRange");return h&&(i=h.split(":"),s=(new Date).getFullYear(),o=parseInt(i[0],10),r=parseInt(i[1],10),i[0].match(/[+\-].*/)&&(o+=s),i[1].match(/[+\-].*/)&&(r+=s)),(!n||t.getTime()>=n.getTime())&&(!a||t.getTime()<=a.getTime())&&(!o||t.getFullYear()>=o)&&(!r||r>=t.getFullYear())},_getFormatConfig:function(e){var t=this._get(e,"shortYearCutoff");return t="string"!=typeof t?t:(new Date).getFullYear()%100+parseInt(t,10),{shortYearCutoff:t,dayNamesShort:this._get(e,"dayNamesShort"),dayNames:this._get(e,"dayNames"),monthNamesShort:this._get(e,"monthNamesShort"),monthNames:this._get(e,"monthNames")}},_formatDate:function(e,t,i,s){t||(e.currentDay=e.selectedDay,e.currentMonth=e.selectedMonth,e.currentYear=e.selectedYear);var n=t?"object"==typeof t?t:this._daylightSavingAdjust(new Date(s,i,t)):this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));return this.formatDate(this._get(e,"dateFormat"),n,this._getFormatConfig(e))}}),e.fn.datepicker=function(t){if(!this.length)return this;e.datepicker.initialized||(e(document).mousedown(e.datepicker._checkExternalClick),e.datepicker.initialized=!0),0===e("#"+e.datepicker._mainDivId).length&&e("body").append(e.datepicker.dpDiv);var i=Array.prototype.slice.call(arguments,1);return"string"!=typeof t||"isDisabled"!==t&&"getDate"!==t&&"widget"!==t?"option"===t&&2===arguments.length&&"string"==typeof arguments[1]?e.datepicker["_"+t+"Datepicker"].apply(e.datepicker,[this[0]].concat(i)):this.each(function(){"string"==typeof t?e.datepicker["_"+t+"Datepicker"].apply(e.datepicker,[this].concat(i)):e.datepicker._attachDatepicker(this,t)}):e.datepicker["_"+t+"Datepicker"].apply(e.datepicker,[this[0]].concat(i))},e.datepicker=new n,e.datepicker.initialized=!1,e.datepicker.uuid=(new Date).getTime(),e.datepicker.version="1.11.4",e.datepicker,e.widget("ui.progressbar",{version:"1.11.4",options:{max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue(),this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min}),this.valueDiv=e("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element),this._refreshValue()},_destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.valueDiv.remove()},value:function(e){return void 0===e?this.options.value:(this.options.value=this._constrainedValue(e),this._refreshValue(),void 0)},_constrainedValue:function(e){return void 0===e&&(e=this.options.value),this.indeterminate=e===!1,"number"!=typeof e&&(e=0),this.indeterminate?!1:Math.min(this.options.max,Math.max(this.min,e))},_setOptions:function(e){var t=e.value;delete e.value,this._super(e),this.options.value=this._constrainedValue(t),this._refreshValue()},_setOption:function(e,t){"max"===e&&(t=Math.max(this.min,t)),"disabled"===e&&this.element.toggleClass("ui-state-disabled",!!t).attr("aria-disabled",t),this._super(e,t)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var t=this.options.value,i=this._percentage();this.valueDiv.toggle(this.indeterminate||t>this.min).toggleClass("ui-corner-right",t===this.options.max).width(i.toFixed(0)+"%"),this.element.toggleClass("ui-progressbar-indeterminate",this.indeterminate),this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=e("<div class='ui-progressbar-overlay'></div>").appendTo(this.valueDiv))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":t}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),this.oldValue!==t&&(this.oldValue=t,this._trigger("change")),t===this.options.max&&this._trigger("complete")}}),e.widget("ui.slider",e.ui.mouse,{version:"1.11.4",widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},numPages:5,_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this._calculateNewMax(),this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget"+" ui-widget-content"+" ui-corner-all"),this._refresh(),this._setOption("disabled",this.options.disabled),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var t,i,s=this.options,n=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),a="<span class='ui-slider-handle ui-state-default ui-corner-all' tabindex='0'></span>",o=[];for(i=s.values&&s.values.length||1,n.length>i&&(n.slice(i).remove(),n=n.slice(0,i)),t=n.length;i>t;t++)o.push(a);this.handles=n.add(e(o.join("")).appendTo(this.element)),this.handle=this.handles.eq(0),this.handles.each(function(t){e(this).data("ui-slider-handle-index",t)})},_createRange:function(){var t=this.options,i="";t.range?(t.range===!0&&(t.values?t.values.length&&2!==t.values.length?t.values=[t.values[0],t.values[0]]:e.isArray(t.values)&&(t.values=t.values.slice(0)):t.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?this.range.removeClass("ui-slider-range-min ui-slider-range-max").css({left:"",bottom:""}):(this.range=e("<div></div>").appendTo(this.element),i="ui-slider-range ui-widget-header ui-corner-all"),this.range.addClass(i+("min"===t.range||"max"===t.range?" ui-slider-range-"+t.range:""))):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){this._off(this.handles),this._on(this.handles,this._handleEvents),this._hoverable(this.handles),this._focusable(this.handles)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-widget ui-widget-content ui-corner-all"),this._mouseDestroy()},_mouseCapture:function(t){var i,s,n,a,o,r,h,l,u=this,c=this.options;return c.disabled?!1:(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),i={x:t.pageX,y:t.pageY},s=this._normValueFromMouse(i),n=this._valueMax()-this._valueMin()+1,this.handles.each(function(t){var i=Math.abs(s-u.values(t));(n>i||n===i&&(t===u._lastChangedValue||u.values(t)===c.min))&&(n=i,a=e(this),o=t)}),r=this._start(t,o),r===!1?!1:(this._mouseSliding=!0,this._handleIndex=o,a.addClass("ui-state-active").focus(),h=a.offset(),l=!e(t.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=l?{left:0,top:0}:{left:t.pageX-h.left-a.width()/2,top:t.pageY-h.top-a.height()/2-(parseInt(a.css("borderTopWidth"),10)||0)-(parseInt(a.css("borderBottomWidth"),10)||0)+(parseInt(a.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(t,o,s),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(e){var t={x:e.pageX,y:e.pageY},i=this._normValueFromMouse(t);return this._slide(e,this._handleIndex,i),!1},_mouseStop:function(e){return this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(e,this._handleIndex),this._change(e,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(e){var t,i,s,n,a;return"horizontal"===this.orientation?(t=this.elementSize.width,i=e.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(t=this.elementSize.height,i=e.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),s=i/t,s>1&&(s=1),0>s&&(s=0),"vertical"===this.orientation&&(s=1-s),n=this._valueMax()-this._valueMin(),a=this._valueMin()+s*n,this._trimAlignValue(a)},_start:function(e,t){var i={handle:this.handles[t],value:this.value()};return this.options.values&&this.options.values.length&&(i.value=this.values(t),i.values=this.values()),this._trigger("start",e,i)},_slide:function(e,t,i){var s,n,a;this.options.values&&this.options.values.length?(s=this.values(t?0:1),2===this.options.values.length&&this.options.range===!0&&(0===t&&i>s||1===t&&s>i)&&(i=s),i!==this.values(t)&&(n=this.values(),n[t]=i,a=this._trigger("slide",e,{handle:this.handles[t],value:i,values:n}),s=this.values(t?0:1),a!==!1&&this.values(t,i))):i!==this.value()&&(a=this._trigger("slide",e,{handle:this.handles[t],value:i}),a!==!1&&this.value(i))},_stop:function(e,t){var i={handle:this.handles[t],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(t),i.values=this.values()),this._trigger("stop",e,i)},_change:function(e,t){if(!this._keySliding&&!this._mouseSliding){var i={handle:this.handles[t],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(t),i.values=this.values()),this._lastChangedValue=t,this._trigger("change",e,i)}},value:function(e){return arguments.length?(this.options.value=this._trimAlignValue(e),this._refreshValue(),this._change(null,0),void 0):this._value()},values:function(t,i){var s,n,a;if(arguments.length>1)return this.options.values[t]=this._trimAlignValue(i),this._refreshValue(),this._change(null,t),void 0;if(!arguments.length)return this._values();if(!e.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(t):this.value();for(s=this.options.values,n=arguments[0],a=0;s.length>a;a+=1)s[a]=this._trimAlignValue(n[a]),this._change(null,a);this._refreshValue()},_setOption:function(t,i){var s,n=0;switch("range"===t&&this.options.range===!0&&("min"===i?(this.options.value=this._values(0),this.options.values=null):"max"===i&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),e.isArray(this.options.values)&&(n=this.options.values.length),"disabled"===t&&this.element.toggleClass("ui-state-disabled",!!i),this._super(t,i),t){case"orientation":this._detectOrientation(),this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation),this._refreshValue(),this.handles.css("horizontal"===i?"bottom":"left","");break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),s=0;n>s;s+=1)this._change(null,s);this._animateOff=!1;break;case"step":case"min":case"max":this._animateOff=!0,this._calculateNewMax(),this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_value:function(){var e=this.options.value;return e=this._trimAlignValue(e)},_values:function(e){var t,i,s;if(arguments.length)return t=this.options.values[e],t=this._trimAlignValue(t);if(this.options.values&&this.options.values.length){for(i=this.options.values.slice(),s=0;i.length>s;s+=1)i[s]=this._trimAlignValue(i[s]);return i}return[]},_trimAlignValue:function(e){if(this._valueMin()>=e)return this._valueMin();if(e>=this._valueMax())return this._valueMax();var t=this.options.step>0?this.options.step:1,i=(e-this._valueMin())%t,s=e-i;return 2*Math.abs(i)>=t&&(s+=i>0?t:-t),parseFloat(s.toFixed(5))},_calculateNewMax:function(){var e=this.options.max,t=this._valueMin(),i=this.options.step,s=Math.floor(+(e-t).toFixed(this._precision())/i)*i;e=s+t,this.max=parseFloat(e.toFixed(this._precision()))},_precision:function(){var e=this._precisionOf(this.options.step);return null!==this.options.min&&(e=Math.max(e,this._precisionOf(this.options.min))),e},_precisionOf:function(e){var t=""+e,i=t.indexOf(".");return-1===i?0:t.length-i-1},_valueMin:function(){return this.options.min},_valueMax:function(){return this.max},_refreshValue:function(){var t,i,s,n,a,o=this.options.range,r=this.options,h=this,l=this._animateOff?!1:r.animate,u={};this.options.values&&this.options.values.length?this.handles.each(function(s){i=100*((h.values(s)-h._valueMin())/(h._valueMax()-h._valueMin())),u["horizontal"===h.orientation?"left":"bottom"]=i+"%",e(this).stop(1,1)[l?"animate":"css"](u,r.animate),h.options.range===!0&&("horizontal"===h.orientation?(0===s&&h.range.stop(1,1)[l?"animate":"css"]({left:i+"%"},r.animate),1===s&&h.range[l?"animate":"css"]({width:i-t+"%"},{queue:!1,duration:r.animate})):(0===s&&h.range.stop(1,1)[l?"animate":"css"]({bottom:i+"%"},r.animate),1===s&&h.range[l?"animate":"css"]({height:i-t+"%"},{queue:!1,duration:r.animate}))),t=i}):(s=this.value(),n=this._valueMin(),a=this._valueMax(),i=a!==n?100*((s-n)/(a-n)):0,u["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[l?"animate":"css"](u,r.animate),"min"===o&&"horizontal"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({width:i+"%"},r.animate),"max"===o&&"horizontal"===this.orientation&&this.range[l?"animate":"css"]({width:100-i+"%"},{queue:!1,duration:r.animate}),"min"===o&&"vertical"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({height:i+"%"},r.animate),"max"===o&&"vertical"===this.orientation&&this.range[l?"animate":"css"]({height:100-i+"%"},{queue:!1,duration:r.animate}))},_handleEvents:{keydown:function(t){var i,s,n,a,o=e(t.target).data("ui-slider-handle-index");switch(t.keyCode){case e.ui.keyCode.HOME:case e.ui.keyCode.END:case e.ui.keyCode.PAGE_UP:case e.ui.keyCode.PAGE_DOWN:case e.ui.keyCode.UP:case e.ui.keyCode.RIGHT:case e.ui.keyCode.DOWN:case e.ui.keyCode.LEFT:if(t.preventDefault(),!this._keySliding&&(this._keySliding=!0,e(t.target).addClass("ui-state-active"),i=this._start(t,o),i===!1))return}switch(a=this.options.step,s=n=this.options.values&&this.options.values.length?this.values(o):this.value(),t.keyCode){case e.ui.keyCode.HOME:n=this._valueMin();break;case e.ui.keyCode.END:n=this._valueMax();break;case e.ui.keyCode.PAGE_UP:n=this._trimAlignValue(s+(this._valueMax()-this._valueMin())/this.numPages);break;case e.ui.keyCode.PAGE_DOWN:n=this._trimAlignValue(s-(this._valueMax()-this._valueMin())/this.numPages);break;case e.ui.keyCode.UP:case e.ui.keyCode.RIGHT:if(s===this._valueMax())return;n=this._trimAlignValue(s+a);break;case e.ui.keyCode.DOWN:case e.ui.keyCode.LEFT:if(s===this._valueMin())return;n=this._trimAlignValue(s-a)}this._slide(t,o,n)},keyup:function(t){var i=e(t.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(t,i),this._change(t,i),e(t.target).removeClass("ui-state-active"))}}}),e.widget("ui.tabs",{version:"1.11.4",delay:300,options:{active:null,collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_isLocal:function(){var e=/#.*$/;return function(t){var i,s;t=t.cloneNode(!1),i=t.href.replace(e,""),s=location.href.replace(e,"");try{i=decodeURIComponent(i)}catch(n){}try{s=decodeURIComponent(s)}catch(n){}return t.hash.length>1&&i===s}}(),_create:function(){var t=this,i=this.options;this.running=!1,this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all").toggleClass("ui-tabs-collapsible",i.collapsible),this._processTabs(),i.active=this._initialActive(),e.isArray(i.disabled)&&(i.disabled=e.unique(i.disabled.concat(e.map(this.tabs.filter(".ui-state-disabled"),function(e){return t.tabs.index(e)}))).sort()),this.active=this.options.active!==!1&&this.anchors.length?this._findActive(i.active):e(),this._refresh(),this.active.length&&this.load(i.active)},_initialActive:function(){var t=this.options.active,i=this.options.collapsible,s=location.hash.substring(1);return null===t&&(s&&this.tabs.each(function(i,n){return e(n).attr("aria-controls")===s?(t=i,!1):void 0}),null===t&&(t=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),(null===t||-1===t)&&(t=this.tabs.length?0:!1)),t!==!1&&(t=this.tabs.index(this.tabs.eq(t)),-1===t&&(t=i?!1:0)),!i&&t===!1&&this.anchors.length&&(t=0),t},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):e()}},_tabKeydown:function(t){var i=e(this.document[0].activeElement).closest("li"),s=this.tabs.index(i),n=!0;if(!this._handlePageNav(t)){switch(t.keyCode){case e.ui.keyCode.RIGHT:case e.ui.keyCode.DOWN:s++;break;case e.ui.keyCode.UP:case e.ui.keyCode.LEFT:n=!1,s--;break;case e.ui.keyCode.END:s=this.anchors.length-1;break;case e.ui.keyCode.HOME:s=0;break;case e.ui.keyCode.SPACE:return t.preventDefault(),clearTimeout(this.activating),this._activate(s),void 0;case e.ui.keyCode.ENTER:return t.preventDefault(),clearTimeout(this.activating),this._activate(s===this.options.active?!1:s),void 0;default:return}t.preventDefault(),clearTimeout(this.activating),s=this._focusNextTab(s,n),t.ctrlKey||t.metaKey||(i.attr("aria-selected","false"),this.tabs.eq(s).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",s)},this.delay))}},_panelKeydown:function(t){this._handlePageNav(t)||t.ctrlKey&&t.keyCode===e.ui.keyCode.UP&&(t.preventDefault(),this.active.focus())},_handlePageNav:function(t){return t.altKey&&t.keyCode===e.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):t.altKey&&t.keyCode===e.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):void 0},_findNextTab:function(t,i){function s(){return t>n&&(t=0),0>t&&(t=n),t}for(var n=this.tabs.length-1;-1!==e.inArray(s(),this.options.disabled);)t=i?t+1:t-1;return t},_focusNextTab:function(e,t){return e=this._findNextTab(e,t),this.tabs.eq(e).focus(),e},_setOption:function(e,t){return"active"===e?(this._activate(t),void 0):"disabled"===e?(this._setupDisabled(t),void 0):(this._super(e,t),"collapsible"===e&&(this.element.toggleClass("ui-tabs-collapsible",t),t||this.options.active!==!1||this._activate(0)),"event"===e&&this._setupEvents(t),"heightStyle"===e&&this._setupHeightStyle(t),void 0)},_sanitizeSelector:function(e){return e?e.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var t=this.options,i=this.tablist.children(":has(a[href])");t.disabled=e.map(i.filter(".ui-state-disabled"),function(e){return i.index(e)}),this._processTabs(),t.active!==!1&&this.anchors.length?this.active.length&&!e.contains(this.tablist[0],this.active[0])?this.tabs.length===t.disabled.length?(t.active=!1,this.active=e()):this._activate(this._findNextTab(Math.max(0,t.active-1),!1)):t.active=this.tabs.index(this.active):(t.active=!1,this.active=e()),this._refresh()},_refresh:function(){this._setupDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-hidden":"true"}),this.active.length?(this.active.addClass("ui-tabs-active ui-state-active").attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}),this._getPanelForTab(this.active).show().attr({"aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var t=this,i=this.tabs,s=this.anchors,n=this.panels;this.tablist=this._getList().addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").attr("role","tablist").delegate("> li","mousedown"+this.eventNamespace,function(t){e(this).is(".ui-state-disabled")&&t.preventDefault()}).delegate(".ui-tabs-anchor","focus"+this.eventNamespace,function(){e(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this.tabs=this.tablist.find("> li:has(a[href])").addClass("ui-state-default ui-corner-top").attr({role:"tab",tabIndex:-1}),this.anchors=this.tabs.map(function(){return e("a",this)[0]}).addClass("ui-tabs-anchor").attr({role:"presentation",tabIndex:-1}),this.panels=e(),this.anchors.each(function(i,s){var n,a,o,r=e(s).uniqueId().attr("id"),h=e(s).closest("li"),l=h.attr("aria-controls");t._isLocal(s)?(n=s.hash,o=n.substring(1),a=t.element.find(t._sanitizeSelector(n))):(o=h.attr("aria-controls")||e({}).uniqueId()[0].id,n="#"+o,a=t.element.find(n),a.length||(a=t._createPanel(o),a.insertAfter(t.panels[i-1]||t.tablist)),a.attr("aria-live","polite")),a.length&&(t.panels=t.panels.add(a)),l&&h.data("ui-tabs-aria-controls",l),h.attr({"aria-controls":o,"aria-labelledby":r}),a.attr("aria-labelledby",r)}),this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").attr("role","tabpanel"),i&&(this._off(i.not(this.tabs)),this._off(s.not(this.anchors)),this._off(n.not(this.panels)))},_getList:function(){return this.tablist||this.element.find("ol,ul").eq(0)},_createPanel:function(t){return e("<div>").attr("id",t).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy",!0)},_setupDisabled:function(t){e.isArray(t)&&(t.length?t.length===this.anchors.length&&(t=!0):t=!1);for(var i,s=0;i=this.tabs[s];s++)t===!0||-1!==e.inArray(s,t)?e(i).addClass("ui-state-disabled").attr("aria-disabled","true"):e(i).removeClass("ui-state-disabled").removeAttr("aria-disabled");this.options.disabled=t},_setupEvents:function(t){var i={};t&&e.each(t.split(" "),function(e,t){i[t]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(!0,this.anchors,{click:function(e){e.preventDefault()}}),this._on(this.anchors,i),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(t){var i,s=this.element.parent();"fill"===t?(i=s.height(),i-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var t=e(this),s=t.css("position");"absolute"!==s&&"fixed"!==s&&(i-=t.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){i-=e(this).outerHeight(!0)}),this.panels.each(function(){e(this).height(Math.max(0,i-e(this).innerHeight()+e(this).height()))}).css("overflow","auto")):"auto"===t&&(i=0,this.panels.each(function(){i=Math.max(i,e(this).height("").height())}).height(i))},_eventHandler:function(t){var i=this.options,s=this.active,n=e(t.currentTarget),a=n.closest("li"),o=a[0]===s[0],r=o&&i.collapsible,h=r?e():this._getPanelForTab(a),l=s.length?this._getPanelForTab(s):e(),u={oldTab:s,oldPanel:l,newTab:r?e():a,newPanel:h};t.preventDefault(),a.hasClass("ui-state-disabled")||a.hasClass("ui-tabs-loading")||this.running||o&&!i.collapsible||this._trigger("beforeActivate",t,u)===!1||(i.active=r?!1:this.tabs.index(a),this.active=o?e():a,this.xhr&&this.xhr.abort(),l.length||h.length||e.error("jQuery UI Tabs: Mismatching fragment identifier."),h.length&&this.load(this.tabs.index(a),t),this._toggle(t,u))},_toggle:function(t,i){function s(){a.running=!1,a._trigger("activate",t,i)}function n(){i.newTab.closest("li").addClass("ui-tabs-active ui-state-active"),o.length&&a.options.show?a._show(o,a.options.show,s):(o.show(),s())}var a=this,o=i.newPanel,r=i.oldPanel;this.running=!0,r.length&&this.options.hide?this._hide(r,this.options.hide,function(){i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),n()}):(i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),r.hide(),n()),r.attr("aria-hidden","true"),i.oldTab.attr({"aria-selected":"false","aria-expanded":"false"}),o.length&&r.length?i.oldTab.attr("tabIndex",-1):o.length&&this.tabs.filter(function(){return 0===e(this).attr("tabIndex")}).attr("tabIndex",-1),o.attr("aria-hidden","false"),i.newTab.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_activate:function(t){var i,s=this._findActive(t);s[0]!==this.active[0]&&(s.length||(s=this.active),i=s.find(".ui-tabs-anchor")[0],this._eventHandler({target:i,currentTarget:i,preventDefault:e.noop}))},_findActive:function(t){return t===!1?e():this.tabs.eq(t)},_getIndex:function(e){return"string"==typeof e&&(e=this.anchors.index(this.anchors.filter("[href$='"+e+"']"))),e},_destroy:function(){this.xhr&&this.xhr.abort(),this.element.removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible"),this.tablist.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").removeAttr("role"),this.anchors.removeClass("ui-tabs-anchor").removeAttr("role").removeAttr("tabIndex").removeUniqueId(),this.tablist.unbind(this.eventNamespace),this.tabs.add(this.panels).each(function(){e.data(this,"ui-tabs-destroy")?e(this).remove():e(this).removeClass("ui-state-default ui-state-active ui-state-disabled ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel").removeAttr("tabIndex").removeAttr("aria-live").removeAttr("aria-busy").removeAttr("aria-selected").removeAttr("aria-labelledby").removeAttr("aria-hidden").removeAttr("aria-expanded").removeAttr("role")}),this.tabs.each(function(){var t=e(this),i=t.data("ui-tabs-aria-controls");i?t.attr("aria-controls",i).removeData("ui-tabs-aria-controls"):t.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(t){var i=this.options.disabled;i!==!1&&(void 0===t?i=!1:(t=this._getIndex(t),i=e.isArray(i)?e.map(i,function(e){return e!==t?e:null}):e.map(this.tabs,function(e,i){return i!==t?i:null})),this._setupDisabled(i))},disable:function(t){var i=this.options.disabled;if(i!==!0){if(void 0===t)i=!0;else{if(t=this._getIndex(t),-1!==e.inArray(t,i))return;i=e.isArray(i)?e.merge([t],i).sort():[t]}this._setupDisabled(i)}},load:function(t,i){t=this._getIndex(t);var s=this,n=this.tabs.eq(t),a=n.find(".ui-tabs-anchor"),o=this._getPanelForTab(n),r={tab:n,panel:o},h=function(e,t){"abort"===t&&s.panels.stop(!1,!0),n.removeClass("ui-tabs-loading"),o.removeAttr("aria-busy"),e===s.xhr&&delete s.xhr};this._isLocal(a[0])||(this.xhr=e.ajax(this._ajaxSettings(a,i,r)),this.xhr&&"canceled"!==this.xhr.statusText&&(n.addClass("ui-tabs-loading"),o.attr("aria-busy","true"),this.xhr.done(function(e,t,n){setTimeout(function(){o.html(e),s._trigger("load",i,r),h(n,t)},1)}).fail(function(e,t){setTimeout(function(){h(e,t)},1)})))},_ajaxSettings:function(t,i,s){var n=this;return{url:t.attr("href"),beforeSend:function(t,a){return n._trigger("beforeLoad",i,e.extend({jqXHR:t,ajaxSettings:a},s))}}},_getPanelForTab:function(t){var i=e(t).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+i))}});var v="ui-effects-",_=e;e.effects={effect:{}},function(e,t){function i(e,t,i){var s=c[t.type]||{};return null==e?i||!t.def?null:t.def:(e=s.floor?~~e:parseFloat(e),isNaN(e)?t.def:s.mod?(e+s.mod)%s.mod:0>e?0:e>s.max?s.max:e)}function s(i){var s=l(),n=s._rgba=[];return i=i.toLowerCase(),f(h,function(e,a){var o,r=a.re.exec(i),h=r&&a.parse(r),l=a.space||"rgba";return h?(o=s[l](h),s[u[l].cache]=o[u[l].cache],n=s._rgba=o._rgba,!1):t}),n.length?("0,0,0,0"===n.join()&&e.extend(n,a.transparent),s):a[i]}function n(e,t,i){return i=(i+1)%1,1>6*i?e+6*(t-e)*i:1>2*i?t:2>3*i?e+6*(t-e)*(2/3-i):e}var a,o="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",r=/^([\-+])=\s*(\d+\.?\d*)/,h=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(e){return[e[1],e[2],e[3],e[4]]
11
}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(e){return[2.55*e[1],2.55*e[2],2.55*e[3],e[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(e){return[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(e){return[parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(e){return[e[1],e[2]/100,e[3]/100,e[4]]}}],l=e.Color=function(t,i,s,n){return new e.Color.fn.parse(t,i,s,n)},u={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},c={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},d=l.support={},p=e("<p>")[0],f=e.each;p.style.cssText="background-color:rgba(1,1,1,.5)",d.rgba=p.style.backgroundColor.indexOf("rgba")>-1,f(u,function(e,t){t.cache="_"+e,t.props.alpha={idx:3,type:"percent",def:1}}),l.fn=e.extend(l.prototype,{parse:function(n,o,r,h){if(n===t)return this._rgba=[null,null,null,null],this;(n.jquery||n.nodeType)&&(n=e(n).css(o),o=t);var c=this,d=e.type(n),p=this._rgba=[];return o!==t&&(n=[n,o,r,h],d="array"),"string"===d?this.parse(s(n)||a._default):"array"===d?(f(u.rgba.props,function(e,t){p[t.idx]=i(n[t.idx],t)}),this):"object"===d?(n instanceof l?f(u,function(e,t){n[t.cache]&&(c[t.cache]=n[t.cache].slice())}):f(u,function(t,s){var a=s.cache;f(s.props,function(e,t){if(!c[a]&&s.to){if("alpha"===e||null==n[e])return;c[a]=s.to(c._rgba)}c[a][t.idx]=i(n[e],t,!0)}),c[a]&&0>e.inArray(null,c[a].slice(0,3))&&(c[a][3]=1,s.from&&(c._rgba=s.from(c[a])))}),this):t},is:function(e){var i=l(e),s=!0,n=this;return f(u,function(e,a){var o,r=i[a.cache];return r&&(o=n[a.cache]||a.to&&a.to(n._rgba)||[],f(a.props,function(e,i){return null!=r[i.idx]?s=r[i.idx]===o[i.idx]:t})),s}),s},_space:function(){var e=[],t=this;return f(u,function(i,s){t[s.cache]&&e.push(i)}),e.pop()},transition:function(e,t){var s=l(e),n=s._space(),a=u[n],o=0===this.alpha()?l("transparent"):this,r=o[a.cache]||a.to(o._rgba),h=r.slice();return s=s[a.cache],f(a.props,function(e,n){var a=n.idx,o=r[a],l=s[a],u=c[n.type]||{};null!==l&&(null===o?h[a]=l:(u.mod&&(l-o>u.mod/2?o+=u.mod:o-l>u.mod/2&&(o-=u.mod)),h[a]=i((l-o)*t+o,n)))}),this[n](h)},blend:function(t){if(1===this._rgba[3])return this;var i=this._rgba.slice(),s=i.pop(),n=l(t)._rgba;return l(e.map(i,function(e,t){return(1-s)*n[t]+s*e}))},toRgbaString:function(){var t="rgba(",i=e.map(this._rgba,function(e,t){return null==e?t>2?1:0:e});return 1===i[3]&&(i.pop(),t="rgb("),t+i.join()+")"},toHslaString:function(){var t="hsla(",i=e.map(this.hsla(),function(e,t){return null==e&&(e=t>2?1:0),t&&3>t&&(e=Math.round(100*e)+"%"),e});return 1===i[3]&&(i.pop(),t="hsl("),t+i.join()+")"},toHexString:function(t){var i=this._rgba.slice(),s=i.pop();return t&&i.push(~~(255*s)),"#"+e.map(i,function(e){return e=(e||0).toString(16),1===e.length?"0"+e:e}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),l.fn.parse.prototype=l.fn,u.hsla.to=function(e){if(null==e[0]||null==e[1]||null==e[2])return[null,null,null,e[3]];var t,i,s=e[0]/255,n=e[1]/255,a=e[2]/255,o=e[3],r=Math.max(s,n,a),h=Math.min(s,n,a),l=r-h,u=r+h,c=.5*u;return t=h===r?0:s===r?60*(n-a)/l+360:n===r?60*(a-s)/l+120:60*(s-n)/l+240,i=0===l?0:.5>=c?l/u:l/(2-u),[Math.round(t)%360,i,c,null==o?1:o]},u.hsla.from=function(e){if(null==e[0]||null==e[1]||null==e[2])return[null,null,null,e[3]];var t=e[0]/360,i=e[1],s=e[2],a=e[3],o=.5>=s?s*(1+i):s+i-s*i,r=2*s-o;return[Math.round(255*n(r,o,t+1/3)),Math.round(255*n(r,o,t)),Math.round(255*n(r,o,t-1/3)),a]},f(u,function(s,n){var a=n.props,o=n.cache,h=n.to,u=n.from;l.fn[s]=function(s){if(h&&!this[o]&&(this[o]=h(this._rgba)),s===t)return this[o].slice();var n,r=e.type(s),c="array"===r||"object"===r?s:arguments,d=this[o].slice();return f(a,function(e,t){var s=c["object"===r?e:t.idx];null==s&&(s=d[t.idx]),d[t.idx]=i(s,t)}),u?(n=l(u(d)),n[o]=d,n):l(d)},f(a,function(t,i){l.fn[t]||(l.fn[t]=function(n){var a,o=e.type(n),h="alpha"===t?this._hsla?"hsla":"rgba":s,l=this[h](),u=l[i.idx];return"undefined"===o?u:("function"===o&&(n=n.call(this,u),o=e.type(n)),null==n&&i.empty?this:("string"===o&&(a=r.exec(n),a&&(n=u+parseFloat(a[2])*("+"===a[1]?1:-1))),l[i.idx]=n,this[h](l)))})})}),l.hook=function(t){var i=t.split(" ");f(i,function(t,i){e.cssHooks[i]={set:function(t,n){var a,o,r="";if("transparent"!==n&&("string"!==e.type(n)||(a=s(n)))){if(n=l(a||n),!d.rgba&&1!==n._rgba[3]){for(o="backgroundColor"===i?t.parentNode:t;(""===r||"transparent"===r)&&o&&o.style;)try{r=e.css(o,"backgroundColor"),o=o.parentNode}catch(h){}n=n.blend(r&&"transparent"!==r?r:"_default")}n=n.toRgbaString()}try{t.style[i]=n}catch(h){}}},e.fx.step[i]=function(t){t.colorInit||(t.start=l(t.elem,i),t.end=l(t.end),t.colorInit=!0),e.cssHooks[i].set(t.elem,t.start.transition(t.end,t.pos))}})},l.hook(o),e.cssHooks.borderColor={expand:function(e){var t={};return f(["Top","Right","Bottom","Left"],function(i,s){t["border"+s+"Color"]=e}),t}},a=e.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(_),function(){function t(t){var i,s,n=t.ownerDocument.defaultView?t.ownerDocument.defaultView.getComputedStyle(t,null):t.currentStyle,a={};if(n&&n.length&&n[0]&&n[n[0]])for(s=n.length;s--;)i=n[s],"string"==typeof n[i]&&(a[e.camelCase(i)]=n[i]);else for(i in n)"string"==typeof n[i]&&(a[i]=n[i]);return a}function i(t,i){var s,a,o={};for(s in i)a=i[s],t[s]!==a&&(n[s]||(e.fx.step[s]||!isNaN(parseFloat(a)))&&(o[s]=a));return o}var s=["add","remove","toggle"],n={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};e.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(t,i){e.fx.step[i]=function(e){("none"!==e.end&&!e.setAttr||1===e.pos&&!e.setAttr)&&(_.style(e.elem,i,e.end),e.setAttr=!0)}}),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e.effects.animateClass=function(n,a,o,r){var h=e.speed(a,o,r);return this.queue(function(){var a,o=e(this),r=o.attr("class")||"",l=h.children?o.find("*").addBack():o;l=l.map(function(){var i=e(this);return{el:i,start:t(this)}}),a=function(){e.each(s,function(e,t){n[t]&&o[t+"Class"](n[t])})},a(),l=l.map(function(){return this.end=t(this.el[0]),this.diff=i(this.start,this.end),this}),o.attr("class",r),l=l.map(function(){var t=this,i=e.Deferred(),s=e.extend({},h,{queue:!1,complete:function(){i.resolve(t)}});return this.el.animate(this.diff,s),i.promise()}),e.when.apply(e,l.get()).done(function(){a(),e.each(arguments,function(){var t=this.el;e.each(this.diff,function(e){t.css(e,"")})}),h.complete.call(o[0])})})},e.fn.extend({addClass:function(t){return function(i,s,n,a){return s?e.effects.animateClass.call(this,{add:i},s,n,a):t.apply(this,arguments)}}(e.fn.addClass),removeClass:function(t){return function(i,s,n,a){return arguments.length>1?e.effects.animateClass.call(this,{remove:i},s,n,a):t.apply(this,arguments)}}(e.fn.removeClass),toggleClass:function(t){return function(i,s,n,a,o){return"boolean"==typeof s||void 0===s?n?e.effects.animateClass.call(this,s?{add:i}:{remove:i},n,a,o):t.apply(this,arguments):e.effects.animateClass.call(this,{toggle:i},s,n,a)}}(e.fn.toggleClass),switchClass:function(t,i,s,n,a){return e.effects.animateClass.call(this,{add:i,remove:t},s,n,a)}})}(),function(){function t(t,i,s,n){return e.isPlainObject(t)&&(i=t,t=t.effect),t={effect:t},null==i&&(i={}),e.isFunction(i)&&(n=i,s=null,i={}),("number"==typeof i||e.fx.speeds[i])&&(n=s,s=i,i={}),e.isFunction(s)&&(n=s,s=null),i&&e.extend(t,i),s=s||i.duration,t.duration=e.fx.off?0:"number"==typeof s?s:s in e.fx.speeds?e.fx.speeds[s]:e.fx.speeds._default,t.complete=n||i.complete,t}function i(t){return!t||"number"==typeof t||e.fx.speeds[t]?!0:"string"!=typeof t||e.effects.effect[t]?e.isFunction(t)?!0:"object"!=typeof t||t.effect?!1:!0:!0}e.extend(e.effects,{version:"1.11.4",save:function(e,t){for(var i=0;t.length>i;i++)null!==t[i]&&e.data(v+t[i],e[0].style[t[i]])},restore:function(e,t){var i,s;for(s=0;t.length>s;s++)null!==t[s]&&(i=e.data(v+t[s]),void 0===i&&(i=""),e.css(t[s],i))},setMode:function(e,t){return"toggle"===t&&(t=e.is(":hidden")?"show":"hide"),t},getBaseline:function(e,t){var i,s;switch(e[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=e[0]/t.height}switch(e[1]){case"left":s=0;break;case"center":s=.5;break;case"right":s=1;break;default:s=e[1]/t.width}return{x:s,y:i}},createWrapper:function(t){if(t.parent().is(".ui-effects-wrapper"))return t.parent();var i={width:t.outerWidth(!0),height:t.outerHeight(!0),"float":t.css("float")},s=e("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),n={width:t.width(),height:t.height()},a=document.activeElement;try{a.id}catch(o){a=document.body}return t.wrap(s),(t[0]===a||e.contains(t[0],a))&&e(a).focus(),s=t.parent(),"static"===t.css("position")?(s.css({position:"relative"}),t.css({position:"relative"})):(e.extend(i,{position:t.css("position"),zIndex:t.css("z-index")}),e.each(["top","left","bottom","right"],function(e,s){i[s]=t.css(s),isNaN(parseInt(i[s],10))&&(i[s]="auto")}),t.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),t.css(n),s.css(i).show()},removeWrapper:function(t){var i=document.activeElement;return t.parent().is(".ui-effects-wrapper")&&(t.parent().replaceWith(t),(t[0]===i||e.contains(t[0],i))&&e(i).focus()),t},setTransition:function(t,i,s,n){return n=n||{},e.each(i,function(e,i){var a=t.cssUnit(i);a[0]>0&&(n[i]=a[0]*s+a[1])}),n}}),e.fn.extend({effect:function(){function i(t){function i(){e.isFunction(a)&&a.call(n[0]),e.isFunction(t)&&t()}var n=e(this),a=s.complete,r=s.mode;(n.is(":hidden")?"hide"===r:"show"===r)?(n[r](),i()):o.call(n[0],s,i)}var s=t.apply(this,arguments),n=s.mode,a=s.queue,o=e.effects.effect[s.effect];return e.fx.off||!o?n?this[n](s.duration,s.complete):this.each(function(){s.complete&&s.complete.call(this)}):a===!1?this.each(i):this.queue(a||"fx",i)},show:function(e){return function(s){if(i(s))return e.apply(this,arguments);var n=t.apply(this,arguments);return n.mode="show",this.effect.call(this,n)}}(e.fn.show),hide:function(e){return function(s){if(i(s))return e.apply(this,arguments);var n=t.apply(this,arguments);return n.mode="hide",this.effect.call(this,n)}}(e.fn.hide),toggle:function(e){return function(s){if(i(s)||"boolean"==typeof s)return e.apply(this,arguments);var n=t.apply(this,arguments);return n.mode="toggle",this.effect.call(this,n)}}(e.fn.toggle),cssUnit:function(t){var i=this.css(t),s=[];return e.each(["em","px","%","pt"],function(e,t){i.indexOf(t)>0&&(s=[parseFloat(i),t])}),s}})}(),function(){var t={};e.each(["Quad","Cubic","Quart","Quint","Expo"],function(e,i){t[i]=function(t){return Math.pow(t,e+2)}}),e.extend(t,{Sine:function(e){return 1-Math.cos(e*Math.PI/2)},Circ:function(e){return 1-Math.sqrt(1-e*e)},Elastic:function(e){return 0===e||1===e?e:-Math.pow(2,8*(e-1))*Math.sin((80*(e-1)-7.5)*Math.PI/15)},Back:function(e){return e*e*(3*e-2)},Bounce:function(e){for(var t,i=4;((t=Math.pow(2,--i))-1)/11>e;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*t-2)/22-e,2)}}),e.each(t,function(t,i){e.easing["easeIn"+t]=i,e.easing["easeOut"+t]=function(e){return 1-i(1-e)},e.easing["easeInOut"+t]=function(e){return.5>e?i(2*e)/2:1-i(-2*e+2)/2}})}(),e.effects,e.effects.effect.highlight=function(t,i){var s=e(this),n=["backgroundImage","backgroundColor","opacity"],a=e.effects.setMode(s,t.mode||"show"),o={backgroundColor:s.css("backgroundColor")};"hide"===a&&(o.opacity=0),e.effects.save(s,n),s.show().css({backgroundImage:"none",backgroundColor:t.color||"#ffff99"}).animate(o,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){"hide"===a&&s.hide(),e.effects.restore(s,n),i()}})}});
(-)a/koha-tmpl/intranet-tmpl/lib/jquery/jquery-ui-1.13.1.min.css (+7 lines)
Line 0 Link Here
1
/*! jQuery UI - v1.13.1 - 2022-02-02
2
* http://jqueryui.com
3
* Includes: sortable.css, core.css, accordion.css, autocomplete.css, menu.css, tabs.css, theme.css
4
* To view and modify this theme, visit http://jqueryui.com/themeroller/?scope=&folderName=custom-theme&bgImgOpacityError=&bgImgOpacityHighlight=&bgImgOpacityActive=&bgImgOpacityHover=&bgImgOpacityDefault=&bgImgOpacityContent=&bgImgOpacityHeader=&cornerRadiusShadow=8px&offsetLeftShadow=0px&offsetTopShadow=0px&thicknessShadow=5px&opacityShadow=30&bgImgOpacityShadow=0&bgTextureShadow=flat&bgColorShadow=%23666666&opacityOverlay=30&bgImgOpacityOverlay=0&bgTextureOverlay=flat&bgColorOverlay=%23aaaaaa&iconColorError=%23cc0000&fcError=%235f3f3f&borderColorError=%23f1a899&bgTextureError=flat&bgColorError=%23fddfdf&iconColorHighlight=%23777620&fcHighlight=%23777620&borderColorHighlight=%23dad55e&bgTextureHighlight=flat&bgColorHighlight=%23fffa90&iconColorActive=%23aaa&fcActive=%23000&borderColorActive=%23aaa&bgTextureActive=flat&bgColorActive=%23FFF&iconColorHover=%23555555&fcHover=%232b2b2b&borderColorHover=%23b9d8d9&bgTextureHover=flat&bgColorHover=%23e6f0f2&iconColorDefault=%23777777&fcDefault=%23454545&borderColorDefault=%23d6e8e9&bgTextureDefault=flat&bgColorDefault=%23f4f8f9&iconColorContent=%23444444&fcContent=%23333333&borderColorContent=%23dddddd&bgTextureContent=flat&bgColorContent=%23ffffff&iconColorHeader=%23444444&fcHeader=%23333333&borderColorHeader=%23dddddd&bgTextureHeader=flat&bgColorHeader=%23e9e9e9&cornerRadius=3px&fwDefault=normal&fsDefault=&ffDefault=
5
* Copyright jQuery Foundation and other contributors; Licensed MIT */
6
7
.ui-sortable-handle{-ms-touch-action:none;touch-action:none}.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;-ms-filter:"alpha(opacity=0)"}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important;pointer-events:none}.ui-icon{display:inline-block;vertical-align:middle;margin-top:-.25em;position:relative;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-icon-block{left:50%;margin-left:-8px;display:block}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-accordion .ui-accordion-header{display:block;cursor:pointer;position:relative;margin:2px 0 0 0;padding:.5em .5em .5em .7em;font-size:100%}.ui-accordion .ui-accordion-content{padding:1em 2.2em;border-top:0;overflow:auto}.ui-autocomplete{position:absolute;top:0;left:0;cursor:default}.ui-menu{list-style:none;padding:0;margin:0;display:block;outline:0}.ui-menu .ui-menu{position:absolute}.ui-menu .ui-menu-item{margin:0;cursor:pointer;list-style-image:url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7")}.ui-menu .ui-menu-item-wrapper{position:relative;padding:3px 1em 3px .4em}.ui-menu .ui-menu-divider{margin:5px 0;height:0;font-size:0;line-height:0;border-width:1px 0 0 0}.ui-menu .ui-state-focus,.ui-menu .ui-state-active{margin:-1px}.ui-menu-icons{position:relative}.ui-menu-icons .ui-menu-item-wrapper{padding-left:2em}.ui-menu .ui-icon{position:absolute;top:0;bottom:0;left:.2em;margin:auto 0}.ui-menu .ui-menu-icon{left:auto;right:0}.ui-tabs{position:relative;padding:.2em}.ui-tabs .ui-tabs-nav{margin:0;padding:.2em .2em 0}.ui-tabs .ui-tabs-nav li{list-style:none;float:left;position:relative;top:0;margin:1px .2em 0 0;border-bottom-width:0;padding:0;white-space:nowrap}.ui-tabs .ui-tabs-nav .ui-tabs-anchor{float:left;padding:.5em 1em;text-decoration:none}.ui-tabs .ui-tabs-nav li.ui-tabs-active{margin-bottom:-1px;padding-bottom:1px}.ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor,.ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor,.ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor{cursor:text}.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor{cursor:pointer}.ui-tabs .ui-tabs-panel{display:block;border-width:0;padding:1em 1.4em;background:none}.ui-widget{font-family:inherit;font-size:}.ui-widget .ui-widget{font-size:1em}.ui-widget input,.ui-widget select,.ui-widget textarea,.ui-widget button{font-family:inherit;font-size:1em}.ui-widget.ui-widget-content{border:1px solid #d6e8e9}.ui-widget-content{border:1px solid #ddd;background:#fff;color:#333}.ui-widget-content a{color:#333}.ui-widget-header{border:1px solid #ddd;background:#e9e9e9;color:#333;font-weight:bold}.ui-widget-header a{color:#333}.ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default,.ui-button,html .ui-button.ui-state-disabled:hover,html .ui-button.ui-state-disabled:active{border:1px solid #d6e8e9;background:#f4f8f9;font-weight:normal;color:#454545}.ui-state-default a,.ui-state-default a:link,.ui-state-default a:visited,a.ui-button,a:link.ui-button,a:visited.ui-button,.ui-button{color:#454545;text-decoration:none}.ui-state-hover,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-hover,.ui-state-focus,.ui-widget-content .ui-state-focus,.ui-widget-header .ui-state-focus,.ui-button:hover,.ui-button:focus{border:1px solid #b9d8d9;background:#e6f0f2;font-weight:normal;color:#2b2b2b}.ui-state-hover a,.ui-state-hover a:hover,.ui-state-hover a:link,.ui-state-hover a:visited,.ui-state-focus a,.ui-state-focus a:hover,.ui-state-focus a:link,.ui-state-focus a:visited,a.ui-button:hover,a.ui-button:focus{color:#2b2b2b;text-decoration:none}.ui-visual-focus{box-shadow:0 0 3px 1px rgb(94,158,214)}.ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active,a.ui-button:active,.ui-button:active,.ui-button.ui-state-active:hover{border:1px solid #aaa;background:#FFF;font-weight:normal;color:#000}.ui-icon-background,.ui-state-active .ui-icon-background{border:#aaa;background-color:#000}.ui-state-active a,.ui-state-active a:link,.ui-state-active a:visited{color:#000;text-decoration:none}.ui-state-highlight,.ui-widget-content .ui-state-highlight,.ui-widget-header .ui-state-highlight{border:1px solid #dad55e;background:#fffa90;color:#777620}.ui-state-checked{border:1px solid #dad55e;background:#fffa90}.ui-state-highlight a,.ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a{color:#777620}.ui-state-error,.ui-widget-content .ui-state-error,.ui-widget-header .ui-state-error{border:1px solid #f1a899;background:#fddfdf;color:#5f3f3f}.ui-state-error a,.ui-widget-content .ui-state-error a,.ui-widget-header .ui-state-error a{color:#5f3f3f}.ui-state-error-text,.ui-widget-content .ui-state-error-text,.ui-widget-header .ui-state-error-text{color:#5f3f3f}.ui-priority-primary,.ui-widget-content .ui-priority-primary,.ui-widget-header .ui-priority-primary{font-weight:bold}.ui-priority-secondary,.ui-widget-content .ui-priority-secondary,.ui-widget-header .ui-priority-secondary{opacity:.7;-ms-filter:"alpha(opacity=70)";font-weight:normal}.ui-state-disabled,.ui-widget-content .ui-state-disabled,.ui-widget-header .ui-state-disabled{opacity:.35;-ms-filter:"alpha(opacity=35)";background-image:none}.ui-state-disabled .ui-icon{-ms-filter:"alpha(opacity=35)"}.ui-icon{width:16px;height:16px}.ui-icon,.ui-widget-content .ui-icon{background-image:url("images/ui-icons_444444_256x240.png")}.ui-widget-header .ui-icon{background-image:url("images/ui-icons_444444_256x240.png")}.ui-state-hover .ui-icon,.ui-state-focus .ui-icon,.ui-button:hover .ui-icon,.ui-button:focus .ui-icon{background-image:url("images/ui-icons_555555_256x240.png")}.ui-state-active .ui-icon,.ui-button:active .ui-icon{background-image:url("images/ui-icons_aaa_256x240.png")}.ui-state-highlight .ui-icon,.ui-button .ui-state-highlight.ui-icon{background-image:url("images/ui-icons_777620_256x240.png")}.ui-state-error .ui-icon,.ui-state-error-text .ui-icon{background-image:url("images/ui-icons_cc0000_256x240.png")}.ui-button .ui-icon{background-image:url("images/ui-icons_777777_256x240.png")}.ui-icon-blank.ui-icon-blank.ui-icon-blank{background-image:none}.ui-icon-caret-1-n{background-position:0 0}.ui-icon-caret-1-ne{background-position:-16px 0}.ui-icon-caret-1-e{background-position:-32px 0}.ui-icon-caret-1-se{background-position:-48px 0}.ui-icon-caret-1-s{background-position:-65px 0}.ui-icon-caret-1-sw{background-position:-80px 0}.ui-icon-caret-1-w{background-position:-96px 0}.ui-icon-caret-1-nw{background-position:-112px 0}.ui-icon-caret-2-n-s{background-position:-128px 0}.ui-icon-caret-2-e-w{background-position:-144px 0}.ui-icon-triangle-1-n{background-position:0 -16px}.ui-icon-triangle-1-ne{background-position:-16px -16px}.ui-icon-triangle-1-e{background-position:-32px -16px}.ui-icon-triangle-1-se{background-position:-48px -16px}.ui-icon-triangle-1-s{background-position:-65px -16px}.ui-icon-triangle-1-sw{background-position:-80px -16px}.ui-icon-triangle-1-w{background-position:-96px -16px}.ui-icon-triangle-1-nw{background-position:-112px -16px}.ui-icon-triangle-2-n-s{background-position:-128px -16px}.ui-icon-triangle-2-e-w{background-position:-144px -16px}.ui-icon-arrow-1-n{background-position:0 -32px}.ui-icon-arrow-1-ne{background-position:-16px -32px}.ui-icon-arrow-1-e{background-position:-32px -32px}.ui-icon-arrow-1-se{background-position:-48px -32px}.ui-icon-arrow-1-s{background-position:-65px -32px}.ui-icon-arrow-1-sw{background-position:-80px -32px}.ui-icon-arrow-1-w{background-position:-96px -32px}.ui-icon-arrow-1-nw{background-position:-112px -32px}.ui-icon-arrow-2-n-s{background-position:-128px -32px}.ui-icon-arrow-2-ne-sw{background-position:-144px -32px}.ui-icon-arrow-2-e-w{background-position:-160px -32px}.ui-icon-arrow-2-se-nw{background-position:-176px -32px}.ui-icon-arrowstop-1-n{background-position:-192px -32px}.ui-icon-arrowstop-1-e{background-position:-208px -32px}.ui-icon-arrowstop-1-s{background-position:-224px -32px}.ui-icon-arrowstop-1-w{background-position:-240px -32px}.ui-icon-arrowthick-1-n{background-position:1px -48px}.ui-icon-arrowthick-1-ne{background-position:-16px -48px}.ui-icon-arrowthick-1-e{background-position:-32px -48px}.ui-icon-arrowthick-1-se{background-position:-48px -48px}.ui-icon-arrowthick-1-s{background-position:-64px -48px}.ui-icon-arrowthick-1-sw{background-position:-80px -48px}.ui-icon-arrowthick-1-w{background-position:-96px -48px}.ui-icon-arrowthick-1-nw{background-position:-112px -48px}.ui-icon-arrowthick-2-n-s{background-position:-128px -48px}.ui-icon-arrowthick-2-ne-sw{background-position:-144px -48px}.ui-icon-arrowthick-2-e-w{background-position:-160px -48px}.ui-icon-arrowthick-2-se-nw{background-position:-176px -48px}.ui-icon-arrowthickstop-1-n{background-position:-192px -48px}.ui-icon-arrowthickstop-1-e{background-position:-208px -48px}.ui-icon-arrowthickstop-1-s{background-position:-224px -48px}.ui-icon-arrowthickstop-1-w{background-position:-240px -48px}.ui-icon-arrowreturnthick-1-w{background-position:0 -64px}.ui-icon-arrowreturnthick-1-n{background-position:-16px -64px}.ui-icon-arrowreturnthick-1-e{background-position:-32px -64px}.ui-icon-arrowreturnthick-1-s{background-position:-48px -64px}.ui-icon-arrowreturn-1-w{background-position:-64px -64px}.ui-icon-arrowreturn-1-n{background-position:-80px -64px}.ui-icon-arrowreturn-1-e{background-position:-96px -64px}.ui-icon-arrowreturn-1-s{background-position:-112px -64px}.ui-icon-arrowrefresh-1-w{background-position:-128px -64px}.ui-icon-arrowrefresh-1-n{background-position:-144px -64px}.ui-icon-arrowrefresh-1-e{background-position:-160px -64px}.ui-icon-arrowrefresh-1-s{background-position:-176px -64px}.ui-icon-arrow-4{background-position:0 -80px}.ui-icon-arrow-4-diag{background-position:-16px -80px}.ui-icon-extlink{background-position:-32px -80px}.ui-icon-newwin{background-position:-48px -80px}.ui-icon-refresh{background-position:-64px -80px}.ui-icon-shuffle{background-position:-80px -80px}.ui-icon-transfer-e-w{background-position:-96px -80px}.ui-icon-transferthick-e-w{background-position:-112px -80px}.ui-icon-folder-collapsed{background-position:0 -96px}.ui-icon-folder-open{background-position:-16px -96px}.ui-icon-document{background-position:-32px -96px}.ui-icon-document-b{background-position:-48px -96px}.ui-icon-note{background-position:-64px -96px}.ui-icon-mail-closed{background-position:-80px -96px}.ui-icon-mail-open{background-position:-96px -96px}.ui-icon-suitcase{background-position:-112px -96px}.ui-icon-comment{background-position:-128px -96px}.ui-icon-person{background-position:-144px -96px}.ui-icon-print{background-position:-160px -96px}.ui-icon-trash{background-position:-176px -96px}.ui-icon-locked{background-position:-192px -96px}.ui-icon-unlocked{background-position:-208px -96px}.ui-icon-bookmark{background-position:-224px -96px}.ui-icon-tag{background-position:-240px -96px}.ui-icon-home{background-position:0 -112px}.ui-icon-flag{background-position:-16px -112px}.ui-icon-calendar{background-position:-32px -112px}.ui-icon-cart{background-position:-48px -112px}.ui-icon-pencil{background-position:-64px -112px}.ui-icon-clock{background-position:-80px -112px}.ui-icon-disk{background-position:-96px -112px}.ui-icon-calculator{background-position:-112px -112px}.ui-icon-zoomin{background-position:-128px -112px}.ui-icon-zoomout{background-position:-144px -112px}.ui-icon-search{background-position:-160px -112px}.ui-icon-wrench{background-position:-176px -112px}.ui-icon-gear{background-position:-192px -112px}.ui-icon-heart{background-position:-208px -112px}.ui-icon-star{background-position:-224px -112px}.ui-icon-link{background-position:-240px -112px}.ui-icon-cancel{background-position:0 -128px}.ui-icon-plus{background-position:-16px -128px}.ui-icon-plusthick{background-position:-32px -128px}.ui-icon-minus{background-position:-48px -128px}.ui-icon-minusthick{background-position:-64px -128px}.ui-icon-close{background-position:-80px -128px}.ui-icon-closethick{background-position:-96px -128px}.ui-icon-key{background-position:-112px -128px}.ui-icon-lightbulb{background-position:-128px -128px}.ui-icon-scissors{background-position:-144px -128px}.ui-icon-clipboard{background-position:-160px -128px}.ui-icon-copy{background-position:-176px -128px}.ui-icon-contact{background-position:-192px -128px}.ui-icon-image{background-position:-208px -128px}.ui-icon-video{background-position:-224px -128px}.ui-icon-script{background-position:-240px -128px}.ui-icon-alert{background-position:0 -144px}.ui-icon-info{background-position:-16px -144px}.ui-icon-notice{background-position:-32px -144px}.ui-icon-help{background-position:-48px -144px}.ui-icon-check{background-position:-64px -144px}.ui-icon-bullet{background-position:-80px -144px}.ui-icon-radio-on{background-position:-96px -144px}.ui-icon-radio-off{background-position:-112px -144px}.ui-icon-pin-w{background-position:-128px -144px}.ui-icon-pin-s{background-position:-144px -144px}.ui-icon-play{background-position:0 -160px}.ui-icon-pause{background-position:-16px -160px}.ui-icon-seek-next{background-position:-32px -160px}.ui-icon-seek-prev{background-position:-48px -160px}.ui-icon-seek-end{background-position:-64px -160px}.ui-icon-seek-start{background-position:-80px -160px}.ui-icon-seek-first{background-position:-80px -160px}.ui-icon-stop{background-position:-96px -160px}.ui-icon-eject{background-position:-112px -160px}.ui-icon-volume-off{background-position:-128px -160px}.ui-icon-volume-on{background-position:-144px -160px}.ui-icon-power{background-position:0 -176px}.ui-icon-signal-diag{background-position:-16px -176px}.ui-icon-signal{background-position:-32px -176px}.ui-icon-battery-0{background-position:-48px -176px}.ui-icon-battery-1{background-position:-64px -176px}.ui-icon-battery-2{background-position:-80px -176px}.ui-icon-battery-3{background-position:-96px -176px}.ui-icon-circle-plus{background-position:0 -192px}.ui-icon-circle-minus{background-position:-16px -192px}.ui-icon-circle-close{background-position:-32px -192px}.ui-icon-circle-triangle-e{background-position:-48px -192px}.ui-icon-circle-triangle-s{background-position:-64px -192px}.ui-icon-circle-triangle-w{background-position:-80px -192px}.ui-icon-circle-triangle-n{background-position:-96px -192px}.ui-icon-circle-arrow-e{background-position:-112px -192px}.ui-icon-circle-arrow-s{background-position:-128px -192px}.ui-icon-circle-arrow-w{background-position:-144px -192px}.ui-icon-circle-arrow-n{background-position:-160px -192px}.ui-icon-circle-zoomin{background-position:-176px -192px}.ui-icon-circle-zoomout{background-position:-192px -192px}.ui-icon-circle-check{background-position:-208px -192px}.ui-icon-circlesmall-plus{background-position:0 -208px}.ui-icon-circlesmall-minus{background-position:-16px -208px}.ui-icon-circlesmall-close{background-position:-32px -208px}.ui-icon-squaresmall-plus{background-position:-48px -208px}.ui-icon-squaresmall-minus{background-position:-64px -208px}.ui-icon-squaresmall-close{background-position:-80px -208px}.ui-icon-grip-dotted-vertical{background-position:0 -224px}.ui-icon-grip-dotted-horizontal{background-position:-16px -224px}.ui-icon-grip-solid-vertical{background-position:-32px -224px}.ui-icon-grip-solid-horizontal{background-position:-48px -224px}.ui-icon-gripsmall-diagonal-se{background-position:-64px -224px}.ui-icon-grip-diagonal-se{background-position:-80px -224px}.ui-corner-all,.ui-corner-top,.ui-corner-left,.ui-corner-tl{border-top-left-radius:3px}.ui-corner-all,.ui-corner-top,.ui-corner-right,.ui-corner-tr{border-top-right-radius:3px}.ui-corner-all,.ui-corner-bottom,.ui-corner-left,.ui-corner-bl{border-bottom-left-radius:3px}.ui-corner-all,.ui-corner-bottom,.ui-corner-right,.ui-corner-br{border-bottom-right-radius:3px}.ui-widget-overlay{background:#aaa;opacity:.3;-ms-filter:Alpha(Opacity=30)}.ui-widget-shadow{-webkit-box-shadow:0 0 5px #666;box-shadow:0 0 5px #666}
(-)a/koha-tmpl/intranet-tmpl/lib/jquery/jquery-ui-1.13.1.min.js (+6 lines)
Line 0 Link Here
1
/*! jQuery UI - v1.13.1 - 2022-02-02
2
* http://jqueryui.com
3
* Includes: widget.js, position.js, data.js, keycode.js, scroll-parent.js, unique-id.js, widgets/sortable.js, widgets/accordion.js, widgets/autocomplete.js, widgets/menu.js, widgets/mouse.js, widgets/tabs.js
4
* Copyright jQuery Foundation and other contributors; Licensed MIT */
5
6
!function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function(x){"use strict";x.ui=x.ui||{};x.ui.version="1.13.1";var n,i=0,a=Array.prototype.hasOwnProperty,r=Array.prototype.slice;x.cleanData=(n=x.cleanData,function(t){for(var e,i,s=0;null!=(i=t[s]);s++)(e=x._data(i,"events"))&&e.remove&&x(i).triggerHandler("remove");n(t)}),x.widget=function(t,i,e){var s,n,o,a={},r=t.split(".")[0],h=r+"-"+(t=t.split(".")[1]);return e||(e=i,i=x.Widget),Array.isArray(e)&&(e=x.extend.apply(null,[{}].concat(e))),x.expr.pseudos[h.toLowerCase()]=function(t){return!!x.data(t,h)},x[r]=x[r]||{},s=x[r][t],n=x[r][t]=function(t,e){if(!this||!this._createWidget)return new n(t,e);arguments.length&&this._createWidget(t,e)},x.extend(n,s,{version:e.version,_proto:x.extend({},e),_childConstructors:[]}),(o=new i).options=x.widget.extend({},o.options),x.each(e,function(e,s){function n(){return i.prototype[e].apply(this,arguments)}function o(t){return i.prototype[e].apply(this,t)}a[e]="function"==typeof s?function(){var t,e=this._super,i=this._superApply;return this._super=n,this._superApply=o,t=s.apply(this,arguments),this._super=e,this._superApply=i,t}:s}),n.prototype=x.widget.extend(o,{widgetEventPrefix:s&&o.widgetEventPrefix||t},a,{constructor:n,namespace:r,widgetName:t,widgetFullName:h}),s?(x.each(s._childConstructors,function(t,e){var i=e.prototype;x.widget(i.namespace+"."+i.widgetName,n,e._proto)}),delete s._childConstructors):i._childConstructors.push(n),x.widget.bridge(t,n),n},x.widget.extend=function(t){for(var e,i,s=r.call(arguments,1),n=0,o=s.length;n<o;n++)for(e in s[n])i=s[n][e],a.call(s[n],e)&&void 0!==i&&(x.isPlainObject(i)?t[e]=x.isPlainObject(t[e])?x.widget.extend({},t[e],i):x.widget.extend({},i):t[e]=i);return t},x.widget.bridge=function(o,e){var a=e.prototype.widgetFullName||o;x.fn[o]=function(i){var t="string"==typeof i,s=r.call(arguments,1),n=this;return t?this.length||"instance"!==i?this.each(function(){var t,e=x.data(this,a);return"instance"===i?(n=e,!1):e?"function"!=typeof e[i]||"_"===i.charAt(0)?x.error("no such method '"+i+"' for "+o+" widget instance"):(t=e[i].apply(e,s))!==e&&void 0!==t?(n=t&&t.jquery?n.pushStack(t.get()):t,!1):void 0:x.error("cannot call methods on "+o+" prior to initialization; attempted to call method '"+i+"'")}):n=void 0:(s.length&&(i=x.widget.extend.apply(null,[i].concat(s))),this.each(function(){var t=x.data(this,a);t?(t.option(i||{}),t._init&&t._init()):x.data(this,a,new e(i,this))})),n}},x.Widget=function(){},x.Widget._childConstructors=[],x.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(t,e){e=x(e||this.defaultElement||this)[0],this.element=x(e),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=x(),this.hoverable=x(),this.focusable=x(),this.classesElementLookup={},e!==this&&(x.data(e,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===e&&this.destroy()}}),this.document=x(e.style?e.ownerDocument:e.document||e),this.window=x(this.document[0].defaultView||this.document[0].parentWindow)),this.options=x.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:x.noop,_create:x.noop,_init:x.noop,destroy:function(){var i=this;this._destroy(),x.each(this.classesElementLookup,function(t,e){i._removeClass(e,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:x.noop,widget:function(){return this.element},option:function(t,e){var i,s,n,o=t;if(0===arguments.length)return x.widget.extend({},this.options);if("string"==typeof t)if(o={},t=(i=t.split(".")).shift(),i.length){for(s=o[t]=x.widget.extend({},this.options[t]),n=0;n<i.length-1;n++)s[i[n]]=s[i[n]]||{},s=s[i[n]];if(t=i.pop(),1===arguments.length)return void 0===s[t]?null:s[t];s[t]=e}else{if(1===arguments.length)return void 0===this.options[t]?null:this.options[t];o[t]=e}return this._setOptions(o),this},_setOptions:function(t){for(var e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(t){var e,i,s;for(e in t)s=this.classesElementLookup[e],t[e]!==this.options.classes[e]&&s&&s.length&&(i=x(s.get()),this._removeClass(s,e),i.addClass(this._classes({element:i,keys:e,classes:t,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(n){var o=[],a=this;function t(t,e){for(var i,s=0;s<t.length;s++)i=a.classesElementLookup[t[s]]||x(),i=n.add?(function(){var i=[];n.element.each(function(t,e){x.map(a.classesElementLookup,function(t){return t}).some(function(t){return t.is(e)})||i.push(e)}),a._on(x(i),{remove:"_untrackClassesElement"})}(),x(x.uniqueSort(i.get().concat(n.element.get())))):x(i.not(n.element).get()),a.classesElementLookup[t[s]]=i,o.push(t[s]),e&&n.classes[t[s]]&&o.push(n.classes[t[s]])}return(n=x.extend({element:this.element,classes:this.options.classes||{}},n)).keys&&t(n.keys.match(/\S+/g)||[],!0),n.extra&&t(n.extra.match(/\S+/g)||[]),o.join(" ")},_untrackClassesElement:function(i){var s=this;x.each(s.classesElementLookup,function(t,e){-1!==x.inArray(i.target,e)&&(s.classesElementLookup[t]=x(e.not(i.target).get()))}),this._off(x(i.target))},_removeClass:function(t,e,i){return this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,s){var n="string"==typeof t||null===t,i={extra:n?e:i,keys:n?t:e,element:n?this.element:t,add:s="boolean"==typeof s?s:i};return i.element.toggleClass(this._classes(i),s),this},_on:function(n,o,t){var a,r=this;"boolean"!=typeof n&&(t=o,o=n,n=!1),t?(o=a=x(o),this.bindings=this.bindings.add(o)):(t=o,o=this.element,a=this.widget()),x.each(t,function(t,e){function i(){if(n||!0!==r.options.disabled&&!x(this).hasClass("ui-state-disabled"))return("string"==typeof e?r[e]:e).apply(r,arguments)}"string"!=typeof e&&(i.guid=e.guid=e.guid||i.guid||x.guid++);var s=t.match(/^([\w:-]*)\s*(.*)$/),t=s[1]+r.eventNamespace,s=s[2];s?a.on(t,s,i):o.on(t,i)})},_off:function(t,e){e=(e||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.off(e),this.bindings=x(this.bindings.not(t).get()),this.focusable=x(this.focusable.not(t).get()),this.hoverable=x(this.hoverable.not(t).get())},_delay:function(t,e){var i=this;return setTimeout(function(){return("string"==typeof t?i[t]:t).apply(i,arguments)},e||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){this._addClass(x(t.currentTarget),null,"ui-state-hover")},mouseleave:function(t){this._removeClass(x(t.currentTarget),null,"ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){this._addClass(x(t.currentTarget),null,"ui-state-focus")},focusout:function(t){this._removeClass(x(t.currentTarget),null,"ui-state-focus")}})},_trigger:function(t,e,i){var s,n,o=this.options[t];if(i=i||{},(e=x.Event(e)).type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),e.target=this.element[0],n=e.originalEvent)for(s in n)s in e||(e[s]=n[s]);return this.element.trigger(e,i),!("function"==typeof o&&!1===o.apply(this.element[0],[e].concat(i))||e.isDefaultPrevented())}},x.each({show:"fadeIn",hide:"fadeOut"},function(o,a){x.Widget.prototype["_"+o]=function(e,t,i){var s,n=(t="string"==typeof t?{effect:t}:t)?!0!==t&&"number"!=typeof t&&t.effect||a:o;"number"==typeof(t=t||{})?t={duration:t}:!0===t&&(t={}),s=!x.isEmptyObject(t),t.complete=i,t.delay&&e.delay(t.delay),s&&x.effects&&x.effects.effect[n]?e[o](t):n!==o&&e[n]?e[n](t.duration,t.easing,i):e.queue(function(t){x(this)[o](),i&&i.call(e[0]),t()})}});var s,C,P,o,h,l,c,u,I;x.widget;function T(t,e,i){return[parseFloat(t[0])*(u.test(t[0])?e/100:1),parseFloat(t[1])*(u.test(t[1])?i/100:1)]}function k(t,e){return parseInt(x.css(t,e),10)||0}function A(t){return null!=t&&t===t.window}C=Math.max,P=Math.abs,o=/left|center|right/,h=/top|center|bottom/,l=/[\+\-]\d+(\.[\d]+)?%?/,c=/^\w+/,u=/%$/,I=x.fn.position,x.position={scrollbarWidth:function(){if(void 0!==s)return s;var t,e=x("<div style='display:block;position:absolute;width:200px;height:200px;overflow:hidden;'><div style='height:300px;width:auto;'></div></div>"),i=e.children()[0];return x("body").append(e),t=i.offsetWidth,e.css("overflow","scroll"),t===(i=i.offsetWidth)&&(i=e[0].clientWidth),e.remove(),s=t-i},getScrollInfo:function(t){var e=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),i=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),e="scroll"===e||"auto"===e&&t.width<t.element[0].scrollWidth;return{width:"scroll"===i||"auto"===i&&t.height<t.element[0].scrollHeight?x.position.scrollbarWidth():0,height:e?x.position.scrollbarWidth():0}},getWithinInfo:function(t){var e=x(t||window),i=A(e[0]),s=!!e[0]&&9===e[0].nodeType;return{element:e,isWindow:i,isDocument:s,offset:!i&&!s?x(t).offset():{left:0,top:0},scrollLeft:e.scrollLeft(),scrollTop:e.scrollTop(),width:e.outerWidth(),height:e.outerHeight()}}},x.fn.position=function(u){if(!u||!u.of)return I.apply(this,arguments);var d,p,f,m,g,t,v="string"==typeof(u=x.extend({},u)).of?x(document).find(u.of):x(u.of),_=x.position.getWithinInfo(u.within),b=x.position.getScrollInfo(_),y=(u.collision||"flip").split(" "),w={},e=9===(t=(e=v)[0]).nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:A(t)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:t.preventDefault?{width:0,height:0,offset:{top:t.pageY,left:t.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()};return v[0].preventDefault&&(u.at="left top"),p=e.width,f=e.height,g=x.extend({},m=e.offset),x.each(["my","at"],function(){var t,e,i=(u[this]||"").split(" ");(i=1===i.length?o.test(i[0])?i.concat(["center"]):h.test(i[0])?["center"].concat(i):["center","center"]:i)[0]=o.test(i[0])?i[0]:"center",i[1]=h.test(i[1])?i[1]:"center",t=l.exec(i[0]),e=l.exec(i[1]),w[this]=[t?t[0]:0,e?e[0]:0],u[this]=[c.exec(i[0])[0],c.exec(i[1])[0]]}),1===y.length&&(y[1]=y[0]),"right"===u.at[0]?g.left+=p:"center"===u.at[0]&&(g.left+=p/2),"bottom"===u.at[1]?g.top+=f:"center"===u.at[1]&&(g.top+=f/2),d=T(w.at,p,f),g.left+=d[0],g.top+=d[1],this.each(function(){var i,t,a=x(this),r=a.outerWidth(),h=a.outerHeight(),e=k(this,"marginLeft"),s=k(this,"marginTop"),n=r+e+k(this,"marginRight")+b.width,o=h+s+k(this,"marginBottom")+b.height,l=x.extend({},g),c=T(w.my,a.outerWidth(),a.outerHeight());"right"===u.my[0]?l.left-=r:"center"===u.my[0]&&(l.left-=r/2),"bottom"===u.my[1]?l.top-=h:"center"===u.my[1]&&(l.top-=h/2),l.left+=c[0],l.top+=c[1],i={marginLeft:e,marginTop:s},x.each(["left","top"],function(t,e){x.ui.position[y[t]]&&x.ui.position[y[t]][e](l,{targetWidth:p,targetHeight:f,elemWidth:r,elemHeight:h,collisionPosition:i,collisionWidth:n,collisionHeight:o,offset:[d[0]+c[0],d[1]+c[1]],my:u.my,at:u.at,within:_,elem:a})}),u.using&&(t=function(t){var e=m.left-l.left,i=e+p-r,s=m.top-l.top,n=s+f-h,o={target:{element:v,left:m.left,top:m.top,width:p,height:f},element:{element:a,left:l.left,top:l.top,width:r,height:h},horizontal:i<0?"left":0<e?"right":"center",vertical:n<0?"top":0<s?"bottom":"middle"};p<r&&P(e+i)<p&&(o.horizontal="center"),f<h&&P(s+n)<f&&(o.vertical="middle"),C(P(e),P(i))>C(P(s),P(n))?o.important="horizontal":o.important="vertical",u.using.call(this,t,o)}),a.offset(x.extend(l,{using:t}))})},x.ui.position={fit:{left:function(t,e){var i=e.within,s=i.isWindow?i.scrollLeft:i.offset.left,n=i.width,o=t.left-e.collisionPosition.marginLeft,a=s-o,r=o+e.collisionWidth-n-s;e.collisionWidth>n?0<a&&r<=0?(i=t.left+a+e.collisionWidth-n-s,t.left+=a-i):t.left=!(0<r&&a<=0)&&r<a?s+n-e.collisionWidth:s:0<a?t.left+=a:0<r?t.left-=r:t.left=C(t.left-o,t.left)},top:function(t,e){var i=e.within,s=i.isWindow?i.scrollTop:i.offset.top,n=e.within.height,o=t.top-e.collisionPosition.marginTop,a=s-o,r=o+e.collisionHeight-n-s;e.collisionHeight>n?0<a&&r<=0?(i=t.top+a+e.collisionHeight-n-s,t.top+=a-i):t.top=!(0<r&&a<=0)&&r<a?s+n-e.collisionHeight:s:0<a?t.top+=a:0<r?t.top-=r:t.top=C(t.top-o,t.top)}},flip:{left:function(t,e){var i=e.within,s=i.offset.left+i.scrollLeft,n=i.width,o=i.isWindow?i.scrollLeft:i.offset.left,a=t.left-e.collisionPosition.marginLeft,r=a-o,h=a+e.collisionWidth-n-o,l="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,i="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,a=-2*e.offset[0];r<0?((s=t.left+l+i+a+e.collisionWidth-n-s)<0||s<P(r))&&(t.left+=l+i+a):0<h&&(0<(o=t.left-e.collisionPosition.marginLeft+l+i+a-o)||P(o)<h)&&(t.left+=l+i+a)},top:function(t,e){var i=e.within,s=i.offset.top+i.scrollTop,n=i.height,o=i.isWindow?i.scrollTop:i.offset.top,a=t.top-e.collisionPosition.marginTop,r=a-o,h=a+e.collisionHeight-n-o,l="top"===e.my[1]?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,i="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,a=-2*e.offset[1];r<0?((s=t.top+l+i+a+e.collisionHeight-n-s)<0||s<P(r))&&(t.top+=l+i+a):0<h&&(0<(o=t.top-e.collisionPosition.marginTop+l+i+a-o)||P(o)<h)&&(t.top+=l+i+a)}},flipfit:{left:function(){x.ui.position.flip.left.apply(this,arguments),x.ui.position.fit.left.apply(this,arguments)},top:function(){x.ui.position.flip.top.apply(this,arguments),x.ui.position.fit.top.apply(this,arguments)}}};x.ui.position,x.extend(x.expr.pseudos,{data:x.expr.createPseudo?x.expr.createPseudo(function(e){return function(t){return!!x.data(t,e)}}):function(t,e,i){return!!x.data(t,i[3])}}),x.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},x.fn.scrollParent=function(t){var e=this.css("position"),i="absolute"===e,s=t?/(auto|scroll|hidden)/:/(auto|scroll)/,t=this.parents().filter(function(){var t=x(this);return(!i||"static"!==t.css("position"))&&s.test(t.css("overflow")+t.css("overflow-y")+t.css("overflow-x"))}).eq(0);return"fixed"!==e&&t.length?t:x(this[0].ownerDocument||document)},x.fn.extend({uniqueId:(t=0,function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++t)})}),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&x(this).removeAttr("id")})}}),x.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase());var t,d=!1;x(document).on("mouseup",function(){d=!1});x.widget("ui.mouse",{version:"1.13.1",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.on("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).on("click."+this.widgetName,function(t){if(!0===x.data(t.target,e.widgetName+".preventClickEvent"))return x.removeData(t.target,e.widgetName+".preventClickEvent"),t.stopImmediatePropagation(),!1}),this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(t){if(!d){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(t),this._mouseDownEvent=t;var e=this,i=1===t.which,s=!("string"!=typeof this.options.cancel||!t.target.nodeName)&&x(t.target).closest(this.options.cancel).length;return i&&!s&&this._mouseCapture(t)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){e.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=!1!==this._mouseStart(t),!this._mouseStarted)?(t.preventDefault(),!0):(!0===x.data(t.target,this.widgetName+".preventClickEvent")&&x.removeData(t.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return e._mouseMove(t)},this._mouseUpDelegate=function(t){return e._mouseUp(t)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),t.preventDefault(),d=!0)):!0}},_mouseMove:function(t){if(this._mouseMoved){if(x.ui.ie&&(!document.documentMode||document.documentMode<9)&&!t.button)return this._mouseUp(t);if(!t.which)if(t.originalEvent.altKey||t.originalEvent.ctrlKey||t.originalEvent.metaKey||t.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(t)}return(t.which||t.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=!1!==this._mouseStart(this._mouseDownEvent,t),this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted)},_mouseUp:function(t){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&x.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,d=!1,t.preventDefault()},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),x.widget("ui.sortable",x.ui.mouse,{version:"1.13.1",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_isOverAxis:function(t,e,i){return e<=t&&t<e+i},_isFloating:function(t){return/left|right/.test(t.css("float"))||/inline|table-cell/.test(t.css("display"))},_create:function(){this.containerCache={},this._addClass("ui-sortable"),this.refresh(),this.offset=this.element.offset(),this._mouseInit(),this._setHandleClassName(),this.ready=!0},_setOption:function(t,e){this._super(t,e),"handle"===t&&this._setHandleClassName()},_setHandleClassName:function(){var t=this;this._removeClass(this.element.find(".ui-sortable-handle"),"ui-sortable-handle"),x.each(this.items,function(){t._addClass(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item,"ui-sortable-handle")})},_destroy:function(){this._mouseDestroy();for(var t=this.items.length-1;0<=t;t--)this.items[t].item.removeData(this.widgetName+"-item");return this},_mouseCapture:function(t,e){var i=null,s=!1,n=this;return!this.reverting&&(!this.options.disabled&&"static"!==this.options.type&&(this._refreshItems(t),x(t.target).parents().each(function(){if(x.data(this,n.widgetName+"-item")===n)return i=x(this),!1}),!!(i=x.data(t.target,n.widgetName+"-item")===n?x(t.target):i)&&(!(this.options.handle&&!e&&(x(this.options.handle,i).find("*").addBack().each(function(){this===t.target&&(s=!0)}),!s))&&(this.currentItem=i,this._removeCurrentsFromItems(),!0))))},_mouseStart:function(t,e,i){var s,n,o=this.options;if((this.currentContainer=this).refreshPositions(),this.appendTo=x("parent"!==o.appendTo?o.appendTo:this.currentItem.parent()),this.helper=this._createHelper(t),this._cacheHelperProportions(),this._cacheMargins(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},x.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),o.cursorAt&&this._adjustOffsetFromHelper(o.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),this.scrollParent=this.placeholder.scrollParent(),x.extend(this.offset,{parent:this._getParentOffset()}),o.containment&&this._setContainment(),o.cursor&&"auto"!==o.cursor&&(n=this.document.find("body"),this.storedCursor=n.css("cursor"),n.css("cursor",o.cursor),this.storedStylesheet=x("<style>*{ cursor: "+o.cursor+" !important; }</style>").appendTo(n)),o.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",o.zIndex)),o.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",o.opacity)),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",t,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!i)for(s=this.containers.length-1;0<=s;s--)this.containers[s]._trigger("activate",t,this._uiHash(this));return x.ui.ddmanager&&(x.ui.ddmanager.current=this),x.ui.ddmanager&&!o.dropBehaviour&&x.ui.ddmanager.prepareOffsets(this,t),this.dragging=!0,this._addClass(this.helper,"ui-sortable-helper"),this.helper.parent().is(this.appendTo)||(this.helper.detach().appendTo(this.appendTo),this.offset.parent=this._getParentOffset()),this.position=this.originalPosition=this._generatePosition(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,this.lastPositionAbs=this.positionAbs=this._convertPositionTo("absolute"),this._mouseDrag(t),!0},_scroll:function(t){var e=this.options,i=!1;return this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-t.pageY<e.scrollSensitivity?this.scrollParent[0].scrollTop=i=this.scrollParent[0].scrollTop+e.scrollSpeed:t.pageY-this.overflowOffset.top<e.scrollSensitivity&&(this.scrollParent[0].scrollTop=i=this.scrollParent[0].scrollTop-e.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-t.pageX<e.scrollSensitivity?this.scrollParent[0].scrollLeft=i=this.scrollParent[0].scrollLeft+e.scrollSpeed:t.pageX-this.overflowOffset.left<e.scrollSensitivity&&(this.scrollParent[0].scrollLeft=i=this.scrollParent[0].scrollLeft-e.scrollSpeed)):(t.pageY-this.document.scrollTop()<e.scrollSensitivity?i=this.document.scrollTop(this.document.scrollTop()-e.scrollSpeed):this.window.height()-(t.pageY-this.document.scrollTop())<e.scrollSensitivity&&(i=this.document.scrollTop(this.document.scrollTop()+e.scrollSpeed)),t.pageX-this.document.scrollLeft()<e.scrollSensitivity?i=this.document.scrollLeft(this.document.scrollLeft()-e.scrollSpeed):this.window.width()-(t.pageX-this.document.scrollLeft())<e.scrollSensitivity&&(i=this.document.scrollLeft(this.document.scrollLeft()+e.scrollSpeed))),i},_mouseDrag:function(t){var e,i,s,n,o=this.options;for(this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),o.scroll&&!1!==this._scroll(t)&&(this._refreshItemPositions(!0),x.ui.ddmanager&&!o.dropBehaviour&&x.ui.ddmanager.prepareOffsets(this,t)),this.dragDirection={vertical:this._getDragVerticalDirection(),horizontal:this._getDragHorizontalDirection()},e=this.items.length-1;0<=e;e--)if(s=(i=this.items[e]).item[0],(n=this._intersectsWithPointer(i))&&i.instance===this.currentContainer&&!(s===this.currentItem[0]||this.placeholder[1===n?"next":"prev"]()[0]===s||x.contains(this.placeholder[0],s)||"semi-dynamic"===this.options.type&&x.contains(this.element[0],s))){if(this.direction=1===n?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(i))break;this._rearrange(t,i),this._trigger("change",t,this._uiHash());break}return this._contactContainers(t),x.ui.ddmanager&&x.ui.ddmanager.drag(this,t),this._trigger("sort",t,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(t,e){var i,s,n,o;if(t)return x.ui.ddmanager&&!this.options.dropBehaviour&&x.ui.ddmanager.drop(this,t),this.options.revert?(s=(i=this).placeholder.offset(),o={},(n=this.options.axis)&&"x"!==n||(o.left=s.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollLeft)),n&&"y"!==n||(o.top=s.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,x(this.helper).animate(o,parseInt(this.options.revert,10)||500,function(){i._clear(t)})):this._clear(t,e),!1},cancel:function(){if(this.dragging){this._mouseUp(new x.Event("mouseup",{target:null})),"original"===this.options.helper?(this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")):this.currentItem.show();for(var t=this.containers.length-1;0<=t;t--)this.containers[t]._trigger("deactivate",null,this._uiHash(this)),this.containers[t].containerCache.over&&(this.containers[t]._trigger("out",null,this._uiHash(this)),this.containers[t].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),x.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?x(this.domPosition.prev).after(this.currentItem):x(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(e){var t=this._getItemsAsjQuery(e&&e.connected),i=[];return e=e||{},x(t).each(function(){var t=(x(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[\-=_](.+)/);t&&i.push((e.key||t[1]+"[]")+"="+(e.key&&e.expression?t[1]:t[2]))}),!i.length&&e.key&&i.push(e.key+"="),i.join("&")},toArray:function(t){var e=this._getItemsAsjQuery(t&&t.connected),i=[];return t=t||{},e.each(function(){i.push(x(t.item||this).attr(t.attribute||"id")||"")}),i},_intersectsWith:function(t){var e=this.positionAbs.left,i=e+this.helperProportions.width,s=this.positionAbs.top,n=s+this.helperProportions.height,o=t.left,a=o+t.width,r=t.top,h=r+t.height,l=this.offset.click.top,c=this.offset.click.left,l="x"===this.options.axis||r<s+l&&s+l<h,c="y"===this.options.axis||o<e+c&&e+c<a;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>t[this.floating?"width":"height"]?l&&c:o<e+this.helperProportions.width/2&&i-this.helperProportions.width/2<a&&r<s+this.helperProportions.height/2&&n-this.helperProportions.height/2<h},_intersectsWithPointer:function(t){var e="x"===this.options.axis||this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top,t.height),t="y"===this.options.axis||this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left,t.width);return!(!e||!t)&&(e=this.dragDirection.vertical,t=this.dragDirection.horizontal,this.floating?"right"===t||"down"===e?2:1:e&&("down"===e?2:1))},_intersectsWithSides:function(t){var e=this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top+t.height/2,t.height),i=this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left+t.width/2,t.width),s=this.dragDirection.vertical,t=this.dragDirection.horizontal;return this.floating&&t?"right"===t&&i||"left"===t&&!i:s&&("down"===s&&e||"up"===s&&!e)},_getDragVerticalDirection:function(){var t=this.positionAbs.top-this.lastPositionAbs.top;return 0!=t&&(0<t?"down":"up")},_getDragHorizontalDirection:function(){var t=this.positionAbs.left-this.lastPositionAbs.left;return 0!=t&&(0<t?"right":"left")},refresh:function(t){return this._refreshItems(t),this._setHandleClassName(),this.refreshPositions(),this},_connectWith:function(){var t=this.options;return t.connectWith.constructor===String?[t.connectWith]:t.connectWith},_getItemsAsjQuery:function(t){var e,i,s,n,o=[],a=[],r=this._connectWith();if(r&&t)for(e=r.length-1;0<=e;e--)for(i=(s=x(r[e],this.document[0])).length-1;0<=i;i--)(n=x.data(s[i],this.widgetFullName))&&n!==this&&!n.options.disabled&&a.push(["function"==typeof n.options.items?n.options.items.call(n.element):x(n.options.items,n.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),n]);function h(){o.push(this)}for(a.push(["function"==typeof this.options.items?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):x(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),e=a.length-1;0<=e;e--)a[e][0].each(h);return x(o)},_removeCurrentsFromItems:function(){var i=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=x.grep(this.items,function(t){for(var e=0;e<i.length;e++)if(i[e]===t.item[0])return!1;return!0})},_refreshItems:function(t){this.items=[],this.containers=[this];var e,i,s,n,o,a,r,h,l=this.items,c=[["function"==typeof this.options.items?this.options.items.call(this.element[0],t,{item:this.currentItem}):x(this.options.items,this.element),this]],u=this._connectWith();if(u&&this.ready)for(e=u.length-1;0<=e;e--)for(i=(s=x(u[e],this.document[0])).length-1;0<=i;i--)(n=x.data(s[i],this.widgetFullName))&&n!==this&&!n.options.disabled&&(c.push(["function"==typeof n.options.items?n.options.items.call(n.element[0],t,{item:this.currentItem}):x(n.options.items,n.element),n]),this.containers.push(n));for(e=c.length-1;0<=e;e--)for(o=c[e][1],h=(a=c[e][i=0]).length;i<h;i++)(r=x(a[i])).data(this.widgetName+"-item",o),l.push({item:r,instance:o,width:0,height:0,left:0,top:0})},_refreshItemPositions:function(t){for(var e,i,s=this.items.length-1;0<=s;s--)e=this.items[s],this.currentContainer&&e.instance!==this.currentContainer&&e.item[0]!==this.currentItem[0]||(i=this.options.toleranceElement?x(this.options.toleranceElement,e.item):e.item,t||(e.width=i.outerWidth(),e.height=i.outerHeight()),i=i.offset(),e.left=i.left,e.top=i.top)},refreshPositions:function(t){var e,i;if(this.floating=!!this.items.length&&("x"===this.options.axis||this._isFloating(this.items[0].item)),this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset()),this._refreshItemPositions(t),this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(e=this.containers.length-1;0<=e;e--)i=this.containers[e].element.offset(),this.containers[e].containerCache.left=i.left,this.containers[e].containerCache.top=i.top,this.containers[e].containerCache.width=this.containers[e].element.outerWidth(),this.containers[e].containerCache.height=this.containers[e].element.outerHeight();return this},_createPlaceholder:function(i){var s,n,o=(i=i||this).options;o.placeholder&&o.placeholder.constructor!==String||(s=o.placeholder,n=i.currentItem[0].nodeName.toLowerCase(),o.placeholder={element:function(){var t=x("<"+n+">",i.document[0]);return i._addClass(t,"ui-sortable-placeholder",s||i.currentItem[0].className)._removeClass(t,"ui-sortable-helper"),"tbody"===n?i._createTrPlaceholder(i.currentItem.find("tr").eq(0),x("<tr>",i.document[0]).appendTo(t)):"tr"===n?i._createTrPlaceholder(i.currentItem,t):"img"===n&&t.attr("src",i.currentItem.attr("src")),s||t.css("visibility","hidden"),t},update:function(t,e){s&&!o.forcePlaceholderSize||(e.height()&&(!o.forcePlaceholderSize||"tbody"!==n&&"tr"!==n)||e.height(i.currentItem.innerHeight()-parseInt(i.currentItem.css("paddingTop")||0,10)-parseInt(i.currentItem.css("paddingBottom")||0,10)),e.width()||e.width(i.currentItem.innerWidth()-parseInt(i.currentItem.css("paddingLeft")||0,10)-parseInt(i.currentItem.css("paddingRight")||0,10)))}}),i.placeholder=x(o.placeholder.element.call(i.element,i.currentItem)),i.currentItem.after(i.placeholder),o.placeholder.update(i,i.placeholder)},_createTrPlaceholder:function(t,e){var i=this;t.children().each(function(){x("<td>&#160;</td>",i.document[0]).attr("colspan",x(this).attr("colspan")||1).appendTo(e)})},_contactContainers:function(t){for(var e,i,s,n,o,a,r,h,l,c=null,u=null,d=this.containers.length-1;0<=d;d--)x.contains(this.currentItem[0],this.containers[d].element[0])||(this._intersectsWith(this.containers[d].containerCache)?c&&x.contains(this.containers[d].element[0],c.element[0])||(c=this.containers[d],u=d):this.containers[d].containerCache.over&&(this.containers[d]._trigger("out",t,this._uiHash(this)),this.containers[d].containerCache.over=0));if(c)if(1===this.containers.length)this.containers[u].containerCache.over||(this.containers[u]._trigger("over",t,this._uiHash(this)),this.containers[u].containerCache.over=1);else{for(i=1e4,s=null,n=(h=c.floating||this._isFloating(this.currentItem))?"left":"top",o=h?"width":"height",l=h?"pageX":"pageY",e=this.items.length-1;0<=e;e--)x.contains(this.containers[u].element[0],this.items[e].item[0])&&this.items[e].item[0]!==this.currentItem[0]&&(a=this.items[e].item.offset()[n],r=!1,t[l]-a>this.items[e][o]/2&&(r=!0),Math.abs(t[l]-a)<i&&(i=Math.abs(t[l]-a),s=this.items[e],this.direction=r?"up":"down"));(s||this.options.dropOnEmpty)&&(this.currentContainer!==this.containers[u]?(s?this._rearrange(t,s,null,!0):this._rearrange(t,null,this.containers[u].element,!0),this._trigger("change",t,this._uiHash()),this.containers[u]._trigger("change",t,this._uiHash(this)),this.currentContainer=this.containers[u],this.options.placeholder.update(this.currentContainer,this.placeholder),this.scrollParent=this.placeholder.scrollParent(),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this.containers[u]._trigger("over",t,this._uiHash(this)),this.containers[u].containerCache.over=1):this.currentContainer.containerCache.over||(this.containers[u]._trigger("over",t,this._uiHash()),this.currentContainer.containerCache.over=1))}},_createHelper:function(t){var e=this.options,t="function"==typeof e.helper?x(e.helper.apply(this.element[0],[t,this.currentItem])):"clone"===e.helper?this.currentItem.clone():this.currentItem;return t.parents("body").length||this.appendTo[0].appendChild(t[0]),t[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),t[0].style.width&&!e.forceHelperSize||t.width(this.currentItem.width()),t[0].style.height&&!e.forceHelperSize||t.height(this.currentItem.height()),t},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),"left"in(t=Array.isArray(t)?{left:+t[0],top:+t[1]||0}:t)&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var t=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==this.document[0]&&x.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),{top:(t=this.offsetParent[0]===this.document[0].body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&x.ui.ie?{top:0,left:0}:t).top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var t=this.currentItem.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,e,i=this.options;"parent"===i.containment&&(i.containment=this.helper[0].parentNode),"document"!==i.containment&&"window"!==i.containment||(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,"document"===i.containment?this.document.width():this.window.width()-this.helperProportions.width-this.margins.left,("document"===i.containment?this.document.height()||document.body.parentNode.scrollHeight:this.window.height()||this.document[0].body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(i.containment)||(t=x(i.containment)[0],e=x(i.containment).offset(),i="hidden"!==x(t).css("overflow"),this.containment=[e.left+(parseInt(x(t).css("borderLeftWidth"),10)||0)+(parseInt(x(t).css("paddingLeft"),10)||0)-this.margins.left,e.top+(parseInt(x(t).css("borderTopWidth"),10)||0)+(parseInt(x(t).css("paddingTop"),10)||0)-this.margins.top,e.left+(i?Math.max(t.scrollWidth,t.offsetWidth):t.offsetWidth)-(parseInt(x(t).css("borderLeftWidth"),10)||0)-(parseInt(x(t).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,e.top+(i?Math.max(t.scrollHeight,t.offsetHeight):t.offsetHeight)-(parseInt(x(t).css("borderTopWidth"),10)||0)-(parseInt(x(t).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(t,e){e=e||this.position;var i="absolute"===t?1:-1,s="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&x.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,t=/(html|body)/i.test(s[0].tagName);return{top:e.top+this.offset.relative.top*i+this.offset.parent.top*i-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():t?0:s.scrollTop())*i,left:e.left+this.offset.relative.left*i+this.offset.parent.left*i-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():t?0:s.scrollLeft())*i}},_generatePosition:function(t){var e=this.options,i=t.pageX,s=t.pageY,n="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&x.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,o=/(html|body)/i.test(n[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(t.pageX-this.offset.click.left<this.containment[0]&&(i=this.containment[0]+this.offset.click.left),t.pageY-this.offset.click.top<this.containment[1]&&(s=this.containment[1]+this.offset.click.top),t.pageX-this.offset.click.left>this.containment[2]&&(i=this.containment[2]+this.offset.click.left),t.pageY-this.offset.click.top>this.containment[3]&&(s=this.containment[3]+this.offset.click.top)),e.grid&&(t=this.originalPageY+Math.round((s-this.originalPageY)/e.grid[1])*e.grid[1],s=!this.containment||t-this.offset.click.top>=this.containment[1]&&t-this.offset.click.top<=this.containment[3]?t:t-this.offset.click.top>=this.containment[1]?t-e.grid[1]:t+e.grid[1],t=this.originalPageX+Math.round((i-this.originalPageX)/e.grid[0])*e.grid[0],i=!this.containment||t-this.offset.click.left>=this.containment[0]&&t-this.offset.click.left<=this.containment[2]?t:t-this.offset.click.left>=this.containment[0]?t-e.grid[0]:t+e.grid[0])),{top:s-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():o?0:n.scrollTop()),left:i-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():o?0:n.scrollLeft())}},_rearrange:function(t,e,i,s){i?i[0].appendChild(this.placeholder[0]):e.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?e.item[0]:e.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var n=this.counter;this._delay(function(){n===this.counter&&this.refreshPositions(!s)})},_clear:function(t,e){this.reverting=!1;var i,s=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(i in this._storedCSS)"auto"!==this._storedCSS[i]&&"static"!==this._storedCSS[i]||(this._storedCSS[i]="");this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")}else this.currentItem.show();function n(e,i,s){return function(t){s._trigger(e,t,i._uiHash(i))}}for(this.fromOutside&&!e&&s.push(function(t){this._trigger("receive",t,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||e||s.push(function(t){this._trigger("update",t,this._uiHash())}),this!==this.currentContainer&&(e||(s.push(function(t){this._trigger("remove",t,this._uiHash())}),s.push(function(e){return function(t){e._trigger("receive",t,this._uiHash(this))}}.call(this,this.currentContainer)),s.push(function(e){return function(t){e._trigger("update",t,this._uiHash(this))}}.call(this,this.currentContainer)))),i=this.containers.length-1;0<=i;i--)e||s.push(n("deactivate",this,this.containers[i])),this.containers[i].containerCache.over&&(s.push(n("out",this,this.containers[i])),this.containers[i].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,e||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!e){for(i=0;i<s.length;i++)s[i].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!this.cancelHelperRemoval},_trigger:function(){!1===x.Widget.prototype._trigger.apply(this,arguments)&&this.cancel()},_uiHash:function(t){var e=t||this;return{helper:e.helper,placeholder:e.placeholder||x([]),position:e.position,originalPosition:e.originalPosition,offset:e.positionAbs,item:e.currentItem,sender:t?t.element:null}}}),x.widget("ui.accordion",{version:"1.13.1",options:{active:0,animate:{},classes:{"ui-accordion-header":"ui-corner-top","ui-accordion-header-collapsed":"ui-corner-all","ui-accordion-content":"ui-corner-bottom"},collapsible:!1,event:"click",header:function(t){return t.find("> li > :first-child").add(t.find("> :not(li)").even())},heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},hideProps:{borderTopWidth:"hide",borderBottomWidth:"hide",paddingTop:"hide",paddingBottom:"hide",height:"hide"},showProps:{borderTopWidth:"show",borderBottomWidth:"show",paddingTop:"show",paddingBottom:"show",height:"show"},_create:function(){var t=this.options;this.prevShow=this.prevHide=x(),this._addClass("ui-accordion","ui-widget ui-helper-reset"),this.element.attr("role","tablist"),t.collapsible||!1!==t.active&&null!=t.active||(t.active=0),this._processPanels(),t.active<0&&(t.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():x()}},_createIcons:function(){var t,e=this.options.icons;e&&(t=x("<span>"),this._addClass(t,"ui-accordion-header-icon","ui-icon "+e.header),t.prependTo(this.headers),t=this.active.children(".ui-accordion-header-icon"),this._removeClass(t,e.header)._addClass(t,null,e.activeHeader)._addClass(this.headers,"ui-accordion-icons"))},_destroyIcons:function(){this._removeClass(this.headers,"ui-accordion-icons"),this.headers.children(".ui-accordion-header-icon").remove()},_destroy:function(){var t;this.element.removeAttr("role"),this.headers.removeAttr("role aria-expanded aria-selected aria-controls tabIndex").removeUniqueId(),this._destroyIcons(),t=this.headers.next().css("display","").removeAttr("role aria-hidden aria-labelledby").removeUniqueId(),"content"!==this.options.heightStyle&&t.css("height","")},_setOption:function(t,e){"active"!==t?("event"===t&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(e)),this._super(t,e),"collapsible"!==t||e||!1!==this.options.active||this._activate(0),"icons"===t&&(this._destroyIcons(),e&&this._createIcons())):this._activate(e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t),this._toggleClass(null,"ui-state-disabled",!!t),this._toggleClass(this.headers.add(this.headers.next()),null,"ui-state-disabled",!!t)},_keydown:function(t){if(!t.altKey&&!t.ctrlKey){var e=x.ui.keyCode,i=this.headers.length,s=this.headers.index(t.target),n=!1;switch(t.keyCode){case e.RIGHT:case e.DOWN:n=this.headers[(s+1)%i];break;case e.LEFT:case e.UP:n=this.headers[(s-1+i)%i];break;case e.SPACE:case e.ENTER:this._eventHandler(t);break;case e.HOME:n=this.headers[0];break;case e.END:n=this.headers[i-1]}n&&(x(t.target).attr("tabIndex",-1),x(n).attr("tabIndex",0),x(n).trigger("focus"),t.preventDefault())}},_panelKeyDown:function(t){t.keyCode===x.ui.keyCode.UP&&t.ctrlKey&&x(t.currentTarget).prev().trigger("focus")},refresh:function(){var t=this.options;this._processPanels(),!1===t.active&&!0===t.collapsible||!this.headers.length?(t.active=!1,this.active=x()):!1===t.active?this._activate(0):this.active.length&&!x.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(t.active=!1,this.active=x()):this._activate(Math.max(0,t.active-1)):t.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){var t=this.headers,e=this.panels;"function"==typeof this.options.header?this.headers=this.options.header(this.element):this.headers=this.element.find(this.options.header),this._addClass(this.headers,"ui-accordion-header ui-accordion-header-collapsed","ui-state-default"),this.panels=this.headers.next().filter(":not(.ui-accordion-content-active)").hide(),this._addClass(this.panels,"ui-accordion-content","ui-helper-reset ui-widget-content"),e&&(this._off(t.not(this.headers)),this._off(e.not(this.panels)))},_refresh:function(){var i,t=this.options,e=t.heightStyle,s=this.element.parent();this.active=this._findActive(t.active),this._addClass(this.active,"ui-accordion-header-active","ui-state-active")._removeClass(this.active,"ui-accordion-header-collapsed"),this._addClass(this.active.next(),"ui-accordion-content-active"),this.active.next().show(),this.headers.attr("role","tab").each(function(){var t=x(this),e=t.uniqueId().attr("id"),i=t.next(),s=i.uniqueId().attr("id");t.attr("aria-controls",s),i.attr("aria-labelledby",e)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}).next().attr({"aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}).next().attr({"aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(t.event),"fill"===e?(i=s.height(),this.element.siblings(":visible").each(function(){var t=x(this),e=t.css("position");"absolute"!==e&&"fixed"!==e&&(i-=t.outerHeight(!0))}),this.headers.each(function(){i-=x(this).outerHeight(!0)}),this.headers.next().each(function(){x(this).height(Math.max(0,i-x(this).innerHeight()+x(this).height()))}).css("overflow","auto")):"auto"===e&&(i=0,this.headers.next().each(function(){var t=x(this).is(":visible");t||x(this).show(),i=Math.max(i,x(this).css("height","").height()),t||x(this).hide()}).height(i))},_activate:function(t){t=this._findActive(t)[0];t!==this.active[0]&&(t=t||this.active[0],this._eventHandler({target:t,currentTarget:t,preventDefault:x.noop}))},_findActive:function(t){return"number"==typeof t?this.headers.eq(t):x()},_setupEvents:function(t){var i={keydown:"_keydown"};t&&x.each(t.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,i),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(t){var e=this.options,i=this.active,s=x(t.currentTarget),n=s[0]===i[0],o=n&&e.collapsible,a=o?x():s.next(),r=i.next(),a={oldHeader:i,oldPanel:r,newHeader:o?x():s,newPanel:a};t.preventDefault(),n&&!e.collapsible||!1===this._trigger("beforeActivate",t,a)||(e.active=!o&&this.headers.index(s),this.active=n?x():s,this._toggle(a),this._removeClass(i,"ui-accordion-header-active","ui-state-active"),e.icons&&(i=i.children(".ui-accordion-header-icon"),this._removeClass(i,null,e.icons.activeHeader)._addClass(i,null,e.icons.header)),n||(this._removeClass(s,"ui-accordion-header-collapsed")._addClass(s,"ui-accordion-header-active","ui-state-active"),e.icons&&(n=s.children(".ui-accordion-header-icon"),this._removeClass(n,null,e.icons.header)._addClass(n,null,e.icons.activeHeader)),this._addClass(s.next(),"ui-accordion-content-active")))},_toggle:function(t){var e=t.newPanel,i=this.prevShow.length?this.prevShow:t.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=e,this.prevHide=i,this.options.animate?this._animate(e,i,t):(i.hide(),e.show(),this._toggleComplete(t)),i.attr({"aria-hidden":"true"}),i.prev().attr({"aria-selected":"false","aria-expanded":"false"}),e.length&&i.length?i.prev().attr({tabIndex:-1,"aria-expanded":"false"}):e.length&&this.headers.filter(function(){return 0===parseInt(x(this).attr("tabIndex"),10)}).attr("tabIndex",-1),e.attr("aria-hidden","false").prev().attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_animate:function(t,i,e){var s,n,o,a=this,r=0,h=t.css("box-sizing"),l=t.length&&(!i.length||t.index()<i.index()),c=this.options.animate||{},u=l&&c.down||c,l=function(){a._toggleComplete(e)};return n=(n="string"==typeof u?u:n)||u.easing||c.easing,o=(o="number"==typeof u?u:o)||u.duration||c.duration,i.length?t.length?(s=t.show().outerHeight(),i.animate(this.hideProps,{duration:o,easing:n,step:function(t,e){e.now=Math.round(t)}}),void t.hide().animate(this.showProps,{duration:o,easing:n,complete:l,step:function(t,e){e.now=Math.round(t),"height"!==e.prop?"content-box"===h&&(r+=e.now):"content"!==a.options.heightStyle&&(e.now=Math.round(s-i.outerHeight()-r),r=0)}})):i.animate(this.hideProps,o,n,l):t.animate(this.showProps,o,n,l)},_toggleComplete:function(t){var e=t.oldPanel,i=e.prev();this._removeClass(e,"ui-accordion-content-active"),this._removeClass(i,"ui-accordion-header-active")._addClass(i,"ui-accordion-header-collapsed"),e.length&&(e.parent()[0].className=e.parent()[0].className),this._trigger("activate",null,t)}}),x.ui.safeActiveElement=function(e){var i;try{i=e.activeElement}catch(t){i=e.body}return i=!(i=i||e.body).nodeName?e.body:i},x.widget("ui.menu",{version:"1.13.1",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-caret-1-e"},items:"> *",menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.lastMousePosition={x:null,y:null},this.element.uniqueId().attr({role:this.options.role,tabIndex:0}),this._addClass("ui-menu","ui-widget ui-widget-content"),this._on({"mousedown .ui-menu-item":function(t){t.preventDefault(),this._activateItem(t)},"click .ui-menu-item":function(t){var e=x(t.target),i=x(x.ui.safeActiveElement(this.document[0]));!this.mouseHandled&&e.not(".ui-state-disabled").length&&(this.select(t),t.isPropagationStopped()||(this.mouseHandled=!0),e.has(".ui-menu").length?this.expand(t):!this.element.is(":focus")&&i.closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":"_activateItem","mousemove .ui-menu-item":"_activateItem",mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var i=this.active||this._menuItems().first();e||this.focus(t,i)},blur:function(t){this._delay(function(){x.contains(this.element[0],x.ui.safeActiveElement(this.document[0]))||this.collapseAll(t)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(t){this._closeOnDocumentClick(t)&&this.collapseAll(t,!0),this.mouseHandled=!1}})},_activateItem:function(t){var e,i;this.previousFilter||t.clientX===this.lastMousePosition.x&&t.clientY===this.lastMousePosition.y||(this.lastMousePosition={x:t.clientX,y:t.clientY},e=x(t.target).closest(".ui-menu-item"),i=x(t.currentTarget),e[0]===i[0]&&(i.is(".ui-state-active")||(this._removeClass(i.siblings().children(".ui-state-active"),null,"ui-state-active"),this.focus(t,i))))},_destroy:function(){var t=this.element.find(".ui-menu-item").removeAttr("role aria-disabled").children(".ui-menu-item-wrapper").removeUniqueId().removeAttr("tabIndex role aria-haspopup");this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeAttr("role aria-labelledby aria-expanded aria-hidden aria-disabled tabIndex").removeUniqueId().show(),t.children().each(function(){var t=x(this);t.data("ui-menu-submenu-caret")&&t.remove()})},_keydown:function(t){var e,i,s,n=!0;switch(t.keyCode){case x.ui.keyCode.PAGE_UP:this.previousPage(t);break;case x.ui.keyCode.PAGE_DOWN:this.nextPage(t);break;case x.ui.keyCode.HOME:this._move("first","first",t);break;case x.ui.keyCode.END:this._move("last","last",t);break;case x.ui.keyCode.UP:this.previous(t);break;case x.ui.keyCode.DOWN:this.next(t);break;case x.ui.keyCode.LEFT:this.collapse(t);break;case x.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(t);break;case x.ui.keyCode.ENTER:case x.ui.keyCode.SPACE:this._activate(t);break;case x.ui.keyCode.ESCAPE:this.collapse(t);break;default:e=this.previousFilter||"",s=n=!1,i=96<=t.keyCode&&t.keyCode<=105?(t.keyCode-96).toString():String.fromCharCode(t.keyCode),clearTimeout(this.filterTimer),i===e?s=!0:i=e+i,e=this._filterMenuItems(i),(e=s&&-1!==e.index(this.active.next())?this.active.nextAll(".ui-menu-item"):e).length||(i=String.fromCharCode(t.keyCode),e=this._filterMenuItems(i)),e.length?(this.focus(t,e),this.previousFilter=i,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}n&&t.preventDefault()},_activate:function(t){this.active&&!this.active.is(".ui-state-disabled")&&(this.active.children("[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var t,e,s=this,n=this.options.icons.submenu,i=this.element.find(this.options.menus);this._toggleClass("ui-menu-icons",null,!!this.element.find(".ui-icon").length),e=i.filter(":not(.ui-menu)").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var t=x(this),e=t.prev(),i=x("<span>").data("ui-menu-submenu-caret",!0);s._addClass(i,"ui-menu-icon","ui-icon "+n),e.attr("aria-haspopup","true").prepend(i),t.attr("aria-labelledby",e.attr("id"))}),this._addClass(e,"ui-menu","ui-widget ui-widget-content ui-front"),(t=i.add(this.element).find(this.options.items)).not(".ui-menu-item").each(function(){var t=x(this);s._isDivider(t)&&s._addClass(t,"ui-menu-divider","ui-widget-content")}),i=(e=t.not(".ui-menu-item, .ui-menu-divider")).children().not(".ui-menu").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),this._addClass(e,"ui-menu-item")._addClass(i,"ui-menu-item-wrapper"),t.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!x.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){var i;"icons"===t&&(i=this.element.find(".ui-menu-icon"),this._removeClass(i,null,this.options.icons.submenu)._addClass(i,null,e.submenu)),this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",String(t)),this._toggleClass(null,"ui-state-disabled",!!t)},focus:function(t,e){var i;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),i=this.active.children(".ui-menu-item-wrapper"),this._addClass(i,null,"ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",i.attr("id")),i=this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper"),this._addClass(i,null,"ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),(i=e.children(".ui-menu")).length&&t&&/^mouse/.test(t.type)&&this._startOpening(i),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(t){var e,i,s;this._hasScroll()&&(i=parseFloat(x.css(this.activeMenu[0],"borderTopWidth"))||0,s=parseFloat(x.css(this.activeMenu[0],"paddingTop"))||0,e=t.offset().top-this.activeMenu.offset().top-i-s,i=this.activeMenu.scrollTop(),s=this.activeMenu.height(),t=t.outerHeight(),e<0?this.activeMenu.scrollTop(i+e):s<e+t&&this.activeMenu.scrollTop(i+e-s+t))},blur:function(t,e){e||clearTimeout(this.timer),this.active&&(this._removeClass(this.active.children(".ui-menu-item-wrapper"),null,"ui-state-active"),this._trigger("blur",t,{item:this.active}),this.active=null)},_startOpening:function(t){clearTimeout(this.timer),"true"===t.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(t)},this.delay))},_open:function(t){var e=x.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(t.parents(".ui-menu")).hide().attr("aria-hidden","true"),t.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(e)},collapseAll:function(e,i){clearTimeout(this.timer),this.timer=this._delay(function(){var t=i?this.element:x(e&&e.target).closest(this.element.find(".ui-menu"));t.length||(t=this.element),this._close(t),this.blur(e),this._removeClass(t.find(".ui-state-active"),null,"ui-state-active"),this.activeMenu=t},i?0:this.delay)},_close:function(t){(t=t||(this.active?this.active.parent():this.element)).find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false")},_closeOnDocumentClick:function(t){return!x(t.target).closest(".ui-menu").length},_isDivider:function(t){return!/[^\-\u2014\u2013\s]/.test(t.text())},collapse:function(t){var e=this.active&&this.active.parent().closest(".ui-menu-item",this.element);e&&e.length&&(this._close(),this.focus(t,e))},expand:function(t){var e=this.active&&this._menuItems(this.active.children(".ui-menu")).first();e&&e.length&&(this._open(e.parent()),this._delay(function(){this.focus(t,e)}))},next:function(t){this._move("next","first",t)},previous:function(t){this._move("prev","last",t)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_menuItems:function(t){return(t||this.element).find(this.options.items).filter(".ui-menu-item")},_move:function(t,e,i){var s;(s=this.active?"first"===t||"last"===t?this.active["first"===t?"prevAll":"nextAll"](".ui-menu-item").last():this.active[t+"All"](".ui-menu-item").first():s)&&s.length&&this.active||(s=this._menuItems(this.activeMenu)[e]()),this.focus(i,s)},nextPage:function(t){var e,i,s;this.active?this.isLastItem()||(this._hasScroll()?(i=this.active.offset().top,s=this.element.innerHeight(),0===x.fn.jquery.indexOf("3.2.")&&(s+=this.element[0].offsetHeight-this.element.outerHeight()),this.active.nextAll(".ui-menu-item").each(function(){return(e=x(this)).offset().top-i-s<0}),this.focus(t,e)):this.focus(t,this._menuItems(this.activeMenu)[this.active?"last":"first"]())):this.next(t)},previousPage:function(t){var e,i,s;this.active?this.isFirstItem()||(this._hasScroll()?(i=this.active.offset().top,s=this.element.innerHeight(),0===x.fn.jquery.indexOf("3.2.")&&(s+=this.element[0].offsetHeight-this.element.outerHeight()),this.active.prevAll(".ui-menu-item").each(function(){return 0<(e=x(this)).offset().top-i+s}),this.focus(t,e)):this.focus(t,this._menuItems(this.activeMenu).first())):this.next(t)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(t){this.active=this.active||x(t.target).closest(".ui-menu-item");var e={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(t,!0),this._trigger("select",t,e)},_filterMenuItems:function(t){var t=t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"),e=new RegExp("^"+t,"i");return this.activeMenu.find(this.options.items).filter(".ui-menu-item").filter(function(){return e.test(String.prototype.trim.call(x(this).children(".ui-menu-item-wrapper").text()))})}});x.widget("ui.autocomplete",{version:"1.13.1",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,liveRegionTimer:null,_create:function(){var i,s,n,t=this.element[0].nodeName.toLowerCase(),e="textarea"===t,t="input"===t;this.isMultiLine=e||!t&&this._isContentEditable(this.element),this.valueMethod=this.element[e||t?"val":"text"],this.isNewMenu=!0,this._addClass("ui-autocomplete-input"),this.element.attr("autocomplete","off"),this._on(this.element,{keydown:function(t){if(this.element.prop("readOnly"))s=n=i=!0;else{s=n=i=!1;var e=x.ui.keyCode;switch(t.keyCode){case e.PAGE_UP:i=!0,this._move("previousPage",t);break;case e.PAGE_DOWN:i=!0,this._move("nextPage",t);break;case e.UP:i=!0,this._keyEvent("previous",t);break;case e.DOWN:i=!0,this._keyEvent("next",t);break;case e.ENTER:this.menu.active&&(i=!0,t.preventDefault(),this.menu.select(t));break;case e.TAB:this.menu.active&&this.menu.select(t);break;case e.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(t),t.preventDefault());break;default:s=!0,this._searchTimeout(t)}}},keypress:function(t){if(i)return i=!1,void(this.isMultiLine&&!this.menu.element.is(":visible")||t.preventDefault());if(!s){var e=x.ui.keyCode;switch(t.keyCode){case e.PAGE_UP:this._move("previousPage",t);break;case e.PAGE_DOWN:this._move("nextPage",t);break;case e.UP:this._keyEvent("previous",t);break;case e.DOWN:this._keyEvent("next",t)}}},input:function(t){if(n)return n=!1,void t.preventDefault();this._searchTimeout(t)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(t){clearTimeout(this.searching),this.close(t),this._change(t)}}),this._initSource(),this.menu=x("<ul>").appendTo(this._appendTo()).menu({role:null}).hide().attr({unselectable:"on"}).menu("instance"),this._addClass(this.menu.element,"ui-autocomplete","ui-front"),this._on(this.menu.element,{mousedown:function(t){t.preventDefault()},menufocus:function(t,e){var i,s;if(this.isNewMenu&&(this.isNewMenu=!1,t.originalEvent&&/^mouse/.test(t.originalEvent.type)))return this.menu.blur(),void this.document.one("mousemove",function(){x(t.target).trigger(t.originalEvent)});s=e.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",t,{item:s})&&t.originalEvent&&/^key/.test(t.originalEvent.type)&&this._value(s.value),(i=e.item.attr("aria-label")||s.value)&&String.prototype.trim.call(i).length&&(clearTimeout(this.liveRegionTimer),this.liveRegionTimer=this._delay(function(){this.liveRegion.html(x("<div>").text(i))},100))},menuselect:function(t,e){var i=e.item.data("ui-autocomplete-item"),s=this.previous;this.element[0]!==x.ui.safeActiveElement(this.document[0])&&(this.element.trigger("focus"),this.previous=s,this._delay(function(){this.previous=s,this.selectedItem=i})),!1!==this._trigger("select",t,{item:i})&&this._value(i.value),this.term=this._value(),this.close(t),this.selectedItem=i}}),this.liveRegion=x("<div>",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(t,e){this._super(t,e),"source"===t&&this._initSource(),"appendTo"===t&&this.menu.element.appendTo(this._appendTo()),"disabled"===t&&e&&this.xhr&&this.xhr.abort()},_isEventTargetInWidget:function(t){var e=this.menu.element[0];return t.target===this.element[0]||t.target===e||x.contains(e,t.target)},_closeOnClickOutside:function(t){this._isEventTargetInWidget(t)||this.close()},_appendTo:function(){var t=this.options.appendTo;return t=!(t=!(t=t&&(t.jquery||t.nodeType?x(t):this.document.find(t).eq(0)))||!t[0]?this.element.closest(".ui-front, dialog"):t).length?this.document[0].body:t},_initSource:function(){var i,s,n=this;Array.isArray(this.options.source)?(i=this.options.source,this.source=function(t,e){e(x.ui.autocomplete.filter(i,t.term))}):"string"==typeof this.options.source?(s=this.options.source,this.source=function(t,e){n.xhr&&n.xhr.abort(),n.xhr=x.ajax({url:s,data:t,dataType:"json",success:function(t){e(t)},error:function(){e([])}})}):this.source=this.options.source},_searchTimeout:function(s){clearTimeout(this.searching),this.searching=this._delay(function(){var t=this.term===this._value(),e=this.menu.element.is(":visible"),i=s.altKey||s.ctrlKey||s.metaKey||s.shiftKey;t&&(e||i)||(this.selectedItem=null,this.search(null,s))},this.options.delay)},search:function(t,e){return t=null!=t?t:this._value(),this.term=this._value(),t.length<this.options.minLength?this.close(e):!1!==this._trigger("search",e)?this._search(t):void 0},_search:function(t){this.pending++,this._addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:t},this._response())},_response:function(){var e=++this.requestIndex;return function(t){e===this.requestIndex&&this.__response(t),this.pending--,this.pending||this._removeClass("ui-autocomplete-loading")}.bind(this)},__response:function(t){t=t&&this._normalize(t),this._trigger("response",null,{content:t}),!this.options.disabled&&t&&t.length&&!this.cancelSearch?(this._suggest(t),this._trigger("open")):this._close()},close:function(t){this.cancelSearch=!0,this._close(t)},_close:function(t){this._off(this.document,"mousedown"),this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",t))},_change:function(t){this.previous!==this._value()&&this._trigger("change",t,{item:this.selectedItem})},_normalize:function(t){return t.length&&t[0].label&&t[0].value?t:x.map(t,function(t){return"string"==typeof t?{label:t,value:t}:x.extend({},t,{label:t.label||t.value,value:t.value||t.label})})},_suggest:function(t){var e=this.menu.element.empty();this._renderMenu(e,t),this.isNewMenu=!0,this.menu.refresh(),e.show(),this._resizeMenu(),e.position(x.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next(),this._on(this.document,{mousedown:"_closeOnClickOutside"})},_resizeMenu:function(){var t=this.menu.element;t.outerWidth(Math.max(t.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(i,t){var s=this;x.each(t,function(t,e){s._renderItemData(i,e)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-autocomplete-item",e)},_renderItem:function(t,e){return x("<li>").append(x("<div>").text(e.label)).appendTo(t)},_move:function(t,e){if(this.menu.element.is(":visible"))return this.menu.isFirstItem()&&/^previous/.test(t)||this.menu.isLastItem()&&/^next/.test(t)?(this.isMultiLine||this._value(this.term),void this.menu.blur()):void this.menu[t](e);this.search(null,e)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(t,e){this.isMultiLine&&!this.menu.element.is(":visible")||(this._move(t,e),e.preventDefault())},_isContentEditable:function(t){if(!t.length)return!1;var e=t.prop("contentEditable");return"inherit"===e?this._isContentEditable(t.parent()):"true"===e}}),x.extend(x.ui.autocomplete,{escapeRegex:function(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(t,e){var i=new RegExp(x.ui.autocomplete.escapeRegex(e),"i");return x.grep(t,function(t){return i.test(t.label||t.value||t)})}}),x.widget("ui.autocomplete",x.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(t){return t+(1<t?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(t){var e;this._superApply(arguments),this.options.disabled||this.cancelSearch||(e=t&&t.length?this.options.messages.results(t.length):this.options.messages.noResults,clearTimeout(this.liveRegionTimer),this.liveRegionTimer=this._delay(function(){this.liveRegion.html(x("<div>").text(e))},100))}});var p;x.ui.autocomplete;x.widget("ui.tabs",{version:"1.13.1",delay:300,options:{active:null,classes:{"ui-tabs":"ui-corner-all","ui-tabs-nav":"ui-corner-all","ui-tabs-panel":"ui-corner-bottom","ui-tabs-tab":"ui-corner-top"},collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_isLocal:(p=/#.*$/,function(t){var e=t.href.replace(p,""),i=location.href.replace(p,"");try{e=decodeURIComponent(e)}catch(t){}try{i=decodeURIComponent(i)}catch(t){}return 1<t.hash.length&&e===i}),_create:function(){var e=this,t=this.options;this.running=!1,this._addClass("ui-tabs","ui-widget ui-widget-content"),this._toggleClass("ui-tabs-collapsible",null,t.collapsible),this._processTabs(),t.active=this._initialActive(),Array.isArray(t.disabled)&&(t.disabled=x.uniqueSort(t.disabled.concat(x.map(this.tabs.filter(".ui-state-disabled"),function(t){return e.tabs.index(t)}))).sort()),!1!==this.options.active&&this.anchors.length?this.active=this._findActive(t.active):this.active=x(),this._refresh(),this.active.length&&this.load(t.active)},_initialActive:function(){var i=this.options.active,t=this.options.collapsible,s=location.hash.substring(1);return null===i&&(s&&this.tabs.each(function(t,e){if(x(e).attr("aria-controls")===s)return i=t,!1}),null!==(i=null===i?this.tabs.index(this.tabs.filter(".ui-tabs-active")):i)&&-1!==i||(i=!!this.tabs.length&&0)),!1!==i&&-1===(i=this.tabs.index(this.tabs.eq(i)))&&(i=!t&&0),i=!t&&!1===i&&this.anchors.length?0:i},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):x()}},_tabKeydown:function(t){var e=x(x.ui.safeActiveElement(this.document[0])).closest("li"),i=this.tabs.index(e),s=!0;if(!this._handlePageNav(t)){switch(t.keyCode){case x.ui.keyCode.RIGHT:case x.ui.keyCode.DOWN:i++;break;case x.ui.keyCode.UP:case x.ui.keyCode.LEFT:s=!1,i--;break;case x.ui.keyCode.END:i=this.anchors.length-1;break;case x.ui.keyCode.HOME:i=0;break;case x.ui.keyCode.SPACE:return t.preventDefault(),clearTimeout(this.activating),void this._activate(i);case x.ui.keyCode.ENTER:return t.preventDefault(),clearTimeout(this.activating),void this._activate(i!==this.options.active&&i);default:return}t.preventDefault(),clearTimeout(this.activating),i=this._focusNextTab(i,s),t.ctrlKey||t.metaKey||(e.attr("aria-selected","false"),this.tabs.eq(i).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",i)},this.delay))}},_panelKeydown:function(t){this._handlePageNav(t)||t.ctrlKey&&t.keyCode===x.ui.keyCode.UP&&(t.preventDefault(),this.active.trigger("focus"))},_handlePageNav:function(t){return t.altKey&&t.keyCode===x.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):t.altKey&&t.keyCode===x.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):void 0},_findNextTab:function(t,e){var i=this.tabs.length-1;for(;-1!==x.inArray(t=(t=i<t?0:t)<0?i:t,this.options.disabled);)t=e?t+1:t-1;return t},_focusNextTab:function(t,e){return t=this._findNextTab(t,e),this.tabs.eq(t).trigger("focus"),t},_setOption:function(t,e){"active"!==t?(this._super(t,e),"collapsible"===t&&(this._toggleClass("ui-tabs-collapsible",null,e),e||!1!==this.options.active||this._activate(0)),"event"===t&&this._setupEvents(e),"heightStyle"===t&&this._setupHeightStyle(e)):this._activate(e)},_sanitizeSelector:function(t){return t?t.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var t=this.options,e=this.tablist.children(":has(a[href])");t.disabled=x.map(e.filter(".ui-state-disabled"),function(t){return e.index(t)}),this._processTabs(),!1!==t.active&&this.anchors.length?this.active.length&&!x.contains(this.tablist[0],this.active[0])?this.tabs.length===t.disabled.length?(t.active=!1,this.active=x()):this._activate(this._findNextTab(Math.max(0,t.active-1),!1)):t.active=this.tabs.index(this.active):(t.active=!1,this.active=x()),this._refresh()},_refresh:function(){this._setOptionDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-hidden":"true"}),this.active.length?(this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}),this._addClass(this.active,"ui-tabs-active","ui-state-active"),this._getPanelForTab(this.active).show().attr({"aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var h=this,t=this.tabs,e=this.anchors,i=this.panels;this.tablist=this._getList().attr("role","tablist"),this._addClass(this.tablist,"ui-tabs-nav","ui-helper-reset ui-helper-clearfix ui-widget-header"),this.tablist.on("mousedown"+this.eventNamespace,"> li",function(t){x(this).is(".ui-state-disabled")&&t.preventDefault()}).on("focus"+this.eventNamespace,".ui-tabs-anchor",function(){x(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this.tabs=this.tablist.find("> li:has(a[href])").attr({role:"tab",tabIndex:-1}),this._addClass(this.tabs,"ui-tabs-tab","ui-state-default"),this.anchors=this.tabs.map(function(){return x("a",this)[0]}).attr({tabIndex:-1}),this._addClass(this.anchors,"ui-tabs-anchor"),this.panels=x(),this.anchors.each(function(t,e){var i,s,n,o=x(e).uniqueId().attr("id"),a=x(e).closest("li"),r=a.attr("aria-controls");h._isLocal(e)?(n=(i=e.hash).substring(1),s=h.element.find(h._sanitizeSelector(i))):(n=a.attr("aria-controls")||x({}).uniqueId()[0].id,(s=h.element.find(i="#"+n)).length||(s=h._createPanel(n)).insertAfter(h.panels[t-1]||h.tablist),s.attr("aria-live","polite")),s.length&&(h.panels=h.panels.add(s)),r&&a.data("ui-tabs-aria-controls",r),a.attr({"aria-controls":n,"aria-labelledby":o}),s.attr("aria-labelledby",o)}),this.panels.attr("role","tabpanel"),this._addClass(this.panels,"ui-tabs-panel","ui-widget-content"),t&&(this._off(t.not(this.tabs)),this._off(e.not(this.anchors)),this._off(i.not(this.panels)))},_getList:function(){return this.tablist||this.element.find("ol, ul").eq(0)},_createPanel:function(t){return x("<div>").attr("id",t).data("ui-tabs-destroy",!0)},_setOptionDisabled:function(t){var e,i;for(Array.isArray(t)&&(t.length?t.length===this.anchors.length&&(t=!0):t=!1),i=0;e=this.tabs[i];i++)e=x(e),!0===t||-1!==x.inArray(i,t)?(e.attr("aria-disabled","true"),this._addClass(e,null,"ui-state-disabled")):(e.removeAttr("aria-disabled"),this._removeClass(e,null,"ui-state-disabled"));this.options.disabled=t,this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!0===t)},_setupEvents:function(t){var i={};t&&x.each(t.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(!0,this.anchors,{click:function(t){t.preventDefault()}}),this._on(this.anchors,i),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(t){var i,e=this.element.parent();"fill"===t?(i=e.height(),i-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var t=x(this),e=t.css("position");"absolute"!==e&&"fixed"!==e&&(i-=t.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){i-=x(this).outerHeight(!0)}),this.panels.each(function(){x(this).height(Math.max(0,i-x(this).innerHeight()+x(this).height()))}).css("overflow","auto")):"auto"===t&&(i=0,this.panels.each(function(){i=Math.max(i,x(this).height("").height())}).height(i))},_eventHandler:function(t){var e=this.options,i=this.active,s=x(t.currentTarget).closest("li"),n=s[0]===i[0],o=n&&e.collapsible,a=o?x():this._getPanelForTab(s),r=i.length?this._getPanelForTab(i):x(),i={oldTab:i,oldPanel:r,newTab:o?x():s,newPanel:a};t.preventDefault(),s.hasClass("ui-state-disabled")||s.hasClass("ui-tabs-loading")||this.running||n&&!e.collapsible||!1===this._trigger("beforeActivate",t,i)||(e.active=!o&&this.tabs.index(s),this.active=n?x():s,this.xhr&&this.xhr.abort(),r.length||a.length||x.error("jQuery UI Tabs: Mismatching fragment identifier."),a.length&&this.load(this.tabs.index(s),t),this._toggle(t,i))},_toggle:function(t,e){var i=this,s=e.newPanel,n=e.oldPanel;function o(){i.running=!1,i._trigger("activate",t,e)}function a(){i._addClass(e.newTab.closest("li"),"ui-tabs-active","ui-state-active"),s.length&&i.options.show?i._show(s,i.options.show,o):(s.show(),o())}this.running=!0,n.length&&this.options.hide?this._hide(n,this.options.hide,function(){i._removeClass(e.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),a()}):(this._removeClass(e.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),n.hide(),a()),n.attr("aria-hidden","true"),e.oldTab.attr({"aria-selected":"false","aria-expanded":"false"}),s.length&&n.length?e.oldTab.attr("tabIndex",-1):s.length&&this.tabs.filter(function(){return 0===x(this).attr("tabIndex")}).attr("tabIndex",-1),s.attr("aria-hidden","false"),e.newTab.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_activate:function(t){var t=this._findActive(t);t[0]!==this.active[0]&&(t=(t=!t.length?this.active:t).find(".ui-tabs-anchor")[0],this._eventHandler({target:t,currentTarget:t,preventDefault:x.noop}))},_findActive:function(t){return!1===t?x():this.tabs.eq(t)},_getIndex:function(t){return t="string"==typeof t?this.anchors.index(this.anchors.filter("[href$='"+x.escapeSelector(t)+"']")):t},_destroy:function(){this.xhr&&this.xhr.abort(),this.tablist.removeAttr("role").off(this.eventNamespace),this.anchors.removeAttr("role tabIndex").removeUniqueId(),this.tabs.add(this.panels).each(function(){x.data(this,"ui-tabs-destroy")?x(this).remove():x(this).removeAttr("role tabIndex aria-live aria-busy aria-selected aria-labelledby aria-hidden aria-expanded")}),this.tabs.each(function(){var t=x(this),e=t.data("ui-tabs-aria-controls");e?t.attr("aria-controls",e).removeData("ui-tabs-aria-controls"):t.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(i){var t=this.options.disabled;!1!==t&&(t=void 0!==i&&(i=this._getIndex(i),Array.isArray(t)?x.map(t,function(t){return t!==i?t:null}):x.map(this.tabs,function(t,e){return e!==i?e:null})),this._setOptionDisabled(t))},disable:function(t){var e=this.options.disabled;if(!0!==e){if(void 0===t)e=!0;else{if(t=this._getIndex(t),-1!==x.inArray(t,e))return;e=Array.isArray(e)?x.merge([t],e).sort():[t]}this._setOptionDisabled(e)}},load:function(t,s){t=this._getIndex(t);function n(t,e){"abort"===e&&o.panels.stop(!1,!0),o._removeClass(i,"ui-tabs-loading"),a.removeAttr("aria-busy"),t===o.xhr&&delete o.xhr}var o=this,i=this.tabs.eq(t),t=i.find(".ui-tabs-anchor"),a=this._getPanelForTab(i),r={tab:i,panel:a};this._isLocal(t[0])||(this.xhr=x.ajax(this._ajaxSettings(t,s,r)),this.xhr&&"canceled"!==this.xhr.statusText&&(this._addClass(i,"ui-tabs-loading"),a.attr("aria-busy","true"),this.xhr.done(function(t,e,i){setTimeout(function(){a.html(t),o._trigger("load",s,r),n(i,e)},1)}).fail(function(t,e){setTimeout(function(){n(t,e)},1)})))},_ajaxSettings:function(t,i,s){var n=this;return{url:t.attr("href").replace(/#.*$/,""),beforeSend:function(t,e){return n._trigger("beforeLoad",i,x.extend({jqXHR:t,ajaxSettings:e},s))}}},_getPanelForTab:function(t){t=x(t).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+t))}}),!1!==x.uiBackCompat&&x.widget("ui.tabs",x.ui.tabs,{_processTabs:function(){this._superApply(arguments),this._addClass(this.tabs,"ui-tab")}});x.ui.tabs});
(-)a/koha-tmpl/intranet-tmpl/lib/jquery/jquery-ui-rtl-1.13.0.min.css (+7 lines)
Line 0 Link Here
1
/*! jQuery UI - v1.13.1 - 2022-02-02
2
* http://jqueryui.com
3
* Includes: sortable.css, core.css, accordion.css, autocomplete.css, menu.css, tabs.css, theme.css
4
* To view and modify this theme, visit http://jqueryui.com/themeroller/?scope=&folderName=custom-theme&bgImgOpacityError=&bgImgOpacityHighlight=&bgImgOpacityActive=&bgImgOpacityHover=&bgImgOpacityDefault=&bgImgOpacityContent=&bgImgOpacityHeader=&cornerRadiusShadow=8px&offsetLeftShadow=0px&offsetTopShadow=0px&thicknessShadow=5px&opacityShadow=30&bgImgOpacityShadow=0&bgTextureShadow=flat&bgColorShadow=%23666666&opacityOverlay=30&bgImgOpacityOverlay=0&bgTextureOverlay=flat&bgColorOverlay=%23aaaaaa&iconColorError=%23cc0000&fcError=%235f3f3f&borderColorError=%23f1a899&bgTextureError=flat&bgColorError=%23fddfdf&iconColorHighlight=%23777620&fcHighlight=%23777620&borderColorHighlight=%23dad55e&bgTextureHighlight=flat&bgColorHighlight=%23fffa90&iconColorActive=%23aaa&fcActive=%23000&borderColorActive=%23aaa&bgTextureActive=flat&bgColorActive=%23FFF&iconColorHover=%23555555&fcHover=%232b2b2b&borderColorHover=%23b9d8d9&bgTextureHover=flat&bgColorHover=%23e6f0f2&iconColorDefault=%23777777&fcDefault=%23454545&borderColorDefault=%23d6e8e9&bgTextureDefault=flat&bgColorDefault=%23f4f8f9&iconColorContent=%23444444&fcContent=%23333333&borderColorContent=%23dddddd&bgTextureContent=flat&bgColorContent=%23ffffff&iconColorHeader=%23444444&fcHeader=%23333333&borderColorHeader=%23dddddd&bgTextureHeader=flat&bgColorHeader=%23e9e9e9&cornerRadius=3px&fwDefault=normal&fsDefault=&ffDefault=
5
* Copyright jQuery Foundation and other contributors; Licensed MIT */
6
7
.ui-sortable-handle{-ms-touch-action:none;touch-action:none}.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-zfix{width:100%;height:100%;top:0;right:0;position:absolute;opacity:0;-ms-filter:"alpha(opacity=0)"}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important;pointer-events:none}.ui-icon{display:inline-block;vertical-align:middle;margin-top:-.25em;position:relative;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-icon-block{right:50%;margin-right:-8px;display:block}.ui-widget-overlay{position:fixed;top:0;right:0;width:100%;height:100%}.ui-accordion .ui-accordion-header{display:block;cursor:pointer;position:relative;margin:2px 0 0 0;padding:.5em .7em .5em .5em;font-size:100%}.ui-accordion .ui-accordion-content{padding:1em 2.2em;border-top:0;overflow:auto}.ui-autocomplete{position:absolute;top:0;right:0;cursor:default}.ui-menu{list-style:none;padding:0;margin:0;display:block;outline:0}.ui-menu .ui-menu{position:absolute}.ui-menu .ui-menu-item{margin:0;cursor:pointer;list-style-image:url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7")}.ui-menu .ui-menu-item-wrapper{position:relative;padding:3px .4em 3px 1em}.ui-menu .ui-menu-divider{margin:5px 0;height:0;font-size:0;line-height:0;border-width:1px 0 0 0}.ui-menu .ui-state-focus,.ui-menu .ui-state-active{margin:-1px}.ui-menu-icons{position:relative}.ui-menu-icons .ui-menu-item-wrapper{padding-right:2em}.ui-menu .ui-icon{position:absolute;top:0;bottom:0;right:.2em;margin:auto 0}.ui-menu .ui-menu-icon{right:auto;left:0}.ui-tabs{position:relative;padding:.2em}.ui-tabs .ui-tabs-nav{margin:0;padding:.2em .2em 0}.ui-tabs .ui-tabs-nav li{list-style:none;float:right;position:relative;top:0;margin:1px 0 0 .2em;border-bottom-width:0;padding:0;white-space:nowrap}.ui-tabs .ui-tabs-nav .ui-tabs-anchor{float:right;padding:.5em 1em;text-decoration:none}.ui-tabs .ui-tabs-nav li.ui-tabs-active{margin-bottom:-1px;padding-bottom:1px}.ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor,.ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor,.ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor{cursor:text}.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor{cursor:pointer}.ui-tabs .ui-tabs-panel{display:block;border-width:0;padding:1em 1.4em;background:none}.ui-widget{font-family:inherit;font-size:}.ui-widget .ui-widget{font-size:1em}.ui-widget input,.ui-widget select,.ui-widget textarea,.ui-widget button{font-family:inherit;font-size:1em}.ui-widget.ui-widget-content{border:1px solid #d6e8e9}.ui-widget-content{border:1px solid #ddd;background:#fff;color:#333}.ui-widget-content a{color:#333}.ui-widget-header{border:1px solid #ddd;background:#e9e9e9;color:#333;font-weight:bold}.ui-widget-header a{color:#333}.ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default,.ui-button,html .ui-button.ui-state-disabled:hover,html .ui-button.ui-state-disabled:active{border:1px solid #d6e8e9;background:#f4f8f9;font-weight:normal;color:#454545}.ui-state-default a,.ui-state-default a:link,.ui-state-default a:visited,a.ui-button,a:link.ui-button,a:visited.ui-button,.ui-button{color:#454545;text-decoration:none}.ui-state-hover,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-hover,.ui-state-focus,.ui-widget-content .ui-state-focus,.ui-widget-header .ui-state-focus,.ui-button:hover,.ui-button:focus{border:1px solid #b9d8d9;background:#e6f0f2;font-weight:normal;color:#2b2b2b}.ui-state-hover a,.ui-state-hover a:hover,.ui-state-hover a:link,.ui-state-hover a:visited,.ui-state-focus a,.ui-state-focus a:hover,.ui-state-focus a:link,.ui-state-focus a:visited,a.ui-button:hover,a.ui-button:focus{color:#2b2b2b;text-decoration:none}.ui-visual-focus{box-shadow:0 0 3px 1px rgb(94,158,214)}.ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active,a.ui-button:active,.ui-button:active,.ui-button.ui-state-active:hover{border:1px solid #aaa;background:#FFF;font-weight:normal;color:#000}.ui-icon-background,.ui-state-active .ui-icon-background{border:#aaa;background-color:#000}.ui-state-active a,.ui-state-active a:link,.ui-state-active a:visited{color:#000;text-decoration:none}.ui-state-highlight,.ui-widget-content .ui-state-highlight,.ui-widget-header .ui-state-highlight{border:1px solid #dad55e;background:#fffa90;color:#777620}.ui-state-checked{border:1px solid #dad55e;background:#fffa90}.ui-state-highlight a,.ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a{color:#777620}.ui-state-error,.ui-widget-content .ui-state-error,.ui-widget-header .ui-state-error{border:1px solid #f1a899;background:#fddfdf;color:#5f3f3f}.ui-state-error a,.ui-widget-content .ui-state-error a,.ui-widget-header .ui-state-error a{color:#5f3f3f}.ui-state-error-text,.ui-widget-content .ui-state-error-text,.ui-widget-header .ui-state-error-text{color:#5f3f3f}.ui-priority-primary,.ui-widget-content .ui-priority-primary,.ui-widget-header .ui-priority-primary{font-weight:bold}.ui-priority-secondary,.ui-widget-content .ui-priority-secondary,.ui-widget-header .ui-priority-secondary{opacity:.7;-ms-filter:"alpha(opacity=70)";font-weight:normal}.ui-state-disabled,.ui-widget-content .ui-state-disabled,.ui-widget-header .ui-state-disabled{opacity:.35;-ms-filter:"alpha(opacity=35)";background-image:none}.ui-state-disabled .ui-icon{-ms-filter:"alpha(opacity=35)"}.ui-icon{width:16px;height:16px}.ui-icon,.ui-widget-content .ui-icon{background-image:url("images/ui-icons_444444_256x240.png")}.ui-widget-header .ui-icon{background-image:url("images/ui-icons_444444_256x240.png")}.ui-state-hover .ui-icon,.ui-state-focus .ui-icon,.ui-button:hover .ui-icon,.ui-button:focus .ui-icon{background-image:url("images/ui-icons_555555_256x240.png")}.ui-state-active .ui-icon,.ui-button:active .ui-icon{background-image:url("images/ui-icons_aaa_256x240.png")}.ui-state-highlight .ui-icon,.ui-button .ui-state-highlight.ui-icon{background-image:url("images/ui-icons_777620_256x240.png")}.ui-state-error .ui-icon,.ui-state-error-text .ui-icon{background-image:url("images/ui-icons_cc0000_256x240.png")}.ui-button .ui-icon{background-image:url("images/ui-icons_777777_256x240.png")}.ui-icon-blank.ui-icon-blank.ui-icon-blank{background-image:none}.ui-icon-caret-1-n{background-position:100% 0}.ui-icon-caret-1-ne{background-position:-16px 0}.ui-icon-caret-1-e{background-position:-32px 0}.ui-icon-caret-1-se{background-position:-48px 0}.ui-icon-caret-1-s{background-position:-65px 0}.ui-icon-caret-1-sw{background-position:-80px 0}.ui-icon-caret-1-w{background-position:-96px 0}.ui-icon-caret-1-nw{background-position:-112px 0}.ui-icon-caret-2-n-s{background-position:-128px 0}.ui-icon-caret-2-e-w{background-position:-144px 0}.ui-icon-triangle-1-n{background-position:100% -16px}.ui-icon-triangle-1-ne{background-position:-16px -16px}.ui-icon-triangle-1-e{background-position:-32px -16px}.ui-icon-triangle-1-se{background-position:-48px -16px}.ui-icon-triangle-1-s{background-position:-65px -16px}.ui-icon-triangle-1-sw{background-position:-80px -16px}.ui-icon-triangle-1-w{background-position:-96px -16px}.ui-icon-triangle-1-nw{background-position:-112px -16px}.ui-icon-triangle-2-n-s{background-position:-128px -16px}.ui-icon-triangle-2-e-w{background-position:-144px -16px}.ui-icon-arrow-1-n{background-position:100% -32px}.ui-icon-arrow-1-ne{background-position:-16px -32px}.ui-icon-arrow-1-e{background-position:-32px -32px}.ui-icon-arrow-1-se{background-position:-48px -32px}.ui-icon-arrow-1-s{background-position:-65px -32px}.ui-icon-arrow-1-sw{background-position:-80px -32px}.ui-icon-arrow-1-w{background-position:-96px -32px}.ui-icon-arrow-1-nw{background-position:-112px -32px}.ui-icon-arrow-2-n-s{background-position:-128px -32px}.ui-icon-arrow-2-ne-sw{background-position:-144px -32px}.ui-icon-arrow-2-e-w{background-position:-160px -32px}.ui-icon-arrow-2-se-nw{background-position:-176px -32px}.ui-icon-arrowstop-1-n{background-position:-192px -32px}.ui-icon-arrowstop-1-e{background-position:-208px -32px}.ui-icon-arrowstop-1-s{background-position:-224px -32px}.ui-icon-arrowstop-1-w{background-position:-240px -32px}.ui-icon-arrowthick-1-n{background-position:1px -48px}.ui-icon-arrowthick-1-ne{background-position:-16px -48px}.ui-icon-arrowthick-1-e{background-position:-32px -48px}.ui-icon-arrowthick-1-se{background-position:-48px -48px}.ui-icon-arrowthick-1-s{background-position:-64px -48px}.ui-icon-arrowthick-1-sw{background-position:-80px -48px}.ui-icon-arrowthick-1-w{background-position:-96px -48px}.ui-icon-arrowthick-1-nw{background-position:-112px -48px}.ui-icon-arrowthick-2-n-s{background-position:-128px -48px}.ui-icon-arrowthick-2-ne-sw{background-position:-144px -48px}.ui-icon-arrowthick-2-e-w{background-position:-160px -48px}.ui-icon-arrowthick-2-se-nw{background-position:-176px -48px}.ui-icon-arrowthickstop-1-n{background-position:-192px -48px}.ui-icon-arrowthickstop-1-e{background-position:-208px -48px}.ui-icon-arrowthickstop-1-s{background-position:-224px -48px}.ui-icon-arrowthickstop-1-w{background-position:-240px -48px}.ui-icon-arrowreturnthick-1-w{background-position:100% -64px}.ui-icon-arrowreturnthick-1-n{background-position:-16px -64px}.ui-icon-arrowreturnthick-1-e{background-position:-32px -64px}.ui-icon-arrowreturnthick-1-s{background-position:-48px -64px}.ui-icon-arrowreturn-1-w{background-position:-64px -64px}.ui-icon-arrowreturn-1-n{background-position:-80px -64px}.ui-icon-arrowreturn-1-e{background-position:-96px -64px}.ui-icon-arrowreturn-1-s{background-position:-112px -64px}.ui-icon-arrowrefresh-1-w{background-position:-128px -64px}.ui-icon-arrowrefresh-1-n{background-position:-144px -64px}.ui-icon-arrowrefresh-1-e{background-position:-160px -64px}.ui-icon-arrowrefresh-1-s{background-position:-176px -64px}.ui-icon-arrow-4{background-position:100% -80px}.ui-icon-arrow-4-diag{background-position:-16px -80px}.ui-icon-extlink{background-position:-32px -80px}.ui-icon-newwin{background-position:-48px -80px}.ui-icon-refresh{background-position:-64px -80px}.ui-icon-shuffle{background-position:-80px -80px}.ui-icon-transfer-e-w{background-position:-96px -80px}.ui-icon-transferthick-e-w{background-position:-112px -80px}.ui-icon-folder-collapsed{background-position:100% -96px}.ui-icon-folder-open{background-position:-16px -96px}.ui-icon-document{background-position:-32px -96px}.ui-icon-document-b{background-position:-48px -96px}.ui-icon-note{background-position:-64px -96px}.ui-icon-mail-closed{background-position:-80px -96px}.ui-icon-mail-open{background-position:-96px -96px}.ui-icon-suitcase{background-position:-112px -96px}.ui-icon-comment{background-position:-128px -96px}.ui-icon-person{background-position:-144px -96px}.ui-icon-print{background-position:-160px -96px}.ui-icon-trash{background-position:-176px -96px}.ui-icon-locked{background-position:-192px -96px}.ui-icon-unlocked{background-position:-208px -96px}.ui-icon-bookmark{background-position:-224px -96px}.ui-icon-tag{background-position:-240px -96px}.ui-icon-home{background-position:100% -112px}.ui-icon-flag{background-position:-16px -112px}.ui-icon-calendar{background-position:-32px -112px}.ui-icon-cart{background-position:-48px -112px}.ui-icon-pencil{background-position:-64px -112px}.ui-icon-clock{background-position:-80px -112px}.ui-icon-disk{background-position:-96px -112px}.ui-icon-calculator{background-position:-112px -112px}.ui-icon-zoomin{background-position:-128px -112px}.ui-icon-zoomout{background-position:-144px -112px}.ui-icon-search{background-position:-160px -112px}.ui-icon-wrench{background-position:-176px -112px}.ui-icon-gear{background-position:-192px -112px}.ui-icon-heart{background-position:-208px -112px}.ui-icon-star{background-position:-224px -112px}.ui-icon-link{background-position:-240px -112px}.ui-icon-cancel{background-position:100% -128px}.ui-icon-plus{background-position:-16px -128px}.ui-icon-plusthick{background-position:-32px -128px}.ui-icon-minus{background-position:-48px -128px}.ui-icon-minusthick{background-position:-64px -128px}.ui-icon-close{background-position:-80px -128px}.ui-icon-closethick{background-position:-96px -128px}.ui-icon-key{background-position:-112px -128px}.ui-icon-lightbulb{background-position:-128px -128px}.ui-icon-scissors{background-position:-144px -128px}.ui-icon-clipboard{background-position:-160px -128px}.ui-icon-copy{background-position:-176px -128px}.ui-icon-contact{background-position:-192px -128px}.ui-icon-image{background-position:-208px -128px}.ui-icon-video{background-position:-224px -128px}.ui-icon-script{background-position:-240px -128px}.ui-icon-alert{background-position:100% -144px}.ui-icon-info{background-position:-16px -144px}.ui-icon-notice{background-position:-32px -144px}.ui-icon-help{background-position:-48px -144px}.ui-icon-check{background-position:-64px -144px}.ui-icon-bullet{background-position:-80px -144px}.ui-icon-radio-on{background-position:-96px -144px}.ui-icon-radio-off{background-position:-112px -144px}.ui-icon-pin-w{background-position:-128px -144px}.ui-icon-pin-s{background-position:-144px -144px}.ui-icon-play{background-position:100% -160px}.ui-icon-pause{background-position:-16px -160px}.ui-icon-seek-next{background-position:-32px -160px}.ui-icon-seek-prev{background-position:-48px -160px}.ui-icon-seek-end{background-position:-64px -160px}.ui-icon-seek-start{background-position:-80px -160px}.ui-icon-seek-first{background-position:-80px -160px}.ui-icon-stop{background-position:-96px -160px}.ui-icon-eject{background-position:-112px -160px}.ui-icon-volume-off{background-position:-128px -160px}.ui-icon-volume-on{background-position:-144px -160px}.ui-icon-power{background-position:100% -176px}.ui-icon-signal-diag{background-position:-16px -176px}.ui-icon-signal{background-position:-32px -176px}.ui-icon-battery-0{background-position:-48px -176px}.ui-icon-battery-1{background-position:-64px -176px}.ui-icon-battery-2{background-position:-80px -176px}.ui-icon-battery-3{background-position:-96px -176px}.ui-icon-circle-plus{background-position:100% -192px}.ui-icon-circle-minus{background-position:-16px -192px}.ui-icon-circle-close{background-position:-32px -192px}.ui-icon-circle-triangle-e{background-position:-48px -192px}.ui-icon-circle-triangle-s{background-position:-64px -192px}.ui-icon-circle-triangle-w{background-position:-80px -192px}.ui-icon-circle-triangle-n{background-position:-96px -192px}.ui-icon-circle-arrow-e{background-position:-112px -192px}.ui-icon-circle-arrow-s{background-position:-128px -192px}.ui-icon-circle-arrow-w{background-position:-144px -192px}.ui-icon-circle-arrow-n{background-position:-160px -192px}.ui-icon-circle-zoomin{background-position:-176px -192px}.ui-icon-circle-zoomout{background-position:-192px -192px}.ui-icon-circle-check{background-position:-208px -192px}.ui-icon-circlesmall-plus{background-position:100% -208px}.ui-icon-circlesmall-minus{background-position:-16px -208px}.ui-icon-circlesmall-close{background-position:-32px -208px}.ui-icon-squaresmall-plus{background-position:-48px -208px}.ui-icon-squaresmall-minus{background-position:-64px -208px}.ui-icon-squaresmall-close{background-position:-80px -208px}.ui-icon-grip-dotted-vertical{background-position:100% -224px}.ui-icon-grip-dotted-horizontal{background-position:-16px -224px}.ui-icon-grip-solid-vertical{background-position:-32px -224px}.ui-icon-grip-solid-horizontal{background-position:-48px -224px}.ui-icon-gripsmall-diagonal-se{background-position:-64px -224px}.ui-icon-grip-diagonal-se{background-position:-80px -224px}.ui-corner-all,.ui-corner-top,.ui-corner-left,.ui-corner-tl{border-top-right-radius:3px}.ui-corner-all,.ui-corner-top,.ui-corner-right,.ui-corner-tr{border-top-left-radius:3px}.ui-corner-all,.ui-corner-bottom,.ui-corner-left,.ui-corner-bl{border-bottom-right-radius:3px}.ui-corner-all,.ui-corner-bottom,.ui-corner-right,.ui-corner-br{border-bottom-left-radius:3px}.ui-widget-overlay{background:#aaa;opacity:.3;-ms-filter:Alpha(Opacity=30)}.ui-widget-shadow{-webkit-box-shadow:0 0 5px #666;box-shadow:0 0 5px #666}
(-)a/koha-tmpl/intranet-tmpl/lib/jquery/jquery-ui.css (-7 lines)
Lines 1-7 Link Here
1
/*! jQuery UI - v1.10.4 - 2014-03-05
2
* http://jqueryui.com
3
* Includes: jquery.ui.core.css, jquery.ui.accordion.css, jquery.ui.autocomplete.css, jquery.ui.button.css, jquery.ui.datepicker.css, jquery.ui.menu.css, jquery.ui.progressbar.css, jquery.ui.slider.css, jquery.ui.tabs.css, jquery.ui.theme.css
4
* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Verdana%2CArial%2Csans-serif&fwDefault=normal&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=cccccc&bgTextureHeader=highlight_soft&bgImgOpacityHeader=75&borderColorHeader=aaaaaa&fcHeader=222222&iconColorHeader=222222&bgColorContent=ffffff&bgTextureContent=flat&bgImgOpacityContent=75&borderColorContent=aaaaaa&fcContent=222222&iconColorContent=222222&bgColorDefault=e6e6e6&bgTextureDefault=glass&bgImgOpacityDefault=75&borderColorDefault=d3d3d3&fcDefault=555555&iconColorDefault=888888&bgColorHover=dadada&bgTextureHover=glass&bgImgOpacityHover=75&borderColorHover=999999&fcHover=212121&iconColorHover=454545&bgColorActive=ffffff&bgTextureActive=glass&bgImgOpacityActive=65&borderColorActive=aaaaaa&fcActive=212121&iconColorActive=454545&bgColorHighlight=fbf9ee&bgTextureHighlight=glass&bgImgOpacityHighlight=55&borderColorHighlight=fcefa1&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureError=glass&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=flat&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=flat&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px
5
* Copyright 2014 jQuery Foundation and other contributors; Licensed MIT */
6
7
.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-clearfix{min-height:0}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important}.ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-accordion .ui-accordion-header{display:block;cursor:pointer;position:relative;margin-top:2px;padding:.5em .5em .5em .7em;min-height:0}.ui-accordion .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-noicons{padding-left:.7em}.ui-accordion .ui-accordion-icons .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-header .ui-accordion-header-icon{position:absolute;left:.5em;top:50%;margin-top:-8px}.ui-accordion .ui-accordion-content{padding:1em 2.2em;border-top:0;overflow:auto}.ui-autocomplete{position:absolute;top:0;left:0;cursor:default}.ui-button{display:inline-block;position:relative;padding:0;line-height:normal;margin-right:.1em;cursor:pointer;vertical-align:middle;text-align:center;overflow:visible}.ui-button,.ui-button:link,.ui-button:visited,.ui-button:hover,.ui-button:active{text-decoration:none}.ui-button-icon-only{width:2.2em}button.ui-button-icon-only{width:2.4em}.ui-button-icons-only{width:3.4em}button.ui-button-icons-only{width:3.7em}.ui-button .ui-button-text{display:block;line-height:normal}.ui-button-text-only .ui-button-text{padding:.4em 1em}.ui-button-icon-only .ui-button-text,.ui-button-icons-only .ui-button-text{padding:.4em;text-indent:-9999999px}.ui-button-text-icon-primary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 1em .4em 2.1em}.ui-button-text-icon-secondary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 2.1em .4em 1em}.ui-button-text-icons .ui-button-text{padding-left:2.1em;padding-right:2.1em}input.ui-button{padding:.4em 1em}.ui-button-icon-only .ui-icon,.ui-button-text-icon-primary .ui-icon,.ui-button-text-icon-secondary .ui-icon,.ui-button-text-icons .ui-icon,.ui-button-icons-only .ui-icon{position:absolute;top:50%;margin-top:-8px}.ui-button-icon-only .ui-icon{left:50%;margin-left:-8px}.ui-button-text-icon-primary .ui-button-icon-primary,.ui-button-text-icons .ui-button-icon-primary,.ui-button-icons-only .ui-button-icon-primary{left:.5em}.ui-button-text-icon-secondary .ui-button-icon-secondary,.ui-button-text-icons .ui-button-icon-secondary,.ui-button-icons-only .ui-button-icon-secondary{right:.5em}.ui-buttonset{margin-right:7px}.ui-buttonset .ui-button{margin-left:0;margin-right:-.3em}input.ui-button::-moz-focus-inner,button.ui-button::-moz-focus-inner{border:0;padding:0}.ui-datepicker{width:17em;padding:.2em .2em 0;display:none}.ui-datepicker .ui-datepicker-header{position:relative;padding:.2em 0}.ui-datepicker .ui-datepicker-prev,.ui-datepicker .ui-datepicker-next{position:absolute;top:2px;width:1.8em;height:1.8em}.ui-datepicker .ui-datepicker-prev-hover,.ui-datepicker .ui-datepicker-next-hover{top:1px}.ui-datepicker .ui-datepicker-prev{left:2px}.ui-datepicker .ui-datepicker-next{right:2px}.ui-datepicker .ui-datepicker-prev-hover{left:1px}.ui-datepicker .ui-datepicker-next-hover{right:1px}.ui-datepicker .ui-datepicker-prev span,.ui-datepicker .ui-datepicker-next span{display:block;position:absolute;left:50%;margin-left:-8px;top:50%;margin-top:-8px}.ui-datepicker .ui-datepicker-title{margin:0 2.3em;line-height:1.8em;text-align:center}.ui-datepicker .ui-datepicker-title select{font-size:1em;margin:1px 0}.ui-datepicker select.ui-datepicker-month,.ui-datepicker select.ui-datepicker-year{width:49%}.ui-datepicker table{width:100%;font-size:.9em;border-collapse:collapse;margin:0 0 .4em}.ui-datepicker th{padding:.7em .3em;text-align:center;font-weight:bold;border:0}.ui-datepicker td{border:0;padding:1px}.ui-datepicker td span,.ui-datepicker td a{display:block;padding:.2em;text-align:right;text-decoration:none}.ui-datepicker .ui-datepicker-buttonpane{background-image:none;margin:.7em 0 0 0;padding:0 .2em;border-left:0;border-right:0;border-bottom:0}.ui-datepicker .ui-datepicker-buttonpane button{float:right;margin:.5em .2em .4em;cursor:pointer;padding:.2em .6em .3em .6em;width:auto;overflow:visible}.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current{float:left}.ui-datepicker.ui-datepicker-multi{width:auto}.ui-datepicker-multi .ui-datepicker-group{float:left}.ui-datepicker-multi .ui-datepicker-group table{width:95%;margin:0 auto .4em}.ui-datepicker-multi-2 .ui-datepicker-group{width:50%}.ui-datepicker-multi-3 .ui-datepicker-group{width:33.3%}.ui-datepicker-multi-4 .ui-datepicker-group{width:25%}.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header{border-left-width:0}.ui-datepicker-multi .ui-datepicker-buttonpane{clear:left}.ui-datepicker-row-break{clear:both;width:100%;font-size:0}.ui-datepicker-rtl{direction:rtl}.ui-datepicker-rtl .ui-datepicker-prev{right:2px;left:auto}.ui-datepicker-rtl .ui-datepicker-next{left:2px;right:auto}.ui-datepicker-rtl .ui-datepicker-prev:hover{right:1px;left:auto}.ui-datepicker-rtl .ui-datepicker-next:hover{left:1px;right:auto}.ui-datepicker-rtl .ui-datepicker-buttonpane{clear:right}.ui-datepicker-rtl .ui-datepicker-buttonpane button{float:left}.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current,.ui-datepicker-rtl .ui-datepicker-group{float:right}.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header{border-right-width:0;border-left-width:1px}.ui-menu{list-style:none;padding:2px;margin:0;display:block;outline:none}.ui-menu .ui-menu{margin-top:-3px;position:absolute}.ui-menu .ui-menu-item{margin:0;padding:0;width:100%;list-style-image:url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)}.ui-menu .ui-menu-divider{margin:5px -2px 5px -2px;height:0;font-size:0;line-height:0;border-width:1px 0 0 0}.ui-menu .ui-menu-item a{text-decoration:none;display:block;padding:2px .4em;line-height:1.5;min-height:0;font-weight:normal}.ui-menu .ui-menu-item a.ui-state-focus,.ui-menu .ui-menu-item a.ui-state-active{font-weight:normal;margin:-1px}.ui-menu .ui-state-disabled{font-weight:normal;margin:.4em 0 .2em;line-height:1.5}.ui-menu .ui-state-disabled a{cursor:default}.ui-menu-icons{position:relative}.ui-menu-icons .ui-menu-item a{position:relative;padding-left:2em}.ui-menu .ui-icon{position:absolute;top:.2em;left:.2em}.ui-menu .ui-menu-icon{position:static;float:right}.ui-progressbar{height:2em;text-align:left;overflow:hidden}.ui-progressbar .ui-progressbar-value{margin:-1px;height:100%}.ui-progressbar .ui-progressbar-overlay{background:url("images/animated-overlay.gif");height:100%;filter:alpha(opacity=25);opacity:0.25}.ui-progressbar-indeterminate .ui-progressbar-value{background-image:none}.ui-slider{position:relative;text-align:left}.ui-slider .ui-slider-handle{position:absolute;z-index:2;width:1.2em;height:1.2em;cursor:default}.ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;background-position:0 0}.ui-slider.ui-state-disabled .ui-slider-handle,.ui-slider.ui-state-disabled .ui-slider-range{filter:inherit}.ui-slider-horizontal{height:.8em}.ui-slider-horizontal .ui-slider-handle{top:-.3em;margin-left:-.6em}.ui-slider-horizontal .ui-slider-range{top:0;height:100%}.ui-slider-horizontal .ui-slider-range-min{left:0}.ui-slider-horizontal .ui-slider-range-max{right:0}.ui-slider-vertical{width:.8em;height:100px}.ui-slider-vertical .ui-slider-handle{left:-.3em;margin-left:0;margin-bottom:-.6em}.ui-slider-vertical .ui-slider-range{left:0;width:100%}.ui-slider-vertical .ui-slider-range-min{bottom:0}.ui-slider-vertical .ui-slider-range-max{top:0}.ui-tabs{position:relative;padding:.2em}.ui-tabs .ui-tabs-nav{margin:0;padding:.2em .2em 0}.ui-tabs .ui-tabs-nav li{list-style:none;float:left;position:relative;top:0;margin:1px .2em 0 0;border-bottom-width:0;padding:0;white-space:nowrap}.ui-tabs .ui-tabs-nav .ui-tabs-anchor{float:left;padding:.5em 1em;text-decoration:none}.ui-tabs .ui-tabs-nav li.ui-tabs-active{margin-bottom:-1px;padding-bottom:1px}.ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor,.ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor,.ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor{cursor:text}.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor{cursor:pointer}.ui-tabs .ui-tabs-panel{display:block;border-width:0;padding:1em 1.4em;background:none}.ui-widget{font-family:Verdana,Arial,sans-serif;font-size:1.1em}.ui-widget .ui-widget{font-size:1em}.ui-widget input,.ui-widget select,.ui-widget textarea,.ui-widget button{font-family:Verdana,Arial,sans-serif;font-size:1em}.ui-widget-content{border:1px solid #aaa;background:#fff url(images/ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x;color:#222}.ui-widget-content a{color:#222}.ui-widget-header{border:1px solid #aaa;background:#ccc url(images/ui-bg_highlight-soft_75_cccccc_1x100.png) 50% 50% repeat-x;color:#222;font-weight:bold}.ui-widget-header a{color:#222}.ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default{border:1px solid #d3d3d3;background:#e6e6e6 url(images/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x;font-weight:normal;color:#555}.ui-state-default a,.ui-state-default a:link,.ui-state-default a:visited{color:#555;text-decoration:none}.ui-state-hover,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-hover,.ui-state-focus,.ui-widget-content .ui-state-focus,.ui-widget-header .ui-state-focus{border:1px solid #999;background:#dadada url(images/ui-bg_glass_75_dadada_1x400.png) 50% 50% repeat-x;font-weight:normal;color:#212121}.ui-state-hover a,.ui-state-hover a:hover,.ui-state-hover a:link,.ui-state-hover a:visited,.ui-state-focus a,.ui-state-focus a:hover,.ui-state-focus a:link,.ui-state-focus a:visited{color:#212121;text-decoration:none}.ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active{border:1px solid #aaa;background:#fff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x;font-weight:normal;color:#212121}.ui-state-active a,.ui-state-active a:link,.ui-state-active a:visited{color:#212121;text-decoration:none}.ui-state-highlight,.ui-widget-content .ui-state-highlight,.ui-widget-header .ui-state-highlight{border:1px solid #fcefa1;background:#fbf9ee url(images/ui-bg_glass_55_fbf9ee_1x400.png) 50% 50% repeat-x;color:#363636}.ui-state-highlight a,.ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a{color:#363636}.ui-state-error,.ui-widget-content .ui-state-error,.ui-widget-header .ui-state-error{border:1px solid #cd0a0a;background:#fef1ec url(images/ui-bg_glass_95_fef1ec_1x400.png) 50% 50% repeat-x;color:#cd0a0a}.ui-state-error a,.ui-widget-content .ui-state-error a,.ui-widget-header .ui-state-error a{color:#cd0a0a}.ui-state-error-text,.ui-widget-content .ui-state-error-text,.ui-widget-header .ui-state-error-text{color:#cd0a0a}.ui-priority-primary,.ui-widget-content .ui-priority-primary,.ui-widget-header .ui-priority-primary{font-weight:bold}.ui-priority-secondary,.ui-widget-content .ui-priority-secondary,.ui-widget-header .ui-priority-secondary{opacity:.7;filter:Alpha(Opacity=70);font-weight:normal}.ui-state-disabled,.ui-widget-content .ui-state-disabled,.ui-widget-header .ui-state-disabled{opacity:.35;filter:Alpha(Opacity=35);background-image:none}.ui-state-disabled .ui-icon{filter:Alpha(Opacity=35)}.ui-icon{width:16px;height:16px}.ui-icon,.ui-widget-content .ui-icon{background-image:url(images/ui-icons_222222_256x240.png)}.ui-widget-header .ui-icon{background-image:url(images/ui-icons_222222_256x240.png)}.ui-state-default .ui-icon{background-image:url(images/ui-icons_888888_256x240.png)}.ui-state-hover .ui-icon,.ui-state-focus .ui-icon{background-image:url(images/ui-icons_454545_256x240.png)}.ui-state-active .ui-icon{background-image:url(images/ui-icons_454545_256x240.png)}.ui-state-highlight .ui-icon{background-image:url(images/ui-icons_2e83ff_256x240.png)}.ui-state-error .ui-icon,.ui-state-error-text .ui-icon{background-image:url(images/ui-icons_cd0a0a_256x240.png)}.ui-icon-blank{background-position:16px 16px}.ui-icon-carat-1-n{background-position:0 0}.ui-icon-carat-1-ne{background-position:-16px 0}.ui-icon-carat-1-e{background-position:-32px 0}.ui-icon-carat-1-se{background-position:-48px 0}.ui-icon-carat-1-s{background-position:-64px 0}.ui-icon-carat-1-sw{background-position:-80px 0}.ui-icon-carat-1-w{background-position:-96px 0}.ui-icon-carat-1-nw{background-position:-112px 0}.ui-icon-carat-2-n-s{background-position:-128px 0}.ui-icon-carat-2-e-w{background-position:-144px 0}.ui-icon-triangle-1-n{background-position:0 -16px}.ui-icon-triangle-1-ne{background-position:-16px -16px}.ui-icon-triangle-1-e{background-position:-32px -16px}.ui-icon-triangle-1-se{background-position:-48px -16px}.ui-icon-triangle-1-s{background-position:-64px -16px}.ui-icon-triangle-1-sw{background-position:-80px -16px}.ui-icon-triangle-1-w{background-position:-96px -16px}.ui-icon-triangle-1-nw{background-position:-112px -16px}.ui-icon-triangle-2-n-s{background-position:-128px -16px}.ui-icon-triangle-2-e-w{background-position:-144px -16px}.ui-icon-arrow-1-n{background-position:0 -32px}.ui-icon-arrow-1-ne{background-position:-16px -32px}.ui-icon-arrow-1-e{background-position:-32px -32px}.ui-icon-arrow-1-se{background-position:-48px -32px}.ui-icon-arrow-1-s{background-position:-64px -32px}.ui-icon-arrow-1-sw{background-position:-80px -32px}.ui-icon-arrow-1-w{background-position:-96px -32px}.ui-icon-arrow-1-nw{background-position:-112px -32px}.ui-icon-arrow-2-n-s{background-position:-128px -32px}.ui-icon-arrow-2-ne-sw{background-position:-144px -32px}.ui-icon-arrow-2-e-w{background-position:-160px -32px}.ui-icon-arrow-2-se-nw{background-position:-176px -32px}.ui-icon-arrowstop-1-n{background-position:-192px -32px}.ui-icon-arrowstop-1-e{background-position:-208px -32px}.ui-icon-arrowstop-1-s{background-position:-224px -32px}.ui-icon-arrowstop-1-w{background-position:-240px -32px}.ui-icon-arrowthick-1-n{background-position:0 -48px}.ui-icon-arrowthick-1-ne{background-position:-16px -48px}.ui-icon-arrowthick-1-e{background-position:-32px -48px}.ui-icon-arrowthick-1-se{background-position:-48px -48px}.ui-icon-arrowthick-1-s{background-position:-64px -48px}.ui-icon-arrowthick-1-sw{background-position:-80px -48px}.ui-icon-arrowthick-1-w{background-position:-96px -48px}.ui-icon-arrowthick-1-nw{background-position:-112px -48px}.ui-icon-arrowthick-2-n-s{background-position:-128px -48px}.ui-icon-arrowthick-2-ne-sw{background-position:-144px -48px}.ui-icon-arrowthick-2-e-w{background-position:-160px -48px}.ui-icon-arrowthick-2-se-nw{background-position:-176px -48px}.ui-icon-arrowthickstop-1-n{background-position:-192px -48px}.ui-icon-arrowthickstop-1-e{background-position:-208px -48px}.ui-icon-arrowthickstop-1-s{background-position:-224px -48px}.ui-icon-arrowthickstop-1-w{background-position:-240px -48px}.ui-icon-arrowreturnthick-1-w{background-position:0 -64px}.ui-icon-arrowreturnthick-1-n{background-position:-16px -64px}.ui-icon-arrowreturnthick-1-e{background-position:-32px -64px}.ui-icon-arrowreturnthick-1-s{background-position:-48px -64px}.ui-icon-arrowreturn-1-w{background-position:-64px -64px}.ui-icon-arrowreturn-1-n{background-position:-80px -64px}.ui-icon-arrowreturn-1-e{background-position:-96px -64px}.ui-icon-arrowreturn-1-s{background-position:-112px -64px}.ui-icon-arrowrefresh-1-w{background-position:-128px -64px}.ui-icon-arrowrefresh-1-n{background-position:-144px -64px}.ui-icon-arrowrefresh-1-e{background-position:-160px -64px}.ui-icon-arrowrefresh-1-s{background-position:-176px -64px}.ui-icon-arrow-4{background-position:0 -80px}.ui-icon-arrow-4-diag{background-position:-16px -80px}.ui-icon-extlink{background-position:-32px -80px}.ui-icon-newwin{background-position:-48px -80px}.ui-icon-refresh{background-position:-64px -80px}.ui-icon-shuffle{background-position:-80px -80px}.ui-icon-transfer-e-w{background-position:-96px -80px}.ui-icon-transferthick-e-w{background-position:-112px -80px}.ui-icon-folder-collapsed{background-position:0 -96px}.ui-icon-folder-open{background-position:-16px -96px}.ui-icon-document{background-position:-32px -96px}.ui-icon-document-b{background-position:-48px -96px}.ui-icon-note{background-position:-64px -96px}.ui-icon-mail-closed{background-position:-80px -96px}.ui-icon-mail-open{background-position:-96px -96px}.ui-icon-suitcase{background-position:-112px -96px}.ui-icon-comment{background-position:-128px -96px}.ui-icon-person{background-position:-144px -96px}.ui-icon-print{background-position:-160px -96px}.ui-icon-trash{background-position:-176px -96px}.ui-icon-locked{background-position:-192px -96px}.ui-icon-unlocked{background-position:-208px -96px}.ui-icon-bookmark{background-position:-224px -96px}.ui-icon-tag{background-position:-240px -96px}.ui-icon-home{background-position:0 -112px}.ui-icon-flag{background-position:-16px -112px}.ui-icon-calendar{background-position:-32px -112px}.ui-icon-cart{background-position:-48px -112px}.ui-icon-pencil{background-position:-64px -112px}.ui-icon-clock{background-position:-80px -112px}.ui-icon-disk{background-position:-96px -112px}.ui-icon-calculator{background-position:-112px -112px}.ui-icon-zoomin{background-position:-128px -112px}.ui-icon-zoomout{background-position:-144px -112px}.ui-icon-search{background-position:-160px -112px}.ui-icon-wrench{background-position:-176px -112px}.ui-icon-gear{background-position:-192px -112px}.ui-icon-heart{background-position:-208px -112px}.ui-icon-star{background-position:-224px -112px}.ui-icon-link{background-position:-240px -112px}.ui-icon-cancel{background-position:0 -128px}.ui-icon-plus{background-position:-16px -128px}.ui-icon-plusthick{background-position:-32px -128px}.ui-icon-minus{background-position:-48px -128px}.ui-icon-minusthick{background-position:-64px -128px}.ui-icon-close{background-position:-80px -128px}.ui-icon-closethick{background-position:-96px -128px}.ui-icon-key{background-position:-112px -128px}.ui-icon-lightbulb{background-position:-128px -128px}.ui-icon-scissors{background-position:-144px -128px}.ui-icon-clipboard{background-position:-160px -128px}.ui-icon-copy{background-position:-176px -128px}.ui-icon-contact{background-position:-192px -128px}.ui-icon-image{background-position:-208px -128px}.ui-icon-video{background-position:-224px -128px}.ui-icon-script{background-position:-240px -128px}.ui-icon-alert{background-position:0 -144px}.ui-icon-info{background-position:-16px -144px}.ui-icon-notice{background-position:-32px -144px}.ui-icon-help{background-position:-48px -144px}.ui-icon-check{background-position:-64px -144px}.ui-icon-bullet{background-position:-80px -144px}.ui-icon-radio-on{background-position:-96px -144px}.ui-icon-radio-off{background-position:-112px -144px}.ui-icon-pin-w{background-position:-128px -144px}.ui-icon-pin-s{background-position:-144px -144px}.ui-icon-play{background-position:0 -160px}.ui-icon-pause{background-position:-16px -160px}.ui-icon-seek-next{background-position:-32px -160px}.ui-icon-seek-prev{background-position:-48px -160px}.ui-icon-seek-end{background-position:-64px -160px}.ui-icon-seek-start{background-position:-80px -160px}.ui-icon-seek-first{background-position:-80px -160px}.ui-icon-stop{background-position:-96px -160px}.ui-icon-eject{background-position:-112px -160px}.ui-icon-volume-off{background-position:-128px -160px}.ui-icon-volume-on{background-position:-144px -160px}.ui-icon-power{background-position:0 -176px}.ui-icon-signal-diag{background-position:-16px -176px}.ui-icon-signal{background-position:-32px -176px}.ui-icon-battery-0{background-position:-48px -176px}.ui-icon-battery-1{background-position:-64px -176px}.ui-icon-battery-2{background-position:-80px -176px}.ui-icon-battery-3{background-position:-96px -176px}.ui-icon-circle-plus{background-position:0 -192px}.ui-icon-circle-minus{background-position:-16px -192px}.ui-icon-circle-close{background-position:-32px -192px}.ui-icon-circle-triangle-e{background-position:-48px -192px}.ui-icon-circle-triangle-s{background-position:-64px -192px}.ui-icon-circle-triangle-w{background-position:-80px -192px}.ui-icon-circle-triangle-n{background-position:-96px -192px}.ui-icon-circle-arrow-e{background-position:-112px -192px}.ui-icon-circle-arrow-s{background-position:-128px -192px}.ui-icon-circle-arrow-w{background-position:-144px -192px}.ui-icon-circle-arrow-n{background-position:-160px -192px}.ui-icon-circle-zoomin{background-position:-176px -192px}.ui-icon-circle-zoomout{background-position:-192px -192px}.ui-icon-circle-check{background-position:-208px -192px}.ui-icon-circlesmall-plus{background-position:0 -208px}.ui-icon-circlesmall-minus{background-position:-16px -208px}.ui-icon-circlesmall-close{background-position:-32px -208px}.ui-icon-squaresmall-plus{background-position:-48px -208px}.ui-icon-squaresmall-minus{background-position:-64px -208px}.ui-icon-squaresmall-close{background-position:-80px -208px}.ui-icon-grip-dotted-vertical{background-position:0 -224px}.ui-icon-grip-dotted-horizontal{background-position:-16px -224px}.ui-icon-grip-solid-vertical{background-position:-32px -224px}.ui-icon-grip-solid-horizontal{background-position:-48px -224px}.ui-icon-gripsmall-diagonal-se{background-position:-64px -224px}.ui-icon-grip-diagonal-se{background-position:-80px -224px}.ui-corner-all,.ui-corner-top,.ui-corner-left,.ui-corner-tl{border-top-left-radius:4px}.ui-corner-all,.ui-corner-top,.ui-corner-right,.ui-corner-tr{border-top-right-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-left,.ui-corner-bl{border-bottom-left-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-right,.ui-corner-br{border-bottom-right-radius:4px}.ui-widget-overlay{background:#aaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x;opacity:.3;filter:Alpha(Opacity=30)}.ui-widget-shadow{margin:-8px 0 0 -8px;padding:8px;background:#aaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x;opacity:.3;filter:Alpha(Opacity=30);border-radius:8px}
(-)a/koha-tmpl/intranet-tmpl/lib/jquery/jquery-ui.js (-7 lines)
Lines 1-7 Link Here
1
/*! jQuery UI - v1.10.4 - 2014-03-05
2
* http://jqueryui.com
3
* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.position.js, jquery.ui.draggable.js, jquery.ui.droppable.js, jquery.ui.sortable.js, jquery.ui.accordion.js, jquery.ui.autocomplete.js, jquery.ui.button.js, jquery.ui.datepicker.js, jquery.ui.menu.js, jquery.ui.progressbar.js, jquery.ui.slider.js, jquery.ui.tabs.js, jquery.ui.effect.js, jquery.ui.effect-highlight.js
4
* Copyright 2014 jQuery Foundation and other contributors; Licensed MIT */
5
6
(function(e,t){function i(t,i){var s,a,o,r=t.nodeName.toLowerCase();return"area"===r?(s=t.parentNode,a=s.name,t.href&&a&&"map"===s.nodeName.toLowerCase()?(o=e("img[usemap=#"+a+"]")[0],!!o&&n(o)):!1):(/input|select|textarea|button|object/.test(r)?!t.disabled:"a"===r?t.href||i:i)&&n(t)}function n(t){return e.expr.filters.visible(t)&&!e(t).parents().addBack().filter(function(){return"hidden"===e.css(this,"visibility")}).length}var s=0,a=/^ui-id-\d+$/;e.ui=e.ui||{},e.extend(e.ui,{version:"1.10.4",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),e.fn.extend({focus:function(t){return function(i,n){return"number"==typeof i?this.each(function(){var t=this;setTimeout(function(){e(t).focus(),n&&n.call(t)},i)}):t.apply(this,arguments)}}(e.fn.focus),scrollParent:function(){var t;return t=e.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(e.css(this,"position"))&&/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0),/fixed/.test(this.css("position"))||!t.length?e(document):t},zIndex:function(i){if(i!==t)return this.css("zIndex",i);if(this.length)for(var n,s,a=e(this[0]);a.length&&a[0]!==document;){if(n=a.css("position"),("absolute"===n||"relative"===n||"fixed"===n)&&(s=parseInt(a.css("zIndex"),10),!isNaN(s)&&0!==s))return s;a=a.parent()}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++s)})},removeUniqueId:function(){return this.each(function(){a.test(this.id)&&e(this).removeAttr("id")})}}),e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(i){return!!e.data(i,t)}}):function(t,i,n){return!!e.data(t,n[3])},focusable:function(t){return i(t,!isNaN(e.attr(t,"tabindex")))},tabbable:function(t){var n=e.attr(t,"tabindex"),s=isNaN(n);return(s||n>=0)&&i(t,!s)}}),e("<a>").outerWidth(1).jquery||e.each(["Width","Height"],function(i,n){function s(t,i,n,s){return e.each(a,function(){i-=parseFloat(e.css(t,"padding"+this))||0,n&&(i-=parseFloat(e.css(t,"border"+this+"Width"))||0),s&&(i-=parseFloat(e.css(t,"margin"+this))||0)}),i}var a="Width"===n?["Left","Right"]:["Top","Bottom"],o=n.toLowerCase(),r={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn["inner"+n]=function(i){return i===t?r["inner"+n].call(this):this.each(function(){e(this).css(o,s(this,i)+"px")})},e.fn["outer"+n]=function(t,i){return"number"!=typeof t?r["outer"+n].call(this,t):this.each(function(){e(this).css(o,s(this,t,!0,i)+"px")})}}),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(e.fn.removeData=function(t){return function(i){return arguments.length?t.call(this,e.camelCase(i)):t.call(this)}}(e.fn.removeData)),e.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),e.support.selectstart="onselectstart"in document.createElement("div"),e.fn.extend({disableSelection:function(){return this.bind((e.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(e){e.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),e.extend(e.ui,{plugin:{add:function(t,i,n){var s,a=e.ui[t].prototype;for(s in n)a.plugins[s]=a.plugins[s]||[],a.plugins[s].push([i,n[s]])},call:function(e,t,i){var n,s=e.plugins[t];if(s&&e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType)for(n=0;s.length>n;n++)e.options[s[n][0]]&&s[n][1].apply(e.element,i)}},hasScroll:function(t,i){if("hidden"===e(t).css("overflow"))return!1;var n=i&&"left"===i?"scrollLeft":"scrollTop",s=!1;return t[n]>0?!0:(t[n]=1,s=t[n]>0,t[n]=0,s)}})})(jQuery);(function(t,e){var i=0,s=Array.prototype.slice,n=t.cleanData;t.cleanData=function(e){for(var i,s=0;null!=(i=e[s]);s++)try{t(i).triggerHandler("remove")}catch(o){}n(e)},t.widget=function(i,s,n){var o,a,r,h,l={},c=i.split(".")[0];i=i.split(".")[1],o=c+"-"+i,n||(n=s,s=t.Widget),t.expr[":"][o.toLowerCase()]=function(e){return!!t.data(e,o)},t[c]=t[c]||{},a=t[c][i],r=t[c][i]=function(t,i){return this._createWidget?(arguments.length&&this._createWidget(t,i),e):new r(t,i)},t.extend(r,a,{version:n.version,_proto:t.extend({},n),_childConstructors:[]}),h=new s,h.options=t.widget.extend({},h.options),t.each(n,function(i,n){return t.isFunction(n)?(l[i]=function(){var t=function(){return s.prototype[i].apply(this,arguments)},e=function(t){return s.prototype[i].apply(this,t)};return function(){var i,s=this._super,o=this._superApply;return this._super=t,this._superApply=e,i=n.apply(this,arguments),this._super=s,this._superApply=o,i}}(),e):(l[i]=n,e)}),r.prototype=t.widget.extend(h,{widgetEventPrefix:a?h.widgetEventPrefix||i:i},l,{constructor:r,namespace:c,widgetName:i,widgetFullName:o}),a?(t.each(a._childConstructors,function(e,i){var s=i.prototype;t.widget(s.namespace+"."+s.widgetName,r,i._proto)}),delete a._childConstructors):s._childConstructors.push(r),t.widget.bridge(i,r)},t.widget.extend=function(i){for(var n,o,a=s.call(arguments,1),r=0,h=a.length;h>r;r++)for(n in a[r])o=a[r][n],a[r].hasOwnProperty(n)&&o!==e&&(i[n]=t.isPlainObject(o)?t.isPlainObject(i[n])?t.widget.extend({},i[n],o):t.widget.extend({},o):o);return i},t.widget.bridge=function(i,n){var o=n.prototype.widgetFullName||i;t.fn[i]=function(a){var r="string"==typeof a,h=s.call(arguments,1),l=this;return a=!r&&h.length?t.widget.extend.apply(null,[a].concat(h)):a,r?this.each(function(){var s,n=t.data(this,o);return n?t.isFunction(n[a])&&"_"!==a.charAt(0)?(s=n[a].apply(n,h),s!==n&&s!==e?(l=s&&s.jquery?l.pushStack(s.get()):s,!1):e):t.error("no such method '"+a+"' for "+i+" widget instance"):t.error("cannot call methods on "+i+" prior to initialization; "+"attempted to call method '"+a+"'")}):this.each(function(){var e=t.data(this,o);e?e.option(a||{})._init():t.data(this,o,new n(a,this))}),l}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(e,s){s=t(s||this.defaultElement||this)[0],this.element=t(s),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this.bindings=t(),this.hoverable=t(),this.focusable=t(),s!==this&&(t.data(s,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===s&&this.destroy()}}),this.document=t(s.style?s.ownerDocument:s.document||s),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:t.noop,_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(t.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled "+"ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:t.noop,widget:function(){return this.element},option:function(i,s){var n,o,a,r=i;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof i)if(r={},n=i.split("."),i=n.shift(),n.length){for(o=r[i]=t.widget.extend({},this.options[i]),a=0;n.length-1>a;a++)o[n[a]]=o[n[a]]||{},o=o[n[a]];if(i=n.pop(),1===arguments.length)return o[i]===e?null:o[i];o[i]=s}else{if(1===arguments.length)return this.options[i]===e?null:this.options[i];r[i]=s}return this._setOptions(r),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return this.options[t]=e,"disabled"===t&&(this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!e).attr("aria-disabled",e),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_on:function(i,s,n){var o,a=this;"boolean"!=typeof i&&(n=s,s=i,i=!1),n?(s=o=t(s),this.bindings=this.bindings.add(s)):(n=s,s=this.element,o=this.widget()),t.each(n,function(n,r){function h(){return i||a.options.disabled!==!0&&!t(this).hasClass("ui-state-disabled")?("string"==typeof r?a[r]:r).apply(a,arguments):e}"string"!=typeof r&&(h.guid=r.guid=r.guid||h.guid||t.guid++);var l=n.match(/^(\w+)\s*(.*)$/),c=l[1]+a.eventNamespace,u=l[2];u?o.delegate(u,c,h):s.bind(c,h)})},_off:function(t,e){e=(e||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.unbind(e).undelegate(e)},_delay:function(t,e){function i(){return("string"==typeof t?s[t]:t).apply(s,arguments)}var s=this;return setTimeout(i,e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){t(e.currentTarget).addClass("ui-state-hover")},mouseleave:function(e){t(e.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){t(e.currentTarget).addClass("ui-state-focus")},focusout:function(e){t(e.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(e,i,s){var n,o,a=this.options[e];if(s=s||{},i=t.Event(i),i.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],o=i.originalEvent)for(n in o)n in i||(i[n]=o[n]);return this.element.trigger(i,s),!(t.isFunction(a)&&a.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,i){t.Widget.prototype["_"+e]=function(s,n,o){"string"==typeof n&&(n={effect:n});var a,r=n?n===!0||"number"==typeof n?i:n.effect||i:e;n=n||{},"number"==typeof n&&(n={duration:n}),a=!t.isEmptyObject(n),n.complete=o,n.delay&&s.delay(n.delay),a&&t.effects&&t.effects.effect[r]?s[e](n):r!==e&&s[r]?s[r](n.duration,n.easing,o):s.queue(function(i){t(this)[e](),o&&o.call(s[0]),i()})}})})(jQuery);(function(t){var e=!1;t(document).mouseup(function(){e=!1}),t.widget("ui.mouse",{version:"1.10.4",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.bind("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).bind("click."+this.widgetName,function(i){return!0===t.data(i.target,e.widgetName+".preventClickEvent")?(t.removeData(i.target,e.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):undefined}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&t(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(i){if(!e){this._mouseStarted&&this._mouseUp(i),this._mouseDownEvent=i;var s=this,n=1===i.which,a="string"==typeof this.options.cancel&&i.target.nodeName?t(i.target).closest(this.options.cancel).length:!1;return n&&!a&&this._mouseCapture(i)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){s.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(i)&&this._mouseDelayMet(i)&&(this._mouseStarted=this._mouseStart(i)!==!1,!this._mouseStarted)?(i.preventDefault(),!0):(!0===t.data(i.target,this.widgetName+".preventClickEvent")&&t.removeData(i.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return s._mouseMove(t)},this._mouseUpDelegate=function(t){return s._mouseUp(t)},t(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),i.preventDefault(),e=!0,!0)):!0}},_mouseMove:function(e){return t.ui.ie&&(!document.documentMode||9>document.documentMode)&&!e.button?this._mouseUp(e):this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,e)!==!1,this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){return t(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&t.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),!1},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})})(jQuery);(function(t,e){function i(t,e,i){return[parseFloat(t[0])*(p.test(t[0])?e/100:1),parseFloat(t[1])*(p.test(t[1])?i/100:1)]}function s(e,i){return parseInt(t.css(e,i),10)||0}function n(e){var i=e[0];return 9===i.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(i)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}t.ui=t.ui||{};var a,o=Math.max,r=Math.abs,l=Math.round,h=/left|center|right/,c=/top|center|bottom/,u=/[\+\-]\d+(\.[\d]+)?%?/,d=/^\w+/,p=/%$/,f=t.fn.position;t.position={scrollbarWidth:function(){if(a!==e)return a;var i,s,n=t("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),o=n.children()[0];return t("body").append(n),i=o.offsetWidth,n.css("overflow","scroll"),s=o.offsetWidth,i===s&&(s=n[0].clientWidth),n.remove(),a=i-s},getScrollInfo:function(e){var i=e.isWindow||e.isDocument?"":e.element.css("overflow-x"),s=e.isWindow||e.isDocument?"":e.element.css("overflow-y"),n="scroll"===i||"auto"===i&&e.width<e.element[0].scrollWidth,a="scroll"===s||"auto"===s&&e.height<e.element[0].scrollHeight;return{width:a?t.position.scrollbarWidth():0,height:n?t.position.scrollbarWidth():0}},getWithinInfo:function(e){var i=t(e||window),s=t.isWindow(i[0]),n=!!i[0]&&9===i[0].nodeType;return{element:i,isWindow:s,isDocument:n,offset:i.offset()||{left:0,top:0},scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:s?i.width():i.outerWidth(),height:s?i.height():i.outerHeight()}}},t.fn.position=function(e){if(!e||!e.of)return f.apply(this,arguments);e=t.extend({},e);var a,p,g,m,v,_,b=t(e.of),y=t.position.getWithinInfo(e.within),k=t.position.getScrollInfo(y),w=(e.collision||"flip").split(" "),D={};return _=n(b),b[0].preventDefault&&(e.at="left top"),p=_.width,g=_.height,m=_.offset,v=t.extend({},m),t.each(["my","at"],function(){var t,i,s=(e[this]||"").split(" ");1===s.length&&(s=h.test(s[0])?s.concat(["center"]):c.test(s[0])?["center"].concat(s):["center","center"]),s[0]=h.test(s[0])?s[0]:"center",s[1]=c.test(s[1])?s[1]:"center",t=u.exec(s[0]),i=u.exec(s[1]),D[this]=[t?t[0]:0,i?i[0]:0],e[this]=[d.exec(s[0])[0],d.exec(s[1])[0]]}),1===w.length&&(w[1]=w[0]),"right"===e.at[0]?v.left+=p:"center"===e.at[0]&&(v.left+=p/2),"bottom"===e.at[1]?v.top+=g:"center"===e.at[1]&&(v.top+=g/2),a=i(D.at,p,g),v.left+=a[0],v.top+=a[1],this.each(function(){var n,h,c=t(this),u=c.outerWidth(),d=c.outerHeight(),f=s(this,"marginLeft"),_=s(this,"marginTop"),x=u+f+s(this,"marginRight")+k.width,C=d+_+s(this,"marginBottom")+k.height,M=t.extend({},v),T=i(D.my,c.outerWidth(),c.outerHeight());"right"===e.my[0]?M.left-=u:"center"===e.my[0]&&(M.left-=u/2),"bottom"===e.my[1]?M.top-=d:"center"===e.my[1]&&(M.top-=d/2),M.left+=T[0],M.top+=T[1],t.support.offsetFractions||(M.left=l(M.left),M.top=l(M.top)),n={marginLeft:f,marginTop:_},t.each(["left","top"],function(i,s){t.ui.position[w[i]]&&t.ui.position[w[i]][s](M,{targetWidth:p,targetHeight:g,elemWidth:u,elemHeight:d,collisionPosition:n,collisionWidth:x,collisionHeight:C,offset:[a[0]+T[0],a[1]+T[1]],my:e.my,at:e.at,within:y,elem:c})}),e.using&&(h=function(t){var i=m.left-M.left,s=i+p-u,n=m.top-M.top,a=n+g-d,l={target:{element:b,left:m.left,top:m.top,width:p,height:g},element:{element:c,left:M.left,top:M.top,width:u,height:d},horizontal:0>s?"left":i>0?"right":"center",vertical:0>a?"top":n>0?"bottom":"middle"};u>p&&p>r(i+s)&&(l.horizontal="center"),d>g&&g>r(n+a)&&(l.vertical="middle"),l.important=o(r(i),r(s))>o(r(n),r(a))?"horizontal":"vertical",e.using.call(this,t,l)}),c.offset(t.extend(M,{using:h}))})},t.ui.position={fit:{left:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollLeft:s.offset.left,a=s.width,r=t.left-e.collisionPosition.marginLeft,l=n-r,h=r+e.collisionWidth-a-n;e.collisionWidth>a?l>0&&0>=h?(i=t.left+l+e.collisionWidth-a-n,t.left+=l-i):t.left=h>0&&0>=l?n:l>h?n+a-e.collisionWidth:n:l>0?t.left+=l:h>0?t.left-=h:t.left=o(t.left-r,t.left)},top:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollTop:s.offset.top,a=e.within.height,r=t.top-e.collisionPosition.marginTop,l=n-r,h=r+e.collisionHeight-a-n;e.collisionHeight>a?l>0&&0>=h?(i=t.top+l+e.collisionHeight-a-n,t.top+=l-i):t.top=h>0&&0>=l?n:l>h?n+a-e.collisionHeight:n:l>0?t.top+=l:h>0?t.top-=h:t.top=o(t.top-r,t.top)}},flip:{left:function(t,e){var i,s,n=e.within,a=n.offset.left+n.scrollLeft,o=n.width,l=n.isWindow?n.scrollLeft:n.offset.left,h=t.left-e.collisionPosition.marginLeft,c=h-l,u=h+e.collisionWidth-o-l,d="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,p="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,f=-2*e.offset[0];0>c?(i=t.left+d+p+f+e.collisionWidth-o-a,(0>i||r(c)>i)&&(t.left+=d+p+f)):u>0&&(s=t.left-e.collisionPosition.marginLeft+d+p+f-l,(s>0||u>r(s))&&(t.left+=d+p+f))},top:function(t,e){var i,s,n=e.within,a=n.offset.top+n.scrollTop,o=n.height,l=n.isWindow?n.scrollTop:n.offset.top,h=t.top-e.collisionPosition.marginTop,c=h-l,u=h+e.collisionHeight-o-l,d="top"===e.my[1],p=d?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,f="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,g=-2*e.offset[1];0>c?(s=t.top+p+f+g+e.collisionHeight-o-a,t.top+p+f+g>c&&(0>s||r(c)>s)&&(t.top+=p+f+g)):u>0&&(i=t.top-e.collisionPosition.marginTop+p+f+g-l,t.top+p+f+g>u&&(i>0||u>r(i))&&(t.top+=p+f+g))}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}},function(){var e,i,s,n,a,o=document.getElementsByTagName("body")[0],r=document.createElement("div");e=document.createElement(o?"div":"body"),s={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},o&&t.extend(s,{position:"absolute",left:"-1000px",top:"-1000px"});for(a in s)e.style[a]=s[a];e.appendChild(r),i=o||document.documentElement,i.insertBefore(e,i.firstChild),r.style.cssText="position: absolute; left: 10.7432222px;",n=t(r).offset().left,t.support.offsetFractions=n>10&&11>n,e.innerHTML="",i.removeChild(e)}()})(jQuery);(function(t){t.widget("ui.draggable",t.ui.mouse,{version:"1.10.4",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"!==this.options.helper||/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative"),this.options.addClasses&&this.element.addClass("ui-draggable"),this.options.disabled&&this.element.addClass("ui-draggable-disabled"),this._mouseInit()},_destroy:function(){this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._mouseDestroy()},_mouseCapture:function(e){var i=this.options;return this.helper||i.disabled||t(e.target).closest(".ui-resizable-handle").length>0?!1:(this.handle=this._getHandle(e),this.handle?(t(i.iframeFix===!0?"iframe":i.iframeFix).each(function(){t("<div class='ui-draggable-iframeFix' style='background: #fff;'></div>").css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1e3}).css(t(this).offset()).appendTo("body")}),!0):!1)},_mouseStart:function(e){var i=this.options;return this.helper=this._createHelper(e),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),t.ui.ddmanager&&(t.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(),this.offsetParent=this.helper.offsetParent(),this.offsetParentCssPosition=this.offsetParent.css("position"),this.offset=this.positionAbs=this.element.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},this.offset.scroll=!1,t.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.originalPosition=this.position=this._generatePosition(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),this._setContainment(),this._trigger("start",e)===!1?(this._clear(),!1):(this._cacheHelperProportions(),t.ui.ddmanager&&!i.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this._mouseDrag(e,!0),t.ui.ddmanager&&t.ui.ddmanager.dragStart(this,e),!0)},_mouseDrag:function(e,i){if("fixed"===this.offsetParentCssPosition&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),!i){var s=this._uiHash();if(this._trigger("drag",e,s)===!1)return this._mouseUp({}),!1;this.position=s.position}return this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),!1},_mouseStop:function(e){var i=this,s=!1;return t.ui.ddmanager&&!this.options.dropBehaviour&&(s=t.ui.ddmanager.drop(this,e)),this.dropped&&(s=this.dropped,this.dropped=!1),"original"!==this.options.helper||t.contains(this.element[0].ownerDocument,this.element[0])?("invalid"===this.options.revert&&!s||"valid"===this.options.revert&&s||this.options.revert===!0||t.isFunction(this.options.revert)&&this.options.revert.call(this.element,s)?t(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){i._trigger("stop",e)!==!1&&i._clear()}):this._trigger("stop",e)!==!1&&this._clear(),!1):!1},_mouseUp:function(e){return t("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)}),t.ui.ddmanager&&t.ui.ddmanager.dragStop(this,e),t.ui.mouse.prototype._mouseUp.call(this,e)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(e){return this.options.handle?!!t(e.target).closest(this.element.find(this.options.handle)).length:!0},_createHelper:function(e){var i=this.options,s=t.isFunction(i.helper)?t(i.helper.apply(this.element[0],[e])):"clone"===i.helper?this.element.clone().removeAttr("id"):this.element;return s.parents("body").length||s.appendTo("parent"===i.appendTo?this.element[0].parentNode:i.appendTo),s[0]===this.element[0]||/(fixed|absolute)/.test(s.css("position"))||s.css("position","absolute"),s},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){var e=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&t.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var t=this.element.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,i,s,n=this.options;return n.containment?"window"===n.containment?(this.containment=[t(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,t(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,t(window).scrollLeft()+t(window).width()-this.helperProportions.width-this.margins.left,t(window).scrollTop()+(t(window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],undefined):"document"===n.containment?(this.containment=[0,0,t(document).width()-this.helperProportions.width-this.margins.left,(t(document).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],undefined):n.containment.constructor===Array?(this.containment=n.containment,undefined):("parent"===n.containment&&(n.containment=this.helper[0].parentNode),i=t(n.containment),s=i[0],s&&(e="hidden"!==i.css("overflow"),this.containment=[(parseInt(i.css("borderLeftWidth"),10)||0)+(parseInt(i.css("paddingLeft"),10)||0),(parseInt(i.css("borderTopWidth"),10)||0)+(parseInt(i.css("paddingTop"),10)||0),(e?Math.max(s.scrollWidth,s.offsetWidth):s.offsetWidth)-(parseInt(i.css("borderRightWidth"),10)||0)-(parseInt(i.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(e?Math.max(s.scrollHeight,s.offsetHeight):s.offsetHeight)-(parseInt(i.css("borderBottomWidth"),10)||0)-(parseInt(i.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relative_container=i),undefined):(this.containment=null,undefined)},_convertPositionTo:function(e,i){i||(i=this.position);var s="absolute"===e?1:-1,n="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent;return this.offset.scroll||(this.offset.scroll={top:n.scrollTop(),left:n.scrollLeft()}),{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():this.offset.scroll.top)*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():this.offset.scroll.left)*s}},_generatePosition:function(e){var i,s,n,a,o=this.options,r="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,l=e.pageX,h=e.pageY;return this.offset.scroll||(this.offset.scroll={top:r.scrollTop(),left:r.scrollLeft()}),this.originalPosition&&(this.containment&&(this.relative_container?(s=this.relative_container.offset(),i=[this.containment[0]+s.left,this.containment[1]+s.top,this.containment[2]+s.left,this.containment[3]+s.top]):i=this.containment,e.pageX-this.offset.click.left<i[0]&&(l=i[0]+this.offset.click.left),e.pageY-this.offset.click.top<i[1]&&(h=i[1]+this.offset.click.top),e.pageX-this.offset.click.left>i[2]&&(l=i[2]+this.offset.click.left),e.pageY-this.offset.click.top>i[3]&&(h=i[3]+this.offset.click.top)),o.grid&&(n=o.grid[1]?this.originalPageY+Math.round((h-this.originalPageY)/o.grid[1])*o.grid[1]:this.originalPageY,h=i?n-this.offset.click.top>=i[1]||n-this.offset.click.top>i[3]?n:n-this.offset.click.top>=i[1]?n-o.grid[1]:n+o.grid[1]:n,a=o.grid[0]?this.originalPageX+Math.round((l-this.originalPageX)/o.grid[0])*o.grid[0]:this.originalPageX,l=i?a-this.offset.click.left>=i[0]||a-this.offset.click.left>i[2]?a:a-this.offset.click.left>=i[0]?a-o.grid[0]:a+o.grid[0]:a)),{top:h-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():this.offset.scroll.top),left:l-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():this.offset.scroll.left)}},_clear:function(){this.helper.removeClass("ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1},_trigger:function(e,i,s){return s=s||this._uiHash(),t.ui.plugin.call(this,e,[i,s]),"drag"===e&&(this.positionAbs=this._convertPositionTo("absolute")),t.Widget.prototype._trigger.call(this,e,i,s)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),t.ui.plugin.add("draggable","connectToSortable",{start:function(e,i){var s=t(this).data("ui-draggable"),n=s.options,a=t.extend({},i,{item:s.element});s.sortables=[],t(n.connectToSortable).each(function(){var i=t.data(this,"ui-sortable");i&&!i.options.disabled&&(s.sortables.push({instance:i,shouldRevert:i.options.revert}),i.refreshPositions(),i._trigger("activate",e,a))})},stop:function(e,i){var s=t(this).data("ui-draggable"),n=t.extend({},i,{item:s.element});t.each(s.sortables,function(){this.instance.isOver?(this.instance.isOver=0,s.cancelHelperRemoval=!0,this.instance.cancelHelperRemoval=!1,this.shouldRevert&&(this.instance.options.revert=this.shouldRevert),this.instance._mouseStop(e),this.instance.options.helper=this.instance.options._helper,"original"===s.options.helper&&this.instance.currentItem.css({top:"auto",left:"auto"})):(this.instance.cancelHelperRemoval=!1,this.instance._trigger("deactivate",e,n))})},drag:function(e,i){var s=t(this).data("ui-draggable"),n=this;t.each(s.sortables,function(){var a=!1,o=this;this.instance.positionAbs=s.positionAbs,this.instance.helperProportions=s.helperProportions,this.instance.offset.click=s.offset.click,this.instance._intersectsWith(this.instance.containerCache)&&(a=!0,t.each(s.sortables,function(){return this.instance.positionAbs=s.positionAbs,this.instance.helperProportions=s.helperProportions,this.instance.offset.click=s.offset.click,this!==o&&this.instance._intersectsWith(this.instance.containerCache)&&t.contains(o.instance.element[0],this.instance.element[0])&&(a=!1),a})),a?(this.instance.isOver||(this.instance.isOver=1,this.instance.currentItem=t(n).clone().removeAttr("id").appendTo(this.instance.element).data("ui-sortable-item",!0),this.instance.options._helper=this.instance.options.helper,this.instance.options.helper=function(){return i.helper[0]},e.target=this.instance.currentItem[0],this.instance._mouseCapture(e,!0),this.instance._mouseStart(e,!0,!0),this.instance.offset.click.top=s.offset.click.top,this.instance.offset.click.left=s.offset.click.left,this.instance.offset.parent.left-=s.offset.parent.left-this.instance.offset.parent.left,this.instance.offset.parent.top-=s.offset.parent.top-this.instance.offset.parent.top,s._trigger("toSortable",e),s.dropped=this.instance.element,s.currentItem=s.element,this.instance.fromOutside=s),this.instance.currentItem&&this.instance._mouseDrag(e)):this.instance.isOver&&(this.instance.isOver=0,this.instance.cancelHelperRemoval=!0,this.instance.options.revert=!1,this.instance._trigger("out",e,this.instance._uiHash(this.instance)),this.instance._mouseStop(e,!0),this.instance.options.helper=this.instance.options._helper,this.instance.currentItem.remove(),this.instance.placeholder&&this.instance.placeholder.remove(),s._trigger("fromSortable",e),s.dropped=!1)})}}),t.ui.plugin.add("draggable","cursor",{start:function(){var e=t("body"),i=t(this).data("ui-draggable").options;e.css("cursor")&&(i._cursor=e.css("cursor")),e.css("cursor",i.cursor)},stop:function(){var e=t(this).data("ui-draggable").options;e._cursor&&t("body").css("cursor",e._cursor)}}),t.ui.plugin.add("draggable","opacity",{start:function(e,i){var s=t(i.helper),n=t(this).data("ui-draggable").options;s.css("opacity")&&(n._opacity=s.css("opacity")),s.css("opacity",n.opacity)},stop:function(e,i){var s=t(this).data("ui-draggable").options;s._opacity&&t(i.helper).css("opacity",s._opacity)}}),t.ui.plugin.add("draggable","scroll",{start:function(){var e=t(this).data("ui-draggable");e.scrollParent[0]!==document&&"HTML"!==e.scrollParent[0].tagName&&(e.overflowOffset=e.scrollParent.offset())},drag:function(e){var i=t(this).data("ui-draggable"),s=i.options,n=!1;i.scrollParent[0]!==document&&"HTML"!==i.scrollParent[0].tagName?(s.axis&&"x"===s.axis||(i.overflowOffset.top+i.scrollParent[0].offsetHeight-e.pageY<s.scrollSensitivity?i.scrollParent[0].scrollTop=n=i.scrollParent[0].scrollTop+s.scrollSpeed:e.pageY-i.overflowOffset.top<s.scrollSensitivity&&(i.scrollParent[0].scrollTop=n=i.scrollParent[0].scrollTop-s.scrollSpeed)),s.axis&&"y"===s.axis||(i.overflowOffset.left+i.scrollParent[0].offsetWidth-e.pageX<s.scrollSensitivity?i.scrollParent[0].scrollLeft=n=i.scrollParent[0].scrollLeft+s.scrollSpeed:e.pageX-i.overflowOffset.left<s.scrollSensitivity&&(i.scrollParent[0].scrollLeft=n=i.scrollParent[0].scrollLeft-s.scrollSpeed))):(s.axis&&"x"===s.axis||(e.pageY-t(document).scrollTop()<s.scrollSensitivity?n=t(document).scrollTop(t(document).scrollTop()-s.scrollSpeed):t(window).height()-(e.pageY-t(document).scrollTop())<s.scrollSensitivity&&(n=t(document).scrollTop(t(document).scrollTop()+s.scrollSpeed))),s.axis&&"y"===s.axis||(e.pageX-t(document).scrollLeft()<s.scrollSensitivity?n=t(document).scrollLeft(t(document).scrollLeft()-s.scrollSpeed):t(window).width()-(e.pageX-t(document).scrollLeft())<s.scrollSensitivity&&(n=t(document).scrollLeft(t(document).scrollLeft()+s.scrollSpeed)))),n!==!1&&t.ui.ddmanager&&!s.dropBehaviour&&t.ui.ddmanager.prepareOffsets(i,e)}}),t.ui.plugin.add("draggable","snap",{start:function(){var e=t(this).data("ui-draggable"),i=e.options;e.snapElements=[],t(i.snap.constructor!==String?i.snap.items||":data(ui-draggable)":i.snap).each(function(){var i=t(this),s=i.offset();this!==e.element[0]&&e.snapElements.push({item:this,width:i.outerWidth(),height:i.outerHeight(),top:s.top,left:s.left})})},drag:function(e,i){var s,n,a,o,r,l,h,c,u,d,p=t(this).data("ui-draggable"),g=p.options,f=g.snapTolerance,m=i.offset.left,_=m+p.helperProportions.width,v=i.offset.top,b=v+p.helperProportions.height;for(u=p.snapElements.length-1;u>=0;u--)r=p.snapElements[u].left,l=r+p.snapElements[u].width,h=p.snapElements[u].top,c=h+p.snapElements[u].height,r-f>_||m>l+f||h-f>b||v>c+f||!t.contains(p.snapElements[u].item.ownerDocument,p.snapElements[u].item)?(p.snapElements[u].snapping&&p.options.snap.release&&p.options.snap.release.call(p.element,e,t.extend(p._uiHash(),{snapItem:p.snapElements[u].item})),p.snapElements[u].snapping=!1):("inner"!==g.snapMode&&(s=f>=Math.abs(h-b),n=f>=Math.abs(c-v),a=f>=Math.abs(r-_),o=f>=Math.abs(l-m),s&&(i.position.top=p._convertPositionTo("relative",{top:h-p.helperProportions.height,left:0}).top-p.margins.top),n&&(i.position.top=p._convertPositionTo("relative",{top:c,left:0}).top-p.margins.top),a&&(i.position.left=p._convertPositionTo("relative",{top:0,left:r-p.helperProportions.width}).left-p.margins.left),o&&(i.position.left=p._convertPositionTo("relative",{top:0,left:l}).left-p.margins.left)),d=s||n||a||o,"outer"!==g.snapMode&&(s=f>=Math.abs(h-v),n=f>=Math.abs(c-b),a=f>=Math.abs(r-m),o=f>=Math.abs(l-_),s&&(i.position.top=p._convertPositionTo("relative",{top:h,left:0}).top-p.margins.top),n&&(i.position.top=p._convertPositionTo("relative",{top:c-p.helperProportions.height,left:0}).top-p.margins.top),a&&(i.position.left=p._convertPositionTo("relative",{top:0,left:r}).left-p.margins.left),o&&(i.position.left=p._convertPositionTo("relative",{top:0,left:l-p.helperProportions.width}).left-p.margins.left)),!p.snapElements[u].snapping&&(s||n||a||o||d)&&p.options.snap.snap&&p.options.snap.snap.call(p.element,e,t.extend(p._uiHash(),{snapItem:p.snapElements[u].item})),p.snapElements[u].snapping=s||n||a||o||d)}}),t.ui.plugin.add("draggable","stack",{start:function(){var e,i=this.data("ui-draggable").options,s=t.makeArray(t(i.stack)).sort(function(e,i){return(parseInt(t(e).css("zIndex"),10)||0)-(parseInt(t(i).css("zIndex"),10)||0)});s.length&&(e=parseInt(t(s[0]).css("zIndex"),10)||0,t(s).each(function(i){t(this).css("zIndex",e+i)}),this.css("zIndex",e+s.length))}}),t.ui.plugin.add("draggable","zIndex",{start:function(e,i){var s=t(i.helper),n=t(this).data("ui-draggable").options;s.css("zIndex")&&(n._zIndex=s.css("zIndex")),s.css("zIndex",n.zIndex)},stop:function(e,i){var s=t(this).data("ui-draggable").options;s._zIndex&&t(i.helper).css("zIndex",s._zIndex)}})})(jQuery);(function(t){function e(t,e,i){return t>e&&e+i>t}t.widget("ui.droppable",{version:"1.10.4",widgetEventPrefix:"drop",options:{accept:"*",activeClass:!1,addClasses:!0,greedy:!1,hoverClass:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var e,i=this.options,s=i.accept;this.isover=!1,this.isout=!0,this.accept=t.isFunction(s)?s:function(t){return t.is(s)},this.proportions=function(){return arguments.length?(e=arguments[0],undefined):e?e:e={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight}},t.ui.ddmanager.droppables[i.scope]=t.ui.ddmanager.droppables[i.scope]||[],t.ui.ddmanager.droppables[i.scope].push(this),i.addClasses&&this.element.addClass("ui-droppable")},_destroy:function(){for(var e=0,i=t.ui.ddmanager.droppables[this.options.scope];i.length>e;e++)i[e]===this&&i.splice(e,1);this.element.removeClass("ui-droppable ui-droppable-disabled")},_setOption:function(e,i){"accept"===e&&(this.accept=t.isFunction(i)?i:function(t){return t.is(i)}),t.Widget.prototype._setOption.apply(this,arguments)},_activate:function(e){var i=t.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass),i&&this._trigger("activate",e,this.ui(i))},_deactivate:function(e){var i=t.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass),i&&this._trigger("deactivate",e,this.ui(i))},_over:function(e){var i=t.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.addClass(this.options.hoverClass),this._trigger("over",e,this.ui(i)))},_out:function(e){var i=t.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("out",e,this.ui(i)))},_drop:function(e,i){var s=i||t.ui.ddmanager.current,n=!1;return s&&(s.currentItem||s.element)[0]!==this.element[0]?(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var e=t.data(this,"ui-droppable");return e.options.greedy&&!e.options.disabled&&e.options.scope===s.options.scope&&e.accept.call(e.element[0],s.currentItem||s.element)&&t.ui.intersect(s,t.extend(e,{offset:e.element.offset()}),e.options.tolerance)?(n=!0,!1):undefined}),n?!1:this.accept.call(this.element[0],s.currentItem||s.element)?(this.options.activeClass&&this.element.removeClass(this.options.activeClass),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("drop",e,this.ui(s)),this.element):!1):!1},ui:function(t){return{draggable:t.currentItem||t.element,helper:t.helper,position:t.position,offset:t.positionAbs}}}),t.ui.intersect=function(t,i,s){if(!i.offset)return!1;var n,a,o=(t.positionAbs||t.position.absolute).left,r=(t.positionAbs||t.position.absolute).top,l=o+t.helperProportions.width,h=r+t.helperProportions.height,c=i.offset.left,u=i.offset.top,d=c+i.proportions().width,p=u+i.proportions().height;switch(s){case"fit":return o>=c&&d>=l&&r>=u&&p>=h;case"intersect":return o+t.helperProportions.width/2>c&&d>l-t.helperProportions.width/2&&r+t.helperProportions.height/2>u&&p>h-t.helperProportions.height/2;case"pointer":return n=(t.positionAbs||t.position.absolute).left+(t.clickOffset||t.offset.click).left,a=(t.positionAbs||t.position.absolute).top+(t.clickOffset||t.offset.click).top,e(a,u,i.proportions().height)&&e(n,c,i.proportions().width);case"touch":return(r>=u&&p>=r||h>=u&&p>=h||u>r&&h>p)&&(o>=c&&d>=o||l>=c&&d>=l||c>o&&l>d);default:return!1}},t.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(e,i){var s,n,a=t.ui.ddmanager.droppables[e.options.scope]||[],o=i?i.type:null,r=(e.currentItem||e.element).find(":data(ui-droppable)").addBack();t:for(s=0;a.length>s;s++)if(!(a[s].options.disabled||e&&!a[s].accept.call(a[s].element[0],e.currentItem||e.element))){for(n=0;r.length>n;n++)if(r[n]===a[s].element[0]){a[s].proportions().height=0;continue t}a[s].visible="none"!==a[s].element.css("display"),a[s].visible&&("mousedown"===o&&a[s]._activate.call(a[s],i),a[s].offset=a[s].element.offset(),a[s].proportions({width:a[s].element[0].offsetWidth,height:a[s].element[0].offsetHeight}))}},drop:function(e,i){var s=!1;return t.each((t.ui.ddmanager.droppables[e.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&t.ui.intersect(e,this,this.options.tolerance)&&(s=this._drop.call(this,i)||s),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],e.currentItem||e.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,i)))}),s},dragStart:function(e,i){e.element.parentsUntil("body").bind("scroll.droppable",function(){e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)})},drag:function(e,i){e.options.refreshPositions&&t.ui.ddmanager.prepareOffsets(e,i),t.each(t.ui.ddmanager.droppables[e.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var s,n,a,o=t.ui.intersect(e,this,this.options.tolerance),r=!o&&this.isover?"isout":o&&!this.isover?"isover":null;r&&(this.options.greedy&&(n=this.options.scope,a=this.element.parents(":data(ui-droppable)").filter(function(){return t.data(this,"ui-droppable").options.scope===n}),a.length&&(s=t.data(a[0],"ui-droppable"),s.greedyChild="isover"===r)),s&&"isover"===r&&(s.isover=!1,s.isout=!0,s._out.call(s,i)),this[r]=!0,this["isout"===r?"isover":"isout"]=!1,this["isover"===r?"_over":"_out"].call(this,i),s&&"isout"===r&&(s.isout=!1,s.isover=!0,s._over.call(s,i)))}})},dragStop:function(e,i){e.element.parentsUntil("body").unbind("scroll.droppable"),e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)}}})(jQuery);(function(t){function e(t,e,i){return t>e&&e+i>t}function i(t){return/left|right/.test(t.css("float"))||/inline|table-cell/.test(t.css("display"))}t.widget("ui.sortable",t.ui.mouse,{version:"1.10.4",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_create:function(){var t=this.options;this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.floating=this.items.length?"x"===t.axis||i(this.items[0].item):!1,this.offset=this.element.offset(),this._mouseInit(),this.ready=!0},_destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled"),this._mouseDestroy();for(var t=this.items.length-1;t>=0;t--)this.items[t].item.removeData(this.widgetName+"-item");return this},_setOption:function(e,i){"disabled"===e?(this.options[e]=i,this.widget().toggleClass("ui-sortable-disabled",!!i)):t.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(e,i){var s=null,n=!1,o=this;return this.reverting?!1:this.options.disabled||"static"===this.options.type?!1:(this._refreshItems(e),t(e.target).parents().each(function(){return t.data(this,o.widgetName+"-item")===o?(s=t(this),!1):undefined}),t.data(e.target,o.widgetName+"-item")===o&&(s=t(e.target)),s?!this.options.handle||i||(t(this.options.handle,s).find("*").addBack().each(function(){this===e.target&&(n=!0)}),n)?(this.currentItem=s,this._removeCurrentsFromItems(),!0):!1:!1)},_mouseStart:function(e,i,s){var n,o,a=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(e),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},t.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,a.cursorAt&&this._adjustOffsetFromHelper(a.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),a.containment&&this._setContainment(),a.cursor&&"auto"!==a.cursor&&(o=this.document.find("body"),this.storedCursor=o.css("cursor"),o.css("cursor",a.cursor),this.storedStylesheet=t("<style>*{ cursor: "+a.cursor+" !important; }</style>").appendTo(o)),a.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",a.opacity)),a.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",a.zIndex)),this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",e,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!s)for(n=this.containers.length-1;n>=0;n--)this.containers[n]._trigger("activate",e,this._uiHash(this));return t.ui.ddmanager&&(t.ui.ddmanager.current=this),t.ui.ddmanager&&!a.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(e),!0},_mouseDrag:function(e){var i,s,n,o,a=this.options,r=!1;for(this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-e.pageY<a.scrollSensitivity?this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop+a.scrollSpeed:e.pageY-this.overflowOffset.top<a.scrollSensitivity&&(this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop-a.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-e.pageX<a.scrollSensitivity?this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft+a.scrollSpeed:e.pageX-this.overflowOffset.left<a.scrollSensitivity&&(this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft-a.scrollSpeed)):(e.pageY-t(document).scrollTop()<a.scrollSensitivity?r=t(document).scrollTop(t(document).scrollTop()-a.scrollSpeed):t(window).height()-(e.pageY-t(document).scrollTop())<a.scrollSensitivity&&(r=t(document).scrollTop(t(document).scrollTop()+a.scrollSpeed)),e.pageX-t(document).scrollLeft()<a.scrollSensitivity?r=t(document).scrollLeft(t(document).scrollLeft()-a.scrollSpeed):t(window).width()-(e.pageX-t(document).scrollLeft())<a.scrollSensitivity&&(r=t(document).scrollLeft(t(document).scrollLeft()+a.scrollSpeed))),r!==!1&&t.ui.ddmanager&&!a.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e)),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),i=this.items.length-1;i>=0;i--)if(s=this.items[i],n=s.item[0],o=this._intersectsWithPointer(s),o&&s.instance===this.currentContainer&&n!==this.currentItem[0]&&this.placeholder[1===o?"next":"prev"]()[0]!==n&&!t.contains(this.placeholder[0],n)&&("semi-dynamic"===this.options.type?!t.contains(this.element[0],n):!0)){if(this.direction=1===o?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(s))break;this._rearrange(e,s),this._trigger("change",e,this._uiHash());break}return this._contactContainers(e),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),this._trigger("sort",e,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(e,i){if(e){if(t.ui.ddmanager&&!this.options.dropBehaviour&&t.ui.ddmanager.drop(this,e),this.options.revert){var s=this,n=this.placeholder.offset(),o=this.options.axis,a={};o&&"x"!==o||(a.left=n.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollLeft)),o&&"y"!==o||(a.top=n.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,t(this.helper).animate(a,parseInt(this.options.revert,10)||500,function(){s._clear(e)})}else this._clear(e,i);return!1}},cancel:function(){if(this.dragging){this._mouseUp({target:null}),"original"===this.options.helper?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var e=this.containers.length-1;e>=0;e--)this.containers[e]._trigger("deactivate",null,this._uiHash(this)),this.containers[e].containerCache.over&&(this.containers[e]._trigger("out",null,this._uiHash(this)),this.containers[e].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),t.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?t(this.domPosition.prev).after(this.currentItem):t(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},t(i).each(function(){var i=(t(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[\-=_](.+)/);i&&s.push((e.key||i[1]+"[]")+"="+(e.key&&e.expression?i[1]:i[2]))}),!s.length&&e.key&&s.push(e.key+"="),s.join("&")},toArray:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},i.each(function(){s.push(t(e.item||this).attr(e.attribute||"id")||"")}),s},_intersectsWith:function(t){var e=this.positionAbs.left,i=e+this.helperProportions.width,s=this.positionAbs.top,n=s+this.helperProportions.height,o=t.left,a=o+t.width,r=t.top,h=r+t.height,l=this.offset.click.top,c=this.offset.click.left,u="x"===this.options.axis||s+l>r&&h>s+l,d="y"===this.options.axis||e+c>o&&a>e+c,p=u&&d;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>t[this.floating?"width":"height"]?p:e+this.helperProportions.width/2>o&&a>i-this.helperProportions.width/2&&s+this.helperProportions.height/2>r&&h>n-this.helperProportions.height/2},_intersectsWithPointer:function(t){var i="x"===this.options.axis||e(this.positionAbs.top+this.offset.click.top,t.top,t.height),s="y"===this.options.axis||e(this.positionAbs.left+this.offset.click.left,t.left,t.width),n=i&&s,o=this._getDragVerticalDirection(),a=this._getDragHorizontalDirection();return n?this.floating?a&&"right"===a||"down"===o?2:1:o&&("down"===o?2:1):!1},_intersectsWithSides:function(t){var i=e(this.positionAbs.top+this.offset.click.top,t.top+t.height/2,t.height),s=e(this.positionAbs.left+this.offset.click.left,t.left+t.width/2,t.width),n=this._getDragVerticalDirection(),o=this._getDragHorizontalDirection();return this.floating&&o?"right"===o&&s||"left"===o&&!s:n&&("down"===n&&i||"up"===n&&!i)},_getDragVerticalDirection:function(){var t=this.positionAbs.top-this.lastPositionAbs.top;return 0!==t&&(t>0?"down":"up")},_getDragHorizontalDirection:function(){var t=this.positionAbs.left-this.lastPositionAbs.left;return 0!==t&&(t>0?"right":"left")},refresh:function(t){return this._refreshItems(t),this.refreshPositions(),this},_connectWith:function(){var t=this.options;return t.connectWith.constructor===String?[t.connectWith]:t.connectWith},_getItemsAsjQuery:function(e){function i(){r.push(this)}var s,n,o,a,r=[],h=[],l=this._connectWith();if(l&&e)for(s=l.length-1;s>=0;s--)for(o=t(l[s]),n=o.length-1;n>=0;n--)a=t.data(o[n],this.widgetFullName),a&&a!==this&&!a.options.disabled&&h.push([t.isFunction(a.options.items)?a.options.items.call(a.element):t(a.options.items,a.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),a]);for(h.push([t.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):t(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),s=h.length-1;s>=0;s--)h[s][0].each(i);return t(r)},_removeCurrentsFromItems:function(){var e=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=t.grep(this.items,function(t){for(var i=0;e.length>i;i++)if(e[i]===t.item[0])return!1;return!0})},_refreshItems:function(e){this.items=[],this.containers=[this];var i,s,n,o,a,r,h,l,c=this.items,u=[[t.isFunction(this.options.items)?this.options.items.call(this.element[0],e,{item:this.currentItem}):t(this.options.items,this.element),this]],d=this._connectWith();if(d&&this.ready)for(i=d.length-1;i>=0;i--)for(n=t(d[i]),s=n.length-1;s>=0;s--)o=t.data(n[s],this.widgetFullName),o&&o!==this&&!o.options.disabled&&(u.push([t.isFunction(o.options.items)?o.options.items.call(o.element[0],e,{item:this.currentItem}):t(o.options.items,o.element),o]),this.containers.push(o));for(i=u.length-1;i>=0;i--)for(a=u[i][1],r=u[i][0],s=0,l=r.length;l>s;s++)h=t(r[s]),h.data(this.widgetName+"-item",a),c.push({item:h,instance:a,width:0,height:0,left:0,top:0})},refreshPositions:function(e){this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());var i,s,n,o;for(i=this.items.length-1;i>=0;i--)s=this.items[i],s.instance!==this.currentContainer&&this.currentContainer&&s.item[0]!==this.currentItem[0]||(n=this.options.toleranceElement?t(this.options.toleranceElement,s.item):s.item,e||(s.width=n.outerWidth(),s.height=n.outerHeight()),o=n.offset(),s.left=o.left,s.top=o.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(i=this.containers.length-1;i>=0;i--)o=this.containers[i].element.offset(),this.containers[i].containerCache.left=o.left,this.containers[i].containerCache.top=o.top,this.containers[i].containerCache.width=this.containers[i].element.outerWidth(),this.containers[i].containerCache.height=this.containers[i].element.outerHeight();return this},_createPlaceholder:function(e){e=e||this;var i,s=e.options;s.placeholder&&s.placeholder.constructor!==String||(i=s.placeholder,s.placeholder={element:function(){var s=e.currentItem[0].nodeName.toLowerCase(),n=t("<"+s+">",e.document[0]).addClass(i||e.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper");return"tr"===s?e.currentItem.children().each(function(){t("<td>&#160;</td>",e.document[0]).attr("colspan",t(this).attr("colspan")||1).appendTo(n)}):"img"===s&&n.attr("src",e.currentItem.attr("src")),i||n.css("visibility","hidden"),n},update:function(t,n){(!i||s.forcePlaceholderSize)&&(n.height()||n.height(e.currentItem.innerHeight()-parseInt(e.currentItem.css("paddingTop")||0,10)-parseInt(e.currentItem.css("paddingBottom")||0,10)),n.width()||n.width(e.currentItem.innerWidth()-parseInt(e.currentItem.css("paddingLeft")||0,10)-parseInt(e.currentItem.css("paddingRight")||0,10)))}}),e.placeholder=t(s.placeholder.element.call(e.element,e.currentItem)),e.currentItem.after(e.placeholder),s.placeholder.update(e,e.placeholder)},_contactContainers:function(s){var n,o,a,r,h,l,c,u,d,p,f=null,g=null;for(n=this.containers.length-1;n>=0;n--)if(!t.contains(this.currentItem[0],this.containers[n].element[0]))if(this._intersectsWith(this.containers[n].containerCache)){if(f&&t.contains(this.containers[n].element[0],f.element[0]))continue;f=this.containers[n],g=n}else this.containers[n].containerCache.over&&(this.containers[n]._trigger("out",s,this._uiHash(this)),this.containers[n].containerCache.over=0);if(f)if(1===this.containers.length)this.containers[g].containerCache.over||(this.containers[g]._trigger("over",s,this._uiHash(this)),this.containers[g].containerCache.over=1);else{for(a=1e4,r=null,p=f.floating||i(this.currentItem),h=p?"left":"top",l=p?"width":"height",c=this.positionAbs[h]+this.offset.click[h],o=this.items.length-1;o>=0;o--)t.contains(this.containers[g].element[0],this.items[o].item[0])&&this.items[o].item[0]!==this.currentItem[0]&&(!p||e(this.positionAbs.top+this.offset.click.top,this.items[o].top,this.items[o].height))&&(u=this.items[o].item.offset()[h],d=!1,Math.abs(u-c)>Math.abs(u+this.items[o][l]-c)&&(d=!0,u+=this.items[o][l]),a>Math.abs(u-c)&&(a=Math.abs(u-c),r=this.items[o],this.direction=d?"up":"down"));if(!r&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[g])return;r?this._rearrange(s,r,null,!0):this._rearrange(s,null,this.containers[g].element,!0),this._trigger("change",s,this._uiHash()),this.containers[g]._trigger("change",s,this._uiHash(this)),this.currentContainer=this.containers[g],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[g]._trigger("over",s,this._uiHash(this)),this.containers[g].containerCache.over=1}},_createHelper:function(e){var i=this.options,s=t.isFunction(i.helper)?t(i.helper.apply(this.element[0],[e,this.currentItem])):"clone"===i.helper?this.currentItem.clone():this.currentItem;return s.parents("body").length||t("parent"!==i.appendTo?i.appendTo:this.currentItem[0].parentNode)[0].appendChild(s[0]),s[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),(!s[0].style.width||i.forceHelperSize)&&s.width(this.currentItem.width()),(!s[0].style.height||i.forceHelperSize)&&s.height(this.currentItem.height()),s},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var e=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&t.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var t=this.currentItem.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,i,s,n=this.options;"parent"===n.containment&&(n.containment=this.helper[0].parentNode),("document"===n.containment||"window"===n.containment)&&(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,t("document"===n.containment?document:window).width()-this.helperProportions.width-this.margins.left,(t("document"===n.containment?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(n.containment)||(e=t(n.containment)[0],i=t(n.containment).offset(),s="hidden"!==t(e).css("overflow"),this.containment=[i.left+(parseInt(t(e).css("borderLeftWidth"),10)||0)+(parseInt(t(e).css("paddingLeft"),10)||0)-this.margins.left,i.top+(parseInt(t(e).css("borderTopWidth"),10)||0)+(parseInt(t(e).css("paddingTop"),10)||0)-this.margins.top,i.left+(s?Math.max(e.scrollWidth,e.offsetWidth):e.offsetWidth)-(parseInt(t(e).css("borderLeftWidth"),10)||0)-(parseInt(t(e).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,i.top+(s?Math.max(e.scrollHeight,e.offsetHeight):e.offsetHeight)-(parseInt(t(e).css("borderTopWidth"),10)||0)-(parseInt(t(e).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(e,i){i||(i=this.position);var s="absolute"===e?1:-1,n="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,o=/(html|body)/i.test(n[0].tagName);return{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():o?0:n.scrollTop())*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():o?0:n.scrollLeft())*s}},_generatePosition:function(e){var i,s,n=this.options,o=e.pageX,a=e.pageY,r="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,h=/(html|body)/i.test(r[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==document&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(e.pageX-this.offset.click.left<this.containment[0]&&(o=this.containment[0]+this.offset.click.left),e.pageY-this.offset.click.top<this.containment[1]&&(a=this.containment[1]+this.offset.click.top),e.pageX-this.offset.click.left>this.containment[2]&&(o=this.containment[2]+this.offset.click.left),e.pageY-this.offset.click.top>this.containment[3]&&(a=this.containment[3]+this.offset.click.top)),n.grid&&(i=this.originalPageY+Math.round((a-this.originalPageY)/n.grid[1])*n.grid[1],a=this.containment?i-this.offset.click.top>=this.containment[1]&&i-this.offset.click.top<=this.containment[3]?i:i-this.offset.click.top>=this.containment[1]?i-n.grid[1]:i+n.grid[1]:i,s=this.originalPageX+Math.round((o-this.originalPageX)/n.grid[0])*n.grid[0],o=this.containment?s-this.offset.click.left>=this.containment[0]&&s-this.offset.click.left<=this.containment[2]?s:s-this.offset.click.left>=this.containment[0]?s-n.grid[0]:s+n.grid[0]:s)),{top:a-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():h?0:r.scrollTop()),left:o-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():h?0:r.scrollLeft())}},_rearrange:function(t,e,i,s){i?i[0].appendChild(this.placeholder[0]):e.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?e.item[0]:e.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var n=this.counter;this._delay(function(){n===this.counter&&this.refreshPositions(!s)})},_clear:function(t,e){function i(t,e,i){return function(s){i._trigger(t,s,e._uiHash(e))}}this.reverting=!1;var s,n=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(s in this._storedCSS)("auto"===this._storedCSS[s]||"static"===this._storedCSS[s])&&(this._storedCSS[s]="");this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();for(this.fromOutside&&!e&&n.push(function(t){this._trigger("receive",t,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||e||n.push(function(t){this._trigger("update",t,this._uiHash())}),this!==this.currentContainer&&(e||(n.push(function(t){this._trigger("remove",t,this._uiHash())}),n.push(function(t){return function(e){t._trigger("receive",e,this._uiHash(this))}}.call(this,this.currentContainer)),n.push(function(t){return function(e){t._trigger("update",e,this._uiHash(this))}}.call(this,this.currentContainer)))),s=this.containers.length-1;s>=0;s--)e||n.push(i("deactivate",this,this.containers[s])),this.containers[s].containerCache.over&&(n.push(i("out",this,this.containers[s])),this.containers[s].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,this.cancelHelperRemoval){if(!e){for(this._trigger("beforeStop",t,this._uiHash()),s=0;n.length>s;s++)n[s].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!1}if(e||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null,!e){for(s=0;n.length>s;s++)n[s].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!0},_trigger:function(){t.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(e){var i=e||this;return{helper:i.helper,placeholder:i.placeholder||t([]),position:i.position,originalPosition:i.originalPosition,offset:i.positionAbs,item:i.currentItem,sender:e?e.element:null}}})})(jQuery);(function(e){var t=0,i={},a={};i.height=i.paddingTop=i.paddingBottom=i.borderTopWidth=i.borderBottomWidth="hide",a.height=a.paddingTop=a.paddingBottom=a.borderTopWidth=a.borderBottomWidth="show",e.widget("ui.accordion",{version:"1.10.4",options:{active:0,animate:{},collapsible:!1,event:"click",header:"> li > :first-child,> :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},_create:function(){var t=this.options;this.prevShow=this.prevHide=e(),this.element.addClass("ui-accordion ui-widget ui-helper-reset").attr("role","tablist"),t.collapsible||t.active!==!1&&null!=t.active||(t.active=0),this._processPanels(),0>t.active&&(t.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():e(),content:this.active.length?this.active.next():e()}},_createIcons:function(){var t=this.options.icons;t&&(e("<span>").addClass("ui-accordion-header-icon ui-icon "+t.header).prependTo(this.headers),this.active.children(".ui-accordion-header-icon").removeClass(t.header).addClass(t.activeHeader),this.headers.addClass("ui-accordion-icons"))},_destroyIcons:function(){this.headers.removeClass("ui-accordion-icons").children(".ui-accordion-header-icon").remove()},_destroy:function(){var e;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role"),this.headers.removeClass("ui-accordion-header ui-accordion-header-active ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-selected").removeAttr("aria-controls").removeAttr("tabIndex").each(function(){/^ui-accordion/.test(this.id)&&this.removeAttribute("id")}),this._destroyIcons(),e=this.headers.next().css("display","").removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled").each(function(){/^ui-accordion/.test(this.id)&&this.removeAttribute("id")}),"content"!==this.options.heightStyle&&e.css("height","")},_setOption:function(e,t){return"active"===e?(this._activate(t),undefined):("event"===e&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(t)),this._super(e,t),"collapsible"!==e||t||this.options.active!==!1||this._activate(0),"icons"===e&&(this._destroyIcons(),t&&this._createIcons()),"disabled"===e&&this.headers.add(this.headers.next()).toggleClass("ui-state-disabled",!!t),undefined)},_keydown:function(t){if(!t.altKey&&!t.ctrlKey){var i=e.ui.keyCode,a=this.headers.length,s=this.headers.index(t.target),n=!1;switch(t.keyCode){case i.RIGHT:case i.DOWN:n=this.headers[(s+1)%a];break;case i.LEFT:case i.UP:n=this.headers[(s-1+a)%a];break;case i.SPACE:case i.ENTER:this._eventHandler(t);break;case i.HOME:n=this.headers[0];break;case i.END:n=this.headers[a-1]}n&&(e(t.target).attr("tabIndex",-1),e(n).attr("tabIndex",0),n.focus(),t.preventDefault())}},_panelKeyDown:function(t){t.keyCode===e.ui.keyCode.UP&&t.ctrlKey&&e(t.currentTarget).prev().focus()},refresh:function(){var t=this.options;this._processPanels(),t.active===!1&&t.collapsible===!0||!this.headers.length?(t.active=!1,this.active=e()):t.active===!1?this._activate(0):this.active.length&&!e.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(t.active=!1,this.active=e()):this._activate(Math.max(0,t.active-1)):t.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){this.headers=this.element.find(this.options.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all"),this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").filter(":not(.ui-accordion-content-active)").hide()},_refresh:function(){var i,a=this.options,s=a.heightStyle,n=this.element.parent(),r=this.accordionId="ui-accordion-"+(this.element.attr("id")||++t);this.active=this._findActive(a.active).addClass("ui-accordion-header-active ui-state-active ui-corner-top").removeClass("ui-corner-all"),this.active.next().addClass("ui-accordion-content-active").show(),this.headers.attr("role","tab").each(function(t){var i=e(this),a=i.attr("id"),s=i.next(),n=s.attr("id");a||(a=r+"-header-"+t,i.attr("id",a)),n||(n=r+"-panel-"+t,s.attr("id",n)),i.attr("aria-controls",n),s.attr("aria-labelledby",a)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}).next().attr({"aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}).next().attr({"aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(a.event),"fill"===s?(i=n.height(),this.element.siblings(":visible").each(function(){var t=e(this),a=t.css("position");"absolute"!==a&&"fixed"!==a&&(i-=t.outerHeight(!0))}),this.headers.each(function(){i-=e(this).outerHeight(!0)}),this.headers.next().each(function(){e(this).height(Math.max(0,i-e(this).innerHeight()+e(this).height()))}).css("overflow","auto")):"auto"===s&&(i=0,this.headers.next().each(function(){i=Math.max(i,e(this).css("height","").height())}).height(i))},_activate:function(t){var i=this._findActive(t)[0];i!==this.active[0]&&(i=i||this.active[0],this._eventHandler({target:i,currentTarget:i,preventDefault:e.noop}))},_findActive:function(t){return"number"==typeof t?this.headers.eq(t):e()},_setupEvents:function(t){var i={keydown:"_keydown"};t&&e.each(t.split(" "),function(e,t){i[t]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,i),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(t){var i=this.options,a=this.active,s=e(t.currentTarget),n=s[0]===a[0],r=n&&i.collapsible,o=r?e():s.next(),h=a.next(),d={oldHeader:a,oldPanel:h,newHeader:r?e():s,newPanel:o};t.preventDefault(),n&&!i.collapsible||this._trigger("beforeActivate",t,d)===!1||(i.active=r?!1:this.headers.index(s),this.active=n?e():s,this._toggle(d),a.removeClass("ui-accordion-header-active ui-state-active"),i.icons&&a.children(".ui-accordion-header-icon").removeClass(i.icons.activeHeader).addClass(i.icons.header),n||(s.removeClass("ui-corner-all").addClass("ui-accordion-header-active ui-state-active ui-corner-top"),i.icons&&s.children(".ui-accordion-header-icon").removeClass(i.icons.header).addClass(i.icons.activeHeader),s.next().addClass("ui-accordion-content-active")))},_toggle:function(t){var i=t.newPanel,a=this.prevShow.length?this.prevShow:t.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=i,this.prevHide=a,this.options.animate?this._animate(i,a,t):(a.hide(),i.show(),this._toggleComplete(t)),a.attr({"aria-hidden":"true"}),a.prev().attr("aria-selected","false"),i.length&&a.length?a.prev().attr({tabIndex:-1,"aria-expanded":"false"}):i.length&&this.headers.filter(function(){return 0===e(this).attr("tabIndex")}).attr("tabIndex",-1),i.attr("aria-hidden","false").prev().attr({"aria-selected":"true",tabIndex:0,"aria-expanded":"true"})},_animate:function(e,t,s){var n,r,o,h=this,d=0,c=e.length&&(!t.length||e.index()<t.index()),l=this.options.animate||{},u=c&&l.down||l,v=function(){h._toggleComplete(s)};return"number"==typeof u&&(o=u),"string"==typeof u&&(r=u),r=r||u.easing||l.easing,o=o||u.duration||l.duration,t.length?e.length?(n=e.show().outerHeight(),t.animate(i,{duration:o,easing:r,step:function(e,t){t.now=Math.round(e)}}),e.hide().animate(a,{duration:o,easing:r,complete:v,step:function(e,i){i.now=Math.round(e),"height"!==i.prop?d+=i.now:"content"!==h.options.heightStyle&&(i.now=Math.round(n-t.outerHeight()-d),d=0)}}),undefined):t.animate(i,o,r,v):e.animate(a,o,r,v)},_toggleComplete:function(e){var t=e.oldPanel;t.removeClass("ui-accordion-content-active").prev().removeClass("ui-corner-top").addClass("ui-corner-all"),t.length&&(t.parent()[0].className=t.parent()[0].className),this._trigger("activate",null,e)}})})(jQuery);(function(e){e.widget("ui.autocomplete",{version:"1.10.4",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,_create:function(){var t,i,s,n=this.element[0].nodeName.toLowerCase(),a="textarea"===n,o="input"===n;this.isMultiLine=a?!0:o?!1:this.element.prop("isContentEditable"),this.valueMethod=this.element[a||o?"val":"text"],this.isNewMenu=!0,this.element.addClass("ui-autocomplete-input").attr("autocomplete","off"),this._on(this.element,{keydown:function(n){if(this.element.prop("readOnly"))return t=!0,s=!0,i=!0,undefined;t=!1,s=!1,i=!1;var a=e.ui.keyCode;switch(n.keyCode){case a.PAGE_UP:t=!0,this._move("previousPage",n);break;case a.PAGE_DOWN:t=!0,this._move("nextPage",n);break;case a.UP:t=!0,this._keyEvent("previous",n);break;case a.DOWN:t=!0,this._keyEvent("next",n);break;case a.ENTER:case a.NUMPAD_ENTER:this.menu.active&&(t=!0,n.preventDefault(),this.menu.select(n));break;case a.TAB:this.menu.active&&this.menu.select(n);break;case a.ESCAPE:this.menu.element.is(":visible")&&(this._value(this.term),this.close(n),n.preventDefault());break;default:i=!0,this._searchTimeout(n)}},keypress:function(s){if(t)return t=!1,(!this.isMultiLine||this.menu.element.is(":visible"))&&s.preventDefault(),undefined;if(!i){var n=e.ui.keyCode;switch(s.keyCode){case n.PAGE_UP:this._move("previousPage",s);break;case n.PAGE_DOWN:this._move("nextPage",s);break;case n.UP:this._keyEvent("previous",s);break;case n.DOWN:this._keyEvent("next",s)}}},input:function(e){return s?(s=!1,e.preventDefault(),undefined):(this._searchTimeout(e),undefined)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(e){return this.cancelBlur?(delete this.cancelBlur,undefined):(clearTimeout(this.searching),this.close(e),this._change(e),undefined)}}),this._initSource(),this.menu=e("<ul>").addClass("ui-autocomplete ui-front").appendTo(this._appendTo()).menu({role:null}).hide().data("ui-menu"),this._on(this.menu.element,{mousedown:function(t){t.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur});var i=this.menu.element[0];e(t.target).closest(".ui-menu-item").length||this._delay(function(){var t=this;this.document.one("mousedown",function(s){s.target===t.element[0]||s.target===i||e.contains(i,s.target)||t.close()})})},menufocus:function(t,i){if(this.isNewMenu&&(this.isNewMenu=!1,t.originalEvent&&/^mouse/.test(t.originalEvent.type)))return this.menu.blur(),this.document.one("mousemove",function(){e(t.target).trigger(t.originalEvent)}),undefined;var s=i.item.data("ui-autocomplete-item");!1!==this._trigger("focus",t,{item:s})?t.originalEvent&&/^key/.test(t.originalEvent.type)&&this._value(s.value):this.liveRegion.text(s.value)},menuselect:function(e,t){var i=t.item.data("ui-autocomplete-item"),s=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.focus(),this.previous=s,this._delay(function(){this.previous=s,this.selectedItem=i})),!1!==this._trigger("select",e,{item:i})&&this._value(i.value),this.term=this._value(),this.close(e),this.selectedItem=i}}),this.liveRegion=e("<span>",{role:"status","aria-live":"polite"}).addClass("ui-helper-hidden-accessible").insertBefore(this.element),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(e,t){this._super(e,t),"source"===e&&this._initSource(),"appendTo"===e&&this.menu.element.appendTo(this._appendTo()),"disabled"===e&&t&&this.xhr&&this.xhr.abort()},_appendTo:function(){var t=this.options.appendTo;return t&&(t=t.jquery||t.nodeType?e(t):this.document.find(t).eq(0)),t||(t=this.element.closest(".ui-front")),t.length||(t=this.document[0].body),t},_initSource:function(){var t,i,s=this;e.isArray(this.options.source)?(t=this.options.source,this.source=function(i,s){s(e.ui.autocomplete.filter(t,i.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(t,n){s.xhr&&s.xhr.abort(),s.xhr=e.ajax({url:i,data:t,dataType:"json",success:function(e){n(e)},error:function(){n([])}})}):this.source=this.options.source},_searchTimeout:function(e){clearTimeout(this.searching),this.searching=this._delay(function(){this.term!==this._value()&&(this.selectedItem=null,this.search(null,e))},this.options.delay)},search:function(e,t){return e=null!=e?e:this._value(),this.term=this._value(),e.length<this.options.minLength?this.close(t):this._trigger("search",t)!==!1?this._search(e):undefined},_search:function(e){this.pending++,this.element.addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:e},this._response())},_response:function(){var t=++this.requestIndex;return e.proxy(function(e){t===this.requestIndex&&this.__response(e),this.pending--,this.pending||this.element.removeClass("ui-autocomplete-loading")},this)},__response:function(e){e&&(e=this._normalize(e)),this._trigger("response",null,{content:e}),!this.options.disabled&&e&&e.length&&!this.cancelSearch?(this._suggest(e),this._trigger("open")):this._close()},close:function(e){this.cancelSearch=!0,this._close(e)},_close:function(e){this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",e))},_change:function(e){this.previous!==this._value()&&this._trigger("change",e,{item:this.selectedItem})},_normalize:function(t){return t.length&&t[0].label&&t[0].value?t:e.map(t,function(t){return"string"==typeof t?{label:t,value:t}:e.extend({label:t.label||t.value,value:t.value||t.label},t)})},_suggest:function(t){var i=this.menu.element.empty();this._renderMenu(i,t),this.isNewMenu=!0,this.menu.refresh(),i.show(),this._resizeMenu(),i.position(e.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next()},_resizeMenu:function(){var e=this.menu.element;e.outerWidth(Math.max(e.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(t,i){var s=this;e.each(i,function(e,i){s._renderItemData(t,i)})},_renderItemData:function(e,t){return this._renderItem(e,t).data("ui-autocomplete-item",t)},_renderItem:function(t,i){return e("<li>").append(e("<a>").text(i.label)).appendTo(t)},_move:function(e,t){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(e)||this.menu.isLastItem()&&/^next/.test(e)?(this._value(this.term),this.menu.blur(),undefined):(this.menu[e](t),undefined):(this.search(null,t),undefined)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(e,t){(!this.isMultiLine||this.menu.element.is(":visible"))&&(this._move(e,t),t.preventDefault())}}),e.extend(e.ui.autocomplete,{escapeRegex:function(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(t,i){var s=RegExp(e.ui.autocomplete.escapeRegex(i),"i");return e.grep(t,function(e){return s.test(e.label||e.value||e)})}}),e.widget("ui.autocomplete",e.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(e){return e+(e>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(e){var t;this._superApply(arguments),this.options.disabled||this.cancelSearch||(t=e&&e.length?this.options.messages.results(e.length):this.options.messages.noResults,this.liveRegion.text(t))}})})(jQuery);(function(e){var t,i="ui-button ui-widget ui-state-default ui-corner-all",n="ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",s=function(){var t=e(this);setTimeout(function(){t.find(":ui-button").button("refresh")},1)},a=function(t){var i=t.name,n=t.form,s=e([]);return i&&(i=i.replace(/'/g,"\\'"),s=n?e(n).find("[name='"+i+"']"):e("[name='"+i+"']",t.ownerDocument).filter(function(){return!this.form})),s};e.widget("ui.button",{version:"1.10.4",defaultElement:"<button>",options:{disabled:null,text:!0,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset"+this.eventNamespace).bind("reset"+this.eventNamespace,s),"boolean"!=typeof this.options.disabled?this.options.disabled=!!this.element.prop("disabled"):this.element.prop("disabled",this.options.disabled),this._determineButtonType(),this.hasTitle=!!this.buttonElement.attr("title");var n=this,o=this.options,r="checkbox"===this.type||"radio"===this.type,h=r?"":"ui-state-active";null===o.label&&(o.label="input"===this.type?this.buttonElement.val():this.buttonElement.html()),this._hoverable(this.buttonElement),this.buttonElement.addClass(i).attr("role","button").bind("mouseenter"+this.eventNamespace,function(){o.disabled||this===t&&e(this).addClass("ui-state-active")}).bind("mouseleave"+this.eventNamespace,function(){o.disabled||e(this).removeClass(h)}).bind("click"+this.eventNamespace,function(e){o.disabled&&(e.preventDefault(),e.stopImmediatePropagation())}),this._on({focus:function(){this.buttonElement.addClass("ui-state-focus")},blur:function(){this.buttonElement.removeClass("ui-state-focus")}}),r&&this.element.bind("change"+this.eventNamespace,function(){n.refresh()}),"checkbox"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){return o.disabled?!1:undefined}):"radio"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){if(o.disabled)return!1;e(this).addClass("ui-state-active"),n.buttonElement.attr("aria-pressed","true");var t=n.element[0];a(t).not(t).map(function(){return e(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed","false")}):(this.buttonElement.bind("mousedown"+this.eventNamespace,function(){return o.disabled?!1:(e(this).addClass("ui-state-active"),t=this,n.document.one("mouseup",function(){t=null}),undefined)}).bind("mouseup"+this.eventNamespace,function(){return o.disabled?!1:(e(this).removeClass("ui-state-active"),undefined)}).bind("keydown"+this.eventNamespace,function(t){return o.disabled?!1:((t.keyCode===e.ui.keyCode.SPACE||t.keyCode===e.ui.keyCode.ENTER)&&e(this).addClass("ui-state-active"),undefined)}).bind("keyup"+this.eventNamespace+" blur"+this.eventNamespace,function(){e(this).removeClass("ui-state-active")}),this.buttonElement.is("a")&&this.buttonElement.keyup(function(t){t.keyCode===e.ui.keyCode.SPACE&&e(this).click()})),this._setOption("disabled",o.disabled),this._resetButton()},_determineButtonType:function(){var e,t,i;this.type=this.element.is("[type=checkbox]")?"checkbox":this.element.is("[type=radio]")?"radio":this.element.is("input")?"input":"button","checkbox"===this.type||"radio"===this.type?(e=this.element.parents().last(),t="label[for='"+this.element.attr("id")+"']",this.buttonElement=e.find(t),this.buttonElement.length||(e=e.length?e.siblings():this.element.siblings(),this.buttonElement=e.filter(t),this.buttonElement.length||(this.buttonElement=e.find(t))),this.element.addClass("ui-helper-hidden-accessible"),i=this.element.is(":checked"),i&&this.buttonElement.addClass("ui-state-active"),this.buttonElement.prop("aria-pressed",i)):this.buttonElement=this.element},widget:function(){return this.buttonElement},_destroy:function(){this.element.removeClass("ui-helper-hidden-accessible"),this.buttonElement.removeClass(i+" ui-state-active "+n).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html()),this.hasTitle||this.buttonElement.removeAttr("title")},_setOption:function(e,t){return this._super(e,t),"disabled"===e?(this.element.prop("disabled",!!t),t&&this.buttonElement.removeClass("ui-state-focus"),undefined):(this._resetButton(),undefined)},refresh:function(){var t=this.element.is("input, button")?this.element.is(":disabled"):this.element.hasClass("ui-button-disabled");t!==this.options.disabled&&this._setOption("disabled",t),"radio"===this.type?a(this.element[0]).each(function(){e(this).is(":checked")?e(this).button("widget").addClass("ui-state-active").attr("aria-pressed","true"):e(this).button("widget").removeClass("ui-state-active").attr("aria-pressed","false")}):"checkbox"===this.type&&(this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed","true"):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed","false"))},_resetButton:function(){if("input"===this.type)return this.options.label&&this.element.val(this.options.label),undefined;var t=this.buttonElement.removeClass(n),i=e("<span></span>",this.document[0]).addClass("ui-button-text").html(this.options.label).appendTo(t.empty()).text(),s=this.options.icons,a=s.primary&&s.secondary,o=[];s.primary||s.secondary?(this.options.text&&o.push("ui-button-text-icon"+(a?"s":s.primary?"-primary":"-secondary")),s.primary&&t.prepend("<span class='ui-button-icon-primary ui-icon "+s.primary+"'></span>"),s.secondary&&t.append("<span class='ui-button-icon-secondary ui-icon "+s.secondary+"'></span>"),this.options.text||(o.push(a?"ui-button-icons-only":"ui-button-icon-only"),this.hasTitle||t.attr("title",e.trim(i)))):o.push("ui-button-text-only"),t.addClass(o.join(" "))}}),e.widget("ui.buttonset",{version:"1.10.4",options:{items:"button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(e,t){"disabled"===e&&this.buttons.button("option",e,t),this._super(e,t)},refresh:function(){var t="rtl"===this.element.css("direction");this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return e(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(t?"ui-corner-right":"ui-corner-left").end().filter(":last").addClass(t?"ui-corner-left":"ui-corner-right").end().end()},_destroy:function(){this.element.removeClass("ui-buttonset"),this.buttons.map(function(){return e(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy")}})})(jQuery);(function(e,t){function i(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},e.extend(this._defaults,this.regional[""]),this.dpDiv=a(e("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function a(t){var i="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return t.delegate(i,"mouseout",function(){e(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&e(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&e(this).removeClass("ui-datepicker-next-hover")}).delegate(i,"mouseover",function(){e.datepicker._isDisabledDatepicker(n.inline?t.parent()[0]:n.input[0])||(e(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),e(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&e(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&e(this).addClass("ui-datepicker-next-hover"))})}function s(t,i){e.extend(t,i);for(var a in i)null==i[a]&&(t[a]=i[a]);return t}e.extend(e.ui,{datepicker:{version:"1.10.4"}});var n,r="datepicker";e.extend(i.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(e){return s(this._defaults,e||{}),this},_attachDatepicker:function(t,i){var a,s,n;a=t.nodeName.toLowerCase(),s="div"===a||"span"===a,t.id||(this.uuid+=1,t.id="dp"+this.uuid),n=this._newInst(e(t),s),n.settings=e.extend({},i||{}),"input"===a?this._connectDatepicker(t,n):s&&this._inlineDatepicker(t,n)},_newInst:function(t,i){var s=t[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1");return{id:s,input:t,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:i,dpDiv:i?a(e("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(t,i){var a=e(t);i.append=e([]),i.trigger=e([]),a.hasClass(this.markerClassName)||(this._attachments(a,i),a.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp),this._autoSize(i),e.data(t,r,i),i.settings.disabled&&this._disableDatepicker(t))},_attachments:function(t,i){var a,s,n,r=this._get(i,"appendText"),o=this._get(i,"isRTL");i.append&&i.append.remove(),r&&(i.append=e("<span class='"+this._appendClass+"'>"+r+"</span>"),t[o?"before":"after"](i.append)),t.unbind("focus",this._showDatepicker),i.trigger&&i.trigger.remove(),a=this._get(i,"showOn"),("focus"===a||"both"===a)&&t.focus(this._showDatepicker),("button"===a||"both"===a)&&(s=this._get(i,"buttonText"),n=this._get(i,"buttonImage"),i.trigger=e(this._get(i,"buttonImageOnly")?e("<img/>").addClass(this._triggerClass).attr({src:n,alt:s,title:s}):e("<button type='button'></button>").addClass(this._triggerClass).html(n?e("<img/>").attr({src:n,alt:s,title:s}):s)),t[o?"before":"after"](i.trigger),i.trigger.click(function(){return e.datepicker._datepickerShowing&&e.datepicker._lastInput===t[0]?e.datepicker._hideDatepicker():e.datepicker._datepickerShowing&&e.datepicker._lastInput!==t[0]?(e.datepicker._hideDatepicker(),e.datepicker._showDatepicker(t[0])):e.datepicker._showDatepicker(t[0]),!1}))},_autoSize:function(e){if(this._get(e,"autoSize")&&!e.inline){var t,i,a,s,n=new Date(2009,11,20),r=this._get(e,"dateFormat");r.match(/[DM]/)&&(t=function(e){for(i=0,a=0,s=0;e.length>s;s++)e[s].length>i&&(i=e[s].length,a=s);return a},n.setMonth(t(this._get(e,r.match(/MM/)?"monthNames":"monthNamesShort"))),n.setDate(t(this._get(e,r.match(/DD/)?"dayNames":"dayNamesShort"))+20-n.getDay())),e.input.attr("size",this._formatDate(e,n).length)}},_inlineDatepicker:function(t,i){var a=e(t);a.hasClass(this.markerClassName)||(a.addClass(this.markerClassName).append(i.dpDiv),e.data(t,r,i),this._setDate(i,this._getDefaultDate(i),!0),this._updateDatepicker(i),this._updateAlternate(i),i.settings.disabled&&this._disableDatepicker(t),i.dpDiv.css("display","block"))},_dialogDatepicker:function(t,i,a,n,o){var u,c,h,l,d,p=this._dialogInst;return p||(this.uuid+=1,u="dp"+this.uuid,this._dialogInput=e("<input type='text' id='"+u+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.keydown(this._doKeyDown),e("body").append(this._dialogInput),p=this._dialogInst=this._newInst(this._dialogInput,!1),p.settings={},e.data(this._dialogInput[0],r,p)),s(p.settings,n||{}),i=i&&i.constructor===Date?this._formatDate(p,i):i,this._dialogInput.val(i),this._pos=o?o.length?o:[o.pageX,o.pageY]:null,this._pos||(c=document.documentElement.clientWidth,h=document.documentElement.clientHeight,l=document.documentElement.scrollLeft||document.body.scrollLeft,d=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[c/2-100+l,h/2-150+d]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),p.settings.onSelect=a,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),e.blockUI&&e.blockUI(this.dpDiv),e.data(this._dialogInput[0],r,p),this},_destroyDatepicker:function(t){var i,a=e(t),s=e.data(t,r);a.hasClass(this.markerClassName)&&(i=t.nodeName.toLowerCase(),e.removeData(t,r),"input"===i?(s.append.remove(),s.trigger.remove(),a.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):("div"===i||"span"===i)&&a.removeClass(this.markerClassName).empty())},_enableDatepicker:function(t){var i,a,s=e(t),n=e.data(t,r);s.hasClass(this.markerClassName)&&(i=t.nodeName.toLowerCase(),"input"===i?(t.disabled=!1,n.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):("div"===i||"span"===i)&&(a=s.children("."+this._inlineClass),a.children().removeClass("ui-state-disabled"),a.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=e.map(this._disabledInputs,function(e){return e===t?null:e}))},_disableDatepicker:function(t){var i,a,s=e(t),n=e.data(t,r);s.hasClass(this.markerClassName)&&(i=t.nodeName.toLowerCase(),"input"===i?(t.disabled=!0,n.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):("div"===i||"span"===i)&&(a=s.children("."+this._inlineClass),a.children().addClass("ui-state-disabled"),a.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=e.map(this._disabledInputs,function(e){return e===t?null:e}),this._disabledInputs[this._disabledInputs.length]=t)},_isDisabledDatepicker:function(e){if(!e)return!1;for(var t=0;this._disabledInputs.length>t;t++)if(this._disabledInputs[t]===e)return!0;return!1},_getInst:function(t){try{return e.data(t,r)}catch(i){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(i,a,n){var r,o,u,c,h=this._getInst(i);return 2===arguments.length&&"string"==typeof a?"defaults"===a?e.extend({},e.datepicker._defaults):h?"all"===a?e.extend({},h.settings):this._get(h,a):null:(r=a||{},"string"==typeof a&&(r={},r[a]=n),h&&(this._curInst===h&&this._hideDatepicker(),o=this._getDateDatepicker(i,!0),u=this._getMinMaxDate(h,"min"),c=this._getMinMaxDate(h,"max"),s(h.settings,r),null!==u&&r.dateFormat!==t&&r.minDate===t&&(h.settings.minDate=this._formatDate(h,u)),null!==c&&r.dateFormat!==t&&r.maxDate===t&&(h.settings.maxDate=this._formatDate(h,c)),"disabled"in r&&(r.disabled?this._disableDatepicker(i):this._enableDatepicker(i)),this._attachments(e(i),h),this._autoSize(h),this._setDate(h,o),this._updateAlternate(h),this._updateDatepicker(h)),t)},_changeDatepicker:function(e,t,i){this._optionDatepicker(e,t,i)},_refreshDatepicker:function(e){var t=this._getInst(e);t&&this._updateDatepicker(t)},_setDateDatepicker:function(e,t){var i=this._getInst(e);i&&(this._setDate(i,t),this._updateDatepicker(i),this._updateAlternate(i))},_getDateDatepicker:function(e,t){var i=this._getInst(e);return i&&!i.inline&&this._setDateFromField(i,t),i?this._getDate(i):null},_doKeyDown:function(t){var i,a,s,n=e.datepicker._getInst(t.target),r=!0,o=n.dpDiv.is(".ui-datepicker-rtl");if(n._keyEvent=!0,e.datepicker._datepickerShowing)switch(t.keyCode){case 9:e.datepicker._hideDatepicker(),r=!1;break;case 13:return s=e("td."+e.datepicker._dayOverClass+":not(."+e.datepicker._currentClass+")",n.dpDiv),s[0]&&e.datepicker._selectDay(t.target,n.selectedMonth,n.selectedYear,s[0]),i=e.datepicker._get(n,"onSelect"),i?(a=e.datepicker._formatDate(n),i.apply(n.input?n.input[0]:null,[a,n])):e.datepicker._hideDatepicker(),!1;case 27:e.datepicker._hideDatepicker();break;case 33:e.datepicker._adjustDate(t.target,t.ctrlKey?-e.datepicker._get(n,"stepBigMonths"):-e.datepicker._get(n,"stepMonths"),"M");break;case 34:e.datepicker._adjustDate(t.target,t.ctrlKey?+e.datepicker._get(n,"stepBigMonths"):+e.datepicker._get(n,"stepMonths"),"M");break;case 35:(t.ctrlKey||t.metaKey)&&e.datepicker._clearDate(t.target),r=t.ctrlKey||t.metaKey;break;case 36:(t.ctrlKey||t.metaKey)&&e.datepicker._gotoToday(t.target),r=t.ctrlKey||t.metaKey;break;case 37:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,o?1:-1,"D"),r=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&e.datepicker._adjustDate(t.target,t.ctrlKey?-e.datepicker._get(n,"stepBigMonths"):-e.datepicker._get(n,"stepMonths"),"M");break;case 38:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,-7,"D"),r=t.ctrlKey||t.metaKey;break;case 39:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,o?-1:1,"D"),r=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&e.datepicker._adjustDate(t.target,t.ctrlKey?+e.datepicker._get(n,"stepBigMonths"):+e.datepicker._get(n,"stepMonths"),"M");break;case 40:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,7,"D"),r=t.ctrlKey||t.metaKey;break;default:r=!1}else 36===t.keyCode&&t.ctrlKey?e.datepicker._showDatepicker(this):r=!1;r&&(t.preventDefault(),t.stopPropagation())},_doKeyPress:function(i){var a,s,n=e.datepicker._getInst(i.target);return e.datepicker._get(n,"constrainInput")?(a=e.datepicker._possibleChars(e.datepicker._get(n,"dateFormat")),s=String.fromCharCode(null==i.charCode?i.keyCode:i.charCode),i.ctrlKey||i.metaKey||" ">s||!a||a.indexOf(s)>-1):t},_doKeyUp:function(t){var i,a=e.datepicker._getInst(t.target);if(a.input.val()!==a.lastVal)try{i=e.datepicker.parseDate(e.datepicker._get(a,"dateFormat"),a.input?a.input.val():null,e.datepicker._getFormatConfig(a)),i&&(e.datepicker._setDateFromField(a),e.datepicker._updateAlternate(a),e.datepicker._updateDatepicker(a))}catch(s){}return!0},_showDatepicker:function(t){if(t=t.target||t,"input"!==t.nodeName.toLowerCase()&&(t=e("input",t.parentNode)[0]),!e.datepicker._isDisabledDatepicker(t)&&e.datepicker._lastInput!==t){var i,a,n,r,o,u,c;i=e.datepicker._getInst(t),e.datepicker._curInst&&e.datepicker._curInst!==i&&(e.datepicker._curInst.dpDiv.stop(!0,!0),i&&e.datepicker._datepickerShowing&&e.datepicker._hideDatepicker(e.datepicker._curInst.input[0])),a=e.datepicker._get(i,"beforeShow"),n=a?a.apply(t,[t,i]):{},n!==!1&&(s(i.settings,n),i.lastVal=null,e.datepicker._lastInput=t,e.datepicker._setDateFromField(i),e.datepicker._inDialog&&(t.value=""),e.datepicker._pos||(e.datepicker._pos=e.datepicker._findPos(t),e.datepicker._pos[1]+=t.offsetHeight),r=!1,e(t).parents().each(function(){return r|="fixed"===e(this).css("position"),!r}),o={left:e.datepicker._pos[0],top:e.datepicker._pos[1]},e.datepicker._pos=null,i.dpDiv.empty(),i.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),e.datepicker._updateDatepicker(i),o=e.datepicker._checkOffset(i,o,r),i.dpDiv.css({position:e.datepicker._inDialog&&e.blockUI?"static":r?"fixed":"absolute",display:"none",left:o.left+"px",top:o.top+"px"}),i.inline||(u=e.datepicker._get(i,"showAnim"),c=e.datepicker._get(i,"duration"),i.dpDiv.zIndex(e(t).zIndex()+1),e.datepicker._datepickerShowing=!0,e.effects&&e.effects.effect[u]?i.dpDiv.show(u,e.datepicker._get(i,"showOptions"),c):i.dpDiv[u||"show"](u?c:null),e.datepicker._shouldFocusInput(i)&&i.input.focus(),e.datepicker._curInst=i))}},_updateDatepicker:function(t){this.maxRows=4,n=t,t.dpDiv.empty().append(this._generateHTML(t)),this._attachHandlers(t),t.dpDiv.find("."+this._dayOverClass+" a").mouseover();var i,a=this._getNumberOfMonths(t),s=a[1],r=17;t.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),s>1&&t.dpDiv.addClass("ui-datepicker-multi-"+s).css("width",r*s+"em"),t.dpDiv[(1!==a[0]||1!==a[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),t.dpDiv[(this._get(t,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),t===e.datepicker._curInst&&e.datepicker._datepickerShowing&&e.datepicker._shouldFocusInput(t)&&t.input.focus(),t.yearshtml&&(i=t.yearshtml,setTimeout(function(){i===t.yearshtml&&t.yearshtml&&t.dpDiv.find("select.ui-datepicker-year:first").replaceWith(t.yearshtml),i=t.yearshtml=null},0))},_shouldFocusInput:function(e){return e.input&&e.input.is(":visible")&&!e.input.is(":disabled")&&!e.input.is(":focus")},_checkOffset:function(t,i,a){var s=t.dpDiv.outerWidth(),n=t.dpDiv.outerHeight(),r=t.input?t.input.outerWidth():0,o=t.input?t.input.outerHeight():0,u=document.documentElement.clientWidth+(a?0:e(document).scrollLeft()),c=document.documentElement.clientHeight+(a?0:e(document).scrollTop());return i.left-=this._get(t,"isRTL")?s-r:0,i.left-=a&&i.left===t.input.offset().left?e(document).scrollLeft():0,i.top-=a&&i.top===t.input.offset().top+o?e(document).scrollTop():0,i.left-=Math.min(i.left,i.left+s>u&&u>s?Math.abs(i.left+s-u):0),i.top-=Math.min(i.top,i.top+n>c&&c>n?Math.abs(n+o):0),i},_findPos:function(t){for(var i,a=this._getInst(t),s=this._get(a,"isRTL");t&&("hidden"===t.type||1!==t.nodeType||e.expr.filters.hidden(t));)t=t[s?"previousSibling":"nextSibling"];return i=e(t).offset(),[i.left,i.top]},_hideDatepicker:function(t){var i,a,s,n,o=this._curInst;!o||t&&o!==e.data(t,r)||this._datepickerShowing&&(i=this._get(o,"showAnim"),a=this._get(o,"duration"),s=function(){e.datepicker._tidyDialog(o)},e.effects&&(e.effects.effect[i]||e.effects[i])?o.dpDiv.hide(i,e.datepicker._get(o,"showOptions"),a,s):o.dpDiv["slideDown"===i?"slideUp":"fadeIn"===i?"fadeOut":"hide"](i?a:null,s),i||s(),this._datepickerShowing=!1,n=this._get(o,"onClose"),n&&n.apply(o.input?o.input[0]:null,[o.input?o.input.val():"",o]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),e.blockUI&&(e.unblockUI(),e("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(e){e.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(t){if(e.datepicker._curInst){var i=e(t.target),a=e.datepicker._getInst(i[0]);(i[0].id!==e.datepicker._mainDivId&&0===i.parents("#"+e.datepicker._mainDivId).length&&!i.hasClass(e.datepicker.markerClassName)&&!i.closest("."+e.datepicker._triggerClass).length&&e.datepicker._datepickerShowing&&(!e.datepicker._inDialog||!e.blockUI)||i.hasClass(e.datepicker.markerClassName)&&e.datepicker._curInst!==a)&&e.datepicker._hideDatepicker()}},_adjustDate:function(t,i,a){var s=e(t),n=this._getInst(s[0]);this._isDisabledDatepicker(s[0])||(this._adjustInstDate(n,i+("M"===a?this._get(n,"showCurrentAtPos"):0),a),this._updateDatepicker(n))},_gotoToday:function(t){var i,a=e(t),s=this._getInst(a[0]);this._get(s,"gotoCurrent")&&s.currentDay?(s.selectedDay=s.currentDay,s.drawMonth=s.selectedMonth=s.currentMonth,s.drawYear=s.selectedYear=s.currentYear):(i=new Date,s.selectedDay=i.getDate(),s.drawMonth=s.selectedMonth=i.getMonth(),s.drawYear=s.selectedYear=i.getFullYear()),this._notifyChange(s),this._adjustDate(a)},_selectMonthYear:function(t,i,a){var s=e(t),n=this._getInst(s[0]);n["selected"+("M"===a?"Month":"Year")]=n["draw"+("M"===a?"Month":"Year")]=parseInt(i.options[i.selectedIndex].value,10),this._notifyChange(n),this._adjustDate(s)},_selectDay:function(t,i,a,s){var n,r=e(t);e(s).hasClass(this._unselectableClass)||this._isDisabledDatepicker(r[0])||(n=this._getInst(r[0]),n.selectedDay=n.currentDay=e("a",s).html(),n.selectedMonth=n.currentMonth=i,n.selectedYear=n.currentYear=a,this._selectDate(t,this._formatDate(n,n.currentDay,n.currentMonth,n.currentYear)))},_clearDate:function(t){var i=e(t);this._selectDate(i,"")},_selectDate:function(t,i){var a,s=e(t),n=this._getInst(s[0]);i=null!=i?i:this._formatDate(n),n.input&&n.input.val(i),this._updateAlternate(n),a=this._get(n,"onSelect"),a?a.apply(n.input?n.input[0]:null,[i,n]):n.input&&n.input.trigger("change"),n.inline?this._updateDatepicker(n):(this._hideDatepicker(),this._lastInput=n.input[0],"object"!=typeof n.input[0]&&n.input.focus(),this._lastInput=null)},_updateAlternate:function(t){var i,a,s,n=this._get(t,"altField");n&&(i=this._get(t,"altFormat")||this._get(t,"dateFormat"),a=this._getDate(t),s=this.formatDate(i,a,this._getFormatConfig(t)),e(n).each(function(){e(this).val(s)}))},noWeekends:function(e){var t=e.getDay();return[t>0&&6>t,""]},iso8601Week:function(e){var t,i=new Date(e.getTime());return i.setDate(i.getDate()+4-(i.getDay()||7)),t=i.getTime(),i.setMonth(0),i.setDate(1),Math.floor(Math.round((t-i)/864e5)/7)+1},parseDate:function(i,a,s){if(null==i||null==a)throw"Invalid arguments";if(a="object"==typeof a?""+a:a+"",""===a)return null;var n,r,o,u,c=0,h=(s?s.shortYearCutoff:null)||this._defaults.shortYearCutoff,l="string"!=typeof h?h:(new Date).getFullYear()%100+parseInt(h,10),d=(s?s.dayNamesShort:null)||this._defaults.dayNamesShort,p=(s?s.dayNames:null)||this._defaults.dayNames,g=(s?s.monthNamesShort:null)||this._defaults.monthNamesShort,m=(s?s.monthNames:null)||this._defaults.monthNames,f=-1,_=-1,v=-1,k=-1,y=!1,b=function(e){var t=i.length>n+1&&i.charAt(n+1)===e;return t&&n++,t},D=function(e){var t=b(e),i="@"===e?14:"!"===e?20:"y"===e&&t?4:"o"===e?3:2,s=RegExp("^\\d{1,"+i+"}"),n=a.substring(c).match(s);if(!n)throw"Missing number at position "+c;return c+=n[0].length,parseInt(n[0],10)},w=function(i,s,n){var r=-1,o=e.map(b(i)?n:s,function(e,t){return[[t,e]]}).sort(function(e,t){return-(e[1].length-t[1].length)});if(e.each(o,function(e,i){var s=i[1];return a.substr(c,s.length).toLowerCase()===s.toLowerCase()?(r=i[0],c+=s.length,!1):t}),-1!==r)return r+1;throw"Unknown name at position "+c},M=function(){if(a.charAt(c)!==i.charAt(n))throw"Unexpected literal at position "+c;c++};for(n=0;i.length>n;n++)if(y)"'"!==i.charAt(n)||b("'")?M():y=!1;else switch(i.charAt(n)){case"d":v=D("d");break;case"D":w("D",d,p);break;case"o":k=D("o");break;case"m":_=D("m");break;case"M":_=w("M",g,m);break;case"y":f=D("y");break;case"@":u=new Date(D("@")),f=u.getFullYear(),_=u.getMonth()+1,v=u.getDate();break;case"!":u=new Date((D("!")-this._ticksTo1970)/1e4),f=u.getFullYear(),_=u.getMonth()+1,v=u.getDate();break;case"'":b("'")?M():y=!0;break;default:M()}if(a.length>c&&(o=a.substr(c),!/^\s+/.test(o)))throw"Extra/unparsed characters found in date: "+o;if(-1===f?f=(new Date).getFullYear():100>f&&(f+=(new Date).getFullYear()-(new Date).getFullYear()%100+(l>=f?0:-100)),k>-1)for(_=1,v=k;;){if(r=this._getDaysInMonth(f,_-1),r>=v)break;_++,v-=r}if(u=this._daylightSavingAdjust(new Date(f,_-1,v)),u.getFullYear()!==f||u.getMonth()+1!==_||u.getDate()!==v)throw"Invalid date";return u},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:1e7*60*60*24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925)),formatDate:function(e,t,i){if(!t)return"";var a,s=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,n=(i?i.dayNames:null)||this._defaults.dayNames,r=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,o=(i?i.monthNames:null)||this._defaults.monthNames,u=function(t){var i=e.length>a+1&&e.charAt(a+1)===t;return i&&a++,i},c=function(e,t,i){var a=""+t;if(u(e))for(;i>a.length;)a="0"+a;return a},h=function(e,t,i,a){return u(e)?a[t]:i[t]},l="",d=!1;if(t)for(a=0;e.length>a;a++)if(d)"'"!==e.charAt(a)||u("'")?l+=e.charAt(a):d=!1;else switch(e.charAt(a)){case"d":l+=c("d",t.getDate(),2);break;case"D":l+=h("D",t.getDay(),s,n);break;case"o":l+=c("o",Math.round((new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime()-new Date(t.getFullYear(),0,0).getTime())/864e5),3);break;case"m":l+=c("m",t.getMonth()+1,2);break;case"M":l+=h("M",t.getMonth(),r,o);break;case"y":l+=u("y")?t.getFullYear():(10>t.getYear()%100?"0":"")+t.getYear()%100;break;case"@":l+=t.getTime();break;case"!":l+=1e4*t.getTime()+this._ticksTo1970;break;case"'":u("'")?l+="'":d=!0;break;default:l+=e.charAt(a)}return l},_possibleChars:function(e){var t,i="",a=!1,s=function(i){var a=e.length>t+1&&e.charAt(t+1)===i;return a&&t++,a};for(t=0;e.length>t;t++)if(a)"'"!==e.charAt(t)||s("'")?i+=e.charAt(t):a=!1;else switch(e.charAt(t)){case"d":case"m":case"y":case"@":i+="0123456789";break;case"D":case"M":return null;case"'":s("'")?i+="'":a=!0;break;default:i+=e.charAt(t)}return i},_get:function(e,i){return e.settings[i]!==t?e.settings[i]:this._defaults[i]},_setDateFromField:function(e,t){if(e.input.val()!==e.lastVal){var i=this._get(e,"dateFormat"),a=e.lastVal=e.input?e.input.val():null,s=this._getDefaultDate(e),n=s,r=this._getFormatConfig(e);try{n=this.parseDate(i,a,r)||s}catch(o){a=t?"":a}e.selectedDay=n.getDate(),e.drawMonth=e.selectedMonth=n.getMonth(),e.drawYear=e.selectedYear=n.getFullYear(),e.currentDay=a?n.getDate():0,e.currentMonth=a?n.getMonth():0,e.currentYear=a?n.getFullYear():0,this._adjustInstDate(e)}},_getDefaultDate:function(e){return this._restrictMinMax(e,this._determineDate(e,this._get(e,"defaultDate"),new Date))},_determineDate:function(t,i,a){var s=function(e){var t=new Date;return t.setDate(t.getDate()+e),t},n=function(i){try{return e.datepicker.parseDate(e.datepicker._get(t,"dateFormat"),i,e.datepicker._getFormatConfig(t))}catch(a){}for(var s=(i.toLowerCase().match(/^c/)?e.datepicker._getDate(t):null)||new Date,n=s.getFullYear(),r=s.getMonth(),o=s.getDate(),u=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,c=u.exec(i);c;){switch(c[2]||"d"){case"d":case"D":o+=parseInt(c[1],10);break;case"w":case"W":o+=7*parseInt(c[1],10);break;case"m":case"M":r+=parseInt(c[1],10),o=Math.min(o,e.datepicker._getDaysInMonth(n,r));break;case"y":case"Y":n+=parseInt(c[1],10),o=Math.min(o,e.datepicker._getDaysInMonth(n,r))}c=u.exec(i)}return new Date(n,r,o)},r=null==i||""===i?a:"string"==typeof i?n(i):"number"==typeof i?isNaN(i)?a:s(i):new Date(i.getTime());return r=r&&"Invalid Date"==""+r?a:r,r&&(r.setHours(0),r.setMinutes(0),r.setSeconds(0),r.setMilliseconds(0)),this._daylightSavingAdjust(r)},_daylightSavingAdjust:function(e){return e?(e.setHours(e.getHours()>12?e.getHours()+2:0),e):null},_setDate:function(e,t,i){var a=!t,s=e.selectedMonth,n=e.selectedYear,r=this._restrictMinMax(e,this._determineDate(e,t,new Date));e.selectedDay=e.currentDay=r.getDate(),e.drawMonth=e.selectedMonth=e.currentMonth=r.getMonth(),e.drawYear=e.selectedYear=e.currentYear=r.getFullYear(),s===e.selectedMonth&&n===e.selectedYear||i||this._notifyChange(e),this._adjustInstDate(e),e.input&&e.input.val(a?"":this._formatDate(e))},_getDate:function(e){var t=!e.currentYear||e.input&&""===e.input.val()?null:this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));return t},_attachHandlers:function(t){var i=this._get(t,"stepMonths"),a="#"+t.id.replace(/\\\\/g,"\\");t.dpDiv.find("[data-handler]").map(function(){var t={prev:function(){e.datepicker._adjustDate(a,-i,"M")},next:function(){e.datepicker._adjustDate(a,+i,"M")},hide:function(){e.datepicker._hideDatepicker()},today:function(){e.datepicker._gotoToday(a)},selectDay:function(){return e.datepicker._selectDay(a,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return e.datepicker._selectMonthYear(a,this,"M"),!1},selectYear:function(){return e.datepicker._selectMonthYear(a,this,"Y"),!1}};e(this).bind(this.getAttribute("data-event"),t[this.getAttribute("data-handler")])})},_generateHTML:function(e){var t,i,a,s,n,r,o,u,c,h,l,d,p,g,m,f,_,v,k,y,b,D,w,M,C,x,I,N,T,A,E,S,Y,F,P,O,j,K,R,H=new Date,W=this._daylightSavingAdjust(new Date(H.getFullYear(),H.getMonth(),H.getDate())),L=this._get(e,"isRTL"),U=this._get(e,"showButtonPanel"),B=this._get(e,"hideIfNoPrevNext"),z=this._get(e,"navigationAsDateFormat"),q=this._getNumberOfMonths(e),G=this._get(e,"showCurrentAtPos"),J=this._get(e,"stepMonths"),Q=1!==q[0]||1!==q[1],V=this._daylightSavingAdjust(e.currentDay?new Date(e.currentYear,e.currentMonth,e.currentDay):new Date(9999,9,9)),$=this._getMinMaxDate(e,"min"),X=this._getMinMaxDate(e,"max"),Z=e.drawMonth-G,et=e.drawYear;if(0>Z&&(Z+=12,et--),X)for(t=this._daylightSavingAdjust(new Date(X.getFullYear(),X.getMonth()-q[0]*q[1]+1,X.getDate())),t=$&&$>t?$:t;this._daylightSavingAdjust(new Date(et,Z,1))>t;)Z--,0>Z&&(Z=11,et--);for(e.drawMonth=Z,e.drawYear=et,i=this._get(e,"prevText"),i=z?this.formatDate(i,this._daylightSavingAdjust(new Date(et,Z-J,1)),this._getFormatConfig(e)):i,a=this._canAdjustMonth(e,-1,et,Z)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(L?"e":"w")+"'>"+i+"</span></a>":B?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(L?"e":"w")+"'>"+i+"</span></a>",s=this._get(e,"nextText"),s=z?this.formatDate(s,this._daylightSavingAdjust(new Date(et,Z+J,1)),this._getFormatConfig(e)):s,n=this._canAdjustMonth(e,1,et,Z)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+s+"'><span class='ui-icon ui-icon-circle-triangle-"+(L?"w":"e")+"'>"+s+"</span></a>":B?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+s+"'><span class='ui-icon ui-icon-circle-triangle-"+(L?"w":"e")+"'>"+s+"</span></a>",r=this._get(e,"currentText"),o=this._get(e,"gotoCurrent")&&e.currentDay?V:W,r=z?this.formatDate(r,o,this._getFormatConfig(e)):r,u=e.inline?"":"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>"+this._get(e,"closeText")+"</button>",c=U?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(L?u:"")+(this._isInRange(e,o)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+r+"</button>":"")+(L?"":u)+"</div>":"",h=parseInt(this._get(e,"firstDay"),10),h=isNaN(h)?0:h,l=this._get(e,"showWeek"),d=this._get(e,"dayNames"),p=this._get(e,"dayNamesMin"),g=this._get(e,"monthNames"),m=this._get(e,"monthNamesShort"),f=this._get(e,"beforeShowDay"),_=this._get(e,"showOtherMonths"),v=this._get(e,"selectOtherMonths"),k=this._getDefaultDate(e),y="",D=0;q[0]>D;D++){for(w="",this.maxRows=4,M=0;q[1]>M;M++){if(C=this._daylightSavingAdjust(new Date(et,Z,e.selectedDay)),x=" ui-corner-all",I="",Q){if(I+="<div class='ui-datepicker-group",q[1]>1)switch(M){case 0:I+=" ui-datepicker-group-first",x=" ui-corner-"+(L?"right":"left");break;case q[1]-1:I+=" ui-datepicker-group-last",x=" ui-corner-"+(L?"left":"right");break;default:I+=" ui-datepicker-group-middle",x=""}I+="'>"}for(I+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+x+"'>"+(/all|left/.test(x)&&0===D?L?n:a:"")+(/all|right/.test(x)&&0===D?L?a:n:"")+this._generateMonthYearHeader(e,Z,et,$,X,D>0||M>0,g,m)+"</div><table class='ui-datepicker-calendar'><thead>"+"<tr>",N=l?"<th class='ui-datepicker-week-col'>"+this._get(e,"weekHeader")+"</th>":"",b=0;7>b;b++)T=(b+h)%7,N+="<th"+((b+h+6)%7>=5?" class='ui-datepicker-week-end'":"")+">"+"<span title='"+d[T]+"'>"+p[T]+"</span></th>";for(I+=N+"</tr></thead><tbody>",A=this._getDaysInMonth(et,Z),et===e.selectedYear&&Z===e.selectedMonth&&(e.selectedDay=Math.min(e.selectedDay,A)),E=(this._getFirstDayOfMonth(et,Z)-h+7)%7,S=Math.ceil((E+A)/7),Y=Q?this.maxRows>S?this.maxRows:S:S,this.maxRows=Y,F=this._daylightSavingAdjust(new Date(et,Z,1-E)),P=0;Y>P;P++){for(I+="<tr>",O=l?"<td class='ui-datepicker-week-col'>"+this._get(e,"calculateWeek")(F)+"</td>":"",b=0;7>b;b++)j=f?f.apply(e.input?e.input[0]:null,[F]):[!0,""],K=F.getMonth()!==Z,R=K&&!v||!j[0]||$&&$>F||X&&F>X,O+="<td class='"+((b+h+6)%7>=5?" ui-datepicker-week-end":"")+(K?" ui-datepicker-other-month":"")+(F.getTime()===C.getTime()&&Z===e.selectedMonth&&e._keyEvent||k.getTime()===F.getTime()&&k.getTime()===C.getTime()?" "+this._dayOverClass:"")+(R?" "+this._unselectableClass+" ui-state-disabled":"")+(K&&!_?"":" "+j[1]+(F.getTime()===V.getTime()?" "+this._currentClass:"")+(F.getTime()===W.getTime()?" ui-datepicker-today":""))+"'"+(K&&!_||!j[2]?"":" title='"+j[2].replace(/'/g,"&#39;")+"'")+(R?"":" data-handler='selectDay' data-event='click' data-month='"+F.getMonth()+"' data-year='"+F.getFullYear()+"'")+">"+(K&&!_?"&#xa0;":R?"<span class='ui-state-default'>"+F.getDate()+"</span>":"<a class='ui-state-default"+(F.getTime()===W.getTime()?" ui-state-highlight":"")+(F.getTime()===V.getTime()?" ui-state-active":"")+(K?" ui-priority-secondary":"")+"' href='#'>"+F.getDate()+"</a>")+"</td>",F.setDate(F.getDate()+1),F=this._daylightSavingAdjust(F);I+=O+"</tr>"}Z++,Z>11&&(Z=0,et++),I+="</tbody></table>"+(Q?"</div>"+(q[0]>0&&M===q[1]-1?"<div class='ui-datepicker-row-break'></div>":""):""),w+=I}y+=w}return y+=c,e._keyEvent=!1,y},_generateMonthYearHeader:function(e,t,i,a,s,n,r,o){var u,c,h,l,d,p,g,m,f=this._get(e,"changeMonth"),_=this._get(e,"changeYear"),v=this._get(e,"showMonthAfterYear"),k="<div class='ui-datepicker-title'>",y="";if(n||!f)y+="<span class='ui-datepicker-month'>"+r[t]+"</span>";else{for(u=a&&a.getFullYear()===i,c=s&&s.getFullYear()===i,y+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",h=0;12>h;h++)(!u||h>=a.getMonth())&&(!c||s.getMonth()>=h)&&(y+="<option value='"+h+"'"+(h===t?" selected='selected'":"")+">"+o[h]+"</option>");y+="</select>"}if(v||(k+=y+(!n&&f&&_?"":"&#xa0;")),!e.yearshtml)if(e.yearshtml="",n||!_)k+="<span class='ui-datepicker-year'>"+i+"</span>";else{for(l=this._get(e,"yearRange").split(":"),d=(new Date).getFullYear(),p=function(e){var t=e.match(/c[+\-].*/)?i+parseInt(e.substring(1),10):e.match(/[+\-].*/)?d+parseInt(e,10):parseInt(e,10);
7
return isNaN(t)?d:t},g=p(l[0]),m=Math.max(g,p(l[1]||"")),g=a?Math.max(g,a.getFullYear()):g,m=s?Math.min(m,s.getFullYear()):m,e.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";m>=g;g++)e.yearshtml+="<option value='"+g+"'"+(g===i?" selected='selected'":"")+">"+g+"</option>";e.yearshtml+="</select>",k+=e.yearshtml,e.yearshtml=null}return k+=this._get(e,"yearSuffix"),v&&(k+=(!n&&f&&_?"":"&#xa0;")+y),k+="</div>"},_adjustInstDate:function(e,t,i){var a=e.drawYear+("Y"===i?t:0),s=e.drawMonth+("M"===i?t:0),n=Math.min(e.selectedDay,this._getDaysInMonth(a,s))+("D"===i?t:0),r=this._restrictMinMax(e,this._daylightSavingAdjust(new Date(a,s,n)));e.selectedDay=r.getDate(),e.drawMonth=e.selectedMonth=r.getMonth(),e.drawYear=e.selectedYear=r.getFullYear(),("M"===i||"Y"===i)&&this._notifyChange(e)},_restrictMinMax:function(e,t){var i=this._getMinMaxDate(e,"min"),a=this._getMinMaxDate(e,"max"),s=i&&i>t?i:t;return a&&s>a?a:s},_notifyChange:function(e){var t=this._get(e,"onChangeMonthYear");t&&t.apply(e.input?e.input[0]:null,[e.selectedYear,e.selectedMonth+1,e])},_getNumberOfMonths:function(e){var t=this._get(e,"numberOfMonths");return null==t?[1,1]:"number"==typeof t?[1,t]:t},_getMinMaxDate:function(e,t){return this._determineDate(e,this._get(e,t+"Date"),null)},_getDaysInMonth:function(e,t){return 32-this._daylightSavingAdjust(new Date(e,t,32)).getDate()},_getFirstDayOfMonth:function(e,t){return new Date(e,t,1).getDay()},_canAdjustMonth:function(e,t,i,a){var s=this._getNumberOfMonths(e),n=this._daylightSavingAdjust(new Date(i,a+(0>t?t:s[0]*s[1]),1));return 0>t&&n.setDate(this._getDaysInMonth(n.getFullYear(),n.getMonth())),this._isInRange(e,n)},_isInRange:function(e,t){var i,a,s=this._getMinMaxDate(e,"min"),n=this._getMinMaxDate(e,"max"),r=null,o=null,u=this._get(e,"yearRange");return u&&(i=u.split(":"),a=(new Date).getFullYear(),r=parseInt(i[0],10),o=parseInt(i[1],10),i[0].match(/[+\-].*/)&&(r+=a),i[1].match(/[+\-].*/)&&(o+=a)),(!s||t.getTime()>=s.getTime())&&(!n||t.getTime()<=n.getTime())&&(!r||t.getFullYear()>=r)&&(!o||o>=t.getFullYear())},_getFormatConfig:function(e){var t=this._get(e,"shortYearCutoff");return t="string"!=typeof t?t:(new Date).getFullYear()%100+parseInt(t,10),{shortYearCutoff:t,dayNamesShort:this._get(e,"dayNamesShort"),dayNames:this._get(e,"dayNames"),monthNamesShort:this._get(e,"monthNamesShort"),monthNames:this._get(e,"monthNames")}},_formatDate:function(e,t,i,a){t||(e.currentDay=e.selectedDay,e.currentMonth=e.selectedMonth,e.currentYear=e.selectedYear);var s=t?"object"==typeof t?t:this._daylightSavingAdjust(new Date(a,i,t)):this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));return this.formatDate(this._get(e,"dateFormat"),s,this._getFormatConfig(e))}}),e.fn.datepicker=function(t){if(!this.length)return this;e.datepicker.initialized||(e(document).mousedown(e.datepicker._checkExternalClick),e.datepicker.initialized=!0),0===e("#"+e.datepicker._mainDivId).length&&e("body").append(e.datepicker.dpDiv);var i=Array.prototype.slice.call(arguments,1);return"string"!=typeof t||"isDisabled"!==t&&"getDate"!==t&&"widget"!==t?"option"===t&&2===arguments.length&&"string"==typeof arguments[1]?e.datepicker["_"+t+"Datepicker"].apply(e.datepicker,[this[0]].concat(i)):this.each(function(){"string"==typeof t?e.datepicker["_"+t+"Datepicker"].apply(e.datepicker,[this].concat(i)):e.datepicker._attachDatepicker(this,t)}):e.datepicker["_"+t+"Datepicker"].apply(e.datepicker,[this[0]].concat(i))},e.datepicker=new i,e.datepicker.initialized=!1,e.datepicker.uuid=(new Date).getTime(),e.datepicker.version="1.10.4"})(jQuery);(function(t){t.widget("ui.menu",{version:"1.10.4",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content ui-corner-all").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0}).bind("click"+this.eventNamespace,t.proxy(function(t){this.options.disabled&&t.preventDefault()},this)),this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true"),this._on({"mousedown .ui-menu-item > a":function(t){t.preventDefault()},"click .ui-state-disabled > a":function(t){t.preventDefault()},"click .ui-menu-item:has(a)":function(e){var i=t(e.target).closest(".ui-menu-item");!this.mouseHandled&&i.not(".ui-state-disabled").length&&(this.select(e),e.isPropagationStopped()||(this.mouseHandled=!0),i.has(".ui-menu").length?this.expand(e):!this.element.is(":focus")&&t(this.document[0].activeElement).closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(e){var i=t(e.currentTarget);i.siblings().children(".ui-state-active").removeClass("ui-state-active"),this.focus(e,i)},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var i=this.active||this.element.children(".ui-menu-item").eq(0);e||this.focus(t,i)},blur:function(e){this._delay(function(){t.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(e)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(e){t(e.target).closest(".ui-menu").length||this.collapseAll(e),this.mouseHandled=!1}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeClass("ui-menu ui-widget ui-widget-content ui-corner-all ui-menu-icons").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show(),this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").children("a").removeUniqueId().removeClass("ui-corner-all ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var e=t(this);e.data("ui-menu-submenu-carat")&&e.remove()}),this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(e){function i(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}var s,n,a,o,r,l=!0;switch(e.keyCode){case t.ui.keyCode.PAGE_UP:this.previousPage(e);break;case t.ui.keyCode.PAGE_DOWN:this.nextPage(e);break;case t.ui.keyCode.HOME:this._move("first","first",e);break;case t.ui.keyCode.END:this._move("last","last",e);break;case t.ui.keyCode.UP:this.previous(e);break;case t.ui.keyCode.DOWN:this.next(e);break;case t.ui.keyCode.LEFT:this.collapse(e);break;case t.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(e);break;case t.ui.keyCode.ENTER:case t.ui.keyCode.SPACE:this._activate(e);break;case t.ui.keyCode.ESCAPE:this.collapse(e);break;default:l=!1,n=this.previousFilter||"",a=String.fromCharCode(e.keyCode),o=!1,clearTimeout(this.filterTimer),a===n?o=!0:a=n+a,r=RegExp("^"+i(a),"i"),s=this.activeMenu.children(".ui-menu-item").filter(function(){return r.test(t(this).children("a").text())}),s=o&&-1!==s.index(this.active.next())?this.active.nextAll(".ui-menu-item"):s,s.length||(a=String.fromCharCode(e.keyCode),r=RegExp("^"+i(a),"i"),s=this.activeMenu.children(".ui-menu-item").filter(function(){return r.test(t(this).children("a").text())})),s.length?(this.focus(e,s),s.length>1?(this.previousFilter=a,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter):delete this.previousFilter}l&&e.preventDefault()},_activate:function(t){this.active.is(".ui-state-disabled")||(this.active.children("a[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var e,i=this.options.icons.submenu,s=this.element.find(this.options.menus);this.element.toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length),s.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-corner-all").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var e=t(this),s=e.prev("a"),n=t("<span>").addClass("ui-menu-icon ui-icon "+i).data("ui-menu-submenu-carat",!0);s.attr("aria-haspopup","true").prepend(n),e.attr("aria-labelledby",s.attr("id"))}),e=s.add(this.element),e.children(":not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","presentation").children("a").uniqueId().addClass("ui-corner-all").attr({tabIndex:-1,role:this._itemRole()}),e.children(":not(.ui-menu-item)").each(function(){var e=t(this);/[^\-\u2014\u2013\s]/.test(e.text())||e.addClass("ui-widget-content ui-menu-divider")}),e.children(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!t.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){"icons"===t&&this.element.find(".ui-menu-icon").removeClass(this.options.icons.submenu).addClass(e.submenu),this._super(t,e)},focus:function(t,e){var i,s;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),s=this.active.children("a").addClass("ui-state-focus"),this.options.role&&this.element.attr("aria-activedescendant",s.attr("id")),this.active.parent().closest(".ui-menu-item").children("a:first").addClass("ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),i=e.children(".ui-menu"),i.length&&t&&/^mouse/.test(t.type)&&this._startOpening(i),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(e){var i,s,n,a,o,r;this._hasScroll()&&(i=parseFloat(t.css(this.activeMenu[0],"borderTopWidth"))||0,s=parseFloat(t.css(this.activeMenu[0],"paddingTop"))||0,n=e.offset().top-this.activeMenu.offset().top-i-s,a=this.activeMenu.scrollTop(),o=this.activeMenu.height(),r=e.height(),0>n?this.activeMenu.scrollTop(a+n):n+r>o&&this.activeMenu.scrollTop(a+n-o+r))},blur:function(t,e){e||clearTimeout(this.timer),this.active&&(this.active.children("a").removeClass("ui-state-focus"),this.active=null,this._trigger("blur",t,{item:this.active}))},_startOpening:function(t){clearTimeout(this.timer),"true"===t.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(t)},this.delay))},_open:function(e){var i=t.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(e.parents(".ui-menu")).hide().attr("aria-hidden","true"),e.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(i)},collapseAll:function(e,i){clearTimeout(this.timer),this.timer=this._delay(function(){var s=i?this.element:t(e&&e.target).closest(this.element.find(".ui-menu"));s.length||(s=this.element),this._close(s),this.blur(e),this.activeMenu=s},this.delay)},_close:function(t){t||(t=this.active?this.active.parent():this.element),t.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false").end().find("a.ui-state-active").removeClass("ui-state-active")},collapse:function(t){var e=this.active&&this.active.parent().closest(".ui-menu-item",this.element);e&&e.length&&(this._close(),this.focus(t,e))},expand:function(t){var e=this.active&&this.active.children(".ui-menu ").children(".ui-menu-item").first();e&&e.length&&(this._open(e.parent()),this._delay(function(){this.focus(t,e)}))},next:function(t){this._move("next","first",t)},previous:function(t){this._move("prev","last",t)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(t,e,i){var s;this.active&&(s="first"===t||"last"===t?this.active["first"===t?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[t+"All"](".ui-menu-item").eq(0)),s&&s.length&&this.active||(s=this.activeMenu.children(".ui-menu-item")[e]()),this.focus(i,s)},nextPage:function(e){var i,s,n;return this.active?(this.isLastItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return i=t(this),0>i.offset().top-s-n}),this.focus(e,i)):this.focus(e,this.activeMenu.children(".ui-menu-item")[this.active?"last":"first"]())),undefined):(this.next(e),undefined)},previousPage:function(e){var i,s,n;return this.active?(this.isFirstItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return i=t(this),i.offset().top-s+n>0}),this.focus(e,i)):this.focus(e,this.activeMenu.children(".ui-menu-item").first())),undefined):(this.next(e),undefined)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(e){this.active=this.active||t(e.target).closest(".ui-menu-item");var i={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(e,!0),this._trigger("select",e,i)}})})(jQuery);(function(t,e){t.widget("ui.progressbar",{version:"1.10.4",options:{max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue(),this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min}),this.valueDiv=t("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element),this._refreshValue()},_destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.valueDiv.remove()},value:function(t){return t===e?this.options.value:(this.options.value=this._constrainedValue(t),this._refreshValue(),e)},_constrainedValue:function(t){return t===e&&(t=this.options.value),this.indeterminate=t===!1,"number"!=typeof t&&(t=0),this.indeterminate?!1:Math.min(this.options.max,Math.max(this.min,t))},_setOptions:function(t){var e=t.value;delete t.value,this._super(t),this.options.value=this._constrainedValue(e),this._refreshValue()},_setOption:function(t,e){"max"===t&&(e=Math.max(this.min,e)),this._super(t,e)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var e=this.options.value,i=this._percentage();this.valueDiv.toggle(this.indeterminate||e>this.min).toggleClass("ui-corner-right",e===this.options.max).width(i.toFixed(0)+"%"),this.element.toggleClass("ui-progressbar-indeterminate",this.indeterminate),this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=t("<div class='ui-progressbar-overlay'></div>").appendTo(this.valueDiv))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":e}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),this.oldValue!==e&&(this.oldValue=e,this._trigger("change")),e===this.options.max&&this._trigger("complete")}})})(jQuery);(function(t){var e=5;t.widget("ui.slider",t.ui.mouse,{version:"1.10.4",widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget"+" ui-widget-content"+" ui-corner-all"),this._refresh(),this._setOption("disabled",this.options.disabled),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var e,i,s=this.options,n=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),a="<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>",o=[];for(i=s.values&&s.values.length||1,n.length>i&&(n.slice(i).remove(),n=n.slice(0,i)),e=n.length;i>e;e++)o.push(a);this.handles=n.add(t(o.join("")).appendTo(this.element)),this.handle=this.handles.eq(0),this.handles.each(function(e){t(this).data("ui-slider-handle-index",e)})},_createRange:function(){var e=this.options,i="";e.range?(e.range===!0&&(e.values?e.values.length&&2!==e.values.length?e.values=[e.values[0],e.values[0]]:t.isArray(e.values)&&(e.values=e.values.slice(0)):e.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?this.range.removeClass("ui-slider-range-min ui-slider-range-max").css({left:"",bottom:""}):(this.range=t("<div></div>").appendTo(this.element),i="ui-slider-range ui-widget-header ui-corner-all"),this.range.addClass(i+("min"===e.range||"max"===e.range?" ui-slider-range-"+e.range:""))):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){var t=this.handles.add(this.range).filter("a");this._off(t),this._on(t,this._handleEvents),this._hoverable(t),this._focusable(t)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-widget ui-widget-content ui-corner-all"),this._mouseDestroy()},_mouseCapture:function(e){var i,s,n,a,o,r,l,h,u=this,c=this.options;return c.disabled?!1:(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),i={x:e.pageX,y:e.pageY},s=this._normValueFromMouse(i),n=this._valueMax()-this._valueMin()+1,this.handles.each(function(e){var i=Math.abs(s-u.values(e));(n>i||n===i&&(e===u._lastChangedValue||u.values(e)===c.min))&&(n=i,a=t(this),o=e)}),r=this._start(e,o),r===!1?!1:(this._mouseSliding=!0,this._handleIndex=o,a.addClass("ui-state-active").focus(),l=a.offset(),h=!t(e.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=h?{left:0,top:0}:{left:e.pageX-l.left-a.width()/2,top:e.pageY-l.top-a.height()/2-(parseInt(a.css("borderTopWidth"),10)||0)-(parseInt(a.css("borderBottomWidth"),10)||0)+(parseInt(a.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(e,o,s),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(t){var e={x:t.pageX,y:t.pageY},i=this._normValueFromMouse(e);return this._slide(t,this._handleIndex,i),!1},_mouseStop:function(t){return this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(t,this._handleIndex),this._change(t,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(t){var e,i,s,n,a;return"horizontal"===this.orientation?(e=this.elementSize.width,i=t.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(e=this.elementSize.height,i=t.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),s=i/e,s>1&&(s=1),0>s&&(s=0),"vertical"===this.orientation&&(s=1-s),n=this._valueMax()-this._valueMin(),a=this._valueMin()+s*n,this._trimAlignValue(a)},_start:function(t,e){var i={handle:this.handles[e],value:this.value()};return this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._trigger("start",t,i)},_slide:function(t,e,i){var s,n,a;this.options.values&&this.options.values.length?(s=this.values(e?0:1),2===this.options.values.length&&this.options.range===!0&&(0===e&&i>s||1===e&&s>i)&&(i=s),i!==this.values(e)&&(n=this.values(),n[e]=i,a=this._trigger("slide",t,{handle:this.handles[e],value:i,values:n}),s=this.values(e?0:1),a!==!1&&this.values(e,i))):i!==this.value()&&(a=this._trigger("slide",t,{handle:this.handles[e],value:i}),a!==!1&&this.value(i))},_stop:function(t,e){var i={handle:this.handles[e],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._trigger("stop",t,i)},_change:function(t,e){if(!this._keySliding&&!this._mouseSliding){var i={handle:this.handles[e],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._lastChangedValue=e,this._trigger("change",t,i)}},value:function(t){return arguments.length?(this.options.value=this._trimAlignValue(t),this._refreshValue(),this._change(null,0),undefined):this._value()},values:function(e,i){var s,n,a;if(arguments.length>1)return this.options.values[e]=this._trimAlignValue(i),this._refreshValue(),this._change(null,e),undefined;if(!arguments.length)return this._values();if(!t.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(e):this.value();for(s=this.options.values,n=arguments[0],a=0;s.length>a;a+=1)s[a]=this._trimAlignValue(n[a]),this._change(null,a);this._refreshValue()},_setOption:function(e,i){var s,n=0;switch("range"===e&&this.options.range===!0&&("min"===i?(this.options.value=this._values(0),this.options.values=null):"max"===i&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),t.isArray(this.options.values)&&(n=this.options.values.length),t.Widget.prototype._setOption.apply(this,arguments),e){case"orientation":this._detectOrientation(),this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation),this._refreshValue();break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),s=0;n>s;s+=1)this._change(null,s);this._animateOff=!1;break;case"min":case"max":this._animateOff=!0,this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_value:function(){var t=this.options.value;return t=this._trimAlignValue(t)},_values:function(t){var e,i,s;if(arguments.length)return e=this.options.values[t],e=this._trimAlignValue(e);if(this.options.values&&this.options.values.length){for(i=this.options.values.slice(),s=0;i.length>s;s+=1)i[s]=this._trimAlignValue(i[s]);return i}return[]},_trimAlignValue:function(t){if(this._valueMin()>=t)return this._valueMin();if(t>=this._valueMax())return this._valueMax();var e=this.options.step>0?this.options.step:1,i=(t-this._valueMin())%e,s=t-i;return 2*Math.abs(i)>=e&&(s+=i>0?e:-e),parseFloat(s.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var e,i,s,n,a,o=this.options.range,r=this.options,l=this,h=this._animateOff?!1:r.animate,u={};this.options.values&&this.options.values.length?this.handles.each(function(s){i=100*((l.values(s)-l._valueMin())/(l._valueMax()-l._valueMin())),u["horizontal"===l.orientation?"left":"bottom"]=i+"%",t(this).stop(1,1)[h?"animate":"css"](u,r.animate),l.options.range===!0&&("horizontal"===l.orientation?(0===s&&l.range.stop(1,1)[h?"animate":"css"]({left:i+"%"},r.animate),1===s&&l.range[h?"animate":"css"]({width:i-e+"%"},{queue:!1,duration:r.animate})):(0===s&&l.range.stop(1,1)[h?"animate":"css"]({bottom:i+"%"},r.animate),1===s&&l.range[h?"animate":"css"]({height:i-e+"%"},{queue:!1,duration:r.animate}))),e=i}):(s=this.value(),n=this._valueMin(),a=this._valueMax(),i=a!==n?100*((s-n)/(a-n)):0,u["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[h?"animate":"css"](u,r.animate),"min"===o&&"horizontal"===this.orientation&&this.range.stop(1,1)[h?"animate":"css"]({width:i+"%"},r.animate),"max"===o&&"horizontal"===this.orientation&&this.range[h?"animate":"css"]({width:100-i+"%"},{queue:!1,duration:r.animate}),"min"===o&&"vertical"===this.orientation&&this.range.stop(1,1)[h?"animate":"css"]({height:i+"%"},r.animate),"max"===o&&"vertical"===this.orientation&&this.range[h?"animate":"css"]({height:100-i+"%"},{queue:!1,duration:r.animate}))},_handleEvents:{keydown:function(i){var s,n,a,o,r=t(i.target).data("ui-slider-handle-index");switch(i.keyCode){case t.ui.keyCode.HOME:case t.ui.keyCode.END:case t.ui.keyCode.PAGE_UP:case t.ui.keyCode.PAGE_DOWN:case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(i.preventDefault(),!this._keySliding&&(this._keySliding=!0,t(i.target).addClass("ui-state-active"),s=this._start(i,r),s===!1))return}switch(o=this.options.step,n=a=this.options.values&&this.options.values.length?this.values(r):this.value(),i.keyCode){case t.ui.keyCode.HOME:a=this._valueMin();break;case t.ui.keyCode.END:a=this._valueMax();break;case t.ui.keyCode.PAGE_UP:a=this._trimAlignValue(n+(this._valueMax()-this._valueMin())/e);break;case t.ui.keyCode.PAGE_DOWN:a=this._trimAlignValue(n-(this._valueMax()-this._valueMin())/e);break;case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:if(n===this._valueMax())return;a=this._trimAlignValue(n+o);break;case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(n===this._valueMin())return;a=this._trimAlignValue(n-o)}this._slide(i,r,a)},click:function(t){t.preventDefault()},keyup:function(e){var i=t(e.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(e,i),this._change(e,i),t(e.target).removeClass("ui-state-active"))}}})})(jQuery);(function(t,e){function i(){return++n}function s(t){return t=t.cloneNode(!1),t.hash.length>1&&decodeURIComponent(t.href.replace(a,""))===decodeURIComponent(location.href.replace(a,""))}var n=0,a=/#.*$/;t.widget("ui.tabs",{version:"1.10.4",delay:300,options:{active:null,collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_create:function(){var e=this,i=this.options;this.running=!1,this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all").toggleClass("ui-tabs-collapsible",i.collapsible).delegate(".ui-tabs-nav > li","mousedown"+this.eventNamespace,function(e){t(this).is(".ui-state-disabled")&&e.preventDefault()}).delegate(".ui-tabs-anchor","focus"+this.eventNamespace,function(){t(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this._processTabs(),i.active=this._initialActive(),t.isArray(i.disabled)&&(i.disabled=t.unique(i.disabled.concat(t.map(this.tabs.filter(".ui-state-disabled"),function(t){return e.tabs.index(t)}))).sort()),this.active=this.options.active!==!1&&this.anchors.length?this._findActive(i.active):t(),this._refresh(),this.active.length&&this.load(i.active)},_initialActive:function(){var i=this.options.active,s=this.options.collapsible,n=location.hash.substring(1);return null===i&&(n&&this.tabs.each(function(s,a){return t(a).attr("aria-controls")===n?(i=s,!1):e}),null===i&&(i=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),(null===i||-1===i)&&(i=this.tabs.length?0:!1)),i!==!1&&(i=this.tabs.index(this.tabs.eq(i)),-1===i&&(i=s?!1:0)),!s&&i===!1&&this.anchors.length&&(i=0),i},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):t()}},_tabKeydown:function(i){var s=t(this.document[0].activeElement).closest("li"),n=this.tabs.index(s),a=!0;if(!this._handlePageNav(i)){switch(i.keyCode){case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:n++;break;case t.ui.keyCode.UP:case t.ui.keyCode.LEFT:a=!1,n--;break;case t.ui.keyCode.END:n=this.anchors.length-1;break;case t.ui.keyCode.HOME:n=0;break;case t.ui.keyCode.SPACE:return i.preventDefault(),clearTimeout(this.activating),this._activate(n),e;case t.ui.keyCode.ENTER:return i.preventDefault(),clearTimeout(this.activating),this._activate(n===this.options.active?!1:n),e;default:return}i.preventDefault(),clearTimeout(this.activating),n=this._focusNextTab(n,a),i.ctrlKey||(s.attr("aria-selected","false"),this.tabs.eq(n).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",n)},this.delay))}},_panelKeydown:function(e){this._handlePageNav(e)||e.ctrlKey&&e.keyCode===t.ui.keyCode.UP&&(e.preventDefault(),this.active.focus())},_handlePageNav:function(i){return i.altKey&&i.keyCode===t.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):i.altKey&&i.keyCode===t.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):e},_findNextTab:function(e,i){function s(){return e>n&&(e=0),0>e&&(e=n),e}for(var n=this.tabs.length-1;-1!==t.inArray(s(),this.options.disabled);)e=i?e+1:e-1;return e},_focusNextTab:function(t,e){return t=this._findNextTab(t,e),this.tabs.eq(t).focus(),t},_setOption:function(t,i){return"active"===t?(this._activate(i),e):"disabled"===t?(this._setupDisabled(i),e):(this._super(t,i),"collapsible"===t&&(this.element.toggleClass("ui-tabs-collapsible",i),i||this.options.active!==!1||this._activate(0)),"event"===t&&this._setupEvents(i),"heightStyle"===t&&this._setupHeightStyle(i),e)},_tabId:function(t){return t.attr("aria-controls")||"ui-tabs-"+i()},_sanitizeSelector:function(t){return t?t.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var e=this.options,i=this.tablist.children(":has(a[href])");e.disabled=t.map(i.filter(".ui-state-disabled"),function(t){return i.index(t)}),this._processTabs(),e.active!==!1&&this.anchors.length?this.active.length&&!t.contains(this.tablist[0],this.active[0])?this.tabs.length===e.disabled.length?(e.active=!1,this.active=t()):this._activate(this._findNextTab(Math.max(0,e.active-1),!1)):e.active=this.tabs.index(this.active):(e.active=!1,this.active=t()),this._refresh()},_refresh:function(){this._setupDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-expanded":"false","aria-hidden":"true"}),this.active.length?(this.active.addClass("ui-tabs-active ui-state-active").attr({"aria-selected":"true",tabIndex:0}),this._getPanelForTab(this.active).show().attr({"aria-expanded":"true","aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var e=this;this.tablist=this._getList().addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").attr("role","tablist"),this.tabs=this.tablist.find("> li:has(a[href])").addClass("ui-state-default ui-corner-top").attr({role:"tab",tabIndex:-1}),this.anchors=this.tabs.map(function(){return t("a",this)[0]}).addClass("ui-tabs-anchor").attr({role:"presentation",tabIndex:-1}),this.panels=t(),this.anchors.each(function(i,n){var a,o,r,h=t(n).uniqueId().attr("id"),l=t(n).closest("li"),c=l.attr("aria-controls");s(n)?(a=n.hash,o=e.element.find(e._sanitizeSelector(a))):(r=e._tabId(l),a="#"+r,o=e.element.find(a),o.length||(o=e._createPanel(r),o.insertAfter(e.panels[i-1]||e.tablist)),o.attr("aria-live","polite")),o.length&&(e.panels=e.panels.add(o)),c&&l.data("ui-tabs-aria-controls",c),l.attr({"aria-controls":a.substring(1),"aria-labelledby":h}),o.attr("aria-labelledby",h)}),this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").attr("role","tabpanel")},_getList:function(){return this.tablist||this.element.find("ol,ul").eq(0)},_createPanel:function(e){return t("<div>").attr("id",e).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy",!0)},_setupDisabled:function(e){t.isArray(e)&&(e.length?e.length===this.anchors.length&&(e=!0):e=!1);for(var i,s=0;i=this.tabs[s];s++)e===!0||-1!==t.inArray(s,e)?t(i).addClass("ui-state-disabled").attr("aria-disabled","true"):t(i).removeClass("ui-state-disabled").removeAttr("aria-disabled");this.options.disabled=e},_setupEvents:function(e){var i={click:function(t){t.preventDefault()}};e&&t.each(e.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(this.anchors,i),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(e){var i,s=this.element.parent();"fill"===e?(i=s.height(),i-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var e=t(this),s=e.css("position");"absolute"!==s&&"fixed"!==s&&(i-=e.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){i-=t(this).outerHeight(!0)}),this.panels.each(function(){t(this).height(Math.max(0,i-t(this).innerHeight()+t(this).height()))}).css("overflow","auto")):"auto"===e&&(i=0,this.panels.each(function(){i=Math.max(i,t(this).height("").height())}).height(i))},_eventHandler:function(e){var i=this.options,s=this.active,n=t(e.currentTarget),a=n.closest("li"),o=a[0]===s[0],r=o&&i.collapsible,h=r?t():this._getPanelForTab(a),l=s.length?this._getPanelForTab(s):t(),c={oldTab:s,oldPanel:l,newTab:r?t():a,newPanel:h};e.preventDefault(),a.hasClass("ui-state-disabled")||a.hasClass("ui-tabs-loading")||this.running||o&&!i.collapsible||this._trigger("beforeActivate",e,c)===!1||(i.active=r?!1:this.tabs.index(a),this.active=o?t():a,this.xhr&&this.xhr.abort(),l.length||h.length||t.error("jQuery UI Tabs: Mismatching fragment identifier."),h.length&&this.load(this.tabs.index(a),e),this._toggle(e,c))},_toggle:function(e,i){function s(){a.running=!1,a._trigger("activate",e,i)}function n(){i.newTab.closest("li").addClass("ui-tabs-active ui-state-active"),o.length&&a.options.show?a._show(o,a.options.show,s):(o.show(),s())}var a=this,o=i.newPanel,r=i.oldPanel;this.running=!0,r.length&&this.options.hide?this._hide(r,this.options.hide,function(){i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),n()}):(i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),r.hide(),n()),r.attr({"aria-expanded":"false","aria-hidden":"true"}),i.oldTab.attr("aria-selected","false"),o.length&&r.length?i.oldTab.attr("tabIndex",-1):o.length&&this.tabs.filter(function(){return 0===t(this).attr("tabIndex")}).attr("tabIndex",-1),o.attr({"aria-expanded":"true","aria-hidden":"false"}),i.newTab.attr({"aria-selected":"true",tabIndex:0})},_activate:function(e){var i,s=this._findActive(e);s[0]!==this.active[0]&&(s.length||(s=this.active),i=s.find(".ui-tabs-anchor")[0],this._eventHandler({target:i,currentTarget:i,preventDefault:t.noop}))},_findActive:function(e){return e===!1?t():this.tabs.eq(e)},_getIndex:function(t){return"string"==typeof t&&(t=this.anchors.index(this.anchors.filter("[href$='"+t+"']"))),t},_destroy:function(){this.xhr&&this.xhr.abort(),this.element.removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible"),this.tablist.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").removeAttr("role"),this.anchors.removeClass("ui-tabs-anchor").removeAttr("role").removeAttr("tabIndex").removeUniqueId(),this.tabs.add(this.panels).each(function(){t.data(this,"ui-tabs-destroy")?t(this).remove():t(this).removeClass("ui-state-default ui-state-active ui-state-disabled ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel").removeAttr("tabIndex").removeAttr("aria-live").removeAttr("aria-busy").removeAttr("aria-selected").removeAttr("aria-labelledby").removeAttr("aria-hidden").removeAttr("aria-expanded").removeAttr("role")}),this.tabs.each(function(){var e=t(this),i=e.data("ui-tabs-aria-controls");i?e.attr("aria-controls",i).removeData("ui-tabs-aria-controls"):e.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(i){var s=this.options.disabled;s!==!1&&(i===e?s=!1:(i=this._getIndex(i),s=t.isArray(s)?t.map(s,function(t){return t!==i?t:null}):t.map(this.tabs,function(t,e){return e!==i?e:null})),this._setupDisabled(s))},disable:function(i){var s=this.options.disabled;if(s!==!0){if(i===e)s=!0;else{if(i=this._getIndex(i),-1!==t.inArray(i,s))return;s=t.isArray(s)?t.merge([i],s).sort():[i]}this._setupDisabled(s)}},load:function(e,i){e=this._getIndex(e);var n=this,a=this.tabs.eq(e),o=a.find(".ui-tabs-anchor"),r=this._getPanelForTab(a),h={tab:a,panel:r};s(o[0])||(this.xhr=t.ajax(this._ajaxSettings(o,i,h)),this.xhr&&"canceled"!==this.xhr.statusText&&(a.addClass("ui-tabs-loading"),r.attr("aria-busy","true"),this.xhr.success(function(t){setTimeout(function(){r.html(t),n._trigger("load",i,h)},1)}).complete(function(t,e){setTimeout(function(){"abort"===e&&n.panels.stop(!1,!0),a.removeClass("ui-tabs-loading"),r.removeAttr("aria-busy"),t===n.xhr&&delete n.xhr},1)})))},_ajaxSettings:function(e,i,s){var n=this;return{url:e.attr("href"),beforeSend:function(e,a){return n._trigger("beforeLoad",i,t.extend({jqXHR:e,ajaxSettings:a},s))}}},_getPanelForTab:function(e){var i=t(e).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+i))}})})(jQuery);(function(t,e){var i="ui-effects-";t.effects={effect:{}},function(t,e){function i(t,e,i){var s=u[e.type]||{};return null==t?i||!e.def?null:e.def:(t=s.floor?~~t:parseFloat(t),isNaN(t)?e.def:s.mod?(t+s.mod)%s.mod:0>t?0:t>s.max?s.max:t)}function s(i){var s=h(),n=s._rgba=[];return i=i.toLowerCase(),f(l,function(t,a){var o,r=a.re.exec(i),l=r&&a.parse(r),h=a.space||"rgba";return l?(o=s[h](l),s[c[h].cache]=o[c[h].cache],n=s._rgba=o._rgba,!1):e}),n.length?("0,0,0,0"===n.join()&&t.extend(n,a.transparent),s):a[i]}function n(t,e,i){return i=(i+1)%1,1>6*i?t+6*(e-t)*i:1>2*i?e:2>3*i?t+6*(e-t)*(2/3-i):t}var a,o="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",r=/^([\-+])=\s*(\d+\.?\d*)/,l=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[t[1],t[2],t[3],t[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[2.55*t[1],2.55*t[2],2.55*t[3],t[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(t){return[t[1],t[2]/100,t[3]/100,t[4]]}}],h=t.Color=function(e,i,s,n){return new t.Color.fn.parse(e,i,s,n)},c={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},u={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},d=h.support={},p=t("<p>")[0],f=t.each;p.style.cssText="background-color:rgba(1,1,1,.5)",d.rgba=p.style.backgroundColor.indexOf("rgba")>-1,f(c,function(t,e){e.cache="_"+t,e.props.alpha={idx:3,type:"percent",def:1}}),h.fn=t.extend(h.prototype,{parse:function(n,o,r,l){if(n===e)return this._rgba=[null,null,null,null],this;(n.jquery||n.nodeType)&&(n=t(n).css(o),o=e);var u=this,d=t.type(n),p=this._rgba=[];return o!==e&&(n=[n,o,r,l],d="array"),"string"===d?this.parse(s(n)||a._default):"array"===d?(f(c.rgba.props,function(t,e){p[e.idx]=i(n[e.idx],e)}),this):"object"===d?(n instanceof h?f(c,function(t,e){n[e.cache]&&(u[e.cache]=n[e.cache].slice())}):f(c,function(e,s){var a=s.cache;f(s.props,function(t,e){if(!u[a]&&s.to){if("alpha"===t||null==n[t])return;u[a]=s.to(u._rgba)}u[a][e.idx]=i(n[t],e,!0)}),u[a]&&0>t.inArray(null,u[a].slice(0,3))&&(u[a][3]=1,s.from&&(u._rgba=s.from(u[a])))}),this):e},is:function(t){var i=h(t),s=!0,n=this;return f(c,function(t,a){var o,r=i[a.cache];return r&&(o=n[a.cache]||a.to&&a.to(n._rgba)||[],f(a.props,function(t,i){return null!=r[i.idx]?s=r[i.idx]===o[i.idx]:e})),s}),s},_space:function(){var t=[],e=this;return f(c,function(i,s){e[s.cache]&&t.push(i)}),t.pop()},transition:function(t,e){var s=h(t),n=s._space(),a=c[n],o=0===this.alpha()?h("transparent"):this,r=o[a.cache]||a.to(o._rgba),l=r.slice();return s=s[a.cache],f(a.props,function(t,n){var a=n.idx,o=r[a],h=s[a],c=u[n.type]||{};null!==h&&(null===o?l[a]=h:(c.mod&&(h-o>c.mod/2?o+=c.mod:o-h>c.mod/2&&(o-=c.mod)),l[a]=i((h-o)*e+o,n)))}),this[n](l)},blend:function(e){if(1===this._rgba[3])return this;var i=this._rgba.slice(),s=i.pop(),n=h(e)._rgba;return h(t.map(i,function(t,e){return(1-s)*n[e]+s*t}))},toRgbaString:function(){var e="rgba(",i=t.map(this._rgba,function(t,e){return null==t?e>2?1:0:t});return 1===i[3]&&(i.pop(),e="rgb("),e+i.join()+")"},toHslaString:function(){var e="hsla(",i=t.map(this.hsla(),function(t,e){return null==t&&(t=e>2?1:0),e&&3>e&&(t=Math.round(100*t)+"%"),t});return 1===i[3]&&(i.pop(),e="hsl("),e+i.join()+")"},toHexString:function(e){var i=this._rgba.slice(),s=i.pop();return e&&i.push(~~(255*s)),"#"+t.map(i,function(t){return t=(t||0).toString(16),1===t.length?"0"+t:t}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),h.fn.parse.prototype=h.fn,c.hsla.to=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e,i,s=t[0]/255,n=t[1]/255,a=t[2]/255,o=t[3],r=Math.max(s,n,a),l=Math.min(s,n,a),h=r-l,c=r+l,u=.5*c;return e=l===r?0:s===r?60*(n-a)/h+360:n===r?60*(a-s)/h+120:60*(s-n)/h+240,i=0===h?0:.5>=u?h/c:h/(2-c),[Math.round(e)%360,i,u,null==o?1:o]},c.hsla.from=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e=t[0]/360,i=t[1],s=t[2],a=t[3],o=.5>=s?s*(1+i):s+i-s*i,r=2*s-o;return[Math.round(255*n(r,o,e+1/3)),Math.round(255*n(r,o,e)),Math.round(255*n(r,o,e-1/3)),a]},f(c,function(s,n){var a=n.props,o=n.cache,l=n.to,c=n.from;h.fn[s]=function(s){if(l&&!this[o]&&(this[o]=l(this._rgba)),s===e)return this[o].slice();var n,r=t.type(s),u="array"===r||"object"===r?s:arguments,d=this[o].slice();return f(a,function(t,e){var s=u["object"===r?t:e.idx];null==s&&(s=d[e.idx]),d[e.idx]=i(s,e)}),c?(n=h(c(d)),n[o]=d,n):h(d)},f(a,function(e,i){h.fn[e]||(h.fn[e]=function(n){var a,o=t.type(n),l="alpha"===e?this._hsla?"hsla":"rgba":s,h=this[l](),c=h[i.idx];return"undefined"===o?c:("function"===o&&(n=n.call(this,c),o=t.type(n)),null==n&&i.empty?this:("string"===o&&(a=r.exec(n),a&&(n=c+parseFloat(a[2])*("+"===a[1]?1:-1))),h[i.idx]=n,this[l](h)))})})}),h.hook=function(e){var i=e.split(" ");f(i,function(e,i){t.cssHooks[i]={set:function(e,n){var a,o,r="";if("transparent"!==n&&("string"!==t.type(n)||(a=s(n)))){if(n=h(a||n),!d.rgba&&1!==n._rgba[3]){for(o="backgroundColor"===i?e.parentNode:e;(""===r||"transparent"===r)&&o&&o.style;)try{r=t.css(o,"backgroundColor"),o=o.parentNode}catch(l){}n=n.blend(r&&"transparent"!==r?r:"_default")}n=n.toRgbaString()}try{e.style[i]=n}catch(l){}}},t.fx.step[i]=function(e){e.colorInit||(e.start=h(e.elem,i),e.end=h(e.end),e.colorInit=!0),t.cssHooks[i].set(e.elem,e.start.transition(e.end,e.pos))}})},h.hook(o),t.cssHooks.borderColor={expand:function(t){var e={};return f(["Top","Right","Bottom","Left"],function(i,s){e["border"+s+"Color"]=t}),e}},a=t.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(jQuery),function(){function i(e){var i,s,n=e.ownerDocument.defaultView?e.ownerDocument.defaultView.getComputedStyle(e,null):e.currentStyle,a={};if(n&&n.length&&n[0]&&n[n[0]])for(s=n.length;s--;)i=n[s],"string"==typeof n[i]&&(a[t.camelCase(i)]=n[i]);else for(i in n)"string"==typeof n[i]&&(a[i]=n[i]);return a}function s(e,i){var s,n,o={};for(s in i)n=i[s],e[s]!==n&&(a[s]||(t.fx.step[s]||!isNaN(parseFloat(n)))&&(o[s]=n));return o}var n=["add","remove","toggle"],a={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};t.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(e,i){t.fx.step[i]=function(t){("none"!==t.end&&!t.setAttr||1===t.pos&&!t.setAttr)&&(jQuery.style(t.elem,i,t.end),t.setAttr=!0)}}),t.fn.addBack||(t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t.effects.animateClass=function(e,a,o,r){var l=t.speed(a,o,r);return this.queue(function(){var a,o=t(this),r=o.attr("class")||"",h=l.children?o.find("*").addBack():o;h=h.map(function(){var e=t(this);return{el:e,start:i(this)}}),a=function(){t.each(n,function(t,i){e[i]&&o[i+"Class"](e[i])})},a(),h=h.map(function(){return this.end=i(this.el[0]),this.diff=s(this.start,this.end),this}),o.attr("class",r),h=h.map(function(){var e=this,i=t.Deferred(),s=t.extend({},l,{queue:!1,complete:function(){i.resolve(e)}});return this.el.animate(this.diff,s),i.promise()}),t.when.apply(t,h.get()).done(function(){a(),t.each(arguments,function(){var e=this.el;t.each(this.diff,function(t){e.css(t,"")})}),l.complete.call(o[0])})})},t.fn.extend({addClass:function(e){return function(i,s,n,a){return s?t.effects.animateClass.call(this,{add:i},s,n,a):e.apply(this,arguments)}}(t.fn.addClass),removeClass:function(e){return function(i,s,n,a){return arguments.length>1?t.effects.animateClass.call(this,{remove:i},s,n,a):e.apply(this,arguments)}}(t.fn.removeClass),toggleClass:function(i){return function(s,n,a,o,r){return"boolean"==typeof n||n===e?a?t.effects.animateClass.call(this,n?{add:s}:{remove:s},a,o,r):i.apply(this,arguments):t.effects.animateClass.call(this,{toggle:s},n,a,o)}}(t.fn.toggleClass),switchClass:function(e,i,s,n,a){return t.effects.animateClass.call(this,{add:i,remove:e},s,n,a)}})}(),function(){function s(e,i,s,n){return t.isPlainObject(e)&&(i=e,e=e.effect),e={effect:e},null==i&&(i={}),t.isFunction(i)&&(n=i,s=null,i={}),("number"==typeof i||t.fx.speeds[i])&&(n=s,s=i,i={}),t.isFunction(s)&&(n=s,s=null),i&&t.extend(e,i),s=s||i.duration,e.duration=t.fx.off?0:"number"==typeof s?s:s in t.fx.speeds?t.fx.speeds[s]:t.fx.speeds._default,e.complete=n||i.complete,e}function n(e){return!e||"number"==typeof e||t.fx.speeds[e]?!0:"string"!=typeof e||t.effects.effect[e]?t.isFunction(e)?!0:"object"!=typeof e||e.effect?!1:!0:!0}t.extend(t.effects,{version:"1.10.4",save:function(t,e){for(var s=0;e.length>s;s++)null!==e[s]&&t.data(i+e[s],t[0].style[e[s]])},restore:function(t,s){var n,a;for(a=0;s.length>a;a++)null!==s[a]&&(n=t.data(i+s[a]),n===e&&(n=""),t.css(s[a],n))},setMode:function(t,e){return"toggle"===e&&(e=t.is(":hidden")?"show":"hide"),e},getBaseline:function(t,e){var i,s;switch(t[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=t[0]/e.height}switch(t[1]){case"left":s=0;break;case"center":s=.5;break;case"right":s=1;break;default:s=t[1]/e.width}return{x:s,y:i}},createWrapper:function(e){if(e.parent().is(".ui-effects-wrapper"))return e.parent();var i={width:e.outerWidth(!0),height:e.outerHeight(!0),"float":e.css("float")},s=t("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),n={width:e.width(),height:e.height()},a=document.activeElement;try{a.id}catch(o){a=document.body}return e.wrap(s),(e[0]===a||t.contains(e[0],a))&&t(a).focus(),s=e.parent(),"static"===e.css("position")?(s.css({position:"relative"}),e.css({position:"relative"})):(t.extend(i,{position:e.css("position"),zIndex:e.css("z-index")}),t.each(["top","left","bottom","right"],function(t,s){i[s]=e.css(s),isNaN(parseInt(i[s],10))&&(i[s]="auto")}),e.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),e.css(n),s.css(i).show()},removeWrapper:function(e){var i=document.activeElement;return e.parent().is(".ui-effects-wrapper")&&(e.parent().replaceWith(e),(e[0]===i||t.contains(e[0],i))&&t(i).focus()),e},setTransition:function(e,i,s,n){return n=n||{},t.each(i,function(t,i){var a=e.cssUnit(i);a[0]>0&&(n[i]=a[0]*s+a[1])}),n}}),t.fn.extend({effect:function(){function e(e){function s(){t.isFunction(a)&&a.call(n[0]),t.isFunction(e)&&e()}var n=t(this),a=i.complete,r=i.mode;(n.is(":hidden")?"hide"===r:"show"===r)?(n[r](),s()):o.call(n[0],i,s)}var i=s.apply(this,arguments),n=i.mode,a=i.queue,o=t.effects.effect[i.effect];return t.fx.off||!o?n?this[n](i.duration,i.complete):this.each(function(){i.complete&&i.complete.call(this)}):a===!1?this.each(e):this.queue(a||"fx",e)},show:function(t){return function(e){if(n(e))return t.apply(this,arguments);var i=s.apply(this,arguments);return i.mode="show",this.effect.call(this,i)}}(t.fn.show),hide:function(t){return function(e){if(n(e))return t.apply(this,arguments);var i=s.apply(this,arguments);return i.mode="hide",this.effect.call(this,i)}}(t.fn.hide),toggle:function(t){return function(e){if(n(e)||"boolean"==typeof e)return t.apply(this,arguments);var i=s.apply(this,arguments);return i.mode="toggle",this.effect.call(this,i)}}(t.fn.toggle),cssUnit:function(e){var i=this.css(e),s=[];return t.each(["em","px","%","pt"],function(t,e){i.indexOf(e)>0&&(s=[parseFloat(i),e])}),s}})}(),function(){var e={};t.each(["Quad","Cubic","Quart","Quint","Expo"],function(t,i){e[i]=function(e){return Math.pow(e,t+2)}}),t.extend(e,{Sine:function(t){return 1-Math.cos(t*Math.PI/2)},Circ:function(t){return 1-Math.sqrt(1-t*t)},Elastic:function(t){return 0===t||1===t?t:-Math.pow(2,8*(t-1))*Math.sin((80*(t-1)-7.5)*Math.PI/15)},Back:function(t){return t*t*(3*t-2)},Bounce:function(t){for(var e,i=4;((e=Math.pow(2,--i))-1)/11>t;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*e-2)/22-t,2)}}),t.each(e,function(e,i){t.easing["easeIn"+e]=i,t.easing["easeOut"+e]=function(t){return 1-i(1-t)},t.easing["easeInOut"+e]=function(t){return.5>t?i(2*t)/2:1-i(-2*t+2)/2}})}()})(jQuery);(function(t){t.effects.effect.highlight=function(e,i){var s=t(this),n=["backgroundImage","backgroundColor","opacity"],a=t.effects.setMode(s,e.mode||"show"),o={backgroundColor:s.css("backgroundColor")};"hide"===a&&(o.opacity=0),t.effects.save(s,n),s.show().css({backgroundImage:"none",backgroundColor:e.color||"#ffff99"}).animate(o,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===a&&s.hide(),t.effects.restore(s,n),i()}})}})(jQuery);
(-)a/koha-tmpl/intranet-tmpl/lib/jquery/jquery.js (-4 lines)
Lines 1-4 Link Here
1
/*! jQuery v1.7.2 jquery.com | jquery.org/license */
2
(function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cu(a){if(!cj[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){ck||(ck=c.createElement("iframe"),ck.frameBorder=ck.width=ck.height=0),b.appendChild(ck);if(!cl||!ck.createElement)cl=(ck.contentWindow||ck.contentDocument).document,cl.write((f.support.boxModel?"<!doctype html>":"")+"<html><body>"),cl.close();d=cl.createElement(a),cl.body.appendChild(d),e=f.css(d,"display"),b.removeChild(ck)}cj[a]=e}return cj[a]}function ct(a,b){var c={};f.each(cp.concat.apply([],cp.slice(0,b)),function(){c[this]=a});return c}function cs(){cq=b}function cr(){setTimeout(cs,0);return cq=f.now()}function ci(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ch(){try{return new a.XMLHttpRequest}catch(b){}}function cb(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g<i;g++){if(g===1)for(h in a.converters)typeof h=="string"&&(e[h.toLowerCase()]=a.converters[h]);l=k,k=d[g];if(k==="*")k=l;else if(l!=="*"&&l!==k){m=l+" "+k,n=e[m]||e["* "+k];if(!n){p=b;for(o in e){j=o.split(" ");if(j[0]===l||j[0]==="*"){p=e[j[1]+" "+k];if(p){o=e[o],o===!0?n=p:p===!0&&(n=o);break}}}}!n&&!p&&f.error("No conversion from "+m.replace(" "," to ")),n!==!0&&(c=n?n(c):p(o(c)))}}return c}function ca(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g)i in d&&(c[g[i]]=d[i]);while(f[0]==="*")f.shift(),h===b&&(h=a.mimeType||c.getResponseHeader("content-type"));if(h)for(i in e)if(e[i]&&e[i].test(h)){f.unshift(i);break}if(f[0]in d)j=f[0];else{for(i in d){if(!f[0]||a.converters[i+" "+f[0]]){j=i;break}k||(k=i)}j=j||k}if(j){j!==f[0]&&f.unshift(j);return d[j]}}function b_(a,b,c,d){if(f.isArray(b))f.each(b,function(b,e){c||bD.test(a)?d(a,e):b_(a+"["+(typeof e=="object"?b:"")+"]",e,c,d)});else if(!c&&f.type(b)==="object")for(var e in b)b_(a+"["+e+"]",b[e],c,d);else d(a,b)}function b$(a,c){var d,e,g=f.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((g[d]?a:e||(e={}))[d]=c[d]);e&&f.extend(!0,a,e)}function bZ(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bS,l;for(;i<j&&(k||!l);i++)l=h[i](c,d,e),typeof l=="string"&&(!k||g[l]?l=b:(c.dataTypes.unshift(l),l=bZ(a,c,d,e,l,g)));(k||!l)&&!g["*"]&&(l=bZ(a,c,d,e,"*",g));return l}function bY(a){return function(b,c){typeof b!="string"&&(c=b,b="*");if(f.isFunction(c)){var d=b.toLowerCase().split(bO),e=0,g=d.length,h,i,j;for(;e<g;e++)h=d[e],j=/^\+/.test(h),j&&(h=h.substr(1)||"*"),i=a[h]=a[h]||[],i[j?"unshift":"push"](c)}}}function bB(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=b==="width"?1:0,g=4;if(d>0){if(c!=="border")for(;e<g;e+=2)c||(d-=parseFloat(f.css(a,"padding"+bx[e]))||0),c==="margin"?d+=parseFloat(f.css(a,c+bx[e]))||0:d-=parseFloat(f.css(a,"border"+bx[e]+"Width"))||0;return d+"px"}d=by(a,b);if(d<0||d==null)d=a.style[b];if(bt.test(d))return d;d=parseFloat(d)||0;if(c)for(;e<g;e+=2)d+=parseFloat(f.css(a,"padding"+bx[e]))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+bx[e]+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+bx[e]))||0);return d+"px"}function bo(a){var b=c.createElement("div");bh.appendChild(b),b.innerHTML=a.outerHTML;return b.firstChild}function bn(a){var b=(a.nodeName||"").toLowerCase();b==="input"?bm(a):b!=="script"&&typeof a.getElementsByTagName!="undefined"&&f.grep(a.getElementsByTagName("input"),bm)}function bm(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bl(a){return typeof a.getElementsByTagName!="undefined"?a.getElementsByTagName("*"):typeof a.querySelectorAll!="undefined"?a.querySelectorAll("*"):[]}function bk(a,b){var c;b.nodeType===1&&(b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase(),c==="object"?b.outerHTML=a.outerHTML:c!=="input"||a.type!=="checkbox"&&a.type!=="radio"?c==="option"?b.selected=a.defaultSelected:c==="input"||c==="textarea"?b.defaultValue=a.defaultValue:c==="script"&&b.text!==a.text&&(b.text=a.text):(a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value)),b.removeAttribute(f.expando),b.removeAttribute("_submit_attached"),b.removeAttribute("_change_attached"))}function bj(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c,d,e,g=f._data(a),h=f._data(b,g),i=g.events;if(i){delete h.handle,h.events={};for(c in i)for(d=0,e=i[c].length;d<e;d++)f.event.add(b,c,i[c][d])}h.data&&(h.data=f.extend({},h.data))}}function bi(a,b){return f.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function U(a){var b=V.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}function T(a,b,c){b=b||0;if(f.isFunction(b))return f.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return f.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=f.grep(a,function(a){return a.nodeType===1});if(O.test(b))return f.filter(b,d,!c);b=f.filter(b,d)}return f.grep(a,function(a,d){return f.inArray(a,b)>=0===c})}function S(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function K(){return!0}function J(){return!1}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?+d:j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c<d;c++)b[a[c]]=!0;return b}var c=a.document,d=a.navigator,e=a.location,f=function(){function J(){if(!e.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(J,1);return}e.ready()}}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=/-([a-z]|[0-9])/ig,w=/^-ms-/,x=function(a,b){return(b+"").toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=m.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.7.2",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.add(a);return this},eq:function(a){a=+a;return a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j<k;j++)if((a=arguments[j])!=null)for(c in a){d=i[c],f=a[c];if(i===f)continue;l&&f&&(e.isPlainObject(f)||(g=e.isArray(f)))?(g?(g=!1,h=d&&e.isArray(d)?d:[]):h=d&&e.isPlainObject(d)?d:{},i[c]=e.extend(l,h,f)):f!==b&&(i[c]=f)}return i},e.extend({noConflict:function(b){a.$===e&&(a.$=g),b&&a.jQuery===e&&(a.jQuery=f);return e},isReady:!1,readyWait:1,holdReady:function(a){a?e.readyWait++:e.ready(!0)},ready:function(a){if(a===!0&&!--e.readyWait||a!==!0&&!e.isReady){if(!c.body)return setTimeout(e.ready,1);e.isReady=!0;if(a!==!0&&--e.readyWait>0)return;A.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").off("ready")}},bindReady:function(){if(!A){A=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a!=null&&a==a.window},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||D.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw new Error(a)},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){if(typeof c!="string"||!c)return null;var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,"ms-").replace(v,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g<h;)if(c.apply(a[g++],d)===!1)break}else if(i){for(f in a)if(c.call(a[f],f,a[f])===!1)break}else for(;g<h;)if(c.call(a[g],g,a[g++])===!1)break;return a},trim:G?function(a){return a==null?"":G.call(a)}:function(a){return a==null?"":(a+"").replace(k,"").replace(l,"")},makeArray:function(a,b){var c=b||[];if(a!=null){var d=e.type(a);a.length==null||d==="string"||d==="function"||d==="regexp"||e.isWindow(a)?E.call(c,a):e.merge(c,a)}return c},inArray:function(a,b,c){var d;if(b){if(H)return H.call(b,a,c);d=b.length,c=c?c<0?Math.max(0,d+c):c:0;for(;c<d;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,c){var d=a.length,e=0;if(typeof c.length=="number")for(var f=c.length;e<f;e++)a[d++]=c[e];else while(c[e]!==b)a[d++]=c[e++];a.length=d;return a},grep:function(a,b,c){var d=[],e;c=!!c;for(var f=0,g=a.length;f<g;f++)e=!!b(a[f],f),c!==e&&d.push(a[f]);return d},map:function(a,c,d){var f,g,h=[],i=0,j=a.length,k=a instanceof e||j!==b&&typeof j=="number"&&(j>0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i<j;i++)f=c(a[i],i,d),f!=null&&(h[h.length]=f);else for(g in a)f=c(a[g],g,d),f!=null&&(h[h.length]=f);return h.concat.apply([],h)},guid:1,proxy:function(a,c){if(typeof c=="string"){var d=a[c];c=a,a=d}if(!e.isFunction(a))return b;var f=F.call(arguments,2),g=function(){return a.apply(c,f.concat(F.call(arguments)))};g.guid=a.guid=a.guid||g.guid||e.guid++;return g},access:function(a,c,d,f,g,h,i){var j,k=d==null,l=0,m=a.length;if(d&&typeof d=="object"){for(l in d)e.access(a,c,l,d[l],1,h,f);g=1}else if(f!==b){j=i===b&&e.isFunction(f),k&&(j?(j=c,c=function(a,b,c){return j.call(e(a),c)}):(c.call(a,f),c=null));if(c)for(;l<m;l++)c(a[l],d,j?f.call(a[l],l,c(a[l],d)):f,i);g=1}return g?a:k?c.call(a):m?c(a[0],d):h},now:function(){return(new Date).getTime()},uaMatch:function(a){a=a.toLowerCase();var b=r.exec(a)||s.exec(a)||t.exec(a)||a.indexOf("compatible")<0&&u.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}e.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function(d,f){f&&f instanceof e&&!(f instanceof a)&&(f=a(f));return e.fn.init.call(this,d,f,b)},a.fn.init.prototype=a.fn;var b=a(c);return a},browser:{}}),e.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){I["[object "+b+"]"]=b.toLowerCase()}),z=e.uaMatch(y),z.browser&&(e.browser[z.browser]=!0,e.browser.version=z.version),e.browser.webkit&&(e.browser.safari=!0),j.test(" ")&&(k=/^[\s\xA0]+/,l=/[\s\xA0]+$/),h=e(c),c.addEventListener?B=function(){c.removeEventListener("DOMContentLoaded",B,!1),e.ready()}:c.attachEvent&&(B=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",B),e.ready())});return e}(),g={};f.Callbacks=function(a){a=a?g[a]||h(a):{};var c=[],d=[],e,i,j,k,l,m,n=function(b){var d,e,g,h,i;for(d=0,e=b.length;d<e;d++)g=b[d],h=f.type(g),h==="array"?n(g):h==="function"&&(!a.unique||!p.has(g))&&c.push(g)},o=function(b,f){f=f||[],e=!a.memory||[b,f],i=!0,j=!0,m=k||0,k=0,l=c.length;for(;c&&m<l;m++)if(c[m].apply(b,f)===!1&&a.stopOnFalse){e=!0;break}j=!1,c&&(a.once?e===!0?p.disable():c=[]:d&&d.length&&(e=d.shift(),p.fireWith(e[0],e[1])))},p={add:function(){if(c){var a=c.length;n(arguments),j?l=c.length:e&&e!==!0&&(k=a,o(e[0],e[1]))}return this},remove:function(){if(c){var b=arguments,d=0,e=b.length;for(;d<e;d++)for(var f=0;f<c.length;f++)if(b[d]===c[f]){j&&f<=l&&(l--,f<=m&&m--),c.splice(f--,1);if(a.unique)break}}return this},has:function(a){if(c){var b=0,d=c.length;for(;b<d;b++)if(a===c[b])return!0}return!1},empty:function(){c=[];return this},disable:function(){c=d=e=b;return this},disabled:function(){return!c},lock:function(){d=b,(!e||e===!0)&&p.disable();return this},locked:function(){return!d},fireWith:function(b,c){d&&(j?a.once||d.push([b,c]):(!a.once||!e)&&o(b,c));return this},fire:function(){p.fireWith(this,arguments);return this},fired:function(){return!!i}};return p};var i=[].slice;f.extend({Deferred:function(a){var b=f.Callbacks("once memory"),c=f.Callbacks("once memory"),d=f.Callbacks("memory"),e="pending",g={resolve:b,reject:c,notify:d},h={done:b.add,fail:c.add,progress:d.add,state:function(){return e},isResolved:b.fired,isRejected:c.fired,then:function(a,b,c){i.done(a).fail(b).progress(c);return this},always:function(){i.done.apply(i,arguments).fail.apply(i,arguments);return this},pipe:function(a,b,c){return f.Deferred(function(d){f.each({done:[a,"resolve"],fail:[b,"reject"],progress:[c,"notify"]},function(a,b){var c=b[0],e=b[1],g;f.isFunction(c)?i[a](function(){g=c.apply(this,arguments),g&&f.isFunction(g.promise)?g.promise().then(d.resolve,d.reject,d.notify):d[e+"With"](this===i?d:this,[g])}):i[a](d[e])})}).promise()},promise:function(a){if(a==null)a=h;else for(var b in h)a[b]=h[b];return a}},i=h.promise({}),j;for(j in g)i[j]=g[j].fire,i[j+"With"]=g[j].fireWith;i.done(function(){e="resolved"},c.disable,d.lock).fail(function(){e="rejected"},b.disable,d.lock),a&&a.call(i,i);return i},when:function(a){function m(a){return function(b){e[a]=arguments.length>1?i.call(arguments,0):b,j.notifyWith(k,e)}}function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;c<d;c++)b[c]&&b[c].promise&&f.isFunction(b[c].promise)?b[c].promise().then(l(c),j.reject,m(c)):--g;g||j.resolveWith(j,b)}else j!==a&&j.resolveWith(j,d?[a]:[]);return k}}),f.support=function(){var b,d,e,g,h,i,j,k,l,m,n,o,p=c.createElement("div"),q=c.documentElement;p.setAttribute("className","t"),p.innerHTML="   <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>",d=p.getElementsByTagName("*"),e=p.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=p.getElementsByTagName("input")[0],b={leadingWhitespace:p.firstChild.nodeType===3,tbody:!p.getElementsByTagName("tbody").length,htmlSerialize:!!p.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:p.className!=="t",enctype:!!c.createElement("form").enctype,html5Clone:c.createElement("nav").cloneNode(!0).outerHTML!=="<:nav></:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,pixelMargin:!0},f.boxModel=b.boxModel=c.compatMode==="CSS1Compat",i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete p.test}catch(r){b.deleteExpando=!1}!p.addEventListener&&p.attachEvent&&p.fireEvent&&(p.attachEvent("onclick",function(){b.noCloneEvent=!1}),p.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),i.setAttribute("name","t"),p.appendChild(i),j=c.createDocumentFragment(),j.appendChild(p.lastChild),b.checkClone=j.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=i.checked,j.removeChild(i),j.appendChild(p);if(p.attachEvent)for(n in{submit:1,change:1,focusin:1})m="on"+n,o=m in p,o||(p.setAttribute(m,"return;"),o=typeof p[m]=="function"),b[n+"Bubbles"]=o;j.removeChild(p),j=g=h=p=i=null,f(function(){var d,e,g,h,i,j,l,m,n,q,r,s,t,u=c.getElementsByTagName("body")[0];!u||(m=1,t="padding:0;margin:0;border:",r="position:absolute;top:0;left:0;width:1px;height:1px;",s=t+"0;visibility:hidden;",n="style='"+r+t+"5px solid #000;",q="<div "+n+"display:block;'><div style='"+t+"0;display:block;overflow:hidden;'></div></div>"+"<table "+n+"' cellpadding='0' cellspacing='0'>"+"<tr><td></td></tr></table>",d=c.createElement("div"),d.style.cssText=s+"width:0;height:0;position:static;top:0;margin-top:"+m+"px",u.insertBefore(d,u.firstChild),p=c.createElement("div"),d.appendChild(p),p.innerHTML="<table><tr><td style='"+t+"0;display:none'></td><td>t</td></tr></table>",k=p.getElementsByTagName("td"),o=k[0].offsetHeight===0,k[0].style.display="",k[1].style.display="none",b.reliableHiddenOffsets=o&&k[0].offsetHeight===0,a.getComputedStyle&&(p.innerHTML="",l=c.createElement("div"),l.style.width="0",l.style.marginRight="0",p.style.width="2px",p.appendChild(l),b.reliableMarginRight=(parseInt((a.getComputedStyle(l,null)||{marginRight:0}).marginRight,10)||0)===0),typeof p.style.zoom!="undefined"&&(p.innerHTML="",p.style.width=p.style.padding="1px",p.style.border=0,p.style.overflow="hidden",p.style.display="inline",p.style.zoom=1,b.inlineBlockNeedsLayout=p.offsetWidth===3,p.style.display="block",p.style.overflow="visible",p.innerHTML="<div style='width:5px;'></div>",b.shrinkWrapBlocks=p.offsetWidth!==3),p.style.cssText=r+s,p.innerHTML=q,e=p.firstChild,g=e.firstChild,i=e.nextSibling.firstChild.firstChild,j={doesNotAddBorder:g.offsetTop!==5,doesAddBorderForTableAndCells:i.offsetTop===5},g.style.position="fixed",g.style.top="20px",j.fixedPosition=g.offsetTop===20||g.offsetTop===15,g.style.position=g.style.top="",e.style.overflow="hidden",e.style.position="relative",j.subtractsBorderForOverflowNotVisible=g.offsetTop===-5,j.doesNotIncludeMarginInBodyOffset=u.offsetTop!==m,a.getComputedStyle&&(p.style.marginTop="1%",b.pixelMargin=(a.getComputedStyle(p,null)||{marginTop:0}).marginTop!=="1%"),typeof d.style.zoom!="undefined"&&(d.style.zoom=1),u.removeChild(d),l=p=d=null,f.extend(b,j))});return b}();var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[j]:a[j]&&j,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[h]:h;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)||(b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,g=b.length;e<g;e++)delete d[b[e]];if(!(c?m:f.isEmptyObject)(d))return}}if(!c){delete j[k].data;if(!m(j[k]))return}f.support.deleteExpando||!j.setInterval?delete j[k]:j[k]=null,i&&(f.support.deleteExpando?delete a[h]:a.removeAttribute?a.removeAttribute(h):a[h]=null)}},_data:function(a,b,c){return f.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=f.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),f.fn.extend({data:function(a,c){var d,e,g,h,i,j=this[0],k=0,m=null;if(a===b){if(this.length){m=f.data(j);if(j.nodeType===1&&!f._data(j,"parsedAttrs")){g=j.attributes;for(i=g.length;k<i;k++)h=g[k].name,h.indexOf("data-")===0&&(h=f.camelCase(h.substring(5)),l(j,h,m[h]));f._data(j,"parsedAttrs",!0)}}return m}if(typeof a=="object")return this.each(function(){f.data(this,a)});d=a.split(".",2),d[1]=d[1]?"."+d[1]:"",e=d[1]+"!";return f.access(this,function(c){if(c===b){m=this.triggerHandler("getData"+e,[d[0]]),m===b&&j&&(m=f.data(j,a),m=l(j,a,m));return m===b&&d[1]?this.data(d[0]):m}d[1]=c,this.each(function(){var b=f(this);b.triggerHandler("setData"+e,d),f.data(this,a,c),b.triggerHandler("changeData"+e,d)})},null,c,arguments.length>1,null,!1)},removeData:function(a){return this.each(function(){f.removeData(this,a)})}}),f.extend({_mark:function(a,b){a&&(b=(b||"fx")+"mark",f._data(a,b,(f._data(a,b)||0)+1))},_unmark:function(a,b,c){a!==!0&&(c=b,b=a,a=!1);if(b){c=c||"fx";var d=c+"mark",e=a?0:(f._data(b,d)||1)-1;e?f._data(b,d,e):(f.removeData(b,d,!0),n(b,c,"mark"))}},queue:function(a,b,c){var d;if(a){b=(b||"fx")+"queue",d=f._data(a,b),c&&(!d||f.isArray(c)?d=f._data(a,b,f.makeArray(c)):d.push(c));return d||[]}},dequeue:function(a,b){b=b||"fx";var c=f.queue(a,b),d=c.shift(),e={};d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),f._data(a,b+".run",e),d.call(a,function(){f.dequeue(a,b)},e)),c.length||(f.removeData(a,b+"queue "+b+".run",!0),n(a,b,"queue"))}}),f.fn.extend({queue:function(a,c){var d=2;typeof a!="string"&&(c=a,a="fx",d--);if(arguments.length<d)return f.queue(this[0],a);return c===b?this:this.each(function(){var b=f.queue(this,a,c);a==="fx"&&b[0]!=="inprogress"&&f.dequeue(this,a)})},dequeue:function(a){return this.each(function(){f.dequeue(this,a)})},delay:function(a,b){a=f.fx?f.fx.speeds[a]||a:a,b=b||"fx";return this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){function m(){--h||d.resolveWith(e,[e])}typeof a!="string"&&(c=a,a=b),a=a||"fx";var d=f.Deferred(),e=this,g=e.length,h=1,i=a+"defer",j=a+"queue",k=a+"mark",l;while(g--)if(l=f.data(e[g],i,b,!0)||(f.data(e[g],j,b,!0)||f.data(e[g],k,b,!0))&&f.data(e[g],i,f.Callbacks("once memory"),!0))h++,l.add(m);m();return d.promise(c)}});var o=/[\n\t\r]/g,p=/\s+/,q=/\r/g,r=/^(?:button|input)$/i,s=/^(?:button|input|object|select|textarea)$/i,t=/^a(?:rea)?$/i,u=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,v=f.support.getSetAttribute,w,x,y;f.fn.extend({attr:function(a,b){return f.access(this,f.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){f.removeAttr(this,a)})},prop:function(a,b){return f.access(this,f.prop,a,b,arguments.length>1)},removeProp:function(a){a=f.propFix[a]||a;return this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,g,h,i;if(f.isFunction(a))return this.each(function(b){f(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(p);for(c=0,d=this.length;c<d;c++){e=this[c];if(e.nodeType===1)if(!e.className&&b.length===1)e.className=a;else{g=" "+e.className+" ";for(h=0,i=b.length;h<i;h++)~g.indexOf(" "+b[h]+" ")||(g+=b[h]+" ");e.className=f.trim(g)}}}return this},removeClass:function(a){var c,d,e,g,h,i,j;if(f.isFunction(a))return this.each(function(b){f(this).removeClass(a.call(this,b,this.className))});if(a&&typeof a=="string"||a===b){c=(a||"").split(p);for(d=0,e=this.length;d<e;d++){g=this[d];if(g.nodeType===1&&g.className)if(a){h=(" "+g.className+" ").replace(o," ");for(i=0,j=c.length;i<j;i++)h=h.replace(" "+c[i]+" "," ");g.className=f.trim(h)}else g.className=""}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";if(f.isFunction(a))return this.each(function(c){f(this).toggleClass(a.call(this,c,this.className,b),b)});return this.each(function(){if(c==="string"){var e,g=0,h=f(this),i=b,j=a.split(p);while(e=j[g++])i=d?i:!h.hasClass(e),h[i?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&f._data(this,"__className__",this.className),this.className=this.className||a===!1?"":f._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ",c=0,d=this.length;for(;c<d;c++)if(this[c].nodeType===1&&(" "+this[c].className+" ").replace(o," ").indexOf(b)>-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];{if(!!arguments.length){e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.type]||f.valHooks[this.nodeName.toLowerCase()];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}if(g){c=f.valHooks[g.type]||f.valHooks[g.nodeName.toLowerCase()];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}}}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c<d;c++){e=i[c];if(e.selected&&(f.support.optDisabled?!e.disabled:e.getAttribute("disabled")===null)&&(!e.parentNode.disabled||!f.nodeName(e.parentNode,"optgroup"))){b=f(e).val();if(j)return b;h.push(b)}}if(j&&!h.length&&i.length)return f(i[g]).val();return h},set:function(a,b){var c=f.makeArray(b);f(a).find("option").each(function(){this.selected=f.inArray(f(this).val(),c)>=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!!a&&j!==3&&j!==8&&j!==2){if(e&&c in f.attrFn)return f(a)[c](d);if(typeof a.getAttribute=="undefined")return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g}},removeAttr:function(a,b){var c,d,e,g,h,i=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;for(;i<g;i++)e=d[i],e&&(c=f.propFix[e]||e,h=u.test(e),h||f.attr(a,e,""),a.removeAttribute(v?e:c),h&&c in a&&(a[c]=!1))}},attrHooks:{type:{set:function(a,b){if(r.test(a.nodeName)&&a.parentNode)f.error("type property can't be changed");else if(!f.support.radioValue&&b==="radio"&&f.nodeName(a,"input")){var c=a.value;a.setAttribute("type",b),c&&(a.value=c);return b}}},value:{get:function(a,b){if(w&&f.nodeName(a,"button"))return w.get(a,b);return b in a?a.value:null},set:function(a,b,c){if(w&&f.nodeName(a,"button"))return w.set(a,b,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e,g,h,i=a.nodeType;if(!!a&&i!==3&&i!==8&&i!==2){h=i!==1||!f.isXMLDoc(a),h&&(c=f.propFix[c]||c,g=f.propHooks[c]);return d!==b?g&&"set"in g&&(e=g.set(a,d,c))!==b?e:a[c]=d:g&&"get"in g&&(e=g.get(a,c))!==null?e:a[c]}},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):s.test(a.nodeName)||t.test(a.nodeName)&&a.href?0:b}}}}),f.attrHooks.tabindex=f.propHooks.tabIndex,x={get:function(a,c){var d,e=f.prop(a,c);return e===!0||typeof e!="boolean"&&(d=a.getAttributeNode(c))&&d.nodeValue!==!1?c.toLowerCase():b},set:function(a,b,c){var d;b===!1?f.removeAttr(a,c):(d=f.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase()));return c}},v||(y={name:!0,id:!0,coords:!0},w=f.valHooks.button={get:function(a,c){var d;d=a.getAttributeNode(c);return d&&(y[c]?d.nodeValue!=="":d.specified)?d.nodeValue:b},set:function(a,b,d){var e=a.getAttributeNode(d);e||(e=c.createAttribute(d),a.setAttributeNode(e));return e.nodeValue=b+""}},f.attrHooks.tabindex.set=w.set,f.each(["width","height"],function(a,b){f.attrHooks[b]=f.extend(f.attrHooks[b],{set:function(a,c){if(c===""){a.setAttribute(b,"auto");return c}}})}),f.attrHooks.contenteditable={get:w.get,set:function(a,b,c){b===""&&(b="false"),w.set(a,b,c)}}),f.support.hrefNormalized||f.each(["href","src","width","height"],function(a,c){f.attrHooks[c]=f.extend(f.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),f.support.style||(f.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex);return null}})),f.support.enctype||(f.propFix.enctype="encoding"),f.support.checkOn||f.each(["radio","checkbox"],function(){f.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),f.each(["radio","checkbox"],function(){f.valHooks[this]=f.extend(f.valHooks[this],{set:function(a,b){if(f.isArray(b))return a.checked=f.inArray(f(a).val(),b)>=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/(?:^|\s)hover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=function(
3
a){var b=F.exec(a);b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")};f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler,g=p.selector),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k<c.length;k++){l=A.exec(c[k])||[],m=l[1],n=(l[2]||"").split(".").sort(),s=f.event.special[m]||{},m=(g?s.delegateType:s.bindType)||m,s=f.event.special[m]||{},o=f.extend({type:m,origType:l[1],data:e,handler:d,guid:d.guid,selector:g,quick:g&&G(g),namespace:n.join(".")},p),r=j[m];if(!r){r=j[m]=[],r.delegateCount=0;if(!s.setup||s.setup.call(a,e,n,i)===!1)a.addEventListener?a.addEventListener(m,i,!1):a.attachEvent&&a.attachEvent("on"+m,i)}s.add&&(s.add.call(a,o),o.handler.guid||(o.handler.guid=d.guid)),g?r.splice(r.delegateCount++,0,o):r.push(o),f.event.global[m]=!0}a=null}},global:{},remove:function(a,b,c,d,e){var g=f.hasData(a)&&f._data(a),h,i,j,k,l,m,n,o,p,q,r,s;if(!!g&&!!(o=g.events)){b=f.trim(I(b||"")).split(" ");for(h=0;h<b.length;h++){i=A.exec(b[h])||[],j=k=i[1],l=i[2];if(!j){for(j in o)f.event.remove(a,j+b[h],c,d,!0);continue}p=f.event.special[j]||{},j=(d?p.delegateType:p.bindType)||j,r=o[j]||[],m=r.length,l=l?new RegExp("(^|\\.)"+l.split(".").sort().join("\\.(?:.*\\.)?")+"(\\.|$)"):null;for(n=0;n<r.length;n++)s=r[n],(e||k===s.origType)&&(!c||c.guid===s.guid)&&(!l||l.test(s.namespace))&&(!d||d===s.selector||d==="**"&&s.selector)&&(r.splice(n--,1),s.selector&&r.delegateCount--,p.remove&&p.remove.call(a,s));r.length===0&&m!==r.length&&((!p.teardown||p.teardown.call(a,l)===!1)&&f.removeEvent(a,j,g.handle),delete o[j])}f.isEmptyObject(o)&&(q=g.handle,q&&(q.elem=null),f.removeData(a,["events","handle"],!0))}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,e,g){if(!e||e.nodeType!==3&&e.nodeType!==8){var h=c.type||c,i=[],j,k,l,m,n,o,p,q,r,s;if(E.test(h+f.event.triggered))return;h.indexOf("!")>=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"";if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;l<r.length&&!c.isPropagationStopped();l++)m=r[l][0],c.type=r[l][1],q=(f._data(m,"events")||{})[c.type]&&f._data(m,"handle"),q&&q.apply(m,d),q=o&&m[o],q&&f.acceptData(m)&&q.apply(m,d)===!1&&c.preventDefault();c.type=h,!g&&!c.isDefaultPrevented()&&(!p._default||p._default.apply(e.ownerDocument,d)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)&&o&&e[h]&&(h!=="focus"&&h!=="blur"||c.target.offsetWidth!==0)&&!f.isWindow(e)&&(n=e[o],n&&(e[o]=null),f.event.triggered=h,e[h](),f.event.triggered=b,n&&(e[o]=n));return c.result}},dispatch:function(c){c=f.event.fix(c||a.event);var d=(f._data(this,"events")||{})[c.type]||[],e=d.delegateCount,g=[].slice.call(arguments,0),h=!c.exclusive&&!c.namespace,i=f.event.special[c.type]||{},j=[],k,l,m,n,o,p,q,r,s,t,u;g[0]=c,c.delegateTarget=this;if(!i.preDispatch||i.preDispatch.call(this,c)!==!1){if(e&&(!c.button||c.type!=="click")){n=f(this),n.context=this.ownerDocument||this;for(m=c.target;m!=this;m=m.parentNode||this)if(m.disabled!==!0){p={},r=[],n[0]=m;for(k=0;k<e;k++)s=d[k],t=s.selector,p[t]===b&&(p[t]=s.quick?H(m,s.quick):n.is(t)),p[t]&&r.push(s);r.length&&j.push({elem:m,matches:r})}}d.length>e&&j.push({elem:this,matches:d.slice(e)});for(k=0;k<j.length&&!c.isPropagationStopped();k++){q=j[k],c.currentTarget=q.elem;for(l=0;l<q.matches.length&&!c.isImmediatePropagationStopped();l++){s=q.matches[l];if(h||!c.namespace&&!s.namespace||c.namespace_re&&c.namespace_re.test(s.namespace))c.data=s.data,c.handleObj=s,o=((f.event.special[s.origType]||{}).handle||s.handler).apply(q.elem,g),o!==b&&(c.result=o,o===!1&&(c.preventDefault(),c.stopPropagation()))}}i.postDispatch&&i.postDispatch.call(this,c);return c.result}},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){a.which==null&&(a.which=b.charCode!=null?b.charCode:b.keyCode);return a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,d){var e,f,g,h=d.button,i=d.fromElement;a.pageX==null&&d.clientX!=null&&(e=a.target.ownerDocument||c,f=e.documentElement,g=e.body,a.pageX=d.clientX+(f&&f.scrollLeft||g&&g.scrollLeft||0)-(f&&f.clientLeft||g&&g.clientLeft||0),a.pageY=d.clientY+(f&&f.scrollTop||g&&g.scrollTop||0)-(f&&f.clientTop||g&&g.clientTop||0)),!a.relatedTarget&&i&&(a.relatedTarget=i===a.target?d.toElement:i),!a.which&&h!==b&&(a.which=h&1?1:h&2?3:h&4?2:0);return a}},fix:function(a){if(a[f.expando])return a;var d,e,g=a,h=f.event.fixHooks[a.type]||{},i=h.props?this.props.concat(h.props):this.props;a=f.Event(g);for(d=i.length;d;)e=i[--d],a[e]=g[e];a.target||(a.target=g.srcElement||c),a.target.nodeType===3&&(a.target=a.target.parentNode),a.metaKey===b&&(a.metaKey=a.ctrlKey);return h.filter?h.filter(a,g):a},special:{ready:{setup:f.bindReady},load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(a,b,c){f.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}},simulate:function(a,b,c,d){var e=f.extend(new f.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?f.event.trigger(e,null,b):f.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},f.event.handle=f.event.dispatch,f.removeEvent=c.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){a.detachEvent&&a.detachEvent("on"+b,c)},f.Event=function(a,b){if(!(this instanceof f.Event))return new f.Event(a,b);a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?K:J):this.type=a,b&&f.extend(this,b),this.timeStamp=a&&a.timeStamp||f.now(),this[f.expando]=!0},f.Event.prototype={preventDefault:function(){this.isDefaultPrevented=K;var a=this.originalEvent;!a||(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=K;var a=this.originalEvent;!a||(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=K,this.stopPropagation()},isDefaultPrevented:J,isPropagationStopped:J,isImmediatePropagationStopped:J},f.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){f.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c=this,d=a.relatedTarget,e=a.handleObj,g=e.selector,h;if(!d||d!==c&&!f.contains(c,d))a.type=e.origType,h=e.handler.apply(this,arguments),a.type=b;return h}}}),f.support.submitBubbles||(f.event.special.submit={setup:function(){if(f.nodeName(this,"form"))return!1;f.event.add(this,"click._submit keypress._submit",function(a){var c=a.target,d=f.nodeName(c,"input")||f.nodeName(c,"button")?c.form:b;d&&!d._submit_attached&&(f.event.add(d,"submit._submit",function(a){a._submit_bubble=!0}),d._submit_attached=!0)})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&f.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){if(f.nodeName(this,"form"))return!1;f.event.remove(this,"._submit")}}),f.support.changeBubbles||(f.event.special.change={setup:function(){if(z.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio")f.event.add(this,"propertychange._change",function(a){a.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),f.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1,f.event.simulate("change",this,a,!0))});return!1}f.event.add(this,"beforeactivate._change",function(a){var b=a.target;z.test(b.nodeName)&&!b._change_attached&&(f.event.add(b,"change._change",function(a){this.parentNode&&!a.isSimulated&&!a.isTrigger&&f.event.simulate("change",this.parentNode,a,!0)}),b._change_attached=!0)})},handle:function(a){var b=a.target;if(this!==b||a.isSimulated||a.isTrigger||b.type!=="radio"&&b.type!=="checkbox")return a.handleObj.handler.apply(this,arguments)},teardown:function(){f.event.remove(this,"._change");return z.test(this.nodeName)}}),f.support.focusinBubbles||f.each({focus:"focusin",blur:"focusout"},function(a,b){var d=0,e=function(a){f.event.simulate(b,a.target,f.event.fix(a),!0)};f.event.special[b]={setup:function(){d++===0&&c.addEventListener(a,e,!0)},teardown:function(){--d===0&&c.removeEventListener(a,e,!0)}}}),f.fn.extend({on:function(a,c,d,e,g){var h,i;if(typeof a=="object"){typeof c!="string"&&(d=d||c,c=b);for(i in a)this.on(i,c,d,a[i],g);return this}d==null&&e==null?(e=c,d=c=b):e==null&&(typeof c=="string"?(e=d,d=b):(e=d,d=c,c=b));if(e===!1)e=J;else if(!e)return this;g===1&&(h=e,e=function(a){f().off(a);return h.apply(this,arguments)},e.guid=h.guid||(h.guid=f.guid++));return this.each(function(){f.event.add(this,a,e,d,c)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,c,d){if(a&&a.preventDefault&&a.handleObj){var e=a.handleObj;f(a.delegateTarget).off(e.namespace?e.origType+"."+e.namespace:e.origType,e.selector,e.handler);return this}if(typeof a=="object"){for(var g in a)this.off(g,c,a[g]);return this}if(c===!1||typeof c=="function")d=c,c=b;d===!1&&(d=J);return this.each(function(){f.event.remove(this,a,d,c)})},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},live:function(a,b,c){f(this.context).on(a,this.selector,b,c);return this},die:function(a,b){f(this.context).off(a,this.selector||"**",b);return this},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return arguments.length==1?this.off(a,"**"):this.off(b,a,c)},trigger:function(a,b){return this.each(function(){f.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0])return f.event.trigger(a,b,this[0],!0)},toggle:function(a){var b=arguments,c=a.guid||f.guid++,d=0,e=function(c){var e=(f._data(this,"lastToggle"+a.guid)||0)%d;f._data(this,"lastToggle"+a.guid,e+1),c.preventDefault();return b[e].apply(this,arguments)||!1};e.guid=c;while(d<b.length)b[d++].guid=c;return this.click(e)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),f.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){f.fn[b]=function(a,c){c==null&&(c=a,a=null);return arguments.length>0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),C.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),D.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}if(j.nodeType===1){g||(j[d]=c,j.sizset=h);if(typeof b!="string"){if(j===b){k=!0;break}}else if(m.filter(b,[j]).length>0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}j.nodeType===1&&!g&&(j[d]=c,j.sizset=h);if(j.nodeName.toLowerCase()===b){k=j;break}j=j[a]}e[h]=k}}}var a=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1)}return a},m.matches=function(a,b){return m(a,null,null,b)},m.matchesSelector=function(a,b){return m(b,null,null,[a]).length>0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e<f;e++){h=o.order[e];if(g=o.leftMatch[h].exec(a)){i=g[1],g.splice(1,1);if(i.substr(i.length-1)!=="\\"){g[1]=(g[1]||"").replace(j,""),d=o.find[h](g,b,c);if(d!=null){a=a.replace(o.match[h],"");break}}}}d||(d=typeof b.getElementsByTagName!="undefined"?b.getElementsByTagName("*"):[]);return{set:d,expr:a}},m.filter=function(a,c,d,e){var f,g,h,i,j,k,l,n,p,q=a,r=[],s=c,t=c&&c[0]&&m.isXML(c[0]);while(a&&c.length){for(h in o.filter)if((f=o.leftMatch[h].exec(a))!=null&&f[2]){k=o.filter[h],l=f[1],g=!1,f.splice(1,1);if(l.substr(l.length-1)==="\\")continue;s===r&&(r=[]);if(o.preFilter[h]){f=o.preFilter[h](f,s,d,r,e,t);if(!f)g=i=!0;else if(f===!0)continue}if(f)for(n=0;(j=s[n])!=null;n++)j&&(i=k(j,f,n,s),p=e^i,d&&i!=null?p?g=!0:s[n]=!1:p&&(r.push(j),g=!0));if(i!==b){d||(s=r),a=a.replace(o.match[h],"");if(!g)return[];break}}if(a===q)if(g==null)m.error(a);else break;q=a}return s},m.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)};var n=m.getText=function(a){var b,c,d=a.nodeType,e="";if(d){if(d===1||d===9||d===11){if(typeof a.textContent=="string")return a.textContent;if(typeof a.innerText=="string")return a.innerText.replace(k,"");for(a=a.firstChild;a;a=a.nextSibling)e+=n(a)}else if(d===3||d===4)return a.nodeValue}else for(b=0;c=a[b];b++)c.nodeType!==8&&(e+=n(c));return e},o=m.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(a){return a.getAttribute("href")},type:function(a){return a.getAttribute("type")}},relative:{"+":function(a,b){var c=typeof b=="string",d=c&&!l.test(b),e=c&&!d;d&&(b=b.toLowerCase());for(var f=0,g=a.length,h;f<g;f++)if(h=a[f]){while((h=h.previousSibling)&&h.nodeType!==1);a[f]=e||h&&h.nodeName.toLowerCase()===b?h||!1:h===b}e&&m.filter(b,a,!0)},">":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e<f;e++){c=a[e];if(c){var g=c.parentNode;a[e]=g.nodeName.toLowerCase()===b?g:!1}}}else{for(;e<f;e++)c=a[e],c&&(a[e]=d?c.parentNode:c.parentNode===b);d&&m.filter(b,a,!0)}},"":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("parentNode",b,f,a,d,c)},"~":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("previousSibling",b,f,a,d,c)}},find:{ID:function(a,b,c){if(typeof b.getElementById!="undefined"&&!c){var d=b.getElementById(a[1]);return d&&d.parentNode?[d]:[]}},NAME:function(a,b){if(typeof b.getElementsByName!="undefined"){var c=[],d=b.getElementsByName(a[1]);for(var e=0,f=d.length;e<f;e++)d[e].getAttribute("name")===a[1]&&c.push(d[e]);return c.length===0?null:c}},TAG:function(a,b){if(typeof b.getElementsByTagName!="undefined")return b.getElementsByTagName(a[1])}},preFilter:{CLASS:function(a,b,c,d,e,f){a=" "+a[1].replace(j,"")+" ";if(f)return a;for(var g=0,h;(h=b[g])!=null;g++)h&&(e^(h.className&&(" "+h.className+" ").replace(/[\t\n\r]/g," ").indexOf(a)>=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return b<c[3]-0},gt:function(a,b,c){return b>c[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h<i;h++)if(g[h]===a)return!1;return!0}m.error(e)},CHILD:function(a,b){var c,e,f,g,h,i,j,k=b[1],l=a;switch(k){case"only":case"first":while(l=l.previousSibling)if(l.nodeType===1)return!1;if(k==="first")return!0;l=a;case"last":while(l=l.nextSibling)if(l.nodeType===1)return!1;return!0;case"nth":c=b[2],e=b[3];if(c===1&&e===0)return!0;f=b[0],g=a.parentNode;if(g&&(g[d]!==f||!a.nodeIndex)){i=0;for(l=g.firstChild;l;l=l.nextSibling)l.nodeType===1&&(l.nodeIndex=++i);g[d]=f}j=a.nodeIndex-e;return c===0?j===0:j%c===0&&j/c>=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));o.match.globalPOS=p;var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c<e;c++)d.push(a[c]);else for(;a[c];c++)d.push(a[c]);return d}}var u,v;c.documentElement.compareDocumentPosition?u=function(a,b){if(a===b){h=!0;return 0}if(!a.compareDocumentPosition||!b.compareDocumentPosition)return a.compareDocumentPosition?-1:1;return a.compareDocumentPosition(b)&4?-1:1}:(u=function(a,b){if(a===b){h=!0;return 0}if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,e=[],f=[],g=a.parentNode,i=b.parentNode,j=g;if(g===i)return v(a,b);if(!g)return-1;if(!i)return 1;while(j)e.unshift(j),j=j.parentNode;j=i;while(j)f.unshift(j),j=j.parentNode;c=e.length,d=f.length;for(var k=0;k<c&&k<d;k++)if(e[k]!==f[k])return v(e[k],f[k]);return k===c?v(a,f[k],-1):v(e[k],b,1)},v=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}),function(){var a=c.createElement("div"),d="script"+(new Date).getTime(),e=c.documentElement;a.innerHTML="<a name='"+d+"'/>",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="<p class='TEST'></p>";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="<div class='test e'></div><div class='test'></div>";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h<i;h++)m(a,g[h],e,c);return m.filter(f,e)};m.attr=f.attr,m.selectors.attrMap={},f.find=m,f.expr=m.selectors,f.expr[":"]=f.expr.filters,f.unique=m.uniqueSort,f.text=m.getText,f.isXMLDoc=m.isXML,f.contains=m.contains}();var L=/Until$/,M=/^(?:parents|prevUntil|prevAll)/,N=/,/,O=/^.[^:#\[\.,]*$/,P=Array.prototype.slice,Q=f.expr.match.globalPOS,R={children:!0,contents:!0,next:!0,prev:!0};f.fn.extend({find:function(a){var b=this,c,d;if(typeof a!="string")return f(a).filter(function(){for(c=0,d=b.length;c<d;c++)if(f.contains(b[c],this))return!0});var e=this.pushStack("","find",a),g,h,i;for(c=0,d=this.length;c<d;c++){g=e.length,f.find(a,this[c],e);if(c>0)for(h=g;h<e.length;h++)for(i=0;i<g;i++)if(e[i]===e[h]){e.splice(h--,1);break}}return e},has:function(a){var b=f(a);return this.filter(function(){for(var a=0,c=b.length;a<c;a++)if(f.contains(this,b[a]))return!0})},not:function(a){return this.pushStack(T(this,a,!1),"not",a)},filter:function(a){return this.pushStack(T(this,a,!0),"filter",a)},is:function(a){return!!a&&(typeof a=="string"?Q.test(a)?f(a,this.context).index(this[0])>=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d<a.length;d++)f(g).is(a[d])&&c.push({selector:a[d],elem:g,level:h});g=g.parentNode,h++}return c}var i=Q.test(a)||typeof a!="string"?f(a,b||this.context):0;for(d=0,e=this.length;d<e;d++){g=this[d];while(g){if(i?i.index(g)>-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c);L.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse());return this.pushStack(e,a,P.call(arguments).join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var V="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/<tbody/i,_=/<|&#?\w+;/,ba=/<(?:script|style)/i,bb=/<(?:script|object|embed|option|style)/i,bc=new RegExp("<(?:"+V+")[\\s/>]","i"),bd=/checked\s*(?:[^=]|=\s*.checked.)/i,be=/\/(java|ecma)script/i,bf=/^\s*<!(?:\[CDATA\[|\-\-)/,bg={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div<div>","</div>"]),f.fn.extend({text:function(a){return f.access(this,function(a){return a===b?f.text(this):this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a))},null,a,arguments.length)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f
4
.clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f.clean(arguments));return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){return f.access(this,function(a){var c=this[0]||{},d=0,e=this.length;if(a===b)return c.nodeType===1?c.innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1></$2>");try{for(;d<e;d++)c=this[d]||{},c.nodeType===1&&(f.cleanData(c.getElementsByTagName("*")),c.innerHTML=a);c=0}catch(g){}}c&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(f.isFunction(a))return this.each(function(b){var c=f(this),d=c.html();c.replaceWith(a.call(this,b,d))});typeof a!="string"&&(a=f(a).detach());return this.each(function(){var b=this.nextSibling,c=this.parentNode;f(this).remove(),b?f(b).before(a):f(c).append(a)})}return this.length?this.pushStack(f(f.isFunction(a)?a():a),"replaceWith",a):this},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){var e,g,h,i,j=a[0],k=[];if(!f.support.checkClone&&arguments.length===3&&typeof j=="string"&&bd.test(j))return this.each(function(){f(this).domManip(a,c,d,!0)});if(f.isFunction(j))return this.each(function(e){var g=f(this);a[0]=j.call(this,e,c?g.html():b),g.domManip(a,c,d)});if(this[0]){i=j&&j.parentNode,f.support.parentNode&&i&&i.nodeType===11&&i.childNodes.length===this.length?e={fragment:i}:e=f.buildFragment(a,this,k),h=e.fragment,h.childNodes.length===1?g=h=h.firstChild:g=h.firstChild;if(g){c=c&&f.nodeName(g,"tr");for(var l=0,m=this.length,n=m-1;l<m;l++)d.call(c?bi(this[l],g):this[l],e.cacheable||m>1&&l<n?f.clone(h,!0,!0):h)}k.length&&f.each(k,function(a,b){b.src?f.ajax({type:"GET",global:!1,url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(bf,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)})}return this}}),f.buildFragment=function(a,b,d){var e,g,h,i,j=a[0];b&&b[0]&&(i=b[0].ownerDocument||b[0]),i.createDocumentFragment||(i=c),a.length===1&&typeof j=="string"&&j.length<512&&i===c&&j.charAt(0)==="<"&&!bb.test(j)&&(f.support.checkClone||!bd.test(j))&&(f.support.html5Clone||!bc.test(j))&&(g=!0,h=f.fragments[j],h&&h!==1&&(e=h)),e||(e=i.createDocumentFragment(),f.clean(a,i,e,d)),g&&(f.fragments[j]=h?e:1);return{fragment:e,cacheable:g}},f.fragments={},f.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){f.fn[a]=function(c){var d=[],e=f(c),g=this.length===1&&this[0].parentNode;if(g&&g.nodeType===11&&g.childNodes.length===1&&e.length===1){e[b](this[0]);return this}for(var h=0,i=e.length;h<i;h++){var j=(h>0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||f.isXMLDoc(a)||!bc.test("<"+a.nodeName+">")?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}d=e=null;return h},clean:function(a,b,d,e){var g,h,i,j=[];b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);for(var k=0,l;(l=a[k])!=null;k++){typeof l=="number"&&(l+="");if(!l)continue;if(typeof l=="string")if(!_.test(l))l=b.createTextNode(l);else{l=l.replace(Y,"<$1></$2>");var m=(Z.exec(l)||["",""])[1].toLowerCase(),n=bg[m]||bg._default,o=n[0],p=b.createElement("div"),q=bh.childNodes,r;b===c?bh.appendChild(p):U(b).appendChild(p),p.innerHTML=n[1]+l+n[2];while(o--)p=p.lastChild;if(!f.support.tbody){var s=$.test(l),t=m==="table"&&!s?p.firstChild&&p.firstChild.childNodes:n[1]==="<table>"&&!s?p.childNodes:[];for(i=t.length-1;i>=0;--i)f.nodeName(t[i],"tbody")&&!t[i].childNodes.length&&t[i].parentNode.removeChild(t[i])}!f.support.leadingWhitespace&&X.test(l)&&p.insertBefore(b.createTextNode(X.exec(l)[0]),p.firstChild),l=p.childNodes,p&&(p.parentNode.removeChild(p),q.length>0&&(r=q[q.length-1],r&&r.parentNode&&r.parentNode.removeChild(r)))}var u;if(!f.support.appendChecked)if(l[0]&&typeof (u=l.length)=="number")for(i=0;i<u;i++)bn(l[i]);else bn(l);l.nodeType?j.push(l):j=f.merge(j,l)}if(d){g=function(a){return!a.type||be.test(a.type)};for(k=0;j[k];k++){h=j[k];if(e&&f.nodeName(h,"script")&&(!h.type||be.test(h.type)))e.push(h.parentNode?h.parentNode.removeChild(h):h);else{if(h.nodeType===1){var v=f.grep(h.getElementsByTagName("script"),g);j.splice.apply(j,[k+1,0].concat(v))}d.appendChild(h)}}}return j},cleanData:function(a){var b,c,d=f.cache,e=f.event.special,g=f.support.deleteExpando;for(var h=0,i;(i=a[h])!=null;h++){if(i.nodeName&&f.noData[i.nodeName.toLowerCase()])continue;c=i[f.expando];if(c){b=d[c];if(b&&b.events){for(var j in b.events)e[j]?f.event.remove(i,j):f.removeEvent(i,j,b.handle);b.handle&&(b.handle.elem=null)}g?delete i[f.expando]:i.removeAttribute&&i.removeAttribute(f.expando),delete d[c]}}}});var bp=/alpha\([^)]*\)/i,bq=/opacity=([^)]*)/,br=/([A-Z]|^ms)/g,bs=/^[\-+]?(?:\d*\.)?\d+$/i,bt=/^-?(?:\d*\.)?\d+(?!px)[^\d\s]+$/i,bu=/^([\-+])=([\-+.\de]+)/,bv=/^margin/,bw={position:"absolute",visibility:"hidden",display:"block"},bx=["Top","Right","Bottom","Left"],by,bz,bA;f.fn.css=function(a,c){return f.access(this,function(a,c,d){return d!==b?f.style(a,c,d):f.css(a,c)},a,c,arguments.length>1)},f.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=by(a,"opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":f.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!!a&&a.nodeType!==3&&a.nodeType!==8&&!!a.style){var g,h,i=f.camelCase(c),j=a.style,k=f.cssHooks[i];c=f.cssProps[i]||i;if(d===b){if(k&&"get"in k&&(g=k.get(a,!1,e))!==b)return g;return j[c]}h=typeof d,h==="string"&&(g=bu.exec(d))&&(d=+(g[1]+1)*+g[2]+parseFloat(f.css(a,c)),h="number");if(d==null||h==="number"&&isNaN(d))return;h==="number"&&!f.cssNumber[i]&&(d+="px");if(!k||!("set"in k)||(d=k.set(a,d))!==b)try{j[c]=d}catch(l){}}},css:function(a,c,d){var e,g;c=f.camelCase(c),g=f.cssHooks[c],c=f.cssProps[c]||c,c==="cssFloat"&&(c="float");if(g&&"get"in g&&(e=g.get(a,!0,d))!==b)return e;if(by)return by(a,c)},swap:function(a,b,c){var d={},e,f;for(f in b)d[f]=a.style[f],a.style[f]=b[f];e=c.call(a);for(f in b)a.style[f]=d[f];return e}}),f.curCSS=f.css,c.defaultView&&c.defaultView.getComputedStyle&&(bz=function(a,b){var c,d,e,g,h=a.style;b=b.replace(br,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b))),!f.support.pixelMargin&&e&&bv.test(b)&&bt.test(c)&&(g=h.width,h.width=c,c=e.width,h.width=g);return c}),c.documentElement.currentStyle&&(bA=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f==null&&g&&(e=g[b])&&(f=e),bt.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),by=bz||bA,f.each(["height","width"],function(a,b){f.cssHooks[b]={get:function(a,c,d){if(c)return a.offsetWidth!==0?bB(a,b,d):f.swap(a,bw,function(){return bB(a,b,d)})},set:function(a,b){return bs.test(b)?b+"px":b}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return bq.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bp,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bp.test(g)?g.replace(bp,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){return f.swap(a,{display:"inline-block"},function(){return b?by(a,"margin-right"):a.style.marginRight})}})}),f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)}),f.each({margin:"",padding:"",border:"Width"},function(a,b){f.cssHooks[a+b]={expand:function(c){var d,e=typeof c=="string"?c.split(" "):[c],f={};for(d=0;d<4;d++)f[a+bx[d]+b]=e[d]||e[d-2]||e[0];return f}}});var bC=/%20/g,bD=/\[\]$/,bE=/\r?\n/g,bF=/#.*$/,bG=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bH=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bI=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bJ=/^(?:GET|HEAD)$/,bK=/^\/\//,bL=/\?/,bM=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bN=/^(?:select|textarea)/i,bO=/\s+/,bP=/([?&])_=[^&]*/,bQ=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bR=f.fn.load,bS={},bT={},bU,bV,bW=["*/"]+["*"];try{bU=e.href}catch(bX){bU=c.createElement("a"),bU.href="",bU=bU.href}bV=bQ.exec(bU.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bR)return bR.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("<div>").append(c.replace(bM,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bN.test(this.nodeName)||bH.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bE,"\r\n")}}):{name:b.name,value:c.replace(bE,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.on(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?b$(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),b$(a,b);return a},ajaxSettings:{url:bU,isLocal:bI.test(bV[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bW},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bY(bS),ajaxTransport:bY(bT),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?ca(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=cb(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bG.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bF,"").replace(bK,bV[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bO),d.crossDomain==null&&(r=bQ.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bV[1]&&r[2]==bV[2]&&(r[3]||(r[1]==="http:"?80:443))==(bV[3]||(bV[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),bZ(bS,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bJ.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bL.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bP,"$1_="+x);d.url=y+(y===d.url?(bL.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bW+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=bZ(bT,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){if(s<2)w(-1,z);else throw z}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)b_(g,a[g],c,e);return d.join("&").replace(bC,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cc=f.now(),cd=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cc++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=typeof b.data=="string"&&/^application\/x\-www\-form\-urlencoded/.test(b.contentType);if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(cd.test(b.url)||e&&cd.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(cd,l),b.url===j&&(e&&(k=k.replace(cd,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var ce=a.ActiveXObject?function(){for(var a in cg)cg[a](0,1)}:!1,cf=0,cg;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ch()||ci()}:ch,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,ce&&delete cg[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n);try{m.text=h.responseText}catch(a){}try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cf,ce&&(cg||(cg={},f(a).unload(ce)),cg[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var cj={},ck,cl,cm=/^(?:toggle|show|hide)$/,cn=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,co,cp=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cq;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(ct("show",3),a,b,c);for(var g=0,h=this.length;g<h;g++)d=this[g],d.style&&(e=d.style.display,!f._data(d,"olddisplay")&&e==="none"&&(e=d.style.display=""),(e===""&&f.css(d,"display")==="none"||!f.contains(d.ownerDocument.documentElement,d))&&f._data(d,"olddisplay",cu(d.nodeName)));for(g=0;g<h;g++){d=this[g];if(d.style){e=d.style.display;if(e===""||e==="none")d.style.display=f._data(d,"olddisplay")||""}}return this},hide:function(a,b,c){if(a||a===0)return this.animate(ct("hide",3),a,b,c);var d,e,g=0,h=this.length;for(;g<h;g++)d=this[g],d.style&&(e=f.css(d,"display"),e!=="none"&&!f._data(d,"olddisplay")&&f._data(d,"olddisplay",e));for(g=0;g<h;g++)this[g].style&&(this[g].style.display="none");return this},_toggle:f.fn.toggle,toggle:function(a,b,c){var d=typeof a=="boolean";f.isFunction(a)&&f.isFunction(b)?this._toggle.apply(this,arguments):a==null||d?this.each(function(){var b=d?a:f(this).is(":hidden");f(this)[b?"show":"hide"]()}):this.animate(ct("toggle",3),a,b,c);return this},fadeTo:function(a,b,c,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){function g(){e.queue===!1&&f._mark(this);var b=f.extend({},e),c=this.nodeType===1,d=c&&f(this).is(":hidden"),g,h,i,j,k,l,m,n,o,p,q;b.animatedProperties={};for(i in a){g=f.camelCase(i),i!==g&&(a[g]=a[i],delete a[i]);if((k=f.cssHooks[g])&&"expand"in k){l=k.expand(a[g]),delete a[g];for(i in l)i in a||(a[i]=l[i])}}for(g in a){h=a[g],f.isArray(h)?(b.animatedProperties[g]=h[1],h=a[g]=h[0]):b.animatedProperties[g]=b.specialEasing&&b.specialEasing[g]||b.easing||"swing";if(h==="hide"&&d||h==="show"&&!d)return b.complete.call(this);c&&(g==="height"||g==="width")&&(b.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],f.css(this,"display")==="inline"&&f.css(this,"float")==="none"&&(!f.support.inlineBlockNeedsLayout||cu(this.nodeName)==="inline"?this.style.display="inline-block":this.style.zoom=1))}b.overflow!=null&&(this.style.overflow="hidden");for(i in a)j=new f.fx(this,b,i),h=a[i],cm.test(h)?(q=f._data(this,"toggle"+i)||(h==="toggle"?d?"show":"hide":0),q?(f._data(this,"toggle"+i,q==="show"?"hide":"show"),j[q]()):j[h]()):(m=cn.exec(h),n=j.cur(),m?(o=parseFloat(m[2]),p=m[3]||(f.cssNumber[i]?"":"px"),p!=="px"&&(f.style(this,i,(o||1)+p),n=(o||1)/j.cur()*n,f.style(this,i,n+p)),m[1]&&(o=(m[1]==="-="?-1:1)*o+n),j.custom(n,o,p)):j.custom(n,h,""));return!0}var e=f.speed(b,c,d);if(f.isEmptyObject(a))return this.each(e.complete,[!1]);a=f.extend({},a);return e.queue===!1?this.each(g):this.queue(e.queue,g)},stop:function(a,c,d){typeof a!="string"&&(d=c,c=a,a=b),c&&a!==!1&&this.queue(a||"fx",[]);return this.each(function(){function h(a,b,c){var e=b[c];f.removeData(a,c,!0),e.stop(d)}var b,c=!1,e=f.timers,g=f._data(this);d||f._unmark(!0,this);if(a==null)for(b in g)g[b]&&g[b].stop&&b.indexOf(".run")===b.length-4&&h(this,g,b);else g[b=a+".run"]&&g[b].stop&&h(this,g,b);for(b=e.length;b--;)e[b].elem===this&&(a==null||e[b].queue===a)&&(d?e[b](!0):e[b].saveState(),c=!0,e.splice(b,1));(!d||!c)&&f.dequeue(this,a)})}}),f.each({slideDown:ct("show",1),slideUp:ct("hide",1),slideToggle:ct("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){f.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),f.extend({speed:function(a,b,c){var d=a&&typeof a=="object"?f.extend({},a):{complete:c||!c&&b||f.isFunction(a)&&a,duration:a,easing:c&&b||b&&!f.isFunction(b)&&b};d.duration=f.fx.off?0:typeof d.duration=="number"?d.duration:d.duration in f.fx.speeds?f.fx.speeds[d.duration]:f.fx.speeds._default;if(d.queue==null||d.queue===!0)d.queue="fx";d.old=d.complete,d.complete=function(a){f.isFunction(d.old)&&d.old.call(this),d.queue?f.dequeue(this,d.queue):a!==!1&&f._unmark(this)};return d},easing:{linear:function(a){return a},swing:function(a){return-Math.cos(a*Math.PI)/2+.5}},timers:[],fx:function(a,b,c){this.options=b,this.elem=a,this.prop=c,b.orig=b.orig||{}}}),f.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(f.fx.step[this.prop]||f.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a,b=f.css(this.elem,this.prop);return isNaN(a=parseFloat(b))?!b||b==="auto"?0:b:a},custom:function(a,c,d){function h(a){return e.step(a)}var e=this,g=f.fx;this.startTime=cq||cr(),this.end=c,this.now=this.start=a,this.pos=this.state=0,this.unit=d||this.unit||(f.cssNumber[this.prop]?"":"px"),h.queue=this.options.queue,h.elem=this.elem,h.saveState=function(){f._data(e.elem,"fxshow"+e.prop)===b&&(e.options.hide?f._data(e.elem,"fxshow"+e.prop,e.start):e.options.show&&f._data(e.elem,"fxshow"+e.prop,e.end))},h()&&f.timers.push(h)&&!co&&(co=setInterval(g.tick,g.interval))},show:function(){var a=f._data(this.elem,"fxshow"+this.prop);this.options.orig[this.prop]=a||f.style(this.elem,this.prop),this.options.show=!0,a!==b?this.custom(this.cur(),a):this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),f(this.elem).show()},hide:function(){this.options.orig[this.prop]=f._data(this.elem,"fxshow"+this.prop)||f.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(a){var b,c,d,e=cq||cr(),g=!0,h=this.elem,i=this.options;if(a||e>=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c<b.length;c++)a=b[c],!a()&&b[c]===a&&b.splice(c--,1);b.length||f.fx.stop()},interval:13,stop:function(){clearInterval(co),co=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){f.style(a.elem,"opacity",a.now)},_default:function(a){a.elem.style&&a.elem.style[a.prop]!=null?a.elem.style[a.prop]=a.now+a.unit:a.elem[a.prop]=a.now}}}),f.each(cp.concat.apply([],cp),function(a,b){b.indexOf("margin")&&(f.fx.step[b]=function(a){f.style(a.elem,b,Math.max(0,a.now)+a.unit)})}),f.expr&&f.expr.filters&&(f.expr.filters.animated=function(a){return f.grep(f.timers,function(b){return a===b.elem}).length});var cv,cw=/^t(?:able|d|h)$/i,cx=/^(?:body|html)$/i;"getBoundingClientRect"in c.documentElement?cv=function(a,b,c,d){try{d=a.getBoundingClientRect()}catch(e){}if(!d||!f.contains(c,a))return d?{top:d.top,left:d.left}:{top:0,left:0};var g=b.body,h=cy(b),i=c.clientTop||g.clientTop||0,j=c.clientLeft||g.clientLeft||0,k=h.pageYOffset||f.support.boxModel&&c.scrollTop||g.scrollTop,l=h.pageXOffset||f.support.boxModel&&c.scrollLeft||g.scrollLeft,m=d.top+k-i,n=d.left+l-j;return{top:m,left:n}}:cv=function(a,b,c){var d,e=a.offsetParent,g=a,h=b.body,i=b.defaultView,j=i?i.getComputedStyle(a,null):a.currentStyle,k=a.offsetTop,l=a.offsetLeft;while((a=a.parentNode)&&a!==h&&a!==c){if(f.support.fixedPosition&&j.position==="fixed")break;d=i?i.getComputedStyle(a,null):a.currentStyle,k-=a.scrollTop,l-=a.scrollLeft,a===e&&(k+=a.offsetTop,l+=a.offsetLeft,f.support.doesNotAddBorder&&(!f.support.doesAddBorderForTableAndCells||!cw.test(a.nodeName))&&(k+=parseFloat(d.borderTopWidth)||0,l+=parseFloat(d.borderLeftWidth)||0),g=e,e=a.offsetParent),f.support.subtractsBorderForOverflowNotVisible&&d.overflow!=="visible"&&(k+=parseFloat(d.borderTopWidth)||0,l+=parseFloat(d.borderLeftWidth)||0),j=d}if(j.position==="relative"||j.position==="static")k+=h.offsetTop,l+=h.offsetLeft;f.support.fixedPosition&&j.position==="fixed"&&(k+=Math.max(c.scrollTop,h.scrollTop),l+=Math.max(c.scrollLeft,h.scrollLeft));return{top:k,left:l}},f.fn.offset=function(a){if(arguments.length)return a===b?this:this.each(function(b){f.offset.setOffset(this,a,b)});var c=this[0],d=c&&c.ownerDocument;if(!d)return null;if(c===d.body)return f.offset.bodyOffset(c);return cv(c,d,d.documentElement)},f.offset={bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;f.support.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(f.css(a,"marginTop"))||0,c+=parseFloat(f.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var d=f.css(a,"position");d==="static"&&(a.style.position="relative");var e=f(a),g=e.offset(),h=f.css(a,"top"),i=f.css(a,"left"),j=(d==="absolute"||d==="fixed")&&f.inArray("auto",[h,i])>-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cx.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cx.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,c){var d=/Y/.test(c);f.fn[a]=function(e){return f.access(this,function(a,e,g){var h=cy(a);if(g===b)return h?c in h?h[c]:f.support.boxModel&&h.document.documentElement[e]||h.document.body[e]:a[e];h?h.scrollTo(d?f(h).scrollLeft():g,d?g:f(h).scrollTop()):a[e]=g},a,e,arguments.length,null)}}),f.each({Height:"height",Width:"width"},function(a,c){var d="client"+a,e="scroll"+a,g="offset"+a;f.fn["inner"+a]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,c,"padding")):this[c]():null},f.fn["outer"+a]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,c,a?"margin":"border")):this[c]():null},f.fn[c]=function(a){return f.access(this,function(a,c,h){var i,j,k,l;if(f.isWindow(a)){i=a.document,j=i.documentElement[d];return f.support.boxModel&&j||i.body&&i.body[d]||j}if(a.nodeType===9){i=a.documentElement;if(i[d]>=i[e])return i[d];return Math.max(a.body[e],i[e],a.body[g],i[g])}if(h===b){k=f.css(a,c),l=parseFloat(k);return f.isNumeric(l)?l:k}f(a).css(c,h)},c,a,arguments.length,null)}}),a.jQuery=a.$=f,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return f})})(window);
(-)a/koha-tmpl/opac-tmpl/bootstrap/lib/jquery/jquery-migrate-3.1.0.js (-678 lines)
Lines 1-678 Link Here
1
/*!
2
 * jQuery Migrate - v3.1.0 - 2019-06-08
3
 * Copyright OpenJS Foundation and other contributors
4
 */
5
;( function( factory ) {
6
    if ( typeof define === "function" && define.amd ) {
7
8
        // AMD. Register as an anonymous module.
9
        define( [ "jquery" ], function ( jQuery ) {
10
            return factory( jQuery, window );
11
        } );
12
    } else if ( typeof module === "object" && module.exports ) {
13
14
        // Node/CommonJS
15
        // eslint-disable-next-line no-undef
16
        module.exports = factory( require( "jquery" ), window );
17
    } else {
18
19
        // Browser globals
20
        factory( jQuery, window );
21
    }
22
} )( function( jQuery, window ) {
23
"use strict";
24
25
26
jQuery.migrateVersion = "3.1.0";
27
28
/* exported jQueryVersionSince, compareVersions */
29
30
// Returns 0 if v1 == v2, -1 if v1 < v2, 1 if v1 > v2
31
function compareVersions( v1, v2 ) {
32
    var rVersionParts = /^(\d+)\.(\d+)\.(\d+)/,
33
        v1p = rVersionParts.exec( v1 ) || [ ],
34
        v2p = rVersionParts.exec( v2 ) || [ ];
35
36
    for ( var i = 1; i <= 3; i++ ) {
37
        if ( +v1p[ i ] > +v2p[ i ] ) {
38
            return 1;
39
        }
40
        if ( +v1p[ i ] < +v2p[ i ] ) {
41
            return -1;
42
        }
43
    }
44
    return 0;
45
}
46
47
function jQueryVersionSince( version ) {
48
    return compareVersions( jQuery.fn.jquery, version ) >= 0;
49
}
50
51
/* exported migrateWarn, migrateWarnFunc, migrateWarnProp */
52
53
( function() {
54
55
    // Support: IE9 only
56
    // IE9 only creates console object when dev tools are first opened
57
    // IE9 console is a host object, callable but doesn't have .apply()
58
    if ( !window.console || !window.console.log ) {
59
        return;
60
    }
61
62
    // Need jQuery 3.0.0+ and no older Migrate loaded
63
    if ( !jQuery || !jQueryVersionSince( "3.0.0" ) ) {
64
        window.console.log( "JQMIGRATE: jQuery 3.0.0+ REQUIRED" );
65
    }
66
    if ( jQuery.migrateWarnings ) {
67
        window.console.log( "JQMIGRATE: Migrate plugin loaded multiple times" );
68
    }
69
70
    // Show a message on the console so devs know we're active
71
    window.console.log( "JQMIGRATE: Migrate is installed" +
72
        ( jQuery.migrateMute ? "" : " with logging active" ) +
73
        ", version " + jQuery.migrateVersion );
74
75
} )();
76
77
var warnedAbout = {};
78
79
// List of warnings already given; public read only
80
jQuery.migrateWarnings = [];
81
82
// Set to false to disable traces that appear with warnings
83
if ( jQuery.migrateTrace === undefined ) {
84
    jQuery.migrateTrace = true;
85
}
86
87
// Forget any warnings we've already given; public
88
jQuery.migrateReset = function() {
89
    warnedAbout = {};
90
    jQuery.migrateWarnings.length = 0;
91
};
92
93
function migrateWarn( msg ) {
94
    var console = window.console;
95
    if ( !warnedAbout[ msg ] ) {
96
        warnedAbout[ msg ] = true;
97
        jQuery.migrateWarnings.push( msg );
98
        if ( console && console.warn && !jQuery.migrateMute ) {
99
            console.warn( "JQMIGRATE: " + msg );
100
            if ( jQuery.migrateTrace && console.trace ) {
101
                console.trace();
102
            }
103
        }
104
    }
105
}
106
107
function migrateWarnProp( obj, prop, value, msg ) {
108
    Object.defineProperty( obj, prop, {
109
        configurable: true,
110
        enumerable: true,
111
        get: function() {
112
            migrateWarn( msg );
113
            return value;
114
        },
115
        set: function( newValue ) {
116
            migrateWarn( msg );
117
            value = newValue;
118
        }
119
    } );
120
}
121
122
function migrateWarnFunc( obj, prop, newFunc, msg ) {
123
    obj[ prop ] = function() {
124
        migrateWarn( msg );
125
        return newFunc.apply( this, arguments );
126
    };
127
}
128
129
if ( window.document.compatMode === "BackCompat" ) {
130
131
    // JQuery has never supported or tested Quirks Mode
132
    migrateWarn( "jQuery is not compatible with Quirks Mode" );
133
}
134
135
136
var oldInit = jQuery.fn.init,
137
    oldIsNumeric = jQuery.isNumeric,
138
    oldFind = jQuery.find,
139
    rattrHashTest = /\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/,
140
    rattrHashGlob = /\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/g;
141
142
jQuery.fn.init = function( arg1 ) {
143
    var args = Array.prototype.slice.call( arguments );
144
145
    if ( typeof arg1 === "string" && arg1 === "#" ) {
146
147
        // JQuery( "#" ) is a bogus ID selector, but it returned an empty set before jQuery 3.0
148
        migrateWarn( "jQuery( '#' ) is not a valid selector" );
149
        args[ 0 ] = [];
150
    }
151
152
    return oldInit.apply( this, args );
153
};
154
jQuery.fn.init.prototype = jQuery.fn;
155
156
jQuery.find = function( selector ) {
157
    var args = Array.prototype.slice.call( arguments );
158
159
    // Support: PhantomJS 1.x
160
    // String#match fails to match when used with a //g RegExp, only on some strings
161
    if ( typeof selector === "string" && rattrHashTest.test( selector ) ) {
162
163
        // The nonstandard and undocumented unquoted-hash was removed in jQuery 1.12.0
164
        // First see if qS thinks it's a valid selector, if so avoid a false positive
165
        try {
166
            window.document.querySelector( selector );
167
        } catch ( err1 ) {
168
169
            // Didn't *look* valid to qSA, warn and try quoting what we think is the value
170
            selector = selector.replace( rattrHashGlob, function( _, attr, op, value ) {
171
                return "[" + attr + op + "\"" + value + "\"]";
172
            } );
173
174
            // If the regexp *may* have created an invalid selector, don't update it
175
            // Note that there may be false alarms if selector uses jQuery extensions
176
            try {
177
                window.document.querySelector( selector );
178
                migrateWarn( "Attribute selector with '#' must be quoted: " + args[ 0 ] );
179
                args[ 0 ] = selector;
180
            } catch ( err2 ) {
181
                migrateWarn( "Attribute selector with '#' was not fixed: " + args[ 0 ] );
182
            }
183
        }
184
    }
185
186
    return oldFind.apply( this, args );
187
};
188
189
// Copy properties attached to original jQuery.find method (e.g. .attr, .isXML)
190
var findProp;
191
for ( findProp in oldFind ) {
192
    if ( Object.prototype.hasOwnProperty.call( oldFind, findProp ) ) {
193
        jQuery.find[ findProp ] = oldFind[ findProp ];
194
    }
195
}
196
197
// The number of elements contained in the matched element set
198
jQuery.fn.size = function() {
199
    migrateWarn( "jQuery.fn.size() is deprecated and removed; use the .length property" );
200
    return this.length;
201
};
202
203
jQuery.parseJSON = function() {
204
    migrateWarn( "jQuery.parseJSON is deprecated; use JSON.parse" );
205
    return JSON.parse.apply( null, arguments );
206
};
207
208
jQuery.isNumeric = function( val ) {
209
210
    // The jQuery 2.2.3 implementation of isNumeric
211
    function isNumeric2( obj ) {
212
        var realStringObj = obj && obj.toString();
213
        return !jQuery.isArray( obj ) && ( realStringObj - parseFloat( realStringObj ) + 1 ) >= 0;
214
    }
215
216
    var newValue = oldIsNumeric( val ),
217
        oldValue = isNumeric2( val );
218
219
    if ( newValue !== oldValue ) {
220
        migrateWarn( "jQuery.isNumeric() should not be called on constructed objects" );
221
    }
222
223
    return oldValue;
224
};
225
226
if ( jQueryVersionSince( "3.3.0" ) ) {
227
    migrateWarnFunc( jQuery, "isWindow",
228
        function( obj ) {
229
            return obj != null && obj === obj.window;
230
        },
231
        "jQuery.isWindow() is deprecated"
232
    );
233
}
234
235
migrateWarnFunc( jQuery, "holdReady", jQuery.holdReady,
236
    "jQuery.holdReady is deprecated" );
237
238
migrateWarnFunc( jQuery, "unique", jQuery.uniqueSort,
239
    "jQuery.unique is deprecated; use jQuery.uniqueSort" );
240
241
// Now jQuery.expr.pseudos is the standard incantation
242
migrateWarnProp( jQuery.expr, "filters", jQuery.expr.pseudos,
243
    "jQuery.expr.filters is deprecated; use jQuery.expr.pseudos" );
244
migrateWarnProp( jQuery.expr, ":", jQuery.expr.pseudos,
245
    "jQuery.expr[':'] is deprecated; use jQuery.expr.pseudos" );
246
247
// Prior to jQuery 3.2 there were internal refs so we don't warn there
248
if ( jQueryVersionSince( "3.2.0" ) ) {
249
    migrateWarnFunc( jQuery, "nodeName", jQuery.nodeName,
250
    "jQuery.nodeName is deprecated" );
251
}
252
253
254
var oldAjax = jQuery.ajax;
255
256
jQuery.ajax = function( ) {
257
    var jQXHR = oldAjax.apply( this, arguments );
258
259
    // Be sure we got a jQXHR (e.g., not sync)
260
    if ( jQXHR.promise ) {
261
        migrateWarnFunc( jQXHR, "success", jQXHR.done,
262
            "jQXHR.success is deprecated and removed" );
263
        migrateWarnFunc( jQXHR, "error", jQXHR.fail,
264
            "jQXHR.error is deprecated and removed" );
265
        migrateWarnFunc( jQXHR, "complete", jQXHR.always,
266
            "jQXHR.complete is deprecated and removed" );
267
    }
268
269
    return jQXHR;
270
};
271
272
273
var oldRemoveAttr = jQuery.fn.removeAttr,
274
    oldToggleClass = jQuery.fn.toggleClass,
275
    rmatchNonSpace = /\S+/g;
276
277
jQuery.fn.removeAttr = function( name ) {
278
    var self = this;
279
280
    jQuery.each( name.match( rmatchNonSpace ), function( _i, attr ) {
281
        if ( jQuery.expr.match.bool.test( attr ) ) {
282
            migrateWarn( "jQuery.fn.removeAttr no longer sets boolean properties: " + attr );
283
            self.prop( attr, false );
284
        }
285
    } );
286
287
    return oldRemoveAttr.apply( this, arguments );
288
};
289
290
jQuery.fn.toggleClass = function( state ) {
291
292
    // Only deprecating no-args or single boolean arg
293
    if ( state !== undefined && typeof state !== "boolean" ) {
294
        return oldToggleClass.apply( this, arguments );
295
    }
296
297
    migrateWarn( "jQuery.fn.toggleClass( boolean ) is deprecated" );
298
299
    // Toggle entire class name of each element
300
    return this.each( function() {
301
        var className = this.getAttribute && this.getAttribute( "class" ) || "";
302
303
        if ( className ) {
304
            jQuery.data( this, "__className__", className );
305
        }
306
307
        // If the element has a class name or if we're passed `false`,
308
        // then remove the whole classname (if there was one, the above saved it).
309
        // Otherwise bring back whatever was previously saved (if anything),
310
        // falling back to the empty string if nothing was stored.
311
        if ( this.setAttribute ) {
312
            this.setAttribute( "class",
313
                className || state === false ?
314
                "" :
315
                jQuery.data( this, "__className__" ) || ""
316
            );
317
        }
318
    } );
319
};
320
321
322
var internalSwapCall = false;
323
324
// If this version of jQuery has .swap(), don't false-alarm on internal uses
325
if ( jQuery.swap ) {
326
    jQuery.each( [ "height", "width", "reliableMarginRight" ], function( _, name ) {
327
        var oldHook = jQuery.cssHooks[ name ] && jQuery.cssHooks[ name ].get;
328
329
        if ( oldHook ) {
330
            jQuery.cssHooks[ name ].get = function() {
331
                var ret;
332
333
                internalSwapCall = true;
334
                ret = oldHook.apply( this, arguments );
335
                internalSwapCall = false;
336
                return ret;
337
            };
338
        }
339
    } );
340
}
341
342
jQuery.swap = function( elem, options, callback, args ) {
343
    var ret, name,
344
        old = {};
345
346
    if ( !internalSwapCall ) {
347
        migrateWarn( "jQuery.swap() is undocumented and deprecated" );
348
    }
349
350
    // Remember the old values, and insert the new ones
351
    for ( name in options ) {
352
        old[ name ] = elem.style[ name ];
353
        elem.style[ name ] = options[ name ];
354
    }
355
356
    ret = callback.apply( elem, args || [] );
357
358
    // Revert the old values
359
    for ( name in options ) {
360
        elem.style[ name ] = old[ name ];
361
    }
362
363
    return ret;
364
};
365
366
var oldData = jQuery.data;
367
368
jQuery.data = function( elem, name, value ) {
369
    var curData;
370
371
    // Name can be an object, and each entry in the object is meant to be set as data
372
    if ( name && typeof name === "object" && arguments.length === 2 ) {
373
        curData = jQuery.hasData( elem ) && oldData.call( this, elem );
374
        var sameKeys = {};
375
        for ( var key in name ) {
376
            if ( key !== jQuery.camelCase( key ) ) {
377
                migrateWarn( "jQuery.data() always sets/gets camelCased names: " + key );
378
                curData[ key ] = name[ key ];
379
            } else {
380
                sameKeys[ key ] = name[ key ];
381
            }
382
        }
383
384
        oldData.call( this, elem, sameKeys );
385
386
        return name;
387
    }
388
389
    // If the name is transformed, look for the un-transformed name in the data object
390
    if ( name && typeof name === "string" && name !== jQuery.camelCase( name ) ) {
391
        curData = jQuery.hasData( elem ) && oldData.call( this, elem );
392
        if ( curData && name in curData ) {
393
            migrateWarn( "jQuery.data() always sets/gets camelCased names: " + name );
394
            if ( arguments.length > 2 ) {
395
                curData[ name ] = value;
396
            }
397
            return curData[ name ];
398
        }
399
    }
400
401
    return oldData.apply( this, arguments );
402
};
403
404
var oldTweenRun = jQuery.Tween.prototype.run;
405
var linearEasing = function( pct ) {
406
        return pct;
407
    };
408
409
jQuery.Tween.prototype.run = function( ) {
410
    if ( jQuery.easing[ this.easing ].length > 1 ) {
411
        migrateWarn(
412
            "'jQuery.easing." + this.easing.toString() + "' should use only one argument"
413
        );
414
415
        jQuery.easing[ this.easing ] = linearEasing;
416
    }
417
418
    oldTweenRun.apply( this, arguments );
419
};
420
421
var intervalValue = jQuery.fx.interval || 13,
422
    intervalMsg = "jQuery.fx.interval is deprecated";
423
424
// Support: IE9, Android <=4.4
425
// Avoid false positives on browsers that lack rAF
426
// Don't warn if document is hidden, jQuery uses setTimeout (#292)
427
if ( window.requestAnimationFrame ) {
428
    Object.defineProperty( jQuery.fx, "interval", {
429
        configurable: true,
430
        enumerable: true,
431
        get: function() {
432
            if ( !window.document.hidden ) {
433
                migrateWarn( intervalMsg );
434
            }
435
            return intervalValue;
436
        },
437
        set: function( newValue ) {
438
            migrateWarn( intervalMsg );
439
            intervalValue = newValue;
440
        }
441
    } );
442
}
443
444
var oldLoad = jQuery.fn.load,
445
    oldEventAdd = jQuery.event.add,
446
    originalFix = jQuery.event.fix;
447
448
jQuery.event.props = [];
449
jQuery.event.fixHooks = {};
450
451
migrateWarnProp( jQuery.event.props, "concat", jQuery.event.props.concat,
452
    "jQuery.event.props.concat() is deprecated and removed" );
453
454
jQuery.event.fix = function( originalEvent ) {
455
    var event,
456
        type = originalEvent.type,
457
        fixHook = this.fixHooks[ type ],
458
        props = jQuery.event.props;
459
460
    if ( props.length ) {
461
        migrateWarn( "jQuery.event.props are deprecated and removed: " + props.join() );
462
        while ( props.length ) {
463
            jQuery.event.addProp( props.pop() );
464
        }
465
    }
466
467
    if ( fixHook && !fixHook._migrated_ ) {
468
        fixHook._migrated_ = true;
469
        migrateWarn( "jQuery.event.fixHooks are deprecated and removed: " + type );
470
        if ( ( props = fixHook.props ) && props.length ) {
471
            while ( props.length ) {
472
                jQuery.event.addProp( props.pop() );
473
            }
474
        }
475
    }
476
477
    event = originalFix.call( this, originalEvent );
478
479
    return fixHook && fixHook.filter ? fixHook.filter( event, originalEvent ) : event;
480
};
481
482
jQuery.event.add = function( elem, types ) {
483
484
    // This misses the multiple-types case but that seems awfully rare
485
    if ( elem === window && types === "load" && window.document.readyState === "complete" ) {
486
        migrateWarn( "jQuery(window).on('load'...) called after load event occurred" );
487
    }
488
    return oldEventAdd.apply( this, arguments );
489
};
490
491
jQuery.each( [ "load", "unload", "error" ], function( _, name ) {
492
493
    jQuery.fn[ name ] = function() {
494
        var args = Array.prototype.slice.call( arguments, 0 );
495
496
        // If this is an ajax load() the first arg should be the string URL;
497
        // technically this could also be the "Anything" arg of the event .load()
498
        // which just goes to show why this dumb signature has been deprecated!
499
        // jQuery custom builds that exclude the Ajax module justifiably die here.
500
        if ( name === "load" && typeof args[ 0 ] === "string" ) {
501
            return oldLoad.apply( this, args );
502
        }
503
504
        migrateWarn( "jQuery.fn." + name + "() is deprecated" );
505
506
        args.splice( 0, 0, name );
507
        if ( arguments.length ) {
508
            return this.on.apply( this, args );
509
        }
510
511
        // Use .triggerHandler here because:
512
        // - load and unload events don't need to bubble, only applied to window or image
513
        // - error event should not bubble to window, although it does pre-1.7
514
        // See http://bugs.jquery.com/ticket/11820
515
        this.triggerHandler.apply( this, args );
516
        return this;
517
    };
518
519
} );
520
521
jQuery.each( ( "blur focus focusin focusout resize scroll click dblclick " +
522
    "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
523
    "change select submit keydown keypress keyup contextmenu" ).split( " " ),
524
    function( _i, name ) {
525
526
    // Handle event binding
527
    jQuery.fn[ name ] = function( data, fn ) {
528
        migrateWarn( "jQuery.fn." + name + "() event shorthand is deprecated" );
529
        return arguments.length > 0 ?
530
            this.on( name, null, data, fn ) :
531
            this.trigger( name );
532
    };
533
} );
534
535
// Trigger "ready" event only once, on document ready
536
jQuery( function() {
537
    jQuery( window.document ).triggerHandler( "ready" );
538
} );
539
540
jQuery.event.special.ready = {
541
    setup: function() {
542
        if ( this === window.document ) {
543
            migrateWarn( "'ready' event is deprecated" );
544
        }
545
    }
546
};
547
548
jQuery.fn.extend( {
549
550
    bind: function( types, data, fn ) {
551
        migrateWarn( "jQuery.fn.bind() is deprecated" );
552
        return this.on( types, null, data, fn );
553
    },
554
    unbind: function( types, fn ) {
555
        migrateWarn( "jQuery.fn.unbind() is deprecated" );
556
        return this.off( types, null, fn );
557
    },
558
    delegate: function( selector, types, data, fn ) {
559
        migrateWarn( "jQuery.fn.delegate() is deprecated" );
560
        return this.on( types, selector, data, fn );
561
    },
562
    undelegate: function( selector, types, fn ) {
563
        migrateWarn( "jQuery.fn.undelegate() is deprecated" );
564
        return arguments.length === 1 ?
565
            this.off( selector, "**" ) :
566
            this.off( types, selector || "**", fn );
567
    },
568
    hover: function( fnOver, fnOut ) {
569
        migrateWarn( "jQuery.fn.hover() is deprecated" );
570
        return this.on( "mouseenter", fnOver ).on( "mouseleave", fnOut || fnOver );
571
    }
572
} );
573
574
575
var oldOffset = jQuery.fn.offset;
576
577
jQuery.fn.offset = function() {
578
    var docElem,
579
        elem = this[ 0 ],
580
        origin = { top: 0, left: 0 };
581
582
    if ( !elem || !elem.nodeType ) {
583
        migrateWarn( "jQuery.fn.offset() requires a valid DOM element" );
584
        return origin;
585
    }
586
587
    docElem = ( elem.ownerDocument || window.document ).documentElement;
588
    if ( !jQuery.contains( docElem, elem ) ) {
589
        migrateWarn( "jQuery.fn.offset() requires an element connected to a document" );
590
        return origin;
591
    }
592
593
    return oldOffset.apply( this, arguments );
594
};
595
596
597
var oldParam = jQuery.param;
598
599
jQuery.param = function( data, traditional ) {
600
    var ajaxTraditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional;
601
602
    if ( traditional === undefined && ajaxTraditional ) {
603
604
        migrateWarn( "jQuery.param() no longer uses jQuery.ajaxSettings.traditional" );
605
        traditional = ajaxTraditional;
606
    }
607
608
    return oldParam.call( this, data, traditional );
609
};
610
611
var oldSelf = jQuery.fn.andSelf || jQuery.fn.addBack;
612
613
jQuery.fn.andSelf = function() {
614
    migrateWarn( "jQuery.fn.andSelf() is deprecated and removed, use jQuery.fn.addBack()" );
615
    return oldSelf.apply( this, arguments );
616
};
617
618
619
var oldDeferred = jQuery.Deferred,
620
    tuples = [
621
622
        // Action, add listener, callbacks, .then handlers, final state
623
        [ "resolve", "done", jQuery.Callbacks( "once memory" ),
624
            jQuery.Callbacks( "once memory" ), "resolved" ],
625
        [ "reject", "fail", jQuery.Callbacks( "once memory" ),
626
            jQuery.Callbacks( "once memory" ), "rejected" ],
627
        [ "notify", "progress", jQuery.Callbacks( "memory" ),
628
            jQuery.Callbacks( "memory" ) ]
629
    ];
630
631
jQuery.Deferred = function( func ) {
632
    var deferred = oldDeferred(),
633
        promise = deferred.promise();
634
635
    deferred.pipe = promise.pipe = function( /* fnDone, fnFail, fnProgress */ ) {
636
        var fns = arguments;
637
638
        migrateWarn( "deferred.pipe() is deprecated" );
639
640
        return jQuery.Deferred( function( newDefer ) {
641
            jQuery.each( tuples, function( i, tuple ) {
642
                var fn = jQuery.isFunction( fns[ i ] ) && fns[ i ];
643
644
                // Deferred.done(function() { bind to newDefer or newDefer.resolve })
645
                // deferred.fail(function() { bind to newDefer or newDefer.reject })
646
                // deferred.progress(function() { bind to newDefer or newDefer.notify })
647
                deferred[ tuple[ 1 ] ]( function() {
648
                    var returned = fn && fn.apply( this, arguments );
649
                    if ( returned && jQuery.isFunction( returned.promise ) ) {
650
                        returned.promise()
651
                            .done( newDefer.resolve )
652
                            .fail( newDefer.reject )
653
                            .progress( newDefer.notify );
654
                    } else {
655
                        newDefer[ tuple[ 0 ] + "With" ](
656
                            this === promise ? newDefer.promise() : this,
657
                            fn ? [ returned ] : arguments
658
                        );
659
                    }
660
                } );
661
            } );
662
            fns = null;
663
        } ).promise();
664
665
    };
666
667
    if ( func ) {
668
        func.call( deferred, deferred );
669
    }
670
671
    return deferred;
672
};
673
674
// Preserve handler of uncaught exceptions in promise chains
675
jQuery.Deferred.exceptionHook = oldDeferred.exceptionHook;
676
677
return jQuery;
678
} );
(-)a/koha-tmpl/opac-tmpl/bootstrap/lib/jquery/jquery-ui-1.12.1.css (-874 lines)
Lines 1-874 Link Here
1
/*! jQuery UI - v1.12.1 - 2019-08-16
2
* http://jqueryui.com
3
* Includes: sortable.css, core.css, autocomplete.css, menu.css, datepicker.css, slider.css, tabs.css, tooltip.css, theme.css
4
* To view and modify this theme, visit http://jqueryui.com/themeroller/?scope=&folderName=smoothness&cornerRadiusShadow=8px&offsetLeftShadow=-8px&offsetTopShadow=-8px&thicknessShadow=8px&opacityShadow=30&bgImgOpacityShadow=0&bgTextureShadow=flat&bgColorShadow=aaaaaa&opacityOverlay=30&bgImgOpacityOverlay=0&bgTextureOverlay=flat&bgColorOverlay=aaaaaa&iconColorError=cd0a0a&fcError=cd0a0a&borderColorError=cd0a0a&bgImgOpacityError=95&bgTextureError=glass&bgColorError=fef1ec&iconColorHighlight=2e83ff&fcHighlight=363636&borderColorHighlight=fcefa1&bgImgOpacityHighlight=55&bgTextureHighlight=glass&bgColorHighlight=fbf9ee&iconColorActive=454545&fcActive=212121&borderColorActive=aaaaaa&bgImgOpacityActive=65&bgTextureActive=glass&bgColorActive=ffffff&iconColorHover=454545&fcHover=212121&borderColorHover=999999&bgImgOpacityHover=75&bgTextureHover=glass&bgColorHover=dadada&iconColorDefault=888888&fcDefault=555555&borderColorDefault=d3d3d3&bgImgOpacityDefault=75&bgTextureDefault=glass&bgColorDefault=e6e6e6&iconColorContent=222222&fcContent=222222&borderColorContent=aaaaaa&bgImgOpacityContent=75&bgTextureContent=flat&bgColorContent=ffffff&iconColorHeader=222222&fcHeader=222222&borderColorHeader=aaaaaa&bgImgOpacityHeader=75&bgTextureHeader=highlight_soft&bgColorHeader=cccccc&cornerRadius=4px&fsDefault=1.1em&fwDefault=normal&ffDefault=Verdana%2CArial%2Csans-serif
5
* Copyright jQuery Foundation and other contributors; Licensed MIT */
6
7
.ui-sortable-handle {
8
	-ms-touch-action: none;
9
	touch-action: none;
10
}
11
/* Layout helpers
12
----------------------------------*/
13
.ui-helper-hidden {
14
	display: none;
15
}
16
.ui-helper-hidden-accessible {
17
	border: 0;
18
	clip: rect(0 0 0 0);
19
	height: 1px;
20
	margin: -1px;
21
	overflow: hidden;
22
	padding: 0;
23
	position: absolute;
24
	width: 1px;
25
}
26
.ui-helper-reset {
27
	margin: 0;
28
	padding: 0;
29
	border: 0;
30
	outline: 0;
31
	line-height: 1.3;
32
	text-decoration: none;
33
	font-size: 100%;
34
	list-style: none;
35
}
36
.ui-helper-clearfix:before,
37
.ui-helper-clearfix:after {
38
	content: "";
39
	display: table;
40
	border-collapse: collapse;
41
}
42
.ui-helper-clearfix:after {
43
	clear: both;
44
}
45
.ui-helper-zfix {
46
	width: 100%;
47
	height: 100%;
48
	top: 0;
49
	left: 0;
50
	position: absolute;
51
	opacity: 0;
52
	filter:Alpha(Opacity=0); /* support: IE8 */
53
}
54
55
.ui-front {
56
	z-index: 100;
57
}
58
59
60
/* Interaction Cues
61
----------------------------------*/
62
.ui-state-disabled {
63
	cursor: default !important;
64
	pointer-events: none;
65
}
66
67
68
/* Icons
69
----------------------------------*/
70
.ui-icon {
71
	display: inline-block;
72
	vertical-align: middle;
73
	margin-top: -.25em;
74
	position: relative;
75
	text-indent: -99999px;
76
	overflow: hidden;
77
	background-repeat: no-repeat;
78
}
79
80
.ui-widget-icon-block {
81
	left: 50%;
82
	margin-left: -8px;
83
	display: block;
84
}
85
86
/* Misc visuals
87
----------------------------------*/
88
89
/* Overlays */
90
.ui-widget-overlay {
91
	position: fixed;
92
	top: 0;
93
	left: 0;
94
	width: 100%;
95
	height: 100%;
96
}
97
.ui-autocomplete {
98
	position: absolute;
99
	top: 0;
100
	left: 0;
101
	cursor: default;
102
}
103
.ui-menu {
104
	list-style: none;
105
	padding: 0;
106
	margin: 0;
107
	display: block;
108
	outline: 0;
109
}
110
.ui-menu .ui-menu {
111
	position: absolute;
112
}
113
.ui-menu .ui-menu-item {
114
	margin: 0;
115
	cursor: pointer;
116
	/* support: IE10, see #8844 */
117
	list-style-image: url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7");
118
}
119
.ui-menu .ui-menu-item-wrapper {
120
	position: relative;
121
	padding: 3px 1em 3px .4em;
122
}
123
.ui-menu .ui-menu-divider {
124
	margin: 5px 0;
125
	height: 0;
126
	font-size: 0;
127
	line-height: 0;
128
	border-width: 1px 0 0 0;
129
}
130
.ui-menu .ui-state-focus,
131
.ui-menu .ui-state-active {
132
	margin: -1px;
133
}
134
135
/* icon support */
136
.ui-menu-icons {
137
	position: relative;
138
}
139
.ui-menu-icons .ui-menu-item-wrapper {
140
	padding-left: 2em;
141
}
142
143
/* left-aligned */
144
.ui-menu .ui-icon {
145
	position: absolute;
146
	top: 0;
147
	bottom: 0;
148
	left: .2em;
149
	margin: auto 0;
150
}
151
152
/* right-aligned */
153
.ui-menu .ui-menu-icon {
154
	left: auto;
155
	right: 0;
156
}
157
.ui-datepicker {
158
	width: 17em;
159
	padding: .2em .2em 0;
160
	display: none;
161
}
162
.ui-datepicker .ui-datepicker-header {
163
	position: relative;
164
	padding: .2em 0;
165
}
166
.ui-datepicker .ui-datepicker-prev,
167
.ui-datepicker .ui-datepicker-next {
168
	position: absolute;
169
	top: 2px;
170
	width: 1.8em;
171
	height: 1.8em;
172
}
173
.ui-datepicker .ui-datepicker-prev-hover,
174
.ui-datepicker .ui-datepicker-next-hover {
175
	top: 1px;
176
}
177
.ui-datepicker .ui-datepicker-prev {
178
	left: 2px;
179
}
180
.ui-datepicker .ui-datepicker-next {
181
	right: 2px;
182
}
183
.ui-datepicker .ui-datepicker-prev-hover {
184
	left: 1px;
185
}
186
.ui-datepicker .ui-datepicker-next-hover {
187
	right: 1px;
188
}
189
.ui-datepicker .ui-datepicker-prev span,
190
.ui-datepicker .ui-datepicker-next span {
191
	display: block;
192
	position: absolute;
193
	left: 50%;
194
	margin-left: -8px;
195
	top: 50%;
196
	margin-top: -8px;
197
}
198
.ui-datepicker .ui-datepicker-title {
199
	margin: 0 2.3em;
200
	line-height: 1.8em;
201
	text-align: center;
202
}
203
.ui-datepicker .ui-datepicker-title select {
204
	font-size: 1em;
205
	margin: 1px 0;
206
}
207
.ui-datepicker select.ui-datepicker-month,
208
.ui-datepicker select.ui-datepicker-year {
209
	width: 45%;
210
}
211
.ui-datepicker table {
212
	width: 100%;
213
	font-size: .9em;
214
	border-collapse: collapse;
215
	margin: 0 0 .4em;
216
}
217
.ui-datepicker th {
218
	padding: .7em .3em;
219
	text-align: center;
220
	font-weight: bold;
221
	border: 0;
222
}
223
.ui-datepicker td {
224
	border: 0;
225
	padding: 1px;
226
}
227
.ui-datepicker td span,
228
.ui-datepicker td a {
229
	display: block;
230
	padding: .2em;
231
	text-align: right;
232
	text-decoration: none;
233
}
234
.ui-datepicker .ui-datepicker-buttonpane {
235
	background-image: none;
236
	margin: .7em 0 0 0;
237
	padding: 0 .2em;
238
	border-left: 0;
239
	border-right: 0;
240
	border-bottom: 0;
241
}
242
.ui-datepicker .ui-datepicker-buttonpane button {
243
	float: right;
244
	margin: .5em .2em .4em;
245
	cursor: pointer;
246
	padding: .2em .6em .3em .6em;
247
	width: auto;
248
	overflow: visible;
249
}
250
.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current {
251
	float: left;
252
}
253
254
/* with multiple calendars */
255
.ui-datepicker.ui-datepicker-multi {
256
	width: auto;
257
}
258
.ui-datepicker-multi .ui-datepicker-group {
259
	float: left;
260
}
261
.ui-datepicker-multi .ui-datepicker-group table {
262
	width: 95%;
263
	margin: 0 auto .4em;
264
}
265
.ui-datepicker-multi-2 .ui-datepicker-group {
266
	width: 50%;
267
}
268
.ui-datepicker-multi-3 .ui-datepicker-group {
269
	width: 33.3%;
270
}
271
.ui-datepicker-multi-4 .ui-datepicker-group {
272
	width: 25%;
273
}
274
.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,
275
.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header {
276
	border-left-width: 0;
277
}
278
.ui-datepicker-multi .ui-datepicker-buttonpane {
279
	clear: left;
280
}
281
.ui-datepicker-row-break {
282
	clear: both;
283
	width: 100%;
284
	font-size: 0;
285
}
286
287
/* RTL support */
288
.ui-datepicker-rtl {
289
	direction: rtl;
290
}
291
.ui-datepicker-rtl .ui-datepicker-prev {
292
	right: 2px;
293
	left: auto;
294
}
295
.ui-datepicker-rtl .ui-datepicker-next {
296
	left: 2px;
297
	right: auto;
298
}
299
.ui-datepicker-rtl .ui-datepicker-prev:hover {
300
	right: 1px;
301
	left: auto;
302
}
303
.ui-datepicker-rtl .ui-datepicker-next:hover {
304
	left: 1px;
305
	right: auto;
306
}
307
.ui-datepicker-rtl .ui-datepicker-buttonpane {
308
	clear: right;
309
}
310
.ui-datepicker-rtl .ui-datepicker-buttonpane button {
311
	float: left;
312
}
313
.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current,
314
.ui-datepicker-rtl .ui-datepicker-group {
315
	float: right;
316
}
317
.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header,
318
.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header {
319
	border-right-width: 0;
320
	border-left-width: 1px;
321
}
322
323
/* Icons */
324
.ui-datepicker .ui-icon {
325
	display: block;
326
	text-indent: -99999px;
327
	overflow: hidden;
328
	background-repeat: no-repeat;
329
	left: .5em;
330
	top: .3em;
331
}
332
.ui-slider {
333
	position: relative;
334
	text-align: left;
335
}
336
.ui-slider .ui-slider-handle {
337
	position: absolute;
338
	z-index: 2;
339
	width: 1.2em;
340
	height: 1.2em;
341
	cursor: default;
342
	-ms-touch-action: none;
343
	touch-action: none;
344
}
345
.ui-slider .ui-slider-range {
346
	position: absolute;
347
	z-index: 1;
348
	font-size: .7em;
349
	display: block;
350
	border: 0;
351
	background-position: 0 0;
352
}
353
354
/* support: IE8 - See #6727 */
355
.ui-slider.ui-state-disabled .ui-slider-handle,
356
.ui-slider.ui-state-disabled .ui-slider-range {
357
	filter: inherit;
358
}
359
360
.ui-slider-horizontal {
361
	height: .8em;
362
}
363
.ui-slider-horizontal .ui-slider-handle {
364
	top: -.3em;
365
	margin-left: -.6em;
366
}
367
.ui-slider-horizontal .ui-slider-range {
368
	top: 0;
369
	height: 100%;
370
}
371
.ui-slider-horizontal .ui-slider-range-min {
372
	left: 0;
373
}
374
.ui-slider-horizontal .ui-slider-range-max {
375
	right: 0;
376
}
377
378
.ui-slider-vertical {
379
	width: .8em;
380
	height: 100px;
381
}
382
.ui-slider-vertical .ui-slider-handle {
383
	left: -.3em;
384
	margin-left: 0;
385
	margin-bottom: -.6em;
386
}
387
.ui-slider-vertical .ui-slider-range {
388
	left: 0;
389
	width: 100%;
390
}
391
.ui-slider-vertical .ui-slider-range-min {
392
	bottom: 0;
393
}
394
.ui-slider-vertical .ui-slider-range-max {
395
	top: 0;
396
}
397
.ui-tabs {
398
	position: relative;/* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
399
	padding: .2em;
400
}
401
.ui-tabs .ui-tabs-nav {
402
	margin: 0;
403
	padding: .2em .2em 0;
404
}
405
.ui-tabs .ui-tabs-nav li {
406
	list-style: none;
407
	float: left;
408
	position: relative;
409
	top: 0;
410
	margin: 1px .2em 0 0;
411
	border-bottom-width: 0;
412
	padding: 0;
413
	white-space: nowrap;
414
}
415
.ui-tabs .ui-tabs-nav .ui-tabs-anchor {
416
	float: left;
417
	padding: .5em 1em;
418
	text-decoration: none;
419
}
420
.ui-tabs .ui-tabs-nav li.ui-tabs-active {
421
	margin-bottom: -1px;
422
	padding-bottom: 1px;
423
}
424
.ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor,
425
.ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor,
426
.ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor {
427
	cursor: text;
428
}
429
.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor {
430
	cursor: pointer;
431
}
432
.ui-tabs .ui-tabs-panel {
433
	display: block;
434
	border-width: 0;
435
	padding: 1em 1.4em;
436
	background: none;
437
}
438
.ui-tooltip {
439
	padding: 8px;
440
	position: absolute;
441
	z-index: 9999;
442
	max-width: 300px;
443
}
444
body .ui-tooltip {
445
	border-width: 2px;
446
}
447
448
/* Component containers
449
----------------------------------*/
450
.ui-widget {
451
	font-size: 1.1em;
452
}
453
.ui-widget .ui-widget {
454
	font-size: 1em;
455
}
456
.ui-widget input,
457
.ui-widget select,
458
.ui-widget textarea,
459
.ui-widget button {
460
	font-size: 1em;
461
}
462
.ui-widget.ui-widget-content {
463
	border: 1px solid #d3d3d3;
464
}
465
.ui-widget-content {
466
	border: 1px solid #aaaaaa;
467
	background: #ffffff;
468
	color: #222222;
469
}
470
.ui-widget-content a {
471
	color: #222222;
472
}
473
.ui-widget-header {
474
	border: 1px solid #aaaaaa;
475
	background: #cccccc url("images/ui-bg_highlight-soft_75_cccccc_1x100.png") 50% 50% repeat-x;
476
	color: #222222;
477
	font-weight: bold;
478
}
479
.ui-widget-header a {
480
	color: #222222;
481
}
482
483
/* Interaction states
484
----------------------------------*/
485
.ui-state-default,
486
.ui-widget-content .ui-state-default,
487
.ui-widget-header .ui-state-default,
488
.ui-button,
489
490
/* We use html here because we need a greater specificity to make sure disabled
491
works properly when clicked or hovered */
492
html .ui-button.ui-state-disabled:hover,
493
html .ui-button.ui-state-disabled:active {
494
	border: 1px solid #d3d3d3;
495
	background: #e6e6e6 url("images/ui-bg_glass_75_e6e6e6_1x400.png") 50% 50% repeat-x;
496
	font-weight: normal;
497
	color: #555555;
498
}
499
.ui-state-default a,
500
.ui-state-default a:link,
501
.ui-state-default a:visited,
502
a.ui-button,
503
a:link.ui-button,
504
a:visited.ui-button,
505
.ui-button {
506
	color: #555555;
507
	text-decoration: none;
508
}
509
.ui-state-hover,
510
.ui-widget-content .ui-state-hover,
511
.ui-widget-header .ui-state-hover,
512
.ui-state-focus,
513
.ui-widget-content .ui-state-focus,
514
.ui-widget-header .ui-state-focus,
515
.ui-button:hover,
516
.ui-button:focus {
517
	border: 1px solid #999999;
518
	background: #dadada url("images/ui-bg_glass_75_dadada_1x400.png") 50% 50% repeat-x;
519
	font-weight: normal;
520
	color: #212121;
521
}
522
.ui-state-hover a,
523
.ui-state-hover a:hover,
524
.ui-state-hover a:link,
525
.ui-state-hover a:visited,
526
.ui-state-focus a,
527
.ui-state-focus a:hover,
528
.ui-state-focus a:link,
529
.ui-state-focus a:visited,
530
a.ui-button:hover,
531
a.ui-button:focus {
532
	color: #212121;
533
	text-decoration: none;
534
}
535
536
.ui-visual-focus {
537
	box-shadow: 0 0 3px 1px rgb(94, 158, 214);
538
}
539
.ui-state-active,
540
.ui-widget-content .ui-state-active,
541
.ui-widget-header .ui-state-active,
542
a.ui-button:active,
543
.ui-button:active,
544
.ui-button.ui-state-active:hover {
545
	border: 1px solid #aaaaaa;
546
	background: #ffffff url("images/ui-bg_glass_65_ffffff_1x400.png") 50% 50% repeat-x;
547
	font-weight: normal;
548
	color: #212121;
549
}
550
.ui-icon-background,
551
.ui-state-active .ui-icon-background {
552
	border: #aaaaaa;
553
	background-color: #212121;
554
}
555
.ui-state-active a,
556
.ui-state-active a:link,
557
.ui-state-active a:visited {
558
	color: #212121;
559
	text-decoration: none;
560
}
561
562
/* Interaction Cues
563
----------------------------------*/
564
.ui-state-highlight,
565
.ui-widget-content .ui-state-highlight,
566
.ui-widget-header .ui-state-highlight {
567
	border: 1px solid #fcefa1;
568
	background: #fbf9ee url("images/ui-bg_glass_55_fbf9ee_1x400.png") 50% 50% repeat-x;
569
	color: #363636;
570
}
571
.ui-state-checked {
572
	border: 1px solid #fcefa1;
573
	background: #fbf9ee;
574
}
575
.ui-state-highlight a,
576
.ui-widget-content .ui-state-highlight a,
577
.ui-widget-header .ui-state-highlight a {
578
	color: #363636;
579
}
580
.ui-state-error,
581
.ui-widget-content .ui-state-error,
582
.ui-widget-header .ui-state-error {
583
	border: 1px solid #cd0a0a;
584
	background: #fef1ec url("images/ui-bg_glass_95_fef1ec_1x400.png") 50% 50% repeat-x;
585
	color: #cd0a0a;
586
}
587
.ui-state-error a,
588
.ui-widget-content .ui-state-error a,
589
.ui-widget-header .ui-state-error a {
590
	color: #cd0a0a;
591
}
592
.ui-state-error-text,
593
.ui-widget-content .ui-state-error-text,
594
.ui-widget-header .ui-state-error-text {
595
	color: #cd0a0a;
596
}
597
.ui-priority-primary,
598
.ui-widget-content .ui-priority-primary,
599
.ui-widget-header .ui-priority-primary {
600
	font-weight: bold;
601
}
602
.ui-priority-secondary,
603
.ui-widget-content .ui-priority-secondary,
604
.ui-widget-header .ui-priority-secondary {
605
	opacity: .7;
606
	filter:Alpha(Opacity=70); /* support: IE8 */
607
	font-weight: normal;
608
}
609
.ui-state-disabled,
610
.ui-widget-content .ui-state-disabled,
611
.ui-widget-header .ui-state-disabled {
612
	opacity: .35;
613
	filter:Alpha(Opacity=35); /* support: IE8 */
614
	background-image: none;
615
}
616
.ui-state-disabled .ui-icon {
617
	filter:Alpha(Opacity=35); /* support: IE8 - See #6059 */
618
}
619
620
/* Icons
621
----------------------------------*/
622
623
/* states and images */
624
.ui-icon {
625
	width: 16px;
626
	height: 16px;
627
}
628
.ui-icon,
629
.ui-widget-content .ui-icon {
630
	background-image: url("images/ui-icons_222222_256x240.png");
631
}
632
.ui-widget-header .ui-icon {
633
	background-image: url("images/ui-icons_222222_256x240.png");
634
}
635
.ui-state-hover .ui-icon,
636
.ui-state-focus .ui-icon,
637
.ui-button:hover .ui-icon,
638
.ui-button:focus .ui-icon {
639
	background-image: url("images/ui-icons_454545_256x240.png");
640
}
641
.ui-state-active .ui-icon,
642
.ui-button:active .ui-icon {
643
	background-image: url("images/ui-icons_454545_256x240.png");
644
}
645
.ui-state-highlight .ui-icon,
646
.ui-button .ui-state-highlight.ui-icon {
647
	background-image: url("images/ui-icons_2e83ff_256x240.png");
648
}
649
.ui-state-error .ui-icon,
650
.ui-state-error-text .ui-icon {
651
	background-image: url("images/ui-icons_cd0a0a_256x240.png");
652
}
653
.ui-button .ui-icon {
654
	background-image: url("images/ui-icons_888888_256x240.png");
655
}
656
657
/* positioning */
658
.ui-icon-blank { background-position: 16px 16px; }
659
.ui-icon-caret-1-n { background-position: 0 0; }
660
.ui-icon-caret-1-ne { background-position: -16px 0; }
661
.ui-icon-caret-1-e { background-position: -32px 0; }
662
.ui-icon-caret-1-se { background-position: -48px 0; }
663
.ui-icon-caret-1-s { background-position: -65px 0; }
664
.ui-icon-caret-1-sw { background-position: -80px 0; }
665
.ui-icon-caret-1-w { background-position: -96px 0; }
666
.ui-icon-caret-1-nw { background-position: -112px 0; }
667
.ui-icon-caret-2-n-s { background-position: -128px 0; }
668
.ui-icon-caret-2-e-w { background-position: -144px 0; }
669
.ui-icon-triangle-1-n { background-position: 0 -16px; }
670
.ui-icon-triangle-1-ne { background-position: -16px -16px; }
671
.ui-icon-triangle-1-e { background-position: -32px -16px; }
672
.ui-icon-triangle-1-se { background-position: -48px -16px; }
673
.ui-icon-triangle-1-s { background-position: -65px -16px; }
674
.ui-icon-triangle-1-sw { background-position: -80px -16px; }
675
.ui-icon-triangle-1-w { background-position: -96px -16px; }
676
.ui-icon-triangle-1-nw { background-position: -112px -16px; }
677
.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
678
.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
679
.ui-icon-arrow-1-n { background-position: 0 -32px; }
680
.ui-icon-arrow-1-ne { background-position: -16px -32px; }
681
.ui-icon-arrow-1-e { background-position: -32px -32px; }
682
.ui-icon-arrow-1-se { background-position: -48px -32px; }
683
.ui-icon-arrow-1-s { background-position: -65px -32px; }
684
.ui-icon-arrow-1-sw { background-position: -80px -32px; }
685
.ui-icon-arrow-1-w { background-position: -96px -32px; }
686
.ui-icon-arrow-1-nw { background-position: -112px -32px; }
687
.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
688
.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
689
.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
690
.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
691
.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
692
.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
693
.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
694
.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
695
.ui-icon-arrowthick-1-n { background-position: 1px -48px; }
696
.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
697
.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
698
.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
699
.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
700
.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
701
.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
702
.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
703
.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
704
.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
705
.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
706
.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
707
.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
708
.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
709
.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
710
.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
711
.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
712
.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
713
.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
714
.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
715
.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
716
.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
717
.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
718
.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
719
.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
720
.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
721
.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
722
.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
723
.ui-icon-arrow-4 { background-position: 0 -80px; }
724
.ui-icon-arrow-4-diag { background-position: -16px -80px; }
725
.ui-icon-extlink { background-position: -32px -80px; }
726
.ui-icon-newwin { background-position: -48px -80px; }
727
.ui-icon-refresh { background-position: -64px -80px; }
728
.ui-icon-shuffle { background-position: -80px -80px; }
729
.ui-icon-transfer-e-w { background-position: -96px -80px; }
730
.ui-icon-transferthick-e-w { background-position: -112px -80px; }
731
.ui-icon-folder-collapsed { background-position: 0 -96px; }
732
.ui-icon-folder-open { background-position: -16px -96px; }
733
.ui-icon-document { background-position: -32px -96px; }
734
.ui-icon-document-b { background-position: -48px -96px; }
735
.ui-icon-note { background-position: -64px -96px; }
736
.ui-icon-mail-closed { background-position: -80px -96px; }
737
.ui-icon-mail-open { background-position: -96px -96px; }
738
.ui-icon-suitcase { background-position: -112px -96px; }
739
.ui-icon-comment { background-position: -128px -96px; }
740
.ui-icon-person { background-position: -144px -96px; }
741
.ui-icon-print { background-position: -160px -96px; }
742
.ui-icon-trash { background-position: -176px -96px; }
743
.ui-icon-locked { background-position: -192px -96px; }
744
.ui-icon-unlocked { background-position: -208px -96px; }
745
.ui-icon-bookmark { background-position: -224px -96px; }
746
.ui-icon-tag { background-position: -240px -96px; }
747
.ui-icon-home { background-position: 0 -112px; }
748
.ui-icon-flag { background-position: -16px -112px; }
749
.ui-icon-calendar { background-position: -32px -112px; }
750
.ui-icon-cart { background-position: -48px -112px; }
751
.ui-icon-pencil { background-position: -64px -112px; }
752
.ui-icon-clock { background-position: -80px -112px; }
753
.ui-icon-disk { background-position: -96px -112px; }
754
.ui-icon-calculator { background-position: -112px -112px; }
755
.ui-icon-zoomin { background-position: -128px -112px; }
756
.ui-icon-zoomout { background-position: -144px -112px; }
757
.ui-icon-search { background-position: -160px -112px; }
758
.ui-icon-wrench { background-position: -176px -112px; }
759
.ui-icon-gear { background-position: -192px -112px; }
760
.ui-icon-heart { background-position: -208px -112px; }
761
.ui-icon-star { background-position: -224px -112px; }
762
.ui-icon-link { background-position: -240px -112px; }
763
.ui-icon-cancel { background-position: 0 -128px; }
764
.ui-icon-plus { background-position: -16px -128px; }
765
.ui-icon-plusthick { background-position: -32px -128px; }
766
.ui-icon-minus { background-position: -48px -128px; }
767
.ui-icon-minusthick { background-position: -64px -128px; }
768
.ui-icon-close { background-position: -80px -128px; }
769
.ui-icon-closethick { background-position: -96px -128px; }
770
.ui-icon-key { background-position: -112px -128px; }
771
.ui-icon-lightbulb { background-position: -128px -128px; }
772
.ui-icon-scissors { background-position: -144px -128px; }
773
.ui-icon-clipboard { background-position: -160px -128px; }
774
.ui-icon-copy { background-position: -176px -128px; }
775
.ui-icon-contact { background-position: -192px -128px; }
776
.ui-icon-image { background-position: -208px -128px; }
777
.ui-icon-video { background-position: -224px -128px; }
778
.ui-icon-script { background-position: -240px -128px; }
779
.ui-icon-alert { background-position: 0 -144px; }
780
.ui-icon-info { background-position: -16px -144px; }
781
.ui-icon-notice { background-position: -32px -144px; }
782
.ui-icon-help { background-position: -48px -144px; }
783
.ui-icon-check { background-position: -64px -144px; }
784
.ui-icon-bullet { background-position: -80px -144px; }
785
.ui-icon-radio-on { background-position: -96px -144px; }
786
.ui-icon-radio-off { background-position: -112px -144px; }
787
.ui-icon-pin-w { background-position: -128px -144px; }
788
.ui-icon-pin-s { background-position: -144px -144px; }
789
.ui-icon-play { background-position: 0 -160px; }
790
.ui-icon-pause { background-position: -16px -160px; }
791
.ui-icon-seek-next { background-position: -32px -160px; }
792
.ui-icon-seek-prev { background-position: -48px -160px; }
793
.ui-icon-seek-end { background-position: -64px -160px; }
794
.ui-icon-seek-start { background-position: -80px -160px; }
795
/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
796
.ui-icon-seek-first { background-position: -80px -160px; }
797
.ui-icon-stop { background-position: -96px -160px; }
798
.ui-icon-eject { background-position: -112px -160px; }
799
.ui-icon-volume-off { background-position: -128px -160px; }
800
.ui-icon-volume-on { background-position: -144px -160px; }
801
.ui-icon-power { background-position: 0 -176px; }
802
.ui-icon-signal-diag { background-position: -16px -176px; }
803
.ui-icon-signal { background-position: -32px -176px; }
804
.ui-icon-battery-0 { background-position: -48px -176px; }
805
.ui-icon-battery-1 { background-position: -64px -176px; }
806
.ui-icon-battery-2 { background-position: -80px -176px; }
807
.ui-icon-battery-3 { background-position: -96px -176px; }
808
.ui-icon-circle-plus { background-position: 0 -192px; }
809
.ui-icon-circle-minus { background-position: -16px -192px; }
810
.ui-icon-circle-close { background-position: -32px -192px; }
811
.ui-icon-circle-triangle-e { background-position: -48px -192px; }
812
.ui-icon-circle-triangle-s { background-position: -64px -192px; }
813
.ui-icon-circle-triangle-w { background-position: -80px -192px; }
814
.ui-icon-circle-triangle-n { background-position: -96px -192px; }
815
.ui-icon-circle-arrow-e { background-position: -112px -192px; }
816
.ui-icon-circle-arrow-s { background-position: -128px -192px; }
817
.ui-icon-circle-arrow-w { background-position: -144px -192px; }
818
.ui-icon-circle-arrow-n { background-position: -160px -192px; }
819
.ui-icon-circle-zoomin { background-position: -176px -192px; }
820
.ui-icon-circle-zoomout { background-position: -192px -192px; }
821
.ui-icon-circle-check { background-position: -208px -192px; }
822
.ui-icon-circlesmall-plus { background-position: 0 -208px; }
823
.ui-icon-circlesmall-minus { background-position: -16px -208px; }
824
.ui-icon-circlesmall-close { background-position: -32px -208px; }
825
.ui-icon-squaresmall-plus { background-position: -48px -208px; }
826
.ui-icon-squaresmall-minus { background-position: -64px -208px; }
827
.ui-icon-squaresmall-close { background-position: -80px -208px; }
828
.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
829
.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
830
.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
831
.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
832
.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
833
.ui-icon-grip-diagonal-se { background-position: -80px -224px; }
834
835
836
/* Misc visuals
837
----------------------------------*/
838
839
/* Corner radius */
840
.ui-corner-all,
841
.ui-corner-top,
842
.ui-corner-left,
843
.ui-corner-tl {
844
	border-top-left-radius: 4px;
845
}
846
.ui-corner-all,
847
.ui-corner-top,
848
.ui-corner-right,
849
.ui-corner-tr {
850
	border-top-right-radius: 4px;
851
}
852
.ui-corner-all,
853
.ui-corner-bottom,
854
.ui-corner-left,
855
.ui-corner-bl {
856
	border-bottom-left-radius: 4px;
857
}
858
.ui-corner-all,
859
.ui-corner-bottom,
860
.ui-corner-right,
861
.ui-corner-br {
862
	border-bottom-right-radius: 4px;
863
}
864
865
/* Overlays */
866
.ui-widget-overlay {
867
	background: #aaaaaa;
868
	opacity: .3;
869
	filter: Alpha(Opacity=30); /* support: IE8 */
870
}
871
.ui-widget-shadow {
872
	-webkit-box-shadow: -8px -8px 8px #aaaaaa;
873
	box-shadow: -8px -8px 8px #aaaaaa;
874
}
(-)a/koha-tmpl/opac-tmpl/bootstrap/lib/jquery/jquery-ui-1.12.1.js (-8737 lines)
Lines 1-8737 Link Here
1
/*! jQuery UI - v1.12.1 - 2019-08-16
2
* http://jqueryui.com
3
* Includes: widget.js, position.js, data.js, keycode.js, scroll-parent.js, unique-id.js, widgets/sortable.js, widgets/autocomplete.js, widgets/datepicker.js, widgets/menu.js, widgets/mouse.js, widgets/slider.js, widgets/tabs.js, widgets/tooltip.js
4
* Copyright jQuery Foundation and other contributors; Licensed MIT */
5
6
(function( factory ) {
7
	if ( typeof define === "function" && define.amd ) {
8
9
		// AMD. Register as an anonymous module.
10
		define([ "jquery" ], factory );
11
	} else {
12
13
		// Browser globals
14
		factory( jQuery );
15
	}
16
}(function( $ ) {
17
18
$.ui = $.ui || {};
19
20
var version = $.ui.version = "1.12.1";
21
22
23
/*!
24
 * jQuery UI Widget 1.12.1
25
 * http://jqueryui.com
26
 *
27
 * Copyright jQuery Foundation and other contributors
28
 * Released under the MIT license.
29
 * http://jquery.org/license
30
 */
31
32
//>>label: Widget
33
//>>group: Core
34
//>>description: Provides a factory for creating stateful widgets with a common API.
35
//>>docs: http://api.jqueryui.com/jQuery.widget/
36
//>>demos: http://jqueryui.com/widget/
37
38
39
40
var widgetUuid = 0;
41
var widgetSlice = Array.prototype.slice;
42
43
$.cleanData = ( function( orig ) {
44
	return function( elems ) {
45
		var events, elem, i;
46
		for ( i = 0; ( elem = elems[ i ] ) != null; i++ ) {
47
			try {
48
49
				// Only trigger remove when necessary to save time
50
				events = $._data( elem, "events" );
51
				if ( events && events.remove ) {
52
					$( elem ).triggerHandler( "remove" );
53
				}
54
55
			// Http://bugs.jquery.com/ticket/8235
56
			} catch ( e ) {}
57
		}
58
		orig( elems );
59
	};
60
} )( $.cleanData );
61
62
$.widget = function( name, base, prototype ) {
63
	var existingConstructor, constructor, basePrototype;
64
65
	// ProxiedPrototype allows the provided prototype to remain unmodified
66
	// so that it can be used as a mixin for multiple widgets (#8876)
67
	var proxiedPrototype = {};
68
69
	var namespace = name.split( "." )[ 0 ];
70
	name = name.split( "." )[ 1 ];
71
	var fullName = namespace + "-" + name;
72
73
	if ( !prototype ) {
74
		prototype = base;
75
		base = $.Widget;
76
	}
77
78
	if ( $.isArray( prototype ) ) {
79
		prototype = $.extend.apply( null, [ {} ].concat( prototype ) );
80
	}
81
82
	// Create selector for plugin
83
	$.expr[ ":" ][ fullName.toLowerCase() ] = function( elem ) {
84
		return !!$.data( elem, fullName );
85
	};
86
87
	$[ namespace ] = $[ namespace ] || {};
88
	existingConstructor = $[ namespace ][ name ];
89
	constructor = $[ namespace ][ name ] = function( options, element ) {
90
91
		// Allow instantiation without "new" keyword
92
		if ( !this._createWidget ) {
93
			return new constructor( options, element );
94
		}
95
96
		// Allow instantiation without initializing for simple inheritance
97
		// must use "new" keyword (the code above always passes args)
98
		if ( arguments.length ) {
99
			this._createWidget( options, element );
100
		}
101
	};
102
103
	// Extend with the existing constructor to carry over any static properties
104
	$.extend( constructor, existingConstructor, {
105
		version: prototype.version,
106
107
		// Copy the object used to create the prototype in case we need to
108
		// redefine the widget later
109
		_proto: $.extend( {}, prototype ),
110
111
		// Track widgets that inherit from this widget in case this widget is
112
		// redefined after a widget inherits from it
113
		_childConstructors: []
114
	} );
115
116
	basePrototype = new base();
117
118
	// We need to make the options hash a property directly on the new instance
119
	// otherwise we'll modify the options hash on the prototype that we're
120
	// inheriting from
121
	basePrototype.options = $.widget.extend( {}, basePrototype.options );
122
	$.each( prototype, function( prop, value ) {
123
		if ( !$.isFunction( value ) ) {
124
			proxiedPrototype[ prop ] = value;
125
			return;
126
		}
127
		proxiedPrototype[ prop ] = ( function() {
128
			function _super() {
129
				return base.prototype[ prop ].apply( this, arguments );
130
			}
131
132
			function _superApply( args ) {
133
				return base.prototype[ prop ].apply( this, args );
134
			}
135
136
			return function() {
137
				var __super = this._super;
138
				var __superApply = this._superApply;
139
				var returnValue;
140
141
				this._super = _super;
142
				this._superApply = _superApply;
143
144
				returnValue = value.apply( this, arguments );
145
146
				this._super = __super;
147
				this._superApply = __superApply;
148
149
				return returnValue;
150
			};
151
		} )();
152
	} );
153
	constructor.prototype = $.widget.extend( basePrototype, {
154
155
		// TODO: remove support for widgetEventPrefix
156
		// always use the name + a colon as the prefix, e.g., draggable:start
157
		// don't prefix for widgets that aren't DOM-based
158
		widgetEventPrefix: existingConstructor ? ( basePrototype.widgetEventPrefix || name ) : name
159
	}, proxiedPrototype, {
160
		constructor: constructor,
161
		namespace: namespace,
162
		widgetName: name,
163
		widgetFullName: fullName
164
	} );
165
166
	// If this widget is being redefined then we need to find all widgets that
167
	// are inheriting from it and redefine all of them so that they inherit from
168
	// the new version of this widget. We're essentially trying to replace one
169
	// level in the prototype chain.
170
	if ( existingConstructor ) {
171
		$.each( existingConstructor._childConstructors, function( i, child ) {
172
			var childPrototype = child.prototype;
173
174
			// Redefine the child widget using the same prototype that was
175
			// originally used, but inherit from the new version of the base
176
			$.widget( childPrototype.namespace + "." + childPrototype.widgetName, constructor,
177
				child._proto );
178
		} );
179
180
		// Remove the list of existing child constructors from the old constructor
181
		// so the old child constructors can be garbage collected
182
		delete existingConstructor._childConstructors;
183
	} else {
184
		base._childConstructors.push( constructor );
185
	}
186
187
	$.widget.bridge( name, constructor );
188
189
	return constructor;
190
};
191
192
$.widget.extend = function( target ) {
193
	var input = widgetSlice.call( arguments, 1 );
194
	var inputIndex = 0;
195
	var inputLength = input.length;
196
	var key;
197
	var value;
198
199
	for ( ; inputIndex < inputLength; inputIndex++ ) {
200
		for ( key in input[ inputIndex ] ) {
201
			value = input[ inputIndex ][ key ];
202
			if ( input[ inputIndex ].hasOwnProperty( key ) && value !== undefined ) {
203
204
				// Clone objects
205
				if ( $.isPlainObject( value ) ) {
206
					target[ key ] = $.isPlainObject( target[ key ] ) ?
207
						$.widget.extend( {}, target[ key ], value ) :
208
209
						// Don't extend strings, arrays, etc. with objects
210
						$.widget.extend( {}, value );
211
212
				// Copy everything else by reference
213
				} else {
214
					target[ key ] = value;
215
				}
216
			}
217
		}
218
	}
219
	return target;
220
};
221
222
$.widget.bridge = function( name, object ) {
223
	var fullName = object.prototype.widgetFullName || name;
224
	$.fn[ name ] = function( options ) {
225
		var isMethodCall = typeof options === "string";
226
		var args = widgetSlice.call( arguments, 1 );
227
		var returnValue = this;
228
229
		if ( isMethodCall ) {
230
231
			// If this is an empty collection, we need to have the instance method
232
			// return undefined instead of the jQuery instance
233
			if ( !this.length && options === "instance" ) {
234
				returnValue = undefined;
235
			} else {
236
				this.each( function() {
237
					var methodValue;
238
					var instance = $.data( this, fullName );
239
240
					if ( options === "instance" ) {
241
						returnValue = instance;
242
						return false;
243
					}
244
245
					if ( !instance ) {
246
						return $.error( "cannot call methods on " + name +
247
							" prior to initialization; " +
248
							"attempted to call method '" + options + "'" );
249
					}
250
251
					if ( !$.isFunction( instance[ options ] ) || options.charAt( 0 ) === "_" ) {
252
						return $.error( "no such method '" + options + "' for " + name +
253
							" widget instance" );
254
					}
255
256
					methodValue = instance[ options ].apply( instance, args );
257
258
					if ( methodValue !== instance && methodValue !== undefined ) {
259
						returnValue = methodValue && methodValue.jquery ?
260
							returnValue.pushStack( methodValue.get() ) :
261
							methodValue;
262
						return false;
263
					}
264
				} );
265
			}
266
		} else {
267
268
			// Allow multiple hashes to be passed on init
269
			if ( args.length ) {
270
				options = $.widget.extend.apply( null, [ options ].concat( args ) );
271
			}
272
273
			this.each( function() {
274
				var instance = $.data( this, fullName );
275
				if ( instance ) {
276
					instance.option( options || {} );
277
					if ( instance._init ) {
278
						instance._init();
279
					}
280
				} else {
281
					$.data( this, fullName, new object( options, this ) );
282
				}
283
			} );
284
		}
285
286
		return returnValue;
287
	};
288
};
289
290
$.Widget = function( /* options, element */ ) {};
291
$.Widget._childConstructors = [];
292
293
$.Widget.prototype = {
294
	widgetName: "widget",
295
	widgetEventPrefix: "",
296
	defaultElement: "<div>",
297
298
	options: {
299
		classes: {},
300
		disabled: false,
301
302
		// Callbacks
303
		create: null
304
	},
305
306
	_createWidget: function( options, element ) {
307
		element = $( element || this.defaultElement || this )[ 0 ];
308
		this.element = $( element );
309
		this.uuid = widgetUuid++;
310
		this.eventNamespace = "." + this.widgetName + this.uuid;
311
312
		this.bindings = $();
313
		this.hoverable = $();
314
		this.focusable = $();
315
		this.classesElementLookup = {};
316
317
		if ( element !== this ) {
318
			$.data( element, this.widgetFullName, this );
319
			this._on( true, this.element, {
320
				remove: function( event ) {
321
					if ( event.target === element ) {
322
						this.destroy();
323
					}
324
				}
325
			} );
326
			this.document = $( element.style ?
327
328
				// Element within the document
329
				element.ownerDocument :
330
331
				// Element is window or document
332
				element.document || element );
333
			this.window = $( this.document[ 0 ].defaultView || this.document[ 0 ].parentWindow );
334
		}
335
336
		this.options = $.widget.extend( {},
337
			this.options,
338
			this._getCreateOptions(),
339
			options );
340
341
		this._create();
342
343
		if ( this.options.disabled ) {
344
			this._setOptionDisabled( this.options.disabled );
345
		}
346
347
		this._trigger( "create", null, this._getCreateEventData() );
348
		this._init();
349
	},
350
351
	_getCreateOptions: function() {
352
		return {};
353
	},
354
355
	_getCreateEventData: $.noop,
356
357
	_create: $.noop,
358
359
	_init: $.noop,
360
361
	destroy: function() {
362
		var that = this;
363
364
		this._destroy();
365
		$.each( this.classesElementLookup, function( key, value ) {
366
			that._removeClass( value, key );
367
		} );
368
369
		// We can probably remove the unbind calls in 2.0
370
		// all event bindings should go through this._on()
371
		this.element
372
			.off( this.eventNamespace )
373
			.removeData( this.widgetFullName );
374
		this.widget()
375
			.off( this.eventNamespace )
376
			.removeAttr( "aria-disabled" );
377
378
		// Clean up events and states
379
		this.bindings.off( this.eventNamespace );
380
	},
381
382
	_destroy: $.noop,
383
384
	widget: function() {
385
		return this.element;
386
	},
387
388
	option: function( key, value ) {
389
		var options = key;
390
		var parts;
391
		var curOption;
392
		var i;
393
394
		if ( arguments.length === 0 ) {
395
396
			// Don't return a reference to the internal hash
397
			return $.widget.extend( {}, this.options );
398
		}
399
400
		if ( typeof key === "string" ) {
401
402
			// Handle nested keys, e.g., "foo.bar" => { foo: { bar: ___ } }
403
			options = {};
404
			parts = key.split( "." );
405
			key = parts.shift();
406
			if ( parts.length ) {
407
				curOption = options[ key ] = $.widget.extend( {}, this.options[ key ] );
408
				for ( i = 0; i < parts.length - 1; i++ ) {
409
					curOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {};
410
					curOption = curOption[ parts[ i ] ];
411
				}
412
				key = parts.pop();
413
				if ( arguments.length === 1 ) {
414
					return curOption[ key ] === undefined ? null : curOption[ key ];
415
				}
416
				curOption[ key ] = value;
417
			} else {
418
				if ( arguments.length === 1 ) {
419
					return this.options[ key ] === undefined ? null : this.options[ key ];
420
				}
421
				options[ key ] = value;
422
			}
423
		}
424
425
		this._setOptions( options );
426
427
		return this;
428
	},
429
430
	_setOptions: function( options ) {
431
		var key;
432
433
		for ( key in options ) {
434
			this._setOption( key, options[ key ] );
435
		}
436
437
		return this;
438
	},
439
440
	_setOption: function( key, value ) {
441
		if ( key === "classes" ) {
442
			this._setOptionClasses( value );
443
		}
444
445
		this.options[ key ] = value;
446
447
		if ( key === "disabled" ) {
448
			this._setOptionDisabled( value );
449
		}
450
451
		return this;
452
	},
453
454
	_setOptionClasses: function( value ) {
455
		var classKey, elements, currentElements;
456
457
		for ( classKey in value ) {
458
			currentElements = this.classesElementLookup[ classKey ];
459
			if ( value[ classKey ] === this.options.classes[ classKey ] ||
460
					!currentElements ||
461
					!currentElements.length ) {
462
				continue;
463
			}
464
465
			// We are doing this to create a new jQuery object because the _removeClass() call
466
			// on the next line is going to destroy the reference to the current elements being
467
			// tracked. We need to save a copy of this collection so that we can add the new classes
468
			// below.
469
			elements = $( currentElements.get() );
470
			this._removeClass( currentElements, classKey );
471
472
			// We don't use _addClass() here, because that uses this.options.classes
473
			// for generating the string of classes. We want to use the value passed in from
474
			// _setOption(), this is the new value of the classes option which was passed to
475
			// _setOption(). We pass this value directly to _classes().
476
			elements.addClass( this._classes( {
477
				element: elements,
478
				keys: classKey,
479
				classes: value,
480
				add: true
481
			} ) );
482
		}
483
	},
484
485
	_setOptionDisabled: function( value ) {
486
		this._toggleClass( this.widget(), this.widgetFullName + "-disabled", null, !!value );
487
488
		// If the widget is becoming disabled, then nothing is interactive
489
		if ( value ) {
490
			this._removeClass( this.hoverable, null, "ui-state-hover" );
491
			this._removeClass( this.focusable, null, "ui-state-focus" );
492
		}
493
	},
494
495
	enable: function() {
496
		return this._setOptions( { disabled: false } );
497
	},
498
499
	disable: function() {
500
		return this._setOptions( { disabled: true } );
501
	},
502
503
	_classes: function( options ) {
504
		var full = [];
505
		var that = this;
506
507
		options = $.extend( {
508
			element: this.element,
509
			classes: this.options.classes || {}
510
		}, options );
511
512
		function processClassString( classes, checkOption ) {
513
			var current, i;
514
			for ( i = 0; i < classes.length; i++ ) {
515
				current = that.classesElementLookup[ classes[ i ] ] || $();
516
				if ( options.add ) {
517
					current = $( $.unique( current.get().concat( options.element.get() ) ) );
518
				} else {
519
					current = $( current.not( options.element ).get() );
520
				}
521
				that.classesElementLookup[ classes[ i ] ] = current;
522
				full.push( classes[ i ] );
523
				if ( checkOption && options.classes[ classes[ i ] ] ) {
524
					full.push( options.classes[ classes[ i ] ] );
525
				}
526
			}
527
		}
528
529
		this._on( options.element, {
530
			"remove": "_untrackClassesElement"
531
		} );
532
533
		if ( options.keys ) {
534
			processClassString( options.keys.match( /\S+/g ) || [], true );
535
		}
536
		if ( options.extra ) {
537
			processClassString( options.extra.match( /\S+/g ) || [] );
538
		}
539
540
		return full.join( " " );
541
	},
542
543
	_untrackClassesElement: function( event ) {
544
		var that = this;
545
		$.each( that.classesElementLookup, function( key, value ) {
546
			if ( $.inArray( event.target, value ) !== -1 ) {
547
				that.classesElementLookup[ key ] = $( value.not( event.target ).get() );
548
			}
549
		} );
550
	},
551
552
	_removeClass: function( element, keys, extra ) {
553
		return this._toggleClass( element, keys, extra, false );
554
	},
555
556
	_addClass: function( element, keys, extra ) {
557
		return this._toggleClass( element, keys, extra, true );
558
	},
559
560
	_toggleClass: function( element, keys, extra, add ) {
561
		add = ( typeof add === "boolean" ) ? add : extra;
562
		var shift = ( typeof element === "string" || element === null ),
563
			options = {
564
				extra: shift ? keys : extra,
565
				keys: shift ? element : keys,
566
				element: shift ? this.element : element,
567
				add: add
568
			};
569
		options.element.toggleClass( this._classes( options ), add );
570
		return this;
571
	},
572
573
	_on: function( suppressDisabledCheck, element, handlers ) {
574
		var delegateElement;
575
		var instance = this;
576
577
		// No suppressDisabledCheck flag, shuffle arguments
578
		if ( typeof suppressDisabledCheck !== "boolean" ) {
579
			handlers = element;
580
			element = suppressDisabledCheck;
581
			suppressDisabledCheck = false;
582
		}
583
584
		// No element argument, shuffle and use this.element
585
		if ( !handlers ) {
586
			handlers = element;
587
			element = this.element;
588
			delegateElement = this.widget();
589
		} else {
590
			element = delegateElement = $( element );
591
			this.bindings = this.bindings.add( element );
592
		}
593
594
		$.each( handlers, function( event, handler ) {
595
			function handlerProxy() {
596
597
				// Allow widgets to customize the disabled handling
598
				// - disabled as an array instead of boolean
599
				// - disabled class as method for disabling individual parts
600
				if ( !suppressDisabledCheck &&
601
						( instance.options.disabled === true ||
602
						$( this ).hasClass( "ui-state-disabled" ) ) ) {
603
					return;
604
				}
605
				return ( typeof handler === "string" ? instance[ handler ] : handler )
606
					.apply( instance, arguments );
607
			}
608
609
			// Copy the guid so direct unbinding works
610
			if ( typeof handler !== "string" ) {
611
				handlerProxy.guid = handler.guid =
612
					handler.guid || handlerProxy.guid || $.guid++;
613
			}
614
615
			var match = event.match( /^([\w:-]*)\s*(.*)$/ );
616
			var eventName = match[ 1 ] + instance.eventNamespace;
617
			var selector = match[ 2 ];
618
619
			if ( selector ) {
620
				delegateElement.on( eventName, selector, handlerProxy );
621
			} else {
622
				element.on( eventName, handlerProxy );
623
			}
624
		} );
625
	},
626
627
	_off: function( element, eventName ) {
628
		eventName = ( eventName || "" ).split( " " ).join( this.eventNamespace + " " ) +
629
			this.eventNamespace;
630
		element.off( eventName ).off( eventName );
631
632
		// Clear the stack to avoid memory leaks (#10056)
633
		this.bindings = $( this.bindings.not( element ).get() );
634
		this.focusable = $( this.focusable.not( element ).get() );
635
		this.hoverable = $( this.hoverable.not( element ).get() );
636
	},
637
638
	_delay: function( handler, delay ) {
639
		function handlerProxy() {
640
			return ( typeof handler === "string" ? instance[ handler ] : handler )
641
				.apply( instance, arguments );
642
		}
643
		var instance = this;
644
		return setTimeout( handlerProxy, delay || 0 );
645
	},
646
647
	_hoverable: function( element ) {
648
		this.hoverable = this.hoverable.add( element );
649
		this._on( element, {
650
			mouseenter: function( event ) {
651
				this._addClass( $( event.currentTarget ), null, "ui-state-hover" );
652
			},
653
			mouseleave: function( event ) {
654
				this._removeClass( $( event.currentTarget ), null, "ui-state-hover" );
655
			}
656
		} );
657
	},
658
659
	_focusable: function( element ) {
660
		this.focusable = this.focusable.add( element );
661
		this._on( element, {
662
			focusin: function( event ) {
663
				this._addClass( $( event.currentTarget ), null, "ui-state-focus" );
664
			},
665
			focusout: function( event ) {
666
				this._removeClass( $( event.currentTarget ), null, "ui-state-focus" );
667
			}
668
		} );
669
	},
670
671
	_trigger: function( type, event, data ) {
672
		var prop, orig;
673
		var callback = this.options[ type ];
674
675
		data = data || {};
676
		event = $.Event( event );
677
		event.type = ( type === this.widgetEventPrefix ?
678
			type :
679
			this.widgetEventPrefix + type ).toLowerCase();
680
681
		// The original event may come from any element
682
		// so we need to reset the target on the new event
683
		event.target = this.element[ 0 ];
684
685
		// Copy original event properties over to the new event
686
		orig = event.originalEvent;
687
		if ( orig ) {
688
			for ( prop in orig ) {
689
				if ( !( prop in event ) ) {
690
					event[ prop ] = orig[ prop ];
691
				}
692
			}
693
		}
694
695
		this.element.trigger( event, data );
696
		return !( $.isFunction( callback ) &&
697
			callback.apply( this.element[ 0 ], [ event ].concat( data ) ) === false ||
698
			event.isDefaultPrevented() );
699
	}
700
};
701
702
$.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) {
703
	$.Widget.prototype[ "_" + method ] = function( element, options, callback ) {
704
		if ( typeof options === "string" ) {
705
			options = { effect: options };
706
		}
707
708
		var hasOptions;
709
		var effectName = !options ?
710
			method :
711
			options === true || typeof options === "number" ?
712
				defaultEffect :
713
				options.effect || defaultEffect;
714
715
		options = options || {};
716
		if ( typeof options === "number" ) {
717
			options = { duration: options };
718
		}
719
720
		hasOptions = !$.isEmptyObject( options );
721
		options.complete = callback;
722
723
		if ( options.delay ) {
724
			element.delay( options.delay );
725
		}
726
727
		if ( hasOptions && $.effects && $.effects.effect[ effectName ] ) {
728
			element[ method ]( options );
729
		} else if ( effectName !== method && element[ effectName ] ) {
730
			element[ effectName ]( options.duration, options.easing, callback );
731
		} else {
732
			element.queue( function( next ) {
733
				$( this )[ method ]();
734
				if ( callback ) {
735
					callback.call( element[ 0 ] );
736
				}
737
				next();
738
			} );
739
		}
740
	};
741
} );
742
743
var widget = $.widget;
744
745
746
/*!
747
 * jQuery UI Position 1.12.1
748
 * http://jqueryui.com
749
 *
750
 * Copyright jQuery Foundation and other contributors
751
 * Released under the MIT license.
752
 * http://jquery.org/license
753
 *
754
 * http://api.jqueryui.com/position/
755
 */
756
757
//>>label: Position
758
//>>group: Core
759
//>>description: Positions elements relative to other elements.
760
//>>docs: http://api.jqueryui.com/position/
761
//>>demos: http://jqueryui.com/position/
762
763
764
( function() {
765
var cachedScrollbarWidth,
766
	max = Math.max,
767
	abs = Math.abs,
768
	rhorizontal = /left|center|right/,
769
	rvertical = /top|center|bottom/,
770
	roffset = /[\+\-]\d+(\.[\d]+)?%?/,
771
	rposition = /^\w+/,
772
	rpercent = /%$/,
773
	_position = $.fn.position;
774
775
function getOffsets( offsets, width, height ) {
776
	return [
777
		parseFloat( offsets[ 0 ] ) * ( rpercent.test( offsets[ 0 ] ) ? width / 100 : 1 ),
778
		parseFloat( offsets[ 1 ] ) * ( rpercent.test( offsets[ 1 ] ) ? height / 100 : 1 )
779
	];
780
}
781
782
function parseCss( element, property ) {
783
	return parseInt( $.css( element, property ), 10 ) || 0;
784
}
785
786
function getDimensions( elem ) {
787
	var raw = elem[ 0 ];
788
	if ( raw.nodeType === 9 ) {
789
		return {
790
			width: elem.width(),
791
			height: elem.height(),
792
			offset: { top: 0, left: 0 }
793
		};
794
	}
795
	if ( $.isWindow( raw ) ) {
796
		return {
797
			width: elem.width(),
798
			height: elem.height(),
799
			offset: { top: elem.scrollTop(), left: elem.scrollLeft() }
800
		};
801
	}
802
	if ( raw.preventDefault ) {
803
		return {
804
			width: 0,
805
			height: 0,
806
			offset: { top: raw.pageY, left: raw.pageX }
807
		};
808
	}
809
	return {
810
		width: elem.outerWidth(),
811
		height: elem.outerHeight(),
812
		offset: elem.offset()
813
	};
814
}
815
816
$.position = {
817
	scrollbarWidth: function() {
818
		if ( cachedScrollbarWidth !== undefined ) {
819
			return cachedScrollbarWidth;
820
		}
821
		var w1, w2,
822
			div = $( "<div " +
823
				"style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'>" +
824
				"<div style='height:100px;width:auto;'></div></div>" ),
825
			innerDiv = div.children()[ 0 ];
826
827
		$( "body" ).append( div );
828
		w1 = innerDiv.offsetWidth;
829
		div.css( "overflow", "scroll" );
830
831
		w2 = innerDiv.offsetWidth;
832
833
		if ( w1 === w2 ) {
834
			w2 = div[ 0 ].clientWidth;
835
		}
836
837
		div.remove();
838
839
		return ( cachedScrollbarWidth = w1 - w2 );
840
	},
841
	getScrollInfo: function( within ) {
842
		var overflowX = within.isWindow || within.isDocument ? "" :
843
				within.element.css( "overflow-x" ),
844
			overflowY = within.isWindow || within.isDocument ? "" :
845
				within.element.css( "overflow-y" ),
846
			hasOverflowX = overflowX === "scroll" ||
847
				( overflowX === "auto" && within.width < within.element[ 0 ].scrollWidth ),
848
			hasOverflowY = overflowY === "scroll" ||
849
				( overflowY === "auto" && within.height < within.element[ 0 ].scrollHeight );
850
		return {
851
			width: hasOverflowY ? $.position.scrollbarWidth() : 0,
852
			height: hasOverflowX ? $.position.scrollbarWidth() : 0
853
		};
854
	},
855
	getWithinInfo: function( element ) {
856
		var withinElement = $( element || window ),
857
			isWindow = $.isWindow( withinElement[ 0 ] ),
858
			isDocument = !!withinElement[ 0 ] && withinElement[ 0 ].nodeType === 9,
859
			hasOffset = !isWindow && !isDocument;
860
		return {
861
			element: withinElement,
862
			isWindow: isWindow,
863
			isDocument: isDocument,
864
			offset: hasOffset ? $( element ).offset() : { left: 0, top: 0 },
865
			scrollLeft: withinElement.scrollLeft(),
866
			scrollTop: withinElement.scrollTop(),
867
			width: withinElement.outerWidth(),
868
			height: withinElement.outerHeight()
869
		};
870
	}
871
};
872
873
$.fn.position = function( options ) {
874
	if ( !options || !options.of ) {
875
		return _position.apply( this, arguments );
876
	}
877
878
	// Make a copy, we don't want to modify arguments
879
	options = $.extend( {}, options );
880
881
	var atOffset, targetWidth, targetHeight, targetOffset, basePosition, dimensions,
882
		target = $( options.of ),
883
		within = $.position.getWithinInfo( options.within ),
884
		scrollInfo = $.position.getScrollInfo( within ),
885
		collision = ( options.collision || "flip" ).split( " " ),
886
		offsets = {};
887
888
	dimensions = getDimensions( target );
889
	if ( target[ 0 ].preventDefault ) {
890
891
		// Force left top to allow flipping
892
		options.at = "left top";
893
	}
894
	targetWidth = dimensions.width;
895
	targetHeight = dimensions.height;
896
	targetOffset = dimensions.offset;
897
898
	// Clone to reuse original targetOffset later
899
	basePosition = $.extend( {}, targetOffset );
900
901
	// Force my and at to have valid horizontal and vertical positions
902
	// if a value is missing or invalid, it will be converted to center
903
	$.each( [ "my", "at" ], function() {
904
		var pos = ( options[ this ] || "" ).split( " " ),
905
			horizontalOffset,
906
			verticalOffset;
907
908
		if ( pos.length === 1 ) {
909
			pos = rhorizontal.test( pos[ 0 ] ) ?
910
				pos.concat( [ "center" ] ) :
911
				rvertical.test( pos[ 0 ] ) ?
912
					[ "center" ].concat( pos ) :
913
					[ "center", "center" ];
914
		}
915
		pos[ 0 ] = rhorizontal.test( pos[ 0 ] ) ? pos[ 0 ] : "center";
916
		pos[ 1 ] = rvertical.test( pos[ 1 ] ) ? pos[ 1 ] : "center";
917
918
		// Calculate offsets
919
		horizontalOffset = roffset.exec( pos[ 0 ] );
920
		verticalOffset = roffset.exec( pos[ 1 ] );
921
		offsets[ this ] = [
922
			horizontalOffset ? horizontalOffset[ 0 ] : 0,
923
			verticalOffset ? verticalOffset[ 0 ] : 0
924
		];
925
926
		// Reduce to just the positions without the offsets
927
		options[ this ] = [
928
			rposition.exec( pos[ 0 ] )[ 0 ],
929
			rposition.exec( pos[ 1 ] )[ 0 ]
930
		];
931
	} );
932
933
	// Normalize collision option
934
	if ( collision.length === 1 ) {
935
		collision[ 1 ] = collision[ 0 ];
936
	}
937
938
	if ( options.at[ 0 ] === "right" ) {
939
		basePosition.left += targetWidth;
940
	} else if ( options.at[ 0 ] === "center" ) {
941
		basePosition.left += targetWidth / 2;
942
	}
943
944
	if ( options.at[ 1 ] === "bottom" ) {
945
		basePosition.top += targetHeight;
946
	} else if ( options.at[ 1 ] === "center" ) {
947
		basePosition.top += targetHeight / 2;
948
	}
949
950
	atOffset = getOffsets( offsets.at, targetWidth, targetHeight );
951
	basePosition.left += atOffset[ 0 ];
952
	basePosition.top += atOffset[ 1 ];
953
954
	return this.each( function() {
955
		var collisionPosition, using,
956
			elem = $( this ),
957
			elemWidth = elem.outerWidth(),
958
			elemHeight = elem.outerHeight(),
959
			marginLeft = parseCss( this, "marginLeft" ),
960
			marginTop = parseCss( this, "marginTop" ),
961
			collisionWidth = elemWidth + marginLeft + parseCss( this, "marginRight" ) +
962
				scrollInfo.width,
963
			collisionHeight = elemHeight + marginTop + parseCss( this, "marginBottom" ) +
964
				scrollInfo.height,
965
			position = $.extend( {}, basePosition ),
966
			myOffset = getOffsets( offsets.my, elem.outerWidth(), elem.outerHeight() );
967
968
		if ( options.my[ 0 ] === "right" ) {
969
			position.left -= elemWidth;
970
		} else if ( options.my[ 0 ] === "center" ) {
971
			position.left -= elemWidth / 2;
972
		}
973
974
		if ( options.my[ 1 ] === "bottom" ) {
975
			position.top -= elemHeight;
976
		} else if ( options.my[ 1 ] === "center" ) {
977
			position.top -= elemHeight / 2;
978
		}
979
980
		position.left += myOffset[ 0 ];
981
		position.top += myOffset[ 1 ];
982
983
		collisionPosition = {
984
			marginLeft: marginLeft,
985
			marginTop: marginTop
986
		};
987
988
		$.each( [ "left", "top" ], function( i, dir ) {
989
			if ( $.ui.position[ collision[ i ] ] ) {
990
				$.ui.position[ collision[ i ] ][ dir ]( position, {
991
					targetWidth: targetWidth,
992
					targetHeight: targetHeight,
993
					elemWidth: elemWidth,
994
					elemHeight: elemHeight,
995
					collisionPosition: collisionPosition,
996
					collisionWidth: collisionWidth,
997
					collisionHeight: collisionHeight,
998
					offset: [ atOffset[ 0 ] + myOffset[ 0 ], atOffset [ 1 ] + myOffset[ 1 ] ],
999
					my: options.my,
1000
					at: options.at,
1001
					within: within,
1002
					elem: elem
1003
				} );
1004
			}
1005
		} );
1006
1007
		if ( options.using ) {
1008
1009
			// Adds feedback as second argument to using callback, if present
1010
			using = function( props ) {
1011
				var left = targetOffset.left - position.left,
1012
					right = left + targetWidth - elemWidth,
1013
					top = targetOffset.top - position.top,
1014
					bottom = top + targetHeight - elemHeight,
1015
					feedback = {
1016
						target: {
1017
							element: target,
1018
							left: targetOffset.left,
1019
							top: targetOffset.top,
1020
							width: targetWidth,
1021
							height: targetHeight
1022
						},
1023
						element: {
1024
							element: elem,
1025
							left: position.left,
1026
							top: position.top,
1027
							width: elemWidth,
1028
							height: elemHeight
1029
						},
1030
						horizontal: right < 0 ? "left" : left > 0 ? "right" : "center",
1031
						vertical: bottom < 0 ? "top" : top > 0 ? "bottom" : "middle"
1032
					};
1033
				if ( targetWidth < elemWidth && abs( left + right ) < targetWidth ) {
1034
					feedback.horizontal = "center";
1035
				}
1036
				if ( targetHeight < elemHeight && abs( top + bottom ) < targetHeight ) {
1037
					feedback.vertical = "middle";
1038
				}
1039
				if ( max( abs( left ), abs( right ) ) > max( abs( top ), abs( bottom ) ) ) {
1040
					feedback.important = "horizontal";
1041
				} else {
1042
					feedback.important = "vertical";
1043
				}
1044
				options.using.call( this, props, feedback );
1045
			};
1046
		}
1047
1048
		elem.offset( $.extend( position, { using: using } ) );
1049
	} );
1050
};
1051
1052
$.ui.position = {
1053
	fit: {
1054
		left: function( position, data ) {
1055
			var within = data.within,
1056
				withinOffset = within.isWindow ? within.scrollLeft : within.offset.left,
1057
				outerWidth = within.width,
1058
				collisionPosLeft = position.left - data.collisionPosition.marginLeft,
1059
				overLeft = withinOffset - collisionPosLeft,
1060
				overRight = collisionPosLeft + data.collisionWidth - outerWidth - withinOffset,
1061
				newOverRight;
1062
1063
			// Element is wider than within
1064
			if ( data.collisionWidth > outerWidth ) {
1065
1066
				// Element is initially over the left side of within
1067
				if ( overLeft > 0 && overRight <= 0 ) {
1068
					newOverRight = position.left + overLeft + data.collisionWidth - outerWidth -
1069
						withinOffset;
1070
					position.left += overLeft - newOverRight;
1071
1072
				// Element is initially over right side of within
1073
				} else if ( overRight > 0 && overLeft <= 0 ) {
1074
					position.left = withinOffset;
1075
1076
				// Element is initially over both left and right sides of within
1077
				} else {
1078
					if ( overLeft > overRight ) {
1079
						position.left = withinOffset + outerWidth - data.collisionWidth;
1080
					} else {
1081
						position.left = withinOffset;
1082
					}
1083
				}
1084
1085
			// Too far left -> align with left edge
1086
			} else if ( overLeft > 0 ) {
1087
				position.left += overLeft;
1088
1089
			// Too far right -> align with right edge
1090
			} else if ( overRight > 0 ) {
1091
				position.left -= overRight;
1092
1093
			// Adjust based on position and margin
1094
			} else {
1095
				position.left = max( position.left - collisionPosLeft, position.left );
1096
			}
1097
		},
1098
		top: function( position, data ) {
1099
			var within = data.within,
1100
				withinOffset = within.isWindow ? within.scrollTop : within.offset.top,
1101
				outerHeight = data.within.height,
1102
				collisionPosTop = position.top - data.collisionPosition.marginTop,
1103
				overTop = withinOffset - collisionPosTop,
1104
				overBottom = collisionPosTop + data.collisionHeight - outerHeight - withinOffset,
1105
				newOverBottom;
1106
1107
			// Element is taller than within
1108
			if ( data.collisionHeight > outerHeight ) {
1109
1110
				// Element is initially over the top of within
1111
				if ( overTop > 0 && overBottom <= 0 ) {
1112
					newOverBottom = position.top + overTop + data.collisionHeight - outerHeight -
1113
						withinOffset;
1114
					position.top += overTop - newOverBottom;
1115
1116
				// Element is initially over bottom of within
1117
				} else if ( overBottom > 0 && overTop <= 0 ) {
1118
					position.top = withinOffset;
1119
1120
				// Element is initially over both top and bottom of within
1121
				} else {
1122
					if ( overTop > overBottom ) {
1123
						position.top = withinOffset + outerHeight - data.collisionHeight;
1124
					} else {
1125
						position.top = withinOffset;
1126
					}
1127
				}
1128
1129
			// Too far up -> align with top
1130
			} else if ( overTop > 0 ) {
1131
				position.top += overTop;
1132
1133
			// Too far down -> align with bottom edge
1134
			} else if ( overBottom > 0 ) {
1135
				position.top -= overBottom;
1136
1137
			// Adjust based on position and margin
1138
			} else {
1139
				position.top = max( position.top - collisionPosTop, position.top );
1140
			}
1141
		}
1142
	},
1143
	flip: {
1144
		left: function( position, data ) {
1145
			var within = data.within,
1146
				withinOffset = within.offset.left + within.scrollLeft,
1147
				outerWidth = within.width,
1148
				offsetLeft = within.isWindow ? within.scrollLeft : within.offset.left,
1149
				collisionPosLeft = position.left - data.collisionPosition.marginLeft,
1150
				overLeft = collisionPosLeft - offsetLeft,
1151
				overRight = collisionPosLeft + data.collisionWidth - outerWidth - offsetLeft,
1152
				myOffset = data.my[ 0 ] === "left" ?
1153
					-data.elemWidth :
1154
					data.my[ 0 ] === "right" ?
1155
						data.elemWidth :
1156
						0,
1157
				atOffset = data.at[ 0 ] === "left" ?
1158
					data.targetWidth :
1159
					data.at[ 0 ] === "right" ?
1160
						-data.targetWidth :
1161
						0,
1162
				offset = -2 * data.offset[ 0 ],
1163
				newOverRight,
1164
				newOverLeft;
1165
1166
			if ( overLeft < 0 ) {
1167
				newOverRight = position.left + myOffset + atOffset + offset + data.collisionWidth -
1168
					outerWidth - withinOffset;
1169
				if ( newOverRight < 0 || newOverRight < abs( overLeft ) ) {
1170
					position.left += myOffset + atOffset + offset;
1171
				}
1172
			} else if ( overRight > 0 ) {
1173
				newOverLeft = position.left - data.collisionPosition.marginLeft + myOffset +
1174
					atOffset + offset - offsetLeft;
1175
				if ( newOverLeft > 0 || abs( newOverLeft ) < overRight ) {
1176
					position.left += myOffset + atOffset + offset;
1177
				}
1178
			}
1179
		},
1180
		top: function( position, data ) {
1181
			var within = data.within,
1182
				withinOffset = within.offset.top + within.scrollTop,
1183
				outerHeight = within.height,
1184
				offsetTop = within.isWindow ? within.scrollTop : within.offset.top,
1185
				collisionPosTop = position.top - data.collisionPosition.marginTop,
1186
				overTop = collisionPosTop - offsetTop,
1187
				overBottom = collisionPosTop + data.collisionHeight - outerHeight - offsetTop,
1188
				top = data.my[ 1 ] === "top",
1189
				myOffset = top ?
1190
					-data.elemHeight :
1191
					data.my[ 1 ] === "bottom" ?
1192
						data.elemHeight :
1193
						0,
1194
				atOffset = data.at[ 1 ] === "top" ?
1195
					data.targetHeight :
1196
					data.at[ 1 ] === "bottom" ?
1197
						-data.targetHeight :
1198
						0,
1199
				offset = -2 * data.offset[ 1 ],
1200
				newOverTop,
1201
				newOverBottom;
1202
			if ( overTop < 0 ) {
1203
				newOverBottom = position.top + myOffset + atOffset + offset + data.collisionHeight -
1204
					outerHeight - withinOffset;
1205
				if ( newOverBottom < 0 || newOverBottom < abs( overTop ) ) {
1206
					position.top += myOffset + atOffset + offset;
1207
				}
1208
			} else if ( overBottom > 0 ) {
1209
				newOverTop = position.top - data.collisionPosition.marginTop + myOffset + atOffset +
1210
					offset - offsetTop;
1211
				if ( newOverTop > 0 || abs( newOverTop ) < overBottom ) {
1212
					position.top += myOffset + atOffset + offset;
1213
				}
1214
			}
1215
		}
1216
	},
1217
	flipfit: {
1218
		left: function() {
1219
			$.ui.position.flip.left.apply( this, arguments );
1220
			$.ui.position.fit.left.apply( this, arguments );
1221
		},
1222
		top: function() {
1223
			$.ui.position.flip.top.apply( this, arguments );
1224
			$.ui.position.fit.top.apply( this, arguments );
1225
		}
1226
	}
1227
};
1228
1229
} )();
1230
1231
var position = $.ui.position;
1232
1233
1234
/*!
1235
 * jQuery UI :data 1.12.1
1236
 * http://jqueryui.com
1237
 *
1238
 * Copyright jQuery Foundation and other contributors
1239
 * Released under the MIT license.
1240
 * http://jquery.org/license
1241
 */
1242
1243
//>>label: :data Selector
1244
//>>group: Core
1245
//>>description: Selects elements which have data stored under the specified key.
1246
//>>docs: http://api.jqueryui.com/data-selector/
1247
1248
1249
var data = $.extend( $.expr[ ":" ], {
1250
	data: $.expr.createPseudo ?
1251
		$.expr.createPseudo( function( dataName ) {
1252
			return function( elem ) {
1253
				return !!$.data( elem, dataName );
1254
			};
1255
		} ) :
1256
1257
		// Support: jQuery <1.8
1258
		function( elem, i, match ) {
1259
			return !!$.data( elem, match[ 3 ] );
1260
		}
1261
} );
1262
1263
/*!
1264
 * jQuery UI Keycode 1.12.1
1265
 * http://jqueryui.com
1266
 *
1267
 * Copyright jQuery Foundation and other contributors
1268
 * Released under the MIT license.
1269
 * http://jquery.org/license
1270
 */
1271
1272
//>>label: Keycode
1273
//>>group: Core
1274
//>>description: Provide keycodes as keynames
1275
//>>docs: http://api.jqueryui.com/jQuery.ui.keyCode/
1276
1277
1278
var keycode = $.ui.keyCode = {
1279
	BACKSPACE: 8,
1280
	COMMA: 188,
1281
	DELETE: 46,
1282
	DOWN: 40,
1283
	END: 35,
1284
	ENTER: 13,
1285
	ESCAPE: 27,
1286
	HOME: 36,
1287
	LEFT: 37,
1288
	PAGE_DOWN: 34,
1289
	PAGE_UP: 33,
1290
	PERIOD: 190,
1291
	RIGHT: 39,
1292
	SPACE: 32,
1293
	TAB: 9,
1294
	UP: 38
1295
};
1296
1297
1298
/*!
1299
 * jQuery UI Scroll Parent 1.12.1
1300
 * http://jqueryui.com
1301
 *
1302
 * Copyright jQuery Foundation and other contributors
1303
 * Released under the MIT license.
1304
 * http://jquery.org/license
1305
 */
1306
1307
//>>label: scrollParent
1308
//>>group: Core
1309
//>>description: Get the closest ancestor element that is scrollable.
1310
//>>docs: http://api.jqueryui.com/scrollParent/
1311
1312
1313
1314
var scrollParent = $.fn.scrollParent = function( includeHidden ) {
1315
	var position = this.css( "position" ),
1316
		excludeStaticParent = position === "absolute",
1317
		overflowRegex = includeHidden ? /(auto|scroll|hidden)/ : /(auto|scroll)/,
1318
		scrollParent = this.parents().filter( function() {
1319
			var parent = $( this );
1320
			if ( excludeStaticParent && parent.css( "position" ) === "static" ) {
1321
				return false;
1322
			}
1323
			return overflowRegex.test( parent.css( "overflow" ) + parent.css( "overflow-y" ) +
1324
				parent.css( "overflow-x" ) );
1325
		} ).eq( 0 );
1326
1327
	return position === "fixed" || !scrollParent.length ?
1328
		$( this[ 0 ].ownerDocument || document ) :
1329
		scrollParent;
1330
};
1331
1332
1333
/*!
1334
 * jQuery UI Unique ID 1.12.1
1335
 * http://jqueryui.com
1336
 *
1337
 * Copyright jQuery Foundation and other contributors
1338
 * Released under the MIT license.
1339
 * http://jquery.org/license
1340
 */
1341
1342
//>>label: uniqueId
1343
//>>group: Core
1344
//>>description: Functions to generate and remove uniqueId's
1345
//>>docs: http://api.jqueryui.com/uniqueId/
1346
1347
1348
1349
var uniqueId = $.fn.extend( {
1350
	uniqueId: ( function() {
1351
		var uuid = 0;
1352
1353
		return function() {
1354
			return this.each( function() {
1355
				if ( !this.id ) {
1356
					this.id = "ui-id-" + ( ++uuid );
1357
				}
1358
			} );
1359
		};
1360
	} )(),
1361
1362
	removeUniqueId: function() {
1363
		return this.each( function() {
1364
			if ( /^ui-id-\d+$/.test( this.id ) ) {
1365
				$( this ).removeAttr( "id" );
1366
			}
1367
		} );
1368
	}
1369
} );
1370
1371
1372
1373
1374
// This file is deprecated
1375
var ie = $.ui.ie = !!/msie [\w.]+/.exec( navigator.userAgent.toLowerCase() );
1376
1377
/*!
1378
 * jQuery UI Mouse 1.12.1
1379
 * http://jqueryui.com
1380
 *
1381
 * Copyright jQuery Foundation and other contributors
1382
 * Released under the MIT license.
1383
 * http://jquery.org/license
1384
 */
1385
1386
//>>label: Mouse
1387
//>>group: Widgets
1388
//>>description: Abstracts mouse-based interactions to assist in creating certain widgets.
1389
//>>docs: http://api.jqueryui.com/mouse/
1390
1391
1392
1393
var mouseHandled = false;
1394
$( document ).on( "mouseup", function() {
1395
	mouseHandled = false;
1396
} );
1397
1398
var widgetsMouse = $.widget( "ui.mouse", {
1399
	version: "1.12.1",
1400
	options: {
1401
		cancel: "input, textarea, button, select, option",
1402
		distance: 1,
1403
		delay: 0
1404
	},
1405
	_mouseInit: function() {
1406
		var that = this;
1407
1408
		this.element
1409
			.on( "mousedown." + this.widgetName, function( event ) {
1410
				return that._mouseDown( event );
1411
			} )
1412
			.on( "click." + this.widgetName, function( event ) {
1413
				if ( true === $.data( event.target, that.widgetName + ".preventClickEvent" ) ) {
1414
					$.removeData( event.target, that.widgetName + ".preventClickEvent" );
1415
					event.stopImmediatePropagation();
1416
					return false;
1417
				}
1418
			} );
1419
1420
		this.started = false;
1421
	},
1422
1423
	// TODO: make sure destroying one instance of mouse doesn't mess with
1424
	// other instances of mouse
1425
	_mouseDestroy: function() {
1426
		this.element.off( "." + this.widgetName );
1427
		if ( this._mouseMoveDelegate ) {
1428
			this.document
1429
				.off( "mousemove." + this.widgetName, this._mouseMoveDelegate )
1430
				.off( "mouseup." + this.widgetName, this._mouseUpDelegate );
1431
		}
1432
	},
1433
1434
	_mouseDown: function( event ) {
1435
1436
		// don't let more than one widget handle mouseStart
1437
		if ( mouseHandled ) {
1438
			return;
1439
		}
1440
1441
		this._mouseMoved = false;
1442
1443
		// We may have missed mouseup (out of window)
1444
		( this._mouseStarted && this._mouseUp( event ) );
1445
1446
		this._mouseDownEvent = event;
1447
1448
		var that = this,
1449
			btnIsLeft = ( event.which === 1 ),
1450
1451
			// event.target.nodeName works around a bug in IE 8 with
1452
			// disabled inputs (#7620)
1453
			elIsCancel = ( typeof this.options.cancel === "string" && event.target.nodeName ?
1454
				$( event.target ).closest( this.options.cancel ).length : false );
1455
		if ( !btnIsLeft || elIsCancel || !this._mouseCapture( event ) ) {
1456
			return true;
1457
		}
1458
1459
		this.mouseDelayMet = !this.options.delay;
1460
		if ( !this.mouseDelayMet ) {
1461
			this._mouseDelayTimer = setTimeout( function() {
1462
				that.mouseDelayMet = true;
1463
			}, this.options.delay );
1464
		}
1465
1466
		if ( this._mouseDistanceMet( event ) && this._mouseDelayMet( event ) ) {
1467
			this._mouseStarted = ( this._mouseStart( event ) !== false );
1468
			if ( !this._mouseStarted ) {
1469
				event.preventDefault();
1470
				return true;
1471
			}
1472
		}
1473
1474
		// Click event may never have fired (Gecko & Opera)
1475
		if ( true === $.data( event.target, this.widgetName + ".preventClickEvent" ) ) {
1476
			$.removeData( event.target, this.widgetName + ".preventClickEvent" );
1477
		}
1478
1479
		// These delegates are required to keep context
1480
		this._mouseMoveDelegate = function( event ) {
1481
			return that._mouseMove( event );
1482
		};
1483
		this._mouseUpDelegate = function( event ) {
1484
			return that._mouseUp( event );
1485
		};
1486
1487
		this.document
1488
			.on( "mousemove." + this.widgetName, this._mouseMoveDelegate )
1489
			.on( "mouseup." + this.widgetName, this._mouseUpDelegate );
1490
1491
		event.preventDefault();
1492
1493
		mouseHandled = true;
1494
		return true;
1495
	},
1496
1497
	_mouseMove: function( event ) {
1498
1499
		// Only check for mouseups outside the document if you've moved inside the document
1500
		// at least once. This prevents the firing of mouseup in the case of IE<9, which will
1501
		// fire a mousemove event if content is placed under the cursor. See #7778
1502
		// Support: IE <9
1503
		if ( this._mouseMoved ) {
1504
1505
			// IE mouseup check - mouseup happened when mouse was out of window
1506
			if ( $.ui.ie && ( !document.documentMode || document.documentMode < 9 ) &&
1507
					!event.button ) {
1508
				return this._mouseUp( event );
1509
1510
			// Iframe mouseup check - mouseup occurred in another document
1511
			} else if ( !event.which ) {
1512
1513
				// Support: Safari <=8 - 9
1514
				// Safari sets which to 0 if you press any of the following keys
1515
				// during a drag (#14461)
1516
				if ( event.originalEvent.altKey || event.originalEvent.ctrlKey ||
1517
						event.originalEvent.metaKey || event.originalEvent.shiftKey ) {
1518
					this.ignoreMissingWhich = true;
1519
				} else if ( !this.ignoreMissingWhich ) {
1520
					return this._mouseUp( event );
1521
				}
1522
			}
1523
		}
1524
1525
		if ( event.which || event.button ) {
1526
			this._mouseMoved = true;
1527
		}
1528
1529
		if ( this._mouseStarted ) {
1530
			this._mouseDrag( event );
1531
			return event.preventDefault();
1532
		}
1533
1534
		if ( this._mouseDistanceMet( event ) && this._mouseDelayMet( event ) ) {
1535
			this._mouseStarted =
1536
				( this._mouseStart( this._mouseDownEvent, event ) !== false );
1537
			( this._mouseStarted ? this._mouseDrag( event ) : this._mouseUp( event ) );
1538
		}
1539
1540
		return !this._mouseStarted;
1541
	},
1542
1543
	_mouseUp: function( event ) {
1544
		this.document
1545
			.off( "mousemove." + this.widgetName, this._mouseMoveDelegate )
1546
			.off( "mouseup." + this.widgetName, this._mouseUpDelegate );
1547
1548
		if ( this._mouseStarted ) {
1549
			this._mouseStarted = false;
1550
1551
			if ( event.target === this._mouseDownEvent.target ) {
1552
				$.data( event.target, this.widgetName + ".preventClickEvent", true );
1553
			}
1554
1555
			this._mouseStop( event );
1556
		}
1557
1558
		if ( this._mouseDelayTimer ) {
1559
			clearTimeout( this._mouseDelayTimer );
1560
			delete this._mouseDelayTimer;
1561
		}
1562
1563
		this.ignoreMissingWhich = false;
1564
		mouseHandled = false;
1565
		event.preventDefault();
1566
	},
1567
1568
	_mouseDistanceMet: function( event ) {
1569
		return ( Math.max(
1570
				Math.abs( this._mouseDownEvent.pageX - event.pageX ),
1571
				Math.abs( this._mouseDownEvent.pageY - event.pageY )
1572
			) >= this.options.distance
1573
		);
1574
	},
1575
1576
	_mouseDelayMet: function( /* event */ ) {
1577
		return this.mouseDelayMet;
1578
	},
1579
1580
	// These are placeholder methods, to be overriden by extending plugin
1581
	_mouseStart: function( /* event */ ) {},
1582
	_mouseDrag: function( /* event */ ) {},
1583
	_mouseStop: function( /* event */ ) {},
1584
	_mouseCapture: function( /* event */ ) { return true; }
1585
} );
1586
1587
1588
/*!
1589
 * jQuery UI Sortable 1.12.1
1590
 * http://jqueryui.com
1591
 *
1592
 * Copyright jQuery Foundation and other contributors
1593
 * Released under the MIT license.
1594
 * http://jquery.org/license
1595
 */
1596
1597
//>>label: Sortable
1598
//>>group: Interactions
1599
//>>description: Enables items in a list to be sorted using the mouse.
1600
//>>docs: http://api.jqueryui.com/sortable/
1601
//>>demos: http://jqueryui.com/sortable/
1602
//>>css.structure: ../../themes/base/sortable.css
1603
1604
1605
1606
var widgetsSortable = $.widget( "ui.sortable", $.ui.mouse, {
1607
	version: "1.12.1",
1608
	widgetEventPrefix: "sort",
1609
	ready: false,
1610
	options: {
1611
		appendTo: "parent",
1612
		axis: false,
1613
		connectWith: false,
1614
		containment: false,
1615
		cursor: "auto",
1616
		cursorAt: false,
1617
		dropOnEmpty: true,
1618
		forcePlaceholderSize: false,
1619
		forceHelperSize: false,
1620
		grid: false,
1621
		handle: false,
1622
		helper: "original",
1623
		items: "> *",
1624
		opacity: false,
1625
		placeholder: false,
1626
		revert: false,
1627
		scroll: true,
1628
		scrollSensitivity: 20,
1629
		scrollSpeed: 20,
1630
		scope: "default",
1631
		tolerance: "intersect",
1632
		zIndex: 1000,
1633
1634
		// Callbacks
1635
		activate: null,
1636
		beforeStop: null,
1637
		change: null,
1638
		deactivate: null,
1639
		out: null,
1640
		over: null,
1641
		receive: null,
1642
		remove: null,
1643
		sort: null,
1644
		start: null,
1645
		stop: null,
1646
		update: null
1647
	},
1648
1649
	_isOverAxis: function( x, reference, size ) {
1650
		return ( x >= reference ) && ( x < ( reference + size ) );
1651
	},
1652
1653
	_isFloating: function( item ) {
1654
		return ( /left|right/ ).test( item.css( "float" ) ) ||
1655
			( /inline|table-cell/ ).test( item.css( "display" ) );
1656
	},
1657
1658
	_create: function() {
1659
		this.containerCache = {};
1660
		this._addClass( "ui-sortable" );
1661
1662
		//Get the items
1663
		this.refresh();
1664
1665
		//Let's determine the parent's offset
1666
		this.offset = this.element.offset();
1667
1668
		//Initialize mouse events for interaction
1669
		this._mouseInit();
1670
1671
		this._setHandleClassName();
1672
1673
		//We're ready to go
1674
		this.ready = true;
1675
1676
	},
1677
1678
	_setOption: function( key, value ) {
1679
		this._super( key, value );
1680
1681
		if ( key === "handle" ) {
1682
			this._setHandleClassName();
1683
		}
1684
	},
1685
1686
	_setHandleClassName: function() {
1687
		var that = this;
1688
		this._removeClass( this.element.find( ".ui-sortable-handle" ), "ui-sortable-handle" );
1689
		$.each( this.items, function() {
1690
			that._addClass(
1691
				this.instance.options.handle ?
1692
					this.item.find( this.instance.options.handle ) :
1693
					this.item,
1694
				"ui-sortable-handle"
1695
			);
1696
		} );
1697
	},
1698
1699
	_destroy: function() {
1700
		this._mouseDestroy();
1701
1702
		for ( var i = this.items.length - 1; i >= 0; i-- ) {
1703
			this.items[ i ].item.removeData( this.widgetName + "-item" );
1704
		}
1705
1706
		return this;
1707
	},
1708
1709
	_mouseCapture: function( event, overrideHandle ) {
1710
		var currentItem = null,
1711
			validHandle = false,
1712
			that = this;
1713
1714
		if ( this.reverting ) {
1715
			return false;
1716
		}
1717
1718
		if ( this.options.disabled || this.options.type === "static" ) {
1719
			return false;
1720
		}
1721
1722
		//We have to refresh the items data once first
1723
		this._refreshItems( event );
1724
1725
		//Find out if the clicked node (or one of its parents) is a actual item in this.items
1726
		$( event.target ).parents().each( function() {
1727
			if ( $.data( this, that.widgetName + "-item" ) === that ) {
1728
				currentItem = $( this );
1729
				return false;
1730
			}
1731
		} );
1732
		if ( $.data( event.target, that.widgetName + "-item" ) === that ) {
1733
			currentItem = $( event.target );
1734
		}
1735
1736
		if ( !currentItem ) {
1737
			return false;
1738
		}
1739
		if ( this.options.handle && !overrideHandle ) {
1740
			$( this.options.handle, currentItem ).find( "*" ).addBack().each( function() {
1741
				if ( this === event.target ) {
1742
					validHandle = true;
1743
				}
1744
			} );
1745
			if ( !validHandle ) {
1746
				return false;
1747
			}
1748
		}
1749
1750
		this.currentItem = currentItem;
1751
		this._removeCurrentsFromItems();
1752
		return true;
1753
1754
	},
1755
1756
	_mouseStart: function( event, overrideHandle, noActivation ) {
1757
1758
		var i, body,
1759
			o = this.options;
1760
1761
		this.currentContainer = this;
1762
1763
		//We only need to call refreshPositions, because the refreshItems call has been moved to
1764
		// mouseCapture
1765
		this.refreshPositions();
1766
1767
		//Create and append the visible helper
1768
		this.helper = this._createHelper( event );
1769
1770
		//Cache the helper size
1771
		this._cacheHelperProportions();
1772
1773
		/*
1774
		 * - Position generation -
1775
		 * This block generates everything position related - it's the core of draggables.
1776
		 */
1777
1778
		//Cache the margins of the original element
1779
		this._cacheMargins();
1780
1781
		//Get the next scrolling parent
1782
		this.scrollParent = this.helper.scrollParent();
1783
1784
		//The element's absolute position on the page minus margins
1785
		this.offset = this.currentItem.offset();
1786
		this.offset = {
1787
			top: this.offset.top - this.margins.top,
1788
			left: this.offset.left - this.margins.left
1789
		};
1790
1791
		$.extend( this.offset, {
1792
			click: { //Where the click happened, relative to the element
1793
				left: event.pageX - this.offset.left,
1794
				top: event.pageY - this.offset.top
1795
			},
1796
			parent: this._getParentOffset(),
1797
1798
			// This is a relative to absolute position minus the actual position calculation -
1799
			// only used for relative positioned helper
1800
			relative: this._getRelativeOffset()
1801
		} );
1802
1803
		// Only after we got the offset, we can change the helper's position to absolute
1804
		// TODO: Still need to figure out a way to make relative sorting possible
1805
		this.helper.css( "position", "absolute" );
1806
		this.cssPosition = this.helper.css( "position" );
1807
1808
		//Generate the original position
1809
		this.originalPosition = this._generatePosition( event );
1810
		this.originalPageX = event.pageX;
1811
		this.originalPageY = event.pageY;
1812
1813
		//Adjust the mouse offset relative to the helper if "cursorAt" is supplied
1814
		( o.cursorAt && this._adjustOffsetFromHelper( o.cursorAt ) );
1815
1816
		//Cache the former DOM position
1817
		this.domPosition = {
1818
			prev: this.currentItem.prev()[ 0 ],
1819
			parent: this.currentItem.parent()[ 0 ]
1820
		};
1821
1822
		// If the helper is not the original, hide the original so it's not playing any role during
1823
		// the drag, won't cause anything bad this way
1824
		if ( this.helper[ 0 ] !== this.currentItem[ 0 ] ) {
1825
			this.currentItem.hide();
1826
		}
1827
1828
		//Create the placeholder
1829
		this._createPlaceholder();
1830
1831
		//Set a containment if given in the options
1832
		if ( o.containment ) {
1833
			this._setContainment();
1834
		}
1835
1836
		if ( o.cursor && o.cursor !== "auto" ) { // cursor option
1837
			body = this.document.find( "body" );
1838
1839
			// Support: IE
1840
			this.storedCursor = body.css( "cursor" );
1841
			body.css( "cursor", o.cursor );
1842
1843
			this.storedStylesheet =
1844
				$( "<style>*{ cursor: " + o.cursor + " !important; }</style>" ).appendTo( body );
1845
		}
1846
1847
		if ( o.opacity ) { // opacity option
1848
			if ( this.helper.css( "opacity" ) ) {
1849
				this._storedOpacity = this.helper.css( "opacity" );
1850
			}
1851
			this.helper.css( "opacity", o.opacity );
1852
		}
1853
1854
		if ( o.zIndex ) { // zIndex option
1855
			if ( this.helper.css( "zIndex" ) ) {
1856
				this._storedZIndex = this.helper.css( "zIndex" );
1857
			}
1858
			this.helper.css( "zIndex", o.zIndex );
1859
		}
1860
1861
		//Prepare scrolling
1862
		if ( this.scrollParent[ 0 ] !== this.document[ 0 ] &&
1863
				this.scrollParent[ 0 ].tagName !== "HTML" ) {
1864
			this.overflowOffset = this.scrollParent.offset();
1865
		}
1866
1867
		//Call callbacks
1868
		this._trigger( "start", event, this._uiHash() );
1869
1870
		//Recache the helper size
1871
		if ( !this._preserveHelperProportions ) {
1872
			this._cacheHelperProportions();
1873
		}
1874
1875
		//Post "activate" events to possible containers
1876
		if ( !noActivation ) {
1877
			for ( i = this.containers.length - 1; i >= 0; i-- ) {
1878
				this.containers[ i ]._trigger( "activate", event, this._uiHash( this ) );
1879
			}
1880
		}
1881
1882
		//Prepare possible droppables
1883
		if ( $.ui.ddmanager ) {
1884
			$.ui.ddmanager.current = this;
1885
		}
1886
1887
		if ( $.ui.ddmanager && !o.dropBehaviour ) {
1888
			$.ui.ddmanager.prepareOffsets( this, event );
1889
		}
1890
1891
		this.dragging = true;
1892
1893
		this._addClass( this.helper, "ui-sortable-helper" );
1894
1895
		// Execute the drag once - this causes the helper not to be visiblebefore getting its
1896
		// correct position
1897
		this._mouseDrag( event );
1898
		return true;
1899
1900
	},
1901
1902
	_mouseDrag: function( event ) {
1903
		var i, item, itemElement, intersection,
1904
			o = this.options,
1905
			scrolled = false;
1906
1907
		//Compute the helpers position
1908
		this.position = this._generatePosition( event );
1909
		this.positionAbs = this._convertPositionTo( "absolute" );
1910
1911
		if ( !this.lastPositionAbs ) {
1912
			this.lastPositionAbs = this.positionAbs;
1913
		}
1914
1915
		//Do scrolling
1916
		if ( this.options.scroll ) {
1917
			if ( this.scrollParent[ 0 ] !== this.document[ 0 ] &&
1918
					this.scrollParent[ 0 ].tagName !== "HTML" ) {
1919
1920
				if ( ( this.overflowOffset.top + this.scrollParent[ 0 ].offsetHeight ) -
1921
						event.pageY < o.scrollSensitivity ) {
1922
					this.scrollParent[ 0 ].scrollTop =
1923
						scrolled = this.scrollParent[ 0 ].scrollTop + o.scrollSpeed;
1924
				} else if ( event.pageY - this.overflowOffset.top < o.scrollSensitivity ) {
1925
					this.scrollParent[ 0 ].scrollTop =
1926
						scrolled = this.scrollParent[ 0 ].scrollTop - o.scrollSpeed;
1927
				}
1928
1929
				if ( ( this.overflowOffset.left + this.scrollParent[ 0 ].offsetWidth ) -
1930
						event.pageX < o.scrollSensitivity ) {
1931
					this.scrollParent[ 0 ].scrollLeft = scrolled =
1932
						this.scrollParent[ 0 ].scrollLeft + o.scrollSpeed;
1933
				} else if ( event.pageX - this.overflowOffset.left < o.scrollSensitivity ) {
1934
					this.scrollParent[ 0 ].scrollLeft = scrolled =
1935
						this.scrollParent[ 0 ].scrollLeft - o.scrollSpeed;
1936
				}
1937
1938
			} else {
1939
1940
				if ( event.pageY - this.document.scrollTop() < o.scrollSensitivity ) {
1941
					scrolled = this.document.scrollTop( this.document.scrollTop() - o.scrollSpeed );
1942
				} else if ( this.window.height() - ( event.pageY - this.document.scrollTop() ) <
1943
						o.scrollSensitivity ) {
1944
					scrolled = this.document.scrollTop( this.document.scrollTop() + o.scrollSpeed );
1945
				}
1946
1947
				if ( event.pageX - this.document.scrollLeft() < o.scrollSensitivity ) {
1948
					scrolled = this.document.scrollLeft(
1949
						this.document.scrollLeft() - o.scrollSpeed
1950
					);
1951
				} else if ( this.window.width() - ( event.pageX - this.document.scrollLeft() ) <
1952
						o.scrollSensitivity ) {
1953
					scrolled = this.document.scrollLeft(
1954
						this.document.scrollLeft() + o.scrollSpeed
1955
					);
1956
				}
1957
1958
			}
1959
1960
			if ( scrolled !== false && $.ui.ddmanager && !o.dropBehaviour ) {
1961
				$.ui.ddmanager.prepareOffsets( this, event );
1962
			}
1963
		}
1964
1965
		//Regenerate the absolute position used for position checks
1966
		this.positionAbs = this._convertPositionTo( "absolute" );
1967
1968
		//Set the helper position
1969
		if ( !this.options.axis || this.options.axis !== "y" ) {
1970
			this.helper[ 0 ].style.left = this.position.left + "px";
1971
		}
1972
		if ( !this.options.axis || this.options.axis !== "x" ) {
1973
			this.helper[ 0 ].style.top = this.position.top + "px";
1974
		}
1975
1976
		//Rearrange
1977
		for ( i = this.items.length - 1; i >= 0; i-- ) {
1978
1979
			//Cache variables and intersection, continue if no intersection
1980
			item = this.items[ i ];
1981
			itemElement = item.item[ 0 ];
1982
			intersection = this._intersectsWithPointer( item );
1983
			if ( !intersection ) {
1984
				continue;
1985
			}
1986
1987
			// Only put the placeholder inside the current Container, skip all
1988
			// items from other containers. This works because when moving
1989
			// an item from one container to another the
1990
			// currentContainer is switched before the placeholder is moved.
1991
			//
1992
			// Without this, moving items in "sub-sortables" can cause
1993
			// the placeholder to jitter between the outer and inner container.
1994
			if ( item.instance !== this.currentContainer ) {
1995
				continue;
1996
			}
1997
1998
			// Cannot intersect with itself
1999
			// no useless actions that have been done before
2000
			// no action if the item moved is the parent of the item checked
2001
			if ( itemElement !== this.currentItem[ 0 ] &&
2002
				this.placeholder[ intersection === 1 ? "next" : "prev" ]()[ 0 ] !== itemElement &&
2003
				!$.contains( this.placeholder[ 0 ], itemElement ) &&
2004
				( this.options.type === "semi-dynamic" ?
2005
					!$.contains( this.element[ 0 ], itemElement ) :
2006
					true
2007
				)
2008
			) {
2009
2010
				this.direction = intersection === 1 ? "down" : "up";
2011
2012
				if ( this.options.tolerance === "pointer" || this._intersectsWithSides( item ) ) {
2013
					this._rearrange( event, item );
2014
				} else {
2015
					break;
2016
				}
2017
2018
				this._trigger( "change", event, this._uiHash() );
2019
				break;
2020
			}
2021
		}
2022
2023
		//Post events to containers
2024
		this._contactContainers( event );
2025
2026
		//Interconnect with droppables
2027
		if ( $.ui.ddmanager ) {
2028
			$.ui.ddmanager.drag( this, event );
2029
		}
2030
2031
		//Call callbacks
2032
		this._trigger( "sort", event, this._uiHash() );
2033
2034
		this.lastPositionAbs = this.positionAbs;
2035
		return false;
2036
2037
	},
2038
2039
	_mouseStop: function( event, noPropagation ) {
2040
2041
		if ( !event ) {
2042
			return;
2043
		}
2044
2045
		//If we are using droppables, inform the manager about the drop
2046
		if ( $.ui.ddmanager && !this.options.dropBehaviour ) {
2047
			$.ui.ddmanager.drop( this, event );
2048
		}
2049
2050
		if ( this.options.revert ) {
2051
			var that = this,
2052
				cur = this.placeholder.offset(),
2053
				axis = this.options.axis,
2054
				animation = {};
2055
2056
			if ( !axis || axis === "x" ) {
2057
				animation.left = cur.left - this.offset.parent.left - this.margins.left +
2058
					( this.offsetParent[ 0 ] === this.document[ 0 ].body ?
2059
						0 :
2060
						this.offsetParent[ 0 ].scrollLeft
2061
					);
2062
			}
2063
			if ( !axis || axis === "y" ) {
2064
				animation.top = cur.top - this.offset.parent.top - this.margins.top +
2065
					( this.offsetParent[ 0 ] === this.document[ 0 ].body ?
2066
						0 :
2067
						this.offsetParent[ 0 ].scrollTop
2068
					);
2069
			}
2070
			this.reverting = true;
2071
			$( this.helper ).animate(
2072
				animation,
2073
				parseInt( this.options.revert, 10 ) || 500,
2074
				function() {
2075
					that._clear( event );
2076
				}
2077
			);
2078
		} else {
2079
			this._clear( event, noPropagation );
2080
		}
2081
2082
		return false;
2083
2084
	},
2085
2086
	cancel: function() {
2087
2088
		if ( this.dragging ) {
2089
2090
			this._mouseUp( new $.Event( "mouseup", { target: null } ) );
2091
2092
			if ( this.options.helper === "original" ) {
2093
				this.currentItem.css( this._storedCSS );
2094
				this._removeClass( this.currentItem, "ui-sortable-helper" );
2095
			} else {
2096
				this.currentItem.show();
2097
			}
2098
2099
			//Post deactivating events to containers
2100
			for ( var i = this.containers.length - 1; i >= 0; i-- ) {
2101
				this.containers[ i ]._trigger( "deactivate", null, this._uiHash( this ) );
2102
				if ( this.containers[ i ].containerCache.over ) {
2103
					this.containers[ i ]._trigger( "out", null, this._uiHash( this ) );
2104
					this.containers[ i ].containerCache.over = 0;
2105
				}
2106
			}
2107
2108
		}
2109
2110
		if ( this.placeholder ) {
2111
2112
			//$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately,
2113
			// it unbinds ALL events from the original node!
2114
			if ( this.placeholder[ 0 ].parentNode ) {
2115
				this.placeholder[ 0 ].parentNode.removeChild( this.placeholder[ 0 ] );
2116
			}
2117
			if ( this.options.helper !== "original" && this.helper &&
2118
					this.helper[ 0 ].parentNode ) {
2119
				this.helper.remove();
2120
			}
2121
2122
			$.extend( this, {
2123
				helper: null,
2124
				dragging: false,
2125
				reverting: false,
2126
				_noFinalSort: null
2127
			} );
2128
2129
			if ( this.domPosition.prev ) {
2130
				$( this.domPosition.prev ).after( this.currentItem );
2131
			} else {
2132
				$( this.domPosition.parent ).prepend( this.currentItem );
2133
			}
2134
		}
2135
2136
		return this;
2137
2138
	},
2139
2140
	serialize: function( o ) {
2141
2142
		var items = this._getItemsAsjQuery( o && o.connected ),
2143
			str = [];
2144
		o = o || {};
2145
2146
		$( items ).each( function() {
2147
			var res = ( $( o.item || this ).attr( o.attribute || "id" ) || "" )
2148
				.match( o.expression || ( /(.+)[\-=_](.+)/ ) );
2149
			if ( res ) {
2150
				str.push(
2151
					( o.key || res[ 1 ] + "[]" ) +
2152
					"=" + ( o.key && o.expression ? res[ 1 ] : res[ 2 ] ) );
2153
			}
2154
		} );
2155
2156
		if ( !str.length && o.key ) {
2157
			str.push( o.key + "=" );
2158
		}
2159
2160
		return str.join( "&" );
2161
2162
	},
2163
2164
	toArray: function( o ) {
2165
2166
		var items = this._getItemsAsjQuery( o && o.connected ),
2167
			ret = [];
2168
2169
		o = o || {};
2170
2171
		items.each( function() {
2172
			ret.push( $( o.item || this ).attr( o.attribute || "id" ) || "" );
2173
		} );
2174
		return ret;
2175
2176
	},
2177
2178
	/* Be careful with the following core functions */
2179
	_intersectsWith: function( item ) {
2180
2181
		var x1 = this.positionAbs.left,
2182
			x2 = x1 + this.helperProportions.width,
2183
			y1 = this.positionAbs.top,
2184
			y2 = y1 + this.helperProportions.height,
2185
			l = item.left,
2186
			r = l + item.width,
2187
			t = item.top,
2188
			b = t + item.height,
2189
			dyClick = this.offset.click.top,
2190
			dxClick = this.offset.click.left,
2191
			isOverElementHeight = ( this.options.axis === "x" ) || ( ( y1 + dyClick ) > t &&
2192
				( y1 + dyClick ) < b ),
2193
			isOverElementWidth = ( this.options.axis === "y" ) || ( ( x1 + dxClick ) > l &&
2194
				( x1 + dxClick ) < r ),
2195
			isOverElement = isOverElementHeight && isOverElementWidth;
2196
2197
		if ( this.options.tolerance === "pointer" ||
2198
			this.options.forcePointerForContainers ||
2199
			( this.options.tolerance !== "pointer" &&
2200
				this.helperProportions[ this.floating ? "width" : "height" ] >
2201
				item[ this.floating ? "width" : "height" ] )
2202
		) {
2203
			return isOverElement;
2204
		} else {
2205
2206
			return ( l < x1 + ( this.helperProportions.width / 2 ) && // Right Half
2207
				x2 - ( this.helperProportions.width / 2 ) < r && // Left Half
2208
				t < y1 + ( this.helperProportions.height / 2 ) && // Bottom Half
2209
				y2 - ( this.helperProportions.height / 2 ) < b ); // Top Half
2210
2211
		}
2212
	},
2213
2214
	_intersectsWithPointer: function( item ) {
2215
		var verticalDirection, horizontalDirection,
2216
			isOverElementHeight = ( this.options.axis === "x" ) ||
2217
				this._isOverAxis(
2218
					this.positionAbs.top + this.offset.click.top, item.top, item.height ),
2219
			isOverElementWidth = ( this.options.axis === "y" ) ||
2220
				this._isOverAxis(
2221
					this.positionAbs.left + this.offset.click.left, item.left, item.width ),
2222
			isOverElement = isOverElementHeight && isOverElementWidth;
2223
2224
		if ( !isOverElement ) {
2225
			return false;
2226
		}
2227
2228
		verticalDirection = this._getDragVerticalDirection();
2229
		horizontalDirection = this._getDragHorizontalDirection();
2230
2231
		return this.floating ?
2232
			( ( horizontalDirection === "right" || verticalDirection === "down" ) ? 2 : 1 )
2233
			: ( verticalDirection && ( verticalDirection === "down" ? 2 : 1 ) );
2234
2235
	},
2236
2237
	_intersectsWithSides: function( item ) {
2238
2239
		var isOverBottomHalf = this._isOverAxis( this.positionAbs.top +
2240
				this.offset.click.top, item.top + ( item.height / 2 ), item.height ),
2241
			isOverRightHalf = this._isOverAxis( this.positionAbs.left +
2242
				this.offset.click.left, item.left + ( item.width / 2 ), item.width ),
2243
			verticalDirection = this._getDragVerticalDirection(),
2244
			horizontalDirection = this._getDragHorizontalDirection();
2245
2246
		if ( this.floating && horizontalDirection ) {
2247
			return ( ( horizontalDirection === "right" && isOverRightHalf ) ||
2248
				( horizontalDirection === "left" && !isOverRightHalf ) );
2249
		} else {
2250
			return verticalDirection && ( ( verticalDirection === "down" && isOverBottomHalf ) ||
2251
				( verticalDirection === "up" && !isOverBottomHalf ) );
2252
		}
2253
2254
	},
2255
2256
	_getDragVerticalDirection: function() {
2257
		var delta = this.positionAbs.top - this.lastPositionAbs.top;
2258
		return delta !== 0 && ( delta > 0 ? "down" : "up" );
2259
	},
2260
2261
	_getDragHorizontalDirection: function() {
2262
		var delta = this.positionAbs.left - this.lastPositionAbs.left;
2263
		return delta !== 0 && ( delta > 0 ? "right" : "left" );
2264
	},
2265
2266
	refresh: function( event ) {
2267
		this._refreshItems( event );
2268
		this._setHandleClassName();
2269
		this.refreshPositions();
2270
		return this;
2271
	},
2272
2273
	_connectWith: function() {
2274
		var options = this.options;
2275
		return options.connectWith.constructor === String ?
2276
			[ options.connectWith ] :
2277
			options.connectWith;
2278
	},
2279
2280
	_getItemsAsjQuery: function( connected ) {
2281
2282
		var i, j, cur, inst,
2283
			items = [],
2284
			queries = [],
2285
			connectWith = this._connectWith();
2286
2287
		if ( connectWith && connected ) {
2288
			for ( i = connectWith.length - 1; i >= 0; i-- ) {
2289
				cur = $( connectWith[ i ], this.document[ 0 ] );
2290
				for ( j = cur.length - 1; j >= 0; j-- ) {
2291
					inst = $.data( cur[ j ], this.widgetFullName );
2292
					if ( inst && inst !== this && !inst.options.disabled ) {
2293
						queries.push( [ $.isFunction( inst.options.items ) ?
2294
							inst.options.items.call( inst.element ) :
2295
							$( inst.options.items, inst.element )
2296
								.not( ".ui-sortable-helper" )
2297
								.not( ".ui-sortable-placeholder" ), inst ] );
2298
					}
2299
				}
2300
			}
2301
		}
2302
2303
		queries.push( [ $.isFunction( this.options.items ) ?
2304
			this.options.items
2305
				.call( this.element, null, { options: this.options, item: this.currentItem } ) :
2306
			$( this.options.items, this.element )
2307
				.not( ".ui-sortable-helper" )
2308
				.not( ".ui-sortable-placeholder" ), this ] );
2309
2310
		function addItems() {
2311
			items.push( this );
2312
		}
2313
		for ( i = queries.length - 1; i >= 0; i-- ) {
2314
			queries[ i ][ 0 ].each( addItems );
2315
		}
2316
2317
		return $( items );
2318
2319
	},
2320
2321
	_removeCurrentsFromItems: function() {
2322
2323
		var list = this.currentItem.find( ":data(" + this.widgetName + "-item)" );
2324
2325
		this.items = $.grep( this.items, function( item ) {
2326
			for ( var j = 0; j < list.length; j++ ) {
2327
				if ( list[ j ] === item.item[ 0 ] ) {
2328
					return false;
2329
				}
2330
			}
2331
			return true;
2332
		} );
2333
2334
	},
2335
2336
	_refreshItems: function( event ) {
2337
2338
		this.items = [];
2339
		this.containers = [ this ];
2340
2341
		var i, j, cur, inst, targetData, _queries, item, queriesLength,
2342
			items = this.items,
2343
			queries = [ [ $.isFunction( this.options.items ) ?
2344
				this.options.items.call( this.element[ 0 ], event, { item: this.currentItem } ) :
2345
				$( this.options.items, this.element ), this ] ],
2346
			connectWith = this._connectWith();
2347
2348
		//Shouldn't be run the first time through due to massive slow-down
2349
		if ( connectWith && this.ready ) {
2350
			for ( i = connectWith.length - 1; i >= 0; i-- ) {
2351
				cur = $( connectWith[ i ], this.document[ 0 ] );
2352
				for ( j = cur.length - 1; j >= 0; j-- ) {
2353
					inst = $.data( cur[ j ], this.widgetFullName );
2354
					if ( inst && inst !== this && !inst.options.disabled ) {
2355
						queries.push( [ $.isFunction( inst.options.items ) ?
2356
							inst.options.items
2357
								.call( inst.element[ 0 ], event, { item: this.currentItem } ) :
2358
							$( inst.options.items, inst.element ), inst ] );
2359
						this.containers.push( inst );
2360
					}
2361
				}
2362
			}
2363
		}
2364
2365
		for ( i = queries.length - 1; i >= 0; i-- ) {
2366
			targetData = queries[ i ][ 1 ];
2367
			_queries = queries[ i ][ 0 ];
2368
2369
			for ( j = 0, queriesLength = _queries.length; j < queriesLength; j++ ) {
2370
				item = $( _queries[ j ] );
2371
2372
				// Data for target checking (mouse manager)
2373
				item.data( this.widgetName + "-item", targetData );
2374
2375
				items.push( {
2376
					item: item,
2377
					instance: targetData,
2378
					width: 0, height: 0,
2379
					left: 0, top: 0
2380
				} );
2381
			}
2382
		}
2383
2384
	},
2385
2386
	refreshPositions: function( fast ) {
2387
2388
		// Determine whether items are being displayed horizontally
2389
		this.floating = this.items.length ?
2390
			this.options.axis === "x" || this._isFloating( this.items[ 0 ].item ) :
2391
			false;
2392
2393
		//This has to be redone because due to the item being moved out/into the offsetParent,
2394
		// the offsetParent's position will change
2395
		if ( this.offsetParent && this.helper ) {
2396
			this.offset.parent = this._getParentOffset();
2397
		}
2398
2399
		var i, item, t, p;
2400
2401
		for ( i = this.items.length - 1; i >= 0; i-- ) {
2402
			item = this.items[ i ];
2403
2404
			//We ignore calculating positions of all connected containers when we're not over them
2405
			if ( item.instance !== this.currentContainer && this.currentContainer &&
2406
					item.item[ 0 ] !== this.currentItem[ 0 ] ) {
2407
				continue;
2408
			}
2409
2410
			t = this.options.toleranceElement ?
2411
				$( this.options.toleranceElement, item.item ) :
2412
				item.item;
2413
2414
			if ( !fast ) {
2415
				item.width = t.outerWidth();
2416
				item.height = t.outerHeight();
2417
			}
2418
2419
			p = t.offset();
2420
			item.left = p.left;
2421
			item.top = p.top;
2422
		}
2423
2424
		if ( this.options.custom && this.options.custom.refreshContainers ) {
2425
			this.options.custom.refreshContainers.call( this );
2426
		} else {
2427
			for ( i = this.containers.length - 1; i >= 0; i-- ) {
2428
				p = this.containers[ i ].element.offset();
2429
				this.containers[ i ].containerCache.left = p.left;
2430
				this.containers[ i ].containerCache.top = p.top;
2431
				this.containers[ i ].containerCache.width =
2432
					this.containers[ i ].element.outerWidth();
2433
				this.containers[ i ].containerCache.height =
2434
					this.containers[ i ].element.outerHeight();
2435
			}
2436
		}
2437
2438
		return this;
2439
	},
2440
2441
	_createPlaceholder: function( that ) {
2442
		that = that || this;
2443
		var className,
2444
			o = that.options;
2445
2446
		if ( !o.placeholder || o.placeholder.constructor === String ) {
2447
			className = o.placeholder;
2448
			o.placeholder = {
2449
				element: function() {
2450
2451
					var nodeName = that.currentItem[ 0 ].nodeName.toLowerCase(),
2452
						element = $( "<" + nodeName + ">", that.document[ 0 ] );
2453
2454
						that._addClass( element, "ui-sortable-placeholder",
2455
								className || that.currentItem[ 0 ].className )
2456
							._removeClass( element, "ui-sortable-helper" );
2457
2458
					if ( nodeName === "tbody" ) {
2459
						that._createTrPlaceholder(
2460
							that.currentItem.find( "tr" ).eq( 0 ),
2461
							$( "<tr>", that.document[ 0 ] ).appendTo( element )
2462
						);
2463
					} else if ( nodeName === "tr" ) {
2464
						that._createTrPlaceholder( that.currentItem, element );
2465
					} else if ( nodeName === "img" ) {
2466
						element.attr( "src", that.currentItem.attr( "src" ) );
2467
					}
2468
2469
					if ( !className ) {
2470
						element.css( "visibility", "hidden" );
2471
					}
2472
2473
					return element;
2474
				},
2475
				update: function( container, p ) {
2476
2477
					// 1. If a className is set as 'placeholder option, we don't force sizes -
2478
					// the class is responsible for that
2479
					// 2. The option 'forcePlaceholderSize can be enabled to force it even if a
2480
					// class name is specified
2481
					if ( className && !o.forcePlaceholderSize ) {
2482
						return;
2483
					}
2484
2485
					//If the element doesn't have a actual height by itself (without styles coming
2486
					// from a stylesheet), it receives the inline height from the dragged item
2487
					if ( !p.height() ) {
2488
						p.height(
2489
							that.currentItem.innerHeight() -
2490
							parseInt( that.currentItem.css( "paddingTop" ) || 0, 10 ) -
2491
							parseInt( that.currentItem.css( "paddingBottom" ) || 0, 10 ) );
2492
					}
2493
					if ( !p.width() ) {
2494
						p.width(
2495
							that.currentItem.innerWidth() -
2496
							parseInt( that.currentItem.css( "paddingLeft" ) || 0, 10 ) -
2497
							parseInt( that.currentItem.css( "paddingRight" ) || 0, 10 ) );
2498
					}
2499
				}
2500
			};
2501
		}
2502
2503
		//Create the placeholder
2504
		that.placeholder = $( o.placeholder.element.call( that.element, that.currentItem ) );
2505
2506
		//Append it after the actual current item
2507
		that.currentItem.after( that.placeholder );
2508
2509
		//Update the size of the placeholder (TODO: Logic to fuzzy, see line 316/317)
2510
		o.placeholder.update( that, that.placeholder );
2511
2512
	},
2513
2514
	_createTrPlaceholder: function( sourceTr, targetTr ) {
2515
		var that = this;
2516
2517
		sourceTr.children().each( function() {
2518
			$( "<td>&#160;</td>", that.document[ 0 ] )
2519
				.attr( "colspan", $( this ).attr( "colspan" ) || 1 )
2520
				.appendTo( targetTr );
2521
		} );
2522
	},
2523
2524
	_contactContainers: function( event ) {
2525
		var i, j, dist, itemWithLeastDistance, posProperty, sizeProperty, cur, nearBottom,
2526
			floating, axis,
2527
			innermostContainer = null,
2528
			innermostIndex = null;
2529
2530
		// Get innermost container that intersects with item
2531
		for ( i = this.containers.length - 1; i >= 0; i-- ) {
2532
2533
			// Never consider a container that's located within the item itself
2534
			if ( $.contains( this.currentItem[ 0 ], this.containers[ i ].element[ 0 ] ) ) {
2535
				continue;
2536
			}
2537
2538
			if ( this._intersectsWith( this.containers[ i ].containerCache ) ) {
2539
2540
				// If we've already found a container and it's more "inner" than this, then continue
2541
				if ( innermostContainer &&
2542
						$.contains(
2543
							this.containers[ i ].element[ 0 ],
2544
							innermostContainer.element[ 0 ] ) ) {
2545
					continue;
2546
				}
2547
2548
				innermostContainer = this.containers[ i ];
2549
				innermostIndex = i;
2550
2551
			} else {
2552
2553
				// container doesn't intersect. trigger "out" event if necessary
2554
				if ( this.containers[ i ].containerCache.over ) {
2555
					this.containers[ i ]._trigger( "out", event, this._uiHash( this ) );
2556
					this.containers[ i ].containerCache.over = 0;
2557
				}
2558
			}
2559
2560
		}
2561
2562
		// If no intersecting containers found, return
2563
		if ( !innermostContainer ) {
2564
			return;
2565
		}
2566
2567
		// Move the item into the container if it's not there already
2568
		if ( this.containers.length === 1 ) {
2569
			if ( !this.containers[ innermostIndex ].containerCache.over ) {
2570
				this.containers[ innermostIndex ]._trigger( "over", event, this._uiHash( this ) );
2571
				this.containers[ innermostIndex ].containerCache.over = 1;
2572
			}
2573
		} else {
2574
2575
			// When entering a new container, we will find the item with the least distance and
2576
			// append our item near it
2577
			dist = 10000;
2578
			itemWithLeastDistance = null;
2579
			floating = innermostContainer.floating || this._isFloating( this.currentItem );
2580
			posProperty = floating ? "left" : "top";
2581
			sizeProperty = floating ? "width" : "height";
2582
			axis = floating ? "pageX" : "pageY";
2583
2584
			for ( j = this.items.length - 1; j >= 0; j-- ) {
2585
				if ( !$.contains(
2586
						this.containers[ innermostIndex ].element[ 0 ], this.items[ j ].item[ 0 ] )
2587
				) {
2588
					continue;
2589
				}
2590
				if ( this.items[ j ].item[ 0 ] === this.currentItem[ 0 ] ) {
2591
					continue;
2592
				}
2593
2594
				cur = this.items[ j ].item.offset()[ posProperty ];
2595
				nearBottom = false;
2596
				if ( event[ axis ] - cur > this.items[ j ][ sizeProperty ] / 2 ) {
2597
					nearBottom = true;
2598
				}
2599
2600
				if ( Math.abs( event[ axis ] - cur ) < dist ) {
2601
					dist = Math.abs( event[ axis ] - cur );
2602
					itemWithLeastDistance = this.items[ j ];
2603
					this.direction = nearBottom ? "up" : "down";
2604
				}
2605
			}
2606
2607
			//Check if dropOnEmpty is enabled
2608
			if ( !itemWithLeastDistance && !this.options.dropOnEmpty ) {
2609
				return;
2610
			}
2611
2612
			if ( this.currentContainer === this.containers[ innermostIndex ] ) {
2613
				if ( !this.currentContainer.containerCache.over ) {
2614
					this.containers[ innermostIndex ]._trigger( "over", event, this._uiHash() );
2615
					this.currentContainer.containerCache.over = 1;
2616
				}
2617
				return;
2618
			}
2619
2620
			itemWithLeastDistance ?
2621
				this._rearrange( event, itemWithLeastDistance, null, true ) :
2622
				this._rearrange( event, null, this.containers[ innermostIndex ].element, true );
2623
			this._trigger( "change", event, this._uiHash() );
2624
			this.containers[ innermostIndex ]._trigger( "change", event, this._uiHash( this ) );
2625
			this.currentContainer = this.containers[ innermostIndex ];
2626
2627
			//Update the placeholder
2628
			this.options.placeholder.update( this.currentContainer, this.placeholder );
2629
2630
			this.containers[ innermostIndex ]._trigger( "over", event, this._uiHash( this ) );
2631
			this.containers[ innermostIndex ].containerCache.over = 1;
2632
		}
2633
2634
	},
2635
2636
	_createHelper: function( event ) {
2637
2638
		var o = this.options,
2639
			helper = $.isFunction( o.helper ) ?
2640
				$( o.helper.apply( this.element[ 0 ], [ event, this.currentItem ] ) ) :
2641
				( o.helper === "clone" ? this.currentItem.clone() : this.currentItem );
2642
2643
		//Add the helper to the DOM if that didn't happen already
2644
		if ( !helper.parents( "body" ).length ) {
2645
			$( o.appendTo !== "parent" ?
2646
				o.appendTo :
2647
				this.currentItem[ 0 ].parentNode )[ 0 ].appendChild( helper[ 0 ] );
2648
		}
2649
2650
		if ( helper[ 0 ] === this.currentItem[ 0 ] ) {
2651
			this._storedCSS = {
2652
				width: this.currentItem[ 0 ].style.width,
2653
				height: this.currentItem[ 0 ].style.height,
2654
				position: this.currentItem.css( "position" ),
2655
				top: this.currentItem.css( "top" ),
2656
				left: this.currentItem.css( "left" )
2657
			};
2658
		}
2659
2660
		if ( !helper[ 0 ].style.width || o.forceHelperSize ) {
2661
			helper.width( this.currentItem.width() );
2662
		}
2663
		if ( !helper[ 0 ].style.height || o.forceHelperSize ) {
2664
			helper.height( this.currentItem.height() );
2665
		}
2666
2667
		return helper;
2668
2669
	},
2670
2671
	_adjustOffsetFromHelper: function( obj ) {
2672
		if ( typeof obj === "string" ) {
2673
			obj = obj.split( " " );
2674
		}
2675
		if ( $.isArray( obj ) ) {
2676
			obj = { left: +obj[ 0 ], top: +obj[ 1 ] || 0 };
2677
		}
2678
		if ( "left" in obj ) {
2679
			this.offset.click.left = obj.left + this.margins.left;
2680
		}
2681
		if ( "right" in obj ) {
2682
			this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left;
2683
		}
2684
		if ( "top" in obj ) {
2685
			this.offset.click.top = obj.top + this.margins.top;
2686
		}
2687
		if ( "bottom" in obj ) {
2688
			this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top;
2689
		}
2690
	},
2691
2692
	_getParentOffset: function() {
2693
2694
		//Get the offsetParent and cache its position
2695
		this.offsetParent = this.helper.offsetParent();
2696
		var po = this.offsetParent.offset();
2697
2698
		// This is a special case where we need to modify a offset calculated on start, since the
2699
		// following happened:
2700
		// 1. The position of the helper is absolute, so it's position is calculated based on the
2701
		// next positioned parent
2702
		// 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't
2703
		// the document, which means that the scroll is included in the initial calculation of the
2704
		// offset of the parent, and never recalculated upon drag
2705
		if ( this.cssPosition === "absolute" && this.scrollParent[ 0 ] !== this.document[ 0 ] &&
2706
				$.contains( this.scrollParent[ 0 ], this.offsetParent[ 0 ] ) ) {
2707
			po.left += this.scrollParent.scrollLeft();
2708
			po.top += this.scrollParent.scrollTop();
2709
		}
2710
2711
		// This needs to be actually done for all browsers, since pageX/pageY includes this
2712
		// information with an ugly IE fix
2713
		if ( this.offsetParent[ 0 ] === this.document[ 0 ].body ||
2714
				( this.offsetParent[ 0 ].tagName &&
2715
				this.offsetParent[ 0 ].tagName.toLowerCase() === "html" && $.ui.ie ) ) {
2716
			po = { top: 0, left: 0 };
2717
		}
2718
2719
		return {
2720
			top: po.top + ( parseInt( this.offsetParent.css( "borderTopWidth" ), 10 ) || 0 ),
2721
			left: po.left + ( parseInt( this.offsetParent.css( "borderLeftWidth" ), 10 ) || 0 )
2722
		};
2723
2724
	},
2725
2726
	_getRelativeOffset: function() {
2727
2728
		if ( this.cssPosition === "relative" ) {
2729
			var p = this.currentItem.position();
2730
			return {
2731
				top: p.top - ( parseInt( this.helper.css( "top" ), 10 ) || 0 ) +
2732
					this.scrollParent.scrollTop(),
2733
				left: p.left - ( parseInt( this.helper.css( "left" ), 10 ) || 0 ) +
2734
					this.scrollParent.scrollLeft()
2735
			};
2736
		} else {
2737
			return { top: 0, left: 0 };
2738
		}
2739
2740
	},
2741
2742
	_cacheMargins: function() {
2743
		this.margins = {
2744
			left: ( parseInt( this.currentItem.css( "marginLeft" ), 10 ) || 0 ),
2745
			top: ( parseInt( this.currentItem.css( "marginTop" ), 10 ) || 0 )
2746
		};
2747
	},
2748
2749
	_cacheHelperProportions: function() {
2750
		this.helperProportions = {
2751
			width: this.helper.outerWidth(),
2752
			height: this.helper.outerHeight()
2753
		};
2754
	},
2755
2756
	_setContainment: function() {
2757
2758
		var ce, co, over,
2759
			o = this.options;
2760
		if ( o.containment === "parent" ) {
2761
			o.containment = this.helper[ 0 ].parentNode;
2762
		}
2763
		if ( o.containment === "document" || o.containment === "window" ) {
2764
			this.containment = [
2765
				0 - this.offset.relative.left - this.offset.parent.left,
2766
				0 - this.offset.relative.top - this.offset.parent.top,
2767
				o.containment === "document" ?
2768
					this.document.width() :
2769
					this.window.width() - this.helperProportions.width - this.margins.left,
2770
				( o.containment === "document" ?
2771
					( this.document.height() || document.body.parentNode.scrollHeight ) :
2772
					this.window.height() || this.document[ 0 ].body.parentNode.scrollHeight
2773
				) - this.helperProportions.height - this.margins.top
2774
			];
2775
		}
2776
2777
		if ( !( /^(document|window|parent)$/ ).test( o.containment ) ) {
2778
			ce = $( o.containment )[ 0 ];
2779
			co = $( o.containment ).offset();
2780
			over = ( $( ce ).css( "overflow" ) !== "hidden" );
2781
2782
			this.containment = [
2783
				co.left + ( parseInt( $( ce ).css( "borderLeftWidth" ), 10 ) || 0 ) +
2784
					( parseInt( $( ce ).css( "paddingLeft" ), 10 ) || 0 ) - this.margins.left,
2785
				co.top + ( parseInt( $( ce ).css( "borderTopWidth" ), 10 ) || 0 ) +
2786
					( parseInt( $( ce ).css( "paddingTop" ), 10 ) || 0 ) - this.margins.top,
2787
				co.left + ( over ? Math.max( ce.scrollWidth, ce.offsetWidth ) : ce.offsetWidth ) -
2788
					( parseInt( $( ce ).css( "borderLeftWidth" ), 10 ) || 0 ) -
2789
					( parseInt( $( ce ).css( "paddingRight" ), 10 ) || 0 ) -
2790
					this.helperProportions.width - this.margins.left,
2791
				co.top + ( over ? Math.max( ce.scrollHeight, ce.offsetHeight ) : ce.offsetHeight ) -
2792
					( parseInt( $( ce ).css( "borderTopWidth" ), 10 ) || 0 ) -
2793
					( parseInt( $( ce ).css( "paddingBottom" ), 10 ) || 0 ) -
2794
					this.helperProportions.height - this.margins.top
2795
			];
2796
		}
2797
2798
	},
2799
2800
	_convertPositionTo: function( d, pos ) {
2801
2802
		if ( !pos ) {
2803
			pos = this.position;
2804
		}
2805
		var mod = d === "absolute" ? 1 : -1,
2806
			scroll = this.cssPosition === "absolute" &&
2807
				!( this.scrollParent[ 0 ] !== this.document[ 0 ] &&
2808
				$.contains( this.scrollParent[ 0 ], this.offsetParent[ 0 ] ) ) ?
2809
					this.offsetParent :
2810
					this.scrollParent,
2811
			scrollIsRootNode = ( /(html|body)/i ).test( scroll[ 0 ].tagName );
2812
2813
		return {
2814
			top: (
2815
2816
				// The absolute mouse position
2817
				pos.top	+
2818
2819
				// Only for relative positioned nodes: Relative offset from element to offset parent
2820
				this.offset.relative.top * mod +
2821
2822
				// The offsetParent's offset without borders (offset + border)
2823
				this.offset.parent.top * mod -
2824
				( ( this.cssPosition === "fixed" ?
2825
					-this.scrollParent.scrollTop() :
2826
					( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod )
2827
			),
2828
			left: (
2829
2830
				// The absolute mouse position
2831
				pos.left +
2832
2833
				// Only for relative positioned nodes: Relative offset from element to offset parent
2834
				this.offset.relative.left * mod +
2835
2836
				// The offsetParent's offset without borders (offset + border)
2837
				this.offset.parent.left * mod	-
2838
				( ( this.cssPosition === "fixed" ?
2839
					-this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 :
2840
					scroll.scrollLeft() ) * mod )
2841
			)
2842
		};
2843
2844
	},
2845
2846
	_generatePosition: function( event ) {
2847
2848
		var top, left,
2849
			o = this.options,
2850
			pageX = event.pageX,
2851
			pageY = event.pageY,
2852
			scroll = this.cssPosition === "absolute" &&
2853
				!( this.scrollParent[ 0 ] !== this.document[ 0 ] &&
2854
				$.contains( this.scrollParent[ 0 ], this.offsetParent[ 0 ] ) ) ?
2855
					this.offsetParent :
2856
					this.scrollParent,
2857
				scrollIsRootNode = ( /(html|body)/i ).test( scroll[ 0 ].tagName );
2858
2859
		// This is another very weird special case that only happens for relative elements:
2860
		// 1. If the css position is relative
2861
		// 2. and the scroll parent is the document or similar to the offset parent
2862
		// we have to refresh the relative offset during the scroll so there are no jumps
2863
		if ( this.cssPosition === "relative" && !( this.scrollParent[ 0 ] !== this.document[ 0 ] &&
2864
				this.scrollParent[ 0 ] !== this.offsetParent[ 0 ] ) ) {
2865
			this.offset.relative = this._getRelativeOffset();
2866
		}
2867
2868
		/*
2869
		 * - Position constraining -
2870
		 * Constrain the position to a mix of grid, containment.
2871
		 */
2872
2873
		if ( this.originalPosition ) { //If we are not dragging yet, we won't check for options
2874
2875
			if ( this.containment ) {
2876
				if ( event.pageX - this.offset.click.left < this.containment[ 0 ] ) {
2877
					pageX = this.containment[ 0 ] + this.offset.click.left;
2878
				}
2879
				if ( event.pageY - this.offset.click.top < this.containment[ 1 ] ) {
2880
					pageY = this.containment[ 1 ] + this.offset.click.top;
2881
				}
2882
				if ( event.pageX - this.offset.click.left > this.containment[ 2 ] ) {
2883
					pageX = this.containment[ 2 ] + this.offset.click.left;
2884
				}
2885
				if ( event.pageY - this.offset.click.top > this.containment[ 3 ] ) {
2886
					pageY = this.containment[ 3 ] + this.offset.click.top;
2887
				}
2888
			}
2889
2890
			if ( o.grid ) {
2891
				top = this.originalPageY + Math.round( ( pageY - this.originalPageY ) /
2892
					o.grid[ 1 ] ) * o.grid[ 1 ];
2893
				pageY = this.containment ?
2894
					( ( top - this.offset.click.top >= this.containment[ 1 ] &&
2895
						top - this.offset.click.top <= this.containment[ 3 ] ) ?
2896
							top :
2897
							( ( top - this.offset.click.top >= this.containment[ 1 ] ) ?
2898
								top - o.grid[ 1 ] : top + o.grid[ 1 ] ) ) :
2899
								top;
2900
2901
				left = this.originalPageX + Math.round( ( pageX - this.originalPageX ) /
2902
					o.grid[ 0 ] ) * o.grid[ 0 ];
2903
				pageX = this.containment ?
2904
					( ( left - this.offset.click.left >= this.containment[ 0 ] &&
2905
						left - this.offset.click.left <= this.containment[ 2 ] ) ?
2906
							left :
2907
							( ( left - this.offset.click.left >= this.containment[ 0 ] ) ?
2908
								left - o.grid[ 0 ] : left + o.grid[ 0 ] ) ) :
2909
								left;
2910
			}
2911
2912
		}
2913
2914
		return {
2915
			top: (
2916
2917
				// The absolute mouse position
2918
				pageY -
2919
2920
				// Click offset (relative to the element)
2921
				this.offset.click.top -
2922
2923
				// Only for relative positioned nodes: Relative offset from element to offset parent
2924
				this.offset.relative.top -
2925
2926
				// The offsetParent's offset without borders (offset + border)
2927
				this.offset.parent.top +
2928
				( ( this.cssPosition === "fixed" ?
2929
					-this.scrollParent.scrollTop() :
2930
					( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) )
2931
			),
2932
			left: (
2933
2934
				// The absolute mouse position
2935
				pageX -
2936
2937
				// Click offset (relative to the element)
2938
				this.offset.click.left -
2939
2940
				// Only for relative positioned nodes: Relative offset from element to offset parent
2941
				this.offset.relative.left -
2942
2943
				// The offsetParent's offset without borders (offset + border)
2944
				this.offset.parent.left +
2945
				( ( this.cssPosition === "fixed" ?
2946
					-this.scrollParent.scrollLeft() :
2947
					scrollIsRootNode ? 0 : scroll.scrollLeft() ) )
2948
			)
2949
		};
2950
2951
	},
2952
2953
	_rearrange: function( event, i, a, hardRefresh ) {
2954
2955
		a ? a[ 0 ].appendChild( this.placeholder[ 0 ] ) :
2956
			i.item[ 0 ].parentNode.insertBefore( this.placeholder[ 0 ],
2957
				( this.direction === "down" ? i.item[ 0 ] : i.item[ 0 ].nextSibling ) );
2958
2959
		//Various things done here to improve the performance:
2960
		// 1. we create a setTimeout, that calls refreshPositions
2961
		// 2. on the instance, we have a counter variable, that get's higher after every append
2962
		// 3. on the local scope, we copy the counter variable, and check in the timeout,
2963
		// if it's still the same
2964
		// 4. this lets only the last addition to the timeout stack through
2965
		this.counter = this.counter ? ++this.counter : 1;
2966
		var counter = this.counter;
2967
2968
		this._delay( function() {
2969
			if ( counter === this.counter ) {
2970
2971
				//Precompute after each DOM insertion, NOT on mousemove
2972
				this.refreshPositions( !hardRefresh );
2973
			}
2974
		} );
2975
2976
	},
2977
2978
	_clear: function( event, noPropagation ) {
2979
2980
		this.reverting = false;
2981
2982
		// We delay all events that have to be triggered to after the point where the placeholder
2983
		// has been removed and everything else normalized again
2984
		var i,
2985
			delayedTriggers = [];
2986
2987
		// We first have to update the dom position of the actual currentItem
2988
		// Note: don't do it if the current item is already removed (by a user), or it gets
2989
		// reappended (see #4088)
2990
		if ( !this._noFinalSort && this.currentItem.parent().length ) {
2991
			this.placeholder.before( this.currentItem );
2992
		}
2993
		this._noFinalSort = null;
2994
2995
		if ( this.helper[ 0 ] === this.currentItem[ 0 ] ) {
2996
			for ( i in this._storedCSS ) {
2997
				if ( this._storedCSS[ i ] === "auto" || this._storedCSS[ i ] === "static" ) {
2998
					this._storedCSS[ i ] = "";
2999
				}
3000
			}
3001
			this.currentItem.css( this._storedCSS );
3002
			this._removeClass( this.currentItem, "ui-sortable-helper" );
3003
		} else {
3004
			this.currentItem.show();
3005
		}
3006
3007
		if ( this.fromOutside && !noPropagation ) {
3008
			delayedTriggers.push( function( event ) {
3009
				this._trigger( "receive", event, this._uiHash( this.fromOutside ) );
3010
			} );
3011
		}
3012
		if ( ( this.fromOutside ||
3013
				this.domPosition.prev !==
3014
				this.currentItem.prev().not( ".ui-sortable-helper" )[ 0 ] ||
3015
				this.domPosition.parent !== this.currentItem.parent()[ 0 ] ) && !noPropagation ) {
3016
3017
			// Trigger update callback if the DOM position has changed
3018
			delayedTriggers.push( function( event ) {
3019
				this._trigger( "update", event, this._uiHash() );
3020
			} );
3021
		}
3022
3023
		// Check if the items Container has Changed and trigger appropriate
3024
		// events.
3025
		if ( this !== this.currentContainer ) {
3026
			if ( !noPropagation ) {
3027
				delayedTriggers.push( function( event ) {
3028
					this._trigger( "remove", event, this._uiHash() );
3029
				} );
3030
				delayedTriggers.push( ( function( c ) {
3031
					return function( event ) {
3032
						c._trigger( "receive", event, this._uiHash( this ) );
3033
					};
3034
				} ).call( this, this.currentContainer ) );
3035
				delayedTriggers.push( ( function( c ) {
3036
					return function( event ) {
3037
						c._trigger( "update", event, this._uiHash( this ) );
3038
					};
3039
				} ).call( this, this.currentContainer ) );
3040
			}
3041
		}
3042
3043
		//Post events to containers
3044
		function delayEvent( type, instance, container ) {
3045
			return function( event ) {
3046
				container._trigger( type, event, instance._uiHash( instance ) );
3047
			};
3048
		}
3049
		for ( i = this.containers.length - 1; i >= 0; i-- ) {
3050
			if ( !noPropagation ) {
3051
				delayedTriggers.push( delayEvent( "deactivate", this, this.containers[ i ] ) );
3052
			}
3053
			if ( this.containers[ i ].containerCache.over ) {
3054
				delayedTriggers.push( delayEvent( "out", this, this.containers[ i ] ) );
3055
				this.containers[ i ].containerCache.over = 0;
3056
			}
3057
		}
3058
3059
		//Do what was originally in plugins
3060
		if ( this.storedCursor ) {
3061
			this.document.find( "body" ).css( "cursor", this.storedCursor );
3062
			this.storedStylesheet.remove();
3063
		}
3064
		if ( this._storedOpacity ) {
3065
			this.helper.css( "opacity", this._storedOpacity );
3066
		}
3067
		if ( this._storedZIndex ) {
3068
			this.helper.css( "zIndex", this._storedZIndex === "auto" ? "" : this._storedZIndex );
3069
		}
3070
3071
		this.dragging = false;
3072
3073
		if ( !noPropagation ) {
3074
			this._trigger( "beforeStop", event, this._uiHash() );
3075
		}
3076
3077
		//$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately,
3078
		// it unbinds ALL events from the original node!
3079
		this.placeholder[ 0 ].parentNode.removeChild( this.placeholder[ 0 ] );
3080
3081
		if ( !this.cancelHelperRemoval ) {
3082
			if ( this.helper[ 0 ] !== this.currentItem[ 0 ] ) {
3083
				this.helper.remove();
3084
			}
3085
			this.helper = null;
3086
		}
3087
3088
		if ( !noPropagation ) {
3089
			for ( i = 0; i < delayedTriggers.length; i++ ) {
3090
3091
				// Trigger all delayed events
3092
				delayedTriggers[ i ].call( this, event );
3093
			}
3094
			this._trigger( "stop", event, this._uiHash() );
3095
		}
3096
3097
		this.fromOutside = false;
3098
		return !this.cancelHelperRemoval;
3099
3100
	},
3101
3102
	_trigger: function() {
3103
		if ( $.Widget.prototype._trigger.apply( this, arguments ) === false ) {
3104
			this.cancel();
3105
		}
3106
	},
3107
3108
	_uiHash: function( _inst ) {
3109
		var inst = _inst || this;
3110
		return {
3111
			helper: inst.helper,
3112
			placeholder: inst.placeholder || $( [] ),
3113
			position: inst.position,
3114
			originalPosition: inst.originalPosition,
3115
			offset: inst.positionAbs,
3116
			item: inst.currentItem,
3117
			sender: _inst ? _inst.element : null
3118
		};
3119
	}
3120
3121
} );
3122
3123
3124
3125
var safeActiveElement = $.ui.safeActiveElement = function( document ) {
3126
	var activeElement;
3127
3128
	// Support: IE 9 only
3129
	// IE9 throws an "Unspecified error" accessing document.activeElement from an <iframe>
3130
	try {
3131
		activeElement = document.activeElement;
3132
	} catch ( error ) {
3133
		activeElement = document.body;
3134
	}
3135
3136
	// Support: IE 9 - 11 only
3137
	// IE may return null instead of an element
3138
	// Interestingly, this only seems to occur when NOT in an iframe
3139
	if ( !activeElement ) {
3140
		activeElement = document.body;
3141
	}
3142
3143
	// Support: IE 11 only
3144
	// IE11 returns a seemingly empty object in some cases when accessing
3145
	// document.activeElement from an <iframe>
3146
	if ( !activeElement.nodeName ) {
3147
		activeElement = document.body;
3148
	}
3149
3150
	return activeElement;
3151
};
3152
3153
3154
/*!
3155
 * jQuery UI Menu 1.12.1
3156
 * http://jqueryui.com
3157
 *
3158
 * Copyright jQuery Foundation and other contributors
3159
 * Released under the MIT license.
3160
 * http://jquery.org/license
3161
 */
3162
3163
//>>label: Menu
3164
//>>group: Widgets
3165
//>>description: Creates nestable menus.
3166
//>>docs: http://api.jqueryui.com/menu/
3167
//>>demos: http://jqueryui.com/menu/
3168
//>>css.structure: ../../themes/base/core.css
3169
//>>css.structure: ../../themes/base/menu.css
3170
//>>css.theme: ../../themes/base/theme.css
3171
3172
3173
3174
var widgetsMenu = $.widget( "ui.menu", {
3175
	version: "1.12.1",
3176
	defaultElement: "<ul>",
3177
	delay: 300,
3178
	options: {
3179
		icons: {
3180
			submenu: "ui-icon-caret-1-e"
3181
		},
3182
		items: "> *",
3183
		menus: "ul",
3184
		position: {
3185
			my: "left top",
3186
			at: "right top"
3187
		},
3188
		role: "menu",
3189
3190
		// Callbacks
3191
		blur: null,
3192
		focus: null,
3193
		select: null
3194
	},
3195
3196
	_create: function() {
3197
		this.activeMenu = this.element;
3198
3199
		// Flag used to prevent firing of the click handler
3200
		// as the event bubbles up through nested menus
3201
		this.mouseHandled = false;
3202
		this.element
3203
			.uniqueId()
3204
			.attr( {
3205
				role: this.options.role,
3206
				tabIndex: 0
3207
			} );
3208
3209
		this._addClass( "ui-menu", "ui-widget ui-widget-content" );
3210
		this._on( {
3211
3212
			// Prevent focus from sticking to links inside menu after clicking
3213
			// them (focus should always stay on UL during navigation).
3214
			"mousedown .ui-menu-item": function( event ) {
3215
				event.preventDefault();
3216
			},
3217
			"click .ui-menu-item": function( event ) {
3218
				var target = $( event.target );
3219
				var active = $( $.ui.safeActiveElement( this.document[ 0 ] ) );
3220
				if ( !this.mouseHandled && target.not( ".ui-state-disabled" ).length ) {
3221
					this.select( event );
3222
3223
					// Only set the mouseHandled flag if the event will bubble, see #9469.
3224
					if ( !event.isPropagationStopped() ) {
3225
						this.mouseHandled = true;
3226
					}
3227
3228
					// Open submenu on click
3229
					if ( target.has( ".ui-menu" ).length ) {
3230
						this.expand( event );
3231
					} else if ( !this.element.is( ":focus" ) &&
3232
							active.closest( ".ui-menu" ).length ) {
3233
3234
						// Redirect focus to the menu
3235
						this.element.trigger( "focus", [ true ] );
3236
3237
						// If the active item is on the top level, let it stay active.
3238
						// Otherwise, blur the active item since it is no longer visible.
3239
						if ( this.active && this.active.parents( ".ui-menu" ).length === 1 ) {
3240
							clearTimeout( this.timer );
3241
						}
3242
					}
3243
				}
3244
			},
3245
			"mouseenter .ui-menu-item": function( event ) {
3246
3247
				// Ignore mouse events while typeahead is active, see #10458.
3248
				// Prevents focusing the wrong item when typeahead causes a scroll while the mouse
3249
				// is over an item in the menu
3250
				if ( this.previousFilter ) {
3251
					return;
3252
				}
3253
3254
				var actualTarget = $( event.target ).closest( ".ui-menu-item" ),
3255
					target = $( event.currentTarget );
3256
3257
				// Ignore bubbled events on parent items, see #11641
3258
				if ( actualTarget[ 0 ] !== target[ 0 ] ) {
3259
					return;
3260
				}
3261
3262
				// Remove ui-state-active class from siblings of the newly focused menu item
3263
				// to avoid a jump caused by adjacent elements both having a class with a border
3264
				this._removeClass( target.siblings().children( ".ui-state-active" ),
3265
					null, "ui-state-active" );
3266
				this.focus( event, target );
3267
			},
3268
			mouseleave: "collapseAll",
3269
			"mouseleave .ui-menu": "collapseAll",
3270
			focus: function( event, keepActiveItem ) {
3271
3272
				// If there's already an active item, keep it active
3273
				// If not, activate the first item
3274
				var item = this.active || this.element.find( this.options.items ).eq( 0 );
3275
3276
				if ( !keepActiveItem ) {
3277
					this.focus( event, item );
3278
				}
3279
			},
3280
			blur: function( event ) {
3281
				this._delay( function() {
3282
					var notContained = !$.contains(
3283
						this.element[ 0 ],
3284
						$.ui.safeActiveElement( this.document[ 0 ] )
3285
					);
3286
					if ( notContained ) {
3287
						this.collapseAll( event );
3288
					}
3289
				} );
3290
			},
3291
			keydown: "_keydown"
3292
		} );
3293
3294
		this.refresh();
3295
3296
		// Clicks outside of a menu collapse any open menus
3297
		this._on( this.document, {
3298
			click: function( event ) {
3299
				if ( this._closeOnDocumentClick( event ) ) {
3300
					this.collapseAll( event );
3301
				}
3302
3303
				// Reset the mouseHandled flag
3304
				this.mouseHandled = false;
3305
			}
3306
		} );
3307
	},
3308
3309
	_destroy: function() {
3310
		var items = this.element.find( ".ui-menu-item" )
3311
				.removeAttr( "role aria-disabled" ),
3312
			submenus = items.children( ".ui-menu-item-wrapper" )
3313
				.removeUniqueId()
3314
				.removeAttr( "tabIndex role aria-haspopup" );
3315
3316
		// Destroy (sub)menus
3317
		this.element
3318
			.removeAttr( "aria-activedescendant" )
3319
			.find( ".ui-menu" ).addBack()
3320
				.removeAttr( "role aria-labelledby aria-expanded aria-hidden aria-disabled " +
3321
					"tabIndex" )
3322
				.removeUniqueId()
3323
				.show();
3324
3325
		submenus.children().each( function() {
3326
			var elem = $( this );
3327
			if ( elem.data( "ui-menu-submenu-caret" ) ) {
3328
				elem.remove();
3329
			}
3330
		} );
3331
	},
3332
3333
	_keydown: function( event ) {
3334
		var match, prev, character, skip,
3335
			preventDefault = true;
3336
3337
		switch ( event.keyCode ) {
3338
		case $.ui.keyCode.PAGE_UP:
3339
			this.previousPage( event );
3340
			break;
3341
		case $.ui.keyCode.PAGE_DOWN:
3342
			this.nextPage( event );
3343
			break;
3344
		case $.ui.keyCode.HOME:
3345
			this._move( "first", "first", event );
3346
			break;
3347
		case $.ui.keyCode.END:
3348
			this._move( "last", "last", event );
3349
			break;
3350
		case $.ui.keyCode.UP:
3351
			this.previous( event );
3352
			break;
3353
		case $.ui.keyCode.DOWN:
3354
			this.next( event );
3355
			break;
3356
		case $.ui.keyCode.LEFT:
3357
			this.collapse( event );
3358
			break;
3359
		case $.ui.keyCode.RIGHT:
3360
			if ( this.active && !this.active.is( ".ui-state-disabled" ) ) {
3361
				this.expand( event );
3362
			}
3363
			break;
3364
		case $.ui.keyCode.ENTER:
3365
		case $.ui.keyCode.SPACE:
3366
			this._activate( event );
3367
			break;
3368
		case $.ui.keyCode.ESCAPE:
3369
			this.collapse( event );
3370
			break;
3371
		default:
3372
			preventDefault = false;
3373
			prev = this.previousFilter || "";
3374
			skip = false;
3375
3376
			// Support number pad values
3377
			character = event.keyCode >= 96 && event.keyCode <= 105 ?
3378
				( event.keyCode - 96 ).toString() : String.fromCharCode( event.keyCode );
3379
3380
			clearTimeout( this.filterTimer );
3381
3382
			if ( character === prev ) {
3383
				skip = true;
3384
			} else {
3385
				character = prev + character;
3386
			}
3387
3388
			match = this._filterMenuItems( character );
3389
			match = skip && match.index( this.active.next() ) !== -1 ?
3390
				this.active.nextAll( ".ui-menu-item" ) :
3391
				match;
3392
3393
			// If no matches on the current filter, reset to the last character pressed
3394
			// to move down the menu to the first item that starts with that character
3395
			if ( !match.length ) {
3396
				character = String.fromCharCode( event.keyCode );
3397
				match = this._filterMenuItems( character );
3398
			}
3399
3400
			if ( match.length ) {
3401
				this.focus( event, match );
3402
				this.previousFilter = character;
3403
				this.filterTimer = this._delay( function() {
3404
					delete this.previousFilter;
3405
				}, 1000 );
3406
			} else {
3407
				delete this.previousFilter;
3408
			}
3409
		}
3410
3411
		if ( preventDefault ) {
3412
			event.preventDefault();
3413
		}
3414
	},
3415
3416
	_activate: function( event ) {
3417
		if ( this.active && !this.active.is( ".ui-state-disabled" ) ) {
3418
			if ( this.active.children( "[aria-haspopup='true']" ).length ) {
3419
				this.expand( event );
3420
			} else {
3421
				this.select( event );
3422
			}
3423
		}
3424
	},
3425
3426
	refresh: function() {
3427
		var menus, items, newSubmenus, newItems, newWrappers,
3428
			that = this,
3429
			icon = this.options.icons.submenu,
3430
			submenus = this.element.find( this.options.menus );
3431
3432
		this._toggleClass( "ui-menu-icons", null, !!this.element.find( ".ui-icon" ).length );
3433
3434
		// Initialize nested menus
3435
		newSubmenus = submenus.filter( ":not(.ui-menu)" )
3436
			.hide()
3437
			.attr( {
3438
				role: this.options.role,
3439
				"aria-hidden": "true",
3440
				"aria-expanded": "false"
3441
			} )
3442
			.each( function() {
3443
				var menu = $( this ),
3444
					item = menu.prev(),
3445
					submenuCaret = $( "<span>" ).data( "ui-menu-submenu-caret", true );
3446
3447
				that._addClass( submenuCaret, "ui-menu-icon", "ui-icon " + icon );
3448
				item
3449
					.attr( "aria-haspopup", "true" )
3450
					.prepend( submenuCaret );
3451
				menu.attr( "aria-labelledby", item.attr( "id" ) );
3452
			} );
3453
3454
		this._addClass( newSubmenus, "ui-menu", "ui-widget ui-widget-content ui-front" );
3455
3456
		menus = submenus.add( this.element );
3457
		items = menus.find( this.options.items );
3458
3459
		// Initialize menu-items containing spaces and/or dashes only as dividers
3460
		items.not( ".ui-menu-item" ).each( function() {
3461
			var item = $( this );
3462
			if ( that._isDivider( item ) ) {
3463
				that._addClass( item, "ui-menu-divider", "ui-widget-content" );
3464
			}
3465
		} );
3466
3467
		// Don't refresh list items that are already adapted
3468
		newItems = items.not( ".ui-menu-item, .ui-menu-divider" );
3469
		newWrappers = newItems.children()
3470
			.not( ".ui-menu" )
3471
				.uniqueId()
3472
				.attr( {
3473
					tabIndex: -1,
3474
					role: this._itemRole()
3475
				} );
3476
		this._addClass( newItems, "ui-menu-item" )
3477
			._addClass( newWrappers, "ui-menu-item-wrapper" );
3478
3479
		// Add aria-disabled attribute to any disabled menu item
3480
		items.filter( ".ui-state-disabled" ).attr( "aria-disabled", "true" );
3481
3482
		// If the active item has been removed, blur the menu
3483
		if ( this.active && !$.contains( this.element[ 0 ], this.active[ 0 ] ) ) {
3484
			this.blur();
3485
		}
3486
	},
3487
3488
	_itemRole: function() {
3489
		return {
3490
			menu: "menuitem",
3491
			listbox: "option"
3492
		}[ this.options.role ];
3493
	},
3494
3495
	_setOption: function( key, value ) {
3496
		if ( key === "icons" ) {
3497
			var icons = this.element.find( ".ui-menu-icon" );
3498
			this._removeClass( icons, null, this.options.icons.submenu )
3499
				._addClass( icons, null, value.submenu );
3500
		}
3501
		this._super( key, value );
3502
	},
3503
3504
	_setOptionDisabled: function( value ) {
3505
		this._super( value );
3506
3507
		this.element.attr( "aria-disabled", String( value ) );
3508
		this._toggleClass( null, "ui-state-disabled", !!value );
3509
	},
3510
3511
	focus: function( event, item ) {
3512
		var nested, focused, activeParent;
3513
		this.blur( event, event && event.type === "focus" );
3514
3515
		this._scrollIntoView( item );
3516
3517
		this.active = item.first();
3518
3519
		focused = this.active.children( ".ui-menu-item-wrapper" );
3520
		this._addClass( focused, null, "ui-state-active" );
3521
3522
		// Only update aria-activedescendant if there's a role
3523
		// otherwise we assume focus is managed elsewhere
3524
		if ( this.options.role ) {
3525
			this.element.attr( "aria-activedescendant", focused.attr( "id" ) );
3526
		}
3527
3528
		// Highlight active parent menu item, if any
3529
		activeParent = this.active
3530
			.parent()
3531
				.closest( ".ui-menu-item" )
3532
					.children( ".ui-menu-item-wrapper" );
3533
		this._addClass( activeParent, null, "ui-state-active" );
3534
3535
		if ( event && event.type === "keydown" ) {
3536
			this._close();
3537
		} else {
3538
			this.timer = this._delay( function() {
3539
				this._close();
3540
			}, this.delay );
3541
		}
3542
3543
		nested = item.children( ".ui-menu" );
3544
		if ( nested.length && event && ( /^mouse/.test( event.type ) ) ) {
3545
			this._startOpening( nested );
3546
		}
3547
		this.activeMenu = item.parent();
3548
3549
		this._trigger( "focus", event, { item: item } );
3550
	},
3551
3552
	_scrollIntoView: function( item ) {
3553
		var borderTop, paddingTop, offset, scroll, elementHeight, itemHeight;
3554
		if ( this._hasScroll() ) {
3555
			borderTop = parseFloat( $.css( this.activeMenu[ 0 ], "borderTopWidth" ) ) || 0;
3556
			paddingTop = parseFloat( $.css( this.activeMenu[ 0 ], "paddingTop" ) ) || 0;
3557
			offset = item.offset().top - this.activeMenu.offset().top - borderTop - paddingTop;
3558
			scroll = this.activeMenu.scrollTop();
3559
			elementHeight = this.activeMenu.height();
3560
			itemHeight = item.outerHeight();
3561
3562
			if ( offset < 0 ) {
3563
				this.activeMenu.scrollTop( scroll + offset );
3564
			} else if ( offset + itemHeight > elementHeight ) {
3565
				this.activeMenu.scrollTop( scroll + offset - elementHeight + itemHeight );
3566
			}
3567
		}
3568
	},
3569
3570
	blur: function( event, fromFocus ) {
3571
		if ( !fromFocus ) {
3572
			clearTimeout( this.timer );
3573
		}
3574
3575
		if ( !this.active ) {
3576
			return;
3577
		}
3578
3579
		this._removeClass( this.active.children( ".ui-menu-item-wrapper" ),
3580
			null, "ui-state-active" );
3581
3582
		this._trigger( "blur", event, { item: this.active } );
3583
		this.active = null;
3584
	},
3585
3586
	_startOpening: function( submenu ) {
3587
		clearTimeout( this.timer );
3588
3589
		// Don't open if already open fixes a Firefox bug that caused a .5 pixel
3590
		// shift in the submenu position when mousing over the caret icon
3591
		if ( submenu.attr( "aria-hidden" ) !== "true" ) {
3592
			return;
3593
		}
3594
3595
		this.timer = this._delay( function() {
3596
			this._close();
3597
			this._open( submenu );
3598
		}, this.delay );
3599
	},
3600
3601
	_open: function( submenu ) {
3602
		var position = $.extend( {
3603
			of: this.active
3604
		}, this.options.position );
3605
3606
		clearTimeout( this.timer );
3607
		this.element.find( ".ui-menu" ).not( submenu.parents( ".ui-menu" ) )
3608
			.hide()
3609
			.attr( "aria-hidden", "true" );
3610
3611
		submenu
3612
			.show()
3613
			.removeAttr( "aria-hidden" )
3614
			.attr( "aria-expanded", "true" )
3615
			.position( position );
3616
	},
3617
3618
	collapseAll: function( event, all ) {
3619
		clearTimeout( this.timer );
3620
		this.timer = this._delay( function() {
3621
3622
			// If we were passed an event, look for the submenu that contains the event
3623
			var currentMenu = all ? this.element :
3624
				$( event && event.target ).closest( this.element.find( ".ui-menu" ) );
3625
3626
			// If we found no valid submenu ancestor, use the main menu to close all
3627
			// sub menus anyway
3628
			if ( !currentMenu.length ) {
3629
				currentMenu = this.element;
3630
			}
3631
3632
			this._close( currentMenu );
3633
3634
			this.blur( event );
3635
3636
			// Work around active item staying active after menu is blurred
3637
			this._removeClass( currentMenu.find( ".ui-state-active" ), null, "ui-state-active" );
3638
3639
			this.activeMenu = currentMenu;
3640
		}, this.delay );
3641
	},
3642
3643
	// With no arguments, closes the currently active menu - if nothing is active
3644
	// it closes all menus.  If passed an argument, it will search for menus BELOW
3645
	_close: function( startMenu ) {
3646
		if ( !startMenu ) {
3647
			startMenu = this.active ? this.active.parent() : this.element;
3648
		}
3649
3650
		startMenu.find( ".ui-menu" )
3651
			.hide()
3652
			.attr( "aria-hidden", "true" )
3653
			.attr( "aria-expanded", "false" );
3654
	},
3655
3656
	_closeOnDocumentClick: function( event ) {
3657
		return !$( event.target ).closest( ".ui-menu" ).length;
3658
	},
3659
3660
	_isDivider: function( item ) {
3661
3662
		// Match hyphen, em dash, en dash
3663
		return !/[^\-\u2014\u2013\s]/.test( item.text() );
3664
	},
3665
3666
	collapse: function( event ) {
3667
		var newItem = this.active &&
3668
			this.active.parent().closest( ".ui-menu-item", this.element );
3669
		if ( newItem && newItem.length ) {
3670
			this._close();
3671
			this.focus( event, newItem );
3672
		}
3673
	},
3674
3675
	expand: function( event ) {
3676
		var newItem = this.active &&
3677
			this.active
3678
				.children( ".ui-menu " )
3679
					.find( this.options.items )
3680
						.first();
3681
3682
		if ( newItem && newItem.length ) {
3683
			this._open( newItem.parent() );
3684
3685
			// Delay so Firefox will not hide activedescendant change in expanding submenu from AT
3686
			this._delay( function() {
3687
				this.focus( event, newItem );
3688
			} );
3689
		}
3690
	},
3691
3692
	next: function( event ) {
3693
		this._move( "next", "first", event );
3694
	},
3695
3696
	previous: function( event ) {
3697
		this._move( "prev", "last", event );
3698
	},
3699
3700
	isFirstItem: function() {
3701
		return this.active && !this.active.prevAll( ".ui-menu-item" ).length;
3702
	},
3703
3704
	isLastItem: function() {
3705
		return this.active && !this.active.nextAll( ".ui-menu-item" ).length;
3706
	},
3707
3708
	_move: function( direction, filter, event ) {
3709
		var next;
3710
		if ( this.active ) {
3711
			if ( direction === "first" || direction === "last" ) {
3712
				next = this.active
3713
					[ direction === "first" ? "prevAll" : "nextAll" ]( ".ui-menu-item" )
3714
					.eq( -1 );
3715
			} else {
3716
				next = this.active
3717
					[ direction + "All" ]( ".ui-menu-item" )
3718
					.eq( 0 );
3719
			}
3720
		}
3721
		if ( !next || !next.length || !this.active ) {
3722
			next = this.activeMenu.find( this.options.items )[ filter ]();
3723
		}
3724
3725
		this.focus( event, next );
3726
	},
3727
3728
	nextPage: function( event ) {
3729
		var item, base, height;
3730
3731
		if ( !this.active ) {
3732
			this.next( event );
3733
			return;
3734
		}
3735
		if ( this.isLastItem() ) {
3736
			return;
3737
		}
3738
		if ( this._hasScroll() ) {
3739
			base = this.active.offset().top;
3740
			height = this.element.height();
3741
			this.active.nextAll( ".ui-menu-item" ).each( function() {
3742
				item = $( this );
3743
				return item.offset().top - base - height < 0;
3744
			} );
3745
3746
			this.focus( event, item );
3747
		} else {
3748
			this.focus( event, this.activeMenu.find( this.options.items )
3749
				[ !this.active ? "first" : "last" ]() );
3750
		}
3751
	},
3752
3753
	previousPage: function( event ) {
3754
		var item, base, height;
3755
		if ( !this.active ) {
3756
			this.next( event );
3757
			return;
3758
		}
3759
		if ( this.isFirstItem() ) {
3760
			return;
3761
		}
3762
		if ( this._hasScroll() ) {
3763
			base = this.active.offset().top;
3764
			height = this.element.height();
3765
			this.active.prevAll( ".ui-menu-item" ).each( function() {
3766
				item = $( this );
3767
				return item.offset().top - base + height > 0;
3768
			} );
3769
3770
			this.focus( event, item );
3771
		} else {
3772
			this.focus( event, this.activeMenu.find( this.options.items ).first() );
3773
		}
3774
	},
3775
3776
	_hasScroll: function() {
3777
		return this.element.outerHeight() < this.element.prop( "scrollHeight" );
3778
	},
3779
3780
	select: function( event ) {
3781
3782
		// TODO: It should never be possible to not have an active item at this
3783
		// point, but the tests don't trigger mouseenter before click.
3784
		this.active = this.active || $( event.target ).closest( ".ui-menu-item" );
3785
		var ui = { item: this.active };
3786
		if ( !this.active.has( ".ui-menu" ).length ) {
3787
			this.collapseAll( event, true );
3788
		}
3789
		this._trigger( "select", event, ui );
3790
	},
3791
3792
	_filterMenuItems: function( character ) {
3793
		var escapedCharacter = character.replace( /[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&" ),
3794
			regex = new RegExp( "^" + escapedCharacter, "i" );
3795
3796
		return this.activeMenu
3797
			.find( this.options.items )
3798
3799
				// Only match on items, not dividers or other content (#10571)
3800
				.filter( ".ui-menu-item" )
3801
					.filter( function() {
3802
						return regex.test(
3803
							$.trim( $( this ).children( ".ui-menu-item-wrapper" ).text() ) );
3804
					} );
3805
	}
3806
} );
3807
3808
3809
/*!
3810
 * jQuery UI Autocomplete 1.12.1
3811
 * http://jqueryui.com
3812
 *
3813
 * Copyright jQuery Foundation and other contributors
3814
 * Released under the MIT license.
3815
 * http://jquery.org/license
3816
 */
3817
3818
//>>label: Autocomplete
3819
//>>group: Widgets
3820
//>>description: Lists suggested words as the user is typing.
3821
//>>docs: http://api.jqueryui.com/autocomplete/
3822
//>>demos: http://jqueryui.com/autocomplete/
3823
//>>css.structure: ../../themes/base/core.css
3824
//>>css.structure: ../../themes/base/autocomplete.css
3825
//>>css.theme: ../../themes/base/theme.css
3826
3827
3828
3829
$.widget( "ui.autocomplete", {
3830
	version: "1.12.1",
3831
	defaultElement: "<input>",
3832
	options: {
3833
		appendTo: null,
3834
		autoFocus: false,
3835
		delay: 300,
3836
		minLength: 1,
3837
		position: {
3838
			my: "left top",
3839
			at: "left bottom",
3840
			collision: "none"
3841
		},
3842
		source: null,
3843
3844
		// Callbacks
3845
		change: null,
3846
		close: null,
3847
		focus: null,
3848
		open: null,
3849
		response: null,
3850
		search: null,
3851
		select: null
3852
	},
3853
3854
	requestIndex: 0,
3855
	pending: 0,
3856
3857
	_create: function() {
3858
3859
		// Some browsers only repeat keydown events, not keypress events,
3860
		// so we use the suppressKeyPress flag to determine if we've already
3861
		// handled the keydown event. #7269
3862
		// Unfortunately the code for & in keypress is the same as the up arrow,
3863
		// so we use the suppressKeyPressRepeat flag to avoid handling keypress
3864
		// events when we know the keydown event was used to modify the
3865
		// search term. #7799
3866
		var suppressKeyPress, suppressKeyPressRepeat, suppressInput,
3867
			nodeName = this.element[ 0 ].nodeName.toLowerCase(),
3868
			isTextarea = nodeName === "textarea",
3869
			isInput = nodeName === "input";
3870
3871
		// Textareas are always multi-line
3872
		// Inputs are always single-line, even if inside a contentEditable element
3873
		// IE also treats inputs as contentEditable
3874
		// All other element types are determined by whether or not they're contentEditable
3875
		this.isMultiLine = isTextarea || !isInput && this._isContentEditable( this.element );
3876
3877
		this.valueMethod = this.element[ isTextarea || isInput ? "val" : "text" ];
3878
		this.isNewMenu = true;
3879
3880
		this._addClass( "ui-autocomplete-input" );
3881
		this.element.attr( "autocomplete", "off" );
3882
3883
		this._on( this.element, {
3884
			keydown: function( event ) {
3885
				if ( this.element.prop( "readOnly" ) ) {
3886
					suppressKeyPress = true;
3887
					suppressInput = true;
3888
					suppressKeyPressRepeat = true;
3889
					return;
3890
				}
3891
3892
				suppressKeyPress = false;
3893
				suppressInput = false;
3894
				suppressKeyPressRepeat = false;
3895
				var keyCode = $.ui.keyCode;
3896
				switch ( event.keyCode ) {
3897
				case keyCode.PAGE_UP:
3898
					suppressKeyPress = true;
3899
					this._move( "previousPage", event );
3900
					break;
3901
				case keyCode.PAGE_DOWN:
3902
					suppressKeyPress = true;
3903
					this._move( "nextPage", event );
3904
					break;
3905
				case keyCode.UP:
3906
					suppressKeyPress = true;
3907
					this._keyEvent( "previous", event );
3908
					break;
3909
				case keyCode.DOWN:
3910
					suppressKeyPress = true;
3911
					this._keyEvent( "next", event );
3912
					break;
3913
				case keyCode.ENTER:
3914
3915
					// when menu is open and has focus
3916
					if ( this.menu.active ) {
3917
3918
						// #6055 - Opera still allows the keypress to occur
3919
						// which causes forms to submit
3920
						suppressKeyPress = true;
3921
						event.preventDefault();
3922
						this.menu.select( event );
3923
					}
3924
					break;
3925
				case keyCode.TAB:
3926
					if ( this.menu.active ) {
3927
						this.menu.select( event );
3928
					}
3929
					break;
3930
				case keyCode.ESCAPE:
3931
					if ( this.menu.element.is( ":visible" ) ) {
3932
						if ( !this.isMultiLine ) {
3933
							this._value( this.term );
3934
						}
3935
						this.close( event );
3936
3937
						// Different browsers have different default behavior for escape
3938
						// Single press can mean undo or clear
3939
						// Double press in IE means clear the whole form
3940
						event.preventDefault();
3941
					}
3942
					break;
3943
				default:
3944
					suppressKeyPressRepeat = true;
3945
3946
					// search timeout should be triggered before the input value is changed
3947
					this._searchTimeout( event );
3948
					break;
3949
				}
3950
			},
3951
			keypress: function( event ) {
3952
				if ( suppressKeyPress ) {
3953
					suppressKeyPress = false;
3954
					if ( !this.isMultiLine || this.menu.element.is( ":visible" ) ) {
3955
						event.preventDefault();
3956
					}
3957
					return;
3958
				}
3959
				if ( suppressKeyPressRepeat ) {
3960
					return;
3961
				}
3962
3963
				// Replicate some key handlers to allow them to repeat in Firefox and Opera
3964
				var keyCode = $.ui.keyCode;
3965
				switch ( event.keyCode ) {
3966
				case keyCode.PAGE_UP:
3967
					this._move( "previousPage", event );
3968
					break;
3969
				case keyCode.PAGE_DOWN:
3970
					this._move( "nextPage", event );
3971
					break;
3972
				case keyCode.UP:
3973
					this._keyEvent( "previous", event );
3974
					break;
3975
				case keyCode.DOWN:
3976
					this._keyEvent( "next", event );
3977
					break;
3978
				}
3979
			},
3980
			input: function( event ) {
3981
				if ( suppressInput ) {
3982
					suppressInput = false;
3983
					event.preventDefault();
3984
					return;
3985
				}
3986
				this._searchTimeout( event );
3987
			},
3988
			focus: function() {
3989
				this.selectedItem = null;
3990
				this.previous = this._value();
3991
			},
3992
			blur: function( event ) {
3993
				if ( this.cancelBlur ) {
3994
					delete this.cancelBlur;
3995
					return;
3996
				}
3997
3998
				clearTimeout( this.searching );
3999
				this.close( event );
4000
				this._change( event );
4001
			}
4002
		} );
4003
4004
		this._initSource();
4005
		this.menu = $( "<ul>" )
4006
			.appendTo( this._appendTo() )
4007
			.menu( {
4008
4009
				// disable ARIA support, the live region takes care of that
4010
				role: null
4011
			} )
4012
			.hide()
4013
			.menu( "instance" );
4014
4015
		this._addClass( this.menu.element, "ui-autocomplete", "ui-front" );
4016
		this._on( this.menu.element, {
4017
			mousedown: function( event ) {
4018
4019
				// prevent moving focus out of the text field
4020
				event.preventDefault();
4021
4022
				// IE doesn't prevent moving focus even with event.preventDefault()
4023
				// so we set a flag to know when we should ignore the blur event
4024
				this.cancelBlur = true;
4025
				this._delay( function() {
4026
					delete this.cancelBlur;
4027
4028
					// Support: IE 8 only
4029
					// Right clicking a menu item or selecting text from the menu items will
4030
					// result in focus moving out of the input. However, we've already received
4031
					// and ignored the blur event because of the cancelBlur flag set above. So
4032
					// we restore focus to ensure that the menu closes properly based on the user's
4033
					// next actions.
4034
					if ( this.element[ 0 ] !== $.ui.safeActiveElement( this.document[ 0 ] ) ) {
4035
						this.element.trigger( "focus" );
4036
					}
4037
				} );
4038
			},
4039
			menufocus: function( event, ui ) {
4040
				var label, item;
4041
4042
				// support: Firefox
4043
				// Prevent accidental activation of menu items in Firefox (#7024 #9118)
4044
				if ( this.isNewMenu ) {
4045
					this.isNewMenu = false;
4046
					if ( event.originalEvent && /^mouse/.test( event.originalEvent.type ) ) {
4047
						this.menu.blur();
4048
4049
						this.document.one( "mousemove", function() {
4050
							$( event.target ).trigger( event.originalEvent );
4051
						} );
4052
4053
						return;
4054
					}
4055
				}
4056
4057
				item = ui.item.data( "ui-autocomplete-item" );
4058
				if ( false !== this._trigger( "focus", event, { item: item } ) ) {
4059
4060
					// use value to match what will end up in the input, if it was a key event
4061
					if ( event.originalEvent && /^key/.test( event.originalEvent.type ) ) {
4062
						this._value( item.value );
4063
					}
4064
				}
4065
4066
				// Announce the value in the liveRegion
4067
				label = ui.item.attr( "aria-label" ) || item.value;
4068
				if ( label && $.trim( label ).length ) {
4069
					this.liveRegion.children().hide();
4070
					$( "<div>" ).text( label ).appendTo( this.liveRegion );
4071
				}
4072
			},
4073
			menuselect: function( event, ui ) {
4074
				var item = ui.item.data( "ui-autocomplete-item" ),
4075
					previous = this.previous;
4076
4077
				// Only trigger when focus was lost (click on menu)
4078
				if ( this.element[ 0 ] !== $.ui.safeActiveElement( this.document[ 0 ] ) ) {
4079
					this.element.trigger( "focus" );
4080
					this.previous = previous;
4081
4082
					// #6109 - IE triggers two focus events and the second
4083
					// is asynchronous, so we need to reset the previous
4084
					// term synchronously and asynchronously :-(
4085
					this._delay( function() {
4086
						this.previous = previous;
4087
						this.selectedItem = item;
4088
					} );
4089
				}
4090
4091
				if ( false !== this._trigger( "select", event, { item: item } ) ) {
4092
					this._value( item.value );
4093
				}
4094
4095
				// reset the term after the select event
4096
				// this allows custom select handling to work properly
4097
				this.term = this._value();
4098
4099
				this.close( event );
4100
				this.selectedItem = item;
4101
			}
4102
		} );
4103
4104
		this.liveRegion = $( "<div>", {
4105
			role: "status",
4106
			"aria-live": "assertive",
4107
			"aria-relevant": "additions"
4108
		} )
4109
			.appendTo( this.document[ 0 ].body );
4110
4111
		this._addClass( this.liveRegion, null, "ui-helper-hidden-accessible" );
4112
4113
		// Turning off autocomplete prevents the browser from remembering the
4114
		// value when navigating through history, so we re-enable autocomplete
4115
		// if the page is unloaded before the widget is destroyed. #7790
4116
		this._on( this.window, {
4117
			beforeunload: function() {
4118
				this.element.removeAttr( "autocomplete" );
4119
			}
4120
		} );
4121
	},
4122
4123
	_destroy: function() {
4124
		clearTimeout( this.searching );
4125
		this.element.removeAttr( "autocomplete" );
4126
		this.menu.element.remove();
4127
		this.liveRegion.remove();
4128
	},
4129
4130
	_setOption: function( key, value ) {
4131
		this._super( key, value );
4132
		if ( key === "source" ) {
4133
			this._initSource();
4134
		}
4135
		if ( key === "appendTo" ) {
4136
			this.menu.element.appendTo( this._appendTo() );
4137
		}
4138
		if ( key === "disabled" && value && this.xhr ) {
4139
			this.xhr.abort();
4140
		}
4141
	},
4142
4143
	_isEventTargetInWidget: function( event ) {
4144
		var menuElement = this.menu.element[ 0 ];
4145
4146
		return event.target === this.element[ 0 ] ||
4147
			event.target === menuElement ||
4148
			$.contains( menuElement, event.target );
4149
	},
4150
4151
	_closeOnClickOutside: function( event ) {
4152
		if ( !this._isEventTargetInWidget( event ) ) {
4153
			this.close();
4154
		}
4155
	},
4156
4157
	_appendTo: function() {
4158
		var element = this.options.appendTo;
4159
4160
		if ( element ) {
4161
			element = element.jquery || element.nodeType ?
4162
				$( element ) :
4163
				this.document.find( element ).eq( 0 );
4164
		}
4165
4166
		if ( !element || !element[ 0 ] ) {
4167
			element = this.element.closest( ".ui-front, dialog" );
4168
		}
4169
4170
		if ( !element.length ) {
4171
			element = this.document[ 0 ].body;
4172
		}
4173
4174
		return element;
4175
	},
4176
4177
	_initSource: function() {
4178
		var array, url,
4179
			that = this;
4180
		if ( $.isArray( this.options.source ) ) {
4181
			array = this.options.source;
4182
			this.source = function( request, response ) {
4183
				response( $.ui.autocomplete.filter( array, request.term ) );
4184
			};
4185
		} else if ( typeof this.options.source === "string" ) {
4186
			url = this.options.source;
4187
			this.source = function( request, response ) {
4188
				if ( that.xhr ) {
4189
					that.xhr.abort();
4190
				}
4191
				that.xhr = $.ajax( {
4192
					url: url,
4193
					data: request,
4194
					dataType: "json",
4195
					success: function( data ) {
4196
						response( data );
4197
					},
4198
					error: function() {
4199
						response( [] );
4200
					}
4201
				} );
4202
			};
4203
		} else {
4204
			this.source = this.options.source;
4205
		}
4206
	},
4207
4208
	_searchTimeout: function( event ) {
4209
		clearTimeout( this.searching );
4210
		this.searching = this._delay( function() {
4211
4212
			// Search if the value has changed, or if the user retypes the same value (see #7434)
4213
			var equalValues = this.term === this._value(),
4214
				menuVisible = this.menu.element.is( ":visible" ),
4215
				modifierKey = event.altKey || event.ctrlKey || event.metaKey || event.shiftKey;
4216
4217
			if ( !equalValues || ( equalValues && !menuVisible && !modifierKey ) ) {
4218
				this.selectedItem = null;
4219
				this.search( null, event );
4220
			}
4221
		}, this.options.delay );
4222
	},
4223
4224
	search: function( value, event ) {
4225
		value = value != null ? value : this._value();
4226
4227
		// Always save the actual value, not the one passed as an argument
4228
		this.term = this._value();
4229
4230
		if ( value.length < this.options.minLength ) {
4231
			return this.close( event );
4232
		}
4233
4234
		if ( this._trigger( "search", event ) === false ) {
4235
			return;
4236
		}
4237
4238
		return this._search( value );
4239
	},
4240
4241
	_search: function( value ) {
4242
		this.pending++;
4243
		this._addClass( "ui-autocomplete-loading" );
4244
		this.cancelSearch = false;
4245
4246
		this.source( { term: value }, this._response() );
4247
	},
4248
4249
	_response: function() {
4250
		var index = ++this.requestIndex;
4251
4252
		return $.proxy( function( content ) {
4253
			if ( index === this.requestIndex ) {
4254
				this.__response( content );
4255
			}
4256
4257
			this.pending--;
4258
			if ( !this.pending ) {
4259
				this._removeClass( "ui-autocomplete-loading" );
4260
			}
4261
		}, this );
4262
	},
4263
4264
	__response: function( content ) {
4265
		if ( content ) {
4266
			content = this._normalize( content );
4267
		}
4268
		this._trigger( "response", null, { content: content } );
4269
		if ( !this.options.disabled && content && content.length && !this.cancelSearch ) {
4270
			this._suggest( content );
4271
			this._trigger( "open" );
4272
		} else {
4273
4274
			// use ._close() instead of .close() so we don't cancel future searches
4275
			this._close();
4276
		}
4277
	},
4278
4279
	close: function( event ) {
4280
		this.cancelSearch = true;
4281
		this._close( event );
4282
	},
4283
4284
	_close: function( event ) {
4285
4286
		// Remove the handler that closes the menu on outside clicks
4287
		this._off( this.document, "mousedown" );
4288
4289
		if ( this.menu.element.is( ":visible" ) ) {
4290
			this.menu.element.hide();
4291
			this.menu.blur();
4292
			this.isNewMenu = true;
4293
			this._trigger( "close", event );
4294
		}
4295
	},
4296
4297
	_change: function( event ) {
4298
		if ( this.previous !== this._value() ) {
4299
			this._trigger( "change", event, { item: this.selectedItem } );
4300
		}
4301
	},
4302
4303
	_normalize: function( items ) {
4304
4305
		// assume all items have the right format when the first item is complete
4306
		if ( items.length && items[ 0 ].label && items[ 0 ].value ) {
4307
			return items;
4308
		}
4309
		return $.map( items, function( item ) {
4310
			if ( typeof item === "string" ) {
4311
				return {
4312
					label: item,
4313
					value: item
4314
				};
4315
			}
4316
			return $.extend( {}, item, {
4317
				label: item.label || item.value,
4318
				value: item.value || item.label
4319
			} );
4320
		} );
4321
	},
4322
4323
	_suggest: function( items ) {
4324
		var ul = this.menu.element.empty();
4325
		this._renderMenu( ul, items );
4326
		this.isNewMenu = true;
4327
		this.menu.refresh();
4328
4329
		// Size and position menu
4330
		ul.show();
4331
		this._resizeMenu();
4332
		ul.position( $.extend( {
4333
			of: this.element
4334
		}, this.options.position ) );
4335
4336
		if ( this.options.autoFocus ) {
4337
			this.menu.next();
4338
		}
4339
4340
		// Listen for interactions outside of the widget (#6642)
4341
		this._on( this.document, {
4342
			mousedown: "_closeOnClickOutside"
4343
		} );
4344
	},
4345
4346
	_resizeMenu: function() {
4347
		var ul = this.menu.element;
4348
		ul.outerWidth( Math.max(
4349
4350
			// Firefox wraps long text (possibly a rounding bug)
4351
			// so we add 1px to avoid the wrapping (#7513)
4352
			ul.width( "" ).outerWidth() + 1,
4353
			this.element.outerWidth()
4354
		) );
4355
	},
4356
4357
	_renderMenu: function( ul, items ) {
4358
		var that = this;
4359
		$.each( items, function( index, item ) {
4360
			that._renderItemData( ul, item );
4361
		} );
4362
	},
4363
4364
	_renderItemData: function( ul, item ) {
4365
		return this._renderItem( ul, item ).data( "ui-autocomplete-item", item );
4366
	},
4367
4368
	_renderItem: function( ul, item ) {
4369
		return $( "<li>" )
4370
			.append( $( "<div>" ).text( item.label ) )
4371
			.appendTo( ul );
4372
	},
4373
4374
	_move: function( direction, event ) {
4375
		if ( !this.menu.element.is( ":visible" ) ) {
4376
			this.search( null, event );
4377
			return;
4378
		}
4379
		if ( this.menu.isFirstItem() && /^previous/.test( direction ) ||
4380
				this.menu.isLastItem() && /^next/.test( direction ) ) {
4381
4382
			if ( !this.isMultiLine ) {
4383
				this._value( this.term );
4384
			}
4385
4386
			this.menu.blur();
4387
			return;
4388
		}
4389
		this.menu[ direction ]( event );
4390
	},
4391
4392
	widget: function() {
4393
		return this.menu.element;
4394
	},
4395
4396
	_value: function() {
4397
		return this.valueMethod.apply( this.element, arguments );
4398
	},
4399
4400
	_keyEvent: function( keyEvent, event ) {
4401
		if ( !this.isMultiLine || this.menu.element.is( ":visible" ) ) {
4402
			this._move( keyEvent, event );
4403
4404
			// Prevents moving cursor to beginning/end of the text field in some browsers
4405
			event.preventDefault();
4406
		}
4407
	},
4408
4409
	// Support: Chrome <=50
4410
	// We should be able to just use this.element.prop( "isContentEditable" )
4411
	// but hidden elements always report false in Chrome.
4412
	// https://code.google.com/p/chromium/issues/detail?id=313082
4413
	_isContentEditable: function( element ) {
4414
		if ( !element.length ) {
4415
			return false;
4416
		}
4417
4418
		var editable = element.prop( "contentEditable" );
4419
4420
		if ( editable === "inherit" ) {
4421
		  return this._isContentEditable( element.parent() );
4422
		}
4423
4424
		return editable === "true";
4425
	}
4426
} );
4427
4428
$.extend( $.ui.autocomplete, {
4429
	escapeRegex: function( value ) {
4430
		return value.replace( /[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&" );
4431
	},
4432
	filter: function( array, term ) {
4433
		var matcher = new RegExp( $.ui.autocomplete.escapeRegex( term ), "i" );
4434
		return $.grep( array, function( value ) {
4435
			return matcher.test( value.label || value.value || value );
4436
		} );
4437
	}
4438
} );
4439
4440
// Live region extension, adding a `messages` option
4441
// NOTE: This is an experimental API. We are still investigating
4442
// a full solution for string manipulation and internationalization.
4443
$.widget( "ui.autocomplete", $.ui.autocomplete, {
4444
	options: {
4445
		messages: {
4446
			noResults: "No search results.",
4447
			results: function( amount ) {
4448
				return amount + ( amount > 1 ? " results are" : " result is" ) +
4449
					" available, use up and down arrow keys to navigate.";
4450
			}
4451
		}
4452
	},
4453
4454
	__response: function( content ) {
4455
		var message;
4456
		this._superApply( arguments );
4457
		if ( this.options.disabled || this.cancelSearch ) {
4458
			return;
4459
		}
4460
		if ( content && content.length ) {
4461
			message = this.options.messages.results( content.length );
4462
		} else {
4463
			message = this.options.messages.noResults;
4464
		}
4465
		this.liveRegion.children().hide();
4466
		$( "<div>" ).text( message ).appendTo( this.liveRegion );
4467
	}
4468
} );
4469
4470
var widgetsAutocomplete = $.ui.autocomplete;
4471
4472
4473
// jscs:disable maximumLineLength
4474
/* jscs:disable requireCamelCaseOrUpperCaseIdentifiers */
4475
/*!
4476
 * jQuery UI Datepicker 1.12.1
4477
 * http://jqueryui.com
4478
 *
4479
 * Copyright jQuery Foundation and other contributors
4480
 * Released under the MIT license.
4481
 * http://jquery.org/license
4482
 */
4483
4484
//>>label: Datepicker
4485
//>>group: Widgets
4486
//>>description: Displays a calendar from an input or inline for selecting dates.
4487
//>>docs: http://api.jqueryui.com/datepicker/
4488
//>>demos: http://jqueryui.com/datepicker/
4489
//>>css.structure: ../../themes/base/core.css
4490
//>>css.structure: ../../themes/base/datepicker.css
4491
//>>css.theme: ../../themes/base/theme.css
4492
4493
4494
4495
$.extend( $.ui, { datepicker: { version: "1.12.1" } } );
4496
4497
var datepicker_instActive;
4498
4499
function datepicker_getZindex( elem ) {
4500
	var position, value;
4501
	while ( elem.length && elem[ 0 ] !== document ) {
4502
4503
		// Ignore z-index if position is set to a value where z-index is ignored by the browser
4504
		// This makes behavior of this function consistent across browsers
4505
		// WebKit always returns auto if the element is positioned
4506
		position = elem.css( "position" );
4507
		if ( position === "absolute" || position === "relative" || position === "fixed" ) {
4508
4509
			// IE returns 0 when zIndex is not specified
4510
			// other browsers return a string
4511
			// we ignore the case of nested elements with an explicit value of 0
4512
			// <div style="z-index: -10;"><div style="z-index: 0;"></div></div>
4513
			value = parseInt( elem.css( "zIndex" ), 10 );
4514
			if ( !isNaN( value ) && value !== 0 ) {
4515
				return value;
4516
			}
4517
		}
4518
		elem = elem.parent();
4519
	}
4520
4521
	return 0;
4522
}
4523
/* Date picker manager.
4524
   Use the singleton instance of this class, $.datepicker, to interact with the date picker.
4525
   Settings for (groups of) date pickers are maintained in an instance object,
4526
   allowing multiple different settings on the same page. */
4527
4528
function Datepicker() {
4529
	this._curInst = null; // The current instance in use
4530
	this._keyEvent = false; // If the last event was a key event
4531
	this._disabledInputs = []; // List of date picker inputs that have been disabled
4532
	this._datepickerShowing = false; // True if the popup picker is showing , false if not
4533
	this._inDialog = false; // True if showing within a "dialog", false if not
4534
	this._mainDivId = "ui-datepicker-div"; // The ID of the main datepicker division
4535
	this._inlineClass = "ui-datepicker-inline"; // The name of the inline marker class
4536
	this._appendClass = "ui-datepicker-append"; // The name of the append marker class
4537
	this._triggerClass = "ui-datepicker-trigger"; // The name of the trigger marker class
4538
	this._dialogClass = "ui-datepicker-dialog"; // The name of the dialog marker class
4539
	this._disableClass = "ui-datepicker-disabled"; // The name of the disabled covering marker class
4540
	this._unselectableClass = "ui-datepicker-unselectable"; // The name of the unselectable cell marker class
4541
	this._currentClass = "ui-datepicker-current-day"; // The name of the current day marker class
4542
	this._dayOverClass = "ui-datepicker-days-cell-over"; // The name of the day hover marker class
4543
	this.regional = []; // Available regional settings, indexed by language code
4544
	this.regional[ "" ] = { // Default regional settings
4545
		closeText: "Done", // Display text for close link
4546
		prevText: "Prev", // Display text for previous month link
4547
		nextText: "Next", // Display text for next month link
4548
		currentText: "Today", // Display text for current month link
4549
		monthNames: [ "January","February","March","April","May","June",
4550
			"July","August","September","October","November","December" ], // Names of months for drop-down and formatting
4551
		monthNamesShort: [ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" ], // For formatting
4552
		dayNames: [ "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" ], // For formatting
4553
		dayNamesShort: [ "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" ], // For formatting
4554
		dayNamesMin: [ "Su","Mo","Tu","We","Th","Fr","Sa" ], // Column headings for days starting at Sunday
4555
		weekHeader: "Wk", // Column header for week of the year
4556
		dateFormat: "mm/dd/yy", // See format options on parseDate
4557
		firstDay: 0, // The first day of the week, Sun = 0, Mon = 1, ...
4558
		isRTL: false, // True if right-to-left language, false if left-to-right
4559
		showMonthAfterYear: false, // True if the year select precedes month, false for month then year
4560
		yearSuffix: "" // Additional text to append to the year in the month headers
4561
	};
4562
	this._defaults = { // Global defaults for all the date picker instances
4563
		showOn: "focus", // "focus" for popup on focus,
4564
			// "button" for trigger button, or "both" for either
4565
		showAnim: "fadeIn", // Name of jQuery animation for popup
4566
		showOptions: {}, // Options for enhanced animations
4567
		defaultDate: null, // Used when field is blank: actual date,
4568
			// +/-number for offset from today, null for today
4569
		appendText: "", // Display text following the input box, e.g. showing the format
4570
		buttonText: "...", // Text for trigger button
4571
		buttonImage: "", // URL for trigger button image
4572
		buttonImageOnly: false, // True if the image appears alone, false if it appears on a button
4573
		hideIfNoPrevNext: false, // True to hide next/previous month links
4574
			// if not applicable, false to just disable them
4575
		navigationAsDateFormat: false, // True if date formatting applied to prev/today/next links
4576
		gotoCurrent: false, // True if today link goes back to current selection instead
4577
		changeMonth: false, // True if month can be selected directly, false if only prev/next
4578
		changeYear: false, // True if year can be selected directly, false if only prev/next
4579
		yearRange: "c-10:c+10", // Range of years to display in drop-down,
4580
			// either relative to today's year (-nn:+nn), relative to currently displayed year
4581
			// (c-nn:c+nn), absolute (nnnn:nnnn), or a combination of the above (nnnn:-n)
4582
		showOtherMonths: false, // True to show dates in other months, false to leave blank
4583
		selectOtherMonths: false, // True to allow selection of dates in other months, false for unselectable
4584
		showWeek: false, // True to show week of the year, false to not show it
4585
		calculateWeek: this.iso8601Week, // How to calculate the week of the year,
4586
			// takes a Date and returns the number of the week for it
4587
		shortYearCutoff: "+10", // Short year values < this are in the current century,
4588
			// > this are in the previous century,
4589
			// string value starting with "+" for current year + value
4590
		minDate: null, // The earliest selectable date, or null for no limit
4591
		maxDate: null, // The latest selectable date, or null for no limit
4592
		duration: "fast", // Duration of display/closure
4593
		beforeShowDay: null, // Function that takes a date and returns an array with
4594
			// [0] = true if selectable, false if not, [1] = custom CSS class name(s) or "",
4595
			// [2] = cell title (optional), e.g. $.datepicker.noWeekends
4596
		beforeShow: null, // Function that takes an input field and
4597
			// returns a set of custom settings for the date picker
4598
		onSelect: null, // Define a callback function when a date is selected
4599
		onChangeMonthYear: null, // Define a callback function when the month or year is changed
4600
		onClose: null, // Define a callback function when the datepicker is closed
4601
		numberOfMonths: 1, // Number of months to show at a time
4602
		showCurrentAtPos: 0, // The position in multipe months at which to show the current month (starting at 0)
4603
		stepMonths: 1, // Number of months to step back/forward
4604
		stepBigMonths: 12, // Number of months to step back/forward for the big links
4605
		altField: "", // Selector for an alternate field to store selected dates into
4606
		altFormat: "", // The date format to use for the alternate field
4607
		constrainInput: true, // The input is constrained by the current date format
4608
		showButtonPanel: false, // True to show button panel, false to not show it
4609
		autoSize: false, // True to size the input for the date format, false to leave as is
4610
		disabled: false // The initial disabled state
4611
	};
4612
	$.extend( this._defaults, this.regional[ "" ] );
4613
	this.regional.en = $.extend( true, {}, this.regional[ "" ] );
4614
	this.regional[ "en-US" ] = $.extend( true, {}, this.regional.en );
4615
	this.dpDiv = datepicker_bindHover( $( "<div id='" + this._mainDivId + "' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>" ) );
4616
}
4617
4618
$.extend( Datepicker.prototype, {
4619
	/* Class name added to elements to indicate already configured with a date picker. */
4620
	markerClassName: "hasDatepicker",
4621
4622
	//Keep track of the maximum number of rows displayed (see #7043)
4623
	maxRows: 4,
4624
4625
	// TODO rename to "widget" when switching to widget factory
4626
	_widgetDatepicker: function() {
4627
		return this.dpDiv;
4628
	},
4629
4630
	/* Override the default settings for all instances of the date picker.
4631
	 * @param  settings  object - the new settings to use as defaults (anonymous object)
4632
	 * @return the manager object
4633
	 */
4634
	setDefaults: function( settings ) {
4635
		datepicker_extendRemove( this._defaults, settings || {} );
4636
		return this;
4637
	},
4638
4639
	/* Attach the date picker to a jQuery selection.
4640
	 * @param  target	element - the target input field or division or span
4641
	 * @param  settings  object - the new settings to use for this date picker instance (anonymous)
4642
	 */
4643
	_attachDatepicker: function( target, settings ) {
4644
		var nodeName, inline, inst;
4645
		nodeName = target.nodeName.toLowerCase();
4646
		inline = ( nodeName === "div" || nodeName === "span" );
4647
		if ( !target.id ) {
4648
			this.uuid += 1;
4649
			target.id = "dp" + this.uuid;
4650
		}
4651
		inst = this._newInst( $( target ), inline );
4652
		inst.settings = $.extend( {}, settings || {} );
4653
		if ( nodeName === "input" ) {
4654
			this._connectDatepicker( target, inst );
4655
		} else if ( inline ) {
4656
			this._inlineDatepicker( target, inst );
4657
		}
4658
	},
4659
4660
	/* Create a new instance object. */
4661
	_newInst: function( target, inline ) {
4662
		var id = target[ 0 ].id.replace( /([^A-Za-z0-9_\-])/g, "\\\\$1" ); // escape jQuery meta chars
4663
		return { id: id, input: target, // associated target
4664
			selectedDay: 0, selectedMonth: 0, selectedYear: 0, // current selection
4665
			drawMonth: 0, drawYear: 0, // month being drawn
4666
			inline: inline, // is datepicker inline or not
4667
			dpDiv: ( !inline ? this.dpDiv : // presentation div
4668
			datepicker_bindHover( $( "<div class='" + this._inlineClass + " ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>" ) ) ) };
4669
	},
4670
4671
	/* Attach the date picker to an input field. */
4672
	_connectDatepicker: function( target, inst ) {
4673
		var input = $( target );
4674
		inst.append = $( [] );
4675
		inst.trigger = $( [] );
4676
		if ( input.hasClass( this.markerClassName ) ) {
4677
			return;
4678
		}
4679
		this._attachments( input, inst );
4680
		input.addClass( this.markerClassName ).on( "keydown", this._doKeyDown ).
4681
			on( "keypress", this._doKeyPress ).on( "keyup", this._doKeyUp );
4682
		this._autoSize( inst );
4683
		$.data( target, "datepicker", inst );
4684
4685
		//If disabled option is true, disable the datepicker once it has been attached to the input (see ticket #5665)
4686
		if ( inst.settings.disabled ) {
4687
			this._disableDatepicker( target );
4688
		}
4689
	},
4690
4691
	/* Make attachments based on settings. */
4692
	_attachments: function( input, inst ) {
4693
		var showOn, buttonText, buttonImage,
4694
			appendText = this._get( inst, "appendText" ),
4695
			isRTL = this._get( inst, "isRTL" );
4696
4697
		if ( inst.append ) {
4698
			inst.append.remove();
4699
		}
4700
		if ( appendText ) {
4701
			inst.append = $( "<span class='" + this._appendClass + "'>" + appendText + "</span>" );
4702
			input[ isRTL ? "before" : "after" ]( inst.append );
4703
		}
4704
4705
		input.off( "focus", this._showDatepicker );
4706
4707
		if ( inst.trigger ) {
4708
			inst.trigger.remove();
4709
		}
4710
4711
		showOn = this._get( inst, "showOn" );
4712
		if ( showOn === "focus" || showOn === "both" ) { // pop-up date picker when in the marked field
4713
			input.on( "focus", this._showDatepicker );
4714
		}
4715
		if ( showOn === "button" || showOn === "both" ) { // pop-up date picker when button clicked
4716
			buttonText = this._get( inst, "buttonText" );
4717
			buttonImage = this._get( inst, "buttonImage" );
4718
			inst.trigger = $( this._get( inst, "buttonImageOnly" ) ?
4719
				$( "<img/>" ).addClass( this._triggerClass ).
4720
					attr( { src: buttonImage, alt: buttonText, title: buttonText } ) :
4721
				$( "<button type='button'></button>" ).addClass( this._triggerClass ).
4722
					html( !buttonImage ? buttonText : $( "<img/>" ).attr(
4723
					{ src:buttonImage, alt:buttonText, title:buttonText } ) ) );
4724
			input[ isRTL ? "before" : "after" ]( inst.trigger );
4725
			inst.trigger.on( "click", function() {
4726
				if ( $.datepicker._datepickerShowing && $.datepicker._lastInput === input[ 0 ] ) {
4727
					$.datepicker._hideDatepicker();
4728
				} else if ( $.datepicker._datepickerShowing && $.datepicker._lastInput !== input[ 0 ] ) {
4729
					$.datepicker._hideDatepicker();
4730
					$.datepicker._showDatepicker( input[ 0 ] );
4731
				} else {
4732
					$.datepicker._showDatepicker( input[ 0 ] );
4733
				}
4734
				return false;
4735
			} );
4736
		}
4737
	},
4738
4739
	/* Apply the maximum length for the date format. */
4740
	_autoSize: function( inst ) {
4741
		if ( this._get( inst, "autoSize" ) && !inst.inline ) {
4742
			var findMax, max, maxI, i,
4743
				date = new Date( 2009, 12 - 1, 20 ), // Ensure double digits
4744
				dateFormat = this._get( inst, "dateFormat" );
4745
4746
			if ( dateFormat.match( /[DM]/ ) ) {
4747
				findMax = function( names ) {
4748
					max = 0;
4749
					maxI = 0;
4750
					for ( i = 0; i < names.length; i++ ) {
4751
						if ( names[ i ].length > max ) {
4752
							max = names[ i ].length;
4753
							maxI = i;
4754
						}
4755
					}
4756
					return maxI;
4757
				};
4758
				date.setMonth( findMax( this._get( inst, ( dateFormat.match( /MM/ ) ?
4759
					"monthNames" : "monthNamesShort" ) ) ) );
4760
				date.setDate( findMax( this._get( inst, ( dateFormat.match( /DD/ ) ?
4761
					"dayNames" : "dayNamesShort" ) ) ) + 20 - date.getDay() );
4762
			}
4763
			inst.input.attr( "size", this._formatDate( inst, date ).length );
4764
		}
4765
	},
4766
4767
	/* Attach an inline date picker to a div. */
4768
	_inlineDatepicker: function( target, inst ) {
4769
		var divSpan = $( target );
4770
		if ( divSpan.hasClass( this.markerClassName ) ) {
4771
			return;
4772
		}
4773
		divSpan.addClass( this.markerClassName ).append( inst.dpDiv );
4774
		$.data( target, "datepicker", inst );
4775
		this._setDate( inst, this._getDefaultDate( inst ), true );
4776
		this._updateDatepicker( inst );
4777
		this._updateAlternate( inst );
4778
4779
		//If disabled option is true, disable the datepicker before showing it (see ticket #5665)
4780
		if ( inst.settings.disabled ) {
4781
			this._disableDatepicker( target );
4782
		}
4783
4784
		// Set display:block in place of inst.dpDiv.show() which won't work on disconnected elements
4785
		// http://bugs.jqueryui.com/ticket/7552 - A Datepicker created on a detached div has zero height
4786
		inst.dpDiv.css( "display", "block" );
4787
	},
4788
4789
	/* Pop-up the date picker in a "dialog" box.
4790
	 * @param  input element - ignored
4791
	 * @param  date	string or Date - the initial date to display
4792
	 * @param  onSelect  function - the function to call when a date is selected
4793
	 * @param  settings  object - update the dialog date picker instance's settings (anonymous object)
4794
	 * @param  pos int[2] - coordinates for the dialog's position within the screen or
4795
	 *					event - with x/y coordinates or
4796
	 *					leave empty for default (screen centre)
4797
	 * @return the manager object
4798
	 */
4799
	_dialogDatepicker: function( input, date, onSelect, settings, pos ) {
4800
		var id, browserWidth, browserHeight, scrollX, scrollY,
4801
			inst = this._dialogInst; // internal instance
4802
4803
		if ( !inst ) {
4804
			this.uuid += 1;
4805
			id = "dp" + this.uuid;
4806
			this._dialogInput = $( "<input type='text' id='" + id +
4807
				"' style='position: absolute; top: -100px; width: 0px;'/>" );
4808
			this._dialogInput.on( "keydown", this._doKeyDown );
4809
			$( "body" ).append( this._dialogInput );
4810
			inst = this._dialogInst = this._newInst( this._dialogInput, false );
4811
			inst.settings = {};
4812
			$.data( this._dialogInput[ 0 ], "datepicker", inst );
4813
		}
4814
		datepicker_extendRemove( inst.settings, settings || {} );
4815
		date = ( date && date.constructor === Date ? this._formatDate( inst, date ) : date );
4816
		this._dialogInput.val( date );
4817
4818
		this._pos = ( pos ? ( pos.length ? pos : [ pos.pageX, pos.pageY ] ) : null );
4819
		if ( !this._pos ) {
4820
			browserWidth = document.documentElement.clientWidth;
4821
			browserHeight = document.documentElement.clientHeight;
4822
			scrollX = document.documentElement.scrollLeft || document.body.scrollLeft;
4823
			scrollY = document.documentElement.scrollTop || document.body.scrollTop;
4824
			this._pos = // should use actual width/height below
4825
				[ ( browserWidth / 2 ) - 100 + scrollX, ( browserHeight / 2 ) - 150 + scrollY ];
4826
		}
4827
4828
		// Move input on screen for focus, but hidden behind dialog
4829
		this._dialogInput.css( "left", ( this._pos[ 0 ] + 20 ) + "px" ).css( "top", this._pos[ 1 ] + "px" );
4830
		inst.settings.onSelect = onSelect;
4831
		this._inDialog = true;
4832
		this.dpDiv.addClass( this._dialogClass );
4833
		this._showDatepicker( this._dialogInput[ 0 ] );
4834
		if ( $.blockUI ) {
4835
			$.blockUI( this.dpDiv );
4836
		}
4837
		$.data( this._dialogInput[ 0 ], "datepicker", inst );
4838
		return this;
4839
	},
4840
4841
	/* Detach a datepicker from its control.
4842
	 * @param  target	element - the target input field or division or span
4843
	 */
4844
	_destroyDatepicker: function( target ) {
4845
		var nodeName,
4846
			$target = $( target ),
4847
			inst = $.data( target, "datepicker" );
4848
4849
		if ( !$target.hasClass( this.markerClassName ) ) {
4850
			return;
4851
		}
4852
4853
		nodeName = target.nodeName.toLowerCase();
4854
		$.removeData( target, "datepicker" );
4855
		if ( nodeName === "input" ) {
4856
			inst.append.remove();
4857
			inst.trigger.remove();
4858
			$target.removeClass( this.markerClassName ).
4859
				off( "focus", this._showDatepicker ).
4860
				off( "keydown", this._doKeyDown ).
4861
				off( "keypress", this._doKeyPress ).
4862
				off( "keyup", this._doKeyUp );
4863
		} else if ( nodeName === "div" || nodeName === "span" ) {
4864
			$target.removeClass( this.markerClassName ).empty();
4865
		}
4866
4867
		if ( datepicker_instActive === inst ) {
4868
			datepicker_instActive = null;
4869
		}
4870
	},
4871
4872
	/* Enable the date picker to a jQuery selection.
4873
	 * @param  target	element - the target input field or division or span
4874
	 */
4875
	_enableDatepicker: function( target ) {
4876
		var nodeName, inline,
4877
			$target = $( target ),
4878
			inst = $.data( target, "datepicker" );
4879
4880
		if ( !$target.hasClass( this.markerClassName ) ) {
4881
			return;
4882
		}
4883
4884
		nodeName = target.nodeName.toLowerCase();
4885
		if ( nodeName === "input" ) {
4886
			target.disabled = false;
4887
			inst.trigger.filter( "button" ).
4888
				each( function() { this.disabled = false; } ).end().
4889
				filter( "img" ).css( { opacity: "1.0", cursor: "" } );
4890
		} else if ( nodeName === "div" || nodeName === "span" ) {
4891
			inline = $target.children( "." + this._inlineClass );
4892
			inline.children().removeClass( "ui-state-disabled" );
4893
			inline.find( "select.ui-datepicker-month, select.ui-datepicker-year" ).
4894
				prop( "disabled", false );
4895
		}
4896
		this._disabledInputs = $.map( this._disabledInputs,
4897
			function( value ) { return ( value === target ? null : value ); } ); // delete entry
4898
	},
4899
4900
	/* Disable the date picker to a jQuery selection.
4901
	 * @param  target	element - the target input field or division or span
4902
	 */
4903
	_disableDatepicker: function( target ) {
4904
		var nodeName, inline,
4905
			$target = $( target ),
4906
			inst = $.data( target, "datepicker" );
4907
4908
		if ( !$target.hasClass( this.markerClassName ) ) {
4909
			return;
4910
		}
4911
4912
		nodeName = target.nodeName.toLowerCase();
4913
		if ( nodeName === "input" ) {
4914
			target.disabled = true;
4915
			inst.trigger.filter( "button" ).
4916
				each( function() { this.disabled = true; } ).end().
4917
				filter( "img" ).css( { opacity: "0.5", cursor: "default" } );
4918
		} else if ( nodeName === "div" || nodeName === "span" ) {
4919
			inline = $target.children( "." + this._inlineClass );
4920
			inline.children().addClass( "ui-state-disabled" );
4921
			inline.find( "select.ui-datepicker-month, select.ui-datepicker-year" ).
4922
				prop( "disabled", true );
4923
		}
4924
		this._disabledInputs = $.map( this._disabledInputs,
4925
			function( value ) { return ( value === target ? null : value ); } ); // delete entry
4926
		this._disabledInputs[ this._disabledInputs.length ] = target;
4927
	},
4928
4929
	/* Is the first field in a jQuery collection disabled as a datepicker?
4930
	 * @param  target	element - the target input field or division or span
4931
	 * @return boolean - true if disabled, false if enabled
4932
	 */
4933
	_isDisabledDatepicker: function( target ) {
4934
		if ( !target ) {
4935
			return false;
4936
		}
4937
		for ( var i = 0; i < this._disabledInputs.length; i++ ) {
4938
			if ( this._disabledInputs[ i ] === target ) {
4939
				return true;
4940
			}
4941
		}
4942
		return false;
4943
	},
4944
4945
	/* Retrieve the instance data for the target control.
4946
	 * @param  target  element - the target input field or division or span
4947
	 * @return  object - the associated instance data
4948
	 * @throws  error if a jQuery problem getting data
4949
	 */
4950
	_getInst: function( target ) {
4951
		try {
4952
			return $.data( target, "datepicker" );
4953
		}
4954
		catch ( err ) {
4955
			throw "Missing instance data for this datepicker";
4956
		}
4957
	},
4958
4959
	/* Update or retrieve the settings for a date picker attached to an input field or division.
4960
	 * @param  target  element - the target input field or division or span
4961
	 * @param  name	object - the new settings to update or
4962
	 *				string - the name of the setting to change or retrieve,
4963
	 *				when retrieving also "all" for all instance settings or
4964
	 *				"defaults" for all global defaults
4965
	 * @param  value   any - the new value for the setting
4966
	 *				(omit if above is an object or to retrieve a value)
4967
	 */
4968
	_optionDatepicker: function( target, name, value ) {
4969
		var settings, date, minDate, maxDate,
4970
			inst = this._getInst( target );
4971
4972
		if ( arguments.length === 2 && typeof name === "string" ) {
4973
			return ( name === "defaults" ? $.extend( {}, $.datepicker._defaults ) :
4974
				( inst ? ( name === "all" ? $.extend( {}, inst.settings ) :
4975
				this._get( inst, name ) ) : null ) );
4976
		}
4977
4978
		settings = name || {};
4979
		if ( typeof name === "string" ) {
4980
			settings = {};
4981
			settings[ name ] = value;
4982
		}
4983
4984
		if ( inst ) {
4985
			if ( this._curInst === inst ) {
4986
				this._hideDatepicker();
4987
			}
4988
4989
			date = this._getDateDatepicker( target, true );
4990
			minDate = this._getMinMaxDate( inst, "min" );
4991
			maxDate = this._getMinMaxDate( inst, "max" );
4992
			datepicker_extendRemove( inst.settings, settings );
4993
4994
			// reformat the old minDate/maxDate values if dateFormat changes and a new minDate/maxDate isn't provided
4995
			if ( minDate !== null && settings.dateFormat !== undefined && settings.minDate === undefined ) {
4996
				inst.settings.minDate = this._formatDate( inst, minDate );
4997
			}
4998
			if ( maxDate !== null && settings.dateFormat !== undefined && settings.maxDate === undefined ) {
4999
				inst.settings.maxDate = this._formatDate( inst, maxDate );
5000
			}
5001
			if ( "disabled" in settings ) {
5002
				if ( settings.disabled ) {
5003
					this._disableDatepicker( target );
5004
				} else {
5005
					this._enableDatepicker( target );
5006
				}
5007
			}
5008
			this._attachments( $( target ), inst );
5009
			this._autoSize( inst );
5010
			this._setDate( inst, date );
5011
			this._updateAlternate( inst );
5012
			this._updateDatepicker( inst );
5013
		}
5014
	},
5015
5016
	// Change method deprecated
5017
	_changeDatepicker: function( target, name, value ) {
5018
		this._optionDatepicker( target, name, value );
5019
	},
5020
5021
	/* Redraw the date picker attached to an input field or division.
5022
	 * @param  target  element - the target input field or division or span
5023
	 */
5024
	_refreshDatepicker: function( target ) {
5025
		var inst = this._getInst( target );
5026
		if ( inst ) {
5027
			this._updateDatepicker( inst );
5028
		}
5029
	},
5030
5031
	/* Set the dates for a jQuery selection.
5032
	 * @param  target element - the target input field or division or span
5033
	 * @param  date	Date - the new date
5034
	 */
5035
	_setDateDatepicker: function( target, date ) {
5036
		var inst = this._getInst( target );
5037
		if ( inst ) {
5038
			this._setDate( inst, date );
5039
			this._updateDatepicker( inst );
5040
			this._updateAlternate( inst );
5041
		}
5042
	},
5043
5044
	/* Get the date(s) for the first entry in a jQuery selection.
5045
	 * @param  target element - the target input field or division or span
5046
	 * @param  noDefault boolean - true if no default date is to be used
5047
	 * @return Date - the current date
5048
	 */
5049
	_getDateDatepicker: function( target, noDefault ) {
5050
		var inst = this._getInst( target );
5051
		if ( inst && !inst.inline ) {
5052
			this._setDateFromField( inst, noDefault );
5053
		}
5054
		return ( inst ? this._getDate( inst ) : null );
5055
	},
5056
5057
	/* Handle keystrokes. */
5058
	_doKeyDown: function( event ) {
5059
		var onSelect, dateStr, sel,
5060
			inst = $.datepicker._getInst( event.target ),
5061
			handled = true,
5062
			isRTL = inst.dpDiv.is( ".ui-datepicker-rtl" );
5063
5064
		inst._keyEvent = true;
5065
		if ( $.datepicker._datepickerShowing ) {
5066
			switch ( event.keyCode ) {
5067
				case 9: $.datepicker._hideDatepicker();
5068
						handled = false;
5069
						break; // hide on tab out
5070
				case 13: sel = $( "td." + $.datepicker._dayOverClass + ":not(." +
5071
									$.datepicker._currentClass + ")", inst.dpDiv );
5072
						if ( sel[ 0 ] ) {
5073
							$.datepicker._selectDay( event.target, inst.selectedMonth, inst.selectedYear, sel[ 0 ] );
5074
						}
5075
5076
						onSelect = $.datepicker._get( inst, "onSelect" );
5077
						if ( onSelect ) {
5078
							dateStr = $.datepicker._formatDate( inst );
5079
5080
							// Trigger custom callback
5081
							onSelect.apply( ( inst.input ? inst.input[ 0 ] : null ), [ dateStr, inst ] );
5082
						} else {
5083
							$.datepicker._hideDatepicker();
5084
						}
5085
5086
						return false; // don't submit the form
5087
				case 27: $.datepicker._hideDatepicker();
5088
						break; // hide on escape
5089
				case 33: $.datepicker._adjustDate( event.target, ( event.ctrlKey ?
5090
							-$.datepicker._get( inst, "stepBigMonths" ) :
5091
							-$.datepicker._get( inst, "stepMonths" ) ), "M" );
5092
						break; // previous month/year on page up/+ ctrl
5093
				case 34: $.datepicker._adjustDate( event.target, ( event.ctrlKey ?
5094
							+$.datepicker._get( inst, "stepBigMonths" ) :
5095
							+$.datepicker._get( inst, "stepMonths" ) ), "M" );
5096
						break; // next month/year on page down/+ ctrl
5097
				case 35: if ( event.ctrlKey || event.metaKey ) {
5098
							$.datepicker._clearDate( event.target );
5099
						}
5100
						handled = event.ctrlKey || event.metaKey;
5101
						break; // clear on ctrl or command +end
5102
				case 36: if ( event.ctrlKey || event.metaKey ) {
5103
							$.datepicker._gotoToday( event.target );
5104
						}
5105
						handled = event.ctrlKey || event.metaKey;
5106
						break; // current on ctrl or command +home
5107
				case 37: if ( event.ctrlKey || event.metaKey ) {
5108
							$.datepicker._adjustDate( event.target, ( isRTL ? +1 : -1 ), "D" );
5109
						}
5110
						handled = event.ctrlKey || event.metaKey;
5111
5112
						// -1 day on ctrl or command +left
5113
						if ( event.originalEvent.altKey ) {
5114
							$.datepicker._adjustDate( event.target, ( event.ctrlKey ?
5115
								-$.datepicker._get( inst, "stepBigMonths" ) :
5116
								-$.datepicker._get( inst, "stepMonths" ) ), "M" );
5117
						}
5118
5119
						// next month/year on alt +left on Mac
5120
						break;
5121
				case 38: if ( event.ctrlKey || event.metaKey ) {
5122
							$.datepicker._adjustDate( event.target, -7, "D" );
5123
						}
5124
						handled = event.ctrlKey || event.metaKey;
5125
						break; // -1 week on ctrl or command +up
5126
				case 39: if ( event.ctrlKey || event.metaKey ) {
5127
							$.datepicker._adjustDate( event.target, ( isRTL ? -1 : +1 ), "D" );
5128
						}
5129
						handled = event.ctrlKey || event.metaKey;
5130
5131
						// +1 day on ctrl or command +right
5132
						if ( event.originalEvent.altKey ) {
5133
							$.datepicker._adjustDate( event.target, ( event.ctrlKey ?
5134
								+$.datepicker._get( inst, "stepBigMonths" ) :
5135
								+$.datepicker._get( inst, "stepMonths" ) ), "M" );
5136
						}
5137
5138
						// next month/year on alt +right
5139
						break;
5140
				case 40: if ( event.ctrlKey || event.metaKey ) {
5141
							$.datepicker._adjustDate( event.target, +7, "D" );
5142
						}
5143
						handled = event.ctrlKey || event.metaKey;
5144
						break; // +1 week on ctrl or command +down
5145
				default: handled = false;
5146
			}
5147
		} else if ( event.keyCode === 36 && event.ctrlKey ) { // display the date picker on ctrl+home
5148
			$.datepicker._showDatepicker( this );
5149
		} else {
5150
			handled = false;
5151
		}
5152
5153
		if ( handled ) {
5154
			event.preventDefault();
5155
			event.stopPropagation();
5156
		}
5157
	},
5158
5159
	/* Filter entered characters - based on date format. */
5160
	_doKeyPress: function( event ) {
5161
		var chars, chr,
5162
			inst = $.datepicker._getInst( event.target );
5163
5164
		if ( $.datepicker._get( inst, "constrainInput" ) ) {
5165
			chars = $.datepicker._possibleChars( $.datepicker._get( inst, "dateFormat" ) );
5166
			chr = String.fromCharCode( event.charCode == null ? event.keyCode : event.charCode );
5167
			return event.ctrlKey || event.metaKey || ( chr < " " || !chars || chars.indexOf( chr ) > -1 );
5168
		}
5169
	},
5170
5171
	/* Synchronise manual entry and field/alternate field. */
5172
	_doKeyUp: function( event ) {
5173
		var date,
5174
			inst = $.datepicker._getInst( event.target );
5175
5176
		if ( inst.input.val() !== inst.lastVal ) {
5177
			try {
5178
				date = $.datepicker.parseDate( $.datepicker._get( inst, "dateFormat" ),
5179
					( inst.input ? inst.input.val() : null ),
5180
					$.datepicker._getFormatConfig( inst ) );
5181
5182
				if ( date ) { // only if valid
5183
					$.datepicker._setDateFromField( inst );
5184
					$.datepicker._updateAlternate( inst );
5185
					$.datepicker._updateDatepicker( inst );
5186
				}
5187
			}
5188
			catch ( err ) {
5189
			}
5190
		}
5191
		return true;
5192
	},
5193
5194
	/* Pop-up the date picker for a given input field.
5195
	 * If false returned from beforeShow event handler do not show.
5196
	 * @param  input  element - the input field attached to the date picker or
5197
	 *					event - if triggered by focus
5198
	 */
5199
	_showDatepicker: function( input ) {
5200
		input = input.target || input;
5201
		if ( input.nodeName.toLowerCase() !== "input" ) { // find from button/image trigger
5202
			input = $( "input", input.parentNode )[ 0 ];
5203
		}
5204
5205
		if ( $.datepicker._isDisabledDatepicker( input ) || $.datepicker._lastInput === input ) { // already here
5206
			return;
5207
		}
5208
5209
		var inst, beforeShow, beforeShowSettings, isFixed,
5210
			offset, showAnim, duration;
5211
5212
		inst = $.datepicker._getInst( input );
5213
		if ( $.datepicker._curInst && $.datepicker._curInst !== inst ) {
5214
			$.datepicker._curInst.dpDiv.stop( true, true );
5215
			if ( inst && $.datepicker._datepickerShowing ) {
5216
				$.datepicker._hideDatepicker( $.datepicker._curInst.input[ 0 ] );
5217
			}
5218
		}
5219
5220
		beforeShow = $.datepicker._get( inst, "beforeShow" );
5221
		beforeShowSettings = beforeShow ? beforeShow.apply( input, [ input, inst ] ) : {};
5222
		if ( beforeShowSettings === false ) {
5223
			return;
5224
		}
5225
		datepicker_extendRemove( inst.settings, beforeShowSettings );
5226
5227
		inst.lastVal = null;
5228
		$.datepicker._lastInput = input;
5229
		$.datepicker._setDateFromField( inst );
5230
5231
		if ( $.datepicker._inDialog ) { // hide cursor
5232
			input.value = "";
5233
		}
5234
		if ( !$.datepicker._pos ) { // position below input
5235
			$.datepicker._pos = $.datepicker._findPos( input );
5236
			$.datepicker._pos[ 1 ] += input.offsetHeight; // add the height
5237
		}
5238
5239
		isFixed = false;
5240
		$( input ).parents().each( function() {
5241
			isFixed |= $( this ).css( "position" ) === "fixed";
5242
			return !isFixed;
5243
		} );
5244
5245
		offset = { left: $.datepicker._pos[ 0 ], top: $.datepicker._pos[ 1 ] };
5246
		$.datepicker._pos = null;
5247
5248
		//to avoid flashes on Firefox
5249
		inst.dpDiv.empty();
5250
5251
		// determine sizing offscreen
5252
		inst.dpDiv.css( { position: "absolute", display: "block", top: "-1000px" } );
5253
		$.datepicker._updateDatepicker( inst );
5254
5255
		// fix width for dynamic number of date pickers
5256
		// and adjust position before showing
5257
		offset = $.datepicker._checkOffset( inst, offset, isFixed );
5258
		inst.dpDiv.css( { position: ( $.datepicker._inDialog && $.blockUI ?
5259
			"static" : ( isFixed ? "fixed" : "absolute" ) ), display: "none",
5260
			left: offset.left + "px", top: offset.top + "px" } );
5261
5262
		if ( !inst.inline ) {
5263
			showAnim = $.datepicker._get( inst, "showAnim" );
5264
			duration = $.datepicker._get( inst, "duration" );
5265
			inst.dpDiv.css( "z-index", datepicker_getZindex( $( input ) ) + 1 );
5266
			$.datepicker._datepickerShowing = true;
5267
5268
			if ( $.effects && $.effects.effect[ showAnim ] ) {
5269
				inst.dpDiv.show( showAnim, $.datepicker._get( inst, "showOptions" ), duration );
5270
			} else {
5271
				inst.dpDiv[ showAnim || "show" ]( showAnim ? duration : null );
5272
			}
5273
5274
			if ( $.datepicker._shouldFocusInput( inst ) ) {
5275
				inst.input.trigger( "focus" );
5276
			}
5277
5278
			$.datepicker._curInst = inst;
5279
		}
5280
	},
5281
5282
	/* Generate the date picker content. */
5283
	_updateDatepicker: function( inst ) {
5284
		this.maxRows = 4; //Reset the max number of rows being displayed (see #7043)
5285
		datepicker_instActive = inst; // for delegate hover events
5286
		inst.dpDiv.empty().append( this._generateHTML( inst ) );
5287
		this._attachHandlers( inst );
5288
5289
		var origyearshtml,
5290
			numMonths = this._getNumberOfMonths( inst ),
5291
			cols = numMonths[ 1 ],
5292
			width = 17,
5293
			activeCell = inst.dpDiv.find( "." + this._dayOverClass + " a" );
5294
5295
		if ( activeCell.length > 0 ) {
5296
			datepicker_handleMouseover.apply( activeCell.get( 0 ) );
5297
		}
5298
5299
		inst.dpDiv.removeClass( "ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4" ).width( "" );
5300
		if ( cols > 1 ) {
5301
			inst.dpDiv.addClass( "ui-datepicker-multi-" + cols ).css( "width", ( width * cols ) + "em" );
5302
		}
5303
		inst.dpDiv[ ( numMonths[ 0 ] !== 1 || numMonths[ 1 ] !== 1 ? "add" : "remove" ) +
5304
			"Class" ]( "ui-datepicker-multi" );
5305
		inst.dpDiv[ ( this._get( inst, "isRTL" ) ? "add" : "remove" ) +
5306
			"Class" ]( "ui-datepicker-rtl" );
5307
5308
		if ( inst === $.datepicker._curInst && $.datepicker._datepickerShowing && $.datepicker._shouldFocusInput( inst ) ) {
5309
			inst.input.trigger( "focus" );
5310
		}
5311
5312
		// Deffered render of the years select (to avoid flashes on Firefox)
5313
		if ( inst.yearshtml ) {
5314
			origyearshtml = inst.yearshtml;
5315
			setTimeout( function() {
5316
5317
				//assure that inst.yearshtml didn't change.
5318
				if ( origyearshtml === inst.yearshtml && inst.yearshtml ) {
5319
					inst.dpDiv.find( "select.ui-datepicker-year:first" ).replaceWith( inst.yearshtml );
5320
				}
5321
				origyearshtml = inst.yearshtml = null;
5322
			}, 0 );
5323
		}
5324
	},
5325
5326
	// #6694 - don't focus the input if it's already focused
5327
	// this breaks the change event in IE
5328
	// Support: IE and jQuery <1.9
5329
	_shouldFocusInput: function( inst ) {
5330
		return inst.input && inst.input.is( ":visible" ) && !inst.input.is( ":disabled" ) && !inst.input.is( ":focus" );
5331
	},
5332
5333
	/* Check positioning to remain on screen. */
5334
	_checkOffset: function( inst, offset, isFixed ) {
5335
		var dpWidth = inst.dpDiv.outerWidth(),
5336
			dpHeight = inst.dpDiv.outerHeight(),
5337
			inputWidth = inst.input ? inst.input.outerWidth() : 0,
5338
			inputHeight = inst.input ? inst.input.outerHeight() : 0,
5339
			viewWidth = document.documentElement.clientWidth + ( isFixed ? 0 : $( document ).scrollLeft() ),
5340
			viewHeight = document.documentElement.clientHeight + ( isFixed ? 0 : $( document ).scrollTop() );
5341
5342
		offset.left -= ( this._get( inst, "isRTL" ) ? ( dpWidth - inputWidth ) : 0 );
5343
		offset.left -= ( isFixed && offset.left === inst.input.offset().left ) ? $( document ).scrollLeft() : 0;
5344
		offset.top -= ( isFixed && offset.top === ( inst.input.offset().top + inputHeight ) ) ? $( document ).scrollTop() : 0;
5345
5346
		// Now check if datepicker is showing outside window viewport - move to a better place if so.
5347
		offset.left -= Math.min( offset.left, ( offset.left + dpWidth > viewWidth && viewWidth > dpWidth ) ?
5348
			Math.abs( offset.left + dpWidth - viewWidth ) : 0 );
5349
		offset.top -= Math.min( offset.top, ( offset.top + dpHeight > viewHeight && viewHeight > dpHeight ) ?
5350
			Math.abs( dpHeight + inputHeight ) : 0 );
5351
5352
		return offset;
5353
	},
5354
5355
	/* Find an object's position on the screen. */
5356
	_findPos: function( obj ) {
5357
		var position,
5358
			inst = this._getInst( obj ),
5359
			isRTL = this._get( inst, "isRTL" );
5360
5361
		while ( obj && ( obj.type === "hidden" || obj.nodeType !== 1 || $.expr.filters.hidden( obj ) ) ) {
5362
			obj = obj[ isRTL ? "previousSibling" : "nextSibling" ];
5363
		}
5364
5365
		position = $( obj ).offset();
5366
		return [ position.left, position.top ];
5367
	},
5368
5369
	/* Hide the date picker from view.
5370
	 * @param  input  element - the input field attached to the date picker
5371
	 */
5372
	_hideDatepicker: function( input ) {
5373
		var showAnim, duration, postProcess, onClose,
5374
			inst = this._curInst;
5375
5376
		if ( !inst || ( input && inst !== $.data( input, "datepicker" ) ) ) {
5377
			return;
5378
		}
5379
5380
		if ( this._datepickerShowing ) {
5381
			showAnim = this._get( inst, "showAnim" );
5382
			duration = this._get( inst, "duration" );
5383
			postProcess = function() {
5384
				$.datepicker._tidyDialog( inst );
5385
			};
5386
5387
			// DEPRECATED: after BC for 1.8.x $.effects[ showAnim ] is not needed
5388
			if ( $.effects && ( $.effects.effect[ showAnim ] || $.effects[ showAnim ] ) ) {
5389
				inst.dpDiv.hide( showAnim, $.datepicker._get( inst, "showOptions" ), duration, postProcess );
5390
			} else {
5391
				inst.dpDiv[ ( showAnim === "slideDown" ? "slideUp" :
5392
					( showAnim === "fadeIn" ? "fadeOut" : "hide" ) ) ]( ( showAnim ? duration : null ), postProcess );
5393
			}
5394
5395
			if ( !showAnim ) {
5396
				postProcess();
5397
			}
5398
			this._datepickerShowing = false;
5399
5400
			onClose = this._get( inst, "onClose" );
5401
			if ( onClose ) {
5402
				onClose.apply( ( inst.input ? inst.input[ 0 ] : null ), [ ( inst.input ? inst.input.val() : "" ), inst ] );
5403
			}
5404
5405
			this._lastInput = null;
5406
			if ( this._inDialog ) {
5407
				this._dialogInput.css( { position: "absolute", left: "0", top: "-100px" } );
5408
				if ( $.blockUI ) {
5409
					$.unblockUI();
5410
					$( "body" ).append( this.dpDiv );
5411
				}
5412
			}
5413
			this._inDialog = false;
5414
		}
5415
	},
5416
5417
	/* Tidy up after a dialog display. */
5418
	_tidyDialog: function( inst ) {
5419
		inst.dpDiv.removeClass( this._dialogClass ).off( ".ui-datepicker-calendar" );
5420
	},
5421
5422
	/* Close date picker if clicked elsewhere. */
5423
	_checkExternalClick: function( event ) {
5424
		if ( !$.datepicker._curInst ) {
5425
			return;
5426
		}
5427
5428
		var $target = $( event.target ),
5429
			inst = $.datepicker._getInst( $target[ 0 ] );
5430
5431
		if ( ( ( $target[ 0 ].id !== $.datepicker._mainDivId &&
5432
				$target.parents( "#" + $.datepicker._mainDivId ).length === 0 &&
5433
				!$target.hasClass( $.datepicker.markerClassName ) &&
5434
				!$target.closest( "." + $.datepicker._triggerClass ).length &&
5435
				$.datepicker._datepickerShowing && !( $.datepicker._inDialog && $.blockUI ) ) ) ||
5436
			( $target.hasClass( $.datepicker.markerClassName ) && $.datepicker._curInst !== inst ) ) {
5437
				$.datepicker._hideDatepicker();
5438
		}
5439
	},
5440
5441
	/* Adjust one of the date sub-fields. */
5442
	_adjustDate: function( id, offset, period ) {
5443
		var target = $( id ),
5444
			inst = this._getInst( target[ 0 ] );
5445
5446
		if ( this._isDisabledDatepicker( target[ 0 ] ) ) {
5447
			return;
5448
		}
5449
		this._adjustInstDate( inst, offset +
5450
			( period === "M" ? this._get( inst, "showCurrentAtPos" ) : 0 ), // undo positioning
5451
			period );
5452
		this._updateDatepicker( inst );
5453
	},
5454
5455
	/* Action for current link. */
5456
	_gotoToday: function( id ) {
5457
		var date,
5458
			target = $( id ),
5459
			inst = this._getInst( target[ 0 ] );
5460
5461
		if ( this._get( inst, "gotoCurrent" ) && inst.currentDay ) {
5462
			inst.selectedDay = inst.currentDay;
5463
			inst.drawMonth = inst.selectedMonth = inst.currentMonth;
5464
			inst.drawYear = inst.selectedYear = inst.currentYear;
5465
		} else {
5466
			date = new Date();
5467
			inst.selectedDay = date.getDate();
5468
			inst.drawMonth = inst.selectedMonth = date.getMonth();
5469
			inst.drawYear = inst.selectedYear = date.getFullYear();
5470
		}
5471
		this._notifyChange( inst );
5472
		this._adjustDate( target );
5473
	},
5474
5475
	/* Action for selecting a new month/year. */
5476
	_selectMonthYear: function( id, select, period ) {
5477
		var target = $( id ),
5478
			inst = this._getInst( target[ 0 ] );
5479
5480
		inst[ "selected" + ( period === "M" ? "Month" : "Year" ) ] =
5481
		inst[ "draw" + ( period === "M" ? "Month" : "Year" ) ] =
5482
			parseInt( select.options[ select.selectedIndex ].value, 10 );
5483
5484
		this._notifyChange( inst );
5485
		this._adjustDate( target );
5486
	},
5487
5488
	/* Action for selecting a day. */
5489
	_selectDay: function( id, month, year, td ) {
5490
		var inst,
5491
			target = $( id );
5492
5493
		if ( $( td ).hasClass( this._unselectableClass ) || this._isDisabledDatepicker( target[ 0 ] ) ) {
5494
			return;
5495
		}
5496
5497
		inst = this._getInst( target[ 0 ] );
5498
		inst.selectedDay = inst.currentDay = $( "a", td ).html();
5499
		inst.selectedMonth = inst.currentMonth = month;
5500
		inst.selectedYear = inst.currentYear = year;
5501
		this._selectDate( id, this._formatDate( inst,
5502
			inst.currentDay, inst.currentMonth, inst.currentYear ) );
5503
	},
5504
5505
	/* Erase the input field and hide the date picker. */
5506
	_clearDate: function( id ) {
5507
		var target = $( id );
5508
		this._selectDate( target, "" );
5509
	},
5510
5511
	/* Update the input field with the selected date. */
5512
	_selectDate: function( id, dateStr ) {
5513
		var onSelect,
5514
			target = $( id ),
5515
			inst = this._getInst( target[ 0 ] );
5516
5517
		dateStr = ( dateStr != null ? dateStr : this._formatDate( inst ) );
5518
		if ( inst.input ) {
5519
			inst.input.val( dateStr );
5520
		}
5521
		this._updateAlternate( inst );
5522
5523
		onSelect = this._get( inst, "onSelect" );
5524
		if ( onSelect ) {
5525
			onSelect.apply( ( inst.input ? inst.input[ 0 ] : null ), [ dateStr, inst ] );  // trigger custom callback
5526
		} else if ( inst.input ) {
5527
			inst.input.trigger( "change" ); // fire the change event
5528
		}
5529
5530
		if ( inst.inline ) {
5531
			this._updateDatepicker( inst );
5532
		} else {
5533
			this._hideDatepicker();
5534
			this._lastInput = inst.input[ 0 ];
5535
			if ( typeof( inst.input[ 0 ] ) !== "object" ) {
5536
				inst.input.trigger( "focus" ); // restore focus
5537
			}
5538
			this._lastInput = null;
5539
		}
5540
	},
5541
5542
	/* Update any alternate field to synchronise with the main field. */
5543
	_updateAlternate: function( inst ) {
5544
		var altFormat, date, dateStr,
5545
			altField = this._get( inst, "altField" );
5546
5547
		if ( altField ) { // update alternate field too
5548
			altFormat = this._get( inst, "altFormat" ) || this._get( inst, "dateFormat" );
5549
			date = this._getDate( inst );
5550
			dateStr = this.formatDate( altFormat, date, this._getFormatConfig( inst ) );
5551
			$( altField ).val( dateStr );
5552
		}
5553
	},
5554
5555
	/* Set as beforeShowDay function to prevent selection of weekends.
5556
	 * @param  date  Date - the date to customise
5557
	 * @return [boolean, string] - is this date selectable?, what is its CSS class?
5558
	 */
5559
	noWeekends: function( date ) {
5560
		var day = date.getDay();
5561
		return [ ( day > 0 && day < 6 ), "" ];
5562
	},
5563
5564
	/* Set as calculateWeek to determine the week of the year based on the ISO 8601 definition.
5565
	 * @param  date  Date - the date to get the week for
5566
	 * @return  number - the number of the week within the year that contains this date
5567
	 */
5568
	iso8601Week: function( date ) {
5569
		var time,
5570
			checkDate = new Date( date.getTime() );
5571
5572
		// Find Thursday of this week starting on Monday
5573
		checkDate.setDate( checkDate.getDate() + 4 - ( checkDate.getDay() || 7 ) );
5574
5575
		time = checkDate.getTime();
5576
		checkDate.setMonth( 0 ); // Compare with Jan 1
5577
		checkDate.setDate( 1 );
5578
		return Math.floor( Math.round( ( time - checkDate ) / 86400000 ) / 7 ) + 1;
5579
	},
5580
5581
	/* Parse a string value into a date object.
5582
	 * See formatDate below for the possible formats.
5583
	 *
5584
	 * @param  format string - the expected format of the date
5585
	 * @param  value string - the date in the above format
5586
	 * @param  settings Object - attributes include:
5587
	 *					shortYearCutoff  number - the cutoff year for determining the century (optional)
5588
	 *					dayNamesShort	string[7] - abbreviated names of the days from Sunday (optional)
5589
	 *					dayNames		string[7] - names of the days from Sunday (optional)
5590
	 *					monthNamesShort string[12] - abbreviated names of the months (optional)
5591
	 *					monthNames		string[12] - names of the months (optional)
5592
	 * @return  Date - the extracted date value or null if value is blank
5593
	 */
5594
	parseDate: function( format, value, settings ) {
5595
		if ( format == null || value == null ) {
5596
			throw "Invalid arguments";
5597
		}
5598
5599
		value = ( typeof value === "object" ? value.toString() : value + "" );
5600
		if ( value === "" ) {
5601
			return null;
5602
		}
5603
5604
		var iFormat, dim, extra,
5605
			iValue = 0,
5606
			shortYearCutoffTemp = ( settings ? settings.shortYearCutoff : null ) || this._defaults.shortYearCutoff,
5607
			shortYearCutoff = ( typeof shortYearCutoffTemp !== "string" ? shortYearCutoffTemp :
5608
				new Date().getFullYear() % 100 + parseInt( shortYearCutoffTemp, 10 ) ),
5609
			dayNamesShort = ( settings ? settings.dayNamesShort : null ) || this._defaults.dayNamesShort,
5610
			dayNames = ( settings ? settings.dayNames : null ) || this._defaults.dayNames,
5611
			monthNamesShort = ( settings ? settings.monthNamesShort : null ) || this._defaults.monthNamesShort,
5612
			monthNames = ( settings ? settings.monthNames : null ) || this._defaults.monthNames,
5613
			year = -1,
5614
			month = -1,
5615
			day = -1,
5616
			doy = -1,
5617
			literal = false,
5618
			date,
5619
5620
			// Check whether a format character is doubled
5621
			lookAhead = function( match ) {
5622
				var matches = ( iFormat + 1 < format.length && format.charAt( iFormat + 1 ) === match );
5623
				if ( matches ) {
5624
					iFormat++;
5625
				}
5626
				return matches;
5627
			},
5628
5629
			// Extract a number from the string value
5630
			getNumber = function( match ) {
5631
				var isDoubled = lookAhead( match ),
5632
					size = ( match === "@" ? 14 : ( match === "!" ? 20 :
5633
					( match === "y" && isDoubled ? 4 : ( match === "o" ? 3 : 2 ) ) ) ),
5634
					minSize = ( match === "y" ? size : 1 ),
5635
					digits = new RegExp( "^\\d{" + minSize + "," + size + "}" ),
5636
					num = value.substring( iValue ).match( digits );
5637
				if ( !num ) {
5638
					throw "Missing number at position " + iValue;
5639
				}
5640
				iValue += num[ 0 ].length;
5641
				return parseInt( num[ 0 ], 10 );
5642
			},
5643
5644
			// Extract a name from the string value and convert to an index
5645
			getName = function( match, shortNames, longNames ) {
5646
				var index = -1,
5647
					names = $.map( lookAhead( match ) ? longNames : shortNames, function( v, k ) {
5648
						return [ [ k, v ] ];
5649
					} ).sort( function( a, b ) {
5650
						return -( a[ 1 ].length - b[ 1 ].length );
5651
					} );
5652
5653
				$.each( names, function( i, pair ) {
5654
					var name = pair[ 1 ];
5655
					if ( value.substr( iValue, name.length ).toLowerCase() === name.toLowerCase() ) {
5656
						index = pair[ 0 ];
5657
						iValue += name.length;
5658
						return false;
5659
					}
5660
				} );
5661
				if ( index !== -1 ) {
5662
					return index + 1;
5663
				} else {
5664
					throw "Unknown name at position " + iValue;
5665
				}
5666
			},
5667
5668
			// Confirm that a literal character matches the string value
5669
			checkLiteral = function() {
5670
				if ( value.charAt( iValue ) !== format.charAt( iFormat ) ) {
5671
					throw "Unexpected literal at position " + iValue;
5672
				}
5673
				iValue++;
5674
			};
5675
5676
		for ( iFormat = 0; iFormat < format.length; iFormat++ ) {
5677
			if ( literal ) {
5678
				if ( format.charAt( iFormat ) === "'" && !lookAhead( "'" ) ) {
5679
					literal = false;
5680
				} else {
5681
					checkLiteral();
5682
				}
5683
			} else {
5684
				switch ( format.charAt( iFormat ) ) {
5685
					case "d":
5686
						day = getNumber( "d" );
5687
						break;
5688
					case "D":
5689
						getName( "D", dayNamesShort, dayNames );
5690
						break;
5691
					case "o":
5692
						doy = getNumber( "o" );
5693
						break;
5694
					case "m":
5695
						month = getNumber( "m" );
5696
						break;
5697
					case "M":
5698
						month = getName( "M", monthNamesShort, monthNames );
5699
						break;
5700
					case "y":
5701
						year = getNumber( "y" );
5702
						break;
5703
					case "@":
5704
						date = new Date( getNumber( "@" ) );
5705
						year = date.getFullYear();
5706
						month = date.getMonth() + 1;
5707
						day = date.getDate();
5708
						break;
5709
					case "!":
5710
						date = new Date( ( getNumber( "!" ) - this._ticksTo1970 ) / 10000 );
5711
						year = date.getFullYear();
5712
						month = date.getMonth() + 1;
5713
						day = date.getDate();
5714
						break;
5715
					case "'":
5716
						if ( lookAhead( "'" ) ) {
5717
							checkLiteral();
5718
						} else {
5719
							literal = true;
5720
						}
5721
						break;
5722
					default:
5723
						checkLiteral();
5724
				}
5725
			}
5726
		}
5727
5728
		if ( iValue < value.length ) {
5729
			extra = value.substr( iValue );
5730
			if ( !/^\s+/.test( extra ) ) {
5731
				throw "Extra/unparsed characters found in date: " + extra;
5732
			}
5733
		}
5734
5735
		if ( year === -1 ) {
5736
			year = new Date().getFullYear();
5737
		} else if ( year < 100 ) {
5738
			year += new Date().getFullYear() - new Date().getFullYear() % 100 +
5739
				( year <= shortYearCutoff ? 0 : -100 );
5740
		}
5741
5742
		if ( doy > -1 ) {
5743
			month = 1;
5744
			day = doy;
5745
			do {
5746
				dim = this._getDaysInMonth( year, month - 1 );
5747
				if ( day <= dim ) {
5748
					break;
5749
				}
5750
				month++;
5751
				day -= dim;
5752
			} while ( true );
5753
		}
5754
5755
		date = this._daylightSavingAdjust( new Date( year, month - 1, day ) );
5756
		if ( date.getFullYear() !== year || date.getMonth() + 1 !== month || date.getDate() !== day ) {
5757
			throw "Invalid date"; // E.g. 31/02/00
5758
		}
5759
		return date;
5760
	},
5761
5762
	/* Standard date formats. */
5763
	ATOM: "yy-mm-dd", // RFC 3339 (ISO 8601)
5764
	COOKIE: "D, dd M yy",
5765
	ISO_8601: "yy-mm-dd",
5766
	RFC_822: "D, d M y",
5767
	RFC_850: "DD, dd-M-y",
5768
	RFC_1036: "D, d M y",
5769
	RFC_1123: "D, d M yy",
5770
	RFC_2822: "D, d M yy",
5771
	RSS: "D, d M y", // RFC 822
5772
	TICKS: "!",
5773
	TIMESTAMP: "@",
5774
	W3C: "yy-mm-dd", // ISO 8601
5775
5776
	_ticksTo1970: ( ( ( 1970 - 1 ) * 365 + Math.floor( 1970 / 4 ) - Math.floor( 1970 / 100 ) +
5777
		Math.floor( 1970 / 400 ) ) * 24 * 60 * 60 * 10000000 ),
5778
5779
	/* Format a date object into a string value.
5780
	 * The format can be combinations of the following:
5781
	 * d  - day of month (no leading zero)
5782
	 * dd - day of month (two digit)
5783
	 * o  - day of year (no leading zeros)
5784
	 * oo - day of year (three digit)
5785
	 * D  - day name short
5786
	 * DD - day name long
5787
	 * m  - month of year (no leading zero)
5788
	 * mm - month of year (two digit)
5789
	 * M  - month name short
5790
	 * MM - month name long
5791
	 * y  - year (two digit)
5792
	 * yy - year (four digit)
5793
	 * @ - Unix timestamp (ms since 01/01/1970)
5794
	 * ! - Windows ticks (100ns since 01/01/0001)
5795
	 * "..." - literal text
5796
	 * '' - single quote
5797
	 *
5798
	 * @param  format string - the desired format of the date
5799
	 * @param  date Date - the date value to format
5800
	 * @param  settings Object - attributes include:
5801
	 *					dayNamesShort	string[7] - abbreviated names of the days from Sunday (optional)
5802
	 *					dayNames		string[7] - names of the days from Sunday (optional)
5803
	 *					monthNamesShort string[12] - abbreviated names of the months (optional)
5804
	 *					monthNames		string[12] - names of the months (optional)
5805
	 * @return  string - the date in the above format
5806
	 */
5807
	formatDate: function( format, date, settings ) {
5808
		if ( !date ) {
5809
			return "";
5810
		}
5811
5812
		var iFormat,
5813
			dayNamesShort = ( settings ? settings.dayNamesShort : null ) || this._defaults.dayNamesShort,
5814
			dayNames = ( settings ? settings.dayNames : null ) || this._defaults.dayNames,
5815
			monthNamesShort = ( settings ? settings.monthNamesShort : null ) || this._defaults.monthNamesShort,
5816
			monthNames = ( settings ? settings.monthNames : null ) || this._defaults.monthNames,
5817
5818
			// Check whether a format character is doubled
5819
			lookAhead = function( match ) {
5820
				var matches = ( iFormat + 1 < format.length && format.charAt( iFormat + 1 ) === match );
5821
				if ( matches ) {
5822
					iFormat++;
5823
				}
5824
				return matches;
5825
			},
5826
5827
			// Format a number, with leading zero if necessary
5828
			formatNumber = function( match, value, len ) {
5829
				var num = "" + value;
5830
				if ( lookAhead( match ) ) {
5831
					while ( num.length < len ) {
5832
						num = "0" + num;
5833
					}
5834
				}
5835
				return num;
5836
			},
5837
5838
			// Format a name, short or long as requested
5839
			formatName = function( match, value, shortNames, longNames ) {
5840
				return ( lookAhead( match ) ? longNames[ value ] : shortNames[ value ] );
5841
			},
5842
			output = "",
5843
			literal = false;
5844
5845
		if ( date ) {
5846
			for ( iFormat = 0; iFormat < format.length; iFormat++ ) {
5847
				if ( literal ) {
5848
					if ( format.charAt( iFormat ) === "'" && !lookAhead( "'" ) ) {
5849
						literal = false;
5850
					} else {
5851
						output += format.charAt( iFormat );
5852
					}
5853
				} else {
5854
					switch ( format.charAt( iFormat ) ) {
5855
						case "d":
5856
							output += formatNumber( "d", date.getDate(), 2 );
5857
							break;
5858
						case "D":
5859
							output += formatName( "D", date.getDay(), dayNamesShort, dayNames );
5860
							break;
5861
						case "o":
5862
							output += formatNumber( "o",
5863
								Math.round( ( new Date( date.getFullYear(), date.getMonth(), date.getDate() ).getTime() - new Date( date.getFullYear(), 0, 0 ).getTime() ) / 86400000 ), 3 );
5864
							break;
5865
						case "m":
5866
							output += formatNumber( "m", date.getMonth() + 1, 2 );
5867
							break;
5868
						case "M":
5869
							output += formatName( "M", date.getMonth(), monthNamesShort, monthNames );
5870
							break;
5871
						case "y":
5872
							output += ( lookAhead( "y" ) ? date.getFullYear() :
5873
								( date.getFullYear() % 100 < 10 ? "0" : "" ) + date.getFullYear() % 100 );
5874
							break;
5875
						case "@":
5876
							output += date.getTime();
5877
							break;
5878
						case "!":
5879
							output += date.getTime() * 10000 + this._ticksTo1970;
5880
							break;
5881
						case "'":
5882
							if ( lookAhead( "'" ) ) {
5883
								output += "'";
5884
							} else {
5885
								literal = true;
5886
							}
5887
							break;
5888
						default:
5889
							output += format.charAt( iFormat );
5890
					}
5891
				}
5892
			}
5893
		}
5894
		return output;
5895
	},
5896
5897
	/* Extract all possible characters from the date format. */
5898
	_possibleChars: function( format ) {
5899
		var iFormat,
5900
			chars = "",
5901
			literal = false,
5902
5903
			// Check whether a format character is doubled
5904
			lookAhead = function( match ) {
5905
				var matches = ( iFormat + 1 < format.length && format.charAt( iFormat + 1 ) === match );
5906
				if ( matches ) {
5907
					iFormat++;
5908
				}
5909
				return matches;
5910
			};
5911
5912
		for ( iFormat = 0; iFormat < format.length; iFormat++ ) {
5913
			if ( literal ) {
5914
				if ( format.charAt( iFormat ) === "'" && !lookAhead( "'" ) ) {
5915
					literal = false;
5916
				} else {
5917
					chars += format.charAt( iFormat );
5918
				}
5919
			} else {
5920
				switch ( format.charAt( iFormat ) ) {
5921
					case "d": case "m": case "y": case "@":
5922
						chars += "0123456789";
5923
						break;
5924
					case "D": case "M":
5925
						return null; // Accept anything
5926
					case "'":
5927
						if ( lookAhead( "'" ) ) {
5928
							chars += "'";
5929
						} else {
5930
							literal = true;
5931
						}
5932
						break;
5933
					default:
5934
						chars += format.charAt( iFormat );
5935
				}
5936
			}
5937
		}
5938
		return chars;
5939
	},
5940
5941
	/* Get a setting value, defaulting if necessary. */
5942
	_get: function( inst, name ) {
5943
		return inst.settings[ name ] !== undefined ?
5944
			inst.settings[ name ] : this._defaults[ name ];
5945
	},
5946
5947
	/* Parse existing date and initialise date picker. */
5948
	_setDateFromField: function( inst, noDefault ) {
5949
		if ( inst.input.val() === inst.lastVal ) {
5950
			return;
5951
		}
5952
5953
		var dateFormat = this._get( inst, "dateFormat" ),
5954
			dates = inst.lastVal = inst.input ? inst.input.val() : null,
5955
			defaultDate = this._getDefaultDate( inst ),
5956
			date = defaultDate,
5957
			settings = this._getFormatConfig( inst );
5958
5959
		try {
5960
			date = this.parseDate( dateFormat, dates, settings ) || defaultDate;
5961
		} catch ( event ) {
5962
			dates = ( noDefault ? "" : dates );
5963
		}
5964
		inst.selectedDay = date.getDate();
5965
		inst.drawMonth = inst.selectedMonth = date.getMonth();
5966
		inst.drawYear = inst.selectedYear = date.getFullYear();
5967
		inst.currentDay = ( dates ? date.getDate() : 0 );
5968
		inst.currentMonth = ( dates ? date.getMonth() : 0 );
5969
		inst.currentYear = ( dates ? date.getFullYear() : 0 );
5970
		this._adjustInstDate( inst );
5971
	},
5972
5973
	/* Retrieve the default date shown on opening. */
5974
	_getDefaultDate: function( inst ) {
5975
		return this._restrictMinMax( inst,
5976
			this._determineDate( inst, this._get( inst, "defaultDate" ), new Date() ) );
5977
	},
5978
5979
	/* A date may be specified as an exact value or a relative one. */
5980
	_determineDate: function( inst, date, defaultDate ) {
5981
		var offsetNumeric = function( offset ) {
5982
				var date = new Date();
5983
				date.setDate( date.getDate() + offset );
5984
				return date;
5985
			},
5986
			offsetString = function( offset ) {
5987
				try {
5988
					return $.datepicker.parseDate( $.datepicker._get( inst, "dateFormat" ),
5989
						offset, $.datepicker._getFormatConfig( inst ) );
5990
				}
5991
				catch ( e ) {
5992
5993
					// Ignore
5994
				}
5995
5996
				var date = ( offset.toLowerCase().match( /^c/ ) ?
5997
					$.datepicker._getDate( inst ) : null ) || new Date(),
5998
					year = date.getFullYear(),
5999
					month = date.getMonth(),
6000
					day = date.getDate(),
6001
					pattern = /([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,
6002
					matches = pattern.exec( offset );
6003
6004
				while ( matches ) {
6005
					switch ( matches[ 2 ] || "d" ) {
6006
						case "d" : case "D" :
6007
							day += parseInt( matches[ 1 ], 10 ); break;
6008
						case "w" : case "W" :
6009
							day += parseInt( matches[ 1 ], 10 ) * 7; break;
6010
						case "m" : case "M" :
6011
							month += parseInt( matches[ 1 ], 10 );
6012
							day = Math.min( day, $.datepicker._getDaysInMonth( year, month ) );
6013
							break;
6014
						case "y": case "Y" :
6015
							year += parseInt( matches[ 1 ], 10 );
6016
							day = Math.min( day, $.datepicker._getDaysInMonth( year, month ) );
6017
							break;
6018
					}
6019
					matches = pattern.exec( offset );
6020
				}
6021
				return new Date( year, month, day );
6022
			},
6023
			newDate = ( date == null || date === "" ? defaultDate : ( typeof date === "string" ? offsetString( date ) :
6024
				( typeof date === "number" ? ( isNaN( date ) ? defaultDate : offsetNumeric( date ) ) : new Date( date.getTime() ) ) ) );
6025
6026
		newDate = ( newDate && newDate.toString() === "Invalid Date" ? defaultDate : newDate );
6027
		if ( newDate ) {
6028
			newDate.setHours( 0 );
6029
			newDate.setMinutes( 0 );
6030
			newDate.setSeconds( 0 );
6031
			newDate.setMilliseconds( 0 );
6032
		}
6033
		return this._daylightSavingAdjust( newDate );
6034
	},
6035
6036
	/* Handle switch to/from daylight saving.
6037
	 * Hours may be non-zero on daylight saving cut-over:
6038
	 * > 12 when midnight changeover, but then cannot generate
6039
	 * midnight datetime, so jump to 1AM, otherwise reset.
6040
	 * @param  date  (Date) the date to check
6041
	 * @return  (Date) the corrected date
6042
	 */
6043
	_daylightSavingAdjust: function( date ) {
6044
		if ( !date ) {
6045
			return null;
6046
		}
6047
		date.setHours( date.getHours() > 12 ? date.getHours() + 2 : 0 );
6048
		return date;
6049
	},
6050
6051
	/* Set the date(s) directly. */
6052
	_setDate: function( inst, date, noChange ) {
6053
		var clear = !date,
6054
			origMonth = inst.selectedMonth,
6055
			origYear = inst.selectedYear,
6056
			newDate = this._restrictMinMax( inst, this._determineDate( inst, date, new Date() ) );
6057
6058
		inst.selectedDay = inst.currentDay = newDate.getDate();
6059
		inst.drawMonth = inst.selectedMonth = inst.currentMonth = newDate.getMonth();
6060
		inst.drawYear = inst.selectedYear = inst.currentYear = newDate.getFullYear();
6061
		if ( ( origMonth !== inst.selectedMonth || origYear !== inst.selectedYear ) && !noChange ) {
6062
			this._notifyChange( inst );
6063
		}
6064
		this._adjustInstDate( inst );
6065
		if ( inst.input ) {
6066
			inst.input.val( clear ? "" : this._formatDate( inst ) );
6067
		}
6068
	},
6069
6070
	/* Retrieve the date(s) directly. */
6071
	_getDate: function( inst ) {
6072
		var startDate = ( !inst.currentYear || ( inst.input && inst.input.val() === "" ) ? null :
6073
			this._daylightSavingAdjust( new Date(
6074
			inst.currentYear, inst.currentMonth, inst.currentDay ) ) );
6075
			return startDate;
6076
	},
6077
6078
	/* Attach the onxxx handlers.  These are declared statically so
6079
	 * they work with static code transformers like Caja.
6080
	 */
6081
	_attachHandlers: function( inst ) {
6082
		var stepMonths = this._get( inst, "stepMonths" ),
6083
			id = "#" + inst.id.replace( /\\\\/g, "\\" );
6084
		inst.dpDiv.find( "[data-handler]" ).map( function() {
6085
			var handler = {
6086
				prev: function() {
6087
					$.datepicker._adjustDate( id, -stepMonths, "M" );
6088
				},
6089
				next: function() {
6090
					$.datepicker._adjustDate( id, +stepMonths, "M" );
6091
				},
6092
				hide: function() {
6093
					$.datepicker._hideDatepicker();
6094
				},
6095
				today: function() {
6096
					$.datepicker._gotoToday( id );
6097
				},
6098
				selectDay: function() {
6099
					$.datepicker._selectDay( id, +this.getAttribute( "data-month" ), +this.getAttribute( "data-year" ), this );
6100
					return false;
6101
				},
6102
				selectMonth: function() {
6103
					$.datepicker._selectMonthYear( id, this, "M" );
6104
					return false;
6105
				},
6106
				selectYear: function() {
6107
					$.datepicker._selectMonthYear( id, this, "Y" );
6108
					return false;
6109
				}
6110
			};
6111
			$( this ).on( this.getAttribute( "data-event" ), handler[ this.getAttribute( "data-handler" ) ] );
6112
		} );
6113
	},
6114
6115
	/* Generate the HTML for the current state of the date picker. */
6116
	_generateHTML: function( inst ) {
6117
		var maxDraw, prevText, prev, nextText, next, currentText, gotoDate,
6118
			controls, buttonPanel, firstDay, showWeek, dayNames, dayNamesMin,
6119
			monthNames, monthNamesShort, beforeShowDay, showOtherMonths,
6120
			selectOtherMonths, defaultDate, html, dow, row, group, col, selectedDate,
6121
			cornerClass, calender, thead, day, daysInMonth, leadDays, curRows, numRows,
6122
			printDate, dRow, tbody, daySettings, otherMonth, unselectable,
6123
			tempDate = new Date(),
6124
			today = this._daylightSavingAdjust(
6125
				new Date( tempDate.getFullYear(), tempDate.getMonth(), tempDate.getDate() ) ), // clear time
6126
			isRTL = this._get( inst, "isRTL" ),
6127
			showButtonPanel = this._get( inst, "showButtonPanel" ),
6128
			hideIfNoPrevNext = this._get( inst, "hideIfNoPrevNext" ),
6129
			navigationAsDateFormat = this._get( inst, "navigationAsDateFormat" ),
6130
			numMonths = this._getNumberOfMonths( inst ),
6131
			showCurrentAtPos = this._get( inst, "showCurrentAtPos" ),
6132
			stepMonths = this._get( inst, "stepMonths" ),
6133
			isMultiMonth = ( numMonths[ 0 ] !== 1 || numMonths[ 1 ] !== 1 ),
6134
			currentDate = this._daylightSavingAdjust( ( !inst.currentDay ? new Date( 9999, 9, 9 ) :
6135
				new Date( inst.currentYear, inst.currentMonth, inst.currentDay ) ) ),
6136
			minDate = this._getMinMaxDate( inst, "min" ),
6137
			maxDate = this._getMinMaxDate( inst, "max" ),
6138
			drawMonth = inst.drawMonth - showCurrentAtPos,
6139
			drawYear = inst.drawYear;
6140
6141
		if ( drawMonth < 0 ) {
6142
			drawMonth += 12;
6143
			drawYear--;
6144
		}
6145
		if ( maxDate ) {
6146
			maxDraw = this._daylightSavingAdjust( new Date( maxDate.getFullYear(),
6147
				maxDate.getMonth() - ( numMonths[ 0 ] * numMonths[ 1 ] ) + 1, maxDate.getDate() ) );
6148
			maxDraw = ( minDate && maxDraw < minDate ? minDate : maxDraw );
6149
			while ( this._daylightSavingAdjust( new Date( drawYear, drawMonth, 1 ) ) > maxDraw ) {
6150
				drawMonth--;
6151
				if ( drawMonth < 0 ) {
6152
					drawMonth = 11;
6153
					drawYear--;
6154
				}
6155
			}
6156
		}
6157
		inst.drawMonth = drawMonth;
6158
		inst.drawYear = drawYear;
6159
6160
		prevText = this._get( inst, "prevText" );
6161
		prevText = ( !navigationAsDateFormat ? prevText : this.formatDate( prevText,
6162
			this._daylightSavingAdjust( new Date( drawYear, drawMonth - stepMonths, 1 ) ),
6163
			this._getFormatConfig( inst ) ) );
6164
6165
		prev = ( this._canAdjustMonth( inst, -1, drawYear, drawMonth ) ?
6166
			"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click'" +
6167
			" title='" + prevText + "'><span class='ui-icon ui-icon-circle-triangle-" + ( isRTL ? "e" : "w" ) + "'>" + prevText + "</span></a>" :
6168
			( 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>" ) );
6169
6170
		nextText = this._get( inst, "nextText" );
6171
		nextText = ( !navigationAsDateFormat ? nextText : this.formatDate( nextText,
6172
			this._daylightSavingAdjust( new Date( drawYear, drawMonth + stepMonths, 1 ) ),
6173
			this._getFormatConfig( inst ) ) );
6174
6175
		next = ( this._canAdjustMonth( inst, +1, drawYear, drawMonth ) ?
6176
			"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click'" +
6177
			" title='" + nextText + "'><span class='ui-icon ui-icon-circle-triangle-" + ( isRTL ? "w" : "e" ) + "'>" + nextText + "</span></a>" :
6178
			( 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>" ) );
6179
6180
		currentText = this._get( inst, "currentText" );
6181
		gotoDate = ( this._get( inst, "gotoCurrent" ) && inst.currentDay ? currentDate : today );
6182
		currentText = ( !navigationAsDateFormat ? currentText :
6183
			this.formatDate( currentText, gotoDate, this._getFormatConfig( inst ) ) );
6184
6185
		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'>" +
6186
			this._get( inst, "closeText" ) + "</button>" : "" );
6187
6188
		buttonPanel = ( showButtonPanel ) ? "<div class='ui-datepicker-buttonpane ui-widget-content'>" + ( isRTL ? controls : "" ) +
6189
			( 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'" +
6190
			">" + currentText + "</button>" : "" ) + ( isRTL ? "" : controls ) + "</div>" : "";
6191
6192
		firstDay = parseInt( this._get( inst, "firstDay" ), 10 );
6193
		firstDay = ( isNaN( firstDay ) ? 0 : firstDay );
6194
6195
		showWeek = this._get( inst, "showWeek" );
6196
		dayNames = this._get( inst, "dayNames" );
6197
		dayNamesMin = this._get( inst, "dayNamesMin" );
6198
		monthNames = this._get( inst, "monthNames" );
6199
		monthNamesShort = this._get( inst, "monthNamesShort" );
6200
		beforeShowDay = this._get( inst, "beforeShowDay" );
6201
		showOtherMonths = this._get( inst, "showOtherMonths" );
6202
		selectOtherMonths = this._get( inst, "selectOtherMonths" );
6203
		defaultDate = this._getDefaultDate( inst );
6204
		html = "";
6205
6206
		for ( row = 0; row < numMonths[ 0 ]; row++ ) {
6207
			group = "";
6208
			this.maxRows = 4;
6209
			for ( col = 0; col < numMonths[ 1 ]; col++ ) {
6210
				selectedDate = this._daylightSavingAdjust( new Date( drawYear, drawMonth, inst.selectedDay ) );
6211
				cornerClass = " ui-corner-all";
6212
				calender = "";
6213
				if ( isMultiMonth ) {
6214
					calender += "<div class='ui-datepicker-group";
6215
					if ( numMonths[ 1 ] > 1 ) {
6216
						switch ( col ) {
6217
							case 0: calender += " ui-datepicker-group-first";
6218
								cornerClass = " ui-corner-" + ( isRTL ? "right" : "left" ); break;
6219
							case numMonths[ 1 ] - 1: calender += " ui-datepicker-group-last";
6220
								cornerClass = " ui-corner-" + ( isRTL ? "left" : "right" ); break;
6221
							default: calender += " ui-datepicker-group-middle"; cornerClass = ""; break;
6222
						}
6223
					}
6224
					calender += "'>";
6225
				}
6226
				calender += "<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix" + cornerClass + "'>" +
6227
					( /all|left/.test( cornerClass ) && row === 0 ? ( isRTL ? next : prev ) : "" ) +
6228
					( /all|right/.test( cornerClass ) && row === 0 ? ( isRTL ? prev : next ) : "" ) +
6229
					this._generateMonthYearHeader( inst, drawMonth, drawYear, minDate, maxDate,
6230
					row > 0 || col > 0, monthNames, monthNamesShort ) + // draw month headers
6231
					"</div><table class='ui-datepicker-calendar'><thead>" +
6232
					"<tr>";
6233
				thead = ( showWeek ? "<th class='ui-datepicker-week-col'>" + this._get( inst, "weekHeader" ) + "</th>" : "" );
6234
				for ( dow = 0; dow < 7; dow++ ) { // days of the week
6235
					day = ( dow + firstDay ) % 7;
6236
					thead += "<th scope='col'" + ( ( dow + firstDay + 6 ) % 7 >= 5 ? " class='ui-datepicker-week-end'" : "" ) + ">" +
6237
						"<span title='" + dayNames[ day ] + "'>" + dayNamesMin[ day ] + "</span></th>";
6238
				}
6239
				calender += thead + "</tr></thead><tbody>";
6240
				daysInMonth = this._getDaysInMonth( drawYear, drawMonth );
6241
				if ( drawYear === inst.selectedYear && drawMonth === inst.selectedMonth ) {
6242
					inst.selectedDay = Math.min( inst.selectedDay, daysInMonth );
6243
				}
6244
				leadDays = ( this._getFirstDayOfMonth( drawYear, drawMonth ) - firstDay + 7 ) % 7;
6245
				curRows = Math.ceil( ( leadDays + daysInMonth ) / 7 ); // calculate the number of rows to generate
6246
				numRows = ( isMultiMonth ? this.maxRows > curRows ? this.maxRows : curRows : curRows ); //If multiple months, use the higher number of rows (see #7043)
6247
				this.maxRows = numRows;
6248
				printDate = this._daylightSavingAdjust( new Date( drawYear, drawMonth, 1 - leadDays ) );
6249
				for ( dRow = 0; dRow < numRows; dRow++ ) { // create date picker rows
6250
					calender += "<tr>";
6251
					tbody = ( !showWeek ? "" : "<td class='ui-datepicker-week-col'>" +
6252
						this._get( inst, "calculateWeek" )( printDate ) + "</td>" );
6253
					for ( dow = 0; dow < 7; dow++ ) { // create date picker days
6254
						daySettings = ( beforeShowDay ?
6255
							beforeShowDay.apply( ( inst.input ? inst.input[ 0 ] : null ), [ printDate ] ) : [ true, "" ] );
6256
						otherMonth = ( printDate.getMonth() !== drawMonth );
6257
						unselectable = ( otherMonth && !selectOtherMonths ) || !daySettings[ 0 ] ||
6258
							( minDate && printDate < minDate ) || ( maxDate && printDate > maxDate );
6259
						tbody += "<td class='" +
6260
							( ( dow + firstDay + 6 ) % 7 >= 5 ? " ui-datepicker-week-end" : "" ) + // highlight weekends
6261
							( otherMonth ? " ui-datepicker-other-month" : "" ) + // highlight days from other months
6262
							( ( printDate.getTime() === selectedDate.getTime() && drawMonth === inst.selectedMonth && inst._keyEvent ) || // user pressed key
6263
							( defaultDate.getTime() === printDate.getTime() && defaultDate.getTime() === selectedDate.getTime() ) ?
6264
6265
							// or defaultDate is current printedDate and defaultDate is selectedDate
6266
							" " + this._dayOverClass : "" ) + // highlight selected day
6267
							( unselectable ? " " + this._unselectableClass + " ui-state-disabled" : "" ) +  // highlight unselectable days
6268
							( otherMonth && !showOtherMonths ? "" : " " + daySettings[ 1 ] + // highlight custom dates
6269
							( printDate.getTime() === currentDate.getTime() ? " " + this._currentClass : "" ) + // highlight selected day
6270
							( printDate.getTime() === today.getTime() ? " ui-datepicker-today" : "" ) ) + "'" + // highlight today (if different)
6271
							( ( !otherMonth || showOtherMonths ) && daySettings[ 2 ] ? " title='" + daySettings[ 2 ].replace( /'/g, "&#39;" ) + "'" : "" ) + // cell title
6272
							( unselectable ? "" : " data-handler='selectDay' data-event='click' data-month='" + printDate.getMonth() + "' data-year='" + printDate.getFullYear() + "'" ) + ">" + // actions
6273
							( otherMonth && !showOtherMonths ? "&#xa0;" : // display for other months
6274
							( unselectable ? "<span class='ui-state-default'>" + printDate.getDate() + "</span>" : "<a class='ui-state-default" +
6275
							( printDate.getTime() === today.getTime() ? " ui-state-highlight" : "" ) +
6276
							( printDate.getTime() === currentDate.getTime() ? " ui-state-active" : "" ) + // highlight selected day
6277
							( otherMonth ? " ui-priority-secondary" : "" ) + // distinguish dates from other months
6278
							"' href='#'>" + printDate.getDate() + "</a>" ) ) + "</td>"; // display selectable date
6279
						printDate.setDate( printDate.getDate() + 1 );
6280
						printDate = this._daylightSavingAdjust( printDate );
6281
					}
6282
					calender += tbody + "</tr>";
6283
				}
6284
				drawMonth++;
6285
				if ( drawMonth > 11 ) {
6286
					drawMonth = 0;
6287
					drawYear++;
6288
				}
6289
				calender += "</tbody></table>" + ( isMultiMonth ? "</div>" +
6290
							( ( numMonths[ 0 ] > 0 && col === numMonths[ 1 ] - 1 ) ? "<div class='ui-datepicker-row-break'></div>" : "" ) : "" );
6291
				group += calender;
6292
			}
6293
			html += group;
6294
		}
6295
		html += buttonPanel;
6296
		inst._keyEvent = false;
6297
		return html;
6298
	},
6299
6300
	/* Generate the month and year header. */
6301
	_generateMonthYearHeader: function( inst, drawMonth, drawYear, minDate, maxDate,
6302
			secondary, monthNames, monthNamesShort ) {
6303
6304
		var inMinYear, inMaxYear, month, years, thisYear, determineYear, year, endYear,
6305
			changeMonth = this._get( inst, "changeMonth" ),
6306
			changeYear = this._get( inst, "changeYear" ),
6307
			showMonthAfterYear = this._get( inst, "showMonthAfterYear" ),
6308
			html = "<div class='ui-datepicker-title'>",
6309
			monthHtml = "";
6310
6311
		// Month selection
6312
		if ( secondary || !changeMonth ) {
6313
			monthHtml += "<span class='ui-datepicker-month'>" + monthNames[ drawMonth ] + "</span>";
6314
		} else {
6315
			inMinYear = ( minDate && minDate.getFullYear() === drawYear );
6316
			inMaxYear = ( maxDate && maxDate.getFullYear() === drawYear );
6317
			monthHtml += "<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>";
6318
			for ( month = 0; month < 12; month++ ) {
6319
				if ( ( !inMinYear || month >= minDate.getMonth() ) && ( !inMaxYear || month <= maxDate.getMonth() ) ) {
6320
					monthHtml += "<option value='" + month + "'" +
6321
						( month === drawMonth ? " selected='selected'" : "" ) +
6322
						">" + monthNamesShort[ month ] + "</option>";
6323
				}
6324
			}
6325
			monthHtml += "</select>";
6326
		}
6327
6328
		if ( !showMonthAfterYear ) {
6329
			html += monthHtml + ( secondary || !( changeMonth && changeYear ) ? "&#xa0;" : "" );
6330
		}
6331
6332
		// Year selection
6333
		if ( !inst.yearshtml ) {
6334
			inst.yearshtml = "";
6335
			if ( secondary || !changeYear ) {
6336
				html += "<span class='ui-datepicker-year'>" + drawYear + "</span>";
6337
			} else {
6338
6339
				// determine range of years to display
6340
				years = this._get( inst, "yearRange" ).split( ":" );
6341
				thisYear = new Date().getFullYear();
6342
				determineYear = function( value ) {
6343
					var year = ( value.match( /c[+\-].*/ ) ? drawYear + parseInt( value.substring( 1 ), 10 ) :
6344
						( value.match( /[+\-].*/ ) ? thisYear + parseInt( value, 10 ) :
6345
						parseInt( value, 10 ) ) );
6346
					return ( isNaN( year ) ? thisYear : year );
6347
				};
6348
				year = determineYear( years[ 0 ] );
6349
				endYear = Math.max( year, determineYear( years[ 1 ] || "" ) );
6350
				year = ( minDate ? Math.max( year, minDate.getFullYear() ) : year );
6351
				endYear = ( maxDate ? Math.min( endYear, maxDate.getFullYear() ) : endYear );
6352
				inst.yearshtml += "<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";
6353
				for ( ; year <= endYear; year++ ) {
6354
					inst.yearshtml += "<option value='" + year + "'" +
6355
						( year === drawYear ? " selected='selected'" : "" ) +
6356
						">" + year + "</option>";
6357
				}
6358
				inst.yearshtml += "</select>";
6359
6360
				html += inst.yearshtml;
6361
				inst.yearshtml = null;
6362
			}
6363
		}
6364
6365
		html += this._get( inst, "yearSuffix" );
6366
		if ( showMonthAfterYear ) {
6367
			html += ( secondary || !( changeMonth && changeYear ) ? "&#xa0;" : "" ) + monthHtml;
6368
		}
6369
		html += "</div>"; // Close datepicker_header
6370
		return html;
6371
	},
6372
6373
	/* Adjust one of the date sub-fields. */
6374
	_adjustInstDate: function( inst, offset, period ) {
6375
		var year = inst.selectedYear + ( period === "Y" ? offset : 0 ),
6376
			month = inst.selectedMonth + ( period === "M" ? offset : 0 ),
6377
			day = Math.min( inst.selectedDay, this._getDaysInMonth( year, month ) ) + ( period === "D" ? offset : 0 ),
6378
			date = this._restrictMinMax( inst, this._daylightSavingAdjust( new Date( year, month, day ) ) );
6379
6380
		inst.selectedDay = date.getDate();
6381
		inst.drawMonth = inst.selectedMonth = date.getMonth();
6382
		inst.drawYear = inst.selectedYear = date.getFullYear();
6383
		if ( period === "M" || period === "Y" ) {
6384
			this._notifyChange( inst );
6385
		}
6386
	},
6387
6388
	/* Ensure a date is within any min/max bounds. */
6389
	_restrictMinMax: function( inst, date ) {
6390
		var minDate = this._getMinMaxDate( inst, "min" ),
6391
			maxDate = this._getMinMaxDate( inst, "max" ),
6392
			newDate = ( minDate && date < minDate ? minDate : date );
6393
		return ( maxDate && newDate > maxDate ? maxDate : newDate );
6394
	},
6395
6396
	/* Notify change of month/year. */
6397
	_notifyChange: function( inst ) {
6398
		var onChange = this._get( inst, "onChangeMonthYear" );
6399
		if ( onChange ) {
6400
			onChange.apply( ( inst.input ? inst.input[ 0 ] : null ),
6401
				[ inst.selectedYear, inst.selectedMonth + 1, inst ] );
6402
		}
6403
	},
6404
6405
	/* Determine the number of months to show. */
6406
	_getNumberOfMonths: function( inst ) {
6407
		var numMonths = this._get( inst, "numberOfMonths" );
6408
		return ( numMonths == null ? [ 1, 1 ] : ( typeof numMonths === "number" ? [ 1, numMonths ] : numMonths ) );
6409
	},
6410
6411
	/* Determine the current maximum date - ensure no time components are set. */
6412
	_getMinMaxDate: function( inst, minMax ) {
6413
		return this._determineDate( inst, this._get( inst, minMax + "Date" ), null );
6414
	},
6415
6416
	/* Find the number of days in a given month. */
6417
	_getDaysInMonth: function( year, month ) {
6418
		return 32 - this._daylightSavingAdjust( new Date( year, month, 32 ) ).getDate();
6419
	},
6420
6421
	/* Find the day of the week of the first of a month. */
6422
	_getFirstDayOfMonth: function( year, month ) {
6423
		return new Date( year, month, 1 ).getDay();
6424
	},
6425
6426
	/* Determines if we should allow a "next/prev" month display change. */
6427
	_canAdjustMonth: function( inst, offset, curYear, curMonth ) {
6428
		var numMonths = this._getNumberOfMonths( inst ),
6429
			date = this._daylightSavingAdjust( new Date( curYear,
6430
			curMonth + ( offset < 0 ? offset : numMonths[ 0 ] * numMonths[ 1 ] ), 1 ) );
6431
6432
		if ( offset < 0 ) {
6433
			date.setDate( this._getDaysInMonth( date.getFullYear(), date.getMonth() ) );
6434
		}
6435
		return this._isInRange( inst, date );
6436
	},
6437
6438
	/* Is the given date in the accepted range? */
6439
	_isInRange: function( inst, date ) {
6440
		var yearSplit, currentYear,
6441
			minDate = this._getMinMaxDate( inst, "min" ),
6442
			maxDate = this._getMinMaxDate( inst, "max" ),
6443
			minYear = null,
6444
			maxYear = null,
6445
			years = this._get( inst, "yearRange" );
6446
			if ( years ) {
6447
				yearSplit = years.split( ":" );
6448
				currentYear = new Date().getFullYear();
6449
				minYear = parseInt( yearSplit[ 0 ], 10 );
6450
				maxYear = parseInt( yearSplit[ 1 ], 10 );
6451
				if ( yearSplit[ 0 ].match( /[+\-].*/ ) ) {
6452
					minYear += currentYear;
6453
				}
6454
				if ( yearSplit[ 1 ].match( /[+\-].*/ ) ) {
6455
					maxYear += currentYear;
6456
				}
6457
			}
6458
6459
		return ( ( !minDate || date.getTime() >= minDate.getTime() ) &&
6460
			( !maxDate || date.getTime() <= maxDate.getTime() ) &&
6461
			( !minYear || date.getFullYear() >= minYear ) &&
6462
			( !maxYear || date.getFullYear() <= maxYear ) );
6463
	},
6464
6465
	/* Provide the configuration settings for formatting/parsing. */
6466
	_getFormatConfig: function( inst ) {
6467
		var shortYearCutoff = this._get( inst, "shortYearCutoff" );
6468
		shortYearCutoff = ( typeof shortYearCutoff !== "string" ? shortYearCutoff :
6469
			new Date().getFullYear() % 100 + parseInt( shortYearCutoff, 10 ) );
6470
		return { shortYearCutoff: shortYearCutoff,
6471
			dayNamesShort: this._get( inst, "dayNamesShort" ), dayNames: this._get( inst, "dayNames" ),
6472
			monthNamesShort: this._get( inst, "monthNamesShort" ), monthNames: this._get( inst, "monthNames" ) };
6473
	},
6474
6475
	/* Format the given date for display. */
6476
	_formatDate: function( inst, day, month, year ) {
6477
		if ( !day ) {
6478
			inst.currentDay = inst.selectedDay;
6479
			inst.currentMonth = inst.selectedMonth;
6480
			inst.currentYear = inst.selectedYear;
6481
		}
6482
		var date = ( day ? ( typeof day === "object" ? day :
6483
			this._daylightSavingAdjust( new Date( year, month, day ) ) ) :
6484
			this._daylightSavingAdjust( new Date( inst.currentYear, inst.currentMonth, inst.currentDay ) ) );
6485
		return this.formatDate( this._get( inst, "dateFormat" ), date, this._getFormatConfig( inst ) );
6486
	}
6487
} );
6488
6489
/*
6490
 * Bind hover events for datepicker elements.
6491
 * Done via delegate so the binding only occurs once in the lifetime of the parent div.
6492
 * Global datepicker_instActive, set by _updateDatepicker allows the handlers to find their way back to the active picker.
6493
 */
6494
function datepicker_bindHover( dpDiv ) {
6495
	var selector = "button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";
6496
	return dpDiv.on( "mouseout", selector, function() {
6497
			$( this ).removeClass( "ui-state-hover" );
6498
			if ( this.className.indexOf( "ui-datepicker-prev" ) !== -1 ) {
6499
				$( this ).removeClass( "ui-datepicker-prev-hover" );
6500
			}
6501
			if ( this.className.indexOf( "ui-datepicker-next" ) !== -1 ) {
6502
				$( this ).removeClass( "ui-datepicker-next-hover" );
6503
			}
6504
		} )
6505
		.on( "mouseover", selector, datepicker_handleMouseover );
6506
}
6507
6508
function datepicker_handleMouseover() {
6509
	if ( !$.datepicker._isDisabledDatepicker( datepicker_instActive.inline ? datepicker_instActive.dpDiv.parent()[ 0 ] : datepicker_instActive.input[ 0 ] ) ) {
6510
		$( this ).parents( ".ui-datepicker-calendar" ).find( "a" ).removeClass( "ui-state-hover" );
6511
		$( this ).addClass( "ui-state-hover" );
6512
		if ( this.className.indexOf( "ui-datepicker-prev" ) !== -1 ) {
6513
			$( this ).addClass( "ui-datepicker-prev-hover" );
6514
		}
6515
		if ( this.className.indexOf( "ui-datepicker-next" ) !== -1 ) {
6516
			$( this ).addClass( "ui-datepicker-next-hover" );
6517
		}
6518
	}
6519
}
6520
6521
/* jQuery extend now ignores nulls! */
6522
function datepicker_extendRemove( target, props ) {
6523
	$.extend( target, props );
6524
	for ( var name in props ) {
6525
		if ( props[ name ] == null ) {
6526
			target[ name ] = props[ name ];
6527
		}
6528
	}
6529
	return target;
6530
}
6531
6532
/* Invoke the datepicker functionality.
6533
   @param  options  string - a command, optionally followed by additional parameters or
6534
					Object - settings for attaching new datepicker functionality
6535
   @return  jQuery object */
6536
$.fn.datepicker = function( options ) {
6537
6538
	/* Verify an empty collection wasn't passed - Fixes #6976 */
6539
	if ( !this.length ) {
6540
		return this;
6541
	}
6542
6543
	/* Initialise the date picker. */
6544
	if ( !$.datepicker.initialized ) {
6545
		$( document ).on( "mousedown", $.datepicker._checkExternalClick );
6546
		$.datepicker.initialized = true;
6547
	}
6548
6549
	/* Append datepicker main container to body if not exist. */
6550
	if ( $( "#" + $.datepicker._mainDivId ).length === 0 ) {
6551
		$( "body" ).append( $.datepicker.dpDiv );
6552
	}
6553
6554
	var otherArgs = Array.prototype.slice.call( arguments, 1 );
6555
	if ( typeof options === "string" && ( options === "isDisabled" || options === "getDate" || options === "widget" ) ) {
6556
		return $.datepicker[ "_" + options + "Datepicker" ].
6557
			apply( $.datepicker, [ this[ 0 ] ].concat( otherArgs ) );
6558
	}
6559
	if ( options === "option" && arguments.length === 2 && typeof arguments[ 1 ] === "string" ) {
6560
		return $.datepicker[ "_" + options + "Datepicker" ].
6561
			apply( $.datepicker, [ this[ 0 ] ].concat( otherArgs ) );
6562
	}
6563
	return this.each( function() {
6564
		typeof options === "string" ?
6565
			$.datepicker[ "_" + options + "Datepicker" ].
6566
				apply( $.datepicker, [ this ].concat( otherArgs ) ) :
6567
			$.datepicker._attachDatepicker( this, options );
6568
	} );
6569
};
6570
6571
$.datepicker = new Datepicker(); // singleton instance
6572
$.datepicker.initialized = false;
6573
$.datepicker.uuid = new Date().getTime();
6574
$.datepicker.version = "1.12.1";
6575
6576
var widgetsDatepicker = $.datepicker;
6577
6578
6579
/*!
6580
 * jQuery UI Slider 1.12.1
6581
 * http://jqueryui.com
6582
 *
6583
 * Copyright jQuery Foundation and other contributors
6584
 * Released under the MIT license.
6585
 * http://jquery.org/license
6586
 */
6587
6588
//>>label: Slider
6589
//>>group: Widgets
6590
//>>description: Displays a flexible slider with ranges and accessibility via keyboard.
6591
//>>docs: http://api.jqueryui.com/slider/
6592
//>>demos: http://jqueryui.com/slider/
6593
//>>css.structure: ../../themes/base/core.css
6594
//>>css.structure: ../../themes/base/slider.css
6595
//>>css.theme: ../../themes/base/theme.css
6596
6597
6598
6599
var widgetsSlider = $.widget( "ui.slider", $.ui.mouse, {
6600
	version: "1.12.1",
6601
	widgetEventPrefix: "slide",
6602
6603
	options: {
6604
		animate: false,
6605
		classes: {
6606
			"ui-slider": "ui-corner-all",
6607
			"ui-slider-handle": "ui-corner-all",
6608
6609
			// Note: ui-widget-header isn't the most fittingly semantic framework class for this
6610
			// element, but worked best visually with a variety of themes
6611
			"ui-slider-range": "ui-corner-all ui-widget-header"
6612
		},
6613
		distance: 0,
6614
		max: 100,
6615
		min: 0,
6616
		orientation: "horizontal",
6617
		range: false,
6618
		step: 1,
6619
		value: 0,
6620
		values: null,
6621
6622
		// Callbacks
6623
		change: null,
6624
		slide: null,
6625
		start: null,
6626
		stop: null
6627
	},
6628
6629
	// Number of pages in a slider
6630
	// (how many times can you page up/down to go through the whole range)
6631
	numPages: 5,
6632
6633
	_create: function() {
6634
		this._keySliding = false;
6635
		this._mouseSliding = false;
6636
		this._animateOff = true;
6637
		this._handleIndex = null;
6638
		this._detectOrientation();
6639
		this._mouseInit();
6640
		this._calculateNewMax();
6641
6642
		this._addClass( "ui-slider ui-slider-" + this.orientation,
6643
			"ui-widget ui-widget-content" );
6644
6645
		this._refresh();
6646
6647
		this._animateOff = false;
6648
	},
6649
6650
	_refresh: function() {
6651
		this._createRange();
6652
		this._createHandles();
6653
		this._setupEvents();
6654
		this._refreshValue();
6655
	},
6656
6657
	_createHandles: function() {
6658
		var i, handleCount,
6659
			options = this.options,
6660
			existingHandles = this.element.find( ".ui-slider-handle" ),
6661
			handle = "<span tabindex='0'></span>",
6662
			handles = [];
6663
6664
		handleCount = ( options.values && options.values.length ) || 1;
6665
6666
		if ( existingHandles.length > handleCount ) {
6667
			existingHandles.slice( handleCount ).remove();
6668
			existingHandles = existingHandles.slice( 0, handleCount );
6669
		}
6670
6671
		for ( i = existingHandles.length; i < handleCount; i++ ) {
6672
			handles.push( handle );
6673
		}
6674
6675
		this.handles = existingHandles.add( $( handles.join( "" ) ).appendTo( this.element ) );
6676
6677
		this._addClass( this.handles, "ui-slider-handle", "ui-state-default" );
6678
6679
		this.handle = this.handles.eq( 0 );
6680
6681
		this.handles.each( function( i ) {
6682
			$( this )
6683
				.data( "ui-slider-handle-index", i )
6684
				.attr( "tabIndex", 0 );
6685
		} );
6686
	},
6687
6688
	_createRange: function() {
6689
		var options = this.options;
6690
6691
		if ( options.range ) {
6692
			if ( options.range === true ) {
6693
				if ( !options.values ) {
6694
					options.values = [ this._valueMin(), this._valueMin() ];
6695
				} else if ( options.values.length && options.values.length !== 2 ) {
6696
					options.values = [ options.values[ 0 ], options.values[ 0 ] ];
6697
				} else if ( $.isArray( options.values ) ) {
6698
					options.values = options.values.slice( 0 );
6699
				}
6700
			}
6701
6702
			if ( !this.range || !this.range.length ) {
6703
				this.range = $( "<div>" )
6704
					.appendTo( this.element );
6705
6706
				this._addClass( this.range, "ui-slider-range" );
6707
			} else {
6708
				this._removeClass( this.range, "ui-slider-range-min ui-slider-range-max" );
6709
6710
				// Handle range switching from true to min/max
6711
				this.range.css( {
6712
					"left": "",
6713
					"bottom": ""
6714
				} );
6715
			}
6716
			if ( options.range === "min" || options.range === "max" ) {
6717
				this._addClass( this.range, "ui-slider-range-" + options.range );
6718
			}
6719
		} else {
6720
			if ( this.range ) {
6721
				this.range.remove();
6722
			}
6723
			this.range = null;
6724
		}
6725
	},
6726
6727
	_setupEvents: function() {
6728
		this._off( this.handles );
6729
		this._on( this.handles, this._handleEvents );
6730
		this._hoverable( this.handles );
6731
		this._focusable( this.handles );
6732
	},
6733
6734
	_destroy: function() {
6735
		this.handles.remove();
6736
		if ( this.range ) {
6737
			this.range.remove();
6738
		}
6739
6740
		this._mouseDestroy();
6741
	},
6742
6743
	_mouseCapture: function( event ) {
6744
		var position, normValue, distance, closestHandle, index, allowed, offset, mouseOverHandle,
6745
			that = this,
6746
			o = this.options;
6747
6748
		if ( o.disabled ) {
6749
			return false;
6750
		}
6751
6752
		this.elementSize = {
6753
			width: this.element.outerWidth(),
6754
			height: this.element.outerHeight()
6755
		};
6756
		this.elementOffset = this.element.offset();
6757
6758
		position = { x: event.pageX, y: event.pageY };
6759
		normValue = this._normValueFromMouse( position );
6760
		distance = this._valueMax() - this._valueMin() + 1;
6761
		this.handles.each( function( i ) {
6762
			var thisDistance = Math.abs( normValue - that.values( i ) );
6763
			if ( ( distance > thisDistance ) ||
6764
				( distance === thisDistance &&
6765
					( i === that._lastChangedValue || that.values( i ) === o.min ) ) ) {
6766
				distance = thisDistance;
6767
				closestHandle = $( this );
6768
				index = i;
6769
			}
6770
		} );
6771
6772
		allowed = this._start( event, index );
6773
		if ( allowed === false ) {
6774
			return false;
6775
		}
6776
		this._mouseSliding = true;
6777
6778
		this._handleIndex = index;
6779
6780
		this._addClass( closestHandle, null, "ui-state-active" );
6781
		closestHandle.trigger( "focus" );
6782
6783
		offset = closestHandle.offset();
6784
		mouseOverHandle = !$( event.target ).parents().addBack().is( ".ui-slider-handle" );
6785
		this._clickOffset = mouseOverHandle ? { left: 0, top: 0 } : {
6786
			left: event.pageX - offset.left - ( closestHandle.width() / 2 ),
6787
			top: event.pageY - offset.top -
6788
				( closestHandle.height() / 2 ) -
6789
				( parseInt( closestHandle.css( "borderTopWidth" ), 10 ) || 0 ) -
6790
				( parseInt( closestHandle.css( "borderBottomWidth" ), 10 ) || 0 ) +
6791
				( parseInt( closestHandle.css( "marginTop" ), 10 ) || 0 )
6792
		};
6793
6794
		if ( !this.handles.hasClass( "ui-state-hover" ) ) {
6795
			this._slide( event, index, normValue );
6796
		}
6797
		this._animateOff = true;
6798
		return true;
6799
	},
6800
6801
	_mouseStart: function() {
6802
		return true;
6803
	},
6804
6805
	_mouseDrag: function( event ) {
6806
		var position = { x: event.pageX, y: event.pageY },
6807
			normValue = this._normValueFromMouse( position );
6808
6809
		this._slide( event, this._handleIndex, normValue );
6810
6811
		return false;
6812
	},
6813
6814
	_mouseStop: function( event ) {
6815
		this._removeClass( this.handles, null, "ui-state-active" );
6816
		this._mouseSliding = false;
6817
6818
		this._stop( event, this._handleIndex );
6819
		this._change( event, this._handleIndex );
6820
6821
		this._handleIndex = null;
6822
		this._clickOffset = null;
6823
		this._animateOff = false;
6824
6825
		return false;
6826
	},
6827
6828
	_detectOrientation: function() {
6829
		this.orientation = ( this.options.orientation === "vertical" ) ? "vertical" : "horizontal";
6830
	},
6831
6832
	_normValueFromMouse: function( position ) {
6833
		var pixelTotal,
6834
			pixelMouse,
6835
			percentMouse,
6836
			valueTotal,
6837
			valueMouse;
6838
6839
		if ( this.orientation === "horizontal" ) {
6840
			pixelTotal = this.elementSize.width;
6841
			pixelMouse = position.x - this.elementOffset.left -
6842
				( this._clickOffset ? this._clickOffset.left : 0 );
6843
		} else {
6844
			pixelTotal = this.elementSize.height;
6845
			pixelMouse = position.y - this.elementOffset.top -
6846
				( this._clickOffset ? this._clickOffset.top : 0 );
6847
		}
6848
6849
		percentMouse = ( pixelMouse / pixelTotal );
6850
		if ( percentMouse > 1 ) {
6851
			percentMouse = 1;
6852
		}
6853
		if ( percentMouse < 0 ) {
6854
			percentMouse = 0;
6855
		}
6856
		if ( this.orientation === "vertical" ) {
6857
			percentMouse = 1 - percentMouse;
6858
		}
6859
6860
		valueTotal = this._valueMax() - this._valueMin();
6861
		valueMouse = this._valueMin() + percentMouse * valueTotal;
6862
6863
		return this._trimAlignValue( valueMouse );
6864
	},
6865
6866
	_uiHash: function( index, value, values ) {
6867
		var uiHash = {
6868
			handle: this.handles[ index ],
6869
			handleIndex: index,
6870
			value: value !== undefined ? value : this.value()
6871
		};
6872
6873
		if ( this._hasMultipleValues() ) {
6874
			uiHash.value = value !== undefined ? value : this.values( index );
6875
			uiHash.values = values || this.values();
6876
		}
6877
6878
		return uiHash;
6879
	},
6880
6881
	_hasMultipleValues: function() {
6882
		return this.options.values && this.options.values.length;
6883
	},
6884
6885
	_start: function( event, index ) {
6886
		return this._trigger( "start", event, this._uiHash( index ) );
6887
	},
6888
6889
	_slide: function( event, index, newVal ) {
6890
		var allowed, otherVal,
6891
			currentValue = this.value(),
6892
			newValues = this.values();
6893
6894
		if ( this._hasMultipleValues() ) {
6895
			otherVal = this.values( index ? 0 : 1 );
6896
			currentValue = this.values( index );
6897
6898
			if ( this.options.values.length === 2 && this.options.range === true ) {
6899
				newVal =  index === 0 ? Math.min( otherVal, newVal ) : Math.max( otherVal, newVal );
6900
			}
6901
6902
			newValues[ index ] = newVal;
6903
		}
6904
6905
		if ( newVal === currentValue ) {
6906
			return;
6907
		}
6908
6909
		allowed = this._trigger( "slide", event, this._uiHash( index, newVal, newValues ) );
6910
6911
		// A slide can be canceled by returning false from the slide callback
6912
		if ( allowed === false ) {
6913
			return;
6914
		}
6915
6916
		if ( this._hasMultipleValues() ) {
6917
			this.values( index, newVal );
6918
		} else {
6919
			this.value( newVal );
6920
		}
6921
	},
6922
6923
	_stop: function( event, index ) {
6924
		this._trigger( "stop", event, this._uiHash( index ) );
6925
	},
6926
6927
	_change: function( event, index ) {
6928
		if ( !this._keySliding && !this._mouseSliding ) {
6929
6930
			//store the last changed value index for reference when handles overlap
6931
			this._lastChangedValue = index;
6932
			this._trigger( "change", event, this._uiHash( index ) );
6933
		}
6934
	},
6935
6936
	value: function( newValue ) {
6937
		if ( arguments.length ) {
6938
			this.options.value = this._trimAlignValue( newValue );
6939
			this._refreshValue();
6940
			this._change( null, 0 );
6941
			return;
6942
		}
6943
6944
		return this._value();
6945
	},
6946
6947
	values: function( index, newValue ) {
6948
		var vals,
6949
			newValues,
6950
			i;
6951
6952
		if ( arguments.length > 1 ) {
6953
			this.options.values[ index ] = this._trimAlignValue( newValue );
6954
			this._refreshValue();
6955
			this._change( null, index );
6956
			return;
6957
		}
6958
6959
		if ( arguments.length ) {
6960
			if ( $.isArray( arguments[ 0 ] ) ) {
6961
				vals = this.options.values;
6962
				newValues = arguments[ 0 ];
6963
				for ( i = 0; i < vals.length; i += 1 ) {
6964
					vals[ i ] = this._trimAlignValue( newValues[ i ] );
6965
					this._change( null, i );
6966
				}
6967
				this._refreshValue();
6968
			} else {
6969
				if ( this._hasMultipleValues() ) {
6970
					return this._values( index );
6971
				} else {
6972
					return this.value();
6973
				}
6974
			}
6975
		} else {
6976
			return this._values();
6977
		}
6978
	},
6979
6980
	_setOption: function( key, value ) {
6981
		var i,
6982
			valsLength = 0;
6983
6984
		if ( key === "range" && this.options.range === true ) {
6985
			if ( value === "min" ) {
6986
				this.options.value = this._values( 0 );
6987
				this.options.values = null;
6988
			} else if ( value === "max" ) {
6989
				this.options.value = this._values( this.options.values.length - 1 );
6990
				this.options.values = null;
6991
			}
6992
		}
6993
6994
		if ( $.isArray( this.options.values ) ) {
6995
			valsLength = this.options.values.length;
6996
		}
6997
6998
		this._super( key, value );
6999
7000
		switch ( key ) {
7001
			case "orientation":
7002
				this._detectOrientation();
7003
				this._removeClass( "ui-slider-horizontal ui-slider-vertical" )
7004
					._addClass( "ui-slider-" + this.orientation );
7005
				this._refreshValue();
7006
				if ( this.options.range ) {
7007
					this._refreshRange( value );
7008
				}
7009
7010
				// Reset positioning from previous orientation
7011
				this.handles.css( value === "horizontal" ? "bottom" : "left", "" );
7012
				break;
7013
			case "value":
7014
				this._animateOff = true;
7015
				this._refreshValue();
7016
				this._change( null, 0 );
7017
				this._animateOff = false;
7018
				break;
7019
			case "values":
7020
				this._animateOff = true;
7021
				this._refreshValue();
7022
7023
				// Start from the last handle to prevent unreachable handles (#9046)
7024
				for ( i = valsLength - 1; i >= 0; i-- ) {
7025
					this._change( null, i );
7026
				}
7027
				this._animateOff = false;
7028
				break;
7029
			case "step":
7030
			case "min":
7031
			case "max":
7032
				this._animateOff = true;
7033
				this._calculateNewMax();
7034
				this._refreshValue();
7035
				this._animateOff = false;
7036
				break;
7037
			case "range":
7038
				this._animateOff = true;
7039
				this._refresh();
7040
				this._animateOff = false;
7041
				break;
7042
		}
7043
	},
7044
7045
	_setOptionDisabled: function( value ) {
7046
		this._super( value );
7047
7048
		this._toggleClass( null, "ui-state-disabled", !!value );
7049
	},
7050
7051
	//internal value getter
7052
	// _value() returns value trimmed by min and max, aligned by step
7053
	_value: function() {
7054
		var val = this.options.value;
7055
		val = this._trimAlignValue( val );
7056
7057
		return val;
7058
	},
7059
7060
	//internal values getter
7061
	// _values() returns array of values trimmed by min and max, aligned by step
7062
	// _values( index ) returns single value trimmed by min and max, aligned by step
7063
	_values: function( index ) {
7064
		var val,
7065
			vals,
7066
			i;
7067
7068
		if ( arguments.length ) {
7069
			val = this.options.values[ index ];
7070
			val = this._trimAlignValue( val );
7071
7072
			return val;
7073
		} else if ( this._hasMultipleValues() ) {
7074
7075
			// .slice() creates a copy of the array
7076
			// this copy gets trimmed by min and max and then returned
7077
			vals = this.options.values.slice();
7078
			for ( i = 0; i < vals.length; i += 1 ) {
7079
				vals[ i ] = this._trimAlignValue( vals[ i ] );
7080
			}
7081
7082
			return vals;
7083
		} else {
7084
			return [];
7085
		}
7086
	},
7087
7088
	// Returns the step-aligned value that val is closest to, between (inclusive) min and max
7089
	_trimAlignValue: function( val ) {
7090
		if ( val <= this._valueMin() ) {
7091
			return this._valueMin();
7092
		}
7093
		if ( val >= this._valueMax() ) {
7094
			return this._valueMax();
7095
		}
7096
		var step = ( this.options.step > 0 ) ? this.options.step : 1,
7097
			valModStep = ( val - this._valueMin() ) % step,
7098
			alignValue = val - valModStep;
7099
7100
		if ( Math.abs( valModStep ) * 2 >= step ) {
7101
			alignValue += ( valModStep > 0 ) ? step : ( -step );
7102
		}
7103
7104
		// Since JavaScript has problems with large floats, round
7105
		// the final value to 5 digits after the decimal point (see #4124)
7106
		return parseFloat( alignValue.toFixed( 5 ) );
7107
	},
7108
7109
	_calculateNewMax: function() {
7110
		var max = this.options.max,
7111
			min = this._valueMin(),
7112
			step = this.options.step,
7113
			aboveMin = Math.round( ( max - min ) / step ) * step;
7114
		max = aboveMin + min;
7115
		if ( max > this.options.max ) {
7116
7117
			//If max is not divisible by step, rounding off may increase its value
7118
			max -= step;
7119
		}
7120
		this.max = parseFloat( max.toFixed( this._precision() ) );
7121
	},
7122
7123
	_precision: function() {
7124
		var precision = this._precisionOf( this.options.step );
7125
		if ( this.options.min !== null ) {
7126
			precision = Math.max( precision, this._precisionOf( this.options.min ) );
7127
		}
7128
		return precision;
7129
	},
7130
7131
	_precisionOf: function( num ) {
7132
		var str = num.toString(),
7133
			decimal = str.indexOf( "." );
7134
		return decimal === -1 ? 0 : str.length - decimal - 1;
7135
	},
7136
7137
	_valueMin: function() {
7138
		return this.options.min;
7139
	},
7140
7141
	_valueMax: function() {
7142
		return this.max;
7143
	},
7144
7145
	_refreshRange: function( orientation ) {
7146
		if ( orientation === "vertical" ) {
7147
			this.range.css( { "width": "", "left": "" } );
7148
		}
7149
		if ( orientation === "horizontal" ) {
7150
			this.range.css( { "height": "", "bottom": "" } );
7151
		}
7152
	},
7153
7154
	_refreshValue: function() {
7155
		var lastValPercent, valPercent, value, valueMin, valueMax,
7156
			oRange = this.options.range,
7157
			o = this.options,
7158
			that = this,
7159
			animate = ( !this._animateOff ) ? o.animate : false,
7160
			_set = {};
7161
7162
		if ( this._hasMultipleValues() ) {
7163
			this.handles.each( function( i ) {
7164
				valPercent = ( that.values( i ) - that._valueMin() ) / ( that._valueMax() -
7165
					that._valueMin() ) * 100;
7166
				_set[ that.orientation === "horizontal" ? "left" : "bottom" ] = valPercent + "%";
7167
				$( this ).stop( 1, 1 )[ animate ? "animate" : "css" ]( _set, o.animate );
7168
				if ( that.options.range === true ) {
7169
					if ( that.orientation === "horizontal" ) {
7170
						if ( i === 0 ) {
7171
							that.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( {
7172
								left: valPercent + "%"
7173
							}, o.animate );
7174
						}
7175
						if ( i === 1 ) {
7176
							that.range[ animate ? "animate" : "css" ]( {
7177
								width: ( valPercent - lastValPercent ) + "%"
7178
							}, {
7179
								queue: false,
7180
								duration: o.animate
7181
							} );
7182
						}
7183
					} else {
7184
						if ( i === 0 ) {
7185
							that.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( {
7186
								bottom: ( valPercent ) + "%"
7187
							}, o.animate );
7188
						}
7189
						if ( i === 1 ) {
7190
							that.range[ animate ? "animate" : "css" ]( {
7191
								height: ( valPercent - lastValPercent ) + "%"
7192
							}, {
7193
								queue: false,
7194
								duration: o.animate
7195
							} );
7196
						}
7197
					}
7198
				}
7199
				lastValPercent = valPercent;
7200
			} );
7201
		} else {
7202
			value = this.value();
7203
			valueMin = this._valueMin();
7204
			valueMax = this._valueMax();
7205
			valPercent = ( valueMax !== valueMin ) ?
7206
					( value - valueMin ) / ( valueMax - valueMin ) * 100 :
7207
					0;
7208
			_set[ this.orientation === "horizontal" ? "left" : "bottom" ] = valPercent + "%";
7209
			this.handle.stop( 1, 1 )[ animate ? "animate" : "css" ]( _set, o.animate );
7210
7211
			if ( oRange === "min" && this.orientation === "horizontal" ) {
7212
				this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( {
7213
					width: valPercent + "%"
7214
				}, o.animate );
7215
			}
7216
			if ( oRange === "max" && this.orientation === "horizontal" ) {
7217
				this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( {
7218
					width: ( 100 - valPercent ) + "%"
7219
				}, o.animate );
7220
			}
7221
			if ( oRange === "min" && this.orientation === "vertical" ) {
7222
				this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( {
7223
					height: valPercent + "%"
7224
				}, o.animate );
7225
			}
7226
			if ( oRange === "max" && this.orientation === "vertical" ) {
7227
				this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( {
7228
					height: ( 100 - valPercent ) + "%"
7229
				}, o.animate );
7230
			}
7231
		}
7232
	},
7233
7234
	_handleEvents: {
7235
		keydown: function( event ) {
7236
			var allowed, curVal, newVal, step,
7237
				index = $( event.target ).data( "ui-slider-handle-index" );
7238
7239
			switch ( event.keyCode ) {
7240
				case $.ui.keyCode.HOME:
7241
				case $.ui.keyCode.END:
7242
				case $.ui.keyCode.PAGE_UP:
7243
				case $.ui.keyCode.PAGE_DOWN:
7244
				case $.ui.keyCode.UP:
7245
				case $.ui.keyCode.RIGHT:
7246
				case $.ui.keyCode.DOWN:
7247
				case $.ui.keyCode.LEFT:
7248
					event.preventDefault();
7249
					if ( !this._keySliding ) {
7250
						this._keySliding = true;
7251
						this._addClass( $( event.target ), null, "ui-state-active" );
7252
						allowed = this._start( event, index );
7253
						if ( allowed === false ) {
7254
							return;
7255
						}
7256
					}
7257
					break;
7258
			}
7259
7260
			step = this.options.step;
7261
			if ( this._hasMultipleValues() ) {
7262
				curVal = newVal = this.values( index );
7263
			} else {
7264
				curVal = newVal = this.value();
7265
			}
7266
7267
			switch ( event.keyCode ) {
7268
				case $.ui.keyCode.HOME:
7269
					newVal = this._valueMin();
7270
					break;
7271
				case $.ui.keyCode.END:
7272
					newVal = this._valueMax();
7273
					break;
7274
				case $.ui.keyCode.PAGE_UP:
7275
					newVal = this._trimAlignValue(
7276
						curVal + ( ( this._valueMax() - this._valueMin() ) / this.numPages )
7277
					);
7278
					break;
7279
				case $.ui.keyCode.PAGE_DOWN:
7280
					newVal = this._trimAlignValue(
7281
						curVal - ( ( this._valueMax() - this._valueMin() ) / this.numPages ) );
7282
					break;
7283
				case $.ui.keyCode.UP:
7284
				case $.ui.keyCode.RIGHT:
7285
					if ( curVal === this._valueMax() ) {
7286
						return;
7287
					}
7288
					newVal = this._trimAlignValue( curVal + step );
7289
					break;
7290
				case $.ui.keyCode.DOWN:
7291
				case $.ui.keyCode.LEFT:
7292
					if ( curVal === this._valueMin() ) {
7293
						return;
7294
					}
7295
					newVal = this._trimAlignValue( curVal - step );
7296
					break;
7297
			}
7298
7299
			this._slide( event, index, newVal );
7300
		},
7301
		keyup: function( event ) {
7302
			var index = $( event.target ).data( "ui-slider-handle-index" );
7303
7304
			if ( this._keySliding ) {
7305
				this._keySliding = false;
7306
				this._stop( event, index );
7307
				this._change( event, index );
7308
				this._removeClass( $( event.target ), null, "ui-state-active" );
7309
			}
7310
		}
7311
	}
7312
} );
7313
7314
7315
7316
7317
// Internal use only
7318
var escapeSelector = $.ui.escapeSelector = ( function() {
7319
	var selectorEscape = /([!"#$%&'()*+,./:;<=>?@[\]^`{|}~])/g;
7320
	return function( selector ) {
7321
		return selector.replace( selectorEscape, "\\$1" );
7322
	};
7323
} )();
7324
7325
7326
/*!
7327
 * jQuery UI Tabs 1.12.1
7328
 * http://jqueryui.com
7329
 *
7330
 * Copyright jQuery Foundation and other contributors
7331
 * Released under the MIT license.
7332
 * http://jquery.org/license
7333
 */
7334
7335
//>>label: Tabs
7336
//>>group: Widgets
7337
//>>description: Transforms a set of container elements into a tab structure.
7338
//>>docs: http://api.jqueryui.com/tabs/
7339
//>>demos: http://jqueryui.com/tabs/
7340
//>>css.structure: ../../themes/base/core.css
7341
//>>css.structure: ../../themes/base/tabs.css
7342
//>>css.theme: ../../themes/base/theme.css
7343
7344
7345
7346
$.widget( "ui.tabs", {
7347
	version: "1.12.1",
7348
	delay: 300,
7349
	options: {
7350
		active: null,
7351
		classes: {
7352
			"ui-tabs": "ui-corner-all",
7353
			"ui-tabs-nav": "ui-corner-all",
7354
			"ui-tabs-panel": "ui-corner-bottom",
7355
			"ui-tabs-tab": "ui-corner-top"
7356
		},
7357
		collapsible: false,
7358
		event: "click",
7359
		heightStyle: "content",
7360
		hide: null,
7361
		show: null,
7362
7363
		// Callbacks
7364
		activate: null,
7365
		beforeActivate: null,
7366
		beforeLoad: null,
7367
		load: null
7368
	},
7369
7370
	_isLocal: ( function() {
7371
		var rhash = /#.*$/;
7372
7373
		return function( anchor ) {
7374
			var anchorUrl, locationUrl;
7375
7376
			anchorUrl = anchor.href.replace( rhash, "" );
7377
			locationUrl = location.href.replace( rhash, "" );
7378
7379
			// Decoding may throw an error if the URL isn't UTF-8 (#9518)
7380
			try {
7381
				anchorUrl = decodeURIComponent( anchorUrl );
7382
			} catch ( error ) {}
7383
			try {
7384
				locationUrl = decodeURIComponent( locationUrl );
7385
			} catch ( error ) {}
7386
7387
			return anchor.hash.length > 1 && anchorUrl === locationUrl;
7388
		};
7389
	} )(),
7390
7391
	_create: function() {
7392
		var that = this,
7393
			options = this.options;
7394
7395
		this.running = false;
7396
7397
		this._addClass( "ui-tabs", "ui-widget ui-widget-content" );
7398
		this._toggleClass( "ui-tabs-collapsible", null, options.collapsible );
7399
7400
		this._processTabs();
7401
		options.active = this._initialActive();
7402
7403
		// Take disabling tabs via class attribute from HTML
7404
		// into account and update option properly.
7405
		if ( $.isArray( options.disabled ) ) {
7406
			options.disabled = $.unique( options.disabled.concat(
7407
				$.map( this.tabs.filter( ".ui-state-disabled" ), function( li ) {
7408
					return that.tabs.index( li );
7409
				} )
7410
			) ).sort();
7411
		}
7412
7413
		// Check for length avoids error when initializing empty list
7414
		if ( this.options.active !== false && this.anchors.length ) {
7415
			this.active = this._findActive( options.active );
7416
		} else {
7417
			this.active = $();
7418
		}
7419
7420
		this._refresh();
7421
7422
		if ( this.active.length ) {
7423
			this.load( options.active );
7424
		}
7425
	},
7426
7427
	_initialActive: function() {
7428
		var active = this.options.active,
7429
			collapsible = this.options.collapsible,
7430
			locationHash = location.hash.substring( 1 );
7431
7432
		if ( active === null ) {
7433
7434
			// check the fragment identifier in the URL
7435
			if ( locationHash ) {
7436
				this.tabs.each( function( i, tab ) {
7437
					if ( $( tab ).attr( "aria-controls" ) === locationHash ) {
7438
						active = i;
7439
						return false;
7440
					}
7441
				} );
7442
			}
7443
7444
			// Check for a tab marked active via a class
7445
			if ( active === null ) {
7446
				active = this.tabs.index( this.tabs.filter( ".ui-tabs-active" ) );
7447
			}
7448
7449
			// No active tab, set to false
7450
			if ( active === null || active === -1 ) {
7451
				active = this.tabs.length ? 0 : false;
7452
			}
7453
		}
7454
7455
		// Handle numbers: negative, out of range
7456
		if ( active !== false ) {
7457
			active = this.tabs.index( this.tabs.eq( active ) );
7458
			if ( active === -1 ) {
7459
				active = collapsible ? false : 0;
7460
			}
7461
		}
7462
7463
		// Don't allow collapsible: false and active: false
7464
		if ( !collapsible && active === false && this.anchors.length ) {
7465
			active = 0;
7466
		}
7467
7468
		return active;
7469
	},
7470
7471
	_getCreateEventData: function() {
7472
		return {
7473
			tab: this.active,
7474
			panel: !this.active.length ? $() : this._getPanelForTab( this.active )
7475
		};
7476
	},
7477
7478
	_tabKeydown: function( event ) {
7479
		var focusedTab = $( $.ui.safeActiveElement( this.document[ 0 ] ) ).closest( "li" ),
7480
			selectedIndex = this.tabs.index( focusedTab ),
7481
			goingForward = true;
7482
7483
		if ( this._handlePageNav( event ) ) {
7484
			return;
7485
		}
7486
7487
		switch ( event.keyCode ) {
7488
		case $.ui.keyCode.RIGHT:
7489
		case $.ui.keyCode.DOWN:
7490
			selectedIndex++;
7491
			break;
7492
		case $.ui.keyCode.UP:
7493
		case $.ui.keyCode.LEFT:
7494
			goingForward = false;
7495
			selectedIndex--;
7496
			break;
7497
		case $.ui.keyCode.END:
7498
			selectedIndex = this.anchors.length - 1;
7499
			break;
7500
		case $.ui.keyCode.HOME:
7501
			selectedIndex = 0;
7502
			break;
7503
		case $.ui.keyCode.SPACE:
7504
7505
			// Activate only, no collapsing
7506
			event.preventDefault();
7507
			clearTimeout( this.activating );
7508
			this._activate( selectedIndex );
7509
			return;
7510
		case $.ui.keyCode.ENTER:
7511
7512
			// Toggle (cancel delayed activation, allow collapsing)
7513
			event.preventDefault();
7514
			clearTimeout( this.activating );
7515
7516
			// Determine if we should collapse or activate
7517
			this._activate( selectedIndex === this.options.active ? false : selectedIndex );
7518
			return;
7519
		default:
7520
			return;
7521
		}
7522
7523
		// Focus the appropriate tab, based on which key was pressed
7524
		event.preventDefault();
7525
		clearTimeout( this.activating );
7526
		selectedIndex = this._focusNextTab( selectedIndex, goingForward );
7527
7528
		// Navigating with control/command key will prevent automatic activation
7529
		if ( !event.ctrlKey && !event.metaKey ) {
7530
7531
			// Update aria-selected immediately so that AT think the tab is already selected.
7532
			// Otherwise AT may confuse the user by stating that they need to activate the tab,
7533
			// but the tab will already be activated by the time the announcement finishes.
7534
			focusedTab.attr( "aria-selected", "false" );
7535
			this.tabs.eq( selectedIndex ).attr( "aria-selected", "true" );
7536
7537
			this.activating = this._delay( function() {
7538
				this.option( "active", selectedIndex );
7539
			}, this.delay );
7540
		}
7541
	},
7542
7543
	_panelKeydown: function( event ) {
7544
		if ( this._handlePageNav( event ) ) {
7545
			return;
7546
		}
7547
7548
		// Ctrl+up moves focus to the current tab
7549
		if ( event.ctrlKey && event.keyCode === $.ui.keyCode.UP ) {
7550
			event.preventDefault();
7551
			this.active.trigger( "focus" );
7552
		}
7553
	},
7554
7555
	// Alt+page up/down moves focus to the previous/next tab (and activates)
7556
	_handlePageNav: function( event ) {
7557
		if ( event.altKey && event.keyCode === $.ui.keyCode.PAGE_UP ) {
7558
			this._activate( this._focusNextTab( this.options.active - 1, false ) );
7559
			return true;
7560
		}
7561
		if ( event.altKey && event.keyCode === $.ui.keyCode.PAGE_DOWN ) {
7562
			this._activate( this._focusNextTab( this.options.active + 1, true ) );
7563
			return true;
7564
		}
7565
	},
7566
7567
	_findNextTab: function( index, goingForward ) {
7568
		var lastTabIndex = this.tabs.length - 1;
7569
7570
		function constrain() {
7571
			if ( index > lastTabIndex ) {
7572
				index = 0;
7573
			}
7574
			if ( index < 0 ) {
7575
				index = lastTabIndex;
7576
			}
7577
			return index;
7578
		}
7579
7580
		while ( $.inArray( constrain(), this.options.disabled ) !== -1 ) {
7581
			index = goingForward ? index + 1 : index - 1;
7582
		}
7583
7584
		return index;
7585
	},
7586
7587
	_focusNextTab: function( index, goingForward ) {
7588
		index = this._findNextTab( index, goingForward );
7589
		this.tabs.eq( index ).trigger( "focus" );
7590
		return index;
7591
	},
7592
7593
	_setOption: function( key, value ) {
7594
		if ( key === "active" ) {
7595
7596
			// _activate() will handle invalid values and update this.options
7597
			this._activate( value );
7598
			return;
7599
		}
7600
7601
		this._super( key, value );
7602
7603
		if ( key === "collapsible" ) {
7604
			this._toggleClass( "ui-tabs-collapsible", null, value );
7605
7606
			// Setting collapsible: false while collapsed; open first panel
7607
			if ( !value && this.options.active === false ) {
7608
				this._activate( 0 );
7609
			}
7610
		}
7611
7612
		if ( key === "event" ) {
7613
			this._setupEvents( value );
7614
		}
7615
7616
		if ( key === "heightStyle" ) {
7617
			this._setupHeightStyle( value );
7618
		}
7619
	},
7620
7621
	_sanitizeSelector: function( hash ) {
7622
		return hash ? hash.replace( /[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g, "\\$&" ) : "";
7623
	},
7624
7625
	refresh: function() {
7626
		var options = this.options,
7627
			lis = this.tablist.children( ":has(a[href])" );
7628
7629
		// Get disabled tabs from class attribute from HTML
7630
		// this will get converted to a boolean if needed in _refresh()
7631
		options.disabled = $.map( lis.filter( ".ui-state-disabled" ), function( tab ) {
7632
			return lis.index( tab );
7633
		} );
7634
7635
		this._processTabs();
7636
7637
		// Was collapsed or no tabs
7638
		if ( options.active === false || !this.anchors.length ) {
7639
			options.active = false;
7640
			this.active = $();
7641
7642
		// was active, but active tab is gone
7643
		} else if ( this.active.length && !$.contains( this.tablist[ 0 ], this.active[ 0 ] ) ) {
7644
7645
			// all remaining tabs are disabled
7646
			if ( this.tabs.length === options.disabled.length ) {
7647
				options.active = false;
7648
				this.active = $();
7649
7650
			// activate previous tab
7651
			} else {
7652
				this._activate( this._findNextTab( Math.max( 0, options.active - 1 ), false ) );
7653
			}
7654
7655
		// was active, active tab still exists
7656
		} else {
7657
7658
			// make sure active index is correct
7659
			options.active = this.tabs.index( this.active );
7660
		}
7661
7662
		this._refresh();
7663
	},
7664
7665
	_refresh: function() {
7666
		this._setOptionDisabled( this.options.disabled );
7667
		this._setupEvents( this.options.event );
7668
		this._setupHeightStyle( this.options.heightStyle );
7669
7670
		this.tabs.not( this.active ).attr( {
7671
			"aria-selected": "false",
7672
			"aria-expanded": "false",
7673
			tabIndex: -1
7674
		} );
7675
		this.panels.not( this._getPanelForTab( this.active ) )
7676
			.hide()
7677
			.attr( {
7678
				"aria-hidden": "true"
7679
			} );
7680
7681
		// Make sure one tab is in the tab order
7682
		if ( !this.active.length ) {
7683
			this.tabs.eq( 0 ).attr( "tabIndex", 0 );
7684
		} else {
7685
			this.active
7686
				.attr( {
7687
					"aria-selected": "true",
7688
					"aria-expanded": "true",
7689
					tabIndex: 0
7690
				} );
7691
			this._addClass( this.active, "ui-tabs-active", "ui-state-active" );
7692
			this._getPanelForTab( this.active )
7693
				.show()
7694
				.attr( {
7695
					"aria-hidden": "false"
7696
				} );
7697
		}
7698
	},
7699
7700
	_processTabs: function() {
7701
		var that = this,
7702
			prevTabs = this.tabs,
7703
			prevAnchors = this.anchors,
7704
			prevPanels = this.panels;
7705
7706
		this.tablist = this._getList().attr( "role", "tablist" );
7707
		this._addClass( this.tablist, "ui-tabs-nav",
7708
			"ui-helper-reset ui-helper-clearfix ui-widget-header" );
7709
7710
		// Prevent users from focusing disabled tabs via click
7711
		this.tablist
7712
			.on( "mousedown" + this.eventNamespace, "> li", function( event ) {
7713
				if ( $( this ).is( ".ui-state-disabled" ) ) {
7714
					event.preventDefault();
7715
				}
7716
			} )
7717
7718
			// Support: IE <9
7719
			// Preventing the default action in mousedown doesn't prevent IE
7720
			// from focusing the element, so if the anchor gets focused, blur.
7721
			// We don't have to worry about focusing the previously focused
7722
			// element since clicking on a non-focusable element should focus
7723
			// the body anyway.
7724
			.on( "focus" + this.eventNamespace, ".ui-tabs-anchor", function() {
7725
				if ( $( this ).closest( "li" ).is( ".ui-state-disabled" ) ) {
7726
					this.blur();
7727
				}
7728
			} );
7729
7730
		this.tabs = this.tablist.find( "> li:has(a[href])" )
7731
			.attr( {
7732
				role: "tab",
7733
				tabIndex: -1
7734
			} );
7735
		this._addClass( this.tabs, "ui-tabs-tab", "ui-state-default" );
7736
7737
		this.anchors = this.tabs.map( function() {
7738
			return $( "a", this )[ 0 ];
7739
		} )
7740
			.attr( {
7741
				role: "presentation",
7742
				tabIndex: -1
7743
			} );
7744
		this._addClass( this.anchors, "ui-tabs-anchor" );
7745
7746
		this.panels = $();
7747
7748
		this.anchors.each( function( i, anchor ) {
7749
			var selector, panel, panelId,
7750
				anchorId = $( anchor ).uniqueId().attr( "id" ),
7751
				tab = $( anchor ).closest( "li" ),
7752
				originalAriaControls = tab.attr( "aria-controls" );
7753
7754
			// Inline tab
7755
			if ( that._isLocal( anchor ) ) {
7756
				selector = anchor.hash;
7757
				panelId = selector.substring( 1 );
7758
				panel = that.element.find( that._sanitizeSelector( selector ) );
7759
7760
			// remote tab
7761
			} else {
7762
7763
				// If the tab doesn't already have aria-controls,
7764
				// generate an id by using a throw-away element
7765
				panelId = tab.attr( "aria-controls" ) || $( {} ).uniqueId()[ 0 ].id;
7766
				selector = "#" + panelId;
7767
				panel = that.element.find( selector );
7768
				if ( !panel.length ) {
7769
					panel = that._createPanel( panelId );
7770
					panel.insertAfter( that.panels[ i - 1 ] || that.tablist );
7771
				}
7772
				panel.attr( "aria-live", "polite" );
7773
			}
7774
7775
			if ( panel.length ) {
7776
				that.panels = that.panels.add( panel );
7777
			}
7778
			if ( originalAriaControls ) {
7779
				tab.data( "ui-tabs-aria-controls", originalAriaControls );
7780
			}
7781
			tab.attr( {
7782
				"aria-controls": panelId,
7783
				"aria-labelledby": anchorId
7784
			} );
7785
			panel.attr( "aria-labelledby", anchorId );
7786
		} );
7787
7788
		this.panels.attr( "role", "tabpanel" );
7789
		this._addClass( this.panels, "ui-tabs-panel", "ui-widget-content" );
7790
7791
		// Avoid memory leaks (#10056)
7792
		if ( prevTabs ) {
7793
			this._off( prevTabs.not( this.tabs ) );
7794
			this._off( prevAnchors.not( this.anchors ) );
7795
			this._off( prevPanels.not( this.panels ) );
7796
		}
7797
	},
7798
7799
	// Allow overriding how to find the list for rare usage scenarios (#7715)
7800
	_getList: function() {
7801
		return this.tablist || this.element.find( "ol, ul" ).eq( 0 );
7802
	},
7803
7804
	_createPanel: function( id ) {
7805
		return $( "<div>" )
7806
			.attr( "id", id )
7807
			.data( "ui-tabs-destroy", true );
7808
	},
7809
7810
	_setOptionDisabled: function( disabled ) {
7811
		var currentItem, li, i;
7812
7813
		if ( $.isArray( disabled ) ) {
7814
			if ( !disabled.length ) {
7815
				disabled = false;
7816
			} else if ( disabled.length === this.anchors.length ) {
7817
				disabled = true;
7818
			}
7819
		}
7820
7821
		// Disable tabs
7822
		for ( i = 0; ( li = this.tabs[ i ] ); i++ ) {
7823
			currentItem = $( li );
7824
			if ( disabled === true || $.inArray( i, disabled ) !== -1 ) {
7825
				currentItem.attr( "aria-disabled", "true" );
7826
				this._addClass( currentItem, null, "ui-state-disabled" );
7827
			} else {
7828
				currentItem.removeAttr( "aria-disabled" );
7829
				this._removeClass( currentItem, null, "ui-state-disabled" );
7830
			}
7831
		}
7832
7833
		this.options.disabled = disabled;
7834
7835
		this._toggleClass( this.widget(), this.widgetFullName + "-disabled", null,
7836
			disabled === true );
7837
	},
7838
7839
	_setupEvents: function( event ) {
7840
		var events = {};
7841
		if ( event ) {
7842
			$.each( event.split( " " ), function( index, eventName ) {
7843
				events[ eventName ] = "_eventHandler";
7844
			} );
7845
		}
7846
7847
		this._off( this.anchors.add( this.tabs ).add( this.panels ) );
7848
7849
		// Always prevent the default action, even when disabled
7850
		this._on( true, this.anchors, {
7851
			click: function( event ) {
7852
				event.preventDefault();
7853
			}
7854
		} );
7855
		this._on( this.anchors, events );
7856
		this._on( this.tabs, { keydown: "_tabKeydown" } );
7857
		this._on( this.panels, { keydown: "_panelKeydown" } );
7858
7859
		this._focusable( this.tabs );
7860
		this._hoverable( this.tabs );
7861
	},
7862
7863
	_setupHeightStyle: function( heightStyle ) {
7864
		var maxHeight,
7865
			parent = this.element.parent();
7866
7867
		if ( heightStyle === "fill" ) {
7868
			maxHeight = parent.height();
7869
			maxHeight -= this.element.outerHeight() - this.element.height();
7870
7871
			this.element.siblings( ":visible" ).each( function() {
7872
				var elem = $( this ),
7873
					position = elem.css( "position" );
7874
7875
				if ( position === "absolute" || position === "fixed" ) {
7876
					return;
7877
				}
7878
				maxHeight -= elem.outerHeight( true );
7879
			} );
7880
7881
			this.element.children().not( this.panels ).each( function() {
7882
				maxHeight -= $( this ).outerHeight( true );
7883
			} );
7884
7885
			this.panels.each( function() {
7886
				$( this ).height( Math.max( 0, maxHeight -
7887
					$( this ).innerHeight() + $( this ).height() ) );
7888
			} )
7889
				.css( "overflow", "auto" );
7890
		} else if ( heightStyle === "auto" ) {
7891
			maxHeight = 0;
7892
			this.panels.each( function() {
7893
				maxHeight = Math.max( maxHeight, $( this ).height( "" ).height() );
7894
			} ).height( maxHeight );
7895
		}
7896
	},
7897
7898
	_eventHandler: function( event ) {
7899
		var options = this.options,
7900
			active = this.active,
7901
			anchor = $( event.currentTarget ),
7902
			tab = anchor.closest( "li" ),
7903
			clickedIsActive = tab[ 0 ] === active[ 0 ],
7904
			collapsing = clickedIsActive && options.collapsible,
7905
			toShow = collapsing ? $() : this._getPanelForTab( tab ),
7906
			toHide = !active.length ? $() : this._getPanelForTab( active ),
7907
			eventData = {
7908
				oldTab: active,
7909
				oldPanel: toHide,
7910
				newTab: collapsing ? $() : tab,
7911
				newPanel: toShow
7912
			};
7913
7914
		event.preventDefault();
7915
7916
		if ( tab.hasClass( "ui-state-disabled" ) ||
7917
7918
				// tab is already loading
7919
				tab.hasClass( "ui-tabs-loading" ) ||
7920
7921
				// can't switch durning an animation
7922
				this.running ||
7923
7924
				// click on active header, but not collapsible
7925
				( clickedIsActive && !options.collapsible ) ||
7926
7927
				// allow canceling activation
7928
				( this._trigger( "beforeActivate", event, eventData ) === false ) ) {
7929
			return;
7930
		}
7931
7932
		options.active = collapsing ? false : this.tabs.index( tab );
7933
7934
		this.active = clickedIsActive ? $() : tab;
7935
		if ( this.xhr ) {
7936
			this.xhr.abort();
7937
		}
7938
7939
		if ( !toHide.length && !toShow.length ) {
7940
			$.error( "jQuery UI Tabs: Mismatching fragment identifier." );
7941
		}
7942
7943
		if ( toShow.length ) {
7944
			this.load( this.tabs.index( tab ), event );
7945
		}
7946
		this._toggle( event, eventData );
7947
	},
7948
7949
	// Handles show/hide for selecting tabs
7950
	_toggle: function( event, eventData ) {
7951
		var that = this,
7952
			toShow = eventData.newPanel,
7953
			toHide = eventData.oldPanel;
7954
7955
		this.running = true;
7956
7957
		function complete() {
7958
			that.running = false;
7959
			that._trigger( "activate", event, eventData );
7960
		}
7961
7962
		function show() {
7963
			that._addClass( eventData.newTab.closest( "li" ), "ui-tabs-active", "ui-state-active" );
7964
7965
			if ( toShow.length && that.options.show ) {
7966
				that._show( toShow, that.options.show, complete );
7967
			} else {
7968
				toShow.show();
7969
				complete();
7970
			}
7971
		}
7972
7973
		// Start out by hiding, then showing, then completing
7974
		if ( toHide.length && this.options.hide ) {
7975
			this._hide( toHide, this.options.hide, function() {
7976
				that._removeClass( eventData.oldTab.closest( "li" ),
7977
					"ui-tabs-active", "ui-state-active" );
7978
				show();
7979
			} );
7980
		} else {
7981
			this._removeClass( eventData.oldTab.closest( "li" ),
7982
				"ui-tabs-active", "ui-state-active" );
7983
			toHide.hide();
7984
			show();
7985
		}
7986
7987
		toHide.attr( "aria-hidden", "true" );
7988
		eventData.oldTab.attr( {
7989
			"aria-selected": "false",
7990
			"aria-expanded": "false"
7991
		} );
7992
7993
		// If we're switching tabs, remove the old tab from the tab order.
7994
		// If we're opening from collapsed state, remove the previous tab from the tab order.
7995
		// If we're collapsing, then keep the collapsing tab in the tab order.
7996
		if ( toShow.length && toHide.length ) {
7997
			eventData.oldTab.attr( "tabIndex", -1 );
7998
		} else if ( toShow.length ) {
7999
			this.tabs.filter( function() {
8000
				return $( this ).attr( "tabIndex" ) === 0;
8001
			} )
8002
				.attr( "tabIndex", -1 );
8003
		}
8004
8005
		toShow.attr( "aria-hidden", "false" );
8006
		eventData.newTab.attr( {
8007
			"aria-selected": "true",
8008
			"aria-expanded": "true",
8009
			tabIndex: 0
8010
		} );
8011
	},
8012
8013
	_activate: function( index ) {
8014
		var anchor,
8015
			active = this._findActive( index );
8016
8017
		// Trying to activate the already active panel
8018
		if ( active[ 0 ] === this.active[ 0 ] ) {
8019
			return;
8020
		}
8021
8022
		// Trying to collapse, simulate a click on the current active header
8023
		if ( !active.length ) {
8024
			active = this.active;
8025
		}
8026
8027
		anchor = active.find( ".ui-tabs-anchor" )[ 0 ];
8028
		this._eventHandler( {
8029
			target: anchor,
8030
			currentTarget: anchor,
8031
			preventDefault: $.noop
8032
		} );
8033
	},
8034
8035
	_findActive: function( index ) {
8036
		return index === false ? $() : this.tabs.eq( index );
8037
	},
8038
8039
	_getIndex: function( index ) {
8040
8041
		// meta-function to give users option to provide a href string instead of a numerical index.
8042
		if ( typeof index === "string" ) {
8043
			index = this.anchors.index( this.anchors.filter( "[href$='" +
8044
				$.ui.escapeSelector( index ) + "']" ) );
8045
		}
8046
8047
		return index;
8048
	},
8049
8050
	_destroy: function() {
8051
		if ( this.xhr ) {
8052
			this.xhr.abort();
8053
		}
8054
8055
		this.tablist
8056
			.removeAttr( "role" )
8057
			.off( this.eventNamespace );
8058
8059
		this.anchors
8060
			.removeAttr( "role tabIndex" )
8061
			.removeUniqueId();
8062
8063
		this.tabs.add( this.panels ).each( function() {
8064
			if ( $.data( this, "ui-tabs-destroy" ) ) {
8065
				$( this ).remove();
8066
			} else {
8067
				$( this ).removeAttr( "role tabIndex " +
8068
					"aria-live aria-busy aria-selected aria-labelledby aria-hidden aria-expanded" );
8069
			}
8070
		} );
8071
8072
		this.tabs.each( function() {
8073
			var li = $( this ),
8074
				prev = li.data( "ui-tabs-aria-controls" );
8075
			if ( prev ) {
8076
				li
8077
					.attr( "aria-controls", prev )
8078
					.removeData( "ui-tabs-aria-controls" );
8079
			} else {
8080
				li.removeAttr( "aria-controls" );
8081
			}
8082
		} );
8083
8084
		this.panels.show();
8085
8086
		if ( this.options.heightStyle !== "content" ) {
8087
			this.panels.css( "height", "" );
8088
		}
8089
	},
8090
8091
	enable: function( index ) {
8092
		var disabled = this.options.disabled;
8093
		if ( disabled === false ) {
8094
			return;
8095
		}
8096
8097
		if ( index === undefined ) {
8098
			disabled = false;
8099
		} else {
8100
			index = this._getIndex( index );
8101
			if ( $.isArray( disabled ) ) {
8102
				disabled = $.map( disabled, function( num ) {
8103
					return num !== index ? num : null;
8104
				} );
8105
			} else {
8106
				disabled = $.map( this.tabs, function( li, num ) {
8107
					return num !== index ? num : null;
8108
				} );
8109
			}
8110
		}
8111
		this._setOptionDisabled( disabled );
8112
	},
8113
8114
	disable: function( index ) {
8115
		var disabled = this.options.disabled;
8116
		if ( disabled === true ) {
8117
			return;
8118
		}
8119
8120
		if ( index === undefined ) {
8121
			disabled = true;
8122
		} else {
8123
			index = this._getIndex( index );
8124
			if ( $.inArray( index, disabled ) !== -1 ) {
8125
				return;
8126
			}
8127
			if ( $.isArray( disabled ) ) {
8128
				disabled = $.merge( [ index ], disabled ).sort();
8129
			} else {
8130
				disabled = [ index ];
8131
			}
8132
		}
8133
		this._setOptionDisabled( disabled );
8134
	},
8135
8136
	load: function( index, event ) {
8137
		index = this._getIndex( index );
8138
		var that = this,
8139
			tab = this.tabs.eq( index ),
8140
			anchor = tab.find( ".ui-tabs-anchor" ),
8141
			panel = this._getPanelForTab( tab ),
8142
			eventData = {
8143
				tab: tab,
8144
				panel: panel
8145
			},
8146
			complete = function( jqXHR, status ) {
8147
				if ( status === "abort" ) {
8148
					that.panels.stop( false, true );
8149
				}
8150
8151
				that._removeClass( tab, "ui-tabs-loading" );
8152
				panel.removeAttr( "aria-busy" );
8153
8154
				if ( jqXHR === that.xhr ) {
8155
					delete that.xhr;
8156
				}
8157
			};
8158
8159
		// Not remote
8160
		if ( this._isLocal( anchor[ 0 ] ) ) {
8161
			return;
8162
		}
8163
8164
		this.xhr = $.ajax( this._ajaxSettings( anchor, event, eventData ) );
8165
8166
		// Support: jQuery <1.8
8167
		// jQuery <1.8 returns false if the request is canceled in beforeSend,
8168
		// but as of 1.8, $.ajax() always returns a jqXHR object.
8169
		if ( this.xhr && this.xhr.statusText !== "canceled" ) {
8170
			this._addClass( tab, "ui-tabs-loading" );
8171
			panel.attr( "aria-busy", "true" );
8172
8173
			this.xhr
8174
				.done( function( response, status, jqXHR ) {
8175
8176
					// support: jQuery <1.8
8177
					// http://bugs.jquery.com/ticket/11778
8178
					setTimeout( function() {
8179
						panel.html( response );
8180
						that._trigger( "load", event, eventData );
8181
8182
						complete( jqXHR, status );
8183
					}, 1 );
8184
				} )
8185
				.fail( function( jqXHR, status ) {
8186
8187
					// support: jQuery <1.8
8188
					// http://bugs.jquery.com/ticket/11778
8189
					setTimeout( function() {
8190
						complete( jqXHR, status );
8191
					}, 1 );
8192
				} );
8193
		}
8194
	},
8195
8196
	_ajaxSettings: function( anchor, event, eventData ) {
8197
		var that = this;
8198
		return {
8199
8200
			// Support: IE <11 only
8201
			// Strip any hash that exists to prevent errors with the Ajax request
8202
			url: anchor.attr( "href" ).replace( /#.*$/, "" ),
8203
			beforeSend: function( jqXHR, settings ) {
8204
				return that._trigger( "beforeLoad", event,
8205
					$.extend( { jqXHR: jqXHR, ajaxSettings: settings }, eventData ) );
8206
			}
8207
		};
8208
	},
8209
8210
	_getPanelForTab: function( tab ) {
8211
		var id = $( tab ).attr( "aria-controls" );
8212
		return this.element.find( this._sanitizeSelector( "#" + id ) );
8213
	}
8214
} );
8215
8216
// DEPRECATED
8217
// TODO: Switch return back to widget declaration at top of file when this is removed
8218
if ( $.uiBackCompat !== false ) {
8219
8220
	// Backcompat for ui-tab class (now ui-tabs-tab)
8221
	$.widget( "ui.tabs", $.ui.tabs, {
8222
		_processTabs: function() {
8223
			this._superApply( arguments );
8224
			this._addClass( this.tabs, "ui-tab" );
8225
		}
8226
	} );
8227
}
8228
8229
var widgetsTabs = $.ui.tabs;
8230
8231
8232
/*!
8233
 * jQuery UI Tooltip 1.12.1
8234
 * http://jqueryui.com
8235
 *
8236
 * Copyright jQuery Foundation and other contributors
8237
 * Released under the MIT license.
8238
 * http://jquery.org/license
8239
 */
8240
8241
//>>label: Tooltip
8242
//>>group: Widgets
8243
//>>description: Shows additional information for any element on hover or focus.
8244
//>>docs: http://api.jqueryui.com/tooltip/
8245
//>>demos: http://jqueryui.com/tooltip/
8246
//>>css.structure: ../../themes/base/core.css
8247
//>>css.structure: ../../themes/base/tooltip.css
8248
//>>css.theme: ../../themes/base/theme.css
8249
8250
8251
8252
$.widget( "ui.tooltip", {
8253
	version: "1.12.1",
8254
	options: {
8255
		classes: {
8256
			"ui-tooltip": "ui-corner-all ui-widget-shadow"
8257
		},
8258
		content: function() {
8259
8260
			// support: IE<9, Opera in jQuery <1.7
8261
			// .text() can't accept undefined, so coerce to a string
8262
			var title = $( this ).attr( "title" ) || "";
8263
8264
			// Escape title, since we're going from an attribute to raw HTML
8265
			return $( "<a>" ).text( title ).html();
8266
		},
8267
		hide: true,
8268
8269
		// Disabled elements have inconsistent behavior across browsers (#8661)
8270
		items: "[title]:not([disabled])",
8271
		position: {
8272
			my: "left top+15",
8273
			at: "left bottom",
8274
			collision: "flipfit flip"
8275
		},
8276
		show: true,
8277
		track: false,
8278
8279
		// Callbacks
8280
		close: null,
8281
		open: null
8282
	},
8283
8284
	_addDescribedBy: function( elem, id ) {
8285
		var describedby = ( elem.attr( "aria-describedby" ) || "" ).split( /\s+/ );
8286
		describedby.push( id );
8287
		elem
8288
			.data( "ui-tooltip-id", id )
8289
			.attr( "aria-describedby", $.trim( describedby.join( " " ) ) );
8290
	},
8291
8292
	_removeDescribedBy: function( elem ) {
8293
		var id = elem.data( "ui-tooltip-id" ),
8294
			describedby = ( elem.attr( "aria-describedby" ) || "" ).split( /\s+/ ),
8295
			index = $.inArray( id, describedby );
8296
8297
		if ( index !== -1 ) {
8298
			describedby.splice( index, 1 );
8299
		}
8300
8301
		elem.removeData( "ui-tooltip-id" );
8302
		describedby = $.trim( describedby.join( " " ) );
8303
		if ( describedby ) {
8304
			elem.attr( "aria-describedby", describedby );
8305
		} else {
8306
			elem.removeAttr( "aria-describedby" );
8307
		}
8308
	},
8309
8310
	_create: function() {
8311
		this._on( {
8312
			mouseover: "open",
8313
			focusin: "open"
8314
		} );
8315
8316
		// IDs of generated tooltips, needed for destroy
8317
		this.tooltips = {};
8318
8319
		// IDs of parent tooltips where we removed the title attribute
8320
		this.parents = {};
8321
8322
		// Append the aria-live region so tooltips announce correctly
8323
		this.liveRegion = $( "<div>" )
8324
			.attr( {
8325
				role: "log",
8326
				"aria-live": "assertive",
8327
				"aria-relevant": "additions"
8328
			} )
8329
			.appendTo( this.document[ 0 ].body );
8330
		this._addClass( this.liveRegion, null, "ui-helper-hidden-accessible" );
8331
8332
		this.disabledTitles = $( [] );
8333
	},
8334
8335
	_setOption: function( key, value ) {
8336
		var that = this;
8337
8338
		this._super( key, value );
8339
8340
		if ( key === "content" ) {
8341
			$.each( this.tooltips, function( id, tooltipData ) {
8342
				that._updateContent( tooltipData.element );
8343
			} );
8344
		}
8345
	},
8346
8347
	_setOptionDisabled: function( value ) {
8348
		this[ value ? "_disable" : "_enable" ]();
8349
	},
8350
8351
	_disable: function() {
8352
		var that = this;
8353
8354
		// Close open tooltips
8355
		$.each( this.tooltips, function( id, tooltipData ) {
8356
			var event = $.Event( "blur" );
8357
			event.target = event.currentTarget = tooltipData.element[ 0 ];
8358
			that.close( event, true );
8359
		} );
8360
8361
		// Remove title attributes to prevent native tooltips
8362
		this.disabledTitles = this.disabledTitles.add(
8363
			this.element.find( this.options.items ).addBack()
8364
				.filter( function() {
8365
					var element = $( this );
8366
					if ( element.is( "[title]" ) ) {
8367
						return element
8368
							.data( "ui-tooltip-title", element.attr( "title" ) )
8369
							.removeAttr( "title" );
8370
					}
8371
				} )
8372
		);
8373
	},
8374
8375
	_enable: function() {
8376
8377
		// restore title attributes
8378
		this.disabledTitles.each( function() {
8379
			var element = $( this );
8380
			if ( element.data( "ui-tooltip-title" ) ) {
8381
				element.attr( "title", element.data( "ui-tooltip-title" ) );
8382
			}
8383
		} );
8384
		this.disabledTitles = $( [] );
8385
	},
8386
8387
	open: function( event ) {
8388
		var that = this,
8389
			target = $( event ? event.target : this.element )
8390
8391
				// we need closest here due to mouseover bubbling,
8392
				// but always pointing at the same event target
8393
				.closest( this.options.items );
8394
8395
		// No element to show a tooltip for or the tooltip is already open
8396
		if ( !target.length || target.data( "ui-tooltip-id" ) ) {
8397
			return;
8398
		}
8399
8400
		if ( target.attr( "title" ) ) {
8401
			target.data( "ui-tooltip-title", target.attr( "title" ) );
8402
		}
8403
8404
		target.data( "ui-tooltip-open", true );
8405
8406
		// Kill parent tooltips, custom or native, for hover
8407
		if ( event && event.type === "mouseover" ) {
8408
			target.parents().each( function() {
8409
				var parent = $( this ),
8410
					blurEvent;
8411
				if ( parent.data( "ui-tooltip-open" ) ) {
8412
					blurEvent = $.Event( "blur" );
8413
					blurEvent.target = blurEvent.currentTarget = this;
8414
					that.close( blurEvent, true );
8415
				}
8416
				if ( parent.attr( "title" ) ) {
8417
					parent.uniqueId();
8418
					that.parents[ this.id ] = {
8419
						element: this,
8420
						title: parent.attr( "title" )
8421
					};
8422
					parent.attr( "title", "" );
8423
				}
8424
			} );
8425
		}
8426
8427
		this._registerCloseHandlers( event, target );
8428
		this._updateContent( target, event );
8429
	},
8430
8431
	_updateContent: function( target, event ) {
8432
		var content,
8433
			contentOption = this.options.content,
8434
			that = this,
8435
			eventType = event ? event.type : null;
8436
8437
		if ( typeof contentOption === "string" || contentOption.nodeType ||
8438
				contentOption.jquery ) {
8439
			return this._open( event, target, contentOption );
8440
		}
8441
8442
		content = contentOption.call( target[ 0 ], function( response ) {
8443
8444
			// IE may instantly serve a cached response for ajax requests
8445
			// delay this call to _open so the other call to _open runs first
8446
			that._delay( function() {
8447
8448
				// Ignore async response if tooltip was closed already
8449
				if ( !target.data( "ui-tooltip-open" ) ) {
8450
					return;
8451
				}
8452
8453
				// JQuery creates a special event for focusin when it doesn't
8454
				// exist natively. To improve performance, the native event
8455
				// object is reused and the type is changed. Therefore, we can't
8456
				// rely on the type being correct after the event finished
8457
				// bubbling, so we set it back to the previous value. (#8740)
8458
				if ( event ) {
8459
					event.type = eventType;
8460
				}
8461
				this._open( event, target, response );
8462
			} );
8463
		} );
8464
		if ( content ) {
8465
			this._open( event, target, content );
8466
		}
8467
	},
8468
8469
	_open: function( event, target, content ) {
8470
		var tooltipData, tooltip, delayedShow, a11yContent,
8471
			positionOption = $.extend( {}, this.options.position );
8472
8473
		if ( !content ) {
8474
			return;
8475
		}
8476
8477
		// Content can be updated multiple times. If the tooltip already
8478
		// exists, then just update the content and bail.
8479
		tooltipData = this._find( target );
8480
		if ( tooltipData ) {
8481
			tooltipData.tooltip.find( ".ui-tooltip-content" ).html( content );
8482
			return;
8483
		}
8484
8485
		// If we have a title, clear it to prevent the native tooltip
8486
		// we have to check first to avoid defining a title if none exists
8487
		// (we don't want to cause an element to start matching [title])
8488
		//
8489
		// We use removeAttr only for key events, to allow IE to export the correct
8490
		// accessible attributes. For mouse events, set to empty string to avoid
8491
		// native tooltip showing up (happens only when removing inside mouseover).
8492
		if ( target.is( "[title]" ) ) {
8493
			if ( event && event.type === "mouseover" ) {
8494
				target.attr( "title", "" );
8495
			} else {
8496
				target.removeAttr( "title" );
8497
			}
8498
		}
8499
8500
		tooltipData = this._tooltip( target );
8501
		tooltip = tooltipData.tooltip;
8502
		this._addDescribedBy( target, tooltip.attr( "id" ) );
8503
		tooltip.find( ".ui-tooltip-content" ).html( content );
8504
8505
		// Support: Voiceover on OS X, JAWS on IE <= 9
8506
		// JAWS announces deletions even when aria-relevant="additions"
8507
		// Voiceover will sometimes re-read the entire log region's contents from the beginning
8508
		this.liveRegion.children().hide();
8509
		a11yContent = $( "<div>" ).html( tooltip.find( ".ui-tooltip-content" ).html() );
8510
		a11yContent.removeAttr( "name" ).find( "[name]" ).removeAttr( "name" );
8511
		a11yContent.removeAttr( "id" ).find( "[id]" ).removeAttr( "id" );
8512
		a11yContent.appendTo( this.liveRegion );
8513
8514
		function position( event ) {
8515
			positionOption.of = event;
8516
			if ( tooltip.is( ":hidden" ) ) {
8517
				return;
8518
			}
8519
			tooltip.position( positionOption );
8520
		}
8521
		if ( this.options.track && event && /^mouse/.test( event.type ) ) {
8522
			this._on( this.document, {
8523
				mousemove: position
8524
			} );
8525
8526
			// trigger once to override element-relative positioning
8527
			position( event );
8528
		} else {
8529
			tooltip.position( $.extend( {
8530
				of: target
8531
			}, this.options.position ) );
8532
		}
8533
8534
		tooltip.hide();
8535
8536
		this._show( tooltip, this.options.show );
8537
8538
		// Handle tracking tooltips that are shown with a delay (#8644). As soon
8539
		// as the tooltip is visible, position the tooltip using the most recent
8540
		// event.
8541
		// Adds the check to add the timers only when both delay and track options are set (#14682)
8542
		if ( this.options.track && this.options.show && this.options.show.delay ) {
8543
			delayedShow = this.delayedShow = setInterval( function() {
8544
				if ( tooltip.is( ":visible" ) ) {
8545
					position( positionOption.of );
8546
					clearInterval( delayedShow );
8547
				}
8548
			}, $.fx.interval );
8549
		}
8550
8551
		this._trigger( "open", event, { tooltip: tooltip } );
8552
	},
8553
8554
	_registerCloseHandlers: function( event, target ) {
8555
		var events = {
8556
			keyup: function( event ) {
8557
				if ( event.keyCode === $.ui.keyCode.ESCAPE ) {
8558
					var fakeEvent = $.Event( event );
8559
					fakeEvent.currentTarget = target[ 0 ];
8560
					this.close( fakeEvent, true );
8561
				}
8562
			}
8563
		};
8564
8565
		// Only bind remove handler for delegated targets. Non-delegated
8566
		// tooltips will handle this in destroy.
8567
		if ( target[ 0 ] !== this.element[ 0 ] ) {
8568
			events.remove = function() {
8569
				this._removeTooltip( this._find( target ).tooltip );
8570
			};
8571
		}
8572
8573
		if ( !event || event.type === "mouseover" ) {
8574
			events.mouseleave = "close";
8575
		}
8576
		if ( !event || event.type === "focusin" ) {
8577
			events.focusout = "close";
8578
		}
8579
		this._on( true, target, events );
8580
	},
8581
8582
	close: function( event ) {
8583
		var tooltip,
8584
			that = this,
8585
			target = $( event ? event.currentTarget : this.element ),
8586
			tooltipData = this._find( target );
8587
8588
		// The tooltip may already be closed
8589
		if ( !tooltipData ) {
8590
8591
			// We set ui-tooltip-open immediately upon open (in open()), but only set the
8592
			// additional data once there's actually content to show (in _open()). So even if the
8593
			// tooltip doesn't have full data, we always remove ui-tooltip-open in case we're in
8594
			// the period between open() and _open().
8595
			target.removeData( "ui-tooltip-open" );
8596
			return;
8597
		}
8598
8599
		tooltip = tooltipData.tooltip;
8600
8601
		// Disabling closes the tooltip, so we need to track when we're closing
8602
		// to avoid an infinite loop in case the tooltip becomes disabled on close
8603
		if ( tooltipData.closing ) {
8604
			return;
8605
		}
8606
8607
		// Clear the interval for delayed tracking tooltips
8608
		clearInterval( this.delayedShow );
8609
8610
		// Only set title if we had one before (see comment in _open())
8611
		// If the title attribute has changed since open(), don't restore
8612
		if ( target.data( "ui-tooltip-title" ) && !target.attr( "title" ) ) {
8613
			target.attr( "title", target.data( "ui-tooltip-title" ) );
8614
		}
8615
8616
		this._removeDescribedBy( target );
8617
8618
		tooltipData.hiding = true;
8619
		tooltip.stop( true );
8620
		this._hide( tooltip, this.options.hide, function() {
8621
			that._removeTooltip( $( this ) );
8622
		} );
8623
8624
		target.removeData( "ui-tooltip-open" );
8625
		this._off( target, "mouseleave focusout keyup" );
8626
8627
		// Remove 'remove' binding only on delegated targets
8628
		if ( target[ 0 ] !== this.element[ 0 ] ) {
8629
			this._off( target, "remove" );
8630
		}
8631
		this._off( this.document, "mousemove" );
8632
8633
		if ( event && event.type === "mouseleave" ) {
8634
			$.each( this.parents, function( id, parent ) {
8635
				$( parent.element ).attr( "title", parent.title );
8636
				delete that.parents[ id ];
8637
			} );
8638
		}
8639
8640
		tooltipData.closing = true;
8641
		this._trigger( "close", event, { tooltip: tooltip } );
8642
		if ( !tooltipData.hiding ) {
8643
			tooltipData.closing = false;
8644
		}
8645
	},
8646
8647
	_tooltip: function( element ) {
8648
		var tooltip = $( "<div>" ).attr( "role", "tooltip" ),
8649
			content = $( "<div>" ).appendTo( tooltip ),
8650
			id = tooltip.uniqueId().attr( "id" );
8651
8652
		this._addClass( content, "ui-tooltip-content" );
8653
		this._addClass( tooltip, "ui-tooltip", "ui-widget ui-widget-content" );
8654
8655
		tooltip.appendTo( this._appendTo( element ) );
8656
8657
		return this.tooltips[ id ] = {
8658
			element: element,
8659
			tooltip: tooltip
8660
		};
8661
	},
8662
8663
	_find: function( target ) {
8664
		var id = target.data( "ui-tooltip-id" );
8665
		return id ? this.tooltips[ id ] : null;
8666
	},
8667
8668
	_removeTooltip: function( tooltip ) {
8669
		tooltip.remove();
8670
		delete this.tooltips[ tooltip.attr( "id" ) ];
8671
	},
8672
8673
	_appendTo: function( target ) {
8674
		var element = target.closest( ".ui-front, dialog" );
8675
8676
		if ( !element.length ) {
8677
			element = this.document[ 0 ].body;
8678
		}
8679
8680
		return element;
8681
	},
8682
8683
	_destroy: function() {
8684
		var that = this;
8685
8686
		// Close open tooltips
8687
		$.each( this.tooltips, function( id, tooltipData ) {
8688
8689
			// Delegate to close method to handle common cleanup
8690
			var event = $.Event( "blur" ),
8691
				element = tooltipData.element;
8692
			event.target = event.currentTarget = element[ 0 ];
8693
			that.close( event, true );
8694
8695
			// Remove immediately; destroying an open tooltip doesn't use the
8696
			// hide animation
8697
			$( "#" + id ).remove();
8698
8699
			// Restore the title
8700
			if ( element.data( "ui-tooltip-title" ) ) {
8701
8702
				// If the title attribute has changed since open(), don't restore
8703
				if ( !element.attr( "title" ) ) {
8704
					element.attr( "title", element.data( "ui-tooltip-title" ) );
8705
				}
8706
				element.removeData( "ui-tooltip-title" );
8707
			}
8708
		} );
8709
		this.liveRegion.remove();
8710
	}
8711
} );
8712
8713
// DEPRECATED
8714
// TODO: Switch return back to widget declaration at top of file when this is removed
8715
if ( $.uiBackCompat !== false ) {
8716
8717
	// Backcompat for tooltipClass option
8718
	$.widget( "ui.tooltip", $.ui.tooltip, {
8719
		options: {
8720
			tooltipClass: null
8721
		},
8722
		_tooltip: function() {
8723
			var tooltipData = this._superApply( arguments );
8724
			if ( this.options.tooltipClass ) {
8725
				tooltipData.tooltip.addClass( this.options.tooltipClass );
8726
			}
8727
			return tooltipData;
8728
		}
8729
	} );
8730
}
8731
8732
var widgetsTooltip = $.ui.tooltip;
8733
8734
8735
8736
8737
}));
(-)a/koha-tmpl/opac-tmpl/bootstrap/lib/jquery/jquery-ui-1.12.1.min.css (-7 lines)
Lines 1-7 Link Here
1
/*! jQuery UI - v1.12.1 - 2019-08-16
2
* http://jqueryui.com
3
* Includes: sortable.css, core.css, autocomplete.css, menu.css, datepicker.css, slider.css, tabs.css, tooltip.css, theme.css
4
* To view and modify this theme, visit http://jqueryui.com/themeroller/?scope=&folderName=smoothness&cornerRadiusShadow=8px&offsetLeftShadow=-8px&offsetTopShadow=-8px&thicknessShadow=8px&opacityShadow=30&bgImgOpacityShadow=0&bgTextureShadow=flat&bgColorShadow=aaaaaa&opacityOverlay=30&bgImgOpacityOverlay=0&bgTextureOverlay=flat&bgColorOverlay=aaaaaa&iconColorError=cd0a0a&fcError=cd0a0a&borderColorError=cd0a0a&bgImgOpacityError=95&bgTextureError=glass&bgColorError=fef1ec&iconColorHighlight=2e83ff&fcHighlight=363636&borderColorHighlight=fcefa1&bgImgOpacityHighlight=55&bgTextureHighlight=glass&bgColorHighlight=fbf9ee&iconColorActive=454545&fcActive=212121&borderColorActive=aaaaaa&bgImgOpacityActive=65&bgTextureActive=glass&bgColorActive=ffffff&iconColorHover=454545&fcHover=212121&borderColorHover=999999&bgImgOpacityHover=75&bgTextureHover=glass&bgColorHover=dadada&iconColorDefault=888888&fcDefault=555555&borderColorDefault=d3d3d3&bgImgOpacityDefault=75&bgTextureDefault=glass&bgColorDefault=e6e6e6&iconColorContent=222222&fcContent=222222&borderColorContent=aaaaaa&bgImgOpacityContent=75&bgTextureContent=flat&bgColorContent=ffffff&iconColorHeader=222222&fcHeader=222222&borderColorHeader=aaaaaa&bgImgOpacityHeader=75&bgTextureHeader=highlight_soft&bgColorHeader=cccccc&cornerRadius=4px&fsDefault=1.1em&fwDefault=normal&ffDefault=Verdana%2CArial%2Csans-serif
5
* Copyright jQuery Foundation and other contributors; Licensed MIT */
6
7
.ui-sortable-handle{-ms-touch-action:none;touch-action:none}.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important;pointer-events:none}.ui-icon{display:inline-block;vertical-align:middle;margin-top:-.25em;position:relative;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-icon-block{left:50%;margin-left:-8px;display:block}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-autocomplete{position:absolute;top:0;left:0;cursor:default}.ui-menu{list-style:none;padding:0;margin:0;display:block;outline:0}.ui-menu .ui-menu{position:absolute}.ui-menu .ui-menu-item{margin:0;cursor:pointer;list-style-image:url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7")}.ui-menu .ui-menu-item-wrapper{position:relative;padding:3px 1em 3px .4em}.ui-menu .ui-menu-divider{margin:5px 0;height:0;font-size:0;line-height:0;border-width:1px 0 0 0}.ui-menu .ui-state-focus,.ui-menu .ui-state-active{margin:-1px}.ui-menu-icons{position:relative}.ui-menu-icons .ui-menu-item-wrapper{padding-left:2em}.ui-menu .ui-icon{position:absolute;top:0;bottom:0;left:.2em;margin:auto 0}.ui-menu .ui-menu-icon{left:auto;right:0}.ui-datepicker{width:17em;padding:.2em .2em 0;display:none}.ui-datepicker .ui-datepicker-header{position:relative;padding:.2em 0}.ui-datepicker .ui-datepicker-prev,.ui-datepicker .ui-datepicker-next{position:absolute;top:2px;width:1.8em;height:1.8em}.ui-datepicker .ui-datepicker-prev-hover,.ui-datepicker .ui-datepicker-next-hover{top:1px}.ui-datepicker .ui-datepicker-prev{left:2px}.ui-datepicker .ui-datepicker-next{right:2px}.ui-datepicker .ui-datepicker-prev-hover{left:1px}.ui-datepicker .ui-datepicker-next-hover{right:1px}.ui-datepicker .ui-datepicker-prev span,.ui-datepicker .ui-datepicker-next span{display:block;position:absolute;left:50%;margin-left:-8px;top:50%;margin-top:-8px}.ui-datepicker .ui-datepicker-title{margin:0 2.3em;line-height:1.8em;text-align:center}.ui-datepicker .ui-datepicker-title select{font-size:1em;margin:1px 0}.ui-datepicker select.ui-datepicker-month,.ui-datepicker select.ui-datepicker-year{width:45%}.ui-datepicker table{width:100%;font-size:.9em;border-collapse:collapse;margin:0 0 .4em}.ui-datepicker th{padding:.7em .3em;text-align:center;font-weight:bold;border:0}.ui-datepicker td{border:0;padding:1px}.ui-datepicker td span,.ui-datepicker td a{display:block;padding:.2em;text-align:right;text-decoration:none}.ui-datepicker .ui-datepicker-buttonpane{background-image:none;margin:.7em 0 0 0;padding:0 .2em;border-left:0;border-right:0;border-bottom:0}.ui-datepicker .ui-datepicker-buttonpane button{float:right;margin:.5em .2em .4em;cursor:pointer;padding:.2em .6em .3em .6em;width:auto;overflow:visible}.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current{float:left}.ui-datepicker.ui-datepicker-multi{width:auto}.ui-datepicker-multi .ui-datepicker-group{float:left}.ui-datepicker-multi .ui-datepicker-group table{width:95%;margin:0 auto .4em}.ui-datepicker-multi-2 .ui-datepicker-group{width:50%}.ui-datepicker-multi-3 .ui-datepicker-group{width:33.3%}.ui-datepicker-multi-4 .ui-datepicker-group{width:25%}.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header{border-left-width:0}.ui-datepicker-multi .ui-datepicker-buttonpane{clear:left}.ui-datepicker-row-break{clear:both;width:100%;font-size:0}.ui-datepicker-rtl{direction:rtl}.ui-datepicker-rtl .ui-datepicker-prev{right:2px;left:auto}.ui-datepicker-rtl .ui-datepicker-next{left:2px;right:auto}.ui-datepicker-rtl .ui-datepicker-prev:hover{right:1px;left:auto}.ui-datepicker-rtl .ui-datepicker-next:hover{left:1px;right:auto}.ui-datepicker-rtl .ui-datepicker-buttonpane{clear:right}.ui-datepicker-rtl .ui-datepicker-buttonpane button{float:left}.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current,.ui-datepicker-rtl .ui-datepicker-group{float:right}.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header{border-right-width:0;border-left-width:1px}.ui-datepicker .ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat;left:.5em;top:.3em}.ui-slider{position:relative;text-align:left}.ui-slider .ui-slider-handle{position:absolute;z-index:2;width:1.2em;height:1.2em;cursor:default;-ms-touch-action:none;touch-action:none}.ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;background-position:0 0}.ui-slider.ui-state-disabled .ui-slider-handle,.ui-slider.ui-state-disabled .ui-slider-range{filter:inherit}.ui-slider-horizontal{height:.8em}.ui-slider-horizontal .ui-slider-handle{top:-.3em;margin-left:-.6em}.ui-slider-horizontal .ui-slider-range{top:0;height:100%}.ui-slider-horizontal .ui-slider-range-min{left:0}.ui-slider-horizontal .ui-slider-range-max{right:0}.ui-slider-vertical{width:.8em;height:100px}.ui-slider-vertical .ui-slider-handle{left:-.3em;margin-left:0;margin-bottom:-.6em}.ui-slider-vertical .ui-slider-range{left:0;width:100%}.ui-slider-vertical .ui-slider-range-min{bottom:0}.ui-slider-vertical .ui-slider-range-max{top:0}.ui-tabs{position:relative;padding:.2em}.ui-tabs .ui-tabs-nav{margin:0;padding:.2em .2em 0}.ui-tabs .ui-tabs-nav li{list-style:none;float:left;position:relative;top:0;margin:1px .2em 0 0;border-bottom-width:0;padding:0;white-space:nowrap}.ui-tabs .ui-tabs-nav .ui-tabs-anchor{float:left;padding:.5em 1em;text-decoration:none}.ui-tabs .ui-tabs-nav li.ui-tabs-active{margin-bottom:-1px;padding-bottom:1px}.ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor,.ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor,.ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor{cursor:text}.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor{cursor:pointer}.ui-tabs .ui-tabs-panel{display:block;border-width:0;padding:1em 1.4em;background:none}.ui-tooltip{padding:8px;position:absolute;z-index:9999;max-width:300px}body .ui-tooltip{border-width:2px}.ui-widget{font-size:1.1em}.ui-widget .ui-widget{font-size:1em}.ui-widget input,.ui-widget select,.ui-widget textarea,.ui-widget button{font-size:1em}.ui-widget.ui-widget-content{border:1px solid #d3d3d3}.ui-widget-content{border:1px solid #aaa;background:#fff;color:#222}.ui-widget-content a{color:#222}.ui-widget-header{border:1px solid #aaa;background:#ccc url("images/ui-bg_highlight-soft_75_cccccc_1x100.png") 50% 50% repeat-x;color:#222;font-weight:bold}.ui-widget-header a{color:#222}.ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default,.ui-button,html .ui-button.ui-state-disabled:hover,html .ui-button.ui-state-disabled:active{border:1px solid #d3d3d3;background:#e6e6e6 url("images/ui-bg_glass_75_e6e6e6_1x400.png") 50% 50% repeat-x;font-weight:normal;color:#555}.ui-state-default a,.ui-state-default a:link,.ui-state-default a:visited,a.ui-button,a:link.ui-button,a:visited.ui-button,.ui-button{color:#555;text-decoration:none}.ui-state-hover,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-hover,.ui-state-focus,.ui-widget-content .ui-state-focus,.ui-widget-header .ui-state-focus,.ui-button:hover,.ui-button:focus{border:1px solid #999;background:#dadada url("images/ui-bg_glass_75_dadada_1x400.png") 50% 50% repeat-x;font-weight:normal;color:#212121}.ui-state-hover a,.ui-state-hover a:hover,.ui-state-hover a:link,.ui-state-hover a:visited,.ui-state-focus a,.ui-state-focus a:hover,.ui-state-focus a:link,.ui-state-focus a:visited,a.ui-button:hover,a.ui-button:focus{color:#212121;text-decoration:none}.ui-visual-focus{box-shadow:0 0 3px 1px rgb(94,158,214)}.ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active,a.ui-button:active,.ui-button:active,.ui-button.ui-state-active:hover{border:1px solid #aaa;background:#fff url("images/ui-bg_glass_65_ffffff_1x400.png") 50% 50% repeat-x;font-weight:normal;color:#212121}.ui-icon-background,.ui-state-active .ui-icon-background{border:#aaa;background-color:#212121}.ui-state-active a,.ui-state-active a:link,.ui-state-active a:visited{color:#212121;text-decoration:none}.ui-state-highlight,.ui-widget-content .ui-state-highlight,.ui-widget-header .ui-state-highlight{border:1px solid #fcefa1;background:#fbf9ee url("images/ui-bg_glass_55_fbf9ee_1x400.png") 50% 50% repeat-x;color:#363636}.ui-state-checked{border:1px solid #fcefa1;background:#fbf9ee}.ui-state-highlight a,.ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a{color:#363636}.ui-state-error,.ui-widget-content .ui-state-error,.ui-widget-header .ui-state-error{border:1px solid #cd0a0a;background:#fef1ec url("images/ui-bg_glass_95_fef1ec_1x400.png") 50% 50% repeat-x;color:#cd0a0a}.ui-state-error a,.ui-widget-content .ui-state-error a,.ui-widget-header .ui-state-error a{color:#cd0a0a}.ui-state-error-text,.ui-widget-content .ui-state-error-text,.ui-widget-header .ui-state-error-text{color:#cd0a0a}.ui-priority-primary,.ui-widget-content .ui-priority-primary,.ui-widget-header .ui-priority-primary{font-weight:bold}.ui-priority-secondary,.ui-widget-content .ui-priority-secondary,.ui-widget-header .ui-priority-secondary{opacity:.7;filter:Alpha(Opacity=70);font-weight:normal}.ui-state-disabled,.ui-widget-content .ui-state-disabled,.ui-widget-header .ui-state-disabled{opacity:.35;filter:Alpha(Opacity=35);background-image:none}.ui-state-disabled .ui-icon{filter:Alpha(Opacity=35)}.ui-icon{width:16px;height:16px}.ui-icon,.ui-widget-content .ui-icon{background-image:url("images/ui-icons_222222_256x240.png")}.ui-widget-header .ui-icon{background-image:url("images/ui-icons_222222_256x240.png")}.ui-state-hover .ui-icon,.ui-state-focus .ui-icon,.ui-button:hover .ui-icon,.ui-button:focus .ui-icon{background-image:url("images/ui-icons_454545_256x240.png")}.ui-state-active .ui-icon,.ui-button:active .ui-icon{background-image:url("images/ui-icons_454545_256x240.png")}.ui-state-highlight .ui-icon,.ui-button .ui-state-highlight.ui-icon{background-image:url("images/ui-icons_2e83ff_256x240.png")}.ui-state-error .ui-icon,.ui-state-error-text .ui-icon{background-image:url("images/ui-icons_cd0a0a_256x240.png")}.ui-button .ui-icon{background-image:url("images/ui-icons_888888_256x240.png")}.ui-icon-blank{background-position:16px 16px}.ui-icon-caret-1-n{background-position:0 0}.ui-icon-caret-1-ne{background-position:-16px 0}.ui-icon-caret-1-e{background-position:-32px 0}.ui-icon-caret-1-se{background-position:-48px 0}.ui-icon-caret-1-s{background-position:-65px 0}.ui-icon-caret-1-sw{background-position:-80px 0}.ui-icon-caret-1-w{background-position:-96px 0}.ui-icon-caret-1-nw{background-position:-112px 0}.ui-icon-caret-2-n-s{background-position:-128px 0}.ui-icon-caret-2-e-w{background-position:-144px 0}.ui-icon-triangle-1-n{background-position:0 -16px}.ui-icon-triangle-1-ne{background-position:-16px -16px}.ui-icon-triangle-1-e{background-position:-32px -16px}.ui-icon-triangle-1-se{background-position:-48px -16px}.ui-icon-triangle-1-s{background-position:-65px -16px}.ui-icon-triangle-1-sw{background-position:-80px -16px}.ui-icon-triangle-1-w{background-position:-96px -16px}.ui-icon-triangle-1-nw{background-position:-112px -16px}.ui-icon-triangle-2-n-s{background-position:-128px -16px}.ui-icon-triangle-2-e-w{background-position:-144px -16px}.ui-icon-arrow-1-n{background-position:0 -32px}.ui-icon-arrow-1-ne{background-position:-16px -32px}.ui-icon-arrow-1-e{background-position:-32px -32px}.ui-icon-arrow-1-se{background-position:-48px -32px}.ui-icon-arrow-1-s{background-position:-65px -32px}.ui-icon-arrow-1-sw{background-position:-80px -32px}.ui-icon-arrow-1-w{background-position:-96px -32px}.ui-icon-arrow-1-nw{background-position:-112px -32px}.ui-icon-arrow-2-n-s{background-position:-128px -32px}.ui-icon-arrow-2-ne-sw{background-position:-144px -32px}.ui-icon-arrow-2-e-w{background-position:-160px -32px}.ui-icon-arrow-2-se-nw{background-position:-176px -32px}.ui-icon-arrowstop-1-n{background-position:-192px -32px}.ui-icon-arrowstop-1-e{background-position:-208px -32px}.ui-icon-arrowstop-1-s{background-position:-224px -32px}.ui-icon-arrowstop-1-w{background-position:-240px -32px}.ui-icon-arrowthick-1-n{background-position:1px -48px}.ui-icon-arrowthick-1-ne{background-position:-16px -48px}.ui-icon-arrowthick-1-e{background-position:-32px -48px}.ui-icon-arrowthick-1-se{background-position:-48px -48px}.ui-icon-arrowthick-1-s{background-position:-64px -48px}.ui-icon-arrowthick-1-sw{background-position:-80px -48px}.ui-icon-arrowthick-1-w{background-position:-96px -48px}.ui-icon-arrowthick-1-nw{background-position:-112px -48px}.ui-icon-arrowthick-2-n-s{background-position:-128px -48px}.ui-icon-arrowthick-2-ne-sw{background-position:-144px -48px}.ui-icon-arrowthick-2-e-w{background-position:-160px -48px}.ui-icon-arrowthick-2-se-nw{background-position:-176px -48px}.ui-icon-arrowthickstop-1-n{background-position:-192px -48px}.ui-icon-arrowthickstop-1-e{background-position:-208px -48px}.ui-icon-arrowthickstop-1-s{background-position:-224px -48px}.ui-icon-arrowthickstop-1-w{background-position:-240px -48px}.ui-icon-arrowreturnthick-1-w{background-position:0 -64px}.ui-icon-arrowreturnthick-1-n{background-position:-16px -64px}.ui-icon-arrowreturnthick-1-e{background-position:-32px -64px}.ui-icon-arrowreturnthick-1-s{background-position:-48px -64px}.ui-icon-arrowreturn-1-w{background-position:-64px -64px}.ui-icon-arrowreturn-1-n{background-position:-80px -64px}.ui-icon-arrowreturn-1-e{background-position:-96px -64px}.ui-icon-arrowreturn-1-s{background-position:-112px -64px}.ui-icon-arrowrefresh-1-w{background-position:-128px -64px}.ui-icon-arrowrefresh-1-n{background-position:-144px -64px}.ui-icon-arrowrefresh-1-e{background-position:-160px -64px}.ui-icon-arrowrefresh-1-s{background-position:-176px -64px}.ui-icon-arrow-4{background-position:0 -80px}.ui-icon-arrow-4-diag{background-position:-16px -80px}.ui-icon-extlink{background-position:-32px -80px}.ui-icon-newwin{background-position:-48px -80px}.ui-icon-refresh{background-position:-64px -80px}.ui-icon-shuffle{background-position:-80px -80px}.ui-icon-transfer-e-w{background-position:-96px -80px}.ui-icon-transferthick-e-w{background-position:-112px -80px}.ui-icon-folder-collapsed{background-position:0 -96px}.ui-icon-folder-open{background-position:-16px -96px}.ui-icon-document{background-position:-32px -96px}.ui-icon-document-b{background-position:-48px -96px}.ui-icon-note{background-position:-64px -96px}.ui-icon-mail-closed{background-position:-80px -96px}.ui-icon-mail-open{background-position:-96px -96px}.ui-icon-suitcase{background-position:-112px -96px}.ui-icon-comment{background-position:-128px -96px}.ui-icon-person{background-position:-144px -96px}.ui-icon-print{background-position:-160px -96px}.ui-icon-trash{background-position:-176px -96px}.ui-icon-locked{background-position:-192px -96px}.ui-icon-unlocked{background-position:-208px -96px}.ui-icon-bookmark{background-position:-224px -96px}.ui-icon-tag{background-position:-240px -96px}.ui-icon-home{background-position:0 -112px}.ui-icon-flag{background-position:-16px -112px}.ui-icon-calendar{background-position:-32px -112px}.ui-icon-cart{background-position:-48px -112px}.ui-icon-pencil{background-position:-64px -112px}.ui-icon-clock{background-position:-80px -112px}.ui-icon-disk{background-position:-96px -112px}.ui-icon-calculator{background-position:-112px -112px}.ui-icon-zoomin{background-position:-128px -112px}.ui-icon-zoomout{background-position:-144px -112px}.ui-icon-search{background-position:-160px -112px}.ui-icon-wrench{background-position:-176px -112px}.ui-icon-gear{background-position:-192px -112px}.ui-icon-heart{background-position:-208px -112px}.ui-icon-star{background-position:-224px -112px}.ui-icon-link{background-position:-240px -112px}.ui-icon-cancel{background-position:0 -128px}.ui-icon-plus{background-position:-16px -128px}.ui-icon-plusthick{background-position:-32px -128px}.ui-icon-minus{background-position:-48px -128px}.ui-icon-minusthick{background-position:-64px -128px}.ui-icon-close{background-position:-80px -128px}.ui-icon-closethick{background-position:-96px -128px}.ui-icon-key{background-position:-112px -128px}.ui-icon-lightbulb{background-position:-128px -128px}.ui-icon-scissors{background-position:-144px -128px}.ui-icon-clipboard{background-position:-160px -128px}.ui-icon-copy{background-position:-176px -128px}.ui-icon-contact{background-position:-192px -128px}.ui-icon-image{background-position:-208px -128px}.ui-icon-video{background-position:-224px -128px}.ui-icon-script{background-position:-240px -128px}.ui-icon-alert{background-position:0 -144px}.ui-icon-info{background-position:-16px -144px}.ui-icon-notice{background-position:-32px -144px}.ui-icon-help{background-position:-48px -144px}.ui-icon-check{background-position:-64px -144px}.ui-icon-bullet{background-position:-80px -144px}.ui-icon-radio-on{background-position:-96px -144px}.ui-icon-radio-off{background-position:-112px -144px}.ui-icon-pin-w{background-position:-128px -144px}.ui-icon-pin-s{background-position:-144px -144px}.ui-icon-play{background-position:0 -160px}.ui-icon-pause{background-position:-16px -160px}.ui-icon-seek-next{background-position:-32px -160px}.ui-icon-seek-prev{background-position:-48px -160px}.ui-icon-seek-end{background-position:-64px -160px}.ui-icon-seek-start{background-position:-80px -160px}.ui-icon-seek-first{background-position:-80px -160px}.ui-icon-stop{background-position:-96px -160px}.ui-icon-eject{background-position:-112px -160px}.ui-icon-volume-off{background-position:-128px -160px}.ui-icon-volume-on{background-position:-144px -160px}.ui-icon-power{background-position:0 -176px}.ui-icon-signal-diag{background-position:-16px -176px}.ui-icon-signal{background-position:-32px -176px}.ui-icon-battery-0{background-position:-48px -176px}.ui-icon-battery-1{background-position:-64px -176px}.ui-icon-battery-2{background-position:-80px -176px}.ui-icon-battery-3{background-position:-96px -176px}.ui-icon-circle-plus{background-position:0 -192px}.ui-icon-circle-minus{background-position:-16px -192px}.ui-icon-circle-close{background-position:-32px -192px}.ui-icon-circle-triangle-e{background-position:-48px -192px}.ui-icon-circle-triangle-s{background-position:-64px -192px}.ui-icon-circle-triangle-w{background-position:-80px -192px}.ui-icon-circle-triangle-n{background-position:-96px -192px}.ui-icon-circle-arrow-e{background-position:-112px -192px}.ui-icon-circle-arrow-s{background-position:-128px -192px}.ui-icon-circle-arrow-w{background-position:-144px -192px}.ui-icon-circle-arrow-n{background-position:-160px -192px}.ui-icon-circle-zoomin{background-position:-176px -192px}.ui-icon-circle-zoomout{background-position:-192px -192px}.ui-icon-circle-check{background-position:-208px -192px}.ui-icon-circlesmall-plus{background-position:0 -208px}.ui-icon-circlesmall-minus{background-position:-16px -208px}.ui-icon-circlesmall-close{background-position:-32px -208px}.ui-icon-squaresmall-plus{background-position:-48px -208px}.ui-icon-squaresmall-minus{background-position:-64px -208px}.ui-icon-squaresmall-close{background-position:-80px -208px}.ui-icon-grip-dotted-vertical{background-position:0 -224px}.ui-icon-grip-dotted-horizontal{background-position:-16px -224px}.ui-icon-grip-solid-vertical{background-position:-32px -224px}.ui-icon-grip-solid-horizontal{background-position:-48px -224px}.ui-icon-gripsmall-diagonal-se{background-position:-64px -224px}.ui-icon-grip-diagonal-se{background-position:-80px -224px}.ui-corner-all,.ui-corner-top,.ui-corner-left,.ui-corner-tl{border-top-left-radius:4px}.ui-corner-all,.ui-corner-top,.ui-corner-right,.ui-corner-tr{border-top-right-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-left,.ui-corner-bl{border-bottom-left-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-right,.ui-corner-br{border-bottom-right-radius:4px}.ui-widget-overlay{background:#aaa;opacity:.3;filter:Alpha(Opacity=30)}.ui-widget-shadow{-webkit-box-shadow:-8px -8px 8px #aaa;box-shadow:-8px -8px 8px #aaa}
(-)a/koha-tmpl/opac-tmpl/bootstrap/lib/jquery/jquery-ui-1.12.1.min.js (-9 lines)
Lines 1-9 Link Here
1
/*! jQuery UI - v1.12.1 - 2019-08-16
2
* http://jqueryui.com
3
* Includes: widget.js, position.js, data.js, keycode.js, scroll-parent.js, unique-id.js, widgets/sortable.js, widgets/autocomplete.js, widgets/datepicker.js, widgets/menu.js, widgets/mouse.js, widgets/slider.js, widgets/tabs.js, widgets/tooltip.js
4
* Copyright jQuery Foundation and other contributors; Licensed MIT */
5
6
(function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)})(function(t){function e(t){for(var e,i;t.length&&t[0]!==document;){if(e=t.css("position"),("absolute"===e||"relative"===e||"fixed"===e)&&(i=parseInt(t.css("zIndex"),10),!isNaN(i)&&0!==i))return i;t=t.parent()}return 0}function i(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},t.extend(this._defaults,this.regional[""]),this.regional.en=t.extend(!0,{},this.regional[""]),this.regional["en-US"]=t.extend(!0,{},this.regional.en),this.dpDiv=s(t("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function s(e){var i="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return e.on("mouseout",i,function(){t(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).removeClass("ui-datepicker-next-hover")}).on("mouseover",i,n)}function n(){t.datepicker._isDisabledDatepicker(h.inline?h.dpDiv.parent()[0]:h.input[0])||(t(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),t(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).addClass("ui-datepicker-next-hover"))}function o(e,i){t.extend(e,i);for(var s in i)null==i[s]&&(e[s]=i[s]);return e}t.ui=t.ui||{},t.ui.version="1.12.1";var a=0,r=Array.prototype.slice;t.cleanData=function(e){return function(i){var s,n,o;for(o=0;null!=(n=i[o]);o++)try{s=t._data(n,"events"),s&&s.remove&&t(n).triggerHandler("remove")}catch(a){}e(i)}}(t.cleanData),t.widget=function(e,i,s){var n,o,a,r={},l=e.split(".")[0];e=e.split(".")[1];var h=l+"-"+e;return s||(s=i,i=t.Widget),t.isArray(s)&&(s=t.extend.apply(null,[{}].concat(s))),t.expr[":"][h.toLowerCase()]=function(e){return!!t.data(e,h)},t[l]=t[l]||{},n=t[l][e],o=t[l][e]=function(t,e){return this._createWidget?(arguments.length&&this._createWidget(t,e),void 0):new o(t,e)},t.extend(o,n,{version:s.version,_proto:t.extend({},s),_childConstructors:[]}),a=new i,a.options=t.widget.extend({},a.options),t.each(s,function(e,s){return t.isFunction(s)?(r[e]=function(){function t(){return i.prototype[e].apply(this,arguments)}function n(t){return i.prototype[e].apply(this,t)}return function(){var e,i=this._super,o=this._superApply;return this._super=t,this._superApply=n,e=s.apply(this,arguments),this._super=i,this._superApply=o,e}}(),void 0):(r[e]=s,void 0)}),o.prototype=t.widget.extend(a,{widgetEventPrefix:n?a.widgetEventPrefix||e:e},r,{constructor:o,namespace:l,widgetName:e,widgetFullName:h}),n?(t.each(n._childConstructors,function(e,i){var s=i.prototype;t.widget(s.namespace+"."+s.widgetName,o,i._proto)}),delete n._childConstructors):i._childConstructors.push(o),t.widget.bridge(e,o),o},t.widget.extend=function(e){for(var i,s,n=r.call(arguments,1),o=0,a=n.length;a>o;o++)for(i in n[o])s=n[o][i],n[o].hasOwnProperty(i)&&void 0!==s&&(e[i]=t.isPlainObject(s)?t.isPlainObject(e[i])?t.widget.extend({},e[i],s):t.widget.extend({},s):s);return e},t.widget.bridge=function(e,i){var s=i.prototype.widgetFullName||e;t.fn[e]=function(n){var o="string"==typeof n,a=r.call(arguments,1),l=this;return o?this.length||"instance"!==n?this.each(function(){var i,o=t.data(this,s);return"instance"===n?(l=o,!1):o?t.isFunction(o[n])&&"_"!==n.charAt(0)?(i=o[n].apply(o,a),i!==o&&void 0!==i?(l=i&&i.jquery?l.pushStack(i.get()):i,!1):void 0):t.error("no such method '"+n+"' for "+e+" widget instance"):t.error("cannot call methods on "+e+" prior to initialization; "+"attempted to call method '"+n+"'")}):l=void 0:(a.length&&(n=t.widget.extend.apply(null,[n].concat(a))),this.each(function(){var e=t.data(this,s);e?(e.option(n||{}),e._init&&e._init()):t.data(this,s,new i(n,this))})),l}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(e,i){i=t(i||this.defaultElement||this)[0],this.element=t(i),this.uuid=a++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=t(),this.hoverable=t(),this.focusable=t(),this.classesElementLookup={},i!==this&&(t.data(i,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===i&&this.destroy()}}),this.document=t(i.style?i.ownerDocument:i.document||i),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){var e=this;this._destroy(),t.each(this.classesElementLookup,function(t,i){e._removeClass(i,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:t.noop,widget:function(){return this.element},option:function(e,i){var s,n,o,a=e;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof e)if(a={},s=e.split("."),e=s.shift(),s.length){for(n=a[e]=t.widget.extend({},this.options[e]),o=0;s.length-1>o;o++)n[s[o]]=n[s[o]]||{},n=n[s[o]];if(e=s.pop(),1===arguments.length)return void 0===n[e]?null:n[e];n[e]=i}else{if(1===arguments.length)return void 0===this.options[e]?null:this.options[e];a[e]=i}return this._setOptions(a),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(e){var i,s,n;for(i in e)n=this.classesElementLookup[i],e[i]!==this.options.classes[i]&&n&&n.length&&(s=t(n.get()),this._removeClass(n,i),s.addClass(this._classes({element:s,keys:i,classes:e,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(e){function i(i,o){var a,r;for(r=0;i.length>r;r++)a=n.classesElementLookup[i[r]]||t(),a=e.add?t(t.unique(a.get().concat(e.element.get()))):t(a.not(e.element).get()),n.classesElementLookup[i[r]]=a,s.push(i[r]),o&&e.classes[i[r]]&&s.push(e.classes[i[r]])}var s=[],n=this;return e=t.extend({element:this.element,classes:this.options.classes||{}},e),this._on(e.element,{remove:"_untrackClassesElement"}),e.keys&&i(e.keys.match(/\S+/g)||[],!0),e.extra&&i(e.extra.match(/\S+/g)||[]),s.join(" ")},_untrackClassesElement:function(e){var i=this;t.each(i.classesElementLookup,function(s,n){-1!==t.inArray(e.target,n)&&(i.classesElementLookup[s]=t(n.not(e.target).get()))})},_removeClass:function(t,e,i){return this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,s){s="boolean"==typeof s?s:i;var n="string"==typeof t||null===t,o={extra:n?e:i,keys:n?t:e,element:n?this.element:t,add:s};return o.element.toggleClass(this._classes(o),s),this},_on:function(e,i,s){var n,o=this;"boolean"!=typeof e&&(s=i,i=e,e=!1),s?(i=n=t(i),this.bindings=this.bindings.add(i)):(s=i,i=this.element,n=this.widget()),t.each(s,function(s,a){function r(){return e||o.options.disabled!==!0&&!t(this).hasClass("ui-state-disabled")?("string"==typeof a?o[a]:a).apply(o,arguments):void 0}"string"!=typeof a&&(r.guid=a.guid=a.guid||r.guid||t.guid++);var l=s.match(/^([\w:-]*)\s*(.*)$/),h=l[1]+o.eventNamespace,c=l[2];c?n.on(h,c,r):i.on(h,r)})},_off:function(e,i){i=(i||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.off(i).off(i),this.bindings=t(this.bindings.not(e).get()),this.focusable=t(this.focusable.not(e).get()),this.hoverable=t(this.hoverable.not(e).get())},_delay:function(t,e){function i(){return("string"==typeof t?s[t]:t).apply(s,arguments)}var s=this;return setTimeout(i,e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){this._addClass(t(e.currentTarget),null,"ui-state-hover")},mouseleave:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){this._addClass(t(e.currentTarget),null,"ui-state-focus")},focusout:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-focus")}})},_trigger:function(e,i,s){var n,o,a=this.options[e];if(s=s||{},i=t.Event(i),i.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],o=i.originalEvent)for(n in o)n in i||(i[n]=o[n]);return this.element.trigger(i,s),!(t.isFunction(a)&&a.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,i){t.Widget.prototype["_"+e]=function(s,n,o){"string"==typeof n&&(n={effect:n});var a,r=n?n===!0||"number"==typeof n?i:n.effect||i:e;n=n||{},"number"==typeof n&&(n={duration:n}),a=!t.isEmptyObject(n),n.complete=o,n.delay&&s.delay(n.delay),a&&t.effects&&t.effects.effect[r]?s[e](n):r!==e&&s[r]?s[r](n.duration,n.easing,o):s.queue(function(i){t(this)[e](),o&&o.call(s[0]),i()})}}),t.widget,function(){function e(t,e,i){return[parseFloat(t[0])*(u.test(t[0])?e/100:1),parseFloat(t[1])*(u.test(t[1])?i/100:1)]}function i(e,i){return parseInt(t.css(e,i),10)||0}function s(e){var i=e[0];return 9===i.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(i)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}var n,o=Math.max,a=Math.abs,r=/left|center|right/,l=/top|center|bottom/,h=/[\+\-]\d+(\.[\d]+)?%?/,c=/^\w+/,u=/%$/,d=t.fn.position;t.position={scrollbarWidth:function(){if(void 0!==n)return n;var e,i,s=t("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),o=s.children()[0];return t("body").append(s),e=o.offsetWidth,s.css("overflow","scroll"),i=o.offsetWidth,e===i&&(i=s[0].clientWidth),s.remove(),n=e-i},getScrollInfo:function(e){var i=e.isWindow||e.isDocument?"":e.element.css("overflow-x"),s=e.isWindow||e.isDocument?"":e.element.css("overflow-y"),n="scroll"===i||"auto"===i&&e.width<e.element[0].scrollWidth,o="scroll"===s||"auto"===s&&e.height<e.element[0].scrollHeight;return{width:o?t.position.scrollbarWidth():0,height:n?t.position.scrollbarWidth():0}},getWithinInfo:function(e){var i=t(e||window),s=t.isWindow(i[0]),n=!!i[0]&&9===i[0].nodeType,o=!s&&!n;return{element:i,isWindow:s,isDocument:n,offset:o?t(e).offset():{left:0,top:0},scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:i.outerWidth(),height:i.outerHeight()}}},t.fn.position=function(n){if(!n||!n.of)return d.apply(this,arguments);n=t.extend({},n);var u,p,f,g,m,_,v=t(n.of),b=t.position.getWithinInfo(n.within),y=t.position.getScrollInfo(b),w=(n.collision||"flip").split(" "),k={};return _=s(v),v[0].preventDefault&&(n.at="left top"),p=_.width,f=_.height,g=_.offset,m=t.extend({},g),t.each(["my","at"],function(){var t,e,i=(n[this]||"").split(" ");1===i.length&&(i=r.test(i[0])?i.concat(["center"]):l.test(i[0])?["center"].concat(i):["center","center"]),i[0]=r.test(i[0])?i[0]:"center",i[1]=l.test(i[1])?i[1]:"center",t=h.exec(i[0]),e=h.exec(i[1]),k[this]=[t?t[0]:0,e?e[0]:0],n[this]=[c.exec(i[0])[0],c.exec(i[1])[0]]}),1===w.length&&(w[1]=w[0]),"right"===n.at[0]?m.left+=p:"center"===n.at[0]&&(m.left+=p/2),"bottom"===n.at[1]?m.top+=f:"center"===n.at[1]&&(m.top+=f/2),u=e(k.at,p,f),m.left+=u[0],m.top+=u[1],this.each(function(){var s,r,l=t(this),h=l.outerWidth(),c=l.outerHeight(),d=i(this,"marginLeft"),_=i(this,"marginTop"),x=h+d+i(this,"marginRight")+y.width,C=c+_+i(this,"marginBottom")+y.height,D=t.extend({},m),T=e(k.my,l.outerWidth(),l.outerHeight());"right"===n.my[0]?D.left-=h:"center"===n.my[0]&&(D.left-=h/2),"bottom"===n.my[1]?D.top-=c:"center"===n.my[1]&&(D.top-=c/2),D.left+=T[0],D.top+=T[1],s={marginLeft:d,marginTop:_},t.each(["left","top"],function(e,i){t.ui.position[w[e]]&&t.ui.position[w[e]][i](D,{targetWidth:p,targetHeight:f,elemWidth:h,elemHeight:c,collisionPosition:s,collisionWidth:x,collisionHeight:C,offset:[u[0]+T[0],u[1]+T[1]],my:n.my,at:n.at,within:b,elem:l})}),n.using&&(r=function(t){var e=g.left-D.left,i=e+p-h,s=g.top-D.top,r=s+f-c,u={target:{element:v,left:g.left,top:g.top,width:p,height:f},element:{element:l,left:D.left,top:D.top,width:h,height:c},horizontal:0>i?"left":e>0?"right":"center",vertical:0>r?"top":s>0?"bottom":"middle"};h>p&&p>a(e+i)&&(u.horizontal="center"),c>f&&f>a(s+r)&&(u.vertical="middle"),u.important=o(a(e),a(i))>o(a(s),a(r))?"horizontal":"vertical",n.using.call(this,t,u)}),l.offset(t.extend(D,{using:r}))})},t.ui.position={fit:{left:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollLeft:s.offset.left,a=s.width,r=t.left-e.collisionPosition.marginLeft,l=n-r,h=r+e.collisionWidth-a-n;e.collisionWidth>a?l>0&&0>=h?(i=t.left+l+e.collisionWidth-a-n,t.left+=l-i):t.left=h>0&&0>=l?n:l>h?n+a-e.collisionWidth:n:l>0?t.left+=l:h>0?t.left-=h:t.left=o(t.left-r,t.left)},top:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollTop:s.offset.top,a=e.within.height,r=t.top-e.collisionPosition.marginTop,l=n-r,h=r+e.collisionHeight-a-n;e.collisionHeight>a?l>0&&0>=h?(i=t.top+l+e.collisionHeight-a-n,t.top+=l-i):t.top=h>0&&0>=l?n:l>h?n+a-e.collisionHeight:n:l>0?t.top+=l:h>0?t.top-=h:t.top=o(t.top-r,t.top)}},flip:{left:function(t,e){var i,s,n=e.within,o=n.offset.left+n.scrollLeft,r=n.width,l=n.isWindow?n.scrollLeft:n.offset.left,h=t.left-e.collisionPosition.marginLeft,c=h-l,u=h+e.collisionWidth-r-l,d="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,p="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,f=-2*e.offset[0];0>c?(i=t.left+d+p+f+e.collisionWidth-r-o,(0>i||a(c)>i)&&(t.left+=d+p+f)):u>0&&(s=t.left-e.collisionPosition.marginLeft+d+p+f-l,(s>0||u>a(s))&&(t.left+=d+p+f))},top:function(t,e){var i,s,n=e.within,o=n.offset.top+n.scrollTop,r=n.height,l=n.isWindow?n.scrollTop:n.offset.top,h=t.top-e.collisionPosition.marginTop,c=h-l,u=h+e.collisionHeight-r-l,d="top"===e.my[1],p=d?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,f="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,g=-2*e.offset[1];0>c?(s=t.top+p+f+g+e.collisionHeight-r-o,(0>s||a(c)>s)&&(t.top+=p+f+g)):u>0&&(i=t.top-e.collisionPosition.marginTop+p+f+g-l,(i>0||u>a(i))&&(t.top+=p+f+g))}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}}}(),t.ui.position,t.extend(t.expr[":"],{data:t.expr.createPseudo?t.expr.createPseudo(function(e){return function(i){return!!t.data(i,e)}}):function(e,i,s){return!!t.data(e,s[3])}}),t.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},t.fn.scrollParent=function(e){var i=this.css("position"),s="absolute"===i,n=e?/(auto|scroll|hidden)/:/(auto|scroll)/,o=this.parents().filter(function(){var e=t(this);return s&&"static"===e.css("position")?!1:n.test(e.css("overflow")+e.css("overflow-y")+e.css("overflow-x"))}).eq(0);return"fixed"!==i&&o.length?o:t(this[0].ownerDocument||document)},t.fn.extend({uniqueId:function(){var t=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++t)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&t(this).removeAttr("id")})}}),t.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase());var l=!1;t(document).on("mouseup",function(){l=!1}),t.widget("ui.mouse",{version:"1.12.1",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.on("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).on("click."+this.widgetName,function(i){return!0===t.data(i.target,e.widgetName+".preventClickEvent")?(t.removeData(i.target,e.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):void 0}),this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(e){if(!l){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(e),this._mouseDownEvent=e;var i=this,s=1===e.which,n="string"==typeof this.options.cancel&&e.target.nodeName?t(e.target).closest(this.options.cancel).length:!1;return s&&!n&&this._mouseCapture(e)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){i.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(e)!==!1,!this._mouseStarted)?(e.preventDefault(),!0):(!0===t.data(e.target,this.widgetName+".preventClickEvent")&&t.removeData(e.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return i._mouseMove(t)},this._mouseUpDelegate=function(t){return i._mouseUp(t)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),e.preventDefault(),l=!0,!0)):!0}},_mouseMove:function(e){if(this._mouseMoved){if(t.ui.ie&&(!document.documentMode||9>document.documentMode)&&!e.button)return this._mouseUp(e);if(!e.which)if(e.originalEvent.altKey||e.originalEvent.ctrlKey||e.originalEvent.metaKey||e.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(e)}return(e.which||e.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,e)!==!1,this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&t.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,l=!1,e.preventDefault()},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),t.widget("ui.sortable",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_isOverAxis:function(t,e,i){return t>=e&&e+i>t},_isFloating:function(t){return/left|right/.test(t.css("float"))||/inline|table-cell/.test(t.css("display"))},_create:function(){this.containerCache={},this._addClass("ui-sortable"),this.refresh(),this.offset=this.element.offset(),this._mouseInit(),this._setHandleClassName(),this.ready=!0},_setOption:function(t,e){this._super(t,e),"handle"===t&&this._setHandleClassName()},_setHandleClassName:function(){var e=this;this._removeClass(this.element.find(".ui-sortable-handle"),"ui-sortable-handle"),t.each(this.items,function(){e._addClass(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item,"ui-sortable-handle")})},_destroy:function(){this._mouseDestroy();for(var t=this.items.length-1;t>=0;t--)this.items[t].item.removeData(this.widgetName+"-item");return this},_mouseCapture:function(e,i){var s=null,n=!1,o=this;return this.reverting?!1:this.options.disabled||"static"===this.options.type?!1:(this._refreshItems(e),t(e.target).parents().each(function(){return t.data(this,o.widgetName+"-item")===o?(s=t(this),!1):void 0}),t.data(e.target,o.widgetName+"-item")===o&&(s=t(e.target)),s?!this.options.handle||i||(t(this.options.handle,s).find("*").addBack().each(function(){this===e.target&&(n=!0)}),n)?(this.currentItem=s,this._removeCurrentsFromItems(),!0):!1:!1)},_mouseStart:function(e,i,s){var n,o,a=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(e),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},t.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,a.cursorAt&&this._adjustOffsetFromHelper(a.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),a.containment&&this._setContainment(),a.cursor&&"auto"!==a.cursor&&(o=this.document.find("body"),this.storedCursor=o.css("cursor"),o.css("cursor",a.cursor),this.storedStylesheet=t("<style>*{ cursor: "+a.cursor+" !important; }</style>").appendTo(o)),a.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",a.opacity)),a.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",a.zIndex)),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",e,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!s)for(n=this.containers.length-1;n>=0;n--)this.containers[n]._trigger("activate",e,this._uiHash(this));return t.ui.ddmanager&&(t.ui.ddmanager.current=this),t.ui.ddmanager&&!a.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this.dragging=!0,this._addClass(this.helper,"ui-sortable-helper"),this._mouseDrag(e),!0},_mouseDrag:function(e){var i,s,n,o,a=this.options,r=!1;for(this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-e.pageY<a.scrollSensitivity?this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop+a.scrollSpeed:e.pageY-this.overflowOffset.top<a.scrollSensitivity&&(this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop-a.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-e.pageX<a.scrollSensitivity?this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft+a.scrollSpeed:e.pageX-this.overflowOffset.left<a.scrollSensitivity&&(this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft-a.scrollSpeed)):(e.pageY-this.document.scrollTop()<a.scrollSensitivity?r=this.document.scrollTop(this.document.scrollTop()-a.scrollSpeed):this.window.height()-(e.pageY-this.document.scrollTop())<a.scrollSensitivity&&(r=this.document.scrollTop(this.document.scrollTop()+a.scrollSpeed)),e.pageX-this.document.scrollLeft()<a.scrollSensitivity?r=this.document.scrollLeft(this.document.scrollLeft()-a.scrollSpeed):this.window.width()-(e.pageX-this.document.scrollLeft())<a.scrollSensitivity&&(r=this.document.scrollLeft(this.document.scrollLeft()+a.scrollSpeed))),r!==!1&&t.ui.ddmanager&&!a.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e)),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),i=this.items.length-1;i>=0;i--)if(s=this.items[i],n=s.item[0],o=this._intersectsWithPointer(s),o&&s.instance===this.currentContainer&&n!==this.currentItem[0]&&this.placeholder[1===o?"next":"prev"]()[0]!==n&&!t.contains(this.placeholder[0],n)&&("semi-dynamic"===this.options.type?!t.contains(this.element[0],n):!0)){if(this.direction=1===o?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(s))break;this._rearrange(e,s),this._trigger("change",e,this._uiHash());break}return this._contactContainers(e),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),this._trigger("sort",e,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(e,i){if(e){if(t.ui.ddmanager&&!this.options.dropBehaviour&&t.ui.ddmanager.drop(this,e),this.options.revert){var s=this,n=this.placeholder.offset(),o=this.options.axis,a={};o&&"x"!==o||(a.left=n.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollLeft)),o&&"y"!==o||(a.top=n.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,t(this.helper).animate(a,parseInt(this.options.revert,10)||500,function(){s._clear(e)})}else this._clear(e,i);return!1}},cancel:function(){if(this.dragging){this._mouseUp(new t.Event("mouseup",{target:null})),"original"===this.options.helper?(this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")):this.currentItem.show();for(var e=this.containers.length-1;e>=0;e--)this.containers[e]._trigger("deactivate",null,this._uiHash(this)),this.containers[e].containerCache.over&&(this.containers[e]._trigger("out",null,this._uiHash(this)),this.containers[e].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),t.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?t(this.domPosition.prev).after(this.currentItem):t(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},t(i).each(function(){var i=(t(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[\-=_](.+)/);i&&s.push((e.key||i[1]+"[]")+"="+(e.key&&e.expression?i[1]:i[2]))}),!s.length&&e.key&&s.push(e.key+"="),s.join("&")},toArray:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},i.each(function(){s.push(t(e.item||this).attr(e.attribute||"id")||"")}),s},_intersectsWith:function(t){var e=this.positionAbs.left,i=e+this.helperProportions.width,s=this.positionAbs.top,n=s+this.helperProportions.height,o=t.left,a=o+t.width,r=t.top,l=r+t.height,h=this.offset.click.top,c=this.offset.click.left,u="x"===this.options.axis||s+h>r&&l>s+h,d="y"===this.options.axis||e+c>o&&a>e+c,p=u&&d;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>t[this.floating?"width":"height"]?p:e+this.helperProportions.width/2>o&&a>i-this.helperProportions.width/2&&s+this.helperProportions.height/2>r&&l>n-this.helperProportions.height/2},_intersectsWithPointer:function(t){var e,i,s="x"===this.options.axis||this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top,t.height),n="y"===this.options.axis||this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left,t.width),o=s&&n;return o?(e=this._getDragVerticalDirection(),i=this._getDragHorizontalDirection(),this.floating?"right"===i||"down"===e?2:1:e&&("down"===e?2:1)):!1},_intersectsWithSides:function(t){var e=this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top+t.height/2,t.height),i=this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left+t.width/2,t.width),s=this._getDragVerticalDirection(),n=this._getDragHorizontalDirection();return this.floating&&n?"right"===n&&i||"left"===n&&!i:s&&("down"===s&&e||"up"===s&&!e)},_getDragVerticalDirection:function(){var t=this.positionAbs.top-this.lastPositionAbs.top;return 0!==t&&(t>0?"down":"up")},_getDragHorizontalDirection:function(){var t=this.positionAbs.left-this.lastPositionAbs.left;return 0!==t&&(t>0?"right":"left")},refresh:function(t){return this._refreshItems(t),this._setHandleClassName(),this.refreshPositions(),this},_connectWith:function(){var t=this.options;return t.connectWith.constructor===String?[t.connectWith]:t.connectWith},_getItemsAsjQuery:function(e){function i(){r.push(this)}var s,n,o,a,r=[],l=[],h=this._connectWith();if(h&&e)for(s=h.length-1;s>=0;s--)for(o=t(h[s],this.document[0]),n=o.length-1;n>=0;n--)a=t.data(o[n],this.widgetFullName),a&&a!==this&&!a.options.disabled&&l.push([t.isFunction(a.options.items)?a.options.items.call(a.element):t(a.options.items,a.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),a]);for(l.push([t.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):t(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),s=l.length-1;s>=0;s--)l[s][0].each(i);return t(r)},_removeCurrentsFromItems:function(){var e=this.currentItem.find(":data("+this.widgetName+"-item)");
7
this.items=t.grep(this.items,function(t){for(var i=0;e.length>i;i++)if(e[i]===t.item[0])return!1;return!0})},_refreshItems:function(e){this.items=[],this.containers=[this];var i,s,n,o,a,r,l,h,c=this.items,u=[[t.isFunction(this.options.items)?this.options.items.call(this.element[0],e,{item:this.currentItem}):t(this.options.items,this.element),this]],d=this._connectWith();if(d&&this.ready)for(i=d.length-1;i>=0;i--)for(n=t(d[i],this.document[0]),s=n.length-1;s>=0;s--)o=t.data(n[s],this.widgetFullName),o&&o!==this&&!o.options.disabled&&(u.push([t.isFunction(o.options.items)?o.options.items.call(o.element[0],e,{item:this.currentItem}):t(o.options.items,o.element),o]),this.containers.push(o));for(i=u.length-1;i>=0;i--)for(a=u[i][1],r=u[i][0],s=0,h=r.length;h>s;s++)l=t(r[s]),l.data(this.widgetName+"-item",a),c.push({item:l,instance:a,width:0,height:0,left:0,top:0})},refreshPositions:function(e){this.floating=this.items.length?"x"===this.options.axis||this._isFloating(this.items[0].item):!1,this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());var i,s,n,o;for(i=this.items.length-1;i>=0;i--)s=this.items[i],s.instance!==this.currentContainer&&this.currentContainer&&s.item[0]!==this.currentItem[0]||(n=this.options.toleranceElement?t(this.options.toleranceElement,s.item):s.item,e||(s.width=n.outerWidth(),s.height=n.outerHeight()),o=n.offset(),s.left=o.left,s.top=o.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(i=this.containers.length-1;i>=0;i--)o=this.containers[i].element.offset(),this.containers[i].containerCache.left=o.left,this.containers[i].containerCache.top=o.top,this.containers[i].containerCache.width=this.containers[i].element.outerWidth(),this.containers[i].containerCache.height=this.containers[i].element.outerHeight();return this},_createPlaceholder:function(e){e=e||this;var i,s=e.options;s.placeholder&&s.placeholder.constructor!==String||(i=s.placeholder,s.placeholder={element:function(){var s=e.currentItem[0].nodeName.toLowerCase(),n=t("<"+s+">",e.document[0]);return e._addClass(n,"ui-sortable-placeholder",i||e.currentItem[0].className)._removeClass(n,"ui-sortable-helper"),"tbody"===s?e._createTrPlaceholder(e.currentItem.find("tr").eq(0),t("<tr>",e.document[0]).appendTo(n)):"tr"===s?e._createTrPlaceholder(e.currentItem,n):"img"===s&&n.attr("src",e.currentItem.attr("src")),i||n.css("visibility","hidden"),n},update:function(t,n){(!i||s.forcePlaceholderSize)&&(n.height()||n.height(e.currentItem.innerHeight()-parseInt(e.currentItem.css("paddingTop")||0,10)-parseInt(e.currentItem.css("paddingBottom")||0,10)),n.width()||n.width(e.currentItem.innerWidth()-parseInt(e.currentItem.css("paddingLeft")||0,10)-parseInt(e.currentItem.css("paddingRight")||0,10)))}}),e.placeholder=t(s.placeholder.element.call(e.element,e.currentItem)),e.currentItem.after(e.placeholder),s.placeholder.update(e,e.placeholder)},_createTrPlaceholder:function(e,i){var s=this;e.children().each(function(){t("<td>&#160;</td>",s.document[0]).attr("colspan",t(this).attr("colspan")||1).appendTo(i)})},_contactContainers:function(e){var i,s,n,o,a,r,l,h,c,u,d=null,p=null;for(i=this.containers.length-1;i>=0;i--)if(!t.contains(this.currentItem[0],this.containers[i].element[0]))if(this._intersectsWith(this.containers[i].containerCache)){if(d&&t.contains(this.containers[i].element[0],d.element[0]))continue;d=this.containers[i],p=i}else this.containers[i].containerCache.over&&(this.containers[i]._trigger("out",e,this._uiHash(this)),this.containers[i].containerCache.over=0);if(d)if(1===this.containers.length)this.containers[p].containerCache.over||(this.containers[p]._trigger("over",e,this._uiHash(this)),this.containers[p].containerCache.over=1);else{for(n=1e4,o=null,c=d.floating||this._isFloating(this.currentItem),a=c?"left":"top",r=c?"width":"height",u=c?"pageX":"pageY",s=this.items.length-1;s>=0;s--)t.contains(this.containers[p].element[0],this.items[s].item[0])&&this.items[s].item[0]!==this.currentItem[0]&&(l=this.items[s].item.offset()[a],h=!1,e[u]-l>this.items[s][r]/2&&(h=!0),n>Math.abs(e[u]-l)&&(n=Math.abs(e[u]-l),o=this.items[s],this.direction=h?"up":"down"));if(!o&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[p])return this.currentContainer.containerCache.over||(this.containers[p]._trigger("over",e,this._uiHash()),this.currentContainer.containerCache.over=1),void 0;o?this._rearrange(e,o,null,!0):this._rearrange(e,null,this.containers[p].element,!0),this._trigger("change",e,this._uiHash()),this.containers[p]._trigger("change",e,this._uiHash(this)),this.currentContainer=this.containers[p],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[p]._trigger("over",e,this._uiHash(this)),this.containers[p].containerCache.over=1}},_createHelper:function(e){var i=this.options,s=t.isFunction(i.helper)?t(i.helper.apply(this.element[0],[e,this.currentItem])):"clone"===i.helper?this.currentItem.clone():this.currentItem;return s.parents("body").length||t("parent"!==i.appendTo?i.appendTo:this.currentItem[0].parentNode)[0].appendChild(s[0]),s[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),(!s[0].style.width||i.forceHelperSize)&&s.width(this.currentItem.width()),(!s[0].style.height||i.forceHelperSize)&&s.height(this.currentItem.height()),s},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var e=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===this.document[0].body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&t.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var t=this.currentItem.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,i,s,n=this.options;"parent"===n.containment&&(n.containment=this.helper[0].parentNode),("document"===n.containment||"window"===n.containment)&&(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,"document"===n.containment?this.document.width():this.window.width()-this.helperProportions.width-this.margins.left,("document"===n.containment?this.document.height()||document.body.parentNode.scrollHeight:this.window.height()||this.document[0].body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(n.containment)||(e=t(n.containment)[0],i=t(n.containment).offset(),s="hidden"!==t(e).css("overflow"),this.containment=[i.left+(parseInt(t(e).css("borderLeftWidth"),10)||0)+(parseInt(t(e).css("paddingLeft"),10)||0)-this.margins.left,i.top+(parseInt(t(e).css("borderTopWidth"),10)||0)+(parseInt(t(e).css("paddingTop"),10)||0)-this.margins.top,i.left+(s?Math.max(e.scrollWidth,e.offsetWidth):e.offsetWidth)-(parseInt(t(e).css("borderLeftWidth"),10)||0)-(parseInt(t(e).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,i.top+(s?Math.max(e.scrollHeight,e.offsetHeight):e.offsetHeight)-(parseInt(t(e).css("borderTopWidth"),10)||0)-(parseInt(t(e).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(e,i){i||(i=this.position);var s="absolute"===e?1:-1,n="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,o=/(html|body)/i.test(n[0].tagName);return{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():o?0:n.scrollTop())*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():o?0:n.scrollLeft())*s}},_generatePosition:function(e){var i,s,n=this.options,o=e.pageX,a=e.pageY,r="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,l=/(html|body)/i.test(r[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(e.pageX-this.offset.click.left<this.containment[0]&&(o=this.containment[0]+this.offset.click.left),e.pageY-this.offset.click.top<this.containment[1]&&(a=this.containment[1]+this.offset.click.top),e.pageX-this.offset.click.left>this.containment[2]&&(o=this.containment[2]+this.offset.click.left),e.pageY-this.offset.click.top>this.containment[3]&&(a=this.containment[3]+this.offset.click.top)),n.grid&&(i=this.originalPageY+Math.round((a-this.originalPageY)/n.grid[1])*n.grid[1],a=this.containment?i-this.offset.click.top>=this.containment[1]&&i-this.offset.click.top<=this.containment[3]?i:i-this.offset.click.top>=this.containment[1]?i-n.grid[1]:i+n.grid[1]:i,s=this.originalPageX+Math.round((o-this.originalPageX)/n.grid[0])*n.grid[0],o=this.containment?s-this.offset.click.left>=this.containment[0]&&s-this.offset.click.left<=this.containment[2]?s:s-this.offset.click.left>=this.containment[0]?s-n.grid[0]:s+n.grid[0]:s)),{top:a-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():l?0:r.scrollTop()),left:o-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():l?0:r.scrollLeft())}},_rearrange:function(t,e,i,s){i?i[0].appendChild(this.placeholder[0]):e.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?e.item[0]:e.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var n=this.counter;this._delay(function(){n===this.counter&&this.refreshPositions(!s)})},_clear:function(t,e){function i(t,e,i){return function(s){i._trigger(t,s,e._uiHash(e))}}this.reverting=!1;var s,n=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(s in this._storedCSS)("auto"===this._storedCSS[s]||"static"===this._storedCSS[s])&&(this._storedCSS[s]="");this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")}else this.currentItem.show();for(this.fromOutside&&!e&&n.push(function(t){this._trigger("receive",t,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||e||n.push(function(t){this._trigger("update",t,this._uiHash())}),this!==this.currentContainer&&(e||(n.push(function(t){this._trigger("remove",t,this._uiHash())}),n.push(function(t){return function(e){t._trigger("receive",e,this._uiHash(this))}}.call(this,this.currentContainer)),n.push(function(t){return function(e){t._trigger("update",e,this._uiHash(this))}}.call(this,this.currentContainer)))),s=this.containers.length-1;s>=0;s--)e||n.push(i("deactivate",this,this.containers[s])),this.containers[s].containerCache.over&&(n.push(i("out",this,this.containers[s])),this.containers[s].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,e||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!e){for(s=0;n.length>s;s++)n[s].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!this.cancelHelperRemoval},_trigger:function(){t.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(e){var i=e||this;return{helper:i.helper,placeholder:i.placeholder||t([]),position:i.position,originalPosition:i.originalPosition,offset:i.positionAbs,item:i.currentItem,sender:e?e.element:null}}}),t.ui.safeActiveElement=function(t){var e;try{e=t.activeElement}catch(i){e=t.body}return e||(e=t.body),e.nodeName||(e=t.body),e},t.widget("ui.menu",{version:"1.12.1",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-caret-1-e"},items:"> *",menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().attr({role:this.options.role,tabIndex:0}),this._addClass("ui-menu","ui-widget ui-widget-content"),this._on({"mousedown .ui-menu-item":function(t){t.preventDefault()},"click .ui-menu-item":function(e){var i=t(e.target),s=t(t.ui.safeActiveElement(this.document[0]));!this.mouseHandled&&i.not(".ui-state-disabled").length&&(this.select(e),e.isPropagationStopped()||(this.mouseHandled=!0),i.has(".ui-menu").length?this.expand(e):!this.element.is(":focus")&&s.closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(e){if(!this.previousFilter){var i=t(e.target).closest(".ui-menu-item"),s=t(e.currentTarget);i[0]===s[0]&&(this._removeClass(s.siblings().children(".ui-state-active"),null,"ui-state-active"),this.focus(e,s))}},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var i=this.active||this.element.find(this.options.items).eq(0);e||this.focus(t,i)},blur:function(e){this._delay(function(){var i=!t.contains(this.element[0],t.ui.safeActiveElement(this.document[0]));i&&this.collapseAll(e)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(t){this._closeOnDocumentClick(t)&&this.collapseAll(t),this.mouseHandled=!1}})},_destroy:function(){var e=this.element.find(".ui-menu-item").removeAttr("role aria-disabled"),i=e.children(".ui-menu-item-wrapper").removeUniqueId().removeAttr("tabIndex role aria-haspopup");this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeAttr("role aria-labelledby aria-expanded aria-hidden aria-disabled tabIndex").removeUniqueId().show(),i.children().each(function(){var e=t(this);e.data("ui-menu-submenu-caret")&&e.remove()})},_keydown:function(e){var i,s,n,o,a=!0;switch(e.keyCode){case t.ui.keyCode.PAGE_UP:this.previousPage(e);break;case t.ui.keyCode.PAGE_DOWN:this.nextPage(e);break;case t.ui.keyCode.HOME:this._move("first","first",e);break;case t.ui.keyCode.END:this._move("last","last",e);break;case t.ui.keyCode.UP:this.previous(e);break;case t.ui.keyCode.DOWN:this.next(e);break;case t.ui.keyCode.LEFT:this.collapse(e);break;case t.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(e);break;case t.ui.keyCode.ENTER:case t.ui.keyCode.SPACE:this._activate(e);break;case t.ui.keyCode.ESCAPE:this.collapse(e);break;default:a=!1,s=this.previousFilter||"",o=!1,n=e.keyCode>=96&&105>=e.keyCode?""+(e.keyCode-96):String.fromCharCode(e.keyCode),clearTimeout(this.filterTimer),n===s?o=!0:n=s+n,i=this._filterMenuItems(n),i=o&&-1!==i.index(this.active.next())?this.active.nextAll(".ui-menu-item"):i,i.length||(n=String.fromCharCode(e.keyCode),i=this._filterMenuItems(n)),i.length?(this.focus(e,i),this.previousFilter=n,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}a&&e.preventDefault()},_activate:function(t){this.active&&!this.active.is(".ui-state-disabled")&&(this.active.children("[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var e,i,s,n,o,a=this,r=this.options.icons.submenu,l=this.element.find(this.options.menus);this._toggleClass("ui-menu-icons",null,!!this.element.find(".ui-icon").length),s=l.filter(":not(.ui-menu)").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var e=t(this),i=e.prev(),s=t("<span>").data("ui-menu-submenu-caret",!0);a._addClass(s,"ui-menu-icon","ui-icon "+r),i.attr("aria-haspopup","true").prepend(s),e.attr("aria-labelledby",i.attr("id"))}),this._addClass(s,"ui-menu","ui-widget ui-widget-content ui-front"),e=l.add(this.element),i=e.find(this.options.items),i.not(".ui-menu-item").each(function(){var e=t(this);a._isDivider(e)&&a._addClass(e,"ui-menu-divider","ui-widget-content")}),n=i.not(".ui-menu-item, .ui-menu-divider"),o=n.children().not(".ui-menu").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),this._addClass(n,"ui-menu-item")._addClass(o,"ui-menu-item-wrapper"),i.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!t.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){if("icons"===t){var i=this.element.find(".ui-menu-icon");this._removeClass(i,null,this.options.icons.submenu)._addClass(i,null,e.submenu)}this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t+""),this._toggleClass(null,"ui-state-disabled",!!t)},focus:function(t,e){var i,s,n;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),s=this.active.children(".ui-menu-item-wrapper"),this._addClass(s,null,"ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",s.attr("id")),n=this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper"),this._addClass(n,null,"ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),i=e.children(".ui-menu"),i.length&&t&&/^mouse/.test(t.type)&&this._startOpening(i),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(e){var i,s,n,o,a,r;this._hasScroll()&&(i=parseFloat(t.css(this.activeMenu[0],"borderTopWidth"))||0,s=parseFloat(t.css(this.activeMenu[0],"paddingTop"))||0,n=e.offset().top-this.activeMenu.offset().top-i-s,o=this.activeMenu.scrollTop(),a=this.activeMenu.height(),r=e.outerHeight(),0>n?this.activeMenu.scrollTop(o+n):n+r>a&&this.activeMenu.scrollTop(o+n-a+r))},blur:function(t,e){e||clearTimeout(this.timer),this.active&&(this._removeClass(this.active.children(".ui-menu-item-wrapper"),null,"ui-state-active"),this._trigger("blur",t,{item:this.active}),this.active=null)},_startOpening:function(t){clearTimeout(this.timer),"true"===t.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(t)},this.delay))},_open:function(e){var i=t.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(e.parents(".ui-menu")).hide().attr("aria-hidden","true"),e.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(i)},collapseAll:function(e,i){clearTimeout(this.timer),this.timer=this._delay(function(){var s=i?this.element:t(e&&e.target).closest(this.element.find(".ui-menu"));s.length||(s=this.element),this._close(s),this.blur(e),this._removeClass(s.find(".ui-state-active"),null,"ui-state-active"),this.activeMenu=s},this.delay)},_close:function(t){t||(t=this.active?this.active.parent():this.element),t.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false")},_closeOnDocumentClick:function(e){return!t(e.target).closest(".ui-menu").length},_isDivider:function(t){return!/[^\-\u2014\u2013\s]/.test(t.text())},collapse:function(t){var e=this.active&&this.active.parent().closest(".ui-menu-item",this.element);e&&e.length&&(this._close(),this.focus(t,e))},expand:function(t){var e=this.active&&this.active.children(".ui-menu ").find(this.options.items).first();e&&e.length&&(this._open(e.parent()),this._delay(function(){this.focus(t,e)}))},next:function(t){this._move("next","first",t)},previous:function(t){this._move("prev","last",t)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(t,e,i){var s;this.active&&(s="first"===t||"last"===t?this.active["first"===t?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[t+"All"](".ui-menu-item").eq(0)),s&&s.length&&this.active||(s=this.activeMenu.find(this.options.items)[e]()),this.focus(i,s)},nextPage:function(e){var i,s,n;return this.active?(this.isLastItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return i=t(this),0>i.offset().top-s-n}),this.focus(e,i)):this.focus(e,this.activeMenu.find(this.options.items)[this.active?"last":"first"]())),void 0):(this.next(e),void 0)},previousPage:function(e){var i,s,n;return this.active?(this.isFirstItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return i=t(this),i.offset().top-s+n>0}),this.focus(e,i)):this.focus(e,this.activeMenu.find(this.options.items).first())),void 0):(this.next(e),void 0)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(e){this.active=this.active||t(e.target).closest(".ui-menu-item");var i={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(e,!0),this._trigger("select",e,i)},_filterMenuItems:function(e){var i=e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"),s=RegExp("^"+i,"i");return this.activeMenu.find(this.options.items).filter(".ui-menu-item").filter(function(){return s.test(t.trim(t(this).children(".ui-menu-item-wrapper").text()))})}}),t.widget("ui.autocomplete",{version:"1.12.1",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,_create:function(){var e,i,s,n=this.element[0].nodeName.toLowerCase(),o="textarea"===n,a="input"===n;this.isMultiLine=o||!a&&this._isContentEditable(this.element),this.valueMethod=this.element[o||a?"val":"text"],this.isNewMenu=!0,this._addClass("ui-autocomplete-input"),this.element.attr("autocomplete","off"),this._on(this.element,{keydown:function(n){if(this.element.prop("readOnly"))return e=!0,s=!0,i=!0,void 0;e=!1,s=!1,i=!1;var o=t.ui.keyCode;switch(n.keyCode){case o.PAGE_UP:e=!0,this._move("previousPage",n);break;case o.PAGE_DOWN:e=!0,this._move("nextPage",n);break;case o.UP:e=!0,this._keyEvent("previous",n);break;case o.DOWN:e=!0,this._keyEvent("next",n);break;case o.ENTER:this.menu.active&&(e=!0,n.preventDefault(),this.menu.select(n));break;case o.TAB:this.menu.active&&this.menu.select(n);break;case o.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(n),n.preventDefault());break;default:i=!0,this._searchTimeout(n)}},keypress:function(s){if(e)return e=!1,(!this.isMultiLine||this.menu.element.is(":visible"))&&s.preventDefault(),void 0;if(!i){var n=t.ui.keyCode;switch(s.keyCode){case n.PAGE_UP:this._move("previousPage",s);break;case n.PAGE_DOWN:this._move("nextPage",s);break;case n.UP:this._keyEvent("previous",s);break;case n.DOWN:this._keyEvent("next",s)}}},input:function(t){return s?(s=!1,t.preventDefault(),void 0):(this._searchTimeout(t),void 0)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(t){return this.cancelBlur?(delete this.cancelBlur,void 0):(clearTimeout(this.searching),this.close(t),this._change(t),void 0)}}),this._initSource(),this.menu=t("<ul>").appendTo(this._appendTo()).menu({role:null}).hide().menu("instance"),this._addClass(this.menu.element,"ui-autocomplete","ui-front"),this._on(this.menu.element,{mousedown:function(e){e.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,this.element[0]!==t.ui.safeActiveElement(this.document[0])&&this.element.trigger("focus")})},menufocus:function(e,i){var s,n;return this.isNewMenu&&(this.isNewMenu=!1,e.originalEvent&&/^mouse/.test(e.originalEvent.type))?(this.menu.blur(),this.document.one("mousemove",function(){t(e.target).trigger(e.originalEvent)}),void 0):(n=i.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",e,{item:n})&&e.originalEvent&&/^key/.test(e.originalEvent.type)&&this._value(n.value),s=i.item.attr("aria-label")||n.value,s&&t.trim(s).length&&(this.liveRegion.children().hide(),t("<div>").text(s).appendTo(this.liveRegion)),void 0)},menuselect:function(e,i){var s=i.item.data("ui-autocomplete-item"),n=this.previous;this.element[0]!==t.ui.safeActiveElement(this.document[0])&&(this.element.trigger("focus"),this.previous=n,this._delay(function(){this.previous=n,this.selectedItem=s})),!1!==this._trigger("select",e,{item:s})&&this._value(s.value),this.term=this._value(),this.close(e),this.selectedItem=s}}),this.liveRegion=t("<div>",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(t,e){this._super(t,e),"source"===t&&this._initSource(),"appendTo"===t&&this.menu.element.appendTo(this._appendTo()),"disabled"===t&&e&&this.xhr&&this.xhr.abort()},_isEventTargetInWidget:function(e){var i=this.menu.element[0];return e.target===this.element[0]||e.target===i||t.contains(i,e.target)},_closeOnClickOutside:function(t){this._isEventTargetInWidget(t)||this.close()},_appendTo:function(){var e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?t(e):this.document.find(e).eq(0)),e&&e[0]||(e=this.element.closest(".ui-front, dialog")),e.length||(e=this.document[0].body),e},_initSource:function(){var e,i,s=this;t.isArray(this.options.source)?(e=this.options.source,this.source=function(i,s){s(t.ui.autocomplete.filter(e,i.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(e,n){s.xhr&&s.xhr.abort(),s.xhr=t.ajax({url:i,data:e,dataType:"json",success:function(t){n(t)},error:function(){n([])}})}):this.source=this.options.source},_searchTimeout:function(t){clearTimeout(this.searching),this.searching=this._delay(function(){var e=this.term===this._value(),i=this.menu.element.is(":visible"),s=t.altKey||t.ctrlKey||t.metaKey||t.shiftKey;(!e||e&&!i&&!s)&&(this.selectedItem=null,this.search(null,t))},this.options.delay)},search:function(t,e){return t=null!=t?t:this._value(),this.term=this._value(),t.length<this.options.minLength?this.close(e):this._trigger("search",e)!==!1?this._search(t):void 0},_search:function(t){this.pending++,this._addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:t},this._response())},_response:function(){var e=++this.requestIndex;return t.proxy(function(t){e===this.requestIndex&&this.__response(t),this.pending--,this.pending||this._removeClass("ui-autocomplete-loading")},this)},__response:function(t){t&&(t=this._normalize(t)),this._trigger("response",null,{content:t}),!this.options.disabled&&t&&t.length&&!this.cancelSearch?(this._suggest(t),this._trigger("open")):this._close()},close:function(t){this.cancelSearch=!0,this._close(t)},_close:function(t){this._off(this.document,"mousedown"),this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",t))},_change:function(t){this.previous!==this._value()&&this._trigger("change",t,{item:this.selectedItem})},_normalize:function(e){return e.length&&e[0].label&&e[0].value?e:t.map(e,function(e){return"string"==typeof e?{label:e,value:e}:t.extend({},e,{label:e.label||e.value,value:e.value||e.label})})},_suggest:function(e){var i=this.menu.element.empty();this._renderMenu(i,e),this.isNewMenu=!0,this.menu.refresh(),i.show(),this._resizeMenu(),i.position(t.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next(),this._on(this.document,{mousedown:"_closeOnClickOutside"})},_resizeMenu:function(){var t=this.menu.element;t.outerWidth(Math.max(t.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(e,i){var s=this;t.each(i,function(t,i){s._renderItemData(e,i)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-autocomplete-item",e)},_renderItem:function(e,i){return t("<li>").append(t("<div>").text(i.label)).appendTo(e)},_move:function(t,e){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(t)||this.menu.isLastItem()&&/^next/.test(t)?(this.isMultiLine||this._value(this.term),this.menu.blur(),void 0):(this.menu[t](e),void 0):(this.search(null,e),void 0)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(t,e){(!this.isMultiLine||this.menu.element.is(":visible"))&&(this._move(t,e),e.preventDefault())},_isContentEditable:function(t){if(!t.length)return!1;var e=t.prop("contentEditable");return"inherit"===e?this._isContentEditable(t.parent()):"true"===e}}),t.extend(t.ui.autocomplete,{escapeRegex:function(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(e,i){var s=RegExp(t.ui.autocomplete.escapeRegex(i),"i");return t.grep(e,function(t){return s.test(t.label||t.value||t)})}}),t.widget("ui.autocomplete",t.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(t){return t+(t>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(e){var i;this._superApply(arguments),this.options.disabled||this.cancelSearch||(i=e&&e.length?this.options.messages.results(e.length):this.options.messages.noResults,this.liveRegion.children().hide(),t("<div>").text(i).appendTo(this.liveRegion))}}),t.ui.autocomplete,t.extend(t.ui,{datepicker:{version:"1.12.1"}});var h;t.extend(i.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(t){return o(this._defaults,t||{}),this},_attachDatepicker:function(e,i){var s,n,o;s=e.nodeName.toLowerCase(),n="div"===s||"span"===s,e.id||(this.uuid+=1,e.id="dp"+this.uuid),o=this._newInst(t(e),n),o.settings=t.extend({},i||{}),"input"===s?this._connectDatepicker(e,o):n&&this._inlineDatepicker(e,o)},_newInst:function(e,i){var n=e[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1");return{id:n,input:e,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:i,dpDiv:i?s(t("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}
8
},_connectDatepicker:function(e,i){var s=t(e);i.append=t([]),i.trigger=t([]),s.hasClass(this.markerClassName)||(this._attachments(s,i),s.addClass(this.markerClassName).on("keydown",this._doKeyDown).on("keypress",this._doKeyPress).on("keyup",this._doKeyUp),this._autoSize(i),t.data(e,"datepicker",i),i.settings.disabled&&this._disableDatepicker(e))},_attachments:function(e,i){var s,n,o,a=this._get(i,"appendText"),r=this._get(i,"isRTL");i.append&&i.append.remove(),a&&(i.append=t("<span class='"+this._appendClass+"'>"+a+"</span>"),e[r?"before":"after"](i.append)),e.off("focus",this._showDatepicker),i.trigger&&i.trigger.remove(),s=this._get(i,"showOn"),("focus"===s||"both"===s)&&e.on("focus",this._showDatepicker),("button"===s||"both"===s)&&(n=this._get(i,"buttonText"),o=this._get(i,"buttonImage"),i.trigger=t(this._get(i,"buttonImageOnly")?t("<img/>").addClass(this._triggerClass).attr({src:o,alt:n,title:n}):t("<button type='button'></button>").addClass(this._triggerClass).html(o?t("<img/>").attr({src:o,alt:n,title:n}):n)),e[r?"before":"after"](i.trigger),i.trigger.on("click",function(){return t.datepicker._datepickerShowing&&t.datepicker._lastInput===e[0]?t.datepicker._hideDatepicker():t.datepicker._datepickerShowing&&t.datepicker._lastInput!==e[0]?(t.datepicker._hideDatepicker(),t.datepicker._showDatepicker(e[0])):t.datepicker._showDatepicker(e[0]),!1}))},_autoSize:function(t){if(this._get(t,"autoSize")&&!t.inline){var e,i,s,n,o=new Date(2009,11,20),a=this._get(t,"dateFormat");a.match(/[DM]/)&&(e=function(t){for(i=0,s=0,n=0;t.length>n;n++)t[n].length>i&&(i=t[n].length,s=n);return s},o.setMonth(e(this._get(t,a.match(/MM/)?"monthNames":"monthNamesShort"))),o.setDate(e(this._get(t,a.match(/DD/)?"dayNames":"dayNamesShort"))+20-o.getDay())),t.input.attr("size",this._formatDate(t,o).length)}},_inlineDatepicker:function(e,i){var s=t(e);s.hasClass(this.markerClassName)||(s.addClass(this.markerClassName).append(i.dpDiv),t.data(e,"datepicker",i),this._setDate(i,this._getDefaultDate(i),!0),this._updateDatepicker(i),this._updateAlternate(i),i.settings.disabled&&this._disableDatepicker(e),i.dpDiv.css("display","block"))},_dialogDatepicker:function(e,i,s,n,a){var r,l,h,c,u,d=this._dialogInst;return d||(this.uuid+=1,r="dp"+this.uuid,this._dialogInput=t("<input type='text' id='"+r+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.on("keydown",this._doKeyDown),t("body").append(this._dialogInput),d=this._dialogInst=this._newInst(this._dialogInput,!1),d.settings={},t.data(this._dialogInput[0],"datepicker",d)),o(d.settings,n||{}),i=i&&i.constructor===Date?this._formatDate(d,i):i,this._dialogInput.val(i),this._pos=a?a.length?a:[a.pageX,a.pageY]:null,this._pos||(l=document.documentElement.clientWidth,h=document.documentElement.clientHeight,c=document.documentElement.scrollLeft||document.body.scrollLeft,u=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[l/2-100+c,h/2-150+u]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),d.settings.onSelect=s,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),t.blockUI&&t.blockUI(this.dpDiv),t.data(this._dialogInput[0],"datepicker",d),this},_destroyDatepicker:function(e){var i,s=t(e),n=t.data(e,"datepicker");s.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),t.removeData(e,"datepicker"),"input"===i?(n.append.remove(),n.trigger.remove(),s.removeClass(this.markerClassName).off("focus",this._showDatepicker).off("keydown",this._doKeyDown).off("keypress",this._doKeyPress).off("keyup",this._doKeyUp)):("div"===i||"span"===i)&&s.removeClass(this.markerClassName).empty(),h===n&&(h=null))},_enableDatepicker:function(e){var i,s,n=t(e),o=t.data(e,"datepicker");n.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),"input"===i?(e.disabled=!1,o.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):("div"===i||"span"===i)&&(s=n.children("."+this._inlineClass),s.children().removeClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}))},_disableDatepicker:function(e){var i,s,n=t(e),o=t.data(e,"datepicker");n.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),"input"===i?(e.disabled=!0,o.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):("div"===i||"span"===i)&&(s=n.children("."+this._inlineClass),s.children().addClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}),this._disabledInputs[this._disabledInputs.length]=e)},_isDisabledDatepicker:function(t){if(!t)return!1;for(var e=0;this._disabledInputs.length>e;e++)if(this._disabledInputs[e]===t)return!0;return!1},_getInst:function(e){try{return t.data(e,"datepicker")}catch(i){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(e,i,s){var n,a,r,l,h=this._getInst(e);return 2===arguments.length&&"string"==typeof i?"defaults"===i?t.extend({},t.datepicker._defaults):h?"all"===i?t.extend({},h.settings):this._get(h,i):null:(n=i||{},"string"==typeof i&&(n={},n[i]=s),h&&(this._curInst===h&&this._hideDatepicker(),a=this._getDateDatepicker(e,!0),r=this._getMinMaxDate(h,"min"),l=this._getMinMaxDate(h,"max"),o(h.settings,n),null!==r&&void 0!==n.dateFormat&&void 0===n.minDate&&(h.settings.minDate=this._formatDate(h,r)),null!==l&&void 0!==n.dateFormat&&void 0===n.maxDate&&(h.settings.maxDate=this._formatDate(h,l)),"disabled"in n&&(n.disabled?this._disableDatepicker(e):this._enableDatepicker(e)),this._attachments(t(e),h),this._autoSize(h),this._setDate(h,a),this._updateAlternate(h),this._updateDatepicker(h)),void 0)},_changeDatepicker:function(t,e,i){this._optionDatepicker(t,e,i)},_refreshDatepicker:function(t){var e=this._getInst(t);e&&this._updateDatepicker(e)},_setDateDatepicker:function(t,e){var i=this._getInst(t);i&&(this._setDate(i,e),this._updateDatepicker(i),this._updateAlternate(i))},_getDateDatepicker:function(t,e){var i=this._getInst(t);return i&&!i.inline&&this._setDateFromField(i,e),i?this._getDate(i):null},_doKeyDown:function(e){var i,s,n,o=t.datepicker._getInst(e.target),a=!0,r=o.dpDiv.is(".ui-datepicker-rtl");if(o._keyEvent=!0,t.datepicker._datepickerShowing)switch(e.keyCode){case 9:t.datepicker._hideDatepicker(),a=!1;break;case 13:return n=t("td."+t.datepicker._dayOverClass+":not(."+t.datepicker._currentClass+")",o.dpDiv),n[0]&&t.datepicker._selectDay(e.target,o.selectedMonth,o.selectedYear,n[0]),i=t.datepicker._get(o,"onSelect"),i?(s=t.datepicker._formatDate(o),i.apply(o.input?o.input[0]:null,[s,o])):t.datepicker._hideDatepicker(),!1;case 27:t.datepicker._hideDatepicker();break;case 33:t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(o,"stepBigMonths"):-t.datepicker._get(o,"stepMonths"),"M");break;case 34:t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(o,"stepBigMonths"):+t.datepicker._get(o,"stepMonths"),"M");break;case 35:(e.ctrlKey||e.metaKey)&&t.datepicker._clearDate(e.target),a=e.ctrlKey||e.metaKey;break;case 36:(e.ctrlKey||e.metaKey)&&t.datepicker._gotoToday(e.target),a=e.ctrlKey||e.metaKey;break;case 37:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,r?1:-1,"D"),a=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(o,"stepBigMonths"):-t.datepicker._get(o,"stepMonths"),"M");break;case 38:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,-7,"D"),a=e.ctrlKey||e.metaKey;break;case 39:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,r?-1:1,"D"),a=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(o,"stepBigMonths"):+t.datepicker._get(o,"stepMonths"),"M");break;case 40:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,7,"D"),a=e.ctrlKey||e.metaKey;break;default:a=!1}else 36===e.keyCode&&e.ctrlKey?t.datepicker._showDatepicker(this):a=!1;a&&(e.preventDefault(),e.stopPropagation())},_doKeyPress:function(e){var i,s,n=t.datepicker._getInst(e.target);return t.datepicker._get(n,"constrainInput")?(i=t.datepicker._possibleChars(t.datepicker._get(n,"dateFormat")),s=String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),e.ctrlKey||e.metaKey||" ">s||!i||i.indexOf(s)>-1):void 0},_doKeyUp:function(e){var i,s=t.datepicker._getInst(e.target);if(s.input.val()!==s.lastVal)try{i=t.datepicker.parseDate(t.datepicker._get(s,"dateFormat"),s.input?s.input.val():null,t.datepicker._getFormatConfig(s)),i&&(t.datepicker._setDateFromField(s),t.datepicker._updateAlternate(s),t.datepicker._updateDatepicker(s))}catch(n){}return!0},_showDatepicker:function(i){if(i=i.target||i,"input"!==i.nodeName.toLowerCase()&&(i=t("input",i.parentNode)[0]),!t.datepicker._isDisabledDatepicker(i)&&t.datepicker._lastInput!==i){var s,n,a,r,l,h,c;s=t.datepicker._getInst(i),t.datepicker._curInst&&t.datepicker._curInst!==s&&(t.datepicker._curInst.dpDiv.stop(!0,!0),s&&t.datepicker._datepickerShowing&&t.datepicker._hideDatepicker(t.datepicker._curInst.input[0])),n=t.datepicker._get(s,"beforeShow"),a=n?n.apply(i,[i,s]):{},a!==!1&&(o(s.settings,a),s.lastVal=null,t.datepicker._lastInput=i,t.datepicker._setDateFromField(s),t.datepicker._inDialog&&(i.value=""),t.datepicker._pos||(t.datepicker._pos=t.datepicker._findPos(i),t.datepicker._pos[1]+=i.offsetHeight),r=!1,t(i).parents().each(function(){return r|="fixed"===t(this).css("position"),!r}),l={left:t.datepicker._pos[0],top:t.datepicker._pos[1]},t.datepicker._pos=null,s.dpDiv.empty(),s.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),t.datepicker._updateDatepicker(s),l=t.datepicker._checkOffset(s,l,r),s.dpDiv.css({position:t.datepicker._inDialog&&t.blockUI?"static":r?"fixed":"absolute",display:"none",left:l.left+"px",top:l.top+"px"}),s.inline||(h=t.datepicker._get(s,"showAnim"),c=t.datepicker._get(s,"duration"),s.dpDiv.css("z-index",e(t(i))+1),t.datepicker._datepickerShowing=!0,t.effects&&t.effects.effect[h]?s.dpDiv.show(h,t.datepicker._get(s,"showOptions"),c):s.dpDiv[h||"show"](h?c:null),t.datepicker._shouldFocusInput(s)&&s.input.trigger("focus"),t.datepicker._curInst=s))}},_updateDatepicker:function(e){this.maxRows=4,h=e,e.dpDiv.empty().append(this._generateHTML(e)),this._attachHandlers(e);var i,s=this._getNumberOfMonths(e),o=s[1],a=17,r=e.dpDiv.find("."+this._dayOverClass+" a");r.length>0&&n.apply(r.get(0)),e.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),o>1&&e.dpDiv.addClass("ui-datepicker-multi-"+o).css("width",a*o+"em"),e.dpDiv[(1!==s[0]||1!==s[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),e.dpDiv[(this._get(e,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),e===t.datepicker._curInst&&t.datepicker._datepickerShowing&&t.datepicker._shouldFocusInput(e)&&e.input.trigger("focus"),e.yearshtml&&(i=e.yearshtml,setTimeout(function(){i===e.yearshtml&&e.yearshtml&&e.dpDiv.find("select.ui-datepicker-year:first").replaceWith(e.yearshtml),i=e.yearshtml=null},0))},_shouldFocusInput:function(t){return t.input&&t.input.is(":visible")&&!t.input.is(":disabled")&&!t.input.is(":focus")},_checkOffset:function(e,i,s){var n=e.dpDiv.outerWidth(),o=e.dpDiv.outerHeight(),a=e.input?e.input.outerWidth():0,r=e.input?e.input.outerHeight():0,l=document.documentElement.clientWidth+(s?0:t(document).scrollLeft()),h=document.documentElement.clientHeight+(s?0:t(document).scrollTop());return i.left-=this._get(e,"isRTL")?n-a:0,i.left-=s&&i.left===e.input.offset().left?t(document).scrollLeft():0,i.top-=s&&i.top===e.input.offset().top+r?t(document).scrollTop():0,i.left-=Math.min(i.left,i.left+n>l&&l>n?Math.abs(i.left+n-l):0),i.top-=Math.min(i.top,i.top+o>h&&h>o?Math.abs(o+r):0),i},_findPos:function(e){for(var i,s=this._getInst(e),n=this._get(s,"isRTL");e&&("hidden"===e.type||1!==e.nodeType||t.expr.filters.hidden(e));)e=e[n?"previousSibling":"nextSibling"];return i=t(e).offset(),[i.left,i.top]},_hideDatepicker:function(e){var i,s,n,o,a=this._curInst;!a||e&&a!==t.data(e,"datepicker")||this._datepickerShowing&&(i=this._get(a,"showAnim"),s=this._get(a,"duration"),n=function(){t.datepicker._tidyDialog(a)},t.effects&&(t.effects.effect[i]||t.effects[i])?a.dpDiv.hide(i,t.datepicker._get(a,"showOptions"),s,n):a.dpDiv["slideDown"===i?"slideUp":"fadeIn"===i?"fadeOut":"hide"](i?s:null,n),i||n(),this._datepickerShowing=!1,o=this._get(a,"onClose"),o&&o.apply(a.input?a.input[0]:null,[a.input?a.input.val():"",a]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),t.blockUI&&(t.unblockUI(),t("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(t){t.dpDiv.removeClass(this._dialogClass).off(".ui-datepicker-calendar")},_checkExternalClick:function(e){if(t.datepicker._curInst){var i=t(e.target),s=t.datepicker._getInst(i[0]);(i[0].id!==t.datepicker._mainDivId&&0===i.parents("#"+t.datepicker._mainDivId).length&&!i.hasClass(t.datepicker.markerClassName)&&!i.closest("."+t.datepicker._triggerClass).length&&t.datepicker._datepickerShowing&&(!t.datepicker._inDialog||!t.blockUI)||i.hasClass(t.datepicker.markerClassName)&&t.datepicker._curInst!==s)&&t.datepicker._hideDatepicker()}},_adjustDate:function(e,i,s){var n=t(e),o=this._getInst(n[0]);this._isDisabledDatepicker(n[0])||(this._adjustInstDate(o,i+("M"===s?this._get(o,"showCurrentAtPos"):0),s),this._updateDatepicker(o))},_gotoToday:function(e){var i,s=t(e),n=this._getInst(s[0]);this._get(n,"gotoCurrent")&&n.currentDay?(n.selectedDay=n.currentDay,n.drawMonth=n.selectedMonth=n.currentMonth,n.drawYear=n.selectedYear=n.currentYear):(i=new Date,n.selectedDay=i.getDate(),n.drawMonth=n.selectedMonth=i.getMonth(),n.drawYear=n.selectedYear=i.getFullYear()),this._notifyChange(n),this._adjustDate(s)},_selectMonthYear:function(e,i,s){var n=t(e),o=this._getInst(n[0]);o["selected"+("M"===s?"Month":"Year")]=o["draw"+("M"===s?"Month":"Year")]=parseInt(i.options[i.selectedIndex].value,10),this._notifyChange(o),this._adjustDate(n)},_selectDay:function(e,i,s,n){var o,a=t(e);t(n).hasClass(this._unselectableClass)||this._isDisabledDatepicker(a[0])||(o=this._getInst(a[0]),o.selectedDay=o.currentDay=t("a",n).html(),o.selectedMonth=o.currentMonth=i,o.selectedYear=o.currentYear=s,this._selectDate(e,this._formatDate(o,o.currentDay,o.currentMonth,o.currentYear)))},_clearDate:function(e){var i=t(e);this._selectDate(i,"")},_selectDate:function(e,i){var s,n=t(e),o=this._getInst(n[0]);i=null!=i?i:this._formatDate(o),o.input&&o.input.val(i),this._updateAlternate(o),s=this._get(o,"onSelect"),s?s.apply(o.input?o.input[0]:null,[i,o]):o.input&&o.input.trigger("change"),o.inline?this._updateDatepicker(o):(this._hideDatepicker(),this._lastInput=o.input[0],"object"!=typeof o.input[0]&&o.input.trigger("focus"),this._lastInput=null)},_updateAlternate:function(e){var i,s,n,o=this._get(e,"altField");o&&(i=this._get(e,"altFormat")||this._get(e,"dateFormat"),s=this._getDate(e),n=this.formatDate(i,s,this._getFormatConfig(e)),t(o).val(n))},noWeekends:function(t){var e=t.getDay();return[e>0&&6>e,""]},iso8601Week:function(t){var e,i=new Date(t.getTime());return i.setDate(i.getDate()+4-(i.getDay()||7)),e=i.getTime(),i.setMonth(0),i.setDate(1),Math.floor(Math.round((e-i)/864e5)/7)+1},parseDate:function(e,i,s){if(null==e||null==i)throw"Invalid arguments";if(i="object"==typeof i?""+i:i+"",""===i)return null;var n,o,a,r,l=0,h=(s?s.shortYearCutoff:null)||this._defaults.shortYearCutoff,c="string"!=typeof h?h:(new Date).getFullYear()%100+parseInt(h,10),u=(s?s.dayNamesShort:null)||this._defaults.dayNamesShort,d=(s?s.dayNames:null)||this._defaults.dayNames,p=(s?s.monthNamesShort:null)||this._defaults.monthNamesShort,f=(s?s.monthNames:null)||this._defaults.monthNames,g=-1,m=-1,_=-1,v=-1,b=!1,y=function(t){var i=e.length>n+1&&e.charAt(n+1)===t;return i&&n++,i},w=function(t){var e=y(t),s="@"===t?14:"!"===t?20:"y"===t&&e?4:"o"===t?3:2,n="y"===t?s:1,o=RegExp("^\\d{"+n+","+s+"}"),a=i.substring(l).match(o);if(!a)throw"Missing number at position "+l;return l+=a[0].length,parseInt(a[0],10)},k=function(e,s,n){var o=-1,a=t.map(y(e)?n:s,function(t,e){return[[e,t]]}).sort(function(t,e){return-(t[1].length-e[1].length)});if(t.each(a,function(t,e){var s=e[1];return i.substr(l,s.length).toLowerCase()===s.toLowerCase()?(o=e[0],l+=s.length,!1):void 0}),-1!==o)return o+1;throw"Unknown name at position "+l},x=function(){if(i.charAt(l)!==e.charAt(n))throw"Unexpected literal at position "+l;l++};for(n=0;e.length>n;n++)if(b)"'"!==e.charAt(n)||y("'")?x():b=!1;else switch(e.charAt(n)){case"d":_=w("d");break;case"D":k("D",u,d);break;case"o":v=w("o");break;case"m":m=w("m");break;case"M":m=k("M",p,f);break;case"y":g=w("y");break;case"@":r=new Date(w("@")),g=r.getFullYear(),m=r.getMonth()+1,_=r.getDate();break;case"!":r=new Date((w("!")-this._ticksTo1970)/1e4),g=r.getFullYear(),m=r.getMonth()+1,_=r.getDate();break;case"'":y("'")?x():b=!0;break;default:x()}if(i.length>l&&(a=i.substr(l),!/^\s+/.test(a)))throw"Extra/unparsed characters found in date: "+a;if(-1===g?g=(new Date).getFullYear():100>g&&(g+=(new Date).getFullYear()-(new Date).getFullYear()%100+(c>=g?0:-100)),v>-1)for(m=1,_=v;;){if(o=this._getDaysInMonth(g,m-1),o>=_)break;m++,_-=o}if(r=this._daylightSavingAdjust(new Date(g,m-1,_)),r.getFullYear()!==g||r.getMonth()+1!==m||r.getDate()!==_)throw"Invalid date";return r},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:1e7*60*60*24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925)),formatDate:function(t,e,i){if(!e)return"";var s,n=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,o=(i?i.dayNames:null)||this._defaults.dayNames,a=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,r=(i?i.monthNames:null)||this._defaults.monthNames,l=function(e){var i=t.length>s+1&&t.charAt(s+1)===e;return i&&s++,i},h=function(t,e,i){var s=""+e;if(l(t))for(;i>s.length;)s="0"+s;return s},c=function(t,e,i,s){return l(t)?s[e]:i[e]},u="",d=!1;if(e)for(s=0;t.length>s;s++)if(d)"'"!==t.charAt(s)||l("'")?u+=t.charAt(s):d=!1;else switch(t.charAt(s)){case"d":u+=h("d",e.getDate(),2);break;case"D":u+=c("D",e.getDay(),n,o);break;case"o":u+=h("o",Math.round((new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()-new Date(e.getFullYear(),0,0).getTime())/864e5),3);break;case"m":u+=h("m",e.getMonth()+1,2);break;case"M":u+=c("M",e.getMonth(),a,r);break;case"y":u+=l("y")?e.getFullYear():(10>e.getFullYear()%100?"0":"")+e.getFullYear()%100;break;case"@":u+=e.getTime();break;case"!":u+=1e4*e.getTime()+this._ticksTo1970;break;case"'":l("'")?u+="'":d=!0;break;default:u+=t.charAt(s)}return u},_possibleChars:function(t){var e,i="",s=!1,n=function(i){var s=t.length>e+1&&t.charAt(e+1)===i;return s&&e++,s};for(e=0;t.length>e;e++)if(s)"'"!==t.charAt(e)||n("'")?i+=t.charAt(e):s=!1;else switch(t.charAt(e)){case"d":case"m":case"y":case"@":i+="0123456789";break;case"D":case"M":return null;case"'":n("'")?i+="'":s=!0;break;default:i+=t.charAt(e)}return i},_get:function(t,e){return void 0!==t.settings[e]?t.settings[e]:this._defaults[e]},_setDateFromField:function(t,e){if(t.input.val()!==t.lastVal){var i=this._get(t,"dateFormat"),s=t.lastVal=t.input?t.input.val():null,n=this._getDefaultDate(t),o=n,a=this._getFormatConfig(t);try{o=this.parseDate(i,s,a)||n}catch(r){s=e?"":s}t.selectedDay=o.getDate(),t.drawMonth=t.selectedMonth=o.getMonth(),t.drawYear=t.selectedYear=o.getFullYear(),t.currentDay=s?o.getDate():0,t.currentMonth=s?o.getMonth():0,t.currentYear=s?o.getFullYear():0,this._adjustInstDate(t)}},_getDefaultDate:function(t){return this._restrictMinMax(t,this._determineDate(t,this._get(t,"defaultDate"),new Date))},_determineDate:function(e,i,s){var n=function(t){var e=new Date;return e.setDate(e.getDate()+t),e},o=function(i){try{return t.datepicker.parseDate(t.datepicker._get(e,"dateFormat"),i,t.datepicker._getFormatConfig(e))}catch(s){}for(var n=(i.toLowerCase().match(/^c/)?t.datepicker._getDate(e):null)||new Date,o=n.getFullYear(),a=n.getMonth(),r=n.getDate(),l=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,h=l.exec(i);h;){switch(h[2]||"d"){case"d":case"D":r+=parseInt(h[1],10);break;case"w":case"W":r+=7*parseInt(h[1],10);break;case"m":case"M":a+=parseInt(h[1],10),r=Math.min(r,t.datepicker._getDaysInMonth(o,a));break;case"y":case"Y":o+=parseInt(h[1],10),r=Math.min(r,t.datepicker._getDaysInMonth(o,a))}h=l.exec(i)}return new Date(o,a,r)},a=null==i||""===i?s:"string"==typeof i?o(i):"number"==typeof i?isNaN(i)?s:n(i):new Date(i.getTime());return a=a&&"Invalid Date"==""+a?s:a,a&&(a.setHours(0),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0)),this._daylightSavingAdjust(a)},_daylightSavingAdjust:function(t){return t?(t.setHours(t.getHours()>12?t.getHours()+2:0),t):null},_setDate:function(t,e,i){var s=!e,n=t.selectedMonth,o=t.selectedYear,a=this._restrictMinMax(t,this._determineDate(t,e,new Date));t.selectedDay=t.currentDay=a.getDate(),t.drawMonth=t.selectedMonth=t.currentMonth=a.getMonth(),t.drawYear=t.selectedYear=t.currentYear=a.getFullYear(),n===t.selectedMonth&&o===t.selectedYear||i||this._notifyChange(t),this._adjustInstDate(t),t.input&&t.input.val(s?"":this._formatDate(t))},_getDate:function(t){var e=!t.currentYear||t.input&&""===t.input.val()?null:this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return e},_attachHandlers:function(e){var i=this._get(e,"stepMonths"),s="#"+e.id.replace(/\\\\/g,"\\");e.dpDiv.find("[data-handler]").map(function(){var e={prev:function(){t.datepicker._adjustDate(s,-i,"M")},next:function(){t.datepicker._adjustDate(s,+i,"M")},hide:function(){t.datepicker._hideDatepicker()},today:function(){t.datepicker._gotoToday(s)},selectDay:function(){return t.datepicker._selectDay(s,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return t.datepicker._selectMonthYear(s,this,"M"),!1},selectYear:function(){return t.datepicker._selectMonthYear(s,this,"Y"),!1}};t(this).on(this.getAttribute("data-event"),e[this.getAttribute("data-handler")])})},_generateHTML:function(t){var e,i,s,n,o,a,r,l,h,c,u,d,p,f,g,m,_,v,b,y,w,k,x,C,D,T,I,M,P,S,N,H,A,z,O,E,W,F,L,R=new Date,Y=this._daylightSavingAdjust(new Date(R.getFullYear(),R.getMonth(),R.getDate())),B=this._get(t,"isRTL"),j=this._get(t,"showButtonPanel"),q=this._get(t,"hideIfNoPrevNext"),K=this._get(t,"navigationAsDateFormat"),U=this._getNumberOfMonths(t),V=this._get(t,"showCurrentAtPos"),X=this._get(t,"stepMonths"),$=1!==U[0]||1!==U[1],G=this._daylightSavingAdjust(t.currentDay?new Date(t.currentYear,t.currentMonth,t.currentDay):new Date(9999,9,9)),J=this._getMinMaxDate(t,"min"),Q=this._getMinMaxDate(t,"max"),Z=t.drawMonth-V,te=t.drawYear;if(0>Z&&(Z+=12,te--),Q)for(e=this._daylightSavingAdjust(new Date(Q.getFullYear(),Q.getMonth()-U[0]*U[1]+1,Q.getDate())),e=J&&J>e?J:e;this._daylightSavingAdjust(new Date(te,Z,1))>e;)Z--,0>Z&&(Z=11,te--);for(t.drawMonth=Z,t.drawYear=te,i=this._get(t,"prevText"),i=K?this.formatDate(i,this._daylightSavingAdjust(new Date(te,Z-X,1)),this._getFormatConfig(t)):i,s=this._canAdjustMonth(t,-1,te,Z)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(B?"e":"w")+"'>"+i+"</span></a>":q?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(B?"e":"w")+"'>"+i+"</span></a>",n=this._get(t,"nextText"),n=K?this.formatDate(n,this._daylightSavingAdjust(new Date(te,Z+X,1)),this._getFormatConfig(t)):n,o=this._canAdjustMonth(t,1,te,Z)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(B?"w":"e")+"'>"+n+"</span></a>":q?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(B?"w":"e")+"'>"+n+"</span></a>",a=this._get(t,"currentText"),r=this._get(t,"gotoCurrent")&&t.currentDay?G:Y,a=K?this.formatDate(a,r,this._getFormatConfig(t)):a,l=t.inline?"":"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>"+this._get(t,"closeText")+"</button>",h=j?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(B?l:"")+(this._isInRange(t,r)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+a+"</button>":"")+(B?"":l)+"</div>":"",c=parseInt(this._get(t,"firstDay"),10),c=isNaN(c)?0:c,u=this._get(t,"showWeek"),d=this._get(t,"dayNames"),p=this._get(t,"dayNamesMin"),f=this._get(t,"monthNames"),g=this._get(t,"monthNamesShort"),m=this._get(t,"beforeShowDay"),_=this._get(t,"showOtherMonths"),v=this._get(t,"selectOtherMonths"),b=this._getDefaultDate(t),y="",k=0;U[0]>k;k++){for(x="",this.maxRows=4,C=0;U[1]>C;C++){if(D=this._daylightSavingAdjust(new Date(te,Z,t.selectedDay)),T=" ui-corner-all",I="",$){if(I+="<div class='ui-datepicker-group",U[1]>1)switch(C){case 0:I+=" ui-datepicker-group-first",T=" ui-corner-"+(B?"right":"left");break;case U[1]-1:I+=" ui-datepicker-group-last",T=" ui-corner-"+(B?"left":"right");break;default:I+=" ui-datepicker-group-middle",T=""}I+="'>"}for(I+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+T+"'>"+(/all|left/.test(T)&&0===k?B?o:s:"")+(/all|right/.test(T)&&0===k?B?s:o:"")+this._generateMonthYearHeader(t,Z,te,J,Q,k>0||C>0,f,g)+"</div><table class='ui-datepicker-calendar'><thead>"+"<tr>",M=u?"<th class='ui-datepicker-week-col'>"+this._get(t,"weekHeader")+"</th>":"",w=0;7>w;w++)P=(w+c)%7,M+="<th scope='col'"+((w+c+6)%7>=5?" class='ui-datepicker-week-end'":"")+">"+"<span title='"+d[P]+"'>"+p[P]+"</span></th>";for(I+=M+"</tr></thead><tbody>",S=this._getDaysInMonth(te,Z),te===t.selectedYear&&Z===t.selectedMonth&&(t.selectedDay=Math.min(t.selectedDay,S)),N=(this._getFirstDayOfMonth(te,Z)-c+7)%7,H=Math.ceil((N+S)/7),A=$?this.maxRows>H?this.maxRows:H:H,this.maxRows=A,z=this._daylightSavingAdjust(new Date(te,Z,1-N)),O=0;A>O;O++){for(I+="<tr>",E=u?"<td class='ui-datepicker-week-col'>"+this._get(t,"calculateWeek")(z)+"</td>":"",w=0;7>w;w++)W=m?m.apply(t.input?t.input[0]:null,[z]):[!0,""],F=z.getMonth()!==Z,L=F&&!v||!W[0]||J&&J>z||Q&&z>Q,E+="<td class='"+((w+c+6)%7>=5?" ui-datepicker-week-end":"")+(F?" ui-datepicker-other-month":"")+(z.getTime()===D.getTime()&&Z===t.selectedMonth&&t._keyEvent||b.getTime()===z.getTime()&&b.getTime()===D.getTime()?" "+this._dayOverClass:"")+(L?" "+this._unselectableClass+" ui-state-disabled":"")+(F&&!_?"":" "+W[1]+(z.getTime()===G.getTime()?" "+this._currentClass:"")+(z.getTime()===Y.getTime()?" ui-datepicker-today":""))+"'"+(F&&!_||!W[2]?"":" title='"+W[2].replace(/'/g,"&#39;")+"'")+(L?"":" data-handler='selectDay' data-event='click' data-month='"+z.getMonth()+"' data-year='"+z.getFullYear()+"'")+">"+(F&&!_?"&#xa0;":L?"<span class='ui-state-default'>"+z.getDate()+"</span>":"<a class='ui-state-default"+(z.getTime()===Y.getTime()?" ui-state-highlight":"")+(z.getTime()===G.getTime()?" ui-state-active":"")+(F?" ui-priority-secondary":"")+"' href='#'>"+z.getDate()+"</a>")+"</td>",z.setDate(z.getDate()+1),z=this._daylightSavingAdjust(z);I+=E+"</tr>"}Z++,Z>11&&(Z=0,te++),I+="</tbody></table>"+($?"</div>"+(U[0]>0&&C===U[1]-1?"<div class='ui-datepicker-row-break'></div>":""):""),x+=I}y+=x}return y+=h,t._keyEvent=!1,y},_generateMonthYearHeader:function(t,e,i,s,n,o,a,r){var l,h,c,u,d,p,f,g,m=this._get(t,"changeMonth"),_=this._get(t,"changeYear"),v=this._get(t,"showMonthAfterYear"),b="<div class='ui-datepicker-title'>",y="";if(o||!m)y+="<span class='ui-datepicker-month'>"+a[e]+"</span>";else{for(l=s&&s.getFullYear()===i,h=n&&n.getFullYear()===i,y+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",c=0;12>c;c++)(!l||c>=s.getMonth())&&(!h||n.getMonth()>=c)&&(y+="<option value='"+c+"'"+(c===e?" selected='selected'":"")+">"+r[c]+"</option>");y+="</select>"}if(v||(b+=y+(!o&&m&&_?"":"&#xa0;")),!t.yearshtml)if(t.yearshtml="",o||!_)b+="<span class='ui-datepicker-year'>"+i+"</span>";else{for(u=this._get(t,"yearRange").split(":"),d=(new Date).getFullYear(),p=function(t){var e=t.match(/c[+\-].*/)?i+parseInt(t.substring(1),10):t.match(/[+\-].*/)?d+parseInt(t,10):parseInt(t,10);return isNaN(e)?d:e},f=p(u[0]),g=Math.max(f,p(u[1]||"")),f=s?Math.max(f,s.getFullYear()):f,g=n?Math.min(g,n.getFullYear()):g,t.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";g>=f;f++)t.yearshtml+="<option value='"+f+"'"+(f===i?" selected='selected'":"")+">"+f+"</option>";t.yearshtml+="</select>",b+=t.yearshtml,t.yearshtml=null}return b+=this._get(t,"yearSuffix"),v&&(b+=(!o&&m&&_?"":"&#xa0;")+y),b+="</div>"},_adjustInstDate:function(t,e,i){var s=t.selectedYear+("Y"===i?e:0),n=t.selectedMonth+("M"===i?e:0),o=Math.min(t.selectedDay,this._getDaysInMonth(s,n))+("D"===i?e:0),a=this._restrictMinMax(t,this._daylightSavingAdjust(new Date(s,n,o)));t.selectedDay=a.getDate(),t.drawMonth=t.selectedMonth=a.getMonth(),t.drawYear=t.selectedYear=a.getFullYear(),("M"===i||"Y"===i)&&this._notifyChange(t)},_restrictMinMax:function(t,e){var i=this._getMinMaxDate(t,"min"),s=this._getMinMaxDate(t,"max"),n=i&&i>e?i:e;return s&&n>s?s:n},_notifyChange:function(t){var e=this._get(t,"onChangeMonthYear");e&&e.apply(t.input?t.input[0]:null,[t.selectedYear,t.selectedMonth+1,t])},_getNumberOfMonths:function(t){var e=this._get(t,"numberOfMonths");return null==e?[1,1]:"number"==typeof e?[1,e]:e},_getMinMaxDate:function(t,e){return this._determineDate(t,this._get(t,e+"Date"),null)},_getDaysInMonth:function(t,e){return 32-this._daylightSavingAdjust(new Date(t,e,32)).getDate()},_getFirstDayOfMonth:function(t,e){return new Date(t,e,1).getDay()},_canAdjustMonth:function(t,e,i,s){var n=this._getNumberOfMonths(t),o=this._daylightSavingAdjust(new Date(i,s+(0>e?e:n[0]*n[1]),1));return 0>e&&o.setDate(this._getDaysInMonth(o.getFullYear(),o.getMonth())),this._isInRange(t,o)},_isInRange:function(t,e){var i,s,n=this._getMinMaxDate(t,"min"),o=this._getMinMaxDate(t,"max"),a=null,r=null,l=this._get(t,"yearRange");return l&&(i=l.split(":"),s=(new Date).getFullYear(),a=parseInt(i[0],10),r=parseInt(i[1],10),i[0].match(/[+\-].*/)&&(a+=s),i[1].match(/[+\-].*/)&&(r+=s)),(!n||e.getTime()>=n.getTime())&&(!o||e.getTime()<=o.getTime())&&(!a||e.getFullYear()>=a)&&(!r||r>=e.getFullYear())},_getFormatConfig:function(t){var e=this._get(t,"shortYearCutoff");return e="string"!=typeof e?e:(new Date).getFullYear()%100+parseInt(e,10),{shortYearCutoff:e,dayNamesShort:this._get(t,"dayNamesShort"),dayNames:this._get(t,"dayNames"),monthNamesShort:this._get(t,"monthNamesShort"),monthNames:this._get(t,"monthNames")}},_formatDate:function(t,e,i,s){e||(t.currentDay=t.selectedDay,t.currentMonth=t.selectedMonth,t.currentYear=t.selectedYear);var n=e?"object"==typeof e?e:this._daylightSavingAdjust(new Date(s,i,e)):this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return this.formatDate(this._get(t,"dateFormat"),n,this._getFormatConfig(t))}}),t.fn.datepicker=function(e){if(!this.length)return this;t.datepicker.initialized||(t(document).on("mousedown",t.datepicker._checkExternalClick),t.datepicker.initialized=!0),0===t("#"+t.datepicker._mainDivId).length&&t("body").append(t.datepicker.dpDiv);var i=Array.prototype.slice.call(arguments,1);return"string"!=typeof e||"isDisabled"!==e&&"getDate"!==e&&"widget"!==e?"option"===e&&2===arguments.length&&"string"==typeof arguments[1]?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i)):this.each(function(){"string"==typeof e?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this].concat(i)):t.datepicker._attachDatepicker(this,e)
9
}):t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i))},t.datepicker=new i,t.datepicker.initialized=!1,t.datepicker.uuid=(new Date).getTime(),t.datepicker.version="1.12.1",t.datepicker,t.widget("ui.slider",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"slide",options:{animate:!1,classes:{"ui-slider":"ui-corner-all","ui-slider-handle":"ui-corner-all","ui-slider-range":"ui-corner-all ui-widget-header"},distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},numPages:5,_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this._calculateNewMax(),this._addClass("ui-slider ui-slider-"+this.orientation,"ui-widget ui-widget-content"),this._refresh(),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var e,i,s=this.options,n=this.element.find(".ui-slider-handle"),o="<span tabindex='0'></span>",a=[];for(i=s.values&&s.values.length||1,n.length>i&&(n.slice(i).remove(),n=n.slice(0,i)),e=n.length;i>e;e++)a.push(o);this.handles=n.add(t(a.join("")).appendTo(this.element)),this._addClass(this.handles,"ui-slider-handle","ui-state-default"),this.handle=this.handles.eq(0),this.handles.each(function(e){t(this).data("ui-slider-handle-index",e).attr("tabIndex",0)})},_createRange:function(){var e=this.options;e.range?(e.range===!0&&(e.values?e.values.length&&2!==e.values.length?e.values=[e.values[0],e.values[0]]:t.isArray(e.values)&&(e.values=e.values.slice(0)):e.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?(this._removeClass(this.range,"ui-slider-range-min ui-slider-range-max"),this.range.css({left:"",bottom:""})):(this.range=t("<div>").appendTo(this.element),this._addClass(this.range,"ui-slider-range")),("min"===e.range||"max"===e.range)&&this._addClass(this.range,"ui-slider-range-"+e.range)):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){this._off(this.handles),this._on(this.handles,this._handleEvents),this._hoverable(this.handles),this._focusable(this.handles)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this._mouseDestroy()},_mouseCapture:function(e){var i,s,n,o,a,r,l,h,c=this,u=this.options;return u.disabled?!1:(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),i={x:e.pageX,y:e.pageY},s=this._normValueFromMouse(i),n=this._valueMax()-this._valueMin()+1,this.handles.each(function(e){var i=Math.abs(s-c.values(e));(n>i||n===i&&(e===c._lastChangedValue||c.values(e)===u.min))&&(n=i,o=t(this),a=e)}),r=this._start(e,a),r===!1?!1:(this._mouseSliding=!0,this._handleIndex=a,this._addClass(o,null,"ui-state-active"),o.trigger("focus"),l=o.offset(),h=!t(e.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=h?{left:0,top:0}:{left:e.pageX-l.left-o.width()/2,top:e.pageY-l.top-o.height()/2-(parseInt(o.css("borderTopWidth"),10)||0)-(parseInt(o.css("borderBottomWidth"),10)||0)+(parseInt(o.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(e,a,s),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(t){var e={x:t.pageX,y:t.pageY},i=this._normValueFromMouse(e);return this._slide(t,this._handleIndex,i),!1},_mouseStop:function(t){return this._removeClass(this.handles,null,"ui-state-active"),this._mouseSliding=!1,this._stop(t,this._handleIndex),this._change(t,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(t){var e,i,s,n,o;return"horizontal"===this.orientation?(e=this.elementSize.width,i=t.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(e=this.elementSize.height,i=t.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),s=i/e,s>1&&(s=1),0>s&&(s=0),"vertical"===this.orientation&&(s=1-s),n=this._valueMax()-this._valueMin(),o=this._valueMin()+s*n,this._trimAlignValue(o)},_uiHash:function(t,e,i){var s={handle:this.handles[t],handleIndex:t,value:void 0!==e?e:this.value()};return this._hasMultipleValues()&&(s.value=void 0!==e?e:this.values(t),s.values=i||this.values()),s},_hasMultipleValues:function(){return this.options.values&&this.options.values.length},_start:function(t,e){return this._trigger("start",t,this._uiHash(e))},_slide:function(t,e,i){var s,n,o=this.value(),a=this.values();this._hasMultipleValues()&&(n=this.values(e?0:1),o=this.values(e),2===this.options.values.length&&this.options.range===!0&&(i=0===e?Math.min(n,i):Math.max(n,i)),a[e]=i),i!==o&&(s=this._trigger("slide",t,this._uiHash(e,i,a)),s!==!1&&(this._hasMultipleValues()?this.values(e,i):this.value(i)))},_stop:function(t,e){this._trigger("stop",t,this._uiHash(e))},_change:function(t,e){this._keySliding||this._mouseSliding||(this._lastChangedValue=e,this._trigger("change",t,this._uiHash(e)))},value:function(t){return arguments.length?(this.options.value=this._trimAlignValue(t),this._refreshValue(),this._change(null,0),void 0):this._value()},values:function(e,i){var s,n,o;if(arguments.length>1)return this.options.values[e]=this._trimAlignValue(i),this._refreshValue(),this._change(null,e),void 0;if(!arguments.length)return this._values();if(!t.isArray(arguments[0]))return this._hasMultipleValues()?this._values(e):this.value();for(s=this.options.values,n=arguments[0],o=0;s.length>o;o+=1)s[o]=this._trimAlignValue(n[o]),this._change(null,o);this._refreshValue()},_setOption:function(e,i){var s,n=0;switch("range"===e&&this.options.range===!0&&("min"===i?(this.options.value=this._values(0),this.options.values=null):"max"===i&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),t.isArray(this.options.values)&&(n=this.options.values.length),this._super(e,i),e){case"orientation":this._detectOrientation(),this._removeClass("ui-slider-horizontal ui-slider-vertical")._addClass("ui-slider-"+this.orientation),this._refreshValue(),this.options.range&&this._refreshRange(i),this.handles.css("horizontal"===i?"bottom":"left","");break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),s=n-1;s>=0;s--)this._change(null,s);this._animateOff=!1;break;case"step":case"min":case"max":this._animateOff=!0,this._calculateNewMax(),this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_setOptionDisabled:function(t){this._super(t),this._toggleClass(null,"ui-state-disabled",!!t)},_value:function(){var t=this.options.value;return t=this._trimAlignValue(t)},_values:function(t){var e,i,s;if(arguments.length)return e=this.options.values[t],e=this._trimAlignValue(e);if(this._hasMultipleValues()){for(i=this.options.values.slice(),s=0;i.length>s;s+=1)i[s]=this._trimAlignValue(i[s]);return i}return[]},_trimAlignValue:function(t){if(this._valueMin()>=t)return this._valueMin();if(t>=this._valueMax())return this._valueMax();var e=this.options.step>0?this.options.step:1,i=(t-this._valueMin())%e,s=t-i;return 2*Math.abs(i)>=e&&(s+=i>0?e:-e),parseFloat(s.toFixed(5))},_calculateNewMax:function(){var t=this.options.max,e=this._valueMin(),i=this.options.step,s=Math.round((t-e)/i)*i;t=s+e,t>this.options.max&&(t-=i),this.max=parseFloat(t.toFixed(this._precision()))},_precision:function(){var t=this._precisionOf(this.options.step);return null!==this.options.min&&(t=Math.max(t,this._precisionOf(this.options.min))),t},_precisionOf:function(t){var e=""+t,i=e.indexOf(".");return-1===i?0:e.length-i-1},_valueMin:function(){return this.options.min},_valueMax:function(){return this.max},_refreshRange:function(t){"vertical"===t&&this.range.css({width:"",left:""}),"horizontal"===t&&this.range.css({height:"",bottom:""})},_refreshValue:function(){var e,i,s,n,o,a=this.options.range,r=this.options,l=this,h=this._animateOff?!1:r.animate,c={};this._hasMultipleValues()?this.handles.each(function(s){i=100*((l.values(s)-l._valueMin())/(l._valueMax()-l._valueMin())),c["horizontal"===l.orientation?"left":"bottom"]=i+"%",t(this).stop(1,1)[h?"animate":"css"](c,r.animate),l.options.range===!0&&("horizontal"===l.orientation?(0===s&&l.range.stop(1,1)[h?"animate":"css"]({left:i+"%"},r.animate),1===s&&l.range[h?"animate":"css"]({width:i-e+"%"},{queue:!1,duration:r.animate})):(0===s&&l.range.stop(1,1)[h?"animate":"css"]({bottom:i+"%"},r.animate),1===s&&l.range[h?"animate":"css"]({height:i-e+"%"},{queue:!1,duration:r.animate}))),e=i}):(s=this.value(),n=this._valueMin(),o=this._valueMax(),i=o!==n?100*((s-n)/(o-n)):0,c["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[h?"animate":"css"](c,r.animate),"min"===a&&"horizontal"===this.orientation&&this.range.stop(1,1)[h?"animate":"css"]({width:i+"%"},r.animate),"max"===a&&"horizontal"===this.orientation&&this.range.stop(1,1)[h?"animate":"css"]({width:100-i+"%"},r.animate),"min"===a&&"vertical"===this.orientation&&this.range.stop(1,1)[h?"animate":"css"]({height:i+"%"},r.animate),"max"===a&&"vertical"===this.orientation&&this.range.stop(1,1)[h?"animate":"css"]({height:100-i+"%"},r.animate))},_handleEvents:{keydown:function(e){var i,s,n,o,a=t(e.target).data("ui-slider-handle-index");switch(e.keyCode){case t.ui.keyCode.HOME:case t.ui.keyCode.END:case t.ui.keyCode.PAGE_UP:case t.ui.keyCode.PAGE_DOWN:case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(e.preventDefault(),!this._keySliding&&(this._keySliding=!0,this._addClass(t(e.target),null,"ui-state-active"),i=this._start(e,a),i===!1))return}switch(o=this.options.step,s=n=this._hasMultipleValues()?this.values(a):this.value(),e.keyCode){case t.ui.keyCode.HOME:n=this._valueMin();break;case t.ui.keyCode.END:n=this._valueMax();break;case t.ui.keyCode.PAGE_UP:n=this._trimAlignValue(s+(this._valueMax()-this._valueMin())/this.numPages);break;case t.ui.keyCode.PAGE_DOWN:n=this._trimAlignValue(s-(this._valueMax()-this._valueMin())/this.numPages);break;case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:if(s===this._valueMax())return;n=this._trimAlignValue(s+o);break;case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(s===this._valueMin())return;n=this._trimAlignValue(s-o)}this._slide(e,a,n)},keyup:function(e){var i=t(e.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(e,i),this._change(e,i),this._removeClass(t(e.target),null,"ui-state-active"))}}}),t.ui.escapeSelector=function(){var t=/([!"#$%&'()*+,./:;<=>?@[\]^`{|}~])/g;return function(e){return e.replace(t,"\\$1")}}(),t.widget("ui.tabs",{version:"1.12.1",delay:300,options:{active:null,classes:{"ui-tabs":"ui-corner-all","ui-tabs-nav":"ui-corner-all","ui-tabs-panel":"ui-corner-bottom","ui-tabs-tab":"ui-corner-top"},collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_isLocal:function(){var t=/#.*$/;return function(e){var i,s;i=e.href.replace(t,""),s=location.href.replace(t,"");try{i=decodeURIComponent(i)}catch(n){}try{s=decodeURIComponent(s)}catch(n){}return e.hash.length>1&&i===s}}(),_create:function(){var e=this,i=this.options;this.running=!1,this._addClass("ui-tabs","ui-widget ui-widget-content"),this._toggleClass("ui-tabs-collapsible",null,i.collapsible),this._processTabs(),i.active=this._initialActive(),t.isArray(i.disabled)&&(i.disabled=t.unique(i.disabled.concat(t.map(this.tabs.filter(".ui-state-disabled"),function(t){return e.tabs.index(t)}))).sort()),this.active=this.options.active!==!1&&this.anchors.length?this._findActive(i.active):t(),this._refresh(),this.active.length&&this.load(i.active)},_initialActive:function(){var e=this.options.active,i=this.options.collapsible,s=location.hash.substring(1);return null===e&&(s&&this.tabs.each(function(i,n){return t(n).attr("aria-controls")===s?(e=i,!1):void 0}),null===e&&(e=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),(null===e||-1===e)&&(e=this.tabs.length?0:!1)),e!==!1&&(e=this.tabs.index(this.tabs.eq(e)),-1===e&&(e=i?!1:0)),!i&&e===!1&&this.anchors.length&&(e=0),e},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):t()}},_tabKeydown:function(e){var i=t(t.ui.safeActiveElement(this.document[0])).closest("li"),s=this.tabs.index(i),n=!0;if(!this._handlePageNav(e)){switch(e.keyCode){case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:s++;break;case t.ui.keyCode.UP:case t.ui.keyCode.LEFT:n=!1,s--;break;case t.ui.keyCode.END:s=this.anchors.length-1;break;case t.ui.keyCode.HOME:s=0;break;case t.ui.keyCode.SPACE:return e.preventDefault(),clearTimeout(this.activating),this._activate(s),void 0;case t.ui.keyCode.ENTER:return e.preventDefault(),clearTimeout(this.activating),this._activate(s===this.options.active?!1:s),void 0;default:return}e.preventDefault(),clearTimeout(this.activating),s=this._focusNextTab(s,n),e.ctrlKey||e.metaKey||(i.attr("aria-selected","false"),this.tabs.eq(s).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",s)},this.delay))}},_panelKeydown:function(e){this._handlePageNav(e)||e.ctrlKey&&e.keyCode===t.ui.keyCode.UP&&(e.preventDefault(),this.active.trigger("focus"))},_handlePageNav:function(e){return e.altKey&&e.keyCode===t.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):e.altKey&&e.keyCode===t.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):void 0},_findNextTab:function(e,i){function s(){return e>n&&(e=0),0>e&&(e=n),e}for(var n=this.tabs.length-1;-1!==t.inArray(s(),this.options.disabled);)e=i?e+1:e-1;return e},_focusNextTab:function(t,e){return t=this._findNextTab(t,e),this.tabs.eq(t).trigger("focus"),t},_setOption:function(t,e){return"active"===t?(this._activate(e),void 0):(this._super(t,e),"collapsible"===t&&(this._toggleClass("ui-tabs-collapsible",null,e),e||this.options.active!==!1||this._activate(0)),"event"===t&&this._setupEvents(e),"heightStyle"===t&&this._setupHeightStyle(e),void 0)},_sanitizeSelector:function(t){return t?t.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var e=this.options,i=this.tablist.children(":has(a[href])");e.disabled=t.map(i.filter(".ui-state-disabled"),function(t){return i.index(t)}),this._processTabs(),e.active!==!1&&this.anchors.length?this.active.length&&!t.contains(this.tablist[0],this.active[0])?this.tabs.length===e.disabled.length?(e.active=!1,this.active=t()):this._activate(this._findNextTab(Math.max(0,e.active-1),!1)):e.active=this.tabs.index(this.active):(e.active=!1,this.active=t()),this._refresh()},_refresh:function(){this._setOptionDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-hidden":"true"}),this.active.length?(this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}),this._addClass(this.active,"ui-tabs-active","ui-state-active"),this._getPanelForTab(this.active).show().attr({"aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var e=this,i=this.tabs,s=this.anchors,n=this.panels;this.tablist=this._getList().attr("role","tablist"),this._addClass(this.tablist,"ui-tabs-nav","ui-helper-reset ui-helper-clearfix ui-widget-header"),this.tablist.on("mousedown"+this.eventNamespace,"> li",function(e){t(this).is(".ui-state-disabled")&&e.preventDefault()}).on("focus"+this.eventNamespace,".ui-tabs-anchor",function(){t(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this.tabs=this.tablist.find("> li:has(a[href])").attr({role:"tab",tabIndex:-1}),this._addClass(this.tabs,"ui-tabs-tab","ui-state-default"),this.anchors=this.tabs.map(function(){return t("a",this)[0]}).attr({role:"presentation",tabIndex:-1}),this._addClass(this.anchors,"ui-tabs-anchor"),this.panels=t(),this.anchors.each(function(i,s){var n,o,a,r=t(s).uniqueId().attr("id"),l=t(s).closest("li"),h=l.attr("aria-controls");e._isLocal(s)?(n=s.hash,a=n.substring(1),o=e.element.find(e._sanitizeSelector(n))):(a=l.attr("aria-controls")||t({}).uniqueId()[0].id,n="#"+a,o=e.element.find(n),o.length||(o=e._createPanel(a),o.insertAfter(e.panels[i-1]||e.tablist)),o.attr("aria-live","polite")),o.length&&(e.panels=e.panels.add(o)),h&&l.data("ui-tabs-aria-controls",h),l.attr({"aria-controls":a,"aria-labelledby":r}),o.attr("aria-labelledby",r)}),this.panels.attr("role","tabpanel"),this._addClass(this.panels,"ui-tabs-panel","ui-widget-content"),i&&(this._off(i.not(this.tabs)),this._off(s.not(this.anchors)),this._off(n.not(this.panels)))},_getList:function(){return this.tablist||this.element.find("ol, ul").eq(0)},_createPanel:function(e){return t("<div>").attr("id",e).data("ui-tabs-destroy",!0)},_setOptionDisabled:function(e){var i,s,n;for(t.isArray(e)&&(e.length?e.length===this.anchors.length&&(e=!0):e=!1),n=0;s=this.tabs[n];n++)i=t(s),e===!0||-1!==t.inArray(n,e)?(i.attr("aria-disabled","true"),this._addClass(i,null,"ui-state-disabled")):(i.removeAttr("aria-disabled"),this._removeClass(i,null,"ui-state-disabled"));this.options.disabled=e,this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,e===!0)},_setupEvents:function(e){var i={};e&&t.each(e.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(!0,this.anchors,{click:function(t){t.preventDefault()}}),this._on(this.anchors,i),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(e){var i,s=this.element.parent();"fill"===e?(i=s.height(),i-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var e=t(this),s=e.css("position");"absolute"!==s&&"fixed"!==s&&(i-=e.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){i-=t(this).outerHeight(!0)}),this.panels.each(function(){t(this).height(Math.max(0,i-t(this).innerHeight()+t(this).height()))}).css("overflow","auto")):"auto"===e&&(i=0,this.panels.each(function(){i=Math.max(i,t(this).height("").height())}).height(i))},_eventHandler:function(e){var i=this.options,s=this.active,n=t(e.currentTarget),o=n.closest("li"),a=o[0]===s[0],r=a&&i.collapsible,l=r?t():this._getPanelForTab(o),h=s.length?this._getPanelForTab(s):t(),c={oldTab:s,oldPanel:h,newTab:r?t():o,newPanel:l};e.preventDefault(),o.hasClass("ui-state-disabled")||o.hasClass("ui-tabs-loading")||this.running||a&&!i.collapsible||this._trigger("beforeActivate",e,c)===!1||(i.active=r?!1:this.tabs.index(o),this.active=a?t():o,this.xhr&&this.xhr.abort(),h.length||l.length||t.error("jQuery UI Tabs: Mismatching fragment identifier."),l.length&&this.load(this.tabs.index(o),e),this._toggle(e,c))},_toggle:function(e,i){function s(){o.running=!1,o._trigger("activate",e,i)}function n(){o._addClass(i.newTab.closest("li"),"ui-tabs-active","ui-state-active"),a.length&&o.options.show?o._show(a,o.options.show,s):(a.show(),s())}var o=this,a=i.newPanel,r=i.oldPanel;this.running=!0,r.length&&this.options.hide?this._hide(r,this.options.hide,function(){o._removeClass(i.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),n()}):(this._removeClass(i.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),r.hide(),n()),r.attr("aria-hidden","true"),i.oldTab.attr({"aria-selected":"false","aria-expanded":"false"}),a.length&&r.length?i.oldTab.attr("tabIndex",-1):a.length&&this.tabs.filter(function(){return 0===t(this).attr("tabIndex")}).attr("tabIndex",-1),a.attr("aria-hidden","false"),i.newTab.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_activate:function(e){var i,s=this._findActive(e);s[0]!==this.active[0]&&(s.length||(s=this.active),i=s.find(".ui-tabs-anchor")[0],this._eventHandler({target:i,currentTarget:i,preventDefault:t.noop}))},_findActive:function(e){return e===!1?t():this.tabs.eq(e)},_getIndex:function(e){return"string"==typeof e&&(e=this.anchors.index(this.anchors.filter("[href$='"+t.ui.escapeSelector(e)+"']"))),e},_destroy:function(){this.xhr&&this.xhr.abort(),this.tablist.removeAttr("role").off(this.eventNamespace),this.anchors.removeAttr("role tabIndex").removeUniqueId(),this.tabs.add(this.panels).each(function(){t.data(this,"ui-tabs-destroy")?t(this).remove():t(this).removeAttr("role tabIndex aria-live aria-busy aria-selected aria-labelledby aria-hidden aria-expanded")}),this.tabs.each(function(){var e=t(this),i=e.data("ui-tabs-aria-controls");i?e.attr("aria-controls",i).removeData("ui-tabs-aria-controls"):e.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(e){var i=this.options.disabled;i!==!1&&(void 0===e?i=!1:(e=this._getIndex(e),i=t.isArray(i)?t.map(i,function(t){return t!==e?t:null}):t.map(this.tabs,function(t,i){return i!==e?i:null})),this._setOptionDisabled(i))},disable:function(e){var i=this.options.disabled;if(i!==!0){if(void 0===e)i=!0;else{if(e=this._getIndex(e),-1!==t.inArray(e,i))return;i=t.isArray(i)?t.merge([e],i).sort():[e]}this._setOptionDisabled(i)}},load:function(e,i){e=this._getIndex(e);var s=this,n=this.tabs.eq(e),o=n.find(".ui-tabs-anchor"),a=this._getPanelForTab(n),r={tab:n,panel:a},l=function(t,e){"abort"===e&&s.panels.stop(!1,!0),s._removeClass(n,"ui-tabs-loading"),a.removeAttr("aria-busy"),t===s.xhr&&delete s.xhr};this._isLocal(o[0])||(this.xhr=t.ajax(this._ajaxSettings(o,i,r)),this.xhr&&"canceled"!==this.xhr.statusText&&(this._addClass(n,"ui-tabs-loading"),a.attr("aria-busy","true"),this.xhr.done(function(t,e,n){setTimeout(function(){a.html(t),s._trigger("load",i,r),l(n,e)},1)}).fail(function(t,e){setTimeout(function(){l(t,e)},1)})))},_ajaxSettings:function(e,i,s){var n=this;return{url:e.attr("href").replace(/#.*$/,""),beforeSend:function(e,o){return n._trigger("beforeLoad",i,t.extend({jqXHR:e,ajaxSettings:o},s))}}},_getPanelForTab:function(e){var i=t(e).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+i))}}),t.uiBackCompat!==!1&&t.widget("ui.tabs",t.ui.tabs,{_processTabs:function(){this._superApply(arguments),this._addClass(this.tabs,"ui-tab")}}),t.ui.tabs,t.widget("ui.tooltip",{version:"1.12.1",options:{classes:{"ui-tooltip":"ui-corner-all ui-widget-shadow"},content:function(){var e=t(this).attr("title")||"";return t("<a>").text(e).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,track:!1,close:null,open:null},_addDescribedBy:function(e,i){var s=(e.attr("aria-describedby")||"").split(/\s+/);s.push(i),e.data("ui-tooltip-id",i).attr("aria-describedby",t.trim(s.join(" ")))},_removeDescribedBy:function(e){var i=e.data("ui-tooltip-id"),s=(e.attr("aria-describedby")||"").split(/\s+/),n=t.inArray(i,s);-1!==n&&s.splice(n,1),e.removeData("ui-tooltip-id"),s=t.trim(s.join(" ")),s?e.attr("aria-describedby",s):e.removeAttr("aria-describedby")},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.liveRegion=t("<div>").attr({role:"log","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this.disabledTitles=t([])},_setOption:function(e,i){var s=this;this._super(e,i),"content"===e&&t.each(this.tooltips,function(t,e){s._updateContent(e.element)})},_setOptionDisabled:function(t){this[t?"_disable":"_enable"]()},_disable:function(){var e=this;t.each(this.tooltips,function(i,s){var n=t.Event("blur");n.target=n.currentTarget=s.element[0],e.close(n,!0)}),this.disabledTitles=this.disabledTitles.add(this.element.find(this.options.items).addBack().filter(function(){var e=t(this);return e.is("[title]")?e.data("ui-tooltip-title",e.attr("title")).removeAttr("title"):void 0}))},_enable:function(){this.disabledTitles.each(function(){var e=t(this);e.data("ui-tooltip-title")&&e.attr("title",e.data("ui-tooltip-title"))}),this.disabledTitles=t([])},open:function(e){var i=this,s=t(e?e.target:this.element).closest(this.options.items);s.length&&!s.data("ui-tooltip-id")&&(s.attr("title")&&s.data("ui-tooltip-title",s.attr("title")),s.data("ui-tooltip-open",!0),e&&"mouseover"===e.type&&s.parents().each(function(){var e,s=t(this);s.data("ui-tooltip-open")&&(e=t.Event("blur"),e.target=e.currentTarget=this,i.close(e,!0)),s.attr("title")&&(s.uniqueId(),i.parents[this.id]={element:this,title:s.attr("title")},s.attr("title",""))}),this._registerCloseHandlers(e,s),this._updateContent(s,e))},_updateContent:function(t,e){var i,s=this.options.content,n=this,o=e?e.type:null;return"string"==typeof s||s.nodeType||s.jquery?this._open(e,t,s):(i=s.call(t[0],function(i){n._delay(function(){t.data("ui-tooltip-open")&&(e&&(e.type=o),this._open(e,t,i))})}),i&&this._open(e,t,i),void 0)},_open:function(e,i,s){function n(t){h.of=t,a.is(":hidden")||a.position(h)}var o,a,r,l,h=t.extend({},this.options.position);if(s){if(o=this._find(i))return o.tooltip.find(".ui-tooltip-content").html(s),void 0;i.is("[title]")&&(e&&"mouseover"===e.type?i.attr("title",""):i.removeAttr("title")),o=this._tooltip(i),a=o.tooltip,this._addDescribedBy(i,a.attr("id")),a.find(".ui-tooltip-content").html(s),this.liveRegion.children().hide(),l=t("<div>").html(a.find(".ui-tooltip-content").html()),l.removeAttr("name").find("[name]").removeAttr("name"),l.removeAttr("id").find("[id]").removeAttr("id"),l.appendTo(this.liveRegion),this.options.track&&e&&/^mouse/.test(e.type)?(this._on(this.document,{mousemove:n}),n(e)):a.position(t.extend({of:i},this.options.position)),a.hide(),this._show(a,this.options.show),this.options.track&&this.options.show&&this.options.show.delay&&(r=this.delayedShow=setInterval(function(){a.is(":visible")&&(n(h.of),clearInterval(r))},t.fx.interval)),this._trigger("open",e,{tooltip:a})}},_registerCloseHandlers:function(e,i){var s={keyup:function(e){if(e.keyCode===t.ui.keyCode.ESCAPE){var s=t.Event(e);s.currentTarget=i[0],this.close(s,!0)}}};i[0]!==this.element[0]&&(s.remove=function(){this._removeTooltip(this._find(i).tooltip)}),e&&"mouseover"!==e.type||(s.mouseleave="close"),e&&"focusin"!==e.type||(s.focusout="close"),this._on(!0,i,s)},close:function(e){var i,s=this,n=t(e?e.currentTarget:this.element),o=this._find(n);return o?(i=o.tooltip,o.closing||(clearInterval(this.delayedShow),n.data("ui-tooltip-title")&&!n.attr("title")&&n.attr("title",n.data("ui-tooltip-title")),this._removeDescribedBy(n),o.hiding=!0,i.stop(!0),this._hide(i,this.options.hide,function(){s._removeTooltip(t(this))}),n.removeData("ui-tooltip-open"),this._off(n,"mouseleave focusout keyup"),n[0]!==this.element[0]&&this._off(n,"remove"),this._off(this.document,"mousemove"),e&&"mouseleave"===e.type&&t.each(this.parents,function(e,i){t(i.element).attr("title",i.title),delete s.parents[e]}),o.closing=!0,this._trigger("close",e,{tooltip:i}),o.hiding||(o.closing=!1)),void 0):(n.removeData("ui-tooltip-open"),void 0)},_tooltip:function(e){var i=t("<div>").attr("role","tooltip"),s=t("<div>").appendTo(i),n=i.uniqueId().attr("id");return this._addClass(s,"ui-tooltip-content"),this._addClass(i,"ui-tooltip","ui-widget ui-widget-content"),i.appendTo(this._appendTo(e)),this.tooltips[n]={element:e,tooltip:i}},_find:function(t){var e=t.data("ui-tooltip-id");return e?this.tooltips[e]:null},_removeTooltip:function(t){t.remove(),delete this.tooltips[t.attr("id")]},_appendTo:function(t){var e=t.closest(".ui-front, dialog");return e.length||(e=this.document[0].body),e},_destroy:function(){var e=this;t.each(this.tooltips,function(i,s){var n=t.Event("blur"),o=s.element;n.target=n.currentTarget=o[0],e.close(n,!0),t("#"+i).remove(),o.data("ui-tooltip-title")&&(o.attr("title")||o.attr("title",o.data("ui-tooltip-title")),o.removeData("ui-tooltip-title"))}),this.liveRegion.remove()}}),t.uiBackCompat!==!1&&t.widget("ui.tooltip",t.ui.tooltip,{options:{tooltipClass:null},_tooltip:function(){var t=this._superApply(arguments);return this.options.tooltipClass&&t.tooltip.addClass(this.options.tooltipClass),t}}),t.ui.tooltip});
(-)a/koha-tmpl/opac-tmpl/bootstrap/lib/jquery/jquery-ui-1.13.1.min.css (+7 lines)
Line 0 Link Here
1
/*! jQuery UI - v1.13.1 - 2022-02-03
2
* http://jqueryui.com
3
* Includes: core.css, tabs.css, theme.css
4
* To view and modify this theme, visit http://jqueryui.com/themeroller/?scope=&folderName=base&cornerRadiusShadow=8px&offsetLeftShadow=0px&offsetTopShadow=0px&thicknessShadow=5px&opacityShadow=30&bgImgOpacityShadow=0&bgTextureShadow=flat&bgColorShadow=666666&opacityOverlay=30&bgImgOpacityOverlay=0&bgTextureOverlay=flat&bgColorOverlay=aaaaaa&iconColorError=cc0000&fcError=5f3f3f&borderColorError=f1a899&bgTextureError=flat&bgColorError=fddfdf&iconColorHighlight=777620&fcHighlight=777620&borderColorHighlight=dad55e&bgTextureHighlight=flat&bgColorHighlight=fffa90&iconColorActive=ffffff&fcActive=ffffff&borderColorActive=003eff&bgTextureActive=flat&bgColorActive=007fff&iconColorHover=555555&fcHover=2b2b2b&borderColorHover=cccccc&bgTextureHover=flat&bgColorHover=ededed&iconColorDefault=777777&fcDefault=454545&borderColorDefault=c5c5c5&bgTextureDefault=flat&bgColorDefault=f6f6f6&iconColorContent=444444&fcContent=333333&borderColorContent=dddddd&bgTextureContent=flat&bgColorContent=ffffff&iconColorHeader=444444&fcHeader=333333&borderColorHeader=dddddd&bgTextureHeader=flat&bgColorHeader=e9e9e9&cornerRadius=3px&fwDefault=normal&fsDefault=1em&ffDefault=Arial%2CHelvetica%2Csans-serif
5
* Copyright jQuery Foundation and other contributors; Licensed MIT */
6
7
.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;-ms-filter:"alpha(opacity=0)"}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important;pointer-events:none}.ui-icon{display:inline-block;vertical-align:middle;margin-top:-.25em;position:relative;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-icon-block{left:50%;margin-left:-8px;display:block}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-tabs{position:relative;padding:.2em}.ui-tabs .ui-tabs-nav{margin:0;padding:.2em .2em 0}.ui-tabs .ui-tabs-nav li{list-style:none;float:left;position:relative;top:0;margin:1px .2em 0 0;border-bottom-width:0;padding:0;white-space:nowrap}.ui-tabs .ui-tabs-nav .ui-tabs-anchor{float:left;padding:.5em 1em;text-decoration:none}.ui-tabs .ui-tabs-nav li.ui-tabs-active{margin-bottom:-1px;padding-bottom:1px}.ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor,.ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor,.ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor{cursor:text}.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor{cursor:pointer}.ui-tabs .ui-tabs-panel{display:block;border-width:0;padding:1em 1.4em;background:none}.ui-widget{font-size:1em}.ui-widget .ui-widget{font-size:1em}.ui-widget input,.ui-widget select,.ui-widget textarea,.ui-widget button{font-size:1em}.ui-widget.ui-widget-content{border:1px solid #c5c5c5}.ui-widget-content{border:1px solid #ddd;background:#fff;color:#333}.ui-widget-content a{color:#333}.ui-widget-header{border:1px solid #ddd;background:#e9e9e9;color:#333;font-weight:bold}.ui-widget-header a{color:#333}.ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default,.ui-button,html .ui-button.ui-state-disabled:hover,html .ui-button.ui-state-disabled:active{border:1px solid #c5c5c5;background:#f6f6f6;font-weight:normal;color:#454545}.ui-state-default a,.ui-state-default a:link,.ui-state-default a:visited,a.ui-button,a:link.ui-button,a:visited.ui-button,.ui-button{color:#454545;text-decoration:none}.ui-state-hover,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-hover,.ui-state-focus,.ui-widget-content .ui-state-focus,.ui-widget-header .ui-state-focus,.ui-button:hover,.ui-button:focus{border:1px solid #ccc;background:#ededed;font-weight:normal;color:#2b2b2b}.ui-state-hover a,.ui-state-hover a:hover,.ui-state-hover a:link,.ui-state-hover a:visited,.ui-state-focus a,.ui-state-focus a:hover,.ui-state-focus a:link,.ui-state-focus a:visited,a.ui-button:hover,a.ui-button:focus{color:#2b2b2b;text-decoration:none}.ui-visual-focus{box-shadow:0 0 3px 1px rgb(94,158,214)}.ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active,a.ui-button:active,.ui-button:active,.ui-button.ui-state-active:hover{border:1px solid #003eff;background:#007fff;font-weight:normal;color:#fff}.ui-icon-background,.ui-state-active .ui-icon-background{border:#003eff;background-color:#fff}.ui-state-active a,.ui-state-active a:link,.ui-state-active a:visited{color:#fff;text-decoration:none}.ui-state-highlight,.ui-widget-content .ui-state-highlight,.ui-widget-header .ui-state-highlight{border:1px solid #dad55e;background:#fffa90;color:#777620}.ui-state-checked{border:1px solid #dad55e;background:#fffa90}.ui-state-highlight a,.ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a{color:#777620}.ui-state-error,.ui-widget-content .ui-state-error,.ui-widget-header .ui-state-error{border:1px solid #f1a899;background:#fddfdf;color:#5f3f3f}.ui-state-error a,.ui-widget-content .ui-state-error a,.ui-widget-header .ui-state-error a{color:#5f3f3f}.ui-state-error-text,.ui-widget-content .ui-state-error-text,.ui-widget-header .ui-state-error-text{color:#5f3f3f}.ui-priority-primary,.ui-widget-content .ui-priority-primary,.ui-widget-header .ui-priority-primary{font-weight:bold}.ui-priority-secondary,.ui-widget-content .ui-priority-secondary,.ui-widget-header .ui-priority-secondary{opacity:.7;-ms-filter:"alpha(opacity=70)";font-weight:normal}.ui-state-disabled,.ui-widget-content .ui-state-disabled,.ui-widget-header .ui-state-disabled{opacity:.35;-ms-filter:"alpha(opacity=35)";background-image:none}.ui-state-disabled .ui-icon{-ms-filter:"alpha(opacity=35)"}.ui-icon{width:16px;height:16px}.ui-icon,.ui-widget-content .ui-icon{background-image:url("images/ui-icons_444444_256x240.png")}.ui-widget-header .ui-icon{background-image:url("images/ui-icons_444444_256x240.png")}.ui-state-hover .ui-icon,.ui-state-focus .ui-icon,.ui-button:hover .ui-icon,.ui-button:focus .ui-icon{background-image:url("images/ui-icons_555555_256x240.png")}.ui-state-active .ui-icon,.ui-button:active .ui-icon{background-image:url("images/ui-icons_ffffff_256x240.png")}.ui-state-highlight .ui-icon,.ui-button .ui-state-highlight.ui-icon{background-image:url("images/ui-icons_777620_256x240.png")}.ui-state-error .ui-icon,.ui-state-error-text .ui-icon{background-image:url("images/ui-icons_cc0000_256x240.png")}.ui-button .ui-icon{background-image:url("images/ui-icons_777777_256x240.png")}.ui-icon-blank.ui-icon-blank.ui-icon-blank{background-image:none}.ui-icon-caret-1-n{background-position:0 0}.ui-icon-caret-1-ne{background-position:-16px 0}.ui-icon-caret-1-e{background-position:-32px 0}.ui-icon-caret-1-se{background-position:-48px 0}.ui-icon-caret-1-s{background-position:-65px 0}.ui-icon-caret-1-sw{background-position:-80px 0}.ui-icon-caret-1-w{background-position:-96px 0}.ui-icon-caret-1-nw{background-position:-112px 0}.ui-icon-caret-2-n-s{background-position:-128px 0}.ui-icon-caret-2-e-w{background-position:-144px 0}.ui-icon-triangle-1-n{background-position:0 -16px}.ui-icon-triangle-1-ne{background-position:-16px -16px}.ui-icon-triangle-1-e{background-position:-32px -16px}.ui-icon-triangle-1-se{background-position:-48px -16px}.ui-icon-triangle-1-s{background-position:-65px -16px}.ui-icon-triangle-1-sw{background-position:-80px -16px}.ui-icon-triangle-1-w{background-position:-96px -16px}.ui-icon-triangle-1-nw{background-position:-112px -16px}.ui-icon-triangle-2-n-s{background-position:-128px -16px}.ui-icon-triangle-2-e-w{background-position:-144px -16px}.ui-icon-arrow-1-n{background-position:0 -32px}.ui-icon-arrow-1-ne{background-position:-16px -32px}.ui-icon-arrow-1-e{background-position:-32px -32px}.ui-icon-arrow-1-se{background-position:-48px -32px}.ui-icon-arrow-1-s{background-position:-65px -32px}.ui-icon-arrow-1-sw{background-position:-80px -32px}.ui-icon-arrow-1-w{background-position:-96px -32px}.ui-icon-arrow-1-nw{background-position:-112px -32px}.ui-icon-arrow-2-n-s{background-position:-128px -32px}.ui-icon-arrow-2-ne-sw{background-position:-144px -32px}.ui-icon-arrow-2-e-w{background-position:-160px -32px}.ui-icon-arrow-2-se-nw{background-position:-176px -32px}.ui-icon-arrowstop-1-n{background-position:-192px -32px}.ui-icon-arrowstop-1-e{background-position:-208px -32px}.ui-icon-arrowstop-1-s{background-position:-224px -32px}.ui-icon-arrowstop-1-w{background-position:-240px -32px}.ui-icon-arrowthick-1-n{background-position:1px -48px}.ui-icon-arrowthick-1-ne{background-position:-16px -48px}.ui-icon-arrowthick-1-e{background-position:-32px -48px}.ui-icon-arrowthick-1-se{background-position:-48px -48px}.ui-icon-arrowthick-1-s{background-position:-64px -48px}.ui-icon-arrowthick-1-sw{background-position:-80px -48px}.ui-icon-arrowthick-1-w{background-position:-96px -48px}.ui-icon-arrowthick-1-nw{background-position:-112px -48px}.ui-icon-arrowthick-2-n-s{background-position:-128px -48px}.ui-icon-arrowthick-2-ne-sw{background-position:-144px -48px}.ui-icon-arrowthick-2-e-w{background-position:-160px -48px}.ui-icon-arrowthick-2-se-nw{background-position:-176px -48px}.ui-icon-arrowthickstop-1-n{background-position:-192px -48px}.ui-icon-arrowthickstop-1-e{background-position:-208px -48px}.ui-icon-arrowthickstop-1-s{background-position:-224px -48px}.ui-icon-arrowthickstop-1-w{background-position:-240px -48px}.ui-icon-arrowreturnthick-1-w{background-position:0 -64px}.ui-icon-arrowreturnthick-1-n{background-position:-16px -64px}.ui-icon-arrowreturnthick-1-e{background-position:-32px -64px}.ui-icon-arrowreturnthick-1-s{background-position:-48px -64px}.ui-icon-arrowreturn-1-w{background-position:-64px -64px}.ui-icon-arrowreturn-1-n{background-position:-80px -64px}.ui-icon-arrowreturn-1-e{background-position:-96px -64px}.ui-icon-arrowreturn-1-s{background-position:-112px -64px}.ui-icon-arrowrefresh-1-w{background-position:-128px -64px}.ui-icon-arrowrefresh-1-n{background-position:-144px -64px}.ui-icon-arrowrefresh-1-e{background-position:-160px -64px}.ui-icon-arrowrefresh-1-s{background-position:-176px -64px}.ui-icon-arrow-4{background-position:0 -80px}.ui-icon-arrow-4-diag{background-position:-16px -80px}.ui-icon-extlink{background-position:-32px -80px}.ui-icon-newwin{background-position:-48px -80px}.ui-icon-refresh{background-position:-64px -80px}.ui-icon-shuffle{background-position:-80px -80px}.ui-icon-transfer-e-w{background-position:-96px -80px}.ui-icon-transferthick-e-w{background-position:-112px -80px}.ui-icon-folder-collapsed{background-position:0 -96px}.ui-icon-folder-open{background-position:-16px -96px}.ui-icon-document{background-position:-32px -96px}.ui-icon-document-b{background-position:-48px -96px}.ui-icon-note{background-position:-64px -96px}.ui-icon-mail-closed{background-position:-80px -96px}.ui-icon-mail-open{background-position:-96px -96px}.ui-icon-suitcase{background-position:-112px -96px}.ui-icon-comment{background-position:-128px -96px}.ui-icon-person{background-position:-144px -96px}.ui-icon-print{background-position:-160px -96px}.ui-icon-trash{background-position:-176px -96px}.ui-icon-locked{background-position:-192px -96px}.ui-icon-unlocked{background-position:-208px -96px}.ui-icon-bookmark{background-position:-224px -96px}.ui-icon-tag{background-position:-240px -96px}.ui-icon-home{background-position:0 -112px}.ui-icon-flag{background-position:-16px -112px}.ui-icon-calendar{background-position:-32px -112px}.ui-icon-cart{background-position:-48px -112px}.ui-icon-pencil{background-position:-64px -112px}.ui-icon-clock{background-position:-80px -112px}.ui-icon-disk{background-position:-96px -112px}.ui-icon-calculator{background-position:-112px -112px}.ui-icon-zoomin{background-position:-128px -112px}.ui-icon-zoomout{background-position:-144px -112px}.ui-icon-search{background-position:-160px -112px}.ui-icon-wrench{background-position:-176px -112px}.ui-icon-gear{background-position:-192px -112px}.ui-icon-heart{background-position:-208px -112px}.ui-icon-star{background-position:-224px -112px}.ui-icon-link{background-position:-240px -112px}.ui-icon-cancel{background-position:0 -128px}.ui-icon-plus{background-position:-16px -128px}.ui-icon-plusthick{background-position:-32px -128px}.ui-icon-minus{background-position:-48px -128px}.ui-icon-minusthick{background-position:-64px -128px}.ui-icon-close{background-position:-80px -128px}.ui-icon-closethick{background-position:-96px -128px}.ui-icon-key{background-position:-112px -128px}.ui-icon-lightbulb{background-position:-128px -128px}.ui-icon-scissors{background-position:-144px -128px}.ui-icon-clipboard{background-position:-160px -128px}.ui-icon-copy{background-position:-176px -128px}.ui-icon-contact{background-position:-192px -128px}.ui-icon-image{background-position:-208px -128px}.ui-icon-video{background-position:-224px -128px}.ui-icon-script{background-position:-240px -128px}.ui-icon-alert{background-position:0 -144px}.ui-icon-info{background-position:-16px -144px}.ui-icon-notice{background-position:-32px -144px}.ui-icon-help{background-position:-48px -144px}.ui-icon-check{background-position:-64px -144px}.ui-icon-bullet{background-position:-80px -144px}.ui-icon-radio-on{background-position:-96px -144px}.ui-icon-radio-off{background-position:-112px -144px}.ui-icon-pin-w{background-position:-128px -144px}.ui-icon-pin-s{background-position:-144px -144px}.ui-icon-play{background-position:0 -160px}.ui-icon-pause{background-position:-16px -160px}.ui-icon-seek-next{background-position:-32px -160px}.ui-icon-seek-prev{background-position:-48px -160px}.ui-icon-seek-end{background-position:-64px -160px}.ui-icon-seek-start{background-position:-80px -160px}.ui-icon-seek-first{background-position:-80px -160px}.ui-icon-stop{background-position:-96px -160px}.ui-icon-eject{background-position:-112px -160px}.ui-icon-volume-off{background-position:-128px -160px}.ui-icon-volume-on{background-position:-144px -160px}.ui-icon-power{background-position:0 -176px}.ui-icon-signal-diag{background-position:-16px -176px}.ui-icon-signal{background-position:-32px -176px}.ui-icon-battery-0{background-position:-48px -176px}.ui-icon-battery-1{background-position:-64px -176px}.ui-icon-battery-2{background-position:-80px -176px}.ui-icon-battery-3{background-position:-96px -176px}.ui-icon-circle-plus{background-position:0 -192px}.ui-icon-circle-minus{background-position:-16px -192px}.ui-icon-circle-close{background-position:-32px -192px}.ui-icon-circle-triangle-e{background-position:-48px -192px}.ui-icon-circle-triangle-s{background-position:-64px -192px}.ui-icon-circle-triangle-w{background-position:-80px -192px}.ui-icon-circle-triangle-n{background-position:-96px -192px}.ui-icon-circle-arrow-e{background-position:-112px -192px}.ui-icon-circle-arrow-s{background-position:-128px -192px}.ui-icon-circle-arrow-w{background-position:-144px -192px}.ui-icon-circle-arrow-n{background-position:-160px -192px}.ui-icon-circle-zoomin{background-position:-176px -192px}.ui-icon-circle-zoomout{background-position:-192px -192px}.ui-icon-circle-check{background-position:-208px -192px}.ui-icon-circlesmall-plus{background-position:0 -208px}.ui-icon-circlesmall-minus{background-position:-16px -208px}.ui-icon-circlesmall-close{background-position:-32px -208px}.ui-icon-squaresmall-plus{background-position:-48px -208px}.ui-icon-squaresmall-minus{background-position:-64px -208px}.ui-icon-squaresmall-close{background-position:-80px -208px}.ui-icon-grip-dotted-vertical{background-position:0 -224px}.ui-icon-grip-dotted-horizontal{background-position:-16px -224px}.ui-icon-grip-solid-vertical{background-position:-32px -224px}.ui-icon-grip-solid-horizontal{background-position:-48px -224px}.ui-icon-gripsmall-diagonal-se{background-position:-64px -224px}.ui-icon-grip-diagonal-se{background-position:-80px -224px}.ui-corner-all,.ui-corner-top,.ui-corner-left,.ui-corner-tl{border-top-left-radius:3px}.ui-corner-all,.ui-corner-top,.ui-corner-right,.ui-corner-tr{border-top-right-radius:3px}.ui-corner-all,.ui-corner-bottom,.ui-corner-left,.ui-corner-bl{border-bottom-left-radius:3px}.ui-corner-all,.ui-corner-bottom,.ui-corner-right,.ui-corner-br{border-bottom-right-radius:3px}.ui-widget-overlay{background:#aaa;opacity:.3;-ms-filter:Alpha(Opacity=30)}.ui-widget-shadow{-webkit-box-shadow:0 0 5px #666;box-shadow:0 0 5px #666}
(-)a/koha-tmpl/opac-tmpl/bootstrap/lib/jquery/jquery-ui-1.13.1.min.js (+6 lines)
Line 0 Link Here
1
/*! jQuery UI - v1.13.1 - 2022-02-03
2
* http://jqueryui.com
3
* Includes: widget.js, keycode.js, unique-id.js, widgets/tabs.js
4
* Copyright jQuery Foundation and other contributors; Licensed MIT */
5
6
!function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function(l){"use strict";l.ui=l.ui||{};l.ui.version="1.13.1";var a,i=0,o=Array.prototype.hasOwnProperty,r=Array.prototype.slice;l.cleanData=(a=l.cleanData,function(t){for(var e,i,s=0;null!=(i=t[s]);s++)(e=l._data(i,"events"))&&e.remove&&l(i).triggerHandler("remove");a(t)}),l.widget=function(t,i,e){var s,a,n,o={},r=t.split(".")[0],h=r+"-"+(t=t.split(".")[1]);return e||(e=i,i=l.Widget),Array.isArray(e)&&(e=l.extend.apply(null,[{}].concat(e))),l.expr.pseudos[h.toLowerCase()]=function(t){return!!l.data(t,h)},l[r]=l[r]||{},s=l[r][t],a=l[r][t]=function(t,e){if(!this||!this._createWidget)return new a(t,e);arguments.length&&this._createWidget(t,e)},l.extend(a,s,{version:e.version,_proto:l.extend({},e),_childConstructors:[]}),(n=new i).options=l.widget.extend({},n.options),l.each(e,function(e,s){function a(){return i.prototype[e].apply(this,arguments)}function n(t){return i.prototype[e].apply(this,t)}o[e]="function"==typeof s?function(){var t,e=this._super,i=this._superApply;return this._super=a,this._superApply=n,t=s.apply(this,arguments),this._super=e,this._superApply=i,t}:s}),a.prototype=l.widget.extend(n,{widgetEventPrefix:s&&n.widgetEventPrefix||t},o,{constructor:a,namespace:r,widgetName:t,widgetFullName:h}),s?(l.each(s._childConstructors,function(t,e){var i=e.prototype;l.widget(i.namespace+"."+i.widgetName,a,e._proto)}),delete s._childConstructors):i._childConstructors.push(a),l.widget.bridge(t,a),a},l.widget.extend=function(t){for(var e,i,s=r.call(arguments,1),a=0,n=s.length;a<n;a++)for(e in s[a])i=s[a][e],o.call(s[a],e)&&void 0!==i&&(l.isPlainObject(i)?t[e]=l.isPlainObject(t[e])?l.widget.extend({},t[e],i):l.widget.extend({},i):t[e]=i);return t},l.widget.bridge=function(n,e){var o=e.prototype.widgetFullName||n;l.fn[n]=function(i){var t="string"==typeof i,s=r.call(arguments,1),a=this;return t?this.length||"instance"!==i?this.each(function(){var t,e=l.data(this,o);return"instance"===i?(a=e,!1):e?"function"!=typeof e[i]||"_"===i.charAt(0)?l.error("no such method '"+i+"' for "+n+" widget instance"):(t=e[i].apply(e,s))!==e&&void 0!==t?(a=t&&t.jquery?a.pushStack(t.get()):t,!1):void 0:l.error("cannot call methods on "+n+" prior to initialization; attempted to call method '"+i+"'")}):a=void 0:(s.length&&(i=l.widget.extend.apply(null,[i].concat(s))),this.each(function(){var t=l.data(this,o);t?(t.option(i||{}),t._init&&t._init()):l.data(this,o,new e(i,this))})),a}},l.Widget=function(){},l.Widget._childConstructors=[],l.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(t,e){e=l(e||this.defaultElement||this)[0],this.element=l(e),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=l(),this.hoverable=l(),this.focusable=l(),this.classesElementLookup={},e!==this&&(l.data(e,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===e&&this.destroy()}}),this.document=l(e.style?e.ownerDocument:e.document||e),this.window=l(this.document[0].defaultView||this.document[0].parentWindow)),this.options=l.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:l.noop,_create:l.noop,_init:l.noop,destroy:function(){var i=this;this._destroy(),l.each(this.classesElementLookup,function(t,e){i._removeClass(e,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:l.noop,widget:function(){return this.element},option:function(t,e){var i,s,a,n=t;if(0===arguments.length)return l.widget.extend({},this.options);if("string"==typeof t)if(n={},t=(i=t.split(".")).shift(),i.length){for(s=n[t]=l.widget.extend({},this.options[t]),a=0;a<i.length-1;a++)s[i[a]]=s[i[a]]||{},s=s[i[a]];if(t=i.pop(),1===arguments.length)return void 0===s[t]?null:s[t];s[t]=e}else{if(1===arguments.length)return void 0===this.options[t]?null:this.options[t];n[t]=e}return this._setOptions(n),this},_setOptions:function(t){for(var e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(t){var e,i,s;for(e in t)s=this.classesElementLookup[e],t[e]!==this.options.classes[e]&&s&&s.length&&(i=l(s.get()),this._removeClass(s,e),i.addClass(this._classes({element:i,keys:e,classes:t,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(a){var n=[],o=this;function t(t,e){for(var i,s=0;s<t.length;s++)i=o.classesElementLookup[t[s]]||l(),i=a.add?(function(){var i=[];a.element.each(function(t,e){l.map(o.classesElementLookup,function(t){return t}).some(function(t){return t.is(e)})||i.push(e)}),o._on(l(i),{remove:"_untrackClassesElement"})}(),l(l.uniqueSort(i.get().concat(a.element.get())))):l(i.not(a.element).get()),o.classesElementLookup[t[s]]=i,n.push(t[s]),e&&a.classes[t[s]]&&n.push(a.classes[t[s]])}return(a=l.extend({element:this.element,classes:this.options.classes||{}},a)).keys&&t(a.keys.match(/\S+/g)||[],!0),a.extra&&t(a.extra.match(/\S+/g)||[]),n.join(" ")},_untrackClassesElement:function(i){var s=this;l.each(s.classesElementLookup,function(t,e){-1!==l.inArray(i.target,e)&&(s.classesElementLookup[t]=l(e.not(i.target).get()))}),this._off(l(i.target))},_removeClass:function(t,e,i){return this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,s){var a="string"==typeof t||null===t,i={extra:a?e:i,keys:a?t:e,element:a?this.element:t,add:s="boolean"==typeof s?s:i};return i.element.toggleClass(this._classes(i),s),this},_on:function(a,n,t){var o,r=this;"boolean"!=typeof a&&(t=n,n=a,a=!1),t?(n=o=l(n),this.bindings=this.bindings.add(n)):(t=n,n=this.element,o=this.widget()),l.each(t,function(t,e){function i(){if(a||!0!==r.options.disabled&&!l(this).hasClass("ui-state-disabled"))return("string"==typeof e?r[e]:e).apply(r,arguments)}"string"!=typeof e&&(i.guid=e.guid=e.guid||i.guid||l.guid++);var s=t.match(/^([\w:-]*)\s*(.*)$/),t=s[1]+r.eventNamespace,s=s[2];s?o.on(t,s,i):n.on(t,i)})},_off:function(t,e){e=(e||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.off(e),this.bindings=l(this.bindings.not(t).get()),this.focusable=l(this.focusable.not(t).get()),this.hoverable=l(this.hoverable.not(t).get())},_delay:function(t,e){var i=this;return setTimeout(function(){return("string"==typeof t?i[t]:t).apply(i,arguments)},e||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){this._addClass(l(t.currentTarget),null,"ui-state-hover")},mouseleave:function(t){this._removeClass(l(t.currentTarget),null,"ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){this._addClass(l(t.currentTarget),null,"ui-state-focus")},focusout:function(t){this._removeClass(l(t.currentTarget),null,"ui-state-focus")}})},_trigger:function(t,e,i){var s,a,n=this.options[t];if(i=i||{},(e=l.Event(e)).type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),e.target=this.element[0],a=e.originalEvent)for(s in a)s in e||(e[s]=a[s]);return this.element.trigger(e,i),!("function"==typeof n&&!1===n.apply(this.element[0],[e].concat(i))||e.isDefaultPrevented())}},l.each({show:"fadeIn",hide:"fadeOut"},function(n,o){l.Widget.prototype["_"+n]=function(e,t,i){var s,a=(t="string"==typeof t?{effect:t}:t)?!0!==t&&"number"!=typeof t&&t.effect||o:n;"number"==typeof(t=t||{})?t={duration:t}:!0===t&&(t={}),s=!l.isEmptyObject(t),t.complete=i,t.delay&&e.delay(t.delay),s&&l.effects&&l.effects.effect[a]?e[n](t):a!==n&&e[a]?e[a](t.duration,t.easing,i):e.queue(function(t){l(this)[n](),i&&i.call(e[0]),t()})}});var t,s;l.widget,l.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},l.fn.extend({uniqueId:(t=0,function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++t)})}),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&l(this).removeAttr("id")})}}),l.ui.safeActiveElement=function(e){var i;try{i=e.activeElement}catch(t){i=e.body}return i=!(i=i||e.body).nodeName?e.body:i};l.widget("ui.tabs",{version:"1.13.1",delay:300,options:{active:null,classes:{"ui-tabs":"ui-corner-all","ui-tabs-nav":"ui-corner-all","ui-tabs-panel":"ui-corner-bottom","ui-tabs-tab":"ui-corner-top"},collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_isLocal:(s=/#.*$/,function(t){var e=t.href.replace(s,""),i=location.href.replace(s,"");try{e=decodeURIComponent(e)}catch(t){}try{i=decodeURIComponent(i)}catch(t){}return 1<t.hash.length&&e===i}),_create:function(){var e=this,t=this.options;this.running=!1,this._addClass("ui-tabs","ui-widget ui-widget-content"),this._toggleClass("ui-tabs-collapsible",null,t.collapsible),this._processTabs(),t.active=this._initialActive(),Array.isArray(t.disabled)&&(t.disabled=l.uniqueSort(t.disabled.concat(l.map(this.tabs.filter(".ui-state-disabled"),function(t){return e.tabs.index(t)}))).sort()),!1!==this.options.active&&this.anchors.length?this.active=this._findActive(t.active):this.active=l(),this._refresh(),this.active.length&&this.load(t.active)},_initialActive:function(){var i=this.options.active,t=this.options.collapsible,s=location.hash.substring(1);return null===i&&(s&&this.tabs.each(function(t,e){if(l(e).attr("aria-controls")===s)return i=t,!1}),null!==(i=null===i?this.tabs.index(this.tabs.filter(".ui-tabs-active")):i)&&-1!==i||(i=!!this.tabs.length&&0)),!1!==i&&-1===(i=this.tabs.index(this.tabs.eq(i)))&&(i=!t&&0),i=!t&&!1===i&&this.anchors.length?0:i},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):l()}},_tabKeydown:function(t){var e=l(l.ui.safeActiveElement(this.document[0])).closest("li"),i=this.tabs.index(e),s=!0;if(!this._handlePageNav(t)){switch(t.keyCode){case l.ui.keyCode.RIGHT:case l.ui.keyCode.DOWN:i++;break;case l.ui.keyCode.UP:case l.ui.keyCode.LEFT:s=!1,i--;break;case l.ui.keyCode.END:i=this.anchors.length-1;break;case l.ui.keyCode.HOME:i=0;break;case l.ui.keyCode.SPACE:return t.preventDefault(),clearTimeout(this.activating),void this._activate(i);case l.ui.keyCode.ENTER:return t.preventDefault(),clearTimeout(this.activating),void this._activate(i!==this.options.active&&i);default:return}t.preventDefault(),clearTimeout(this.activating),i=this._focusNextTab(i,s),t.ctrlKey||t.metaKey||(e.attr("aria-selected","false"),this.tabs.eq(i).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",i)},this.delay))}},_panelKeydown:function(t){this._handlePageNav(t)||t.ctrlKey&&t.keyCode===l.ui.keyCode.UP&&(t.preventDefault(),this.active.trigger("focus"))},_handlePageNav:function(t){return t.altKey&&t.keyCode===l.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):t.altKey&&t.keyCode===l.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):void 0},_findNextTab:function(t,e){var i=this.tabs.length-1;for(;-1!==l.inArray(t=(t=i<t?0:t)<0?i:t,this.options.disabled);)t=e?t+1:t-1;return t},_focusNextTab:function(t,e){return t=this._findNextTab(t,e),this.tabs.eq(t).trigger("focus"),t},_setOption:function(t,e){"active"!==t?(this._super(t,e),"collapsible"===t&&(this._toggleClass("ui-tabs-collapsible",null,e),e||!1!==this.options.active||this._activate(0)),"event"===t&&this._setupEvents(e),"heightStyle"===t&&this._setupHeightStyle(e)):this._activate(e)},_sanitizeSelector:function(t){return t?t.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var t=this.options,e=this.tablist.children(":has(a[href])");t.disabled=l.map(e.filter(".ui-state-disabled"),function(t){return e.index(t)}),this._processTabs(),!1!==t.active&&this.anchors.length?this.active.length&&!l.contains(this.tablist[0],this.active[0])?this.tabs.length===t.disabled.length?(t.active=!1,this.active=l()):this._activate(this._findNextTab(Math.max(0,t.active-1),!1)):t.active=this.tabs.index(this.active):(t.active=!1,this.active=l()),this._refresh()},_refresh:function(){this._setOptionDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-hidden":"true"}),this.active.length?(this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}),this._addClass(this.active,"ui-tabs-active","ui-state-active"),this._getPanelForTab(this.active).show().attr({"aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var h=this,t=this.tabs,e=this.anchors,i=this.panels;this.tablist=this._getList().attr("role","tablist"),this._addClass(this.tablist,"ui-tabs-nav","ui-helper-reset ui-helper-clearfix ui-widget-header"),this.tablist.on("mousedown"+this.eventNamespace,"> li",function(t){l(this).is(".ui-state-disabled")&&t.preventDefault()}).on("focus"+this.eventNamespace,".ui-tabs-anchor",function(){l(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this.tabs=this.tablist.find("> li:has(a[href])").attr({role:"tab",tabIndex:-1}),this._addClass(this.tabs,"ui-tabs-tab","ui-state-default"),this.anchors=this.tabs.map(function(){return l("a",this)[0]}).attr({tabIndex:-1}),this._addClass(this.anchors,"ui-tabs-anchor"),this.panels=l(),this.anchors.each(function(t,e){var i,s,a,n=l(e).uniqueId().attr("id"),o=l(e).closest("li"),r=o.attr("aria-controls");h._isLocal(e)?(a=(i=e.hash).substring(1),s=h.element.find(h._sanitizeSelector(i))):(a=o.attr("aria-controls")||l({}).uniqueId()[0].id,(s=h.element.find(i="#"+a)).length||(s=h._createPanel(a)).insertAfter(h.panels[t-1]||h.tablist),s.attr("aria-live","polite")),s.length&&(h.panels=h.panels.add(s)),r&&o.data("ui-tabs-aria-controls",r),o.attr({"aria-controls":a,"aria-labelledby":n}),s.attr("aria-labelledby",n)}),this.panels.attr("role","tabpanel"),this._addClass(this.panels,"ui-tabs-panel","ui-widget-content"),t&&(this._off(t.not(this.tabs)),this._off(e.not(this.anchors)),this._off(i.not(this.panels)))},_getList:function(){return this.tablist||this.element.find("ol, ul").eq(0)},_createPanel:function(t){return l("<div>").attr("id",t).data("ui-tabs-destroy",!0)},_setOptionDisabled:function(t){var e,i;for(Array.isArray(t)&&(t.length?t.length===this.anchors.length&&(t=!0):t=!1),i=0;e=this.tabs[i];i++)e=l(e),!0===t||-1!==l.inArray(i,t)?(e.attr("aria-disabled","true"),this._addClass(e,null,"ui-state-disabled")):(e.removeAttr("aria-disabled"),this._removeClass(e,null,"ui-state-disabled"));this.options.disabled=t,this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!0===t)},_setupEvents:function(t){var i={};t&&l.each(t.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(!0,this.anchors,{click:function(t){t.preventDefault()}}),this._on(this.anchors,i),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(t){var i,e=this.element.parent();"fill"===t?(i=e.height(),i-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var t=l(this),e=t.css("position");"absolute"!==e&&"fixed"!==e&&(i-=t.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){i-=l(this).outerHeight(!0)}),this.panels.each(function(){l(this).height(Math.max(0,i-l(this).innerHeight()+l(this).height()))}).css("overflow","auto")):"auto"===t&&(i=0,this.panels.each(function(){i=Math.max(i,l(this).height("").height())}).height(i))},_eventHandler:function(t){var e=this.options,i=this.active,s=l(t.currentTarget).closest("li"),a=s[0]===i[0],n=a&&e.collapsible,o=n?l():this._getPanelForTab(s),r=i.length?this._getPanelForTab(i):l(),i={oldTab:i,oldPanel:r,newTab:n?l():s,newPanel:o};t.preventDefault(),s.hasClass("ui-state-disabled")||s.hasClass("ui-tabs-loading")||this.running||a&&!e.collapsible||!1===this._trigger("beforeActivate",t,i)||(e.active=!n&&this.tabs.index(s),this.active=a?l():s,this.xhr&&this.xhr.abort(),r.length||o.length||l.error("jQuery UI Tabs: Mismatching fragment identifier."),o.length&&this.load(this.tabs.index(s),t),this._toggle(t,i))},_toggle:function(t,e){var i=this,s=e.newPanel,a=e.oldPanel;function n(){i.running=!1,i._trigger("activate",t,e)}function o(){i._addClass(e.newTab.closest("li"),"ui-tabs-active","ui-state-active"),s.length&&i.options.show?i._show(s,i.options.show,n):(s.show(),n())}this.running=!0,a.length&&this.options.hide?this._hide(a,this.options.hide,function(){i._removeClass(e.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),o()}):(this._removeClass(e.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),a.hide(),o()),a.attr("aria-hidden","true"),e.oldTab.attr({"aria-selected":"false","aria-expanded":"false"}),s.length&&a.length?e.oldTab.attr("tabIndex",-1):s.length&&this.tabs.filter(function(){return 0===l(this).attr("tabIndex")}).attr("tabIndex",-1),s.attr("aria-hidden","false"),e.newTab.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_activate:function(t){var t=this._findActive(t);t[0]!==this.active[0]&&(t=(t=!t.length?this.active:t).find(".ui-tabs-anchor")[0],this._eventHandler({target:t,currentTarget:t,preventDefault:l.noop}))},_findActive:function(t){return!1===t?l():this.tabs.eq(t)},_getIndex:function(t){return t="string"==typeof t?this.anchors.index(this.anchors.filter("[href$='"+l.escapeSelector(t)+"']")):t},_destroy:function(){this.xhr&&this.xhr.abort(),this.tablist.removeAttr("role").off(this.eventNamespace),this.anchors.removeAttr("role tabIndex").removeUniqueId(),this.tabs.add(this.panels).each(function(){l.data(this,"ui-tabs-destroy")?l(this).remove():l(this).removeAttr("role tabIndex aria-live aria-busy aria-selected aria-labelledby aria-hidden aria-expanded")}),this.tabs.each(function(){var t=l(this),e=t.data("ui-tabs-aria-controls");e?t.attr("aria-controls",e).removeData("ui-tabs-aria-controls"):t.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(i){var t=this.options.disabled;!1!==t&&(t=void 0!==i&&(i=this._getIndex(i),Array.isArray(t)?l.map(t,function(t){return t!==i?t:null}):l.map(this.tabs,function(t,e){return e!==i?e:null})),this._setOptionDisabled(t))},disable:function(t){var e=this.options.disabled;if(!0!==e){if(void 0===t)e=!0;else{if(t=this._getIndex(t),-1!==l.inArray(t,e))return;e=Array.isArray(e)?l.merge([t],e).sort():[t]}this._setOptionDisabled(e)}},load:function(t,s){t=this._getIndex(t);function a(t,e){"abort"===e&&n.panels.stop(!1,!0),n._removeClass(i,"ui-tabs-loading"),o.removeAttr("aria-busy"),t===n.xhr&&delete n.xhr}var n=this,i=this.tabs.eq(t),t=i.find(".ui-tabs-anchor"),o=this._getPanelForTab(i),r={tab:i,panel:o};this._isLocal(t[0])||(this.xhr=l.ajax(this._ajaxSettings(t,s,r)),this.xhr&&"canceled"!==this.xhr.statusText&&(this._addClass(i,"ui-tabs-loading"),o.attr("aria-busy","true"),this.xhr.done(function(t,e,i){setTimeout(function(){o.html(t),n._trigger("load",s,r),a(i,e)},1)}).fail(function(t,e){setTimeout(function(){a(t,e)},1)})))},_ajaxSettings:function(t,i,s){var a=this;return{url:t.attr("href").replace(/#.*$/,""),beforeSend:function(t,e){return a._trigger("beforeLoad",i,l.extend({jqXHR:t,ajaxSettings:e},s))}}},_getPanelForTab:function(t){t=l(t).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+t))}}),!1!==l.uiBackCompat&&l.widget("ui.tabs",l.ui.tabs,{_processTabs:function(){this._superApply(arguments),this._addClass(this.tabs,"ui-tab")}});l.ui.tabs});
(-)a/koha-tmpl/opac-tmpl/bootstrap/lib/jquery/jquery-ui-rtl-1.12.1.css (-874 lines)
Lines 1-874 Link Here
1
/*! jQuery UI - v1.12.1 - 2019-08-16
2
* http://jqueryui.com
3
* Includes: sortable.css, core.css, autocomplete.css, menu.css, datepicker.css, slider.css, tabs.css, tooltip.css, theme.css
4
* To view and modify this theme, visit http://jqueryui.com/themeroller/?scope=&folderName=smoothness&cornerRadiusShadow=8px&offsetLeftShadow=-8px&offsetTopShadow=-8px&thicknessShadow=8px&opacityShadow=30&bgImgOpacityShadow=0&bgTextureShadow=flat&bgColorShadow=aaaaaa&opacityOverlay=30&bgImgOpacityOverlay=0&bgTextureOverlay=flat&bgColorOverlay=aaaaaa&iconColorError=cd0a0a&fcError=cd0a0a&borderColorError=cd0a0a&bgImgOpacityError=95&bgTextureError=glass&bgColorError=fef1ec&iconColorHighlight=2e83ff&fcHighlight=363636&borderColorHighlight=fcefa1&bgImgOpacityHighlight=55&bgTextureHighlight=glass&bgColorHighlight=fbf9ee&iconColorActive=454545&fcActive=212121&borderColorActive=aaaaaa&bgImgOpacityActive=65&bgTextureActive=glass&bgColorActive=ffffff&iconColorHover=454545&fcHover=212121&borderColorHover=999999&bgImgOpacityHover=75&bgTextureHover=glass&bgColorHover=dadada&iconColorDefault=888888&fcDefault=555555&borderColorDefault=d3d3d3&bgImgOpacityDefault=75&bgTextureDefault=glass&bgColorDefault=e6e6e6&iconColorContent=222222&fcContent=222222&borderColorContent=aaaaaa&bgImgOpacityContent=75&bgTextureContent=flat&bgColorContent=ffffff&iconColorHeader=222222&fcHeader=222222&borderColorHeader=aaaaaa&bgImgOpacityHeader=75&bgTextureHeader=highlight_soft&bgColorHeader=cccccc&cornerRadius=4px&fsDefault=1.1em&fwDefault=normal&ffDefault=Verdana%2CArial%2Csans-serif
5
* Copyright jQuery Foundation and other contributors; Licensed MIT */
6
7
.ui-sortable-handle {
8
	-ms-touch-action: none;
9
	touch-action: none;
10
}
11
/* Layout helpers
12
----------------------------------*/
13
.ui-helper-hidden {
14
	display: none;
15
}
16
.ui-helper-hidden-accessible {
17
	border: 0;
18
	clip: rect(0 0 0 0);
19
	height: 1px;
20
	margin: -1px;
21
	overflow: hidden;
22
	padding: 0;
23
	position: absolute;
24
	width: 1px;
25
}
26
.ui-helper-reset {
27
	margin: 0;
28
	padding: 0;
29
	border: 0;
30
	outline: 0;
31
	line-height: 1.3;
32
	text-decoration: none;
33
	font-size: 100%;
34
	list-style: none;
35
}
36
.ui-helper-clearfix:before,
37
.ui-helper-clearfix:after {
38
	content: "";
39
	display: table;
40
	border-collapse: collapse;
41
}
42
.ui-helper-clearfix:after {
43
	clear: both;
44
}
45
.ui-helper-zfix {
46
	width: 100%;
47
	height: 100%;
48
	top: 0;
49
	right: 0;
50
	position: absolute;
51
	opacity: 0;
52
	filter:Alpha(Opacity=0); /* support: IE8 */
53
}
54
55
.ui-front {
56
	z-index: 100;
57
}
58
59
60
/* Interaction Cues
61
----------------------------------*/
62
.ui-state-disabled {
63
	cursor: default !important;
64
	pointer-events: none;
65
}
66
67
68
/* Icons
69
----------------------------------*/
70
.ui-icon {
71
	display: inline-block;
72
	vertical-align: middle;
73
	margin-top: -.25em;
74
	position: relative;
75
	text-indent: -99999px;
76
	overflow: hidden;
77
	background-repeat: no-repeat;
78
}
79
80
.ui-widget-icon-block {
81
	right: 50%;
82
	margin-right: -8px;
83
	display: block;
84
}
85
86
/* Misc visuals
87
----------------------------------*/
88
89
/* Overlays */
90
.ui-widget-overlay {
91
	position: fixed;
92
	top: 0;
93
	right: 0;
94
	width: 100%;
95
	height: 100%;
96
}
97
.ui-autocomplete {
98
	position: absolute;
99
	top: 0;
100
	right: 0;
101
	cursor: default;
102
}
103
.ui-menu {
104
	list-style: none;
105
	padding: 0;
106
	margin: 0;
107
	display: block;
108
	outline: 0;
109
}
110
.ui-menu .ui-menu {
111
	position: absolute;
112
}
113
.ui-menu .ui-menu-item {
114
	margin: 0;
115
	cursor: pointer;
116
	/* support: IE10, see #8844 */
117
	list-style-image: url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7");
118
}
119
.ui-menu .ui-menu-item-wrapper {
120
	position: relative;
121
	padding: 3px 1em 3px .4em;
122
}
123
.ui-menu .ui-menu-divider {
124
	margin: 5px 0;
125
	height: 0;
126
	font-size: 0;
127
	line-height: 0;
128
	border-width: 1px 0 0 0;
129
}
130
.ui-menu .ui-state-focus,
131
.ui-menu .ui-state-active {
132
	margin: -1px;
133
}
134
135
/* icon support */
136
.ui-menu-icons {
137
	position: relative;
138
}
139
.ui-menu-icons .ui-menu-item-wrapper {
140
	padding-right: 2em;
141
}
142
143
/* left-aligned */
144
.ui-menu .ui-icon {
145
	position: absolute;
146
	top: 0;
147
	bottom: 0;
148
	right: .2em;
149
	margin: auto 0;
150
}
151
152
/* right-aligned */
153
.ui-menu .ui-menu-icon {
154
	right: auto;
155
	left: 0;
156
}
157
.ui-datepicker {
158
	width: 17em;
159
	padding: .2em .2em 0;
160
	display: none;
161
}
162
.ui-datepicker .ui-datepicker-header {
163
	position: relative;
164
	padding: .2em 0;
165
}
166
.ui-datepicker .ui-datepicker-prev,
167
.ui-datepicker .ui-datepicker-next {
168
	position: absolute;
169
	top: 2px;
170
	width: 1.8em;
171
	height: 1.8em;
172
}
173
.ui-datepicker .ui-datepicker-prev-hover,
174
.ui-datepicker .ui-datepicker-next-hover {
175
	top: 1px;
176
}
177
.ui-datepicker .ui-datepicker-prev {
178
	right: 2px;
179
}
180
.ui-datepicker .ui-datepicker-next {
181
	left: 2px;
182
}
183
.ui-datepicker .ui-datepicker-prev-hover {
184
	right: 1px;
185
}
186
.ui-datepicker .ui-datepicker-next-hover {
187
	left: 1px;
188
}
189
.ui-datepicker .ui-datepicker-prev span,
190
.ui-datepicker .ui-datepicker-next span {
191
	display: block;
192
	position: absolute;
193
	right: 50%;
194
	margin-right: -8px;
195
	top: 50%;
196
	margin-top: -8px;
197
}
198
.ui-datepicker .ui-datepicker-title {
199
	margin: 0 2.3em;
200
	line-height: 1.8em;
201
	text-align: center;
202
}
203
.ui-datepicker .ui-datepicker-title select {
204
	font-size: 1em;
205
	margin: 1px 0;
206
}
207
.ui-datepicker select.ui-datepicker-month,
208
.ui-datepicker select.ui-datepicker-year {
209
	width: 45%;
210
}
211
.ui-datepicker table {
212
	width: 100%;
213
	font-size: .9em;
214
	border-collapse: collapse;
215
	margin: 0 0 .4em;
216
}
217
.ui-datepicker th {
218
	padding: .7em .3em;
219
	text-align: center;
220
	font-weight: bold;
221
	border: 0;
222
}
223
.ui-datepicker td {
224
	border: 0;
225
	padding: 1px;
226
}
227
.ui-datepicker td span,
228
.ui-datepicker td a {
229
	display: block;
230
	padding: .2em;
231
	text-align: left;
232
	text-decoration: none;
233
}
234
.ui-datepicker .ui-datepicker-buttonpane {
235
	background-image: none;
236
	margin: .7em 0 0 0;
237
	padding: 0 .2em;
238
	border-left: 0;
239
	border-right: 0;
240
	border-bottom: 0;
241
}
242
.ui-datepicker .ui-datepicker-buttonpane button {
243
	float: left;
244
	margin: .5em .2em .4em;
245
	cursor: pointer;
246
	padding: .2em .6em .3em .6em;
247
	width: auto;
248
	overflow: visible;
249
}
250
.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current {
251
	float: right;
252
}
253
254
/* with multiple calendars */
255
.ui-datepicker.ui-datepicker-multi {
256
	width: auto;
257
}
258
.ui-datepicker-multi .ui-datepicker-group {
259
	float: right;
260
}
261
.ui-datepicker-multi .ui-datepicker-group table {
262
	width: 95%;
263
	margin: 0 auto .4em;
264
}
265
.ui-datepicker-multi-2 .ui-datepicker-group {
266
	width: 50%;
267
}
268
.ui-datepicker-multi-3 .ui-datepicker-group {
269
	width: 33.3%;
270
}
271
.ui-datepicker-multi-4 .ui-datepicker-group {
272
	width: 25%;
273
}
274
.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,
275
.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header {
276
	border-left-width: 0;
277
}
278
.ui-datepicker-multi .ui-datepicker-buttonpane {
279
	clear: right;
280
}
281
.ui-datepicker-row-break {
282
	clear: both;
283
	width: 100%;
284
	font-size: 0;
285
}
286
287
/* RTL support */
288
.ui-datepicker-rtl {
289
	direction: rtl;
290
}
291
.ui-datepicker-rtl .ui-datepicker-prev {
292
	right: 2px;
293
	left: auto;
294
}
295
.ui-datepicker-rtl .ui-datepicker-next {
296
	left: 2px;
297
	right: auto;
298
}
299
.ui-datepicker-rtl .ui-datepicker-prev:hover {
300
	right: 1px;
301
	left: auto;
302
}
303
.ui-datepicker-rtl .ui-datepicker-next:hover {
304
	left: 1px;
305
	right: auto;
306
}
307
.ui-datepicker-rtl .ui-datepicker-buttonpane {
308
	clear: right;
309
}
310
.ui-datepicker-rtl .ui-datepicker-buttonpane button {
311
	float: left;
312
}
313
.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current,
314
.ui-datepicker-rtl .ui-datepicker-group {
315
	float: right;
316
}
317
.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header,
318
.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header {
319
	border-right-width: 0;
320
	border-left-width: 1px;
321
}
322
323
/* Icons */
324
.ui-datepicker .ui-icon {
325
	display: block;
326
	text-indent: -99999px;
327
	overflow: hidden;
328
	background-repeat: no-repeat;
329
	right: .5em;
330
	top: .3em;
331
}
332
.ui-slider {
333
	position: relative;
334
	text-align: right;
335
}
336
.ui-slider .ui-slider-handle {
337
	position: absolute;
338
	z-index: 2;
339
	width: 1.2em;
340
	height: 1.2em;
341
	cursor: default;
342
	-ms-touch-action: none;
343
	touch-action: none;
344
}
345
.ui-slider .ui-slider-range {
346
	position: absolute;
347
	z-index: 1;
348
	font-size: .7em;
349
	display: block;
350
	border: 0;
351
	background-position: 0 0;
352
}
353
354
/* support: IE8 - See #6727 */
355
.ui-slider.ui-state-disabled .ui-slider-handle,
356
.ui-slider.ui-state-disabled .ui-slider-range {
357
	filter: inherit;
358
}
359
360
.ui-slider-horizontal {
361
	height: .8em;
362
}
363
.ui-slider-horizontal .ui-slider-handle {
364
	top: -.3em;
365
	margin-right: -.6em;
366
}
367
.ui-slider-horizontal .ui-slider-range {
368
	top: 0;
369
	height: 100%;
370
}
371
.ui-slider-horizontal .ui-slider-range-min {
372
	right: 0;
373
}
374
.ui-slider-horizontal .ui-slider-range-max {
375
	left: 0;
376
}
377
378
.ui-slider-vertical {
379
	width: .8em;
380
	height: 100px;
381
}
382
.ui-slider-vertical .ui-slider-handle {
383
	right: -.3em;
384
	margin-right: 0;
385
	margin-bottom: -.6em;
386
}
387
.ui-slider-vertical .ui-slider-range {
388
	right: 0;
389
	width: 100%;
390
}
391
.ui-slider-vertical .ui-slider-range-min {
392
	bottom: 0;
393
}
394
.ui-slider-vertical .ui-slider-range-max {
395
	top: 0;
396
}
397
.ui-tabs {
398
	position: relative;/* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
399
	padding: .2em;
400
}
401
.ui-tabs .ui-tabs-nav {
402
	margin: 0;
403
	padding: .2em .2em 0;
404
}
405
.ui-tabs .ui-tabs-nav li {
406
	list-style: none;
407
	float: right;
408
	position: relative;
409
	top: 0;
410
	margin: 1px .2em 0 0;
411
	border-bottom-width: 0;
412
	padding: 0;
413
	white-space: nowrap;
414
}
415
.ui-tabs .ui-tabs-nav .ui-tabs-anchor {
416
	float: right;
417
	padding: .5em 1em;
418
	text-decoration: none;
419
}
420
.ui-tabs .ui-tabs-nav li.ui-tabs-active {
421
	margin-bottom: -1px;
422
	padding-bottom: 1px;
423
}
424
.ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor,
425
.ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor,
426
.ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor {
427
	cursor: text;
428
}
429
.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor {
430
	cursor: pointer;
431
}
432
.ui-tabs .ui-tabs-panel {
433
	display: block;
434
	border-width: 0;
435
	padding: 1em 1.4em;
436
	background: none;
437
}
438
.ui-tooltip {
439
	padding: 8px;
440
	position: absolute;
441
	z-index: 9999;
442
	max-width: 300px;
443
}
444
body .ui-tooltip {
445
	border-width: 2px;
446
}
447
448
/* Component containers
449
----------------------------------*/
450
.ui-widget {
451
	font-size: 1.1em;
452
}
453
.ui-widget .ui-widget {
454
	font-size: 1em;
455
}
456
.ui-widget input,
457
.ui-widget select,
458
.ui-widget textarea,
459
.ui-widget button {
460
	font-size: 1em;
461
}
462
.ui-widget.ui-widget-content {
463
	border: 1px solid #d3d3d3;
464
}
465
.ui-widget-content {
466
	border: 1px solid #aaaaaa;
467
	background: #ffffff;
468
	color: #222222;
469
}
470
.ui-widget-content a {
471
	color: #222222;
472
}
473
.ui-widget-header {
474
	border: 1px solid #aaaaaa;
475
	background: #cccccc url("images/ui-bg_highlight-soft_75_cccccc_1x100.png") 50% 50% repeat-x;
476
	color: #222222;
477
	font-weight: bold;
478
}
479
.ui-widget-header a {
480
	color: #222222;
481
}
482
483
/* Interaction states
484
----------------------------------*/
485
.ui-state-default,
486
.ui-widget-content .ui-state-default,
487
.ui-widget-header .ui-state-default,
488
.ui-button,
489
490
/* We use html here because we need a greater specificity to make sure disabled
491
works properly when clicked or hovered */
492
html .ui-button.ui-state-disabled:hover,
493
html .ui-button.ui-state-disabled:active {
494
	border: 1px solid #d3d3d3;
495
	background: #e6e6e6 url("images/ui-bg_glass_75_e6e6e6_1x400.png") 50% 50% repeat-x;
496
	font-weight: normal;
497
	color: #555555;
498
}
499
.ui-state-default a,
500
.ui-state-default a:link,
501
.ui-state-default a:visited,
502
a.ui-button,
503
a:link.ui-button,
504
a:visited.ui-button,
505
.ui-button {
506
	color: #555555;
507
	text-decoration: none;
508
}
509
.ui-state-hover,
510
.ui-widget-content .ui-state-hover,
511
.ui-widget-header .ui-state-hover,
512
.ui-state-focus,
513
.ui-widget-content .ui-state-focus,
514
.ui-widget-header .ui-state-focus,
515
.ui-button:hover,
516
.ui-button:focus {
517
	border: 1px solid #999999;
518
	background: #dadada url("images/ui-bg_glass_75_dadada_1x400.png") 50% 50% repeat-x;
519
	font-weight: normal;
520
	color: #212121;
521
}
522
.ui-state-hover a,
523
.ui-state-hover a:hover,
524
.ui-state-hover a:link,
525
.ui-state-hover a:visited,
526
.ui-state-focus a,
527
.ui-state-focus a:hover,
528
.ui-state-focus a:link,
529
.ui-state-focus a:visited,
530
a.ui-button:hover,
531
a.ui-button:focus {
532
	color: #212121;
533
	text-decoration: none;
534
}
535
536
.ui-visual-focus {
537
	box-shadow: 0 0 3px 1px rgb(94, 158, 214);
538
}
539
.ui-state-active,
540
.ui-widget-content .ui-state-active,
541
.ui-widget-header .ui-state-active,
542
a.ui-button:active,
543
.ui-button:active,
544
.ui-button.ui-state-active:hover {
545
	border: 1px solid #aaaaaa;
546
	background: #ffffff url("images/ui-bg_glass_65_ffffff_1x400.png") 50% 50% repeat-x;
547
	font-weight: normal;
548
	color: #212121;
549
}
550
.ui-icon-background,
551
.ui-state-active .ui-icon-background {
552
	border: #aaaaaa;
553
	background-color: #212121;
554
}
555
.ui-state-active a,
556
.ui-state-active a:link,
557
.ui-state-active a:visited {
558
	color: #212121;
559
	text-decoration: none;
560
}
561
562
/* Interaction Cues
563
----------------------------------*/
564
.ui-state-highlight,
565
.ui-widget-content .ui-state-highlight,
566
.ui-widget-header .ui-state-highlight {
567
	border: 1px solid #fcefa1;
568
	background: #fbf9ee url("images/ui-bg_glass_55_fbf9ee_1x400.png") 50% 50% repeat-x;
569
	color: #363636;
570
}
571
.ui-state-checked {
572
	border: 1px solid #fcefa1;
573
	background: #fbf9ee;
574
}
575
.ui-state-highlight a,
576
.ui-widget-content .ui-state-highlight a,
577
.ui-widget-header .ui-state-highlight a {
578
	color: #363636;
579
}
580
.ui-state-error,
581
.ui-widget-content .ui-state-error,
582
.ui-widget-header .ui-state-error {
583
	border: 1px solid #cd0a0a;
584
	background: #fef1ec url("images/ui-bg_glass_95_fef1ec_1x400.png") 50% 50% repeat-x;
585
	color: #cd0a0a;
586
}
587
.ui-state-error a,
588
.ui-widget-content .ui-state-error a,
589
.ui-widget-header .ui-state-error a {
590
	color: #cd0a0a;
591
}
592
.ui-state-error-text,
593
.ui-widget-content .ui-state-error-text,
594
.ui-widget-header .ui-state-error-text {
595
	color: #cd0a0a;
596
}
597
.ui-priority-primary,
598
.ui-widget-content .ui-priority-primary,
599
.ui-widget-header .ui-priority-primary {
600
	font-weight: bold;
601
}
602
.ui-priority-secondary,
603
.ui-widget-content .ui-priority-secondary,
604
.ui-widget-header .ui-priority-secondary {
605
	opacity: .7;
606
	filter:Alpha(Opacity=70); /* support: IE8 */
607
	font-weight: normal;
608
}
609
.ui-state-disabled,
610
.ui-widget-content .ui-state-disabled,
611
.ui-widget-header .ui-state-disabled {
612
	opacity: .35;
613
	filter:Alpha(Opacity=35); /* support: IE8 */
614
	background-image: none;
615
}
616
.ui-state-disabled .ui-icon {
617
	filter:Alpha(Opacity=35); /* support: IE8 - See #6059 */
618
}
619
620
/* Icons
621
----------------------------------*/
622
623
/* states and images */
624
.ui-icon {
625
	width: 16px;
626
	height: 16px;
627
}
628
.ui-icon,
629
.ui-widget-content .ui-icon {
630
	background-image: url("images/ui-icons_222222_256x240.png");
631
}
632
.ui-widget-header .ui-icon {
633
	background-image: url("images/ui-icons_222222_256x240.png");
634
}
635
.ui-state-hover .ui-icon,
636
.ui-state-focus .ui-icon,
637
.ui-button:hover .ui-icon,
638
.ui-button:focus .ui-icon {
639
	background-image: url("images/ui-icons_454545_256x240.png");
640
}
641
.ui-state-active .ui-icon,
642
.ui-button:active .ui-icon {
643
	background-image: url("images/ui-icons_454545_256x240.png");
644
}
645
.ui-state-highlight .ui-icon,
646
.ui-button .ui-state-highlight.ui-icon {
647
	background-image: url("images/ui-icons_2e83ff_256x240.png");
648
}
649
.ui-state-error .ui-icon,
650
.ui-state-error-text .ui-icon {
651
	background-image: url("images/ui-icons_cd0a0a_256x240.png");
652
}
653
.ui-button .ui-icon {
654
	background-image: url("images/ui-icons_888888_256x240.png");
655
}
656
657
/* positioning */
658
.ui-icon-blank { background-position: 16px 16px; }
659
.ui-icon-caret-1-n { background-position: 0 0; }
660
.ui-icon-caret-1-ne { background-position: -16px 0; }
661
.ui-icon-caret-1-e { background-position: -32px 0; }
662
.ui-icon-caret-1-se { background-position: -48px 0; }
663
.ui-icon-caret-1-s { background-position: -65px 0; }
664
.ui-icon-caret-1-sw { background-position: -80px 0; }
665
.ui-icon-caret-1-w { background-position: -96px 0; }
666
.ui-icon-caret-1-nw { background-position: -112px 0; }
667
.ui-icon-caret-2-n-s { background-position: -128px 0; }
668
.ui-icon-caret-2-e-w { background-position: -144px 0; }
669
.ui-icon-triangle-1-n { background-position: 0 -16px; }
670
.ui-icon-triangle-1-ne { background-position: -16px -16px; }
671
.ui-icon-triangle-1-e { background-position: -32px -16px; }
672
.ui-icon-triangle-1-se { background-position: -48px -16px; }
673
.ui-icon-triangle-1-s { background-position: -65px -16px; }
674
.ui-icon-triangle-1-sw { background-position: -80px -16px; }
675
.ui-icon-triangle-1-w { background-position: -96px -16px; }
676
.ui-icon-triangle-1-nw { background-position: -112px -16px; }
677
.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
678
.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
679
.ui-icon-arrow-1-n { background-position: 0 -32px; }
680
.ui-icon-arrow-1-ne { background-position: -16px -32px; }
681
.ui-icon-arrow-1-e { background-position: -32px -32px; }
682
.ui-icon-arrow-1-se { background-position: -48px -32px; }
683
.ui-icon-arrow-1-s { background-position: -65px -32px; }
684
.ui-icon-arrow-1-sw { background-position: -80px -32px; }
685
.ui-icon-arrow-1-w { background-position: -96px -32px; }
686
.ui-icon-arrow-1-nw { background-position: -112px -32px; }
687
.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
688
.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
689
.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
690
.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
691
.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
692
.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
693
.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
694
.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
695
.ui-icon-arrowthick-1-n { background-position: 1px -48px; }
696
.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
697
.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
698
.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
699
.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
700
.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
701
.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
702
.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
703
.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
704
.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
705
.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
706
.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
707
.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
708
.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
709
.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
710
.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
711
.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
712
.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
713
.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
714
.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
715
.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
716
.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
717
.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
718
.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
719
.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
720
.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
721
.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
722
.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
723
.ui-icon-arrow-4 { background-position: 0 -80px; }
724
.ui-icon-arrow-4-diag { background-position: -16px -80px; }
725
.ui-icon-extlink { background-position: -32px -80px; }
726
.ui-icon-newwin { background-position: -48px -80px; }
727
.ui-icon-refresh { background-position: -64px -80px; }
728
.ui-icon-shuffle { background-position: -80px -80px; }
729
.ui-icon-transfer-e-w { background-position: -96px -80px; }
730
.ui-icon-transferthick-e-w { background-position: -112px -80px; }
731
.ui-icon-folder-collapsed { background-position: 0 -96px; }
732
.ui-icon-folder-open { background-position: -16px -96px; }
733
.ui-icon-document { background-position: -32px -96px; }
734
.ui-icon-document-b { background-position: -48px -96px; }
735
.ui-icon-note { background-position: -64px -96px; }
736
.ui-icon-mail-closed { background-position: -80px -96px; }
737
.ui-icon-mail-open { background-position: -96px -96px; }
738
.ui-icon-suitcase { background-position: -112px -96px; }
739
.ui-icon-comment { background-position: -128px -96px; }
740
.ui-icon-person { background-position: -144px -96px; }
741
.ui-icon-print { background-position: -160px -96px; }
742
.ui-icon-trash { background-position: -176px -96px; }
743
.ui-icon-locked { background-position: -192px -96px; }
744
.ui-icon-unlocked { background-position: -208px -96px; }
745
.ui-icon-bookmark { background-position: -224px -96px; }
746
.ui-icon-tag { background-position: -240px -96px; }
747
.ui-icon-home { background-position: 0 -112px; }
748
.ui-icon-flag { background-position: -16px -112px; }
749
.ui-icon-calendar { background-position: -32px -112px; }
750
.ui-icon-cart { background-position: -48px -112px; }
751
.ui-icon-pencil { background-position: -64px -112px; }
752
.ui-icon-clock { background-position: -80px -112px; }
753
.ui-icon-disk { background-position: -96px -112px; }
754
.ui-icon-calculator { background-position: -112px -112px; }
755
.ui-icon-zoomin { background-position: -128px -112px; }
756
.ui-icon-zoomout { background-position: -144px -112px; }
757
.ui-icon-search { background-position: -160px -112px; }
758
.ui-icon-wrench { background-position: -176px -112px; }
759
.ui-icon-gear { background-position: -192px -112px; }
760
.ui-icon-heart { background-position: -208px -112px; }
761
.ui-icon-star { background-position: -224px -112px; }
762
.ui-icon-link { background-position: -240px -112px; }
763
.ui-icon-cancel { background-position: 0 -128px; }
764
.ui-icon-plus { background-position: -16px -128px; }
765
.ui-icon-plusthick { background-position: -32px -128px; }
766
.ui-icon-minus { background-position: -48px -128px; }
767
.ui-icon-minusthick { background-position: -64px -128px; }
768
.ui-icon-close { background-position: -80px -128px; }
769
.ui-icon-closethick { background-position: -96px -128px; }
770
.ui-icon-key { background-position: -112px -128px; }
771
.ui-icon-lightbulb { background-position: -128px -128px; }
772
.ui-icon-scissors { background-position: -144px -128px; }
773
.ui-icon-clipboard { background-position: -160px -128px; }
774
.ui-icon-copy { background-position: -176px -128px; }
775
.ui-icon-contact { background-position: -192px -128px; }
776
.ui-icon-image { background-position: -208px -128px; }
777
.ui-icon-video { background-position: -224px -128px; }
778
.ui-icon-script { background-position: -240px -128px; }
779
.ui-icon-alert { background-position: 0 -144px; }
780
.ui-icon-info { background-position: -16px -144px; }
781
.ui-icon-notice { background-position: -32px -144px; }
782
.ui-icon-help { background-position: -48px -144px; }
783
.ui-icon-check { background-position: -64px -144px; }
784
.ui-icon-bullet { background-position: -80px -144px; }
785
.ui-icon-radio-on { background-position: -96px -144px; }
786
.ui-icon-radio-off { background-position: -112px -144px; }
787
.ui-icon-pin-w { background-position: -128px -144px; }
788
.ui-icon-pin-s { background-position: -144px -144px; }
789
.ui-icon-play { background-position: 0 -160px; }
790
.ui-icon-pause { background-position: -16px -160px; }
791
.ui-icon-seek-next { background-position: -32px -160px; }
792
.ui-icon-seek-prev { background-position: -48px -160px; }
793
.ui-icon-seek-end { background-position: -64px -160px; }
794
.ui-icon-seek-start { background-position: -80px -160px; }
795
/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
796
.ui-icon-seek-first { background-position: -80px -160px; }
797
.ui-icon-stop { background-position: -96px -160px; }
798
.ui-icon-eject { background-position: -112px -160px; }
799
.ui-icon-volume-off { background-position: -128px -160px; }
800
.ui-icon-volume-on { background-position: -144px -160px; }
801
.ui-icon-power { background-position: 0 -176px; }
802
.ui-icon-signal-diag { background-position: -16px -176px; }
803
.ui-icon-signal { background-position: -32px -176px; }
804
.ui-icon-battery-0 { background-position: -48px -176px; }
805
.ui-icon-battery-1 { background-position: -64px -176px; }
806
.ui-icon-battery-2 { background-position: -80px -176px; }
807
.ui-icon-battery-3 { background-position: -96px -176px; }
808
.ui-icon-circle-plus { background-position: 0 -192px; }
809
.ui-icon-circle-minus { background-position: -16px -192px; }
810
.ui-icon-circle-close { background-position: -32px -192px; }
811
.ui-icon-circle-triangle-e { background-position: -48px -192px; }
812
.ui-icon-circle-triangle-s { background-position: -64px -192px; }
813
.ui-icon-circle-triangle-w { background-position: -80px -192px; }
814
.ui-icon-circle-triangle-n { background-position: -96px -192px; }
815
.ui-icon-circle-arrow-e { background-position: -112px -192px; }
816
.ui-icon-circle-arrow-s { background-position: -128px -192px; }
817
.ui-icon-circle-arrow-w { background-position: -144px -192px; }
818
.ui-icon-circle-arrow-n { background-position: -160px -192px; }
819
.ui-icon-circle-zoomin { background-position: -176px -192px; }
820
.ui-icon-circle-zoomout { background-position: -192px -192px; }
821
.ui-icon-circle-check { background-position: -208px -192px; }
822
.ui-icon-circlesmall-plus { background-position: 0 -208px; }
823
.ui-icon-circlesmall-minus { background-position: -16px -208px; }
824
.ui-icon-circlesmall-close { background-position: -32px -208px; }
825
.ui-icon-squaresmall-plus { background-position: -48px -208px; }
826
.ui-icon-squaresmall-minus { background-position: -64px -208px; }
827
.ui-icon-squaresmall-close { background-position: -80px -208px; }
828
.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
829
.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
830
.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
831
.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
832
.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
833
.ui-icon-grip-diagonal-se { background-position: -80px -224px; }
834
835
836
/* Misc visuals
837
----------------------------------*/
838
839
/* Corner radius */
840
.ui-corner-all,
841
.ui-corner-top,
842
.ui-corner-left,
843
.ui-corner-tl {
844
	border-top-left-radius: 4px;
845
}
846
.ui-corner-all,
847
.ui-corner-top,
848
.ui-corner-right,
849
.ui-corner-tr {
850
	border-top-right-radius: 4px;
851
}
852
.ui-corner-all,
853
.ui-corner-bottom,
854
.ui-corner-left,
855
.ui-corner-bl {
856
	border-bottom-left-radius: 4px;
857
}
858
.ui-corner-all,
859
.ui-corner-bottom,
860
.ui-corner-right,
861
.ui-corner-br {
862
	border-bottom-right-radius: 4px;
863
}
864
865
/* Overlays */
866
.ui-widget-overlay {
867
	background: #aaaaaa;
868
	opacity: .3;
869
	filter: Alpha(Opacity=30); /* support: IE8 */
870
}
871
.ui-widget-shadow {
872
	-webkit-box-shadow: -8px -8px 8px #aaaaaa;
873
	box-shadow: -8px -8px 8px #aaaaaa;
874
}
(-)a/koha-tmpl/opac-tmpl/bootstrap/lib/jquery/jquery-ui-rtl-1.12.1.min.css (-5 lines)
Lines 1-5 Link Here
1
/*! jQuery UI - v1.12.1 - 2019-08-16
2
* http://jqueryui.com
3
* Includes: sortable.css, core.css, autocomplete.css, menu.css, datepicker.css, slider.css, tabs.css, tooltip.css, theme.css
4
* To view and modify this theme, visit http://jqueryui.com/themeroller/?scope=&folderName=smoothness&cornerRadiusShadow=8px&offsetLeftShadow=-8px&offsetTopShadow=-8px&thicknessShadow=8px&opacityShadow=30&bgImgOpacityShadow=0&bgTextureShadow=flat&bgColorShadow=aaaaaa&opacityOverlay=30&bgImgOpacityOverlay=0&bgTextureOverlay=flat&bgColorOverlay=aaaaaa&iconColorError=cd0a0a&fcError=cd0a0a&borderColorError=cd0a0a&bgImgOpacityError=95&bgTextureError=glass&bgColorError=fef1ec&iconColorHighlight=2e83ff&fcHighlight=363636&borderColorHighlight=fcefa1&bgImgOpacityHighlight=55&bgTextureHighlight=glass&bgColorHighlight=fbf9ee&iconColorActive=454545&fcActive=212121&borderColorActive=aaaaaa&bgImgOpacityActive=65&bgTextureActive=glass&bgColorActive=ffffff&iconColorHover=454545&fcHover=212121&borderColorHover=999999&bgImgOpacityHover=75&bgTextureHover=glass&bgColorHover=dadada&iconColorDefault=888888&fcDefault=555555&borderColorDefault=d3d3d3&bgImgOpacityDefault=75&bgTextureDefault=glass&bgColorDefault=e6e6e6&iconColorContent=222222&fcContent=222222&borderColorContent=aaaaaa&bgImgOpacityContent=75&bgTextureContent=flat&bgColorContent=ffffff&iconColorHeader=222222&fcHeader=222222&borderColorHeader=aaaaaa&bgImgOpacityHeader=75&bgTextureHeader=highlight_soft&bgColorHeader=cccccc&cornerRadius=4px&fsDefault=1.1em&fwDefault=normal&ffDefault=Verdana%2CArial%2Csans-serif
5
* Copyright jQuery Foundation and other contributors; Licensed MIT */.ui-sortable-handle{-ms-touch-action:none;touch-action:none}.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:after,.ui-helper-clearfix:before{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-zfix{width:100%;height:100%;top:0;right:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important;pointer-events:none}.ui-icon{display:inline-block;vertical-align:middle;margin-top:-.25em;position:relative;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-icon-block{right:50%;margin-right:-8px;display:block}.ui-widget-overlay{position:fixed;top:0;right:0;width:100%;height:100%}.ui-autocomplete{position:absolute;top:0;right:0;cursor:default}.ui-menu{list-style:none;padding:0;margin:0;display:block;outline:0}.ui-menu .ui-menu{position:absolute}.ui-menu .ui-menu-item{margin:0;cursor:pointer;list-style-image:url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)}.ui-menu .ui-menu-item-wrapper{position:relative;padding:3px 1em 3px .4em}.ui-menu .ui-menu-divider{margin:5px 0;height:0;font-size:0;line-height:0;border-width:1px 0 0 0}.ui-menu .ui-state-active,.ui-menu .ui-state-focus{margin:-1px}.ui-menu-icons{position:relative}.ui-menu-icons .ui-menu-item-wrapper{padding-right:2em}.ui-menu .ui-icon{position:absolute;top:0;bottom:0;right:.2em;margin:auto 0}.ui-menu .ui-menu-icon{right:auto;left:0}.ui-datepicker{width:17em;padding:.2em .2em 0;display:none}.ui-datepicker .ui-datepicker-header{position:relative;padding:.2em 0}.ui-datepicker .ui-datepicker-next,.ui-datepicker .ui-datepicker-prev{position:absolute;top:2px;width:1.8em;height:1.8em}.ui-datepicker .ui-datepicker-next-hover,.ui-datepicker .ui-datepicker-prev-hover{top:1px}.ui-datepicker .ui-datepicker-prev{right:2px}.ui-datepicker .ui-datepicker-next{left:2px}.ui-datepicker .ui-datepicker-prev-hover{right:1px}.ui-datepicker .ui-datepicker-next-hover{left:1px}.ui-datepicker .ui-datepicker-next span,.ui-datepicker .ui-datepicker-prev span{display:block;position:absolute;right:50%;margin-right:-8px;top:50%;margin-top:-8px}.ui-datepicker .ui-datepicker-title{margin:0 2.3em;line-height:1.8em;text-align:center}.ui-datepicker .ui-datepicker-title select{font-size:1em;margin:1px 0}.ui-datepicker select.ui-datepicker-month,.ui-datepicker select.ui-datepicker-year{width:45%}.ui-datepicker table{width:100%;font-size:.9em;border-collapse:collapse;margin:0 0 .4em}.ui-datepicker th{padding:.7em .3em;text-align:center;font-weight:700;border:0}.ui-datepicker td{border:0;padding:1px}.ui-datepicker td a,.ui-datepicker td span{display:block;padding:.2em;text-align:left;text-decoration:none}.ui-datepicker .ui-datepicker-buttonpane{background-image:none;margin:.7em 0 0 0;padding:0 .2em;border-left:0;border-right:0;border-bottom:0}.ui-datepicker .ui-datepicker-buttonpane button{float:left;margin:.5em .2em .4em;cursor:pointer;padding:.2em .6em .3em .6em;width:auto;overflow:visible}.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current{float:right}.ui-datepicker.ui-datepicker-multi{width:auto}.ui-datepicker-multi .ui-datepicker-group{float:right}.ui-datepicker-multi .ui-datepicker-group table{width:95%;margin:0 auto .4em}.ui-datepicker-multi-2 .ui-datepicker-group{width:50%}.ui-datepicker-multi-3 .ui-datepicker-group{width:33.3%}.ui-datepicker-multi-4 .ui-datepicker-group{width:25%}.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header{border-left-width:0}.ui-datepicker-multi .ui-datepicker-buttonpane{clear:right}.ui-datepicker-row-break{clear:both;width:100%;font-size:0}.ui-datepicker-rtl{direction:rtl}.ui-datepicker-rtl .ui-datepicker-prev{right:2px;left:auto}.ui-datepicker-rtl .ui-datepicker-next{left:2px;right:auto}.ui-datepicker-rtl .ui-datepicker-prev:hover{right:1px;left:auto}.ui-datepicker-rtl .ui-datepicker-next:hover{left:1px;right:auto}.ui-datepicker-rtl .ui-datepicker-buttonpane{clear:right}.ui-datepicker-rtl .ui-datepicker-buttonpane button{float:left}.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current,.ui-datepicker-rtl .ui-datepicker-group{float:right}.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header{border-right-width:0;border-left-width:1px}.ui-datepicker .ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat;right:.5em;top:.3em}.ui-slider{position:relative;text-align:right}.ui-slider .ui-slider-handle{position:absolute;z-index:2;width:1.2em;height:1.2em;cursor:default;-ms-touch-action:none;touch-action:none}.ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;background-position:0 0}.ui-slider.ui-state-disabled .ui-slider-handle,.ui-slider.ui-state-disabled .ui-slider-range{filter:inherit}.ui-slider-horizontal{height:.8em}.ui-slider-horizontal .ui-slider-handle{top:-.3em;margin-right:-.6em}.ui-slider-horizontal .ui-slider-range{top:0;height:100%}.ui-slider-horizontal .ui-slider-range-min{right:0}.ui-slider-horizontal .ui-slider-range-max{left:0}.ui-slider-vertical{width:.8em;height:100px}.ui-slider-vertical .ui-slider-handle{right:-.3em;margin-right:0;margin-bottom:-.6em}.ui-slider-vertical .ui-slider-range{right:0;width:100%}.ui-slider-vertical .ui-slider-range-min{bottom:0}.ui-slider-vertical .ui-slider-range-max{top:0}.ui-tabs{position:relative;padding:.2em}.ui-tabs .ui-tabs-nav{margin:0;padding:.2em .2em 0}.ui-tabs .ui-tabs-nav li{list-style:none;float:right;position:relative;top:0;margin:1px .2em 0 0;border-bottom-width:0;padding:0;white-space:nowrap}.ui-tabs .ui-tabs-nav .ui-tabs-anchor{float:right;padding:.5em 1em;text-decoration:none}.ui-tabs .ui-tabs-nav li.ui-tabs-active{margin-bottom:-1px;padding-bottom:1px}.ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor,.ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor,.ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor{cursor:text}.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor{cursor:pointer}.ui-tabs .ui-tabs-panel{display:block;border-width:0;padding:1em 1.4em;background:0 0}.ui-tooltip{padding:8px;position:absolute;z-index:9999;max-width:300px}body .ui-tooltip{border-width:2px}.ui-widget{font-size:1.1em}.ui-widget .ui-widget{font-size:1em}.ui-widget button,.ui-widget input,.ui-widget select,.ui-widget textarea{font-size:1em}.ui-widget.ui-widget-content{border:1px solid #d3d3d3}.ui-widget-content{border:1px solid #aaa;background:#fff;color:#222}.ui-widget-content a{color:#222}.ui-widget-header{border:1px solid #aaa;background:#ccc url(images/ui-bg_highlight-soft_75_cccccc_1x100.png) 50% 50% repeat-x;color:#222;font-weight:700}.ui-widget-header a{color:#222}.ui-button,.ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default,html .ui-button.ui-state-disabled:active,html .ui-button.ui-state-disabled:hover{border:1px solid #d3d3d3;background:#e6e6e6 url(images/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x;font-weight:400;color:#555}.ui-button,.ui-state-default a,.ui-state-default a:link,.ui-state-default a:visited,a.ui-button,a:link.ui-button,a:visited.ui-button{color:#555;text-decoration:none}.ui-button:focus,.ui-button:hover,.ui-state-focus,.ui-state-hover,.ui-widget-content .ui-state-focus,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-focus,.ui-widget-header .ui-state-hover{border:1px solid #999;background:#dadada url(images/ui-bg_glass_75_dadada_1x400.png) 50% 50% repeat-x;font-weight:400;color:#212121}.ui-state-focus a,.ui-state-focus a:hover,.ui-state-focus a:link,.ui-state-focus a:visited,.ui-state-hover a,.ui-state-hover a:hover,.ui-state-hover a:link,.ui-state-hover a:visited,a.ui-button:focus,a.ui-button:hover{color:#212121;text-decoration:none}.ui-visual-focus{box-shadow:0 0 3px 1px #5e9ed6}.ui-button.ui-state-active:hover,.ui-button:active,.ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active,a.ui-button:active{border:1px solid #aaa;background:#fff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x;font-weight:400;color:#212121}.ui-icon-background,.ui-state-active .ui-icon-background{border:#aaa;background-color:#212121}.ui-state-active a,.ui-state-active a:link,.ui-state-active a:visited{color:#212121;text-decoration:none}.ui-state-highlight,.ui-widget-content .ui-state-highlight,.ui-widget-header .ui-state-highlight{border:1px solid #fcefa1;background:#fbf9ee url(images/ui-bg_glass_55_fbf9ee_1x400.png) 50% 50% repeat-x;color:#363636}.ui-state-checked{border:1px solid #fcefa1;background:#fbf9ee}.ui-state-highlight a,.ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a{color:#363636}.ui-state-error,.ui-widget-content .ui-state-error,.ui-widget-header .ui-state-error{border:1px solid #cd0a0a;background:#fef1ec url(images/ui-bg_glass_95_fef1ec_1x400.png) 50% 50% repeat-x;color:#cd0a0a}.ui-state-error a,.ui-widget-content .ui-state-error a,.ui-widget-header .ui-state-error a{color:#cd0a0a}.ui-state-error-text,.ui-widget-content .ui-state-error-text,.ui-widget-header .ui-state-error-text{color:#cd0a0a}.ui-priority-primary,.ui-widget-content .ui-priority-primary,.ui-widget-header .ui-priority-primary{font-weight:700}.ui-priority-secondary,.ui-widget-content .ui-priority-secondary,.ui-widget-header .ui-priority-secondary{opacity:.7;filter:Alpha(Opacity=70);font-weight:400}.ui-state-disabled,.ui-widget-content .ui-state-disabled,.ui-widget-header .ui-state-disabled{opacity:.35;filter:Alpha(Opacity=35);background-image:none}.ui-state-disabled .ui-icon{filter:Alpha(Opacity=35)}.ui-icon{width:16px;height:16px}.ui-icon,.ui-widget-content .ui-icon{background-image:url(images/ui-icons_222222_256x240.png)}.ui-widget-header .ui-icon{background-image:url(images/ui-icons_222222_256x240.png)}.ui-button:focus .ui-icon,.ui-button:hover .ui-icon,.ui-state-focus .ui-icon,.ui-state-hover .ui-icon{background-image:url(images/ui-icons_454545_256x240.png)}.ui-button:active .ui-icon,.ui-state-active .ui-icon{background-image:url(images/ui-icons_454545_256x240.png)}.ui-button .ui-state-highlight.ui-icon,.ui-state-highlight .ui-icon{background-image:url(images/ui-icons_2e83ff_256x240.png)}.ui-state-error .ui-icon,.ui-state-error-text .ui-icon{background-image:url(images/ui-icons_cd0a0a_256x240.png)}.ui-button .ui-icon{background-image:url(images/ui-icons_888888_256x240.png)}.ui-icon-blank{background-position:16px 16px}.ui-icon-caret-1-n{background-position:0 0}.ui-icon-caret-1-ne{background-position:-16px 0}.ui-icon-caret-1-e{background-position:-32px 0}.ui-icon-caret-1-se{background-position:-48px 0}.ui-icon-caret-1-s{background-position:-65px 0}.ui-icon-caret-1-sw{background-position:-80px 0}.ui-icon-caret-1-w{background-position:-96px 0}.ui-icon-caret-1-nw{background-position:-112px 0}.ui-icon-caret-2-n-s{background-position:-128px 0}.ui-icon-caret-2-e-w{background-position:-144px 0}.ui-icon-triangle-1-n{background-position:0 -16px}.ui-icon-triangle-1-ne{background-position:-16px -16px}.ui-icon-triangle-1-e{background-position:-32px -16px}.ui-icon-triangle-1-se{background-position:-48px -16px}.ui-icon-triangle-1-s{background-position:-65px -16px}.ui-icon-triangle-1-sw{background-position:-80px -16px}.ui-icon-triangle-1-w{background-position:-96px -16px}.ui-icon-triangle-1-nw{background-position:-112px -16px}.ui-icon-triangle-2-n-s{background-position:-128px -16px}.ui-icon-triangle-2-e-w{background-position:-144px -16px}.ui-icon-arrow-1-n{background-position:0 -32px}.ui-icon-arrow-1-ne{background-position:-16px -32px}.ui-icon-arrow-1-e{background-position:-32px -32px}.ui-icon-arrow-1-se{background-position:-48px -32px}.ui-icon-arrow-1-s{background-position:-65px -32px}.ui-icon-arrow-1-sw{background-position:-80px -32px}.ui-icon-arrow-1-w{background-position:-96px -32px}.ui-icon-arrow-1-nw{background-position:-112px -32px}.ui-icon-arrow-2-n-s{background-position:-128px -32px}.ui-icon-arrow-2-ne-sw{background-position:-144px -32px}.ui-icon-arrow-2-e-w{background-position:-160px -32px}.ui-icon-arrow-2-se-nw{background-position:-176px -32px}.ui-icon-arrowstop-1-n{background-position:-192px -32px}.ui-icon-arrowstop-1-e{background-position:-208px -32px}.ui-icon-arrowstop-1-s{background-position:-224px -32px}.ui-icon-arrowstop-1-w{background-position:-240px -32px}.ui-icon-arrowthick-1-n{background-position:1px -48px}.ui-icon-arrowthick-1-ne{background-position:-16px -48px}.ui-icon-arrowthick-1-e{background-position:-32px -48px}.ui-icon-arrowthick-1-se{background-position:-48px -48px}.ui-icon-arrowthick-1-s{background-position:-64px -48px}.ui-icon-arrowthick-1-sw{background-position:-80px -48px}.ui-icon-arrowthick-1-w{background-position:-96px -48px}.ui-icon-arrowthick-1-nw{background-position:-112px -48px}.ui-icon-arrowthick-2-n-s{background-position:-128px -48px}.ui-icon-arrowthick-2-ne-sw{background-position:-144px -48px}.ui-icon-arrowthick-2-e-w{background-position:-160px -48px}.ui-icon-arrowthick-2-se-nw{background-position:-176px -48px}.ui-icon-arrowthickstop-1-n{background-position:-192px -48px}.ui-icon-arrowthickstop-1-e{background-position:-208px -48px}.ui-icon-arrowthickstop-1-s{background-position:-224px -48px}.ui-icon-arrowthickstop-1-w{background-position:-240px -48px}.ui-icon-arrowreturnthick-1-w{background-position:0 -64px}.ui-icon-arrowreturnthick-1-n{background-position:-16px -64px}.ui-icon-arrowreturnthick-1-e{background-position:-32px -64px}.ui-icon-arrowreturnthick-1-s{background-position:-48px -64px}.ui-icon-arrowreturn-1-w{background-position:-64px -64px}.ui-icon-arrowreturn-1-n{background-position:-80px -64px}.ui-icon-arrowreturn-1-e{background-position:-96px -64px}.ui-icon-arrowreturn-1-s{background-position:-112px -64px}.ui-icon-arrowrefresh-1-w{background-position:-128px -64px}.ui-icon-arrowrefresh-1-n{background-position:-144px -64px}.ui-icon-arrowrefresh-1-e{background-position:-160px -64px}.ui-icon-arrowrefresh-1-s{background-position:-176px -64px}.ui-icon-arrow-4{background-position:0 -80px}.ui-icon-arrow-4-diag{background-position:-16px -80px}.ui-icon-extlink{background-position:-32px -80px}.ui-icon-newwin{background-position:-48px -80px}.ui-icon-refresh{background-position:-64px -80px}.ui-icon-shuffle{background-position:-80px -80px}.ui-icon-transfer-e-w{background-position:-96px -80px}.ui-icon-transferthick-e-w{background-position:-112px -80px}.ui-icon-folder-collapsed{background-position:0 -96px}.ui-icon-folder-open{background-position:-16px -96px}.ui-icon-document{background-position:-32px -96px}.ui-icon-document-b{background-position:-48px -96px}.ui-icon-note{background-position:-64px -96px}.ui-icon-mail-closed{background-position:-80px -96px}.ui-icon-mail-open{background-position:-96px -96px}.ui-icon-suitcase{background-position:-112px -96px}.ui-icon-comment{background-position:-128px -96px}.ui-icon-person{background-position:-144px -96px}.ui-icon-print{background-position:-160px -96px}.ui-icon-trash{background-position:-176px -96px}.ui-icon-locked{background-position:-192px -96px}.ui-icon-unlocked{background-position:-208px -96px}.ui-icon-bookmark{background-position:-224px -96px}.ui-icon-tag{background-position:-240px -96px}.ui-icon-home{background-position:0 -112px}.ui-icon-flag{background-position:-16px -112px}.ui-icon-calendar{background-position:-32px -112px}.ui-icon-cart{background-position:-48px -112px}.ui-icon-pencil{background-position:-64px -112px}.ui-icon-clock{background-position:-80px -112px}.ui-icon-disk{background-position:-96px -112px}.ui-icon-calculator{background-position:-112px -112px}.ui-icon-zoomin{background-position:-128px -112px}.ui-icon-zoomout{background-position:-144px -112px}.ui-icon-search{background-position:-160px -112px}.ui-icon-wrench{background-position:-176px -112px}.ui-icon-gear{background-position:-192px -112px}.ui-icon-heart{background-position:-208px -112px}.ui-icon-star{background-position:-224px -112px}.ui-icon-link{background-position:-240px -112px}.ui-icon-cancel{background-position:0 -128px}.ui-icon-plus{background-position:-16px -128px}.ui-icon-plusthick{background-position:-32px -128px}.ui-icon-minus{background-position:-48px -128px}.ui-icon-minusthick{background-position:-64px -128px}.ui-icon-close{background-position:-80px -128px}.ui-icon-closethick{background-position:-96px -128px}.ui-icon-key{background-position:-112px -128px}.ui-icon-lightbulb{background-position:-128px -128px}.ui-icon-scissors{background-position:-144px -128px}.ui-icon-clipboard{background-position:-160px -128px}.ui-icon-copy{background-position:-176px -128px}.ui-icon-contact{background-position:-192px -128px}.ui-icon-image{background-position:-208px -128px}.ui-icon-video{background-position:-224px -128px}.ui-icon-script{background-position:-240px -128px}.ui-icon-alert{background-position:0 -144px}.ui-icon-info{background-position:-16px -144px}.ui-icon-notice{background-position:-32px -144px}.ui-icon-help{background-position:-48px -144px}.ui-icon-check{background-position:-64px -144px}.ui-icon-bullet{background-position:-80px -144px}.ui-icon-radio-on{background-position:-96px -144px}.ui-icon-radio-off{background-position:-112px -144px}.ui-icon-pin-w{background-position:-128px -144px}.ui-icon-pin-s{background-position:-144px -144px}.ui-icon-play{background-position:0 -160px}.ui-icon-pause{background-position:-16px -160px}.ui-icon-seek-next{background-position:-32px -160px}.ui-icon-seek-prev{background-position:-48px -160px}.ui-icon-seek-end{background-position:-64px -160px}.ui-icon-seek-start{background-position:-80px -160px}.ui-icon-seek-first{background-position:-80px -160px}.ui-icon-stop{background-position:-96px -160px}.ui-icon-eject{background-position:-112px -160px}.ui-icon-volume-off{background-position:-128px -160px}.ui-icon-volume-on{background-position:-144px -160px}.ui-icon-power{background-position:0 -176px}.ui-icon-signal-diag{background-position:-16px -176px}.ui-icon-signal{background-position:-32px -176px}.ui-icon-battery-0{background-position:-48px -176px}.ui-icon-battery-1{background-position:-64px -176px}.ui-icon-battery-2{background-position:-80px -176px}.ui-icon-battery-3{background-position:-96px -176px}.ui-icon-circle-plus{background-position:0 -192px}.ui-icon-circle-minus{background-position:-16px -192px}.ui-icon-circle-close{background-position:-32px -192px}.ui-icon-circle-triangle-e{background-position:-48px -192px}.ui-icon-circle-triangle-s{background-position:-64px -192px}.ui-icon-circle-triangle-w{background-position:-80px -192px}.ui-icon-circle-triangle-n{background-position:-96px -192px}.ui-icon-circle-arrow-e{background-position:-112px -192px}.ui-icon-circle-arrow-s{background-position:-128px -192px}.ui-icon-circle-arrow-w{background-position:-144px -192px}.ui-icon-circle-arrow-n{background-position:-160px -192px}.ui-icon-circle-zoomin{background-position:-176px -192px}.ui-icon-circle-zoomout{background-position:-192px -192px}.ui-icon-circle-check{background-position:-208px -192px}.ui-icon-circlesmall-plus{background-position:0 -208px}.ui-icon-circlesmall-minus{background-position:-16px -208px}.ui-icon-circlesmall-close{background-position:-32px -208px}.ui-icon-squaresmall-plus{background-position:-48px -208px}.ui-icon-squaresmall-minus{background-position:-64px -208px}.ui-icon-squaresmall-close{background-position:-80px -208px}.ui-icon-grip-dotted-vertical{background-position:0 -224px}.ui-icon-grip-dotted-horizontal{background-position:-16px -224px}.ui-icon-grip-solid-vertical{background-position:-32px -224px}.ui-icon-grip-solid-horizontal{background-position:-48px -224px}.ui-icon-gripsmall-diagonal-se{background-position:-64px -224px}.ui-icon-grip-diagonal-se{background-position:-80px -224px}.ui-corner-all,.ui-corner-left,.ui-corner-tl,.ui-corner-top{border-top-left-radius:4px}.ui-corner-all,.ui-corner-right,.ui-corner-top,.ui-corner-tr{border-top-right-radius:4px}.ui-corner-all,.ui-corner-bl,.ui-corner-bottom,.ui-corner-left{border-bottom-left-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-br,.ui-corner-right{border-bottom-right-radius:4px}.ui-widget-overlay{background:#aaa;opacity:.3;filter:Alpha(Opacity=30)}.ui-widget-shadow{-webkit-box-shadow:-8px -8px 8px #aaa;box-shadow:-8px -8px 8px #aaa}
(-)a/koha-tmpl/opac-tmpl/bootstrap/lib/jquery/jquery-ui-rtl-1.13.0.min.css (-1 / +7 lines)
Line 0 Link Here
0
- 
1
/*! jQuery UI - v1.13.1 - 2022-02-03
2
* http://jqueryui.com
3
* Includes: core.css, tabs.css, tooltip.css, theme.css
4
* To view and modify this theme, visit http://jqueryui.com/themeroller/?scope=&folderName=base&cornerRadiusShadow=8px&offsetLeftShadow=0px&offsetTopShadow=0px&thicknessShadow=5px&opacityShadow=30&bgImgOpacityShadow=0&bgTextureShadow=flat&bgColorShadow=666666&opacityOverlay=30&bgImgOpacityOverlay=0&bgTextureOverlay=flat&bgColorOverlay=aaaaaa&iconColorError=cc0000&fcError=5f3f3f&borderColorError=f1a899&bgTextureError=flat&bgColorError=fddfdf&iconColorHighlight=777620&fcHighlight=777620&borderColorHighlight=dad55e&bgTextureHighlight=flat&bgColorHighlight=fffa90&iconColorActive=ffffff&fcActive=ffffff&borderColorActive=003eff&bgTextureActive=flat&bgColorActive=007fff&iconColorHover=555555&fcHover=2b2b2b&borderColorHover=cccccc&bgTextureHover=flat&bgColorHover=ededed&iconColorDefault=777777&fcDefault=454545&borderColorDefault=c5c5c5&bgTextureDefault=flat&bgColorDefault=f6f6f6&iconColorContent=444444&fcContent=333333&borderColorContent=dddddd&bgTextureContent=flat&bgColorContent=ffffff&iconColorHeader=444444&fcHeader=333333&borderColorHeader=dddddd&bgTextureHeader=flat&bgColorHeader=e9e9e9&cornerRadius=3px&fwDefault=normal&fsDefault=1em&ffDefault=Arial%2CHelvetica%2Csans-serif
5
* Copyright jQuery Foundation and other contributors; Licensed MIT */
6
7
.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-zfix{width:100%;height:100%;top:0;right:0;position:absolute;opacity:0;-ms-filter:"alpha(opacity=0)"}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important;pointer-events:none}.ui-icon{display:inline-block;vertical-align:middle;margin-top:-.25em;position:relative;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-icon-block{right:50%;margin-right:-8px;display:block}.ui-widget-overlay{position:fixed;top:0;right:0;width:100%;height:100%}.ui-tabs{position:relative;padding:.2em}.ui-tabs .ui-tabs-nav{margin:0;padding:.2em .2em 0}.ui-tabs .ui-tabs-nav li{list-style:none;float:right;position:relative;top:0;margin:1px 0 0 .2em;border-bottom-width:0;padding:0;white-space:nowrap}.ui-tabs .ui-tabs-nav .ui-tabs-anchor{float:right;padding:.5em 1em;text-decoration:none}.ui-tabs .ui-tabs-nav li.ui-tabs-active{margin-bottom:-1px;padding-bottom:1px}.ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor,.ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor,.ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor{cursor:text}.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor{cursor:pointer}.ui-tabs .ui-tabs-panel{display:block;border-width:0;padding:1em 1.4em;background:none}.ui-tooltip{padding:8px;position:absolute;z-index:9999;max-width:300px}body .ui-tooltip{border-width:2px}.ui-widget{font-family:Arial,Helvetica,sans-serif;font-size:1em}.ui-widget .ui-widget{font-size:1em}.ui-widget input,.ui-widget select,.ui-widget textarea,.ui-widget button{font-family:Arial,Helvetica,sans-serif;font-size:1em}.ui-widget.ui-widget-content{border:1px solid #c5c5c5}.ui-widget-content{border:1px solid #ddd;background:#fff;color:#333}.ui-widget-content a{color:#333}.ui-widget-header{border:1px solid #ddd;background:#e9e9e9;color:#333;font-weight:bold}.ui-widget-header a{color:#333}.ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default,.ui-button,html .ui-button.ui-state-disabled:hover,html .ui-button.ui-state-disabled:active{border:1px solid #c5c5c5;background:#f6f6f6;font-weight:normal;color:#454545}.ui-state-default a,.ui-state-default a:link,.ui-state-default a:visited,a.ui-button,a:link.ui-button,a:visited.ui-button,.ui-button{color:#454545;text-decoration:none}.ui-state-hover,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-hover,.ui-state-focus,.ui-widget-content .ui-state-focus,.ui-widget-header .ui-state-focus,.ui-button:hover,.ui-button:focus{border:1px solid #ccc;background:#ededed;font-weight:normal;color:#2b2b2b}.ui-state-hover a,.ui-state-hover a:hover,.ui-state-hover a:link,.ui-state-hover a:visited,.ui-state-focus a,.ui-state-focus a:hover,.ui-state-focus a:link,.ui-state-focus a:visited,a.ui-button:hover,a.ui-button:focus{color:#2b2b2b;text-decoration:none}.ui-visual-focus{box-shadow:0 0 3px 1px rgb(94,158,214)}.ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active,a.ui-button:active,.ui-button:active,.ui-button.ui-state-active:hover{border:1px solid #003eff;background:#007fff;font-weight:normal;color:#fff}.ui-icon-background,.ui-state-active .ui-icon-background{border:#003eff;background-color:#fff}.ui-state-active a,.ui-state-active a:link,.ui-state-active a:visited{color:#fff;text-decoration:none}.ui-state-highlight,.ui-widget-content .ui-state-highlight,.ui-widget-header .ui-state-highlight{border:1px solid #dad55e;background:#fffa90;color:#777620}.ui-state-checked{border:1px solid #dad55e;background:#fffa90}.ui-state-highlight a,.ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a{color:#777620}.ui-state-error,.ui-widget-content .ui-state-error,.ui-widget-header .ui-state-error{border:1px solid #f1a899;background:#fddfdf;color:#5f3f3f}.ui-state-error a,.ui-widget-content .ui-state-error a,.ui-widget-header .ui-state-error a{color:#5f3f3f}.ui-state-error-text,.ui-widget-content .ui-state-error-text,.ui-widget-header .ui-state-error-text{color:#5f3f3f}.ui-priority-primary,.ui-widget-content .ui-priority-primary,.ui-widget-header .ui-priority-primary{font-weight:bold}.ui-priority-secondary,.ui-widget-content .ui-priority-secondary,.ui-widget-header .ui-priority-secondary{opacity:.7;-ms-filter:"alpha(opacity=70)";font-weight:normal}.ui-state-disabled,.ui-widget-content .ui-state-disabled,.ui-widget-header .ui-state-disabled{opacity:.35;-ms-filter:"alpha(opacity=35)";background-image:none}.ui-state-disabled .ui-icon{-ms-filter:"alpha(opacity=35)"}.ui-icon{width:16px;height:16px}.ui-icon,.ui-widget-content .ui-icon{background-image:url("images/ui-icons_444444_256x240.png")}.ui-widget-header .ui-icon{background-image:url("images/ui-icons_444444_256x240.png")}.ui-state-hover .ui-icon,.ui-state-focus .ui-icon,.ui-button:hover .ui-icon,.ui-button:focus .ui-icon{background-image:url("images/ui-icons_555555_256x240.png")}.ui-state-active .ui-icon,.ui-button:active .ui-icon{background-image:url("images/ui-icons_ffffff_256x240.png")}.ui-state-highlight .ui-icon,.ui-button .ui-state-highlight.ui-icon{background-image:url("images/ui-icons_777620_256x240.png")}.ui-state-error .ui-icon,.ui-state-error-text .ui-icon{background-image:url("images/ui-icons_cc0000_256x240.png")}.ui-button .ui-icon{background-image:url("images/ui-icons_777777_256x240.png")}.ui-icon-blank.ui-icon-blank.ui-icon-blank{background-image:none}.ui-icon-caret-1-n{background-position:100% 0}.ui-icon-caret-1-ne{background-position:-16px 0}.ui-icon-caret-1-e{background-position:-32px 0}.ui-icon-caret-1-se{background-position:-48px 0}.ui-icon-caret-1-s{background-position:-65px 0}.ui-icon-caret-1-sw{background-position:-80px 0}.ui-icon-caret-1-w{background-position:-96px 0}.ui-icon-caret-1-nw{background-position:-112px 0}.ui-icon-caret-2-n-s{background-position:-128px 0}.ui-icon-caret-2-e-w{background-position:-144px 0}.ui-icon-triangle-1-n{background-position:100% -16px}.ui-icon-triangle-1-ne{background-position:-16px -16px}.ui-icon-triangle-1-e{background-position:-32px -16px}.ui-icon-triangle-1-se{background-position:-48px -16px}.ui-icon-triangle-1-s{background-position:-65px -16px}.ui-icon-triangle-1-sw{background-position:-80px -16px}.ui-icon-triangle-1-w{background-position:-96px -16px}.ui-icon-triangle-1-nw{background-position:-112px -16px}.ui-icon-triangle-2-n-s{background-position:-128px -16px}.ui-icon-triangle-2-e-w{background-position:-144px -16px}.ui-icon-arrow-1-n{background-position:100% -32px}.ui-icon-arrow-1-ne{background-position:-16px -32px}.ui-icon-arrow-1-e{background-position:-32px -32px}.ui-icon-arrow-1-se{background-position:-48px -32px}.ui-icon-arrow-1-s{background-position:-65px -32px}.ui-icon-arrow-1-sw{background-position:-80px -32px}.ui-icon-arrow-1-w{background-position:-96px -32px}.ui-icon-arrow-1-nw{background-position:-112px -32px}.ui-icon-arrow-2-n-s{background-position:-128px -32px}.ui-icon-arrow-2-ne-sw{background-position:-144px -32px}.ui-icon-arrow-2-e-w{background-position:-160px -32px}.ui-icon-arrow-2-se-nw{background-position:-176px -32px}.ui-icon-arrowstop-1-n{background-position:-192px -32px}.ui-icon-arrowstop-1-e{background-position:-208px -32px}.ui-icon-arrowstop-1-s{background-position:-224px -32px}.ui-icon-arrowstop-1-w{background-position:-240px -32px}.ui-icon-arrowthick-1-n{background-position:1px -48px}.ui-icon-arrowthick-1-ne{background-position:-16px -48px}.ui-icon-arrowthick-1-e{background-position:-32px -48px}.ui-icon-arrowthick-1-se{background-position:-48px -48px}.ui-icon-arrowthick-1-s{background-position:-64px -48px}.ui-icon-arrowthick-1-sw{background-position:-80px -48px}.ui-icon-arrowthick-1-w{background-position:-96px -48px}.ui-icon-arrowthick-1-nw{background-position:-112px -48px}.ui-icon-arrowthick-2-n-s{background-position:-128px -48px}.ui-icon-arrowthick-2-ne-sw{background-position:-144px -48px}.ui-icon-arrowthick-2-e-w{background-position:-160px -48px}.ui-icon-arrowthick-2-se-nw{background-position:-176px -48px}.ui-icon-arrowthickstop-1-n{background-position:-192px -48px}.ui-icon-arrowthickstop-1-e{background-position:-208px -48px}.ui-icon-arrowthickstop-1-s{background-position:-224px -48px}.ui-icon-arrowthickstop-1-w{background-position:-240px -48px}.ui-icon-arrowreturnthick-1-w{background-position:100% -64px}.ui-icon-arrowreturnthick-1-n{background-position:-16px -64px}.ui-icon-arrowreturnthick-1-e{background-position:-32px -64px}.ui-icon-arrowreturnthick-1-s{background-position:-48px -64px}.ui-icon-arrowreturn-1-w{background-position:-64px -64px}.ui-icon-arrowreturn-1-n{background-position:-80px -64px}.ui-icon-arrowreturn-1-e{background-position:-96px -64px}.ui-icon-arrowreturn-1-s{background-position:-112px -64px}.ui-icon-arrowrefresh-1-w{background-position:-128px -64px}.ui-icon-arrowrefresh-1-n{background-position:-144px -64px}.ui-icon-arrowrefresh-1-e{background-position:-160px -64px}.ui-icon-arrowrefresh-1-s{background-position:-176px -64px}.ui-icon-arrow-4{background-position:100% -80px}.ui-icon-arrow-4-diag{background-position:-16px -80px}.ui-icon-extlink{background-position:-32px -80px}.ui-icon-newwin{background-position:-48px -80px}.ui-icon-refresh{background-position:-64px -80px}.ui-icon-shuffle{background-position:-80px -80px}.ui-icon-transfer-e-w{background-position:-96px -80px}.ui-icon-transferthick-e-w{background-position:-112px -80px}.ui-icon-folder-collapsed{background-position:100% -96px}.ui-icon-folder-open{background-position:-16px -96px}.ui-icon-document{background-position:-32px -96px}.ui-icon-document-b{background-position:-48px -96px}.ui-icon-note{background-position:-64px -96px}.ui-icon-mail-closed{background-position:-80px -96px}.ui-icon-mail-open{background-position:-96px -96px}.ui-icon-suitcase{background-position:-112px -96px}.ui-icon-comment{background-position:-128px -96px}.ui-icon-person{background-position:-144px -96px}.ui-icon-print{background-position:-160px -96px}.ui-icon-trash{background-position:-176px -96px}.ui-icon-locked{background-position:-192px -96px}.ui-icon-unlocked{background-position:-208px -96px}.ui-icon-bookmark{background-position:-224px -96px}.ui-icon-tag{background-position:-240px -96px}.ui-icon-home{background-position:100% -112px}.ui-icon-flag{background-position:-16px -112px}.ui-icon-calendar{background-position:-32px -112px}.ui-icon-cart{background-position:-48px -112px}.ui-icon-pencil{background-position:-64px -112px}.ui-icon-clock{background-position:-80px -112px}.ui-icon-disk{background-position:-96px -112px}.ui-icon-calculator{background-position:-112px -112px}.ui-icon-zoomin{background-position:-128px -112px}.ui-icon-zoomout{background-position:-144px -112px}.ui-icon-search{background-position:-160px -112px}.ui-icon-wrench{background-position:-176px -112px}.ui-icon-gear{background-position:-192px -112px}.ui-icon-heart{background-position:-208px -112px}.ui-icon-star{background-position:-224px -112px}.ui-icon-link{background-position:-240px -112px}.ui-icon-cancel{background-position:100% -128px}.ui-icon-plus{background-position:-16px -128px}.ui-icon-plusthick{background-position:-32px -128px}.ui-icon-minus{background-position:-48px -128px}.ui-icon-minusthick{background-position:-64px -128px}.ui-icon-close{background-position:-80px -128px}.ui-icon-closethick{background-position:-96px -128px}.ui-icon-key{background-position:-112px -128px}.ui-icon-lightbulb{background-position:-128px -128px}.ui-icon-scissors{background-position:-144px -128px}.ui-icon-clipboard{background-position:-160px -128px}.ui-icon-copy{background-position:-176px -128px}.ui-icon-contact{background-position:-192px -128px}.ui-icon-image{background-position:-208px -128px}.ui-icon-video{background-position:-224px -128px}.ui-icon-script{background-position:-240px -128px}.ui-icon-alert{background-position:100% -144px}.ui-icon-info{background-position:-16px -144px}.ui-icon-notice{background-position:-32px -144px}.ui-icon-help{background-position:-48px -144px}.ui-icon-check{background-position:-64px -144px}.ui-icon-bullet{background-position:-80px -144px}.ui-icon-radio-on{background-position:-96px -144px}.ui-icon-radio-off{background-position:-112px -144px}.ui-icon-pin-w{background-position:-128px -144px}.ui-icon-pin-s{background-position:-144px -144px}.ui-icon-play{background-position:100% -160px}.ui-icon-pause{background-position:-16px -160px}.ui-icon-seek-next{background-position:-32px -160px}.ui-icon-seek-prev{background-position:-48px -160px}.ui-icon-seek-end{background-position:-64px -160px}.ui-icon-seek-start{background-position:-80px -160px}.ui-icon-seek-first{background-position:-80px -160px}.ui-icon-stop{background-position:-96px -160px}.ui-icon-eject{background-position:-112px -160px}.ui-icon-volume-off{background-position:-128px -160px}.ui-icon-volume-on{background-position:-144px -160px}.ui-icon-power{background-position:100% -176px}.ui-icon-signal-diag{background-position:-16px -176px}.ui-icon-signal{background-position:-32px -176px}.ui-icon-battery-0{background-position:-48px -176px}.ui-icon-battery-1{background-position:-64px -176px}.ui-icon-battery-2{background-position:-80px -176px}.ui-icon-battery-3{background-position:-96px -176px}.ui-icon-circle-plus{background-position:100% -192px}.ui-icon-circle-minus{background-position:-16px -192px}.ui-icon-circle-close{background-position:-32px -192px}.ui-icon-circle-triangle-e{background-position:-48px -192px}.ui-icon-circle-triangle-s{background-position:-64px -192px}.ui-icon-circle-triangle-w{background-position:-80px -192px}.ui-icon-circle-triangle-n{background-position:-96px -192px}.ui-icon-circle-arrow-e{background-position:-112px -192px}.ui-icon-circle-arrow-s{background-position:-128px -192px}.ui-icon-circle-arrow-w{background-position:-144px -192px}.ui-icon-circle-arrow-n{background-position:-160px -192px}.ui-icon-circle-zoomin{background-position:-176px -192px}.ui-icon-circle-zoomout{background-position:-192px -192px}.ui-icon-circle-check{background-position:-208px -192px}.ui-icon-circlesmall-plus{background-position:100% -208px}.ui-icon-circlesmall-minus{background-position:-16px -208px}.ui-icon-circlesmall-close{background-position:-32px -208px}.ui-icon-squaresmall-plus{background-position:-48px -208px}.ui-icon-squaresmall-minus{background-position:-64px -208px}.ui-icon-squaresmall-close{background-position:-80px -208px}.ui-icon-grip-dotted-vertical{background-position:100% -224px}.ui-icon-grip-dotted-horizontal{background-position:-16px -224px}.ui-icon-grip-solid-vertical{background-position:-32px -224px}.ui-icon-grip-solid-horizontal{background-position:-48px -224px}.ui-icon-gripsmall-diagonal-se{background-position:-64px -224px}.ui-icon-grip-diagonal-se{background-position:-80px -224px}.ui-corner-all,.ui-corner-top,.ui-corner-left,.ui-corner-tl{border-top-right-radius:3px}.ui-corner-all,.ui-corner-top,.ui-corner-right,.ui-corner-tr{border-top-left-radius:3px}.ui-corner-all,.ui-corner-bottom,.ui-corner-left,.ui-corner-bl{border-bottom-right-radius:3px}.ui-corner-all,.ui-corner-bottom,.ui-corner-right,.ui-corner-br{border-bottom-left-radius:3px}.ui-widget-overlay{background:#aaa;opacity:.3;-ms-filter:Alpha(Opacity=30)}.ui-widget-shadow{-webkit-box-shadow:0 0 5px #666;box-shadow:0 0 5px #666}

Return to bug 30011