p nohighlight">+Nguyen Phuc Lam <ruado1987@gmail.com>
186
+Dmitry Gusev <dmitry.gusev@gmail.com>
187
+Michał Gołębiowski <m.goleb@gmail.com>
188
+Li Xudong <istonelee@gmail.com>
189
+Steven Benner <admin@stevenbenner.com>
190
+Tom H Fuertes <tomfuertes@gmail.com>
191
+Renato Oliveira dos Santos <ros3@cin.ufpe.br>
192
+ros3cin <ros3@cin.ufpe.br>
193
+Jason Bedard <jason+jquery@jbedard.ca>
194
+Kyle Robinson Young <kyle@dontkry.com>
195
+Chris Talkington <chris@talkingtontech.com>
196
+Eddie Monge <eddie@eddiemonge.com>
197
+Terry Jones <terry@jon.es>
198
+Jason Merino <jasonmerino@gmail.com>
199
+Jeremy Dunck <jdunck@gmail.com>
200
+Chris Price <price.c@gmail.com>
201
+Guy Bedford <guybedford@gmail.com>
202
+Amey Sakhadeo <me@ameyms.com>
203
+Mike Sidorov <mikes.ekb@gmail.com>
204
+Anthony Ryan <anthonyryan1@gmail.com>
205
+Dominik D. Geyer <dominik.geyer@gmail.com>
206
+George Kats <katsgeorgeek@gmail.com>
207
+Lihan Li <frankieteardrop@gmail.com>
208
+Ronny Springer <springer.ronny@gmail.com>
209
+Chris Antaki <ChrisAntaki@gmail.com>
210
+Marian Sollmann <marian.sollmann@cargomedia.ch>
211
+njhamann <njhamann@gmail.com>
212
+Ilya Kantor <iliakan@gmail.com>
213
+David Hong <d.hong@me.com>
214
+John Paul <john@johnkpaul.com>
215
+Jakob Stoeck <jakob@pokermania.de>
216
+Christopher Jones <chris@cjqed.com>
217
+Forbes Lindesay <forbes@lindesay.co.uk>
218
+S. Andrew Sheppard <andrew@wq.io>
219
+Leonardo Balter <leonardo.balter@gmail.com>
220
+Roman Reiß <me@silverwind.io>
221
+Benjy Cui <benjytrys@gmail.com>
222
+Rodrigo Rosenfeld Rosas <rr.rosas@gmail.com>
223
+John Hoven <hovenj@gmail.com>
224
+Philip Jägenstedt <philip@foolip.org>
225
+Christian Kosmowski <ksmwsk@gmail.com>
226
+Liang Peng <poppinlp@gmail.com>
227
+TJ VanToll <tj.vantoll@gmail.com>
228
+Senya Pugach <upisfree@outlook.com>
229
+Aurelio De Rosa <aurelioderosa@gmail.com>
230
+Nazar Mokrynskyi <nazar@mokrynskyi.com>
231
+Amit Merchant <bullredeyes@gmail.com>
232
+Jason Bedard <jason+github@jbedard.ca>
233
+Arthur Verschaeve <contact@arthurverschaeve.be>
234
+Dan Hart <danhart@notonthehighstreet.com>
235
+Bin Xin <rhyzix@gmail.com>
236
+David Corbacho <davidcorbacho@gmail.com>
237
+Veaceslav Grimalschi <grimalschi@yandex.ru>
238
+Daniel Husar <dano.husar@gmail.com>
239
+Frederic Hemberger <mail@frederic-hemberger.de>
240
+Ben Toews <mastahyeti@gmail.com>
241
+Aditya Raghavan <araghavan3@gmail.com>
242
+Victor Homyakov <vkhomyackov@gmail.com>
243
+Shivaji Varma <contact@shivajivarma.com>
244
+Nicolas HENRY <icewil@gmail.com>
245
+Anne-Gaelle Colom <coloma@westminster.ac.uk>
246
+George Mauer <gmauer@gmail.com>
247
+Leonardo Braga <leonardo.braga@gmail.com>
248
+Stephen Edgar <stephen@netweb.com.au>
249
+Thomas Tortorini <thomastortorini@gmail.com>
250
+Winston Howes <winstonhowes@gmail.com>
251
+Jon Hester <jon.d.hester@gmail.com>
252
+Alexander O'Mara <me@alexomara.com>
253
+Bastian Buchholz <buchholz.bastian@googlemail.com>
254
+Arthur Stolyar <nekr.fabula@gmail.com>
255
+Calvin Metcalf <calvin.metcalf@gmail.com>
256
+Mu Haibao <mhbseal@163.com>
257
+Richard McDaniel <rm0026@uah.edu>
258
+Chris Rebert <github@rebertia.com>
259
+Gabriel Schulhof <gabriel.schulhof@intel.com>
260
+Gilad Peleg <giladp007@gmail.com>
261
+Martin Naumann <martin@geekonaut.de>
262
+Marek Lewandowski <m.lewandowski@cksource.com>
263
+Bruno Pérel <brunoperel@gmail.com>
264
+Reed Loden <reed@reedloden.com>
265
+Daniel Nill <daniellnill@gmail.com>
266
+Yongwoo Jeon <yongwoo.jeon@navercorp.com>
267
+Sean Henderson <seanh.za@gmail.com>
268
+Richard Kraaijenhagen <stdin+git@riichard.com>
269
+Connor Atherton <c.liam.atherton@gmail.com>
270
+Gary Ye <garysye@gmail.com>
271
+Christian Grete <webmaster@christiangrete.com>
272
+Liza Ramo <liza.h.ramo@gmail.com>
273
+Julian Alexander Murillo <julian.alexander.murillo@gmail.com>
274
+Joelle Fleurantin <joasqueeniebee@gmail.com>
275
+Jae Sung Park <alberto.park@gmail.com>
276
+Jun Sun <klsforever@gmail.com>
277
+Josh Soref <apache@soref.com>
278
+Henry Wong <henryw4k@gmail.com>
279
+Jon Dufresne <jon.dufresne@gmail.com>
280
+Martijn W. van der Lee <martijn@vanderlee.com>
281
+Devin Wilson <dwilson6.github@gmail.com>
282
+Steve Mao <maochenyan@gmail.com>
283
+Zack Hall <zackhall@outlook.com>
284
+Bernhard M. Wiedemann <jquerybmw@lsmod.de>
285
+Todor Prikumov <tono_pr@abv.bg>
286
+Jha Naman <createnaman@gmail.com>
287
+William Robinet <william.robinet@conostix.com>
288
+Alexander Lisianoi <all3fox@gmail.com>
289
+Vitaliy Terziev <vitaliyterziev@gmail.com>
290
+Joe Trumbull <trumbull.j@gmail.com>
291
+Alexander K <xpyro@ya.ru>
292
+Damian Senn <jquery@topaxi.codes>
293
+Ralin Chimev <ralin.chimev@gmail.com>
294
+Felipe Sateler <fsateler@gmail.com>
295
+Christophe Tafani-Dereeper <christophetd@hotmail.fr>
296
+Manoj Kumar <nithmanoj@gmail.com>
297
+David Broder-Rodgers <broder93@gmail.com>
298
+Alex Louden <alex@louden.com>
299
+Alex Padilla <alexonezero@outlook.com>
300
+南漂一卒 <shiy007@qq.com>
301
+karan-96 <karanbatra96@gmail.com>

+ 36 - 0
static/bower_components/jquery/LICENSE.txt

1
+Copyright JS Foundation and other contributors, https://js.foundation/
2
+
3
+This software consists of voluntary contributions made by many
4
+individuals. For exact contribution history, see the revision history
5
+available at https://github.com/jquery/jquery
6
+
7
+The following license applies to all parts of this software except as
8
+documented below:
9
+
10
+====
11
+
12
+Permission is hereby granted, free of charge, to any person obtaining
13
+a copy of this software and associated documentation files (the
14
+"Software"), to deal in the Software without restriction, including
15
+without limitation the rights to use, copy, modify, merge, publish,
16
+distribute, sublicense, and/or sell copies of the Software, and to
17
+permit persons to whom the Software is furnished to do so, subject to
18
+the following conditions:
19
+
20
+The above copyright notice and this permission notice shall be
21
+included in all copies or substantial portions of the Software.
22
+
23
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
24
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
25
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
26
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
27
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
28
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
29
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
30
+
31
+====
32
+
33
+All files located in the node_modules and external directories are
34
+externally maintained libraries used by this software which have their
35
+own licenses; we recommend you read them, as their terms may differ from
36
+the terms above.

+ 67 - 0
static/bower_components/jquery/README.md

1
+# jQuery
2
+
3
+> jQuery is a fast, small, and feature-rich JavaScript library.
4
+
5
+For information on how to get started and how to use jQuery, please see [jQuery's documentation](http://api.jquery.com/).
6
+For source files and issues, please visit the [jQuery repo](https://github.com/jquery/jquery).
7
+
8
+If upgrading, please see the [blog post for 3.2.1](https://blog.jquery.com/2017/03/20/jquery-3-2-1-now-available/). This includes notable differences from the previous version and a more readable changelog.
9
+
10
+## Including jQuery
11
+
12
+Below are some of the most common ways to include jQuery.
13
+
14
+### Browser
15
+
16
+#### Script tag
17
+
18
+```html
19
+<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
20
+```
21
+
22
+#### Babel
23
+
24
+[Babel](http://babeljs.io/) is a next generation JavaScript compiler. One of the features is the ability to use ES6/ES2015 modules now, even though browsers do not yet support this feature natively.
25
+
26
+```js
27
+import $ from "jquery";
28
+```
29
+
30
+#### Browserify/Webpack
31
+
32
+There are several ways to use [Browserify](http://browserify.org/) and [Webpack](https://webpack.github.io/). For more information on using these tools, please refer to the corresponding project's documention. In the script, including jQuery will usually look like this...
33
+
34
+```js
35
+var $ = require("jquery");
36
+```
37
+
38
+#### AMD (Asynchronous Module Definition)
39
+
40
+AMD is a module format built for the browser. For more information, we recommend [require.js' documentation](http://requirejs.org/docs/whyamd.html).
41
+
42
+```js
43
+define(["jquery"], function($) {
44
+
45
+});
46
+```
47
+
48
+### Node
49
+
50
+To include jQuery in [Node](nodejs.org), first install with npm.
51
+
52
+```sh
53
+npm install jquery
54
+```
55
+
56
+For jQuery to work in Node, a window with a document is required. Since no such window exists natively in Node, one can be mocked by tools such as [jsdom](https://github.com/tmpvar/jsdom). This can be useful for testing purposes.
57
+
58
+```js
59
+require("jsdom").env("", function(err, window) {
60
+	if (err) {
61
+		console.error(err);
62
+		return;
63
+	}
64
+
65
+	var $ = require("jquery")(window);
66
+});
67
+```

+ 14 - 0
static/bower_components/jquery/bower.json

1
+{
2
+  "name": "jquery",
3
+  "main": "dist/jquery.js",
4
+  "license": "MIT",
5
+  "ignore": [
6
+    "package.json"
7
+  ],
8
+  "keywords": [
9
+    "jquery",
10
+    "javascript",
11
+    "browser",
12
+    "library"
13
+  ]
14
+}

+ 476 - 0
static/bower_components/jquery/dist/core.js

1
+/* global Symbol */
2
+// Defining this global in .eslintrc.json would create a danger of using the global
3
+// unguarded in another place, it seems safer to define global only for this module
4
+
5
+define( [
6
+	"./var/arr",
7
+	"./var/document",
8
+	"./var/getProto",
9
+	"./var/slice",
10
+	"./var/concat",
11
+	"./var/push",
12
+	"./var/indexOf",
13
+	"./var/class2type",
14
+	"./var/toString",
15
+	"./var/hasOwn",
16
+	"./var/fnToString",
17
+	"./var/ObjectFunctionString",
18
+	"./var/support",
19
+	"./core/DOMEval"
20
+], function( arr, document, getProto, slice, concat, push, indexOf,
21
+	class2type, toString, hasOwn, fnToString, ObjectFunctionString,
22
+	support, DOMEval ) {
23
+
24
+"use strict";
25
+
26
+var
27
+	version = "3.2.1",
28
+
29
+	// Define a local copy of jQuery
30
+	jQuery = function( selector, context ) {
31
+
32
+		// The jQuery object is actually just the init constructor 'enhanced'
33
+		// Need init if jQuery is called (just allow error to be thrown if not included)
34
+		return new jQuery.fn.init( selector, context );
35
+	},
36
+
37
+	// Support: Android <=4.0 only
38
+	// Make sure we trim BOM and NBSP
39
+	rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
40
+
41
+	// Matches dashed string for camelizing
42
+	rmsPrefix = /^-ms-/,
43
+	rdashAlpha = /-([a-z])/g,
44
+
45
+	// Used by jQuery.camelCase as callback to replace()
46
+	fcamelCase = function( all, letter ) {
47
+		return letter.toUpperCase();
48
+	};
49
+
50
+jQuery.fn = jQuery.prototype = {
51
+
52
+	// The current version of jQuery being used
53
+	jquery: version,
54
+
55
+	constructor: jQuery,
56
+
57
+	// The default length of a jQuery object is 0
58
+	length: 0,
59
+
60
+	toArray: function() {
61
+		return slice.call( this );
62
+	},
63
+
64
+	// Get the Nth element in the matched element set OR
65
+	// Get the whole matched element set as a clean array
66
+	get: function( num ) {
67
+
68
+		// Return all the elements in a clean array
69
+		if ( num == null ) {
70
+			return slice.call( this );
71
+		}
72
+
73
+		// Return just the one element from the set
74
+		return num < 0 ? this[ num + this.length ] : this[ num ];
75
+	},
76
+
77
+	// Take an array of elements and push it onto the stack
78
+	// (returning the new matched element set)
79
+	pushStack: function( elems ) {
80
+
81
+		// Build a new jQuery matched element set
82
+		var ret = jQuery.merge( this.constructor(), elems );
83
+
84
+		// Add the old object onto the stack (as a reference)
85
+		ret.prevObject = this;
86
+
87
+		// Return the newly-formed element set
88
+		return ret;
89
+	},
90
+
91
+	// Execute a callback for every element in the matched set.
92
+	each: function( callback ) {
93
+		return jQuery.each( this, callback );
94
+	},
95
+
96
+	map: function( callback ) {
97
+		return this.pushStack( jQuery.map( this, function( elem, i ) {
98
+			return callback.call( elem, i, elem );
99
+		} ) );
100
+	},
101
+
102
+	slice: function() {
103
+		return this.pushStack( slice.apply( this, arguments ) );
104
+	},
105
+
106
+	first: function() {
107
+		return this.eq( 0 );
108
+	},
109
+
110
+	last: function() {
111
+		return this.eq( -1 );
112
+	},
113
+
114
+	eq: function( i ) {
115
+		var len = this.length,
116
+			j = +i + ( i < 0 ? len : 0 );
117
+		return this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] );
118
+	},
119
+
120
+	end: function() {
121
+		return this.prevObject || this.constructor();
122
+	},
123
+
124
+	// For internal use only.
125
+	// Behaves like an Array's method, not like a jQuery method.
126
+	push: push,
127
+	sort: arr.sort,
128
+	splice: arr.splice
129
+};
130
+
131
+jQuery.extend = jQuery.fn.extend = function() {
132
+	var options, name, src, copy, copyIsArray, clone,
133
+		target = arguments[ 0 ] || {},
134
+		i = 1,
135
+		length = arguments.length,
136
+		deep = false;
137
+
138
+	// Handle a deep copy situation
139
+	if ( typeof target === "boolean" ) {
140
+		deep = target;
141
+
142
+		// Skip the boolean and the target
143
+		target = arguments[ i ] || {};
144
+		i++;
145
+	}
146
+
147
+	// Handle case when target is a string or something (possible in deep copy)
148
+	if ( typeof target !== "object" && !jQuery.isFunction( target ) ) {
149
+		target = {};
150
+	}
151
+
152
+	// Extend jQuery itself if only one argument is passed
153
+	if ( i === length ) {
154
+		target = this;
155
+		i--;
156
+	}
157
+
158
+	for ( ; i < length; i++ ) {
159
+
160
+		// Only deal with non-null/undefined values
161
+		if ( ( options = arguments[ i ] ) != null ) {
162
+
163
+			// Extend the base object
164
+			for ( name in options ) {
165
+				src = target[ name ];
166
+				copy = options[ name ];
167
+
168
+				// Prevent never-ending loop
169
+				if ( target === copy ) {
170
+					continue;
171
+				}
172
+
173
+				// Recurse if we're merging plain objects or arrays
174
+				if ( deep && copy && ( jQuery.isPlainObject( copy ) ||
175
+					( copyIsArray = Array.isArray( copy ) ) ) ) {
176
+
177
+					if ( copyIsArray ) {
178
+						copyIsArray = false;
179
+						clone = src && Array.isArray( src ) ? src : [];
180
+
181
+					} else {
182
+						clone = src && jQuery.isPlainObject( src ) ? src : {};
183
+					}
184
+
185
+					// Never move original objects, clone them
186
+					target[ name ] = jQuery.extend( deep, clone, copy );
187
+
188
+				// Don't bring in undefined values
189
+				} else if ( copy !== undefined ) {
190
+					target[ name ] = copy;
191
+				}
192
+			}
193
+		}
194
+	}
195
+
196
+	// Return the modified object
197
+	return target;
198
+};
199
+
200
+jQuery.extend( {
201
+
202
+	// Unique for each copy of jQuery on the page
203
+	expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ),
204
+
205
+	// Assume jQuery is ready without the ready module
206
+	isReady: true,
207
+
208
+	error: function( msg ) {
209
+		throw new Error( msg );
210
+	},
211
+
212
+	noop: function() {},
213
+
214
+	isFunction: function( obj ) {
215
+		return jQuery.type( obj ) === "function";
216
+	},
217
+
218
+	isWindow: function( obj ) {
219
+		return obj != null && obj === obj.window;
220
+	},
221
+
222
+	isNumeric: function( obj ) {
223
+
224
+		// As of jQuery 3.0, isNumeric is limited to
225
+		// strings and numbers (primitives or objects)
226
+		// that can be coerced to finite numbers (gh-2662)
227
+		var type = jQuery.type( obj );
228
+		return ( type === "number" || type === "string" ) &&
229
+
230
+			// parseFloat NaNs numeric-cast false positives ("")
231
+			// ...but misinterprets leading-number strings, particularly hex literals ("0x...")
232
+			// subtraction forces infinities to NaN
233
+			!isNaN( obj - parseFloat( obj ) );
234
+	},
235
+
236
+	isPlainObject: function( obj ) {
237
+		var proto, Ctor;
238
+
239
+		// Detect obvious negatives
240
+		// Use toString instead of jQuery.type to catch host objects
241
+		if ( !obj || toString.call( obj ) !== "[object Object]" ) {
242
+			return false;
243
+		}
244
+
245
+		proto = getProto( obj );
246
+
247
+		// Objects with no prototype (e.g., `Object.create( null )`) are plain
248
+		if ( !proto ) {
249
+			return true;
250
+		}
251
+
252
+		// Objects with prototype are plain iff they were constructed by a global Object function
253
+		Ctor = hasOwn.call( proto, "constructor" ) && proto.constructor;
254
+		return typeof Ctor === "function" && fnToString.call( Ctor ) === ObjectFunctionString;
255
+	},
256
+
257
+	isEmptyObject: function( obj ) {
258
+
259
+		/* eslint-disable no-unused-vars */
260
+		// See https://github.com/eslint/eslint/issues/6125
261
+		var name;
262
+
263
+		for ( name in obj ) {
264
+			return false;
265
+		}
266
+		return true;
267
+	},
268
+
269
+	type: function( obj ) {
270
+		if ( obj == null ) {
271
+			return obj + "";
272
+		}
273
+
274
+		// Support: Android <=2.3 only (functionish RegExp)
275
+		return typeof obj === "object" || typeof obj === "function" ?
276
+			class2type[ toString.call( obj ) ] || "object" :
277
+			typeof obj;
278
+	},
279
+
280
+	// Evaluates a script in a global context
281
+	globalEval: function( code ) {
282
+		DOMEval( code );
283
+	},
284
+
285
+	// Convert dashed to camelCase; used by the css and data modules
286
+	// Support: IE <=9 - 11, Edge 12 - 13
287
+	// Microsoft forgot to hump their vendor prefix (#9572)
288
+	camelCase: function( string ) {
289
+		return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
290
+	},
291
+
292
+	each: function( obj, callback ) {
293
+		var length, i = 0;
294
+
295
+		if ( isArrayLike( obj ) ) {
296
+			length = obj.length;
297
+			for ( ; i < length; i++ ) {
298
+				if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {
299
+					break;
300
+				}
301
+			}
302
+		} else {
303
+			for ( i in obj ) {
304
+				if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {
305
+					break;
306
+				}
307
+			}
308
+		}
309
+
310
+		return obj;
311
+	},
312
+
313
+	// Support: Android <=4.0 only
314
+	trim: function( text ) {
315
+		return text == null ?
316
+			"" :
317
+			( text + "" ).replace( rtrim, "" );
318
+	},
319
+
320
+	// results is for internal usage only
321
+	makeArray: function( arr, results ) {
322
+		var ret = results || [];
323
+
324
+		if ( arr != null ) {
325
+			if ( isArrayLike( Object( arr ) ) ) {
326
+				jQuery.merge( ret,
327
+					typeof arr === "string" ?
328
+					[ arr ] : arr
329
+				);
330
+			} else {
331
+				push.call( ret, arr );
332
+			}
333
+		}
334
+
335
+		return ret;
336
+	},
337
+
338
+	inArray: function( elem, arr, i ) {
339
+		return arr == null ? -1 : indexOf.call( arr, elem, i );
340
+	},
341
+
342
+	// Support: Android <=4.0 only, PhantomJS 1 only
343
+	// push.apply(_, arraylike) throws on ancient WebKit
344
+	merge: function( first, second ) {
345
+		var len = +second.length,
346
+			j = 0,
347
+			i = first.length;
348
+
349
+		for ( ; j < len; j++ ) {
350
+			first[ i++ ] = second[ j ];
351
+		}
352
+
353
+		first.length = i;
354
+
355
+		return first;
356
+	},
357
+
358
+	grep: function( elems, callback, invert ) {
359
+		var callbackInverse,
360
+			matches = [],
361
+			i = 0,
362
+			length = elems.length,
363
+			callbackExpect = !invert;
364
+
365
+		// Go through the array, only saving the items
366
+		// that pass the validator function
367
+		for ( ; i < length; i++ ) {
368
+			callbackInverse = !callback( elems[ i ], i );
369
+			if ( callbackInverse !== callbackExpect ) {
370
+				matches.push( elems[ i ] );
371
+			}
372
+		}
373
+
374
+		return matches;
375
+	},
376
+
377
+	// arg is for internal usage only
378
+	map: function( elems, callback, arg ) {
379
+		var length, value,
380
+			i = 0,
381
+			ret = [];
382
+
383
+		// Go through the array, translating each of the items to their new values
384
+		if ( isArrayLike( elems ) ) {
385
+			length = elems.length;
386
+			for ( ; i < length; i++ ) {
387
+				value = callback( elems[ i ], i, arg );
388
+
389
+				if ( value != null ) {
390
+					ret.push( value );
391
+				}
392
+			}
393
+
394
+		// Go through every key on the object,
395
+		} else {
396
+			for ( i in elems ) {
397
+				value = callback( elems[ i ], i, arg );
398
+
399
+				if ( value != null ) {
400
+					ret.push( value );
401
+				}
402
+			}
403
+		}
404
+
405
+		// Flatten any nested arrays
406
+		return concat.apply( [], ret );
407
+	},
408
+
409
+	// A global GUID counter for objects
410
+	guid: 1,
411
+
412
+	// Bind a function to a context, optionally partially applying any
413
+	// arguments.
414
+	proxy: function( fn, context ) {
415
+		var tmp, args, proxy;
416
+
417
+		if ( typeof context === "string" ) {
418
+			tmp = fn[ context ];
419
+			context = fn;
420
+			fn = tmp;
421
+		}
422
+
423
+		// Quick check to determine if target is callable, in the spec
424
+		// this throws a TypeError, but we will just return undefined.
425
+		if ( !jQuery.isFunction( fn ) ) {
426
+			return undefined;
427
+		}
428
+
429
+		// Simulated bind
430
+		args = slice.call( arguments, 2 );
431
+		proxy = function() {
432
+			return fn.apply( context || this, args.concat( slice.call( arguments ) ) );
433
+		};
434
+
435
+		// Set the guid of unique handler to the same of original handler, so it can be removed
436
+		proxy.guid = fn.guid = fn.guid || jQuery.guid++;
437
+
438
+		return proxy;
439
+	},
440
+
441
+	now: Date.now,
442
+
443
+	// jQuery.support is not used in Core but other projects attach their
444
+	// properties to it so it needs to exist.
445
+	support: support
446
+} );
447
+
448
+if ( typeof Symbol === "function" ) {
449
+	jQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ];
450
+}
451
+
452
+// Populate the class2type map
453
+jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ),
454
+function( i, name ) {
455
+	class2type[ "[object " + name + "]" ] = name.toLowerCase();
456
+} );
457
+
458
+function isArrayLike( obj ) {
459
+
460
+	// Support: real iOS 8.2 only (not reproducible in simulator)
461
+	// `in` check used to prevent JIT error (gh-2145)
462
+	// hasOwn isn't used here due to false negatives
463
+	// regarding Nodelist length in IE
464
+	var length = !!obj && "length" in obj && obj.length,
465
+		type = jQuery.type( obj );
466
+
467
+	if ( type === "function" || jQuery.isWindow( obj ) ) {
468
+		return false;
469
+	}
470
+
471
+	return type === "array" || length === 0 ||
472
+		typeof length === "number" && length > 0 && ( length - 1 ) in obj;
473
+}
474
+
475
+return jQuery;
476
+} );

Файловите разлики са ограничени, защото са твърде много
+ 10253 - 0
static/bower_components/jquery/dist/jquery.js


Файловите разлики са ограничени, защото са твърде много
+ 4 - 0
static/bower_components/jquery/dist/jquery.min.js


Файловите разлики са ограничени, защото са твърде много
+ 1 - 0
static/bower_components/jquery/dist/jquery.min.map


Файловите разлики са ограничени, защото са твърде много
+ 8160 - 0
static/bower_components/jquery/dist/jquery.slim.js


Файловите разлики са ограничени, защото са твърде много
+ 4 - 0
static/bower_components/jquery/dist/jquery.slim.min.js


Файловите разлики са ограничени, защото са твърде много
+ 1 - 0
static/bower_components/jquery/dist/jquery.slim.min.map


+ 36 - 0
static/bower_components/jquery/external/sizzle/LICENSE.txt

1
+Copyright jQuery Foundation and other contributors, https://jquery.org/
2
+
3
+This software consists of voluntary contributions made by many
4
+individuals. For exact contribution history, see the revision history
5
+available at https://github.com/jquery/sizzle
6
+
7
+The following license applies to all parts of this software except as
8
+documented below:
9
+
10
+====
11
+
12
+Permission is hereby granted, free of charge, to any person obtaining
13
+a copy of this software and associated documentation files (the
14
+"Software"), to deal in the Software without restriction, including
15
+without limitation the rights to use, copy, modify, merge, publish,
16
+distribute, sublicense, and/or sell copies of the Software, and to
17
+permit persons to whom the Software is furnished to do so, subject to
18
+the following conditions:
19
+
20
+The above copyright notice and this permission notice shall be
21
+included in all copies or substantial portions of the Software.
22
+
23
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
24
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
25
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
26
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
27
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
28
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
29
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
30
+
31
+====
32
+
33
+All files located in the node_modules and external directories are
34
+externally maintained libraries used by this software which have their
35
+own licenses; we recommend you read them, as their terms may differ from
36
+the terms above.

Файловите разлики са ограничени, защото са твърде много
+ 2272 - 0
static/bower_components/jquery/external/sizzle/dist/sizzle.js


Файловите разлики са ограничени, защото са твърде много
+ 3 - 0
static/bower_components/jquery/external/sizzle/dist/sizzle.min.js


Файловите разлики са ограничени, защото са твърде много
+ 1 - 0
static/bower_components/jquery/external/sizzle/dist/sizzle.min.map


+ 5 - 0
static/bower_components/jquery/src/.eslintrc.json

1
+{
2
+	"root": true,
3
+
4
+	"extends": "../.eslintrc-browser.json"
5
+}

+ 855 - 0
static/bower_components/jquery/src/ajax.js

1
+define( [
2
+	"./core",
3
+	"./var/document",
4
+	"./var/rnothtmlwhite",
5
+	"./ajax/var/location",
6
+	"./ajax/var/nonce",
7
+	"./ajax/var/rquery",
8
+
9
+	"./core/init",
10
+	"./ajax/parseXML",
11
+	"./event/trigger",
12
+	"./deferred",
13
+	"./serialize" // jQuery.param
14
+], function( jQuery, document, rnothtmlwhite, location, nonce, rquery ) {
15
+
16
+"use strict";
17
+
18
+var
19
+	r20 = /%20/g,
20
+	rhash = /#.*$/,
21
+	rantiCache = /([?&])_=[^&]*/,
22
+	rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg,
23
+
24
+	// #7653, #8125, #8152: local protocol detection
25
+	rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,
26
+	rnoContent = /^(?:GET|HEAD)$/,
27
+	rprotocol = /^\/\//,
28
+
29
+	/* Prefilters
30
+	 * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)
31
+	 * 2) These are called:
32
+	 *    - BEFORE asking for a transport
33
+	 *    - AFTER param serialization (s.data is a string if s.processData is true)
34
+	 * 3) key is the dataType
35
+	 * 4) the catchall symbol "*" can be used
36
+	 * 5) execution will start with transport dataType and THEN continue down to "*" if needed
37
+	 */
38
+	prefilters = {},
39
+
40
+	/* Transports bindings
41
+	 * 1) key is the dataType
42
+	 * 2) the catchall symbol "*" can be used
43
+	 * 3) selection will start with transport dataType and THEN go to "*" if needed
44
+	 */
45
+	transports = {},
46
+
47
+	// Avoid comment-prolog char sequence (#10098); must appease lint and evade compression
48
+	allTypes = "*/".concat( "*" ),
49
+
50
+	// Anchor tag for parsing the document origin
51
+	originAnchor = document.createElement( "a" );
52
+	originAnchor.href = location.href;
53
+
54
+// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport
55
+function addToPrefiltersOrTransports( structure ) {
56
+
57
+	// dataTypeExpression is optional and defaults to "*"
58
+	return function( dataTypeExpression, func ) {
59
+
60
+		if ( typeof dataTypeExpression !== "string" ) {
61
+			func = dataTypeExpression;
62
+			dataTypeExpression = "*";
63
+		}
64
+
65
+		var dataType,
66
+			i = 0,
67
+			dataTypes = dataTypeExpression.toLowerCase().match( rnothtmlwhite ) || [];
68
+
69
+		if ( jQuery.isFunction( func ) ) {
70
+
71
+			// For each dataType in the dataTypeExpression
72
+			while ( ( dataType = dataTypes[ i++ ] ) ) {
73
+
74
+				// Prepend if requested
75
+				if ( dataType[ 0 ] === "+" ) {
76
+					dataType = dataType.slice( 1 ) || "*";
77
+					( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func );
78
+
79
+				// Otherwise append
80
+				} else {
81
+					( structure[ dataType ] = structure[ dataType ] || [] ).push( func );
82
+				}
83
+			}
84
+		}
85
+	};
86
+}
87
+
88
+// Base inspection function for prefilters and transports
89
+function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {
90
+
91
+	var inspected = {},
92
+		seekingTransport = ( structure === transports );
93
+
94
+	function inspect( dataType ) {
95
+		var selected;
96
+		inspected[ dataType ] = true;
97
+		jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {
98
+			var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );
99
+			if ( typeof dataTypeOrTransport === "string" &&
100
+				!seekingTransport && !inspected[ dataTypeOrTransport ] ) {
101
+
102
+				options.dataTypes.unshift( dataTypeOrTransport );
103
+				inspect( dataTypeOrTransport );
104
+				return false;
105
+			} else if ( seekingTransport ) {
106
+				return !( selected = dataTypeOrTransport );
107
+			}
108
+		} );
109
+		return selected;
110
+	}
111
+
112
+	return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" );
113
+}
114
+
115
+// A special extend for ajax options
116
+// that takes "flat" options (not to be deep extended)
117
+// Fixes #9887
118
+function ajaxExtend( target, src ) {
119
+	var key, deep,
120
+		flatOptions = jQuery.ajaxSettings.flatOptions || {};
121
+
122
+	for ( key in src ) {
123
+		if ( src[ key ] !== undefined ) {
124
+			( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];
125
+		}
126
+	}
127
+	if ( deep ) {
128
+		jQuery.extend( true, target, deep );
129
+	}
130
+
131
+	return target;
132
+}
133
+
134
+/* Handles responses to an ajax request:
135
+ * - finds the right dataType (mediates between content-type and expected dataType)
136
+ * - returns the corresponding response
137
+ */
138
+function ajaxHandleResponses( s, jqXHR, responses ) {
139
+
140
+	var ct, type, finalDataType, firstDataType,
141
+		contents = s.contents,
142
+		dataTypes = s.dataTypes;
143
+
144
+	// Remove auto dataType and get content-type in the process
145
+	while ( dataTypes[ 0 ] === "*" ) {
146
+		dataTypes.shift();
147
+		if ( ct === undefined ) {
148
+			ct = s.mimeType || jqXHR.getResponseHeader( "Content-Type" );
149
+		}
150
+	}
151
+
152
+	// Check if we're dealing with a known content-type
153
+	if ( ct ) {
154
+		for ( type in contents ) {
155
+			if ( contents[ type ] && contents[ type ].test( ct ) ) {
156
+				dataTypes.unshift( type );
157
+				break;
158
+			}
159
+		}
160
+	}
161
+
162
+	// Check to see if we have a response for the expected dataType
163
+	if ( dataTypes[ 0 ] in responses ) {
164
+		finalDataType = dataTypes[ 0 ];
165
+	} else {
166
+
167
+		// Try convertible dataTypes
168
+		for ( type in responses ) {
169
+			if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[ 0 ] ] ) {
170
+				finalDataType = type;
171
+				break;
172
+			}
173
+			if ( !firstDataType ) {
174
+				firstDataType = type;
175
+			}
176
+		}
177
+
178
+		// Or just use first one
179
+		finalDataType = finalDataType || firstDataType;
180
+	}
181
+
182
+	// If we found a dataType
183
+	// We add the dataType to the list if needed
184
+	// and return the corresponding response
185
+	if ( finalDataType ) {
186
+		if ( finalDataType !== dataTypes[ 0 ] ) {
187
+			dataTypes.unshift( finalDataType );
188
+		}
189
+		return responses[ finalDataType ];
190
+	}
191
+}
192
+
193
+/* Chain conversions given the request and the original response
194
+ * Also sets the responseXXX fields on the jqXHR instance
195
+ */
196
+function ajaxConvert( s, response, jqXHR, isSuccess ) {
197
+	var conv2, current, conv, tmp, prev,
198
+		converters = {},
199
+
200
+		// Work with a copy of dataTypes in case we need to modify it for conversion
201
+		dataTypes = s.dataTypes.slice();
202
+
203
+	// Create converters map with lowercased keys
204
+	if ( dataTypes[ 1 ] ) {
205
+		for ( conv in s.converters ) {
206
+			converters[ conv.toLowerCase() ] = s.converters[ conv ];
207
+		}
208
+	}
209
+
210
+	current = dataTypes.shift();
211
+
212
+	// Convert to each sequential dataType
213
+	while ( current ) {
214
+
215
+		if ( s.responseFields[ current ] ) {
216
+			jqXHR[ s.responseFields[ current ] ] = response;
217
+		}
218
+
219
+		// Apply the dataFilter if provided
220
+		if ( !prev && isSuccess && s.dataFilter ) {
221
+			response = s.dataFilter( response, s.dataType );
222
+		}
223
+
224
+		prev = current;
225
+		current = dataTypes.shift();
226
+
227
+		if ( current ) {
228
+
229
+			// There's only work to do if current dataType is non-auto
230
+			if ( current === "*" ) {
231
+
232
+				current = prev;
233
+
234
+			// Convert response if prev dataType is non-auto and differs from current
235
+			} else if ( prev !== "*" && prev !== current ) {
236
+
237
+				// Seek a direct converter
238
+				conv = converters[ prev + " " + current ] || converters[ "* " + current ];
239
+
240
+				// If none found, seek a pair
241
+				if ( !conv ) {
242
+					for ( conv2 in converters ) {
243
+
244
+						// If conv2 outputs current
245
+						tmp = conv2.split( " " );
246
+						if ( tmp[ 1 ] === current ) {
247
+
248
+							// If prev can be converted to accepted input
249
+							conv = converters[ prev + " " + tmp[ 0 ] ] ||
250
+								converters[ "* " + tmp[ 0 ] ];
251
+							if ( conv ) {
252
+
253
+								// Condense equivalence converters
254
+								if ( conv === true ) {
255
+									conv = converters[ conv2 ];
256
+
257
+								// Otherwise, insert the intermediate dataType
258
+								} else if ( converters[ conv2 ] !== true ) {
259
+									current = tmp[ 0 ];
260
+									dataTypes.unshift( tmp[ 1 ] );
261
+								}
262
+								break;
263
+							}
264
+						}
265
+					}
266
+				}
267
+
268
+				// Apply converter (if not an equivalence)
269
+				if ( conv !== true ) {
270
+
271
+					// Unless errors are allowed to bubble, catch and return them
272
+					if ( conv && s.throws ) {
273
+						response = conv( response );
274
+					} else {
275
+						try {
276
+							response = conv( response );
277
+						} catch ( e ) {
278
+							return {
279
+								state: "parsererror",
280
+								error: conv ? e : "No conversion from " + prev + " to " + current
281
+							};
282
+						}
283
+					}
284
+				}
285
+			}
286
+		}
287
+	}
288
+
289
+	return { state: "success", data: response };
290
+}
291
+
292
+jQuery.extend( {
293
+
294
+	// Counter for holding the number of active queries
295
+	active: 0,
296
+
297
+	// Last-Modified header cache for next request
298
+	lastModified: {},
299
+	etag: {},
300
+
301
+	ajaxSettings: {
302
+		url: location.href,
303
+		type: "GET",
304
+		isLocal: rlocalProtocol.test( location.protocol ),
305
+		global: true,
306
+		processData: true,
307
+		async: true,
308
+		contentType: "application/x-www-form-urlencoded; charset=UTF-8",
309
+
310
+		/*
311
+		timeout: 0,
312
+		data: null,
313
+		dataType: null,
314
+		username: null,
315
+		password: null,
316
+		cache: null,
317
+		throws: false,
318
+		traditional: false,
319
+		headers: {},
320
+		*/
321
+
322
+		accepts: {
323
+			"*": allTypes,
324
+			text: "text/plain",
325
+			html: "text/html",
326
+			xml: "application/xml, text/xml",
327
+			json: "application/json, text/javascript"
328
+		},
329
+
330
+		contents: {
331
+			xml: /\bxml\b/,
332
+			html: /\bhtml/,
333
+			json: /\bjson\b/
334
+		},
335
+
336
+		responseFields: {
337
+			xml: "responseXML",
338
+			text: "responseText",
339
+			json: "responseJSON"
340
+		},
341
+
342
+		// Data converters
343
+		// Keys separate source (or catchall "*") and destination types with a single space
344
+		converters: {
345
+
346
+			// Convert anything to text
347
+			"* text": String,
348
+
349
+			// Text to html (true = no transformation)
350
+			"text html": true,
351
+
352
+			// Evaluate text as a json expression
353
+			"text json": JSON.parse,
354
+
355
+			// Parse text as xml
356
+			"text xml": jQuery.parseXML
357
+		},
358
+
359
+		// For options that shouldn't be deep extended:
360
+		// you can add your own custom options here if
361
+		// and when you create one that shouldn't be
362
+		// deep extended (see ajaxExtend)
363
+		flatOptions: {
364
+			url: true,
365
+			context: true
366
+		}
367
+	},
368
+
369
+	// Creates a full fledged settings object into target
370
+	// with both ajaxSettings and settings fields.
371
+	// If target is omitted, writes into ajaxSettings.
372
+	ajaxSetup: function( target, settings ) {
373
+		return settings ?
374
+
375
+			// Building a settings object
376
+			ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) :
377
+
378
+			// Extending ajaxSettings
379
+			ajaxExtend( jQuery.ajaxSettings, target );
380
+	},
381
+
382
+	ajaxPrefilter: addToPrefiltersOrTransports( prefilters ),
383
+	ajaxTransport: addToPrefiltersOrTransports( transports ),
384
+
385
+	// Main method
386
+	ajax: function( url, options ) {
387
+
388
+		// If url is an object, simulate pre-1.5 signature
389
+		if ( typeof url === "object" ) {
390
+			options = url;
391
+			url = undefined;
392
+		}
393
+
394
+		// Force options to be an object
395
+		options = options || {};
396
+
397
+		var transport,
398
+
399
+			// URL without anti-cache param
400
+			cacheURL,
401
+
402
+			// Response headers
403
+			responseHeadersString,
404
+			responseHeaders,
405
+
406
+			// timeout handle
407
+			timeoutTimer,
408
+
409
+			// Url cleanup var
410
+			urlAnchor,
411
+
412
+			// Request state (becomes false upon send and true upon completion)
413
+			completed,
414
+
415
+			// To know if global events are to be dispatched
416
+			fireGlobals,
417
+
418
+			// Loop variable
419
+			i,
420
+
421
+			// uncached part of the url
422
+			uncached,
423
+
424
+			// Create the final options object
425
+			s = jQuery.ajaxSetup( {}, options ),
426
+
427
+			// Callbacks context
428
+			callbackContext = s.context || s,
429
+
430
+			// Context for global events is callbackContext if it is a DOM node or jQuery collection
431
+			globalEventContext = s.context &&
432
+				( callbackContext.nodeType || callbackContext.jquery ) ?
433
+					jQuery( callbackContext ) :
434
+					jQuery.event,
435
+
436
+			// Deferreds
437
+			deferred = jQuery.Deferred(),
438
+			completeDeferred = jQuery.Callbacks( "once memory" ),
439
+
440
+			// Status-dependent callbacks
441
+			statusCode = s.statusCode || {},
442
+
443
+			// Headers (they are sent all at once)
444
+			requestHeaders = {},
445
+			requestHeadersNames = {},
446
+
447
+			// Default abort message
448
+			strAbort = "canceled",
449
+
450
+			// Fake xhr
451
+			jqXHR = {
452
+				readyState: 0,
453
+
454
+				// Builds headers hashtable if needed
455
+				getResponseHeader: function( key ) {
456
+					var match;
457
+					if ( completed ) {
458
+						if ( !responseHeaders ) {
459
+							responseHeaders = {};
460
+							while ( ( match = rheaders.exec( responseHeadersString ) ) ) {
461
+								responseHeaders[ match[ 1 ].toLowerCase() ] = match[ 2 ];
462
+							}
463
+						}
464
+						match = responseHeaders[ key.toLowerCase() ];
465
+					}
466
+					return match == null ? null : match;
467
+				},
468
+
469
+				// Raw string
470
+				getAllResponseHeaders: function() {
471
+					return completed ? responseHeadersString : null;
472
+				},
473
+
474
+				// Caches the header
475
+				setRequestHeader: function( name, value ) {
476
+					if ( completed == null ) {
477
+						name = requestHeadersNames[ name.toLowerCase() ] =
478
+							requestHeadersNames[ name.toLowerCase() ] || name;
479
+						requestHeaders[ name ] = value;
480
+					}
481
+					return this;
482
+				},
483
+
484
+				// Overrides response content-type header
485
+				overrideMimeType: function( type ) {
486
+					if ( completed == null ) {
487
+						s.mimeType = type;
488
+					}
489
+					return this;
490
+				},
491
+
492
+				// Status-dependent callbacks
493
+				statusCode: function( map ) {
494
+					var code;
495
+					if ( map ) {
496
+						if ( completed ) {
497
+
498
+							// Execute the appropriate callbacks
499
+							jqXHR.always( map[ jqXHR.status ] );
500
+						} else {
501
+
502
+							// Lazy-add the new callbacks in a way that preserves old ones
503
+							for ( code in map ) {
504
+								statusCode[ code ] = [ statusCode[ code ], map[ code ] ];
505
+							}
506
+						}
507
+					}
508
+					return this;
509
+				},
510
+
511
+				// Cancel the request
512
+				abort: function( statusText ) {
513
+					var finalText = statusText || strAbort;
514
+					if ( transport ) {
515
+						transport.abort( finalText );
516
+					}
517
+					done( 0, finalText );
518
+					return this;
519
+				}
520
+			};
521
+
522
+		// Attach deferreds
523
+		deferred.promise( jqXHR );
524
+
525
+		// Add protocol if not provided (prefilters might expect it)
526
+		// Handle falsy url in the settings object (#10093: consistency with old signature)
527
+		// We also use the url parameter if available
528
+		s.url = ( ( url || s.url || location.href ) + "" )
529
+			.replace( rprotocol, location.protocol + "//" );
530
+
531
+		// Alias method option to type as per ticket #12004
532
+		s.type = options.method || options.type || s.method || s.type;
533
+
534
+		// Extract dataTypes list
535
+		s.dataTypes = ( s.dataType || "*" ).toLowerCase().match( rnothtmlwhite ) || [ "" ];
536
+
537
+		// A cross-domain request is in order when the origin doesn't match the current origin.
538
+		if ( s.crossDomain == null ) {
539
+			urlAnchor = document.createElement( "a" );
540
+
541
+			// Support: IE <=8 - 11, Edge 12 - 13
542
+			// IE throws exception on accessing the href property if url is malformed,
543
+			// e.g. http://example.com:80x/
544
+			try {
545
+				urlAnchor.href = s.url;
546
+
547
+				// Support: IE <=8 - 11 only
548
+				// Anchor's host property isn't correctly set when s.url is relative
549
+				urlAnchor.href = urlAnchor.href;
550
+				s.crossDomain = originAnchor.protocol + "//" + originAnchor.host !==
551
+					urlAnchor.protocol + "//" + urlAnchor.host;
552
+			} catch ( e ) {
553
+
554
+				// If there is an error parsing the URL, assume it is crossDomain,
555
+				// it can be rejected by the transport if it is invalid
556
+				s.crossDomain = true;
557
+			}
558
+		}
559
+
560
+		// Convert data if not already a string
561
+		if ( s.data && s.processData && typeof s.data !== "string" ) {
562
+			s.data = jQuery.param( s.data, s.traditional );
563
+		}
564
+
565
+		// Apply prefilters
566
+		inspectPrefiltersOrTransports( prefilters, s, options, jqXHR );
567
+
568
+		// If request was aborted inside a prefilter, stop there
569
+		if ( completed ) {
570
+			return jqXHR;
571
+		}
572
+
573
+		// We can fire global events as of now if asked to
574
+		// Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118)
575
+		fireGlobals = jQuery.event && s.global;
576
+
577
+		// Watch for a new set of requests
578
+		if ( fireGlobals && jQuery.active++ === 0 ) {
579
+			jQuery.event.trigger( "ajaxStart" );
580
+		}
581
+
582
+		// Uppercase the type
583
+		s.type = s.type.toUpperCase();
584
+
585
+		// Determine if request has content
586
+		s.hasContent = !rnoContent.test( s.type );
587
+
588
+		// Save the URL in case we're toying with the If-Modified-Since
589
+		// and/or If-None-Match header later on
590
+		// Remove hash to simplify url manipulation
591
+		cacheURL = s.url.replace( rhash, "" );
592
+
593
+		// More options handling for requests with no content
594
+		if ( !s.hasContent ) {
595
+
596
+			// Remember the hash so we can put it back
597
+			uncached = s.url.slice( cacheURL.length );
598
+
599
+			// If data is available, append data to url
600
+			if ( s.data ) {
601
+				cacheURL += ( rquery.test( cacheURL ) ? "&" : "?" ) + s.data;
602
+
603
+				// #9682: remove data so that it's not used in an eventual retry
604
+				delete s.data;
605
+			}
606
+
607
+			// Add or update anti-cache param if needed
608
+			if ( s.cache === false ) {
609
+				cacheURL = cacheURL.replace( rantiCache, "$1" );
610
+				uncached = ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ( nonce++ ) + uncached;
611
+			}
612
+
613
+			// Put hash and anti-cache on the URL that will be requested (gh-1732)
614
+			s.url = cacheURL + uncached;
615
+
616
+		// Change '%20' to '+' if this is encoded form body content (gh-2658)
617
+		} else if ( s.data && s.processData &&
618
+			( s.contentType || "" ).indexOf( "application/x-www-form-urlencoded" ) === 0 ) {
619
+			s.data = s.data.replace( r20, "+" );
620
+		}
621
+
622
+		// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
623
+		if ( s.ifModified ) {
624
+			if ( jQuery.lastModified[ cacheURL ] ) {
625
+				jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] );
626
+			}
627
+			if ( jQuery.etag[ cacheURL ] ) {
628
+				jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] );
629
+			}
630
+		}
631
+
632
+		// Set the correct header, if data is being sent
633
+		if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {
634
+			jqXHR.setRequestHeader( "Content-Type", s.contentType );
635
+		}
636
+
637
+		// Set the Accepts header for the server, depending on the dataType
638
+		jqXHR.setRequestHeader(
639
+			"Accept",
640
+			s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ?
641
+				s.accepts[ s.dataTypes[ 0 ] ] +
642
+					( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) :
643
+				s.accepts[ "*" ]
644
+		);
645
+
646
+		// Check for headers option
647
+		for ( i in s.headers ) {
648
+			jqXHR.setRequestHeader( i, s.headers[ i ] );
649
+		}
650
+
651
+		// Allow custom headers/mimetypes and early abort
652
+		if ( s.beforeSend &&
653
+			( s.beforeSend.call( callbackContext, jqXHR, s ) === false || completed ) ) {
654
+
655
+			// Abort if not done already and return
656
+			return jqXHR.abort();
657
+		}
658
+
659
+		// Aborting is no longer a cancellation
660
+		strAbort = "abort";
661
+
662
+		// Install callbacks on deferreds
663
+		completeDeferred.add( s.complete );
664
+		jqXHR.done( s.success );
665
+		jqXHR.fail( s.error );
666
+
667
+		// Get transport
668
+		transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );
669
+
670
+		// If no transport, we auto-abort
671
+		if ( !transport ) {
672
+			done( -1, "No Transport" );
673
+		} else {
674
+			jqXHR.readyState = 1;
675
+
676
+			// Send global event
677
+			if ( fireGlobals ) {
678
+				globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] );
679
+			}
680
+
681
+			// If request was aborted inside ajaxSend, stop there
682
+			if ( completed ) {
683
+				return jqXHR;
684
+			}
685
+
686
+			// Timeout
687
+			if ( s.async && s.timeout > 0 ) {
688
+				timeoutTimer = window.setTimeout( function() {
689
+					jqXHR.abort( "timeout" );
690
+				}, s.timeout );
691
+			}
692
+
693
+			try {
694
+				completed = false;
695
+				transport.send( requestHeaders, done );
696
+			} catch ( e ) {
697
+
698
+				// Rethrow post-completion exceptions
699
+				if ( completed ) {
700
+					throw e;
701
+				}
702
+
703
+				// Propagate others as results
704
+				done( -1, e );
705
+			}
706
+		}
707
+
708
+		// Callback for when everything is done
709
+		function done( status, nativeStatusText, responses, headers ) {
710
+			var isSuccess, success, error, response, modified,
711
+				statusText = nativeStatusText;
712
+
713
+			// Ignore repeat invocations
714
+			if ( completed ) {
715
+				return;
716
+			}
717
+
718
+			completed = true;
719
+
720
+			// Clear timeout if it exists
721
+			if ( timeoutTimer ) {
722
+				window.clearTimeout( timeoutTimer );
723
+			}
724
+
725
+			// Dereference transport for early garbage collection
726
+			// (no matter how long the jqXHR object will be used)
727
+			transport = undefined;
728
+
729
+			// Cache response headers
730
+			responseHeadersString = headers || "";
731
+
732
+			// Set readyState
733
+			jqXHR.readyState = status > 0 ? 4 : 0;
734
+
735
+			// Determine if successful
736
+			isSuccess = status >= 200 && status < 300 || status === 304;
737
+
738
+			// Get response data
739
+			if ( responses ) {
740
+				response = ajaxHandleResponses( s, jqXHR, responses );
741
+			}
742
+
743
+			// Convert no matter what (that way responseXXX fields are always set)
744
+			response = ajaxConvert( s, response, jqXHR, isSuccess );
745
+
746
+			// If successful, handle type chaining
747
+			if ( isSuccess ) {
748
+
749
+				// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
750
+				if ( s.ifModified ) {
751
+					modified = jqXHR.getResponseHeader( "Last-Modified" );
752
+					if ( modified ) {
753
+						jQuery.lastModified[ cacheURL ] = modified;
754
+					}
755
+					modified = jqXHR.getResponseHeader( "etag" );
756
+					if ( modified ) {
757
+						jQuery.etag[ cacheURL ] = modified;
758
+					}
759
+				}
760
+
761
+				// if no content
762
+				if ( status === 204 || s.type === "HEAD" ) {
763
+					statusText = "nocontent";
764
+
765
+				// if not modified
766
+				} else if ( status === 304 ) {
767
+					statusText = "notmodified";
768
+
769
+				// If we have data, let's convert it
770
+				} else {
771
+					statusText = response.state;
772
+					success = response.data;
773
+					error = response.error;
774
+					isSuccess = !error;
775
+				}
776
+			} else {
777
+
778
+				// Extract error from statusText and normalize for non-aborts
779
+				error = statusText;
780
+				if ( status || !statusText ) {
781
+					statusText = "error";
782
+					if ( status < 0 ) {
783
+						status = 0;
784
+					}
785
+				}
786
+			}
787
+
788
+			// Set data for the fake xhr object
789
+			jqXHR.status = status;
790
+			jqXHR.statusText = ( nativeStatusText || statusText ) + "";
791
+
792
+			// Success/Error
793
+			if ( isSuccess ) {
794
+				deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );
795
+			} else {
796
+				deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );
797
+			}
798
+
799
+			// Status-dependent callbacks
800
+			jqXHR.statusCode( statusCode );
801
+			statusCode = undefined;
802
+
803
+			if ( fireGlobals ) {
804
+				globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError",
805
+					[ jqXHR, s, isSuccess ? success : error ] );
806
+			}
807
+
808
+			// Complete
809
+			completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );
810
+
811
+			if ( fireGlobals ) {
812
+				globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] );
813
+
814
+				// Handle the global AJAX counter
815
+				if ( !( --jQuery.active ) ) {
816
+					jQuery.event.trigger( "ajaxStop" );
817
+				}
818
+			}
819
+		}
820
+
821
+		return jqXHR;
822
+	},
823
+
824
+	getJSON: function( url, data, callback ) {
825
+		return jQuery.get( url, data, callback, "json" );
826
+	},
827
+
828
+	getScript: function( url, callback ) {
829
+		return jQuery.get( url, undefined, callback, "script" );
830
+	}
831
+} );
832
+
833
+jQuery.each( [ "get", "post" ], function( i, method ) {
834
+	jQuery[ method ] = function( url, data, callback, type ) {
835
+
836
+		// Shift arguments if data argument was omitted
837
+		if ( jQuery.isFunction( data ) ) {
838
+			type = type || callback;
839
+			callback = data;
840
+			data = undefined;
841
+		}
842
+
843
+		// The url can be an options object (which then must have .url)
844
+		return jQuery.ajax( jQuery.extend( {
845
+			url: url,
846
+			type: method,
847
+			dataType: type,
848
+			data: data,
849
+			success: callback
850
+		}, jQuery.isPlainObject( url ) && url ) );
851
+	};
852
+} );
853
+
854
+return jQuery;
855
+} );

+ 102 - 0
static/bower_components/jquery/src/ajax/jsonp.js

1
+define( [
2
+	"../core",
3
+	"./var/nonce",
4
+	"./var/rquery",
5
+	"../ajax"
6
+], function( jQuery, nonce, rquery ) {
7
+
8
+"use strict";
9
+
10
+var oldCallbacks = [],
11
+	rjsonp = /(=)\?(?=&|$)|\?\?/;
12
+
13
+// Default jsonp settings
14
+jQuery.ajaxSetup( {
15
+	jsonp: "callback",
16
+	jsonpCallback: function() {
17
+		var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( nonce++ ) );
18
+		this[ callback ] = true;
19
+		return callback;
20
+	}
21
+} );
22
+
23
+// Detect, normalize options and install callbacks for jsonp requests
24
+jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {
25
+
26
+	var callbackName, overwritten, responseContainer,
27
+		jsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ?
28
+			"url" :
29
+			typeof s.data === "string" &&
30
+				( s.contentType || "" )
31
+					.indexOf( "application/x-www-form-urlencoded" ) === 0 &&
32
+				rjsonp.test( s.data ) && "data"
33
+		);
34
+
35
+	// Handle iff the expected data type is "jsonp" or we have a parameter to set
36
+	if ( jsonProp || s.dataTypes[ 0 ] === "jsonp" ) {
37
+
38
+		// Get callback name, remembering preexisting value associated with it
39
+		callbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ?
40
+			s.jsonpCallback() :
41
+			s.jsonpCallback;
42
+
43
+		// Insert callback into url or form data
44
+		if ( jsonProp ) {
45
+			s[ jsonProp ] = s[ jsonProp ].replace( rjsonp, "$1" + callbackName );
46
+		} else if ( s.jsonp !== false ) {
47
+			s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName;
48
+		}
49
+
50
+		// Use data converter to retrieve json after script execution
51
+		s.converters[ "script json" ] = function() {
52
+			if ( !responseContainer ) {
53
+				jQuery.error( callbackName + " was not called" );
54
+			}
55
+			return responseContainer[ 0 ];
56
+		};
57
+
58
+		// Force json dataType
59
+		s.dataTypes[ 0 ] = "json";
60
+
61
+		// Install callback
62
+		overwritten = window[ callbackName ];
63
+		window[ callbackName ] = function() {
64
+			responseContainer = arguments;
65
+		};
66
+
67
+		// Clean-up function (fires after converters)
68
+		jqXHR.always( function() {
69
+
70
+			// If previous value didn't exist - remove it
71
+			if ( overwritten === undefined ) {
72
+				jQuery( window ).removeProp( callbackName );
73
+
74
+			// Otherwise restore preexisting value
75
+			} else {
76
+				window[ callbackName ] = overwritten;
77
+			}
78
+
79
+			// Save back as free
80
+			if ( s[ callbackName ] ) {
81
+
82
+				// Make sure that re-using the options doesn't screw things around
83
+				s.jsonpCallback = originalSettings.jsonpCallback;
84
+
85
+				// Save the callback name for future use
86
+				oldCallbacks.push( callbackName );
87
+			}
88
+
89
+			// Call if it was a function and we have a response
90
+			if ( responseContainer && jQuery.isFunction( overwritten ) ) {
91
+				overwritten( responseContainer[ 0 ] );
92
+			}
93
+
94
+			responseContainer = overwritten = undefined;
95
+		} );
96
+
97
+		// Delegate to script
98
+		return "script";
99
+	}
100
+} );
101
+
102
+} );

+ 76 - 0
static/bower_components/jquery/src/ajax/load.js

1
+define( [
2
+	"../core",
3
+	"../core/stripAndCollapse",
4
+	"../core/parseHTML",
5
+	"../ajax",
6
+	"../traversing",
7
+	"../manipulation",
8
+	"../selector"
9
+], function( jQuery, stripAndCollapse ) {
10
+
11
+"use strict";
12
+
13
+/**
14
+ * Load a url into a page
15
+ */
16
+jQuery.fn.load = function( url, params, callback ) {
17
+	var selector, type, response,
18
+		self = this,
19
+		off = url.indexOf( " " );
20
+
21
+	if ( off > -1 ) {
22
+		selector = stripAndCollapse( url.slice( off ) );
23
+		url = url.slice( 0, off );
24
+	}
25
+
26
+	// If it's a function
27
+	if ( jQuery.isFunction( params ) ) {
28
+
29
+		// We assume that it's the callback
30
+		callback = params;
31
+		params = undefined;
32
+
33
+	// Otherwise, build a param string
34
+	} else if ( params && typeof params === "object" ) {
35
+		type = "POST";
36
+	}
37
+
38
+	// If we have elements to modify, make the request
39
+	if ( self.length > 0 ) {
40
+		jQuery.ajax( {
41
+			url: url,
42
+
43
+			// If "type" variable is undefined, then "GET" method will be used.
44
+			// Make value of this field explicit since
45
+			// user can override it through ajaxSetup method
46
+			type: type || "GET",
47
+			dataType: "html",
48
+			data: params
49
+		} ).done( function( responseText ) {
50
+
51
+			// Save response for use in complete callback
52
+			response = arguments;
53
+
54
+			self.html( selector ?
55
+
56
+				// If a selector was specified, locate the right elements in a dummy div
57
+				// Exclude scripts to avoid IE 'Permission Denied' errors
58
+				jQuery( "<div>" ).append( jQuery.parseHTML( responseText ) ).find( selector ) :
59
+
60
+				// Otherwise use the full result
61
+				responseText );
62
+
63
+		// If the request succeeds, this function gets "data", "status", "jqXHR"
64
+		// but they are ignored because response was set above.
65
+		// If it fails, this function gets "jqXHR", "status", "error"
66
+		} ).always( callback && function( jqXHR, status ) {
67
+			self.each( function() {
68
+				callback.apply( this, response || [ jqXHR.responseText, status, jqXHR ] );
69
+			} );
70
+		} );
71
+	}
72
+
73
+	return this;
74
+};
75
+
76
+} );

+ 30 - 0
static/bower_components/jquery/src/ajax/parseXML.js

1
+define( [
2
+	"../core"
3
+], function( jQuery ) {
4
+
5
+"use strict";
6
+
7
+// Cross-browser xml parsing
8
+jQuery.parseXML = function( data ) {
9
+	var xml;
10
+	if ( !data || typeof data !== "string" ) {
11
+		return null;
12
+	}
13
+
14
+	// Support: IE 9 - 11 only
15
+	// IE throws on parseFromString with invalid input.
16
+	try {
17
+		xml = ( new window.DOMParser() ).parseFromString( data, "text/xml" );
18
+	} catch ( e ) {
19
+		xml = undefined;
20
+	}
21
+
22
+	if ( !xml || xml.getElementsByTagName( "parsererror" ).length ) {
23
+		jQuery.error( "Invalid XML: " + data );
24
+	}
25
+	return xml;
26
+};
27
+
28
+return jQuery.parseXML;
29
+
30
+} );

+ 77 - 0
static/bower_components/jquery/src/ajax/script.js

1
+define( [
2
+	"../core",
3
+	"../var/document",
4
+	"../ajax"
5
+], function( jQuery, document ) {
6
+
7
+"use strict";
8
+
9
+// Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432)
10
+jQuery.ajaxPrefilter( function( s ) {
11
+	if ( s.crossDomain ) {
12
+		s.contents.script = false;
13
+	}
14
+} );
15
+
16
+// Install script dataType
17
+jQuery.ajaxSetup( {
18
+	accepts: {
19
+		script: "text/javascript, application/javascript, " +
20
+			"application/ecmascript, application/x-ecmascript"
21
+	},
22
+	contents: {
23
+		script: /\b(?:java|ecma)script\b/
24
+	},
25
+	converters: {
26
+		"text script": function( text ) {
27
+			jQuery.globalEval( text );
28
+			return text;
29
+		}
30
+	}
31
+} );
32
+
33
+// Handle cache's special case and crossDomain
34
+jQuery.ajaxPrefilter( "script", function( s ) {
35
+	if ( s.cache === undefined ) {
36
+		s.cache = false;
37
+	}
38
+	if ( s.crossDomain ) {
39
+		s.type = "GET";
40
+	}
41
+} );
42
+
43
+// Bind script tag hack transport
44
+jQuery.ajaxTransport( "script", function( s ) {
45
+
46
+	// This transport only deals with cross domain requests
47
+	if ( s.crossDomain ) {
48
+		var script, callback;
49
+		return {
50
+			send: function( _, complete ) {
51
+				script = jQuery( "<script>" ).prop( {
52
+					charset: s.scriptCharset,
53
+					src: s.url
54
+				} ).on(
55
+					"load error",
56
+					callback = function( evt ) {
57
+						script.remove();
58
+						callback = null;
59
+						if ( evt ) {
60
+							complete( evt.type === "error" ? 404 : 200, evt.type );
61
+						}
62
+					}
63
+				);
64
+
65
+				// Use native DOM manipulation to avoid our domManip AJAX trickery
66
+				document.head.appendChild( script[ 0 ] );
67
+			},
68
+			abort: function() {
69
+				if ( callback ) {
70
+					callback();
71
+				}
72
+			}
73
+		};
74
+	}
75
+} );
76
+
77
+} );

+ 5 - 0
static/bower_components/jquery/src/ajax/var/location.js

1
+define( function() {
2
+	"use strict";
3
+
4
+	return window.location;
5
+} );

+ 0 - 0
static/bower_components/jquery/src/ajax/var/nonce.js


Някои файлове не бяха показани, защото твърде много файлове са промени

tum/whitesports - Gogs: Simplico Git Service

Geen omschrijving

update.php 12KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365
  1. <?php
  2. /**
  3. * Update/Install Plugin/Theme administration panel.
  4. *
  5. * @package WordPress
  6. * @subpackage Administration
  7. */
  8. if ( ! defined( 'IFRAME_REQUEST' )
  9. && isset( $_GET['action'] ) && in_array( $_GET['action'], array( 'update-selected', 'activate-plugin', 'update-selected-themes' ), true )
  10. ) {
  11. define( 'IFRAME_REQUEST', true );
  12. }
  13. /** WordPress Administration Bootstrap */
  14. require_once __DIR__ . '/admin.php';
  15. require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
  16. wp_enqueue_script( 'wp-a11y' );
  17. if ( isset( $_GET['action'] ) ) {
  18. $plugin = isset( $_REQUEST['plugin'] ) ? trim( $_REQUEST['plugin'] ) : '';
  19. $theme = isset( $_REQUEST['theme'] ) ? urldecode( $_REQUEST['theme'] ) : '';
  20. $action = isset( $_REQUEST['action'] ) ? $_REQUEST['action'] : '';
  21. if ( 'update-selected' === $action ) {
  22. if ( ! current_user_can( 'update_plugins' ) ) {
  23. wp_die( __( 'Sorry, you are not allowed to update plugins for this site.' ) );
  24. }
  25. check_admin_referer( 'bulk-update-plugins' );
  26. if ( isset( $_GET['plugins'] ) ) {
  27. $plugins = explode( ',', stripslashes( $_GET['plugins'] ) );
  28. } elseif ( isset( $_POST['checked'] ) ) {
  29. $plugins = (array) $_POST['checked'];
  30. } else {
  31. $plugins = array();
  32. }
  33. $plugins = array_map( 'urldecode', $plugins );
  34. $url = 'update.php?action=update-selected&amp;plugins=' . urlencode( implode( ',', $plugins ) );
  35. $nonce = 'bulk-update-plugins';
  36. wp_enqueue_script( 'updates' );
  37. iframe_header();
  38. $upgrader = new Plugin_Upgrader( new Bulk_Plugin_Upgrader_Skin( compact( 'nonce', 'url' ) ) );
  39. $upgrader->bulk_upgrade( $plugins );
  40. iframe_footer();
  41. } elseif ( 'upgrade-plugin' === $action ) {
  42. if ( ! current_user_can( 'update_plugins' ) ) {
  43. wp_die( __( 'Sorry, you are not allowed to update plugins for this site.' ) );
  44. }
  45. check_admin_referer( 'upgrade-plugin_' . $plugin );
  46. // Used in the HTML title tag.
  47. $title = __( 'Update Plugin' );
  48. $parent_file = 'plugins.php';
  49. $submenu_file = 'plugins.php';
  50. wp_enqueue_script( 'updates' );
  51. require_once ABSPATH . 'wp-admin/admin-header.php';
  52. $nonce = 'upgrade-plugin_' . $plugin;
  53. $url = 'update.php?action=upgrade-plugin&plugin=' . urlencode( $plugin );
  54. $upgrader = new Plugin_Upgrader( new Plugin_Upgrader_Skin( compact( 'title', 'nonce', 'url', 'plugin' ) ) );
  55. $upgrader->upgrade( $plugin );
  56. require_once ABSPATH . 'wp-admin/admin-footer.php';
  57. } elseif ( 'activate-plugin' === $action ) {
  58. if ( ! current_user_can( 'update_plugins' ) ) {
  59. wp_die( __( 'Sorry, you are not allowed to update plugins for this site.' ) );
  60. }
  61. check_admin_referer( 'activate-plugin_' . $plugin );
  62. if ( ! isset( $_GET['failure'] ) && ! isset( $_GET['success'] ) ) {
  63. wp_redirect( admin_url( 'update.php?action=activate-plugin&failure=true&plugin=' . urlencode( $plugin ) . '&_wpnonce=' . $_GET['_wpnonce'] ) );
  64. activate_plugin( $plugin, '', ! empty( $_GET['networkwide'] ), true );
  65. wp_redirect( admin_url( 'update.php?action=activate-plugin&success=true&plugin=' . urlencode( $plugin ) . '&_wpnonce=' . $_GET['_wpnonce'] ) );
  66. die();
  67. }
  68. iframe_header( __( 'Plugin Reactivation' ), true );
  69. if ( isset( $_GET['success'] ) ) {
  70. echo '<p>' . __( 'Plugin reactivated successfully.' ) . '</p>';
  71. }
  72. if ( isset( $_GET['failure'] ) ) {
  73. echo '<p>' . __( 'Plugin failed to reactivate due to a fatal error.' ) . '</p>';
  74. error_reporting( E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING | E_RECOVERABLE_ERROR );
  75. ini_set( 'display_errors', true ); // Ensure that fatal errors are displayed.
  76. wp_register_plugin_realpath( WP_PLUGIN_DIR . '/' . $plugin );
  77. include WP_PLUGIN_DIR . '/' . $plugin;
  78. }
  79. iframe_footer();
  80. } elseif ( 'install-plugin' === $action ) {
  81. if ( ! current_user_can( 'install_plugins' ) ) {
  82. wp_die( __( 'Sorry, you are not allowed to install plugins on this site.' ) );
  83. }
  84. include_once ABSPATH . 'wp-admin/includes/plugin-install.php'; // For plugins_api().
  85. check_admin_referer( 'install-plugin_' . $plugin );
  86. $api = plugins_api(
  87. 'plugin_information',
  88. array(
  89. 'slug' => $plugin,
  90. 'fields' => array(
  91. 'sections' => false,
  92. ),
  93. )
  94. );
  95. if ( is_wp_error( $api ) ) {
  96. wp_die( $api );
  97. }
  98. // Used in the HTML title tag.
  99. $title = __( 'Plugin Installation' );
  100. $parent_file = 'plugins.php';
  101. $submenu_file = 'plugin-install.php';
  102. require_once ABSPATH . 'wp-admin/admin-header.php';
  103. /* translators: %s: Plugin name and version. */
  104. $title = sprintf( __( 'Installing Plugin: %s' ), $api->name . ' ' . $api->version );
  105. $nonce = 'install-plugin_' . $plugin;
  106. $url = 'update.php?action=install-plugin&plugin=' . urlencode( $plugin );
  107. if ( isset( $_GET['from'] ) ) {
  108. $url .= '&from=' . urlencode( stripslashes( $_GET['from'] ) );
  109. }
  110. $type = 'web'; // Install plugin type, From Web or an Upload.
  111. $upgrader = new Plugin_Upgrader( new Plugin_Installer_Skin( compact( 'title', 'url', 'nonce', 'plugin', 'api' ) ) );
  112. $upgrader->install( $api->download_link );
  113. require_once ABSPATH . 'wp-admin/admin-footer.php';
  114. } elseif ( 'upload-plugin' === $action ) {
  115. if ( ! current_user_can( 'upload_plugins' ) ) {
  116. wp_die( __( 'Sorry, you are not allowed to install plugins on this site.' ) );
  117. }
  118. check_admin_referer( 'plugin-upload' );
  119. $file_upload = new File_Upload_Upgrader( 'pluginzip', 'package' );
  120. // Used in the HTML title tag.
  121. $title = __( 'Upload Plugin' );
  122. $parent_file = 'plugins.php';
  123. $submenu_file = 'plugin-install.php';
  124. require_once ABSPATH . 'wp-admin/admin-header.php';
  125. /* translators: %s: File name. */
  126. $title = sprintf( __( 'Installing plugin from uploaded file: %s' ), esc_html( basename( $file_upload->filename ) ) );
  127. $nonce = 'plugin-upload';
  128. $url = add_query_arg( array( 'package' => $file_upload->id ), 'update.php?action=upload-plugin' );
  129. $type = 'upload'; // Install plugin type, From Web or an Upload.
  130. $overwrite = isset( $_GET['overwrite'] ) ? sanitize_text_field( $_GET['overwrite'] ) : '';
  131. $overwrite = in_array( $overwrite, array( 'update-plugin', 'downgrade-plugin' ), true ) ? $overwrite : '';
  132. $upgrader = new Plugin_Upgrader( new Plugin_Installer_Skin( compact( 'type', 'title', 'nonce', 'url', 'overwrite' ) ) );
  133. $result = $upgrader->install( $file_upload->package, array( 'overwrite_package' => $overwrite ) );
  134. if ( $result || is_wp_error( $result ) ) {
  135. $file_upload->cleanup();
  136. }
  137. require_once ABSPATH . 'wp-admin/admin-footer.php';
  138. } elseif ( 'upload-plugin-cancel-overwrite' === $action ) {
  139. if ( ! current_user_can( 'upload_plugins' ) ) {
  140. wp_die( __( 'Sorry, you are not allowed to install plugins on this site.' ) );
  141. }
  142. check_admin_referer( 'plugin-upload-cancel-overwrite' );
  143. // Make sure the attachment still exists, or File_Upload_Upgrader will call wp_die()
  144. // that shows a generic "Please select a file" error.
  145. if ( ! empty( $_GET['package'] ) ) {
  146. $attachment_id = (int) $_GET['package'];
  147. if ( get_post( $attachment_id ) ) {
  148. $file_upload = new File_Upload_Upgrader( 'pluginzip', 'package' );
  149. $file_upload->cleanup();
  150. }
  151. }
  152. wp_redirect( self_admin_url( 'plugin-install.php' ) );
  153. exit;
  154. } elseif ( 'upgrade-theme' === $action ) {
  155. if ( ! current_user_can( 'update_themes' ) ) {
  156. wp_die( __( 'Sorry, you are not allowed to update themes for this site.' ) );
  157. }
  158. check_admin_referer( 'upgrade-theme_' . $theme );
  159. wp_enqueue_script( 'updates' );
  160. // Used in the HTML title tag.
  161. $title = __( 'Update Theme' );
  162. $parent_file = 'themes.php';
  163. $submenu_file = 'themes.php';
  164. require_once ABSPATH . 'wp-admin/admin-header.php';
  165. $nonce = 'upgrade-theme_' . $theme;
  166. $url = 'update.php?action=upgrade-theme&theme=' . urlencode( $theme );
  167. $upgrader = new Theme_Upgrader( new Theme_Upgrader_Skin( compact( 'title', 'nonce', 'url', 'theme' ) ) );
  168. $upgrader->upgrade( $theme );
  169. require_once ABSPATH . 'wp-admin/admin-footer.php';
  170. } elseif ( 'update-selected-themes' === $action ) {
  171. if ( ! current_user_can( 'update_themes' ) ) {
  172. wp_die( __( 'Sorry, you are not allowed to update themes for this site.' ) );
  173. }
  174. check_admin_referer( 'bulk-update-themes' );
  175. if ( isset( $_GET['themes'] ) ) {
  176. $themes = explode( ',', stripslashes( $_GET['themes'] ) );
  177. } elseif ( isset( $_POST['checked'] ) ) {
  178. $themes = (array) $_POST['checked'];
  179. } else {
  180. $themes = array();
  181. }
  182. $themes = array_map( 'urldecode', $themes );
  183. $url = 'update.php?action=update-selected-themes&amp;themes=' . urlencode( implode( ',', $themes ) );
  184. $nonce = 'bulk-update-themes';
  185. wp_enqueue_script( 'updates' );
  186. iframe_header();
  187. $upgrader = new Theme_Upgrader( new Bulk_Theme_Upgrader_Skin( compact( 'nonce', 'url' ) ) );
  188. $upgrader->bulk_upgrade( $themes );
  189. iframe_footer();
  190. } elseif ( 'install-theme' === $action ) {
  191. if ( ! current_user_can( 'install_themes' ) ) {
  192. wp_die( __( 'Sorry, you are not allowed to install themes on this site.' ) );
  193. }
  194. include_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php'; // For themes_api().
  195. check_admin_referer( 'install-theme_' . $theme );
  196. $api = themes_api(
  197. 'theme_information',
  198. array(
  199. 'slug' => $theme,
  200. 'fields' => array(
  201. 'sections' => false,
  202. 'tags' => false,
  203. ),
  204. )
  205. ); // Save on a bit of bandwidth.
  206. if ( is_wp_error( $api ) ) {
  207. wp_die( $api );
  208. }
  209. // Used in the HTML title tag.
  210. $title = __( 'Install Themes' );
  211. $parent_file = 'themes.php';
  212. $submenu_file = 'themes.php';
  213. require_once ABSPATH . 'wp-admin/admin-header.php';
  214. /* translators: %s: Theme name and version. */
  215. $title = sprintf( __( 'Installing Theme: %s' ), $api->name . ' ' . $api->version );
  216. $nonce = 'install-theme_' . $theme;
  217. $url = 'update.php?action=install-theme&theme=' . urlencode( $theme );
  218. $type = 'web'; // Install theme type, From Web or an Upload.
  219. $upgrader = new Theme_Upgrader( new Theme_Installer_Skin( compact( 'title', 'url', 'nonce', 'plugin', 'api' ) ) );
  220. $upgrader->install( $api->download_link );
  221. require_once ABSPATH . 'wp-admin/admin-footer.php';
  222. } elseif ( 'upload-theme' === $action ) {
  223. if ( ! current_user_can( 'upload_themes' ) ) {
  224. wp_die( __( 'Sorry, you are not allowed to install themes on this site.' ) );
  225. }
  226. check_admin_referer( 'theme-upload' );
  227. $file_upload = new File_Upload_Upgrader( 'themezip', 'package' );
  228. // Used in the HTML title tag.
  229. $title = __( 'Upload Theme' );
  230. $parent_file = 'themes.php';
  231. $submenu_file = 'theme-install.php';
  232. require_once ABSPATH . 'wp-admin/admin-header.php';
  233. /* translators: %s: File name. */
  234. $title = sprintf( __( 'Installing theme from uploaded file: %s' ), esc_html( basename( $file_upload->filename ) ) );
  235. $nonce = 'theme-upload';
  236. $url = add_query_arg( array( 'package' => $file_upload->id ), 'update.php?action=upload-theme' );
  237. $type = 'upload'; // Install theme type, From Web or an Upload.
  238. $overwrite = isset( $_GET['overwrite'] ) ? sanitize_text_field( $_GET['overwrite'] ) : '';
  239. $overwrite = in_array( $overwrite, array( 'update-theme', 'downgrade-theme' ), true ) ? $overwrite : '';
  240. $upgrader = new Theme_Upgrader( new Theme_Installer_Skin( compact( 'type', 'title', 'nonce', 'url', 'overwrite' ) ) );
  241. $result = $upgrader->install( $file_upload->package, array( 'overwrite_package' => $overwrite ) );
  242. if ( $result || is_wp_error( $result ) ) {
  243. $file_upload->cleanup();
  244. }
  245. require_once ABSPATH . 'wp-admin/admin-footer.php';
  246. } elseif ( 'upload-theme-cancel-overwrite' === $action ) {
  247. if ( ! current_user_can( 'upload_themes' ) ) {
  248. wp_die( __( 'Sorry, you are not allowed to install themes on this site.' ) );
  249. }
  250. check_admin_referer( 'theme-upload-cancel-overwrite' );
  251. // Make sure the attachment still exists, or File_Upload_Upgrader will call wp_die()
  252. // that shows a generic "Please select a file" error.
  253. if ( ! empty( $_GET['package'] ) ) {
  254. $attachment_id = (int) $_GET['package'];
  255. if ( get_post( $attachment_id ) ) {
  256. $file_upload = new File_Upload_Upgrader( 'themezip', 'package' );
  257. $file_upload->cleanup();
  258. }
  259. }
  260. wp_redirect( self_admin_url( 'theme-install.php' ) );
  261. exit;
  262. } else {
  263. /**
  264. * Fires when a custom plugin or theme update request is received.
  265. *
  266. * The dynamic portion of the hook name, `$action`, refers to the action
  267. * provided in the request for wp-admin/update.php. Can be used to
  268. * provide custom update functionality for themes and plugins.
  269. *
  270. * @since 2.8.0
  271. */
  272. do_action( "update-custom_{$action}" ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
  273. }
  274. }