Version Description
- Fix: Invalid arguments passed in class-folders.php
Download this release
Release Info
Developer | dfactory |
Plugin | Responsive Lightbox & Gallery |
Version | 2.2.1 |
Comparing to | |
See all releases |
Code changes from version 2.2.0 to 2.2.1
- assets/imagelightbox/css/imagelightbox.css +0 -8
- assets/imagelightbox/imagelightbox.css +6 -0
- assets/imagelightbox/imagelightbox.js +315 -0
- assets/imagelightbox/imagelightbox.min.css +1 -0
- assets/imagelightbox/imagelightbox.min.js +6 -0
- assets/imagelightbox/js/imagelightbox.min.js +0 -6
- assets/prettyphoto/css/prettyPhoto.css +0 -170
- assets/prettyphoto/jquery.prettyPhoto.js +982 -0
- assets/prettyphoto/jquery.prettyPhoto.min.js +1 -0
- assets/prettyphoto/js/jquery.prettyPhoto.js +0 -7
- assets/prettyphoto/prettyPhoto.css +796 -0
- assets/prettyphoto/prettyPhoto.min.css +1 -0
- assets/select2/css/select2.min.css +0 -1
- assets/select2/{js/i18n → i18n}/af.js +2 -2
- assets/select2/{js/i18n → i18n}/ar.js +2 -2
- assets/select2/{js/i18n → i18n}/az.js +2 -2
- assets/select2/{js/i18n → i18n}/bg.js +2 -2
- assets/select2/{js/i18n → i18n}/bs.js +2 -2
- assets/select2/{js/i18n → i18n}/ca.js +2 -2
- assets/select2/{js/i18n → i18n}/cs.js +2 -2
- assets/select2/{js/i18n → i18n}/da.js +2 -2
- assets/select2/{js/i18n → i18n}/de.js +2 -2
- assets/select2/{js/i18n → i18n}/dsb.js +2 -2
- assets/select2/{js/i18n → i18n}/el.js +2 -2
- assets/select2/{js/i18n → i18n}/en.js +2 -2
- assets/select2/{js/i18n → i18n}/es.js +2 -2
- assets/select2/{js/i18n → i18n}/et.js +2 -2
- assets/select2/{js/i18n → i18n}/eu.js +2 -2
- assets/select2/{js/i18n → i18n}/fa.js +2 -2
- assets/select2/{js/i18n → i18n}/fi.js +2 -2
- assets/select2/{js/i18n → i18n}/fr.js +3 -3
- assets/select2/{js/i18n → i18n}/gl.js +2 -2
- assets/select2/{js/i18n → i18n}/he.js +2 -2
- assets/select2/{js/i18n → i18n}/hi.js +2 -2
- assets/select2/{js/i18n → i18n}/hr.js +2 -2
- assets/select2/{js/i18n → i18n}/hsb.js +2 -2
- assets/select2/{js/i18n → i18n}/hu.js +2 -2
- assets/select2/{js/i18n → i18n}/hy.js +2 -2
- assets/select2/{js/i18n → i18n}/id.js +2 -2
- assets/select2/{js/i18n → i18n}/is.js +2 -2
- assets/select2/{js/i18n → i18n}/it.js +2 -2
- assets/select2/{js/i18n → i18n}/ja.js +2 -2
- assets/select2/{js/i18n → i18n}/km.js +2 -2
- assets/select2/{js/i18n → i18n}/ko.js +2 -2
- assets/select2/{js/i18n → i18n}/lt.js +2 -2
- assets/select2/{js/i18n → i18n}/lv.js +2 -2
- assets/select2/{js/i18n → i18n}/mk.js +2 -2
- assets/select2/{js/i18n → i18n}/ms.js +2 -2
- assets/select2/i18n/nb.js +3 -0
- assets/select2/{js/i18n → i18n}/nl.js +2 -2
- assets/select2/{js/i18n → i18n}/pl.js +2 -2
- assets/select2/{js/i18n → i18n}/ps.js +2 -2
- assets/select2/{js/i18n → i18n}/pt-BR.js +2 -2
- assets/select2/{js/i18n → i18n}/pt.js +2 -2
- assets/select2/{js/i18n → i18n}/ro.js +2 -2
- assets/select2/{js/i18n → i18n}/ru.js +2 -2
- assets/select2/{js/i18n → i18n}/sk.js +2 -2
- assets/select2/{js/i18n → i18n}/sl.js +2 -2
- assets/select2/{js/i18n → i18n}/sr-Cyrl.js +2 -2
- assets/select2/{js/i18n → i18n}/sr.js +2 -2
- assets/select2/{js/i18n → i18n}/sv.js +2 -2
- assets/select2/{js/i18n → i18n}/th.js +2 -2
- assets/select2/i18n/tk.js +3 -0
- assets/select2/{js/i18n → i18n}/tr.js +2 -2
- assets/select2/{js/i18n → i18n}/uk.js +2 -2
- assets/select2/{js/i18n → i18n}/vi.js +2 -2
- assets/select2/{js/i18n → i18n}/zh-CN.js +2 -2
- assets/select2/{js/i18n → i18n}/zh-TW.js +2 -2
- assets/select2/js/i18n/nb.js +0 -3
- assets/select2/js/select2.min.js +0 -1
- assets/select2/{css/select2.css → select2.css} +484 -500
- assets/select2/{js/select2.js → select2.full.js} +6559 -5833
- assets/select2/select2.full.min.js +1 -0
- assets/select2/select2.min.css +1 -0
- assets/swipebox/jquery.swipebox.js +958 -0
- assets/swipebox/jquery.swipebox.min.js +2 -0
- assets/swipebox/swipebox.css +295 -0
- assets/swipebox/swipebox.min.css +1 -0
- assets/tosrus/css/jquery.tosrus.all.css +0 -605
- assets/tosrus/css/jquery.tosrus.all.min.css +0 -1
- assets/tosrus/hammer.js +2643 -0
- assets/tosrus/hammer.min.js +7 -0
- assets/tosrus/jquery.tosrus.css +600 -0
- assets/tosrus/jquery.tosrus.js +619 -0
- assets/tosrus/jquery.tosrus.min.css +1 -0
- assets/tosrus/jquery.tosrus.min.js +34 -0
assets/imagelightbox/css/imagelightbox.css
DELETED
@@ -1,8 +0,0 @@
|
|
1 |
-
#imagelightbox
|
2 |
-
{
|
3 |
-
position: fixed;
|
4 |
-
z-index: 9999;
|
5 |
-
|
6 |
-
-ms-touch-action: none;
|
7 |
-
touch-action: none;
|
8 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/imagelightbox/imagelightbox.css
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#imagelightbox {
|
2 |
+
position: fixed;
|
3 |
+
z-index: 9999;
|
4 |
+
-ms-touch-action: none;
|
5 |
+
touch-action: none;
|
6 |
+
}
|
assets/imagelightbox/imagelightbox.js
ADDED
@@ -0,0 +1,315 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
/*
|
3 |
+
By Osvaldas Valutis, www.osvaldas.info
|
4 |
+
Available for use under the MIT License
|
5 |
+
*/
|
6 |
+
|
7 |
+
;( function( $, window, document, undefined )
|
8 |
+
{
|
9 |
+
'use strict';
|
10 |
+
|
11 |
+
var cssTransitionSupport = function()
|
12 |
+
{
|
13 |
+
var s = document.body || document.documentElement, s = s.style;
|
14 |
+
if( s.WebkitTransition == '' ) return '-webkit-';
|
15 |
+
if( s.MozTransition == '' ) return '-moz-';
|
16 |
+
if( s.OTransition == '' ) return '-o-';
|
17 |
+
if( s.transition == '' ) return '';
|
18 |
+
return false;
|
19 |
+
},
|
20 |
+
|
21 |
+
isCssTransitionSupport = cssTransitionSupport() === false ? false : true,
|
22 |
+
|
23 |
+
cssTransitionTranslateX = function( element, positionX, speed )
|
24 |
+
{
|
25 |
+
var options = {}, prefix = cssTransitionSupport();
|
26 |
+
options[ prefix + 'transform' ] = 'translateX(' + positionX + ')';
|
27 |
+
options[ prefix + 'transition' ] = prefix + 'transform ' + speed + 's linear';
|
28 |
+
element.css( options );
|
29 |
+
},
|
30 |
+
|
31 |
+
hasTouch = ( 'ontouchstart' in window ),
|
32 |
+
hasPointers = window.navigator.pointerEnabled || window.navigator.msPointerEnabled,
|
33 |
+
wasTouched = function( event )
|
34 |
+
{
|
35 |
+
if( hasTouch )
|
36 |
+
return true;
|
37 |
+
|
38 |
+
if( !hasPointers || typeof event === 'undefined' || typeof event.pointerType === 'undefined' )
|
39 |
+
return false;
|
40 |
+
|
41 |
+
if( typeof event.MSPOINTER_TYPE_MOUSE !== 'undefined' )
|
42 |
+
{
|
43 |
+
if( event.MSPOINTER_TYPE_MOUSE != event.pointerType )
|
44 |
+
return true;
|
45 |
+
}
|
46 |
+
else
|
47 |
+
if( event.pointerType != 'mouse' )
|
48 |
+
return true;
|
49 |
+
|
50 |
+
return false;
|
51 |
+
};
|
52 |
+
|
53 |
+
$.fn.imageLightbox = function( options )
|
54 |
+
{
|
55 |
+
var options = $.extend(
|
56 |
+
{
|
57 |
+
selector: 'id="imagelightbox"',
|
58 |
+
animationSpeed: 250,
|
59 |
+
preloadNext: true,
|
60 |
+
enableKeyboard: true,
|
61 |
+
quitOnEnd: false,
|
62 |
+
quitOnImgClick: false,
|
63 |
+
quitOnDocClick: true,
|
64 |
+
onStart: false,
|
65 |
+
onEnd: false,
|
66 |
+
onLoadStart: false,
|
67 |
+
onLoadEnd: false
|
68 |
+
},
|
69 |
+
options ),
|
70 |
+
|
71 |
+
targets = $([]),
|
72 |
+
target = $(),
|
73 |
+
image = $(),
|
74 |
+
imageWidth = 0,
|
75 |
+
imageHeight = 0,
|
76 |
+
swipeDiff = 0,
|
77 |
+
inProgress = false,
|
78 |
+
|
79 |
+
setImage = function()
|
80 |
+
{
|
81 |
+
if( !image.length ) return true;
|
82 |
+
|
83 |
+
var screenWidth = $( window ).width() * 0.8,
|
84 |
+
screenHeight = $( window ).height() * 0.9,
|
85 |
+
tmpImage = new Image();
|
86 |
+
|
87 |
+
tmpImage.src = image.attr( 'src' );
|
88 |
+
tmpImage.onload = function()
|
89 |
+
{
|
90 |
+
imageWidth = tmpImage.width;
|
91 |
+
imageHeight = tmpImage.height;
|
92 |
+
|
93 |
+
if( imageWidth > screenWidth || imageHeight > screenHeight )
|
94 |
+
{
|
95 |
+
var ratio = imageWidth / imageHeight > screenWidth / screenHeight ? imageWidth / screenWidth : imageHeight / screenHeight;
|
96 |
+
imageWidth /= ratio;
|
97 |
+
imageHeight /= ratio;
|
98 |
+
}
|
99 |
+
|
100 |
+
image.css(
|
101 |
+
{
|
102 |
+
'width': imageWidth + 'px',
|
103 |
+
'height': imageHeight + 'px',
|
104 |
+
'top': ( $( window ).height() - imageHeight ) / 2 + 'px',
|
105 |
+
'left': ( $( window ).width() - imageWidth ) / 2 + 'px'
|
106 |
+
});
|
107 |
+
};
|
108 |
+
},
|
109 |
+
|
110 |
+
loadImage = function( direction )
|
111 |
+
{
|
112 |
+
if( inProgress ) return false;
|
113 |
+
|
114 |
+
direction = typeof direction === 'undefined' ? false : direction == 'left' ? 1 : -1;
|
115 |
+
|
116 |
+
if( image.length )
|
117 |
+
{
|
118 |
+
if( direction !== false && ( targets.length < 2 || ( options.quitOnEnd === true && ( ( direction === -1 && targets.index( target ) == 0 ) || ( direction === 1 && targets.index( target ) == targets.length - 1 ) ) ) ) )
|
119 |
+
{
|
120 |
+
quitLightbox();
|
121 |
+
return false;
|
122 |
+
}
|
123 |
+
var params = { 'opacity': 0 };
|
124 |
+
if( isCssTransitionSupport ) cssTransitionTranslateX( image, ( 100 * direction ) - swipeDiff + 'px', options.animationSpeed / 1000 );
|
125 |
+
else params.left = parseInt( image.css( 'left' ) ) + 100 * direction + 'px';
|
126 |
+
image.animate( params, options.animationSpeed, function(){ removeImage(); });
|
127 |
+
swipeDiff = 0;
|
128 |
+
}
|
129 |
+
|
130 |
+
inProgress = true;
|
131 |
+
if( options.onLoadStart !== false ) options.onLoadStart();
|
132 |
+
|
133 |
+
setTimeout( function()
|
134 |
+
{
|
135 |
+
image = $( '<img ' + options.selector + ' />' )
|
136 |
+
.attr( 'src', target.attr( 'href' ) )
|
137 |
+
.on( 'load', function()
|
138 |
+
{
|
139 |
+
image.appendTo( 'body' );
|
140 |
+
setImage();
|
141 |
+
|
142 |
+
var params = { 'opacity': 1 };
|
143 |
+
|
144 |
+
image.css( 'opacity', 0 );
|
145 |
+
if( isCssTransitionSupport )
|
146 |
+
{
|
147 |
+
cssTransitionTranslateX( image, -100 * direction + 'px', 0 );
|
148 |
+
setTimeout( function(){ cssTransitionTranslateX( image, 0 + 'px', options.animationSpeed / 1000 ) }, 50 );
|
149 |
+
}
|
150 |
+
else
|
151 |
+
{
|
152 |
+
var imagePosLeft = parseInt( image.css( 'left' ) );
|
153 |
+
params.left = imagePosLeft + 'px';
|
154 |
+
image.css( 'left', imagePosLeft - 100 * direction + 'px' );
|
155 |
+
}
|
156 |
+
|
157 |
+
image.animate( params, options.animationSpeed, function()
|
158 |
+
{
|
159 |
+
inProgress = false;
|
160 |
+
if( options.onLoadEnd !== false ) options.onLoadEnd();
|
161 |
+
});
|
162 |
+
if( options.preloadNext )
|
163 |
+
{
|
164 |
+
var nextTarget = targets.eq( targets.index( target ) + 1 );
|
165 |
+
if( !nextTarget.length ) nextTarget = targets.eq( 0 );
|
166 |
+
$( '<img />' ).attr( 'src', nextTarget.attr( 'href' ) );
|
167 |
+
}
|
168 |
+
})
|
169 |
+
.on( 'error', function()
|
170 |
+
{
|
171 |
+
if( options.onLoadEnd !== false ) options.onLoadEnd();
|
172 |
+
});
|
173 |
+
|
174 |
+
var swipeStart = 0,
|
175 |
+
swipeEnd = 0,
|
176 |
+
imagePosLeft = 0;
|
177 |
+
|
178 |
+
image.on( hasPointers ? 'pointerup MSPointerUp' : 'click', function( e )
|
179 |
+
{
|
180 |
+
e.preventDefault();
|
181 |
+
if( options.quitOnImgClick )
|
182 |
+
{
|
183 |
+
quitLightbox();
|
184 |
+
return false;
|
185 |
+
}
|
186 |
+
if( wasTouched( e.originalEvent ) ) return true;
|
187 |
+
var posX = ( e.pageX || e.originalEvent.pageX ) - e.target.offsetLeft;
|
188 |
+
target = targets.eq( targets.index( target ) - ( imageWidth / 2 > posX ? 1 : -1 ) );
|
189 |
+
if( !target.length ) target = targets.eq( imageWidth / 2 > posX ? targets.length : 0 );
|
190 |
+
loadImage( imageWidth / 2 > posX ? 'left' : 'right' );
|
191 |
+
})
|
192 |
+
.on( 'touchstart pointerdown MSPointerDown', function( e )
|
193 |
+
{
|
194 |
+
if( !wasTouched( e.originalEvent ) || options.quitOnImgClick ) return true;
|
195 |
+
if( isCssTransitionSupport ) imagePosLeft = parseInt( image.css( 'left' ) );
|
196 |
+
swipeStart = e.originalEvent.pageX || e.originalEvent.touches[ 0 ].pageX;
|
197 |
+
})
|
198 |
+
.on( 'touchmove pointermove MSPointerMove', function( e )
|
199 |
+
{
|
200 |
+
if( !wasTouched( e.originalEvent ) || options.quitOnImgClick ) return true;
|
201 |
+
e.preventDefault();
|
202 |
+
swipeEnd = e.originalEvent.pageX || e.originalEvent.touches[ 0 ].pageX;
|
203 |
+
swipeDiff = swipeStart - swipeEnd;
|
204 |
+
if( isCssTransitionSupport ) cssTransitionTranslateX( image, -swipeDiff + 'px', 0 );
|
205 |
+
else image.css( 'left', imagePosLeft - swipeDiff + 'px' );
|
206 |
+
})
|
207 |
+
.on( 'touchend touchcancel pointerup pointercancel MSPointerUp MSPointerCancel', function( e )
|
208 |
+
{
|
209 |
+
if( !wasTouched( e.originalEvent ) || options.quitOnImgClick ) return true;
|
210 |
+
if( Math.abs( swipeDiff ) > 50 )
|
211 |
+
{
|
212 |
+
target = targets.eq( targets.index( target ) - ( swipeDiff < 0 ? 1 : -1 ) );
|
213 |
+
if( !target.length ) target = targets.eq( swipeDiff < 0 ? targets.length : 0 );
|
214 |
+
loadImage( swipeDiff > 0 ? 'right' : 'left' );
|
215 |
+
}
|
216 |
+
else
|
217 |
+
{
|
218 |
+
if( isCssTransitionSupport ) cssTransitionTranslateX( image, 0 + 'px', options.animationSpeed / 1000 );
|
219 |
+
else image.animate({ 'left': imagePosLeft + 'px' }, options.animationSpeed / 2 );
|
220 |
+
}
|
221 |
+
});
|
222 |
+
|
223 |
+
}, options.animationSpeed + 100 );
|
224 |
+
},
|
225 |
+
|
226 |
+
removeImage = function()
|
227 |
+
{
|
228 |
+
if( !image.length ) return false;
|
229 |
+
image.remove();
|
230 |
+
image = $();
|
231 |
+
},
|
232 |
+
|
233 |
+
quitLightbox = function()
|
234 |
+
{
|
235 |
+
if( !image.length ) return false;
|
236 |
+
image.animate({ 'opacity': 0 }, options.animationSpeed, function()
|
237 |
+
{
|
238 |
+
removeImage();
|
239 |
+
inProgress = false;
|
240 |
+
if( options.onEnd !== false ) options.onEnd();
|
241 |
+
});
|
242 |
+
},
|
243 |
+
|
244 |
+
addTargets = function( newTargets )
|
245 |
+
{
|
246 |
+
newTargets.each( function()
|
247 |
+
{
|
248 |
+
targets = targets.add( $( this ) );
|
249 |
+
});
|
250 |
+
|
251 |
+
newTargets.on( 'click.imageLightbox', function( e )
|
252 |
+
{
|
253 |
+
e.preventDefault();
|
254 |
+
if( inProgress ) return false;
|
255 |
+
inProgress = false;
|
256 |
+
if( options.onStart !== false ) options.onStart();
|
257 |
+
target = $( this );
|
258 |
+
loadImage();
|
259 |
+
});
|
260 |
+
};
|
261 |
+
|
262 |
+
$( window ).on( 'resize', setImage );
|
263 |
+
|
264 |
+
if( options.quitOnDocClick )
|
265 |
+
{
|
266 |
+
$( document ).on( hasTouch ? 'touchend' : 'click', function( e )
|
267 |
+
{
|
268 |
+
if( image.length && !$( e.target ).is( image ) ) quitLightbox();
|
269 |
+
});
|
270 |
+
}
|
271 |
+
|
272 |
+
if( options.enableKeyboard )
|
273 |
+
{
|
274 |
+
$( document ).on( 'keyup', function( e )
|
275 |
+
{
|
276 |
+
if( !image.length ) return true;
|
277 |
+
e.preventDefault();
|
278 |
+
if( e.keyCode == 27 ) quitLightbox();
|
279 |
+
if( e.keyCode == 37 || e.keyCode == 39 )
|
280 |
+
{
|
281 |
+
target = targets.eq( targets.index( target ) - ( e.keyCode == 37 ? 1 : -1 ) );
|
282 |
+
if( !target.length ) target = targets.eq( e.keyCode == 37 ? targets.length : 0 );
|
283 |
+
loadImage( e.keyCode == 37 ? 'left' : 'right' );
|
284 |
+
}
|
285 |
+
});
|
286 |
+
}
|
287 |
+
|
288 |
+
addTargets( $( this ) );
|
289 |
+
|
290 |
+
this.switchImageLightbox = function( index )
|
291 |
+
{
|
292 |
+
var tmpTarget = targets.eq( index );
|
293 |
+
if( tmpTarget.length )
|
294 |
+
{
|
295 |
+
var currentIndex = targets.index( target );
|
296 |
+
target = tmpTarget;
|
297 |
+
loadImage( index < currentIndex ? 'left' : 'right' );
|
298 |
+
}
|
299 |
+
return this;
|
300 |
+
};
|
301 |
+
|
302 |
+
this.addToImageLightbox = function( newTargets )
|
303 |
+
{
|
304 |
+
addTargets( newTargets );
|
305 |
+
};
|
306 |
+
|
307 |
+
this.quitImageLightbox = function()
|
308 |
+
{
|
309 |
+
quitLightbox();
|
310 |
+
return this;
|
311 |
+
};
|
312 |
+
|
313 |
+
return this;
|
314 |
+
};
|
315 |
+
})( jQuery, window, document );
|
assets/imagelightbox/imagelightbox.min.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
#imagelightbox{position:fixed;z-index:9999;-ms-touch-action:none;touch-action:none}
|
assets/imagelightbox/imagelightbox.min.js
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
By Osvaldas Valutis, www.osvaldas.info
|
3 |
+
Available for use under the MIT License
|
4 |
+
*/
|
5 |
+
|
6 |
+
!function(n,t,e,i){"use strict";var o=function(){var n=e.body||e.documentElement,n=n.style;return""==n.WebkitTransition?"-webkit-":""==n.MozTransition?"-moz-":""==n.OTransition?"-o-":""==n.transition?"":!1},r=o()===!1?!1:!0,a=function(n,t,e){var i={},r=o();i[r+"transform"]="translateX("+t+")",i[r+"transition"]=r+"transform "+e+"s linear",n.css(i)},u="ontouchstart"in t,d=t.navigator.pointerEnabled||t.navigator.msPointerEnabled,c=function(n){if(u)return!0;if(!d||"undefined"==typeof n||"undefined"==typeof n.pointerType)return!1;if("undefined"!=typeof n.MSPOINTER_TYPE_MOUSE){if(n.MSPOINTER_TYPE_MOUSE!=n.pointerType)return!0}else if("mouse"!=n.pointerType)return!0;return!1};n.fn.imageLightbox=function(i){var i=n.extend({selector:'id="imagelightbox"',animationSpeed:250,preloadNext:!0,enableKeyboard:!0,quitOnEnd:!1,quitOnImgClick:!1,quitOnDocClick:!0,onStart:!1,onEnd:!1,onLoadStart:!1,onLoadEnd:!1},i),o=n([]),f=n(),l=n(),p=0,g=0,s=0,h=!1,m=function(){if(!l.length)return!0;var e=.8*n(t).width(),i=.9*n(t).height(),o=new Image;o.src=l.attr("src"),o.onload=function(){if(p=o.width,g=o.height,p>e||g>i){var r=p/g>e/i?p/e:g/i;p/=r,g/=r}l.css({width:p+"px",height:g+"px",top:(n(t).height()-g)/2+"px",left:(n(t).width()-p)/2+"px"})}},v=function(t){if(h)return!1;if(t="undefined"==typeof t?!1:"left"==t?1:-1,l.length){if(t!==!1&&(o.length<2||i.quitOnEnd===!0&&(-1===t&&0==o.index(f)||1===t&&o.index(f)==o.length-1)))return E(),!1;var e={opacity:0};r?a(l,100*t-s+"px",i.animationSpeed/1e3):e.left=parseInt(l.css("left"))+100*t+"px",l.animate(e,i.animationSpeed,function(){x()}),s=0}h=!0,i.onLoadStart!==!1&&i.onLoadStart(),setTimeout(function(){l=n("<img "+i.selector+" />").attr("src",f.attr("href")).on("load",function(){l.appendTo("body"),m();var e={opacity:1};if(l.css("opacity",0),r)a(l,-100*t+"px",0),setTimeout(function(){a(l,"0px",i.animationSpeed/1e3)},50);else{var u=parseInt(l.css("left"));e.left=u+"px",l.css("left",u-100*t+"px")}if(l.animate(e,i.animationSpeed,function(){h=!1,i.onLoadEnd!==!1&&i.onLoadEnd()}),i.preloadNext){var d=o.eq(o.index(f)+1);d.length||(d=o.eq(0)),n("<img />").attr("src",d.attr("href"))}}).on("error",function(){i.onLoadEnd!==!1&&i.onLoadEnd()});var e=0,u=0,g=0;l.on(d?"pointerup MSPointerUp":"click",function(n){if(n.preventDefault(),i.quitOnImgClick)return E(),!1;if(c(n.originalEvent))return!0;var t=(n.pageX||n.originalEvent.pageX)-n.target.offsetLeft;f=o.eq(o.index(f)-(p/2>t?1:-1)),f.length||(f=o.eq(p/2>t?o.length:0)),v(p/2>t?"left":"right")}).on("touchstart pointerdown MSPointerDown",function(n){return!c(n.originalEvent)||i.quitOnImgClick?!0:(r&&(g=parseInt(l.css("left"))),void(e=n.originalEvent.pageX||n.originalEvent.touches[0].pageX))}).on("touchmove pointermove MSPointerMove",function(n){return!c(n.originalEvent)||i.quitOnImgClick?!0:(n.preventDefault(),u=n.originalEvent.pageX||n.originalEvent.touches[0].pageX,s=e-u,void(r?a(l,-s+"px",0):l.css("left",g-s+"px")))}).on("touchend touchcancel pointerup pointercancel MSPointerUp MSPointerCancel",function(n){return!c(n.originalEvent)||i.quitOnImgClick?!0:void(Math.abs(s)>50?(f=o.eq(o.index(f)-(0>s?1:-1)),f.length||(f=o.eq(0>s?o.length:0)),v(s>0?"right":"left")):r?a(l,"0px",i.animationSpeed/1e3):l.animate({left:g+"px"},i.animationSpeed/2))})},i.animationSpeed+100)},x=function(){return l.length?(l.remove(),void(l=n())):!1},E=function(){return l.length?void l.animate({opacity:0},i.animationSpeed,function(){x(),h=!1,i.onEnd!==!1&&i.onEnd()}):!1},y=function(t){t.each(function(){o=o.add(n(this))}),t.on("click.imageLightbox",function(t){return t.preventDefault(),h?!1:(h=!1,i.onStart!==!1&&i.onStart(),f=n(this),void v())})};return n(t).on("resize",m),i.quitOnDocClick&&n(e).on(u?"touchend":"click",function(t){l.length&&!n(t.target).is(l)&&E()}),i.enableKeyboard&&n(e).on("keyup",function(n){return l.length?(n.preventDefault(),27==n.keyCode&&E(),void((37==n.keyCode||39==n.keyCode)&&(f=o.eq(o.index(f)-(37==n.keyCode?1:-1)),f.length||(f=o.eq(37==n.keyCode?o.length:0)),v(37==n.keyCode?"left":"right")))):!0}),y(n(this)),this.switchImageLightbox=function(n){var t=o.eq(n);if(t.length){var e=o.index(f);f=t,v(e>n?"left":"right")}return this},this.addToImageLightbox=function(n){y(n)},this.quitImageLightbox=function(){return E(),this},this}}(jQuery,window,document);
|
assets/imagelightbox/js/imagelightbox.min.js
DELETED
@@ -1,6 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
By Osvaldas Valutis, www.osvaldas.info
|
3 |
-
Available for use under the MIT License
|
4 |
-
*/
|
5 |
-
|
6 |
-
;(function(e,t,n,r){"use strict";var i=function(){var e=n.body||n.documentElement,e=e.style;if(e.WebkitTransition=="")return"-webkit-";if(e.MozTransition=="")return"-moz-";if(e.OTransition=="")return"-o-";if(e.transition=="")return"";return false},s=i()===false?false:true,o=function(e,t,n){var r={},s=i();r[s+"transform"]="translateX("+t+")";r[s+"transition"]=s+"transform "+n+"s linear";e.css(r)},u="ontouchstart"in t,a=t.navigator.pointerEnabled||t.navigator.msPointerEnabled,f=function(e){if(u)return true;if(!a||typeof e==="undefined"||typeof e.pointerType==="undefined")return false;if(typeof e.MSPOINTER_TYPE_MOUSE!=="undefined"){if(e.MSPOINTER_TYPE_MOUSE!=e.pointerType)return true}else if(e.pointerType!="mouse")return true;return false};e.fn.imageLightbox=function(r){var r=e.extend({selector:'id="imagelightbox"',allowedTypes:"png|jpg|jpeg|gif",animationSpeed:250,preloadNext:true,enableKeyboard:true,quitOnEnd:false,quitOnImgClick:false,quitOnDocClick:true,onStart:false,onEnd:false,onLoadStart:false,onLoadEnd:false},r),i=e([]),l=e(),c=e(),h=0,p=0,d=0,v=false,m=function(t){return e(t).prop("tagName").toLowerCase()=="a"&&(new RegExp(".("+r.allowedTypes+")$","i")).test(e(t).attr("href"))},g=function(){if(!c.length)return true;var n=e(t).width()*.8,r=e(t).height()*.9,i=new Image;i.src=c.attr("src");i.onload=function(){h=i.width;p=i.height;if(h>n||p>r){var s=h/p>n/r?h/n:p/r;h/=s;p/=s}c.css({width:h+"px",height:p+"px",top:(e(t).height()-p)/2+"px",left:(e(t).width()-h)/2+"px"})}},y=function(t){if(v)return false;t=typeof t==="undefined"?false:t=="left"?1:-1;if(c.length){if(t!==false&&(i.length<2||r.quitOnEnd===true&&(t===-1&&i.index(l)==0||t===1&&i.index(l)==i.length-1))){w();return false}var n={opacity:0};if(s)o(c,100*t-d+"px",r.animationSpeed/1e3);else n.left=parseInt(c.css("left"))+100*t+"px";c.animate(n,r.animationSpeed,function(){b()});d=0}v=true;if(r.onLoadStart!==false)r.onLoadStart();setTimeout(function(){c=e("<img "+r.selector+" />").attr("src",l.attr("href")).load(function(){c.appendTo("body");g();var n={opacity:1};c.css("opacity",0);if(s){o(c,-100*t+"px",0);setTimeout(function(){o(c,0+"px",r.animationSpeed/1e3)},50)}else{var u=parseInt(c.css("left"));n.left=u+"px";c.css("left",u-100*t+"px")}c.animate(n,r.animationSpeed,function(){v=false;if(r.onLoadEnd!==false)r.onLoadEnd()});if(r.preloadNext){var a=i.eq(i.index(l)+1);if(!a.length)a=i.eq(0);e("<img />").attr("src",a.attr("href")).load()}}).error(function(){if(r.onLoadEnd!==false)r.onLoadEnd()});var n=0,u=0,p=0;c.on(a?"pointerup MSPointerUp":"click",function(e){e.preventDefault();if(r.quitOnImgClick){w();return false}if(f(e.originalEvent))return true;var t=(e.pageX||e.originalEvent.pageX)-e.target.offsetLeft;l=i.eq(i.index(l)-(h/2>t?1:-1));if(!l.length)l=i.eq(h/2>t?i.length:0);y(h/2>t?"left":"right")}).on("touchstart pointerdown MSPointerDown",function(e){if(!f(e.originalEvent)||r.quitOnImgClick)return true;if(s)p=parseInt(c.css("left"));n=e.originalEvent.pageX||e.originalEvent.touches[0].pageX}).on("touchmove pointermove MSPointerMove",function(e){if(!f(e.originalEvent)||r.quitOnImgClick)return true;e.preventDefault();u=e.originalEvent.pageX||e.originalEvent.touches[0].pageX;d=n-u;if(s)o(c,-d+"px",0);else c.css("left",p-d+"px")}).on("touchend touchcancel pointerup pointercancel MSPointerUp MSPointerCancel",function(e){if(!f(e.originalEvent)||r.quitOnImgClick)return true;if(Math.abs(d)>50){l=i.eq(i.index(l)-(d<0?1:-1));if(!l.length)l=i.eq(d<0?i.length:0);y(d>0?"right":"left")}else{if(s)o(c,0+"px",r.animationSpeed/1e3);else c.animate({left:p+"px"},r.animationSpeed/2)}})},r.animationSpeed+100)},b=function(){if(!c.length)return false;c.remove();c=e()},w=function(){if(!c.length)return false;c.animate({opacity:0},r.animationSpeed,function(){b();v=false;if(r.onEnd!==false)r.onEnd()})};e(t).on("resize",g);if(r.quitOnDocClick){e(n).on(u?"touchend":"click",function(t){if(c.length&&!e(t.target).is(c))w()})}if(r.enableKeyboard){e(n).on("keyup",function(e){if(!c.length)return true;e.preventDefault();if(e.keyCode==27)w();if(e.keyCode==37||e.keyCode==39){l=i.eq(i.index(l)-(e.keyCode==37?1:-1));if(!l.length)l=i.eq(e.keyCode==37?i.length:0);y(e.keyCode==37?"left":"right")}})}e(n).on("click",this.selector,function(t){if(!m(this))return true;t.preventDefault();if(v)return false;v=false;if(r.onStart!==false)r.onStart();l=e(this);y()});this.each(function(){if(!m(this))return true;i=i.add(e(this))});this.switchImageLightbox=function(e){var t=i.eq(e);if(t.length){var n=i.index(l);l=t;y(e<n?"left":"right")}return this};this.quitImageLightbox=function(){w();return this};return this}})(jQuery,window,document);
|
|
|
|
|
|
|
|
|
|
|
|
assets/prettyphoto/css/prettyPhoto.css
DELETED
@@ -1,170 +0,0 @@
|
|
1 |
-
div.pp_default .pp_top,div.pp_default .pp_top .pp_middle,div.pp_default .pp_top .pp_left,div.pp_default .pp_top .pp_right,div.pp_default .pp_bottom,div.pp_default .pp_bottom .pp_left,div.pp_default .pp_bottom .pp_middle,div.pp_default .pp_bottom .pp_right{height:13px}
|
2 |
-
div.pp_default .pp_top .pp_left{background:url(../images/prettyPhoto/default/sprite.png) -78px -93px no-repeat}
|
3 |
-
div.pp_default .pp_top .pp_middle{background:url(../images/prettyPhoto/default/sprite_x.png) top left repeat-x}
|
4 |
-
div.pp_default .pp_top .pp_right{background:url(../images/prettyPhoto/default/sprite.png) -112px -93px no-repeat}
|
5 |
-
div.pp_default .pp_content .ppt{color:#f8f8f8}
|
6 |
-
div.pp_default .pp_content_container .pp_left{background:url(../images/prettyPhoto/default/sprite_y.png) -7px 0 repeat-y;padding-left:13px}
|
7 |
-
div.pp_default .pp_content_container .pp_right{background:url(../images/prettyPhoto/default/sprite_y.png) top right repeat-y;padding-right:13px}
|
8 |
-
div.pp_default .pp_next:hover{background:url(../images/prettyPhoto/default/sprite_next.png) center right no-repeat;cursor:pointer}
|
9 |
-
div.pp_default .pp_previous:hover{background:url(../images/prettyPhoto/default/sprite_prev.png) center left no-repeat;cursor:pointer}
|
10 |
-
div.pp_default .pp_expand{background:url(../images/prettyPhoto/default/sprite.png) 0 -29px no-repeat;cursor:pointer;width:28px;height:28px}
|
11 |
-
div.pp_default .pp_expand:hover{background:url(../images/prettyPhoto/default/sprite.png) 0 -56px no-repeat;cursor:pointer}
|
12 |
-
div.pp_default .pp_contract{background:url(../images/prettyPhoto/default/sprite.png) 0 -84px no-repeat;cursor:pointer;width:28px;height:28px}
|
13 |
-
div.pp_default .pp_contract:hover{background:url(../images/prettyPhoto/default/sprite.png) 0 -113px no-repeat;cursor:pointer}
|
14 |
-
div.pp_default .pp_close{width:30px;height:30px;background:url(../images/prettyPhoto/default/sprite.png) 2px 1px no-repeat;cursor:pointer}
|
15 |
-
div.pp_default .pp_gallery ul li a{background:url(../images/prettyPhoto/default/default_thumb.png) center center #f8f8f8;border:1px solid #aaa}
|
16 |
-
div.pp_default .pp_social{margin-top:7px}
|
17 |
-
div.pp_default .pp_gallery a.pp_arrow_previous,div.pp_default .pp_gallery a.pp_arrow_next{position:static;left:auto}
|
18 |
-
div.pp_default .pp_nav .pp_play,div.pp_default .pp_nav .pp_pause{background:url(../images/prettyPhoto/default/sprite.png) -51px 1px no-repeat;height:30px;width:30px}
|
19 |
-
div.pp_default .pp_nav .pp_pause{background-position:-51px -29px}
|
20 |
-
div.pp_default a.pp_arrow_previous,div.pp_default a.pp_arrow_next{background:url(../images/prettyPhoto/default/sprite.png) -31px -3px no-repeat;height:20px;width:20px;margin:4px 0 0}
|
21 |
-
div.pp_default a.pp_arrow_next{left:52px;background-position:-82px -3px}
|
22 |
-
div.pp_default .pp_content_container .pp_details{margin-top:5px}
|
23 |
-
div.pp_default .pp_nav{clear:none;height:30px;width:110px;position:relative}
|
24 |
-
div.pp_default .pp_nav .currentTextHolder{font-family:Georgia;font-style:italic;color:#999;font-size:11px;left:75px;line-height:25px;position:absolute;top:2px;margin:0;padding:0 0 0 10px}
|
25 |
-
div.pp_default .pp_close:hover,div.pp_default .pp_nav .pp_play:hover,div.pp_default .pp_nav .pp_pause:hover,div.pp_default .pp_arrow_next:hover,div.pp_default .pp_arrow_previous:hover{opacity:0.7}
|
26 |
-
div.pp_default .pp_description{font-size:11px;font-weight:700;line-height:14px;margin:5px 50px 5px 0}
|
27 |
-
div.pp_default .pp_bottom .pp_left{background:url(../images/prettyPhoto/default/sprite.png) -78px -127px no-repeat}
|
28 |
-
div.pp_default .pp_bottom .pp_middle{background:url(../images/prettyPhoto/default/sprite_x.png) bottom left repeat-x}
|
29 |
-
div.pp_default .pp_bottom .pp_right{background:url(../images/prettyPhoto/default/sprite.png) -112px -127px no-repeat}
|
30 |
-
div.pp_default .pp_loaderIcon{background:url(../images/prettyPhoto/default/loader.gif) center center no-repeat}
|
31 |
-
div.light_rounded .pp_top .pp_left{background:url(../images/prettyPhoto/light_rounded/sprite.png) -88px -53px no-repeat}
|
32 |
-
div.light_rounded .pp_top .pp_right{background:url(../images/prettyPhoto/light_rounded/sprite.png) -110px -53px no-repeat}
|
33 |
-
div.light_rounded .pp_next:hover{background:url(../images/prettyPhoto/light_rounded/btnNext.png) center right no-repeat;cursor:pointer}
|
34 |
-
div.light_rounded .pp_previous:hover{background:url(../images/prettyPhoto/light_rounded/btnPrevious.png) center left no-repeat;cursor:pointer}
|
35 |
-
div.light_rounded .pp_expand{background:url(../images/prettyPhoto/light_rounded/sprite.png) -31px -26px no-repeat;cursor:pointer}
|
36 |
-
div.light_rounded .pp_expand:hover{background:url(../images/prettyPhoto/light_rounded/sprite.png) -31px -47px no-repeat;cursor:pointer}
|
37 |
-
div.light_rounded .pp_contract{background:url(../images/prettyPhoto/light_rounded/sprite.png) 0 -26px no-repeat;cursor:pointer}
|
38 |
-
div.light_rounded .pp_contract:hover{background:url(../images/prettyPhoto/light_rounded/sprite.png) 0 -47px no-repeat;cursor:pointer}
|
39 |
-
div.light_rounded .pp_close{width:75px;height:22px;background:url(../images/prettyPhoto/light_rounded/sprite.png) -1px -1px no-repeat;cursor:pointer}
|
40 |
-
div.light_rounded .pp_nav .pp_play{background:url(../images/prettyPhoto/light_rounded/sprite.png) -1px -100px no-repeat;height:15px;width:14px}
|
41 |
-
div.light_rounded .pp_nav .pp_pause{background:url(../images/prettyPhoto/light_rounded/sprite.png) -24px -100px no-repeat;height:15px;width:14px}
|
42 |
-
div.light_rounded .pp_arrow_previous{background:url(../images/prettyPhoto/light_rounded/sprite.png) 0 -71px no-repeat}
|
43 |
-
div.light_rounded .pp_arrow_next{background:url(../images/prettyPhoto/light_rounded/sprite.png) -22px -71px no-repeat}
|
44 |
-
div.light_rounded .pp_bottom .pp_left{background:url(../images/prettyPhoto/light_rounded/sprite.png) -88px -80px no-repeat}
|
45 |
-
div.light_rounded .pp_bottom .pp_right{background:url(../images/prettyPhoto/light_rounded/sprite.png) -110px -80px no-repeat}
|
46 |
-
div.dark_rounded .pp_top .pp_left{background:url(../images/prettyPhoto/dark_rounded/sprite.png) -88px -53px no-repeat}
|
47 |
-
div.dark_rounded .pp_top .pp_right{background:url(../images/prettyPhoto/dark_rounded/sprite.png) -110px -53px no-repeat}
|
48 |
-
div.dark_rounded .pp_content_container .pp_left{background:url(../images/prettyPhoto/dark_rounded/contentPattern.png) top left repeat-y}
|
49 |
-
div.dark_rounded .pp_content_container .pp_right{background:url(../images/prettyPhoto/dark_rounded/contentPattern.png) top right repeat-y}
|
50 |
-
div.dark_rounded .pp_next:hover{background:url(../images/prettyPhoto/dark_rounded/btnNext.png) center right no-repeat;cursor:pointer}
|
51 |
-
div.dark_rounded .pp_previous:hover{background:url(../images/prettyPhoto/dark_rounded/btnPrevious.png) center left no-repeat;cursor:pointer}
|
52 |
-
div.dark_rounded .pp_expand{background:url(../images/prettyPhoto/dark_rounded/sprite.png) -31px -26px no-repeat;cursor:pointer}
|
53 |
-
div.dark_rounded .pp_expand:hover{background:url(../images/prettyPhoto/dark_rounded/sprite.png) -31px -47px no-repeat;cursor:pointer}
|
54 |
-
div.dark_rounded .pp_contract{background:url(../images/prettyPhoto/dark_rounded/sprite.png) 0 -26px no-repeat;cursor:pointer}
|
55 |
-
div.dark_rounded .pp_contract:hover{background:url(../images/prettyPhoto/dark_rounded/sprite.png) 0 -47px no-repeat;cursor:pointer}
|
56 |
-
div.dark_rounded .pp_close{width:75px;height:22px;background:url(../images/prettyPhoto/dark_rounded/sprite.png) -1px -1px no-repeat;cursor:pointer}
|
57 |
-
div.dark_rounded .pp_description{margin-right:85px;color:#fff}
|
58 |
-
div.dark_rounded .pp_nav .pp_play{background:url(../images/prettyPhoto/dark_rounded/sprite.png) -1px -100px no-repeat;height:15px;width:14px}
|
59 |
-
div.dark_rounded .pp_nav .pp_pause{background:url(../images/prettyPhoto/dark_rounded/sprite.png) -24px -100px no-repeat;height:15px;width:14px}
|
60 |
-
div.dark_rounded .pp_arrow_previous{background:url(../images/prettyPhoto/dark_rounded/sprite.png) 0 -71px no-repeat}
|
61 |
-
div.dark_rounded .pp_arrow_next{background:url(../images/prettyPhoto/dark_rounded/sprite.png) -22px -71px no-repeat}
|
62 |
-
div.dark_rounded .pp_bottom .pp_left{background:url(../images/prettyPhoto/dark_rounded/sprite.png) -88px -80px no-repeat}
|
63 |
-
div.dark_rounded .pp_bottom .pp_right{background:url(../images/prettyPhoto/dark_rounded/sprite.png) -110px -80px no-repeat}
|
64 |
-
div.dark_rounded .pp_loaderIcon{background:url(../images/prettyPhoto/dark_rounded/loader.gif) center center no-repeat}
|
65 |
-
div.dark_square .pp_left,div.dark_square .pp_middle,div.dark_square .pp_right,div.dark_square .pp_content{background:#000}
|
66 |
-
div.dark_square .pp_description{color:#fff;margin:0 85px 0 0}
|
67 |
-
div.dark_square .pp_loaderIcon{background:url(../images/prettyPhoto/dark_square/loader.gif) center center no-repeat}
|
68 |
-
div.dark_square .pp_expand{background:url(../images/prettyPhoto/dark_square/sprite.png) -31px -26px no-repeat;cursor:pointer}
|
69 |
-
div.dark_square .pp_expand:hover{background:url(../images/prettyPhoto/dark_square/sprite.png) -31px -47px no-repeat;cursor:pointer}
|
70 |
-
div.dark_square .pp_contract{background:url(../images/prettyPhoto/dark_square/sprite.png) 0 -26px no-repeat;cursor:pointer}
|
71 |
-
div.dark_square .pp_contract:hover{background:url(../images/prettyPhoto/dark_square/sprite.png) 0 -47px no-repeat;cursor:pointer}
|
72 |
-
div.dark_square .pp_close{width:75px;height:22px;background:url(../images/prettyPhoto/dark_square/sprite.png) -1px -1px no-repeat;cursor:pointer}
|
73 |
-
div.dark_square .pp_nav{clear:none}
|
74 |
-
div.dark_square .pp_nav .pp_play{background:url(../images/prettyPhoto/dark_square/sprite.png) -1px -100px no-repeat;height:15px;width:14px}
|
75 |
-
div.dark_square .pp_nav .pp_pause{background:url(../images/prettyPhoto/dark_square/sprite.png) -24px -100px no-repeat;height:15px;width:14px}
|
76 |
-
div.dark_square .pp_arrow_previous{background:url(../images/prettyPhoto/dark_square/sprite.png) 0 -71px no-repeat}
|
77 |
-
div.dark_square .pp_arrow_next{background:url(../images/prettyPhoto/dark_square/sprite.png) -22px -71px no-repeat}
|
78 |
-
div.dark_square .pp_next:hover{background:url(../images/prettyPhoto/dark_square/btnNext.png) center right no-repeat;cursor:pointer}
|
79 |
-
div.dark_square .pp_previous:hover{background:url(../images/prettyPhoto/dark_square/btnPrevious.png) center left no-repeat;cursor:pointer}
|
80 |
-
div.light_square .pp_expand{background:url(../images/prettyPhoto/light_square/sprite.png) -31px -26px no-repeat;cursor:pointer}
|
81 |
-
div.light_square .pp_expand:hover{background:url(../images/prettyPhoto/light_square/sprite.png) -31px -47px no-repeat;cursor:pointer}
|
82 |
-
div.light_square .pp_contract{background:url(../images/prettyPhoto/light_square/sprite.png) 0 -26px no-repeat;cursor:pointer}
|
83 |
-
div.light_square .pp_contract:hover{background:url(../images/prettyPhoto/light_square/sprite.png) 0 -47px no-repeat;cursor:pointer}
|
84 |
-
div.light_square .pp_close{width:75px;height:22px;background:url(../images/prettyPhoto/light_square/sprite.png) -1px -1px no-repeat;cursor:pointer}
|
85 |
-
div.light_square .pp_nav .pp_play{background:url(../images/prettyPhoto/light_square/sprite.png) -1px -100px no-repeat;height:15px;width:14px}
|
86 |
-
div.light_square .pp_nav .pp_pause{background:url(../images/prettyPhoto/light_square/sprite.png) -24px -100px no-repeat;height:15px;width:14px}
|
87 |
-
div.light_square .pp_arrow_previous{background:url(../images/prettyPhoto/light_square/sprite.png) 0 -71px no-repeat}
|
88 |
-
div.light_square .pp_arrow_next{background:url(../images/prettyPhoto/light_square/sprite.png) -22px -71px no-repeat}
|
89 |
-
div.light_square .pp_next:hover{background:url(../images/prettyPhoto/light_square/btnNext.png) center right no-repeat;cursor:pointer}
|
90 |
-
div.light_square .pp_previous:hover{background:url(../images/prettyPhoto/light_square/btnPrevious.png) center left no-repeat;cursor:pointer}
|
91 |
-
div.facebook .pp_top .pp_left{background:url(../images/prettyPhoto/facebook/sprite.png) -88px -53px no-repeat}
|
92 |
-
div.facebook .pp_top .pp_middle{background:url(../images/prettyPhoto/facebook/contentPatternTop.png) top left repeat-x}
|
93 |
-
div.facebook .pp_top .pp_right{background:url(../images/prettyPhoto/facebook/sprite.png) -110px -53px no-repeat}
|
94 |
-
div.facebook .pp_content_container .pp_left{background:url(../images/prettyPhoto/facebook/contentPatternLeft.png) top left repeat-y}
|
95 |
-
div.facebook .pp_content_container .pp_right{background:url(../images/prettyPhoto/facebook/contentPatternRight.png) top right repeat-y}
|
96 |
-
div.facebook .pp_expand{background:url(../images/prettyPhoto/facebook/sprite.png) -31px -26px no-repeat;cursor:pointer}
|
97 |
-
div.facebook .pp_expand:hover{background:url(../images/prettyPhoto/facebook/sprite.png) -31px -47px no-repeat;cursor:pointer}
|
98 |
-
div.facebook .pp_contract{background:url(../images/prettyPhoto/facebook/sprite.png) 0 -26px no-repeat;cursor:pointer}
|
99 |
-
div.facebook .pp_contract:hover{background:url(../images/prettyPhoto/facebook/sprite.png) 0 -47px no-repeat;cursor:pointer}
|
100 |
-
div.facebook .pp_close{width:22px;height:22px;background:url(../images/prettyPhoto/facebook/sprite.png) -1px -1px no-repeat;cursor:pointer}
|
101 |
-
div.facebook .pp_description{margin:0 37px 0 0}
|
102 |
-
div.facebook .pp_loaderIcon{background:url(../images/prettyPhoto/facebook/loader.gif) center center no-repeat}
|
103 |
-
div.facebook .pp_arrow_previous{background:url(../images/prettyPhoto/facebook/sprite.png) 0 -71px no-repeat;height:22px;margin-top:0;width:22px}
|
104 |
-
div.facebook .pp_arrow_previous.disabled{background-position:0 -96px;cursor:default}
|
105 |
-
div.facebook .pp_arrow_next{background:url(../images/prettyPhoto/facebook/sprite.png) -32px -71px no-repeat;height:22px;margin-top:0;width:22px}
|
106 |
-
div.facebook .pp_arrow_next.disabled{background-position:-32px -96px;cursor:default}
|
107 |
-
div.facebook .pp_nav{margin-top:0}
|
108 |
-
div.facebook .pp_nav p{font-size:15px;padding:0 3px 0 4px}
|
109 |
-
div.facebook .pp_nav .pp_play{background:url(../images/prettyPhoto/facebook/sprite.png) -1px -123px no-repeat;height:22px;width:22px}
|
110 |
-
div.facebook .pp_nav .pp_pause{background:url(../images/prettyPhoto/facebook/sprite.png) -32px -123px no-repeat;height:22px;width:22px}
|
111 |
-
div.facebook .pp_next:hover{background:url(../images/prettyPhoto/facebook/btnNext.png) center right no-repeat;cursor:pointer}
|
112 |
-
div.facebook .pp_previous:hover{background:url(../images/prettyPhoto/facebook/btnPrevious.png) center left no-repeat;cursor:pointer}
|
113 |
-
div.facebook .pp_bottom .pp_left{background:url(../images/prettyPhoto/facebook/sprite.png) -88px -80px no-repeat}
|
114 |
-
div.facebook .pp_bottom .pp_middle{background:url(../images/prettyPhoto/facebook/contentPatternBottom.png) top left repeat-x}
|
115 |
-
div.facebook .pp_bottom .pp_right{background:url(../images/prettyPhoto/facebook/sprite.png) -110px -80px no-repeat}
|
116 |
-
div.pp_pic_holder a:focus{outline:none}
|
117 |
-
div.pp_overlay{background:#000;display:none;left:0;position:absolute;top:0;width:100%;z-index:9500}
|
118 |
-
div.pp_pic_holder{display:none;position:absolute;width:100px;z-index:10000}
|
119 |
-
.pp_content{height:40px;min-width:40px}
|
120 |
-
* html .pp_content{width:40px}
|
121 |
-
.pp_content_container{position:relative;text-align:left;width:100%}
|
122 |
-
.pp_content_container .pp_left{padding-left:20px}
|
123 |
-
.pp_content_container .pp_right{padding-right:20px}
|
124 |
-
.pp_content_container .pp_details{float:left;margin:10px 0 2px}
|
125 |
-
.pp_description{display:none;margin:0}
|
126 |
-
.pp_social{float:left;margin:0}
|
127 |
-
.pp_social .facebook{float:left;margin-left:5px;width:55px;overflow:hidden}
|
128 |
-
.pp_social .twitter{float:left}
|
129 |
-
.pp_nav{clear:right;float:left;margin:3px 10px 0 0}
|
130 |
-
.pp_nav p{float:left;white-space:nowrap;margin:2px 4px}
|
131 |
-
.pp_nav .pp_play,.pp_nav .pp_pause{float:left;margin-right:4px;text-indent:-10000px}
|
132 |
-
a.pp_arrow_previous,a.pp_arrow_next{display:block;float:left;height:15px;margin-top:3px;overflow:hidden;text-indent:-10000px;width:14px}
|
133 |
-
.pp_hoverContainer{position:absolute;top:0;width:100%;z-index:2000}
|
134 |
-
.pp_gallery{display:none;left:50%;margin-top:-50px;position:absolute;z-index:10000}
|
135 |
-
.pp_gallery div{float:left;overflow:hidden;position:relative}
|
136 |
-
.pp_gallery ul{float:left;height:35px;position:relative;white-space:nowrap;margin:0 0 0 5px;padding:0}
|
137 |
-
.pp_gallery ul a{border:1px rgba(0,0,0,0.5) solid;display:block;float:left;height:33px;overflow:hidden}
|
138 |
-
.pp_gallery ul a img{border:0}
|
139 |
-
.pp_gallery li{display:block;float:left;margin:0 5px 0 0;padding:0}
|
140 |
-
.pp_gallery li.default a{background:url(../images/prettyPhoto/facebook/default_thumbnail.gif) 0 0 no-repeat;display:block;height:33px;width:50px}
|
141 |
-
.pp_gallery .pp_arrow_previous,.pp_gallery .pp_arrow_next{margin-top:7px!important}
|
142 |
-
a.pp_next{background:url(../images/prettyPhoto/light_rounded/btnNext.png) 10000px 10000px no-repeat;display:block;float:right;height:100%;text-indent:-10000px;width:49%}
|
143 |
-
a.pp_previous{background:url(../images/prettyPhoto/light_rounded/btnNext.png) 10000px 10000px no-repeat;display:block;float:left;height:100%;text-indent:-10000px;width:49%}
|
144 |
-
a.pp_expand,a.pp_contract{cursor:pointer;display:none;height:20px;position:absolute;right:30px;text-indent:-10000px;top:10px;width:20px;z-index:20000}
|
145 |
-
a.pp_close{position:absolute;right:0;top:0;display:block;line-height:22px;text-indent:-10000px}
|
146 |
-
.pp_loaderIcon{display:block;height:24px;left:50%;position:absolute;top:50%;width:24px;margin:-12px 0 0 -12px}
|
147 |
-
#pp_full_res{line-height:1!important}
|
148 |
-
#pp_full_res .pp_inline{text-align:left}
|
149 |
-
#pp_full_res .pp_inline p{margin:0 0 15px}
|
150 |
-
div.ppt{color:#fff;display:none;font-size:17px;z-index:9999;margin:0 0 5px 15px}
|
151 |
-
div.pp_default .pp_content,div.light_rounded .pp_content{background-color:#fff}
|
152 |
-
div.pp_default #pp_full_res .pp_inline,div.light_rounded .pp_content .ppt,div.light_rounded #pp_full_res .pp_inline,div.light_square .pp_content .ppt,div.light_square #pp_full_res .pp_inline,div.facebook .pp_content .ppt,div.facebook #pp_full_res .pp_inline{color:#000}
|
153 |
-
div.pp_default .pp_gallery ul li a:hover,div.pp_default .pp_gallery ul li.selected a,.pp_gallery ul a:hover,.pp_gallery li.selected a{border-color:#fff}
|
154 |
-
div.pp_default .pp_details,div.light_rounded .pp_details,div.dark_rounded .pp_details,div.dark_square .pp_details,div.light_square .pp_details,div.facebook .pp_details{position:relative}
|
155 |
-
div.light_rounded .pp_top .pp_middle,div.light_rounded .pp_content_container .pp_left,div.light_rounded .pp_content_container .pp_right,div.light_rounded .pp_bottom .pp_middle,div.light_square .pp_left,div.light_square .pp_middle,div.light_square .pp_right,div.light_square .pp_content,div.facebook .pp_content{background:#fff}
|
156 |
-
div.light_rounded .pp_description,div.light_square .pp_description{margin-right:85px}
|
157 |
-
div.light_rounded .pp_gallery a.pp_arrow_previous,div.light_rounded .pp_gallery a.pp_arrow_next,div.dark_rounded .pp_gallery a.pp_arrow_previous,div.dark_rounded .pp_gallery a.pp_arrow_next,div.dark_square .pp_gallery a.pp_arrow_previous,div.dark_square .pp_gallery a.pp_arrow_next,div.light_square .pp_gallery a.pp_arrow_previous,div.light_square .pp_gallery a.pp_arrow_next{margin-top:12px!important}
|
158 |
-
div.light_rounded .pp_arrow_previous.disabled,div.dark_rounded .pp_arrow_previous.disabled,div.dark_square .pp_arrow_previous.disabled,div.light_square .pp_arrow_previous.disabled{background-position:0 -87px;cursor:default}
|
159 |
-
div.light_rounded .pp_arrow_next.disabled,div.dark_rounded .pp_arrow_next.disabled,div.dark_square .pp_arrow_next.disabled,div.light_square .pp_arrow_next.disabled{background-position:-22px -87px;cursor:default}
|
160 |
-
div.light_rounded .pp_loaderIcon,div.light_square .pp_loaderIcon{background:url(../images/prettyPhoto/light_rounded/loader.gif) center center no-repeat}
|
161 |
-
div.dark_rounded .pp_top .pp_middle,div.dark_rounded .pp_content,div.dark_rounded .pp_bottom .pp_middle{background:url(../images/prettyPhoto/dark_rounded/contentPattern.png) top left repeat}
|
162 |
-
div.dark_rounded .currentTextHolder,div.dark_square .currentTextHolder{color:#c4c4c4}
|
163 |
-
div.dark_rounded #pp_full_res .pp_inline,div.dark_square #pp_full_res .pp_inline{color:#fff}
|
164 |
-
.pp_top,.pp_bottom{height:20px;position:relative}
|
165 |
-
* html .pp_top,* html .pp_bottom{padding:0 20px}
|
166 |
-
.pp_top .pp_left,.pp_bottom .pp_left{height:20px;left:0;position:absolute;width:20px}
|
167 |
-
.pp_top .pp_middle,.pp_bottom .pp_middle{height:20px;left:20px;position:absolute;right:20px}
|
168 |
-
* html .pp_top .pp_middle,* html .pp_bottom .pp_middle{left:0;position:static}
|
169 |
-
.pp_top .pp_right,.pp_bottom .pp_right{height:20px;left:auto;position:absolute;right:0;top:0;width:20px}
|
170 |
-
.pp_fade,.pp_gallery li.default a img{display:none}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/prettyphoto/jquery.prettyPhoto.js
ADDED
@@ -0,0 +1,982 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* ------------------------------------------------------------------------
|
2 |
+
Class: prettyPhoto
|
3 |
+
Use: Lightbox clone for jQuery
|
4 |
+
Author: Stephane Caron (http://www.no-margin-for-errors.com)
|
5 |
+
Version: 3.1.6
|
6 |
+
------------------------------------------------------------------------- */
|
7 |
+
(function($) {
|
8 |
+
$.prettyPhoto = {version: '3.1.6'};
|
9 |
+
|
10 |
+
$.fn.prettyPhoto = function(pp_settings) {
|
11 |
+
pp_settings = jQuery.extend({
|
12 |
+
hook: 'rel', /* the attribute tag to use for prettyPhoto hooks. default: 'rel'. For HTML5, use "data-rel" or similar. */
|
13 |
+
animation_speed: 'fast', /* fast/slow/normal */
|
14 |
+
ajaxcallback: function() {},
|
15 |
+
slideshow: 5000, /* false OR interval time in ms */
|
16 |
+
autoplay_slideshow: false, /* true/false */
|
17 |
+
opacity: 0.80, /* Value between 0 and 1 */
|
18 |
+
show_title: true, /* true/false */
|
19 |
+
allow_resize: true, /* Resize the photos bigger than viewport. true/false */
|
20 |
+
allow_expand: true, /* Allow the user to expand a resized image. true/false */
|
21 |
+
default_width: 500,
|
22 |
+
default_height: 344,
|
23 |
+
counter_separator_label: '/', /* The separator for the gallery counter 1 "of" 2 */
|
24 |
+
theme: 'pp_default', /* light_rounded / dark_rounded / light_square / dark_square / facebook */
|
25 |
+
horizontal_padding: 20, /* The padding on each side of the picture */
|
26 |
+
hideflash: false, /* Hides all the flash object on a page, set to TRUE if flash appears over prettyPhoto */
|
27 |
+
wmode: 'opaque', /* Set the flash wmode attribute */
|
28 |
+
autoplay: true, /* Automatically start videos: True/False */
|
29 |
+
modal: false, /* If set to true, only the close button will close the window */
|
30 |
+
deeplinking: true, /* Allow prettyPhoto to update the url to enable deeplinking. */
|
31 |
+
overlay_gallery: true, /* If set to true, a gallery will overlay the fullscreen image on mouse over */
|
32 |
+
overlay_gallery_max: 30, /* Maximum number of pictures in the overlay gallery */
|
33 |
+
keyboard_shortcuts: true, /* Set to false if you open forms inside prettyPhoto */
|
34 |
+
changepicturecallback: function(){}, /* Called everytime an item is shown/changed */
|
35 |
+
callback: function(){}, /* Called when prettyPhoto is closed */
|
36 |
+
ie6_fallback: true,
|
37 |
+
markup: '<div class="pp_pic_holder"> \
|
38 |
+
<div class="ppt"> </div> \
|
39 |
+
<div class="pp_top"> \
|
40 |
+
<div class="pp_left"></div> \
|
41 |
+
<div class="pp_middle"></div> \
|
42 |
+
<div class="pp_right"></div> \
|
43 |
+
</div> \
|
44 |
+
<div class="pp_content_container"> \
|
45 |
+
<div class="pp_left"> \
|
46 |
+
<div class="pp_right"> \
|
47 |
+
<div class="pp_content"> \
|
48 |
+
<div class="pp_loaderIcon"></div> \
|
49 |
+
<div class="pp_fade"> \
|
50 |
+
<a href="#" class="pp_expand" title="Expand the image">Expand</a> \
|
51 |
+
<div class="pp_hoverContainer"> \
|
52 |
+
<a class="pp_next" href="#">next</a> \
|
53 |
+
<a class="pp_previous" href="#">previous</a> \
|
54 |
+
</div> \
|
55 |
+
<div id="pp_full_res"></div> \
|
56 |
+
<div class="pp_details"> \
|
57 |
+
<div class="pp_nav"> \
|
58 |
+
<a href="#" class="pp_arrow_previous">Previous</a> \
|
59 |
+
<p class="currentTextHolder">0/0</p> \
|
60 |
+
<a href="#" class="pp_arrow_next">Next</a> \
|
61 |
+
</div> \
|
62 |
+
<p class="pp_description"></p> \
|
63 |
+
<div class="pp_social">{pp_social}</div> \
|
64 |
+
<a class="pp_close" href="#">Close</a> \
|
65 |
+
</div> \
|
66 |
+
</div> \
|
67 |
+
</div> \
|
68 |
+
</div> \
|
69 |
+
</div> \
|
70 |
+
</div> \
|
71 |
+
<div class="pp_bottom"> \
|
72 |
+
<div class="pp_left"></div> \
|
73 |
+
<div class="pp_middle"></div> \
|
74 |
+
<div class="pp_right"></div> \
|
75 |
+
</div> \
|
76 |
+
</div> \
|
77 |
+
<div class="pp_overlay"></div>',
|
78 |
+
gallery_markup: '<div class="pp_gallery"> \
|
79 |
+
<a href="#" class="pp_arrow_previous">Previous</a> \
|
80 |
+
<div> \
|
81 |
+
<ul> \
|
82 |
+
{gallery} \
|
83 |
+
</ul> \
|
84 |
+
</div> \
|
85 |
+
<a href="#" class="pp_arrow_next">Next</a> \
|
86 |
+
</div>',
|
87 |
+
image_markup: '<img id="fullResImage" src="{path}" />',
|
88 |
+
flash_markup: '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="{width}" height="{height}"><param name="wmode" value="{wmode}" /><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="{path}" /><embed src="{path}" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="{width}" height="{height}" wmode="{wmode}"></embed></object>',
|
89 |
+
quicktime_markup: '<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="//www.apple.com/qtactivex/qtplugin.cab" height="{height}" width="{width}"><param name="src" value="{path}"><param name="autoplay" value="{autoplay}"><param name="type" value="video/quicktime"><embed src="{path}" height="{height}" width="{width}" autoplay="{autoplay}" type="video/quicktime" pluginspage="//www.apple.com/quicktime/download/"></embed></object>',
|
90 |
+
iframe_markup: '<iframe src ="{path}" width="{width}" height="{height}" frameborder="no"></iframe>',
|
91 |
+
inline_markup: '<div class="pp_inline">{content}</div>',
|
92 |
+
custom_markup: '',
|
93 |
+
social_tools: '<div class="twitter"><a href="//twitter.com/share" class="twitter-share-button" data-count="none">Tweet</a><script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?"http":"https";if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document, "script", "twitter-wjs");</script></div><div class="facebook"><iframe src="//www.facebook.com/plugins/like.php?locale=en_US&href={location_href}&layout=button_count&show_faces=true&width=500&action=like&font&colorscheme=light&height=23" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:500px; height:23px;" allowTransparency="true"></iframe></div>' /* html or false to disable */
|
94 |
+
}, pp_settings);
|
95 |
+
|
96 |
+
var isMobile = {
|
97 |
+
Android: function() {
|
98 |
+
return navigator.userAgent.match( /Android/i );
|
99 |
+
},
|
100 |
+
BlackBerry: function() {
|
101 |
+
return navigator.userAgent.match( /BlackBerry/i );
|
102 |
+
},
|
103 |
+
iOS: function() {
|
104 |
+
return navigator.userAgent.match( /iPhone|iPad|iPod/i );
|
105 |
+
},
|
106 |
+
Opera: function() {
|
107 |
+
return navigator.userAgent.match( /Opera Mini/i );
|
108 |
+
},
|
109 |
+
Windows: function() {
|
110 |
+
return navigator.userAgent.match( /IEMobile/i );
|
111 |
+
},
|
112 |
+
any: function() {
|
113 |
+
return ( isMobile.Android() || isMobile.BlackBerry() || isMobile.iOS() || isMobile.Opera() || isMobile.Windows() );
|
114 |
+
}
|
115 |
+
};
|
116 |
+
|
117 |
+
function fitToMobileViewport( newWindowWidth, newWindowHeight, imgWidth, imgHeight ) {
|
118 |
+
var newHeight = 0,
|
119 |
+
newWidth = 0;
|
120 |
+
|
121 |
+
if ( imgWidth > imgHeight ) {
|
122 |
+
newWidth = newWindowWidth;
|
123 |
+
newHeight = Math.round( imgHeight * newWindowWidth / imgWidth );
|
124 |
+
} else {
|
125 |
+
newWidth = Math.round( imgWidth * newWindowHeight / imgHeight );
|
126 |
+
newHeight = newWindowHeight;
|
127 |
+
}
|
128 |
+
|
129 |
+
return _fitToViewport( newWidth, newHeight );
|
130 |
+
}
|
131 |
+
|
132 |
+
// Global variables accessible only by prettyPhoto
|
133 |
+
var matchedObjects = this, percentBased = false, pp_dimensions, pp_open,
|
134 |
+
|
135 |
+
// prettyPhoto container specific
|
136 |
+
pp_contentHeight, pp_contentWidth, pp_containerHeight, pp_containerWidth,
|
137 |
+
|
138 |
+
// Window size
|
139 |
+
windowHeight = $(window).height(), windowWidth = $(window).width(),
|
140 |
+
|
141 |
+
// Global elements
|
142 |
+
pp_slideshow;
|
143 |
+
|
144 |
+
doresize = true, scroll_pos = _get_scroll();
|
145 |
+
|
146 |
+
// Window/Keyboard events
|
147 |
+
$(window).unbind('resize.prettyphoto').bind('resize.prettyphoto',function(){ _center_overlay(); _resize_overlay(); });
|
148 |
+
|
149 |
+
if(pp_settings.keyboard_shortcuts) {
|
150 |
+
$(document).unbind('keydown.prettyphoto').bind('keydown.prettyphoto',function(e){
|
151 |
+
if(typeof $pp_pic_holder != 'undefined'){
|
152 |
+
if($pp_pic_holder.is(':visible')){
|
153 |
+
switch(e.keyCode){
|
154 |
+
case 37:
|
155 |
+
$.prettyPhoto.changePage('previous');
|
156 |
+
e.preventDefault();
|
157 |
+
break;
|
158 |
+
case 39:
|
159 |
+
$.prettyPhoto.changePage('next');
|
160 |
+
e.preventDefault();
|
161 |
+
break;
|
162 |
+
case 27:
|
163 |
+
if(!settings.modal)
|
164 |
+
$.prettyPhoto.close();
|
165 |
+
e.preventDefault();
|
166 |
+
break;
|
167 |
+
};
|
168 |
+
// return false;
|
169 |
+
};
|
170 |
+
};
|
171 |
+
});
|
172 |
+
};
|
173 |
+
|
174 |
+
/**
|
175 |
+
* Initialize prettyPhoto.
|
176 |
+
*/
|
177 |
+
$.prettyPhoto.initialize = function() {
|
178 |
+
|
179 |
+
settings = pp_settings;
|
180 |
+
|
181 |
+
if(settings.theme == 'pp_default') settings.horizontal_padding = 16;
|
182 |
+
|
183 |
+
// Find out if the picture is part of a set
|
184 |
+
theRel = $(this).attr(settings.hook);
|
185 |
+
galleryRegExp = /\-(?:.*)/;
|
186 |
+
isSet = (galleryRegExp.exec(theRel)) ? true : false;
|
187 |
+
|
188 |
+
// Put the SRCs, TITLEs, ALTs into an array.
|
189 |
+
pp_images = (isSet) ? jQuery.map(matchedObjects, function(n, i){ if($(n).attr(settings.hook).indexOf(theRel) != -1) return $(n).attr('href'); }) : $.makeArray($(this).attr('href'));
|
190 |
+
pp_titles = (isSet) ? jQuery.map(matchedObjects, function(n, i){ if($(n).attr(settings.hook).indexOf(theRel) != -1) return ($(n).find('img').attr('alt')) ? $(n).find('img').attr('alt') : ""; }) : $.makeArray($(this).find('img').attr('alt'));
|
191 |
+
pp_descriptions = (isSet) ? jQuery.map(matchedObjects, function(n, i){ if($(n).attr(settings.hook).indexOf(theRel) != -1) return ($(n).attr('title')) ? $(n).attr('title') : ""; }) : $.makeArray($(this).attr('title'));
|
192 |
+
|
193 |
+
if(pp_images.length > settings.overlay_gallery_max) settings.overlay_gallery = false;
|
194 |
+
|
195 |
+
set_position = jQuery.inArray($(this).attr('href'), pp_images); // Define where in the array the clicked item is positionned
|
196 |
+
rel_index = (isSet) ? set_position : $("a["+settings.hook+"^='"+theRel+"']").index($(this));
|
197 |
+
|
198 |
+
_build_overlay(this); // Build the overlay {this} being the caller
|
199 |
+
|
200 |
+
if(settings.allow_resize)
|
201 |
+
$(window).bind('scroll.prettyphoto',function(){ _center_overlay(); });
|
202 |
+
|
203 |
+
|
204 |
+
$.prettyPhoto.open();
|
205 |
+
|
206 |
+
return false;
|
207 |
+
}
|
208 |
+
|
209 |
+
|
210 |
+
/**
|
211 |
+
* Opens the prettyPhoto modal box.
|
212 |
+
* @param image {String,Array} Full path to the image to be open, can also be an array containing full images paths.
|
213 |
+
* @param title {String,Array} The title to be displayed with the picture, can also be an array containing all the titles.
|
214 |
+
* @param description {String,Array} The description to be displayed with the picture, can also be an array containing all the descriptions.
|
215 |
+
*/
|
216 |
+
$.prettyPhoto.open = function(event) {
|
217 |
+
if(typeof settings == "undefined"){ // Means it's an API call, need to manually get the settings and set the variables
|
218 |
+
settings = pp_settings;
|
219 |
+
pp_images = $.makeArray(arguments[0]);
|
220 |
+
pp_titles = (arguments[1]) ? $.makeArray(arguments[1]) : $.makeArray("");
|
221 |
+
pp_descriptions = (arguments[2]) ? $.makeArray(arguments[2]) : $.makeArray("");
|
222 |
+
isSet = (pp_images.length > 1) ? true : false;
|
223 |
+
set_position = (arguments[3])? arguments[3]: 0;
|
224 |
+
_build_overlay(event.target); // Build the overlay {this} being the caller
|
225 |
+
}
|
226 |
+
|
227 |
+
if(settings.hideflash) $('object,embed,iframe[src*=youtube],iframe[src*=vimeo]').css('visibility','hidden'); // Hide the flash
|
228 |
+
|
229 |
+
_checkPosition($(pp_images).size()); // Hide the next/previous links if on first or last images.
|
230 |
+
|
231 |
+
$('.pp_loaderIcon').show();
|
232 |
+
|
233 |
+
if(settings.deeplinking)
|
234 |
+
setHashtag();
|
235 |
+
|
236 |
+
// Rebuild Facebook Like Button with updated href
|
237 |
+
if(settings.social_tools){
|
238 |
+
facebook_like_link = settings.social_tools.replace('{location_href}', encodeURIComponent(location.href));
|
239 |
+
$pp_pic_holder.find('.pp_social').html(facebook_like_link);
|
240 |
+
}
|
241 |
+
|
242 |
+
// Fade the content in
|
243 |
+
if($ppt.is(':hidden')) $ppt.css('opacity',0).show();
|
244 |
+
$pp_overlay.show().fadeTo(settings.animation_speed,settings.opacity);
|
245 |
+
|
246 |
+
// Display the current position
|
247 |
+
$pp_pic_holder.find('.currentTextHolder').text((set_position+1) + settings.counter_separator_label + $(pp_images).size());
|
248 |
+
|
249 |
+
// Set the description
|
250 |
+
if(typeof pp_descriptions[set_position] != 'undefined' && pp_descriptions[set_position] != ""){
|
251 |
+
$pp_pic_holder.find('.pp_description').show().html(unescape(pp_descriptions[set_position]));
|
252 |
+
}else{
|
253 |
+
$pp_pic_holder.find('.pp_description').hide();
|
254 |
+
}
|
255 |
+
|
256 |
+
// Get the dimensions
|
257 |
+
movie_width = ( parseFloat(getParam('width',pp_images[set_position])) ) ? getParam('width',pp_images[set_position]) : settings.default_width.toString();
|
258 |
+
movie_height = ( parseFloat(getParam('height',pp_images[set_position])) ) ? getParam('height',pp_images[set_position]) : settings.default_height.toString();
|
259 |
+
|
260 |
+
// If the size is % based, calculate according to window dimensions
|
261 |
+
percentBased=false;
|
262 |
+
if(movie_height.indexOf('%') != -1) { movie_height = parseFloat(($(window).height() * parseFloat(movie_height) / 100) - 150); percentBased = true; }
|
263 |
+
if(movie_width.indexOf('%') != -1) { movie_width = parseFloat(($(window).width() * parseFloat(movie_width) / 100) - 150); percentBased = true; }
|
264 |
+
|
265 |
+
// Fade the holder
|
266 |
+
$pp_pic_holder.fadeIn(function(){
|
267 |
+
// Set the title
|
268 |
+
(settings.show_title && pp_titles[set_position] != "" && typeof pp_titles[set_position] != "undefined") ? $ppt.html(unescape(pp_titles[set_position])) : $ppt.html(' ');
|
269 |
+
|
270 |
+
imgPreloader = "";
|
271 |
+
skipInjection = false;
|
272 |
+
|
273 |
+
// Inject the proper content
|
274 |
+
switch(_getFileType(pp_images[set_position])){
|
275 |
+
case 'image':
|
276 |
+
imgPreloader = new Image();
|
277 |
+
|
278 |
+
// Preload the neighbour images
|
279 |
+
nextImage = new Image();
|
280 |
+
if(isSet && set_position < $(pp_images).size() -1) nextImage.src = pp_images[set_position + 1];
|
281 |
+
prevImage = new Image();
|
282 |
+
if(isSet && pp_images[set_position - 1]) prevImage.src = pp_images[set_position - 1];
|
283 |
+
|
284 |
+
$pp_pic_holder.find('#pp_full_res')[0].innerHTML = settings.image_markup.replace(/{path}/g,pp_images[set_position]);
|
285 |
+
|
286 |
+
imgPreloader.onload = function() {
|
287 |
+
// Fit item to viewport
|
288 |
+
if ( isMobile.any() )
|
289 |
+
pp_dimensions = fitToMobileViewport( Math.round( windowWidth * 0.9 ), Math.round( windowHeight * 0.9 ), imgPreloader.width, imgPreloader.height );
|
290 |
+
else
|
291 |
+
pp_dimensions = _fitToViewport(imgPreloader.width,imgPreloader.height);
|
292 |
+
|
293 |
+
_showContent();
|
294 |
+
};
|
295 |
+
|
296 |
+
imgPreloader.onerror = function(){
|
297 |
+
alert('Image cannot be loaded. Make sure the path is correct and image exist.');
|
298 |
+
$.prettyPhoto.close();
|
299 |
+
};
|
300 |
+
|
301 |
+
imgPreloader.src = pp_images[set_position];
|
302 |
+
break;
|
303 |
+
|
304 |
+
case 'youtube':
|
305 |
+
// Fit item to viewport
|
306 |
+
if ( isMobile.any() )
|
307 |
+
pp_dimensions = fitToMobileViewport( Math.round( windowWidth * 0.9 ), Math.round( windowHeight * 0.9 ), movie_width, movie_height );
|
308 |
+
else
|
309 |
+
pp_dimensions = _fitToViewport( movie_width, movie_height );
|
310 |
+
|
311 |
+
// Regular youtube link
|
312 |
+
movie_id = getParam('v',pp_images[set_position]);
|
313 |
+
|
314 |
+
// youtu.be link
|
315 |
+
if(movie_id == ""){
|
316 |
+
movie_id = pp_images[set_position].split('youtu.be/');
|
317 |
+
movie_id = movie_id[1];
|
318 |
+
if(movie_id.indexOf('?') > 0)
|
319 |
+
movie_id = movie_id.substr(0,movie_id.indexOf('?')); // Strip anything after the ?
|
320 |
+
|
321 |
+
if(movie_id.indexOf('&') > 0)
|
322 |
+
movie_id = movie_id.substr(0,movie_id.indexOf('&')); // Strip anything after the &
|
323 |
+
}
|
324 |
+
|
325 |
+
movie = '//www.youtube.com/embed/'+movie_id;
|
326 |
+
(getParam('rel',pp_images[set_position])) ? movie+="?rel="+getParam('rel',pp_images[set_position]) : movie+="?rel=1";
|
327 |
+
|
328 |
+
if(settings.autoplay) movie += "&autoplay=1";
|
329 |
+
|
330 |
+
toInject = settings.iframe_markup.replace(/{width}/g,pp_dimensions['width']).replace(/{height}/g,pp_dimensions['height']).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,movie);
|
331 |
+
break;
|
332 |
+
|
333 |
+
case 'vimeo':
|
334 |
+
// Fit item to viewport
|
335 |
+
if ( isMobile.any() )
|
336 |
+
pp_dimensions = fitToMobileViewport( Math.round( windowWidth * 0.9 ), Math.round( windowHeight * 0.9 ), movie_width, movie_height );
|
337 |
+
else
|
338 |
+
pp_dimensions = _fitToViewport( movie_width, movie_height );
|
339 |
+
|
340 |
+
movie_id = pp_images[set_position];
|
341 |
+
var regExp = /http(s?):\/\/(www\.)?vimeo.com\/(\d+)/;
|
342 |
+
var match = movie_id.match(regExp);
|
343 |
+
|
344 |
+
movie = '//player.vimeo.com/video/'+ match[3] +'?title=0&byline=0&portrait=0';
|
345 |
+
if(settings.autoplay) movie += "&autoplay=1;";
|
346 |
+
|
347 |
+
vimeo_width = pp_dimensions['width'] + '/embed/?moog_width='+ pp_dimensions['width'];
|
348 |
+
|
349 |
+
toInject = settings.iframe_markup.replace(/{width}/g,vimeo_width).replace(/{height}/g,pp_dimensions['height']).replace(/{path}/g,movie);
|
350 |
+
break;
|
351 |
+
|
352 |
+
case 'quicktime':
|
353 |
+
pp_dimensions = _fitToViewport(movie_width,movie_height); // Fit item to viewport
|
354 |
+
pp_dimensions['height']+=15; pp_dimensions['contentHeight']+=15; pp_dimensions['containerHeight']+=15; // Add space for the control bar
|
355 |
+
|
356 |
+
toInject = settings.quicktime_markup.replace(/{width}/g,pp_dimensions['width']).replace(/{height}/g,pp_dimensions['height']).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,pp_images[set_position]).replace(/{autoplay}/g,settings.autoplay);
|
357 |
+
break;
|
358 |
+
|
359 |
+
case 'flash':
|
360 |
+
// Fit item to viewport
|
361 |
+
if ( isMobile.any() )
|
362 |
+
pp_dimensions = fitToMobileViewport( Math.round( windowWidth * 0.9 ), Math.round( windowHeight * 0.9 ), movie_width, movie_height );
|
363 |
+
else
|
364 |
+
pp_dimensions = _fitToViewport( movie_width, movie_height );
|
365 |
+
|
366 |
+
flash_vars = pp_images[set_position];
|
367 |
+
flash_vars = flash_vars.substring(pp_images[set_position].indexOf('flashvars') + 10,pp_images[set_position].length);
|
368 |
+
|
369 |
+
filename = pp_images[set_position];
|
370 |
+
filename = filename.substring(0,filename.indexOf('?'));
|
371 |
+
|
372 |
+
toInject = settings.flash_markup.replace(/{width}/g,pp_dimensions['width']).replace(/{height}/g,pp_dimensions['height']).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,filename+'?'+flash_vars);
|
373 |
+
break;
|
374 |
+
|
375 |
+
case 'iframe':
|
376 |
+
// Fit item to viewport
|
377 |
+
if ( isMobile.any() )
|
378 |
+
pp_dimensions = fitToMobileViewport( Math.round( windowWidth * 0.9 ), Math.round( windowHeight * 0.9 ), movie_width, movie_height );
|
379 |
+
else
|
380 |
+
pp_dimensions = _fitToViewport( movie_width, movie_height );
|
381 |
+
|
382 |
+
frame_url = pp_images[set_position];
|
383 |
+
frame_url = frame_url.substr(0,frame_url.indexOf('iframe')-1);
|
384 |
+
|
385 |
+
toInject = settings.iframe_markup.replace(/{width}/g,pp_dimensions['width']).replace(/{height}/g,pp_dimensions['height']).replace(/{path}/g,frame_url);
|
386 |
+
break;
|
387 |
+
|
388 |
+
case 'ajax':
|
389 |
+
doresize = false; // Make sure the dimensions are not resized.
|
390 |
+
|
391 |
+
// Fit item to viewport
|
392 |
+
if ( isMobile.any() )
|
393 |
+
pp_dimensions = fitToMobileViewport( Math.round( windowWidth * 0.9 ), Math.round( windowHeight * 0.9 ), movie_width, movie_height );
|
394 |
+
else
|
395 |
+
pp_dimensions = _fitToViewport( movie_width, movie_height );
|
396 |
+
|
397 |
+
doresize = true; // Reset the dimensions
|
398 |
+
|
399 |
+
skipInjection = true;
|
400 |
+
$.get(pp_images[set_position],function(responseHTML){
|
401 |
+
toInject = settings.inline_markup.replace(/{content}/g,responseHTML);
|
402 |
+
$pp_pic_holder.find('#pp_full_res')[0].innerHTML = toInject;
|
403 |
+
_showContent();
|
404 |
+
});
|
405 |
+
|
406 |
+
break;
|
407 |
+
|
408 |
+
case 'custom':
|
409 |
+
// Fit item to viewport
|
410 |
+
if ( isMobile.any() )
|
411 |
+
pp_dimensions = fitToMobileViewport( Math.round( windowWidth * 0.9 ), Math.round( windowHeight * 0.9 ), movie_width, movie_height );
|
412 |
+
else
|
413 |
+
pp_dimensions = _fitToViewport( movie_width, movie_height );
|
414 |
+
|
415 |
+
toInject = settings.custom_markup;
|
416 |
+
break;
|
417 |
+
|
418 |
+
case 'inline':
|
419 |
+
// to get the item height clone it, apply default width, wrap it in the prettyPhoto containers , then delete
|
420 |
+
myClone = $(pp_images[set_position]).clone().append('<br clear="all" />').css({'width':settings.default_width}).wrapInner('<div id="pp_full_res"><div class="pp_inline"></div></div>').appendTo($('body')).show();
|
421 |
+
doresize = false; // Make sure the dimensions are not resized.
|
422 |
+
|
423 |
+
// Fit item to viewport
|
424 |
+
if ( isMobile.any() )
|
425 |
+
pp_dimensions = fitToMobileViewport( Math.round( windowWidth * 0.9 ), Math.round( windowHeight * 0.9 ), $(myClone).width(), $(myClone).height() );
|
426 |
+
else
|
427 |
+
pp_dimensions = _fitToViewport( $(myClone).width(), $(myClone).height() );
|
428 |
+
|
429 |
+
doresize = true; // Reset the dimensions
|
430 |
+
$(myClone).remove();
|
431 |
+
toInject = settings.inline_markup.replace(/{content}/g,$(pp_images[set_position]).html());
|
432 |
+
break;
|
433 |
+
};
|
434 |
+
|
435 |
+
if(!imgPreloader && !skipInjection){
|
436 |
+
$pp_pic_holder.find('#pp_full_res')[0].innerHTML = toInject;
|
437 |
+
|
438 |
+
// Show content
|
439 |
+
_showContent();
|
440 |
+
};
|
441 |
+
});
|
442 |
+
|
443 |
+
return false;
|
444 |
+
};
|
445 |
+
|
446 |
+
|
447 |
+
/**
|
448 |
+
* Change page in the prettyPhoto modal box
|
449 |
+
* @param direction {String} Direction of the paging, previous or next.
|
450 |
+
*/
|
451 |
+
$.prettyPhoto.changePage = function(direction){
|
452 |
+
currentGalleryPage = 0;
|
453 |
+
|
454 |
+
if(direction == 'previous') {
|
455 |
+
set_position--;
|
456 |
+
if (set_position < 0) set_position = $(pp_images).size()-1;
|
457 |
+
}else if(direction == 'next'){
|
458 |
+
set_position++;
|
459 |
+
if(set_position > $(pp_images).size()-1) set_position = 0;
|
460 |
+
}else{
|
461 |
+
set_position=direction;
|
462 |
+
};
|
463 |
+
|
464 |
+
rel_index = set_position;
|
465 |
+
|
466 |
+
if(!doresize) doresize = true; // Allow the resizing of the images
|
467 |
+
if(settings.allow_expand) {
|
468 |
+
$('.pp_contract').removeClass('pp_contract').addClass('pp_expand');
|
469 |
+
}
|
470 |
+
|
471 |
+
_hideContent(function(){ $.prettyPhoto.open(); });
|
472 |
+
};
|
473 |
+
|
474 |
+
|
475 |
+
/**
|
476 |
+
* Change gallery page in the prettyPhoto modal box
|
477 |
+
* @param direction {String} Direction of the paging, previous or next.
|
478 |
+
*/
|
479 |
+
$.prettyPhoto.changeGalleryPage = function(direction){
|
480 |
+
if(direction=='next'){
|
481 |
+
currentGalleryPage ++;
|
482 |
+
|
483 |
+
if(currentGalleryPage > totalPage) currentGalleryPage = 0;
|
484 |
+
}else if(direction=='previous'){
|
485 |
+
currentGalleryPage --;
|
486 |
+
|
487 |
+
if(currentGalleryPage < 0) currentGalleryPage = totalPage;
|
488 |
+
}else{
|
489 |
+
currentGalleryPage = direction;
|
490 |
+
};
|
491 |
+
|
492 |
+
slide_speed = (direction == 'next' || direction == 'previous') ? settings.animation_speed : 0;
|
493 |
+
|
494 |
+
slide_to = currentGalleryPage * (itemsPerPage * itemWidth);
|
495 |
+
|
496 |
+
$pp_gallery.find('ul').animate({left:-slide_to},slide_speed);
|
497 |
+
};
|
498 |
+
|
499 |
+
|
500 |
+
/**
|
501 |
+
* Start the slideshow...
|
502 |
+
*/
|
503 |
+
$.prettyPhoto.startSlideshow = function(){
|
504 |
+
if(typeof pp_slideshow == 'undefined'){
|
505 |
+
$pp_pic_holder.find('.pp_play').unbind('click').removeClass('pp_play').addClass('pp_pause').click(function(){
|
506 |
+
$.prettyPhoto.stopSlideshow();
|
507 |
+
return false;
|
508 |
+
});
|
509 |
+
pp_slideshow = setInterval($.prettyPhoto.startSlideshow,settings.slideshow);
|
510 |
+
}else{
|
511 |
+
$.prettyPhoto.changePage('next');
|
512 |
+
};
|
513 |
+
}
|
514 |
+
|
515 |
+
|
516 |
+
/**
|
517 |
+
* Stop the slideshow...
|
518 |
+
*/
|
519 |
+
$.prettyPhoto.stopSlideshow = function(){
|
520 |
+
$pp_pic_holder.find('.pp_pause').unbind('click').removeClass('pp_pause').addClass('pp_play').click(function(){
|
521 |
+
$.prettyPhoto.startSlideshow();
|
522 |
+
return false;
|
523 |
+
});
|
524 |
+
clearInterval(pp_slideshow);
|
525 |
+
pp_slideshow=undefined;
|
526 |
+
}
|
527 |
+
|
528 |
+
|
529 |
+
/**
|
530 |
+
* Closes prettyPhoto.
|
531 |
+
*/
|
532 |
+
$.prettyPhoto.close = function(){
|
533 |
+
if($pp_overlay.is(":animated")) return;
|
534 |
+
|
535 |
+
$.prettyPhoto.stopSlideshow();
|
536 |
+
|
537 |
+
$pp_pic_holder.stop().find('object,embed').css('visibility','hidden');
|
538 |
+
|
539 |
+
$('div.pp_pic_holder,div.ppt,.pp_fade').fadeOut(settings.animation_speed,function(){ $(this).remove(); });
|
540 |
+
|
541 |
+
$pp_overlay.fadeOut(settings.animation_speed, function(){
|
542 |
+
|
543 |
+
if(settings.hideflash) $('object,embed,iframe[src*=youtube],iframe[src*=vimeo]').css('visibility','visible'); // Show the flash
|
544 |
+
|
545 |
+
$(this).remove(); // No more need for the prettyPhoto markup
|
546 |
+
|
547 |
+
$(window).unbind('scroll.prettyphoto');
|
548 |
+
|
549 |
+
clearHashtag();
|
550 |
+
|
551 |
+
settings.callback();
|
552 |
+
|
553 |
+
doresize = true;
|
554 |
+
|
555 |
+
pp_open = false;
|
556 |
+
|
557 |
+
delete settings;
|
558 |
+
});
|
559 |
+
};
|
560 |
+
|
561 |
+
/**
|
562 |
+
* Set the proper sizes on the containers and animate the content in.
|
563 |
+
*/
|
564 |
+
function _showContent(){
|
565 |
+
$('.pp_loaderIcon').hide();
|
566 |
+
|
567 |
+
// Calculate the opened top position of the pic holder
|
568 |
+
projectedTop = scroll_pos['scrollTop'] + ((windowHeight/2) - (pp_dimensions['containerHeight']/2));
|
569 |
+
if(projectedTop < 0) projectedTop = 0;
|
570 |
+
|
571 |
+
$ppt.fadeTo(settings.animation_speed,1);
|
572 |
+
|
573 |
+
// Resize the content holder
|
574 |
+
$pp_pic_holder.find('.pp_content')
|
575 |
+
.animate({
|
576 |
+
height:pp_dimensions['contentHeight'],
|
577 |
+
width:pp_dimensions['contentWidth']
|
578 |
+
},settings.animation_speed);
|
579 |
+
|
580 |
+
// Resize picture the holder
|
581 |
+
$pp_pic_holder.animate({
|
582 |
+
'top': projectedTop,
|
583 |
+
'left': ((windowWidth/2) - (pp_dimensions['containerWidth']/2) < 0) ? 0 : (windowWidth/2) - (pp_dimensions['containerWidth']/2),
|
584 |
+
width:pp_dimensions['containerWidth']
|
585 |
+
},settings.animation_speed,function(){
|
586 |
+
$pp_pic_holder.find('.pp_hoverContainer,#fullResImage').height(pp_dimensions['height']).width(pp_dimensions['width']);
|
587 |
+
|
588 |
+
$pp_pic_holder.find('.pp_fade').fadeIn(settings.animation_speed); // Fade the new content
|
589 |
+
|
590 |
+
// Show the nav
|
591 |
+
if(isSet && _getFileType(pp_images[set_position])=="image") { $pp_pic_holder.find('.pp_hoverContainer').show(); }else{ $pp_pic_holder.find('.pp_hoverContainer').hide(); }
|
592 |
+
|
593 |
+
if(settings.allow_expand) {
|
594 |
+
if(pp_dimensions['resized']){ // Fade the resizing link if the image is resized
|
595 |
+
$('a.pp_expand,a.pp_contract').show();
|
596 |
+
}else{
|
597 |
+
$('a.pp_expand').hide();
|
598 |
+
}
|
599 |
+
}
|
600 |
+
|
601 |
+
if(settings.autoplay_slideshow && !pp_slideshow && !pp_open) $.prettyPhoto.startSlideshow();
|
602 |
+
|
603 |
+
settings.changepicturecallback(); // Callback!
|
604 |
+
|
605 |
+
pp_open = true;
|
606 |
+
});
|
607 |
+
|
608 |
+
_insert_gallery();
|
609 |
+
pp_settings.ajaxcallback();
|
610 |
+
};
|
611 |
+
|
612 |
+
/**
|
613 |
+
* Hide the content...DUH!
|
614 |
+
*/
|
615 |
+
function _hideContent(callback){
|
616 |
+
// Fade out the current picture
|
617 |
+
$pp_pic_holder.find('#pp_full_res object,#pp_full_res embed').css('visibility','hidden');
|
618 |
+
$pp_pic_holder.find('.pp_fade').fadeOut(settings.animation_speed,function(){
|
619 |
+
$('.pp_loaderIcon').show();
|
620 |
+
|
621 |
+
callback();
|
622 |
+
});
|
623 |
+
};
|
624 |
+
|
625 |
+
/**
|
626 |
+
* Check the item position in the gallery array, hide or show the navigation links
|
627 |
+
* @param setCount {integer} The total number of items in the set
|
628 |
+
*/
|
629 |
+
function _checkPosition(setCount){
|
630 |
+
(setCount > 1) ? $('.pp_nav').show() : $('.pp_nav').hide(); // Hide the bottom nav if it's not a set.
|
631 |
+
};
|
632 |
+
|
633 |
+
/**
|
634 |
+
* Resize the item dimensions if it's bigger than the viewport
|
635 |
+
* @param width {integer} Width of the item to be opened
|
636 |
+
* @param height {integer} Height of the item to be opened
|
637 |
+
* @return An array containin the "fitted" dimensions
|
638 |
+
*/
|
639 |
+
function _fitToViewport(width,height){
|
640 |
+
resized = false;
|
641 |
+
|
642 |
+
_getDimensions(width,height);
|
643 |
+
|
644 |
+
// Define them in case there's no resize needed
|
645 |
+
imageWidth = width, imageHeight = height;
|
646 |
+
|
647 |
+
if( ((pp_containerWidth > windowWidth) || (pp_containerHeight > windowHeight)) && doresize && settings.allow_resize && !percentBased) {
|
648 |
+
resized = true, fitting = false;
|
649 |
+
|
650 |
+
while (!fitting){
|
651 |
+
if((pp_containerWidth > windowWidth)){
|
652 |
+
imageWidth = (windowWidth - 200);
|
653 |
+
imageHeight = (height/width) * imageWidth;
|
654 |
+
}else if((pp_containerHeight > windowHeight)){
|
655 |
+
imageHeight = (windowHeight - 200);
|
656 |
+
imageWidth = (width/height) * imageHeight;
|
657 |
+
}else{
|
658 |
+
fitting = true;
|
659 |
+
};
|
660 |
+
|
661 |
+
pp_containerHeight = imageHeight, pp_containerWidth = imageWidth;
|
662 |
+
};
|
663 |
+
|
664 |
+
|
665 |
+
|
666 |
+
if((pp_containerWidth > windowWidth) || (pp_containerHeight > windowHeight)){
|
667 |
+
_fitToViewport(pp_containerWidth,pp_containerHeight)
|
668 |
+
};
|
669 |
+
|
670 |
+
_getDimensions(imageWidth,imageHeight);
|
671 |
+
};
|
672 |
+
|
673 |
+
return {
|
674 |
+
width:Math.floor(imageWidth),
|
675 |
+
height:Math.floor(imageHeight),
|
676 |
+
containerHeight:Math.floor(pp_containerHeight),
|
677 |
+
containerWidth:Math.floor(pp_containerWidth) + (settings.horizontal_padding * 2),
|
678 |
+
contentHeight:Math.floor(pp_contentHeight),
|
679 |
+
contentWidth:Math.floor(pp_contentWidth),
|
680 |
+
resized:resized
|
681 |
+
};
|
682 |
+
};
|
683 |
+
|
684 |
+
/**
|
685 |
+
* Get the containers dimensions according to the item size
|
686 |
+
* @param width {integer} Width of the item to be opened
|
687 |
+
* @param height {integer} Height of the item to be opened
|
688 |
+
*/
|
689 |
+
function _getDimensions(width,height){
|
690 |
+
width = parseFloat(width);
|
691 |
+
height = parseFloat(height);
|
692 |
+
|
693 |
+
// Get the details height, to do so, I need to clone it since it's invisible
|
694 |
+
$pp_details = $pp_pic_holder.find('.pp_details');
|
695 |
+
$pp_details.width(width);
|
696 |
+
detailsHeight = parseFloat($pp_details.css('marginTop')) + parseFloat($pp_details.css('marginBottom'));
|
697 |
+
|
698 |
+
$pp_details = $pp_details.clone().addClass(settings.theme).width(width).appendTo($('body')).css({
|
699 |
+
'position':'absolute',
|
700 |
+
'top':-10000
|
701 |
+
});
|
702 |
+
detailsHeight += $pp_details.height();
|
703 |
+
detailsHeight = (detailsHeight <= 34) ? 36 : detailsHeight; // Min-height for the details
|
704 |
+
$pp_details.remove();
|
705 |
+
|
706 |
+
// Get the titles height, to do so, I need to clone it since it's invisible
|
707 |
+
$pp_title = $pp_pic_holder.find('.ppt');
|
708 |
+
$pp_title.width(width);
|
709 |
+
titleHeight = parseFloat($pp_title.css('marginTop')) + parseFloat($pp_title.css('marginBottom'));
|
710 |
+
$pp_title = $pp_title.clone().appendTo($('body')).css({
|
711 |
+
'position':'absolute',
|
712 |
+
'top':-10000
|
713 |
+
});
|
714 |
+
titleHeight += $pp_title.height();
|
715 |
+
$pp_title.remove();
|
716 |
+
|
717 |
+
// Get the container size, to resize the holder to the right dimensions
|
718 |
+
pp_contentHeight = height + detailsHeight;
|
719 |
+
pp_contentWidth = width;
|
720 |
+
pp_containerHeight = pp_contentHeight + titleHeight + $pp_pic_holder.find('.pp_top').height() + $pp_pic_holder.find('.pp_bottom').height();
|
721 |
+
pp_containerWidth = width;
|
722 |
+
}
|
723 |
+
|
724 |
+
function _getFileType(itemSrc){
|
725 |
+
if (itemSrc.match(/youtube\.com\/watch/i) || itemSrc.match(/youtu\.be/i)) {
|
726 |
+
return 'youtube';
|
727 |
+
}else if (itemSrc.match(/vimeo\.com/i)) {
|
728 |
+
return 'vimeo';
|
729 |
+
}else if(itemSrc.match(/\b.mov\b/i)){
|
730 |
+
return 'quicktime';
|
731 |
+
}else if(itemSrc.match(/\b.swf\b/i)){
|
732 |
+
return 'flash';
|
733 |
+
}else if(itemSrc.match(/\biframe=true\b/i)){
|
734 |
+
return 'iframe';
|
735 |
+
}else if(itemSrc.match(/\bajax=true\b/i)){
|
736 |
+
return 'ajax';
|
737 |
+
}else if(itemSrc.match(/\bcustom=true\b/i)){
|
738 |
+
return 'custom';
|
739 |
+
}else if(itemSrc.substr(0,1) == '#'){
|
740 |
+
return 'inline';
|
741 |
+
}else{
|
742 |
+
return 'image';
|
743 |
+
};
|
744 |
+
};
|
745 |
+
|
746 |
+
function _center_overlay(){
|
747 |
+
if(doresize && typeof $pp_pic_holder != 'undefined') {
|
748 |
+
scroll_pos = _get_scroll();
|
749 |
+
contentHeight = $pp_pic_holder.height(), contentwidth = $pp_pic_holder.width();
|
750 |
+
|
751 |
+
projectedTop = (windowHeight/2) + scroll_pos['scrollTop'] - (contentHeight/2);
|
752 |
+
if(projectedTop < 0) projectedTop = 0;
|
753 |
+
|
754 |
+
if(contentHeight > windowHeight)
|
755 |
+
return;
|
756 |
+
|
757 |
+
$pp_pic_holder.css({
|
758 |
+
'top': projectedTop,
|
759 |
+
'left': (windowWidth/2) + scroll_pos['scrollLeft'] - (contentwidth/2)
|
760 |
+
});
|
761 |
+
};
|
762 |
+
};
|
763 |
+
|
764 |
+
function _get_scroll(){
|
765 |
+
if (self.pageYOffset) {
|
766 |
+
return {scrollTop:self.pageYOffset,scrollLeft:self.pageXOffset};
|
767 |
+
} else if (document.documentElement && document.documentElement.scrollTop) { // Explorer 6 Strict
|
768 |
+
return {scrollTop:document.documentElement.scrollTop,scrollLeft:document.documentElement.scrollLeft};
|
769 |
+
} else if (document.body) {// all other Explorers
|
770 |
+
return {scrollTop:document.body.scrollTop,scrollLeft:document.body.scrollLeft};
|
771 |
+
};
|
772 |
+
};
|
773 |
+
|
774 |
+
function _resize_overlay() {
|
775 |
+
windowHeight = $(window).height(), windowWidth = $(window).width();
|
776 |
+
|
777 |
+
if(typeof $pp_overlay != "undefined") $pp_overlay.height($(document).height()).width(windowWidth);
|
778 |
+
};
|
779 |
+
|
780 |
+
function _insert_gallery(){
|
781 |
+
if(isSet && settings.overlay_gallery && _getFileType(pp_images[set_position])=="image") {
|
782 |
+
itemWidth = 52+5; // 52 beign the thumb width, 5 being the right margin.
|
783 |
+
navWidth = (settings.theme == "facebook" || settings.theme == "pp_default") ? 50 : 30; // Define the arrow width depending on the theme
|
784 |
+
|
785 |
+
itemsPerPage = Math.floor((pp_dimensions['containerWidth'] - 100 - navWidth) / itemWidth);
|
786 |
+
itemsPerPage = (itemsPerPage < pp_images.length) ? itemsPerPage : pp_images.length;
|
787 |
+
totalPage = Math.ceil(pp_images.length / itemsPerPage) - 1;
|
788 |
+
|
789 |
+
// Hide the nav in the case there's no need for links
|
790 |
+
if(totalPage == 0){
|
791 |
+
navWidth = 0; // No nav means no width!
|
792 |
+
$pp_gallery.find('.pp_arrow_next,.pp_arrow_previous').hide();
|
793 |
+
}else{
|
794 |
+
$pp_gallery.find('.pp_arrow_next,.pp_arrow_previous').show();
|
795 |
+
};
|
796 |
+
|
797 |
+
galleryWidth = itemsPerPage * itemWidth;
|
798 |
+
fullGalleryWidth = pp_images.length * itemWidth;
|
799 |
+
|
800 |
+
// Set the proper width to the gallery items
|
801 |
+
$pp_gallery
|
802 |
+
.css('margin-left',-((galleryWidth/2) + (navWidth/2)))
|
803 |
+
.find('div:first').width(galleryWidth+5)
|
804 |
+
.find('ul').width(fullGalleryWidth)
|
805 |
+
.find('li.selected').removeClass('selected');
|
806 |
+
|
807 |
+
goToPage = (Math.floor(set_position/itemsPerPage) < totalPage) ? Math.floor(set_position/itemsPerPage) : totalPage;
|
808 |
+
|
809 |
+
$.prettyPhoto.changeGalleryPage(goToPage);
|
810 |
+
|
811 |
+
$pp_gallery_li.filter(':eq('+set_position+')').addClass('selected');
|
812 |
+
}else{
|
813 |
+
$pp_pic_holder.find('.pp_content').unbind('mouseenter mouseleave');
|
814 |
+
// $pp_gallery.hide();
|
815 |
+
}
|
816 |
+
}
|
817 |
+
|
818 |
+
function _build_overlay(caller){
|
819 |
+
// Inject Social Tool markup into General markup
|
820 |
+
if(settings.social_tools)
|
821 |
+
facebook_like_link = settings.social_tools.replace('{location_href}', encodeURIComponent(location.href));
|
822 |
+
|
823 |
+
settings.markup = settings.markup.replace('{pp_social}','');
|
824 |
+
|
825 |
+
$('body').append(settings.markup); // Inject the markup
|
826 |
+
|
827 |
+
$pp_pic_holder = $('.pp_pic_holder') , $ppt = $('.ppt'), $pp_overlay = $('div.pp_overlay'); // Set my global selectors
|
828 |
+
|
829 |
+
// Inject the inline gallery!
|
830 |
+
if(isSet && settings.overlay_gallery) {
|
831 |
+
currentGalleryPage = 0;
|
832 |
+
toInject = "";
|
833 |
+
for (var i=0; i < pp_images.length; i++) {
|
834 |
+
if(!pp_images[i].match(/\b(jpg|jpeg|png|gif)\b/gi)){
|
835 |
+
classname = 'default';
|
836 |
+
img_src = '';
|
837 |
+
}else{
|
838 |
+
classname = '';
|
839 |
+
img_src = pp_images[i];
|
840 |
+
}
|
841 |
+
toInject += "<li class='"+classname+"'><a href='#'><img src='" + img_src + "' width='50' alt='' /></a></li>";
|
842 |
+
};
|
843 |
+
|
844 |
+
toInject = settings.gallery_markup.replace(/{gallery}/g,toInject);
|
845 |
+
|
846 |
+
$pp_pic_holder.find('#pp_full_res').after(toInject);
|
847 |
+
|
848 |
+
$pp_gallery = $('.pp_pic_holder .pp_gallery'), $pp_gallery_li = $pp_gallery.find('li'); // Set the gallery selectors
|
849 |
+
|
850 |
+
$pp_gallery.find('.pp_arrow_next').click(function(){
|
851 |
+
$.prettyPhoto.changeGalleryPage('next');
|
852 |
+
$.prettyPhoto.stopSlideshow();
|
853 |
+
return false;
|
854 |
+
});
|
855 |
+
|
856 |
+
$pp_gallery.find('.pp_arrow_previous').click(function(){
|
857 |
+
$.prettyPhoto.changeGalleryPage('previous');
|
858 |
+
$.prettyPhoto.stopSlideshow();
|
859 |
+
return false;
|
860 |
+
});
|
861 |
+
|
862 |
+
$pp_pic_holder.find('.pp_content').hover(
|
863 |
+
function(){
|
864 |
+
$pp_pic_holder.find('.pp_gallery:not(.disabled)').fadeIn();
|
865 |
+
},
|
866 |
+
function(){
|
867 |
+
$pp_pic_holder.find('.pp_gallery:not(.disabled)').fadeOut();
|
868 |
+
});
|
869 |
+
|
870 |
+
itemWidth = 52+5; // 52 beign the thumb width, 5 being the right margin.
|
871 |
+
$pp_gallery_li.each(function(i){
|
872 |
+
$(this)
|
873 |
+
.find('a')
|
874 |
+
.click(function(){
|
875 |
+
$.prettyPhoto.changePage(i);
|
876 |
+
$.prettyPhoto.stopSlideshow();
|
877 |
+
return false;
|
878 |
+
});
|
879 |
+
});
|
880 |
+
};
|
881 |
+
|
882 |
+
|
883 |
+
// Inject the play/pause if it's a slideshow
|
884 |
+
if(settings.slideshow){
|
885 |
+
$pp_pic_holder.find('.pp_nav').prepend('<a href="#" class="pp_play">Play</a>')
|
886 |
+
$pp_pic_holder.find('.pp_nav .pp_play').click(function(){
|
887 |
+
$.prettyPhoto.startSlideshow();
|
888 |
+
return false;
|
889 |
+
});
|
890 |
+
}
|
891 |
+
|
892 |
+
$pp_pic_holder.attr('class','pp_pic_holder ' + settings.theme); // Set the proper theme
|
893 |
+
|
894 |
+
$pp_overlay
|
895 |
+
.css({
|
896 |
+
'opacity':0,
|
897 |
+
'height':$(document).height(),
|
898 |
+
'width':$(window).width()
|
899 |
+
})
|
900 |
+
.bind('click',function(){
|
901 |
+
if(!settings.modal) $.prettyPhoto.close();
|
902 |
+
});
|
903 |
+
|
904 |
+
$('a.pp_close').bind('click',function(){ $.prettyPhoto.close(); return false; });
|
905 |
+
|
906 |
+
|
907 |
+
if(settings.allow_expand) {
|
908 |
+
$('a.pp_expand').bind('click',function(e){
|
909 |
+
// Expand the image
|
910 |
+
if($(this).hasClass('pp_expand')){
|
911 |
+
$(this).removeClass('pp_expand').addClass('pp_contract');
|
912 |
+
doresize = false;
|
913 |
+
}else{
|
914 |
+
$(this).removeClass('pp_contract').addClass('pp_expand');
|
915 |
+
doresize = true;
|
916 |
+
};
|
917 |
+
|
918 |
+
_hideContent(function(){ $.prettyPhoto.open(); });
|
919 |
+
|
920 |
+
return false;
|
921 |
+
});
|
922 |
+
}
|
923 |
+
|
924 |
+
$pp_pic_holder.find('.pp_previous, .pp_nav .pp_arrow_previous').bind('click',function(){
|
925 |
+
$.prettyPhoto.changePage('previous');
|
926 |
+
$.prettyPhoto.stopSlideshow();
|
927 |
+
return false;
|
928 |
+
});
|
929 |
+
|
930 |
+
$pp_pic_holder.find('.pp_next, .pp_nav .pp_arrow_next').bind('click',function(){
|
931 |
+
$.prettyPhoto.changePage('next');
|
932 |
+
$.prettyPhoto.stopSlideshow();
|
933 |
+
return false;
|
934 |
+
});
|
935 |
+
|
936 |
+
_center_overlay(); // Center it
|
937 |
+
};
|
938 |
+
|
939 |
+
if(!pp_alreadyInitialized && getHashtag()){
|
940 |
+
pp_alreadyInitialized = true;
|
941 |
+
|
942 |
+
// Grab the rel index to trigger the click on the correct element
|
943 |
+
hashIndex = getHashtag();
|
944 |
+
hashRel = hashIndex;
|
945 |
+
hashIndex = hashIndex.substring(hashIndex.indexOf('/')+1,hashIndex.length-1);
|
946 |
+
hashRel = hashRel.substring(0,hashRel.indexOf('/'));
|
947 |
+
|
948 |
+
// Little timeout to make sure all the prettyPhoto initialize scripts has been run.
|
949 |
+
// Useful in the event the page contain several init scripts.
|
950 |
+
setTimeout(function(){ $("a["+pp_settings.hook+"^='"+hashRel+"']:eq("+hashIndex+")").trigger('click'); },50);
|
951 |
+
}
|
952 |
+
|
953 |
+
return this.unbind('click.prettyphoto').bind('click.prettyphoto',$.prettyPhoto.initialize); // Return the jQuery object for chaining. The unbind method is used to avoid click conflict when the plugin is called more than once
|
954 |
+
};
|
955 |
+
|
956 |
+
function getHashtag(){
|
957 |
+
var url = location.href;
|
958 |
+
hashtag = (url.indexOf('#prettyPhoto') !== -1) ? decodeURI(url.substring(url.indexOf('#prettyPhoto')+1,url.length)) : false;
|
959 |
+
if(hashtag){ hashtag = hashtag.replace(/<|>/g,''); }
|
960 |
+
return hashtag;
|
961 |
+
};
|
962 |
+
|
963 |
+
function setHashtag(){
|
964 |
+
if(typeof theRel == 'undefined') return; // theRel is set on normal calls, it's impossible to deeplink using the API
|
965 |
+
location.hash = theRel + '/'+rel_index+'/';
|
966 |
+
};
|
967 |
+
|
968 |
+
function clearHashtag(){
|
969 |
+
if ( location.href.indexOf('#prettyPhoto') !== -1 ) location.hash = "prettyPhoto";
|
970 |
+
}
|
971 |
+
|
972 |
+
function getParam(name,url){
|
973 |
+
name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
|
974 |
+
var regexS = "[\\?&]"+name+"=([^&#]*)";
|
975 |
+
var regex = new RegExp( regexS );
|
976 |
+
var results = regex.exec( url );
|
977 |
+
return ( results == null ) ? "" : results[1];
|
978 |
+
}
|
979 |
+
|
980 |
+
})(jQuery);
|
981 |
+
|
982 |
+
var pp_alreadyInitialized = false; // Used for the deep linking to make sure not to call the same function several times.
|
assets/prettyphoto/jquery.prettyPhoto.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
!function(t){function e(){var t=location.href;return hashtag=-1!==t.indexOf("#prettyPhoto")&&decodeURI(t.substring(t.indexOf("#prettyPhoto")+1,t.length)),hashtag&&(hashtag=hashtag.replace(/<|>/g,"")),hashtag}function i(){"undefined"!=typeof theRel&&(location.hash=theRel+"/"+rel_index+"/")}function o(){-1!==location.href.indexOf("#prettyPhoto")&&(location.hash="prettyPhoto")}function a(t,e){var i="[\\?&]"+(t=t.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]"))+"=([^&#]*)",o=new RegExp(i).exec(e);return null==o?"":o[1]}t.prettyPhoto={version:"3.1.6"},t.fn.prettyPhoto=function(p){function s(t,e,i,o){var a=0,p=0;return i>o?(p=t,a=Math.round(o*t/i)):(p=Math.round(i*e/o),a=e),d(p,a)}function n(){t(".pp_loaderIcon").hide(),projectedTop=scroll_pos.scrollTop+(z/2-v.containerHeight/2),projectedTop<0&&(projectedTop=0),$ppt.fadeTo(settings.animation_speed,1),$pp_pic_holder.find(".pp_content").animate({height:v.contentHeight,width:v.contentWidth},settings.animation_speed),$pp_pic_holder.animate({top:projectedTop,left:M/2-v.containerWidth/2<0?0:M/2-v.containerWidth/2,width:v.containerWidth},settings.animation_speed,function(){$pp_pic_holder.find(".pp_hoverContainer,#fullResImage").height(v.height).width(v.width),$pp_pic_holder.find(".pp_fade").fadeIn(settings.animation_speed),isSet&&"image"==c(pp_images[set_position])?$pp_pic_holder.find(".pp_hoverContainer").show():$pp_pic_holder.find(".pp_hoverContainer").hide(),settings.allow_expand&&(v.resized?t("a.pp_expand,a.pp_contract").show():t("a.pp_expand").hide()),!settings.autoplay_slideshow||x||y||t.prettyPhoto.startSlideshow(),settings.changepicturecallback(),y=!0}),u(),p.ajaxcallback()}function r(e){$pp_pic_holder.find("#pp_full_res object,#pp_full_res embed").css("visibility","hidden"),$pp_pic_holder.find(".pp_fade").fadeOut(settings.animation_speed,function(){t(".pp_loaderIcon").show(),e()})}function l(e){e>1?t(".pp_nav").show():t(".pp_nav").hide()}function d(t,e){if(resized=!1,h(t,e),imageWidth=t,imageHeight=e,(P>M||k>z)&&doresize&&settings.allow_resize&&!I){for(resized=!0,fitting=!1;!fitting;)P>M?(imageWidth=M-200,imageHeight=e/t*imageWidth):k>z?(imageHeight=z-200,imageWidth=t/e*imageHeight):fitting=!0,k=imageHeight,P=imageWidth;(P>M||k>z)&&d(P,k),h(imageWidth,imageHeight)}return{width:Math.floor(imageWidth),height:Math.floor(imageHeight),containerHeight:Math.floor(k),containerWidth:Math.floor(P)+2*settings.horizontal_padding,contentHeight:Math.floor(w),contentWidth:Math.floor(b),resized:resized}}function h(e,i){e=parseFloat(e),i=parseFloat(i),$pp_details=$pp_pic_holder.find(".pp_details"),$pp_details.width(e),detailsHeight=parseFloat($pp_details.css("marginTop"))+parseFloat($pp_details.css("marginBottom")),$pp_details=$pp_details.clone().addClass(settings.theme).width(e).appendTo(t("body")).css({position:"absolute",top:-1e4}),detailsHeight+=$pp_details.height(),detailsHeight=detailsHeight<=34?36:detailsHeight,$pp_details.remove(),$pp_title=$pp_pic_holder.find(".ppt"),$pp_title.width(e),titleHeight=parseFloat($pp_title.css("marginTop"))+parseFloat($pp_title.css("marginBottom")),$pp_title=$pp_title.clone().appendTo(t("body")).css({position:"absolute",top:-1e4}),titleHeight+=$pp_title.height(),$pp_title.remove(),w=i+detailsHeight,b=e,k=w+titleHeight+$pp_pic_holder.find(".pp_top").height()+$pp_pic_holder.find(".pp_bottom").height(),P=e}function c(t){return t.match(/youtube\.com\/watch/i)||t.match(/youtu\.be/i)?"youtube":t.match(/vimeo\.com/i)?"vimeo":t.match(/\b.mov\b/i)?"quicktime":t.match(/\b.swf\b/i)?"flash":t.match(/\biframe=true\b/i)?"iframe":t.match(/\bajax=true\b/i)?"ajax":t.match(/\bcustom=true\b/i)?"custom":"#"==t.substr(0,1)?"inline":"image"}function _(){if(doresize&&"undefined"!=typeof $pp_pic_holder){if(scroll_pos=g(),contentHeight=$pp_pic_holder.height(),contentwidth=$pp_pic_holder.width(),projectedTop=z/2+scroll_pos.scrollTop-contentHeight/2,projectedTop<0&&(projectedTop=0),contentHeight>z)return;$pp_pic_holder.css({top:projectedTop,left:M/2+scroll_pos.scrollLeft-contentwidth/2})}}function g(){return self.pageYOffset?{scrollTop:self.pageYOffset,scrollLeft:self.pageXOffset}:document.documentElement&&document.documentElement.scrollTop?{scrollTop:document.documentElement.scrollTop,scrollLeft:document.documentElement.scrollLeft}:document.body?{scrollTop:document.body.scrollTop,scrollLeft:document.body.scrollLeft}:void 0}function m(){z=t(window).height(),M=t(window).width(),"undefined"!=typeof $pp_overlay&&$pp_overlay.height(t(document).height()).width(M)}function u(){isSet&&settings.overlay_gallery&&"image"==c(pp_images[set_position])?(itemWidth=57,navWidth="facebook"==settings.theme||"pp_default"==settings.theme?50:30,itemsPerPage=Math.floor((v.containerWidth-100-navWidth)/itemWidth),itemsPerPage=itemsPerPage<pp_images.length?itemsPerPage:pp_images.length,totalPage=Math.ceil(pp_images.length/itemsPerPage)-1,0==totalPage?(navWidth=0,$pp_gallery.find(".pp_arrow_next,.pp_arrow_previous").hide()):$pp_gallery.find(".pp_arrow_next,.pp_arrow_previous").show(),galleryWidth=itemsPerPage*itemWidth,fullGalleryWidth=pp_images.length*itemWidth,$pp_gallery.css("margin-left",-(galleryWidth/2+navWidth/2)).find("div:first").width(galleryWidth+5).find("ul").width(fullGalleryWidth).find("li.selected").removeClass("selected"),goToPage=Math.floor(set_position/itemsPerPage)<totalPage?Math.floor(set_position/itemsPerPage):totalPage,t.prettyPhoto.changeGalleryPage(goToPage),$pp_gallery_li.filter(":eq("+set_position+")").addClass("selected")):$pp_pic_holder.find(".pp_content").unbind("mouseenter mouseleave")}function f(e){if(settings.social_tools&&(facebook_like_link=settings.social_tools.replace("{location_href}",encodeURIComponent(location.href))),settings.markup=settings.markup.replace("{pp_social}",""),t("body").append(settings.markup),$pp_pic_holder=t(".pp_pic_holder"),$ppt=t(".ppt"),$pp_overlay=t("div.pp_overlay"),isSet&&settings.overlay_gallery){currentGalleryPage=0,toInject="";for(var i=0;i<pp_images.length;i++)pp_images[i].match(/\b(jpg|jpeg|png|gif)\b/gi)?(classname="",img_src=pp_images[i]):(classname="default",img_src=""),toInject+="<li class='"+classname+"'><a href='#'><img src='"+img_src+"' width='50' alt='' /></a></li>";toInject=settings.gallery_markup.replace(/{gallery}/g,toInject),$pp_pic_holder.find("#pp_full_res").after(toInject),$pp_gallery=t(".pp_pic_holder .pp_gallery"),$pp_gallery_li=$pp_gallery.find("li"),$pp_gallery.find(".pp_arrow_next").click(function(){return t.prettyPhoto.changeGalleryPage("next"),t.prettyPhoto.stopSlideshow(),!1}),$pp_gallery.find(".pp_arrow_previous").click(function(){return t.prettyPhoto.changeGalleryPage("previous"),t.prettyPhoto.stopSlideshow(),!1}),$pp_pic_holder.find(".pp_content").hover(function(){$pp_pic_holder.find(".pp_gallery:not(.disabled)").fadeIn()},function(){$pp_pic_holder.find(".pp_gallery:not(.disabled)").fadeOut()}),itemWidth=57,$pp_gallery_li.each(function(e){t(this).find("a").click(function(){return t.prettyPhoto.changePage(e),t.prettyPhoto.stopSlideshow(),!1})})}settings.slideshow&&($pp_pic_holder.find(".pp_nav").prepend('<a href="#" class="pp_play">Play</a>'),$pp_pic_holder.find(".pp_nav .pp_play").click(function(){return t.prettyPhoto.startSlideshow(),!1})),$pp_pic_holder.attr("class","pp_pic_holder "+settings.theme),$pp_overlay.css({opacity:0,height:t(document).height(),width:t(window).width()}).bind("click",function(){settings.modal||t.prettyPhoto.close()}),t("a.pp_close").bind("click",function(){return t.prettyPhoto.close(),!1}),settings.allow_expand&&t("a.pp_expand").bind("click",function(e){return t(this).hasClass("pp_expand")?(t(this).removeClass("pp_expand").addClass("pp_contract"),doresize=!1):(t(this).removeClass("pp_contract").addClass("pp_expand"),doresize=!0),r(function(){t.prettyPhoto.open()}),!1}),$pp_pic_holder.find(".pp_previous, .pp_nav .pp_arrow_previous").bind("click",function(){return t.prettyPhoto.changePage("previous"),t.prettyPhoto.stopSlideshow(),!1}),$pp_pic_holder.find(".pp_next, .pp_nav .pp_arrow_next").bind("click",function(){return t.prettyPhoto.changePage("next"),t.prettyPhoto.stopSlideshow(),!1}),_()}p=jQuery.extend({hook:"rel",animation_speed:"fast",ajaxcallback:function(){},slideshow:5e3,autoplay_slideshow:!1,opacity:.8,show_title:!0,allow_resize:!0,allow_expand:!0,default_width:500,default_height:344,counter_separator_label:"/",theme:"pp_default",horizontal_padding:20,hideflash:!1,wmode:"opaque",autoplay:!0,modal:!1,deeplinking:!0,overlay_gallery:!0,overlay_gallery_max:30,keyboard_shortcuts:!0,changepicturecallback:function(){},callback:function(){},ie6_fallback:!0,markup:'<div class="pp_pic_holder"> \t\t\t\t\t\t<div class="ppt"> </div> \t\t\t\t\t\t<div class="pp_top"> \t\t\t\t\t\t\t<div class="pp_left"></div> \t\t\t\t\t\t\t<div class="pp_middle"></div> \t\t\t\t\t\t\t<div class="pp_right"></div> \t\t\t\t\t\t</div> \t\t\t\t\t\t<div class="pp_content_container"> \t\t\t\t\t\t\t<div class="pp_left"> \t\t\t\t\t\t\t<div class="pp_right"> \t\t\t\t\t\t\t\t<div class="pp_content"> \t\t\t\t\t\t\t\t\t<div class="pp_loaderIcon"></div> \t\t\t\t\t\t\t\t\t<div class="pp_fade"> \t\t\t\t\t\t\t\t\t\t<a href="#" class="pp_expand" title="Expand the image">Expand</a> \t\t\t\t\t\t\t\t\t\t<div class="pp_hoverContainer"> \t\t\t\t\t\t\t\t\t\t\t<a class="pp_next" href="#">next</a> \t\t\t\t\t\t\t\t\t\t\t<a class="pp_previous" href="#">previous</a> \t\t\t\t\t\t\t\t\t\t</div> \t\t\t\t\t\t\t\t\t\t<div id="pp_full_res"></div> \t\t\t\t\t\t\t\t\t\t<div class="pp_details"> \t\t\t\t\t\t\t\t\t\t\t<div class="pp_nav"> \t\t\t\t\t\t\t\t\t\t\t\t<a href="#" class="pp_arrow_previous">Previous</a> \t\t\t\t\t\t\t\t\t\t\t\t<p class="currentTextHolder">0/0</p> \t\t\t\t\t\t\t\t\t\t\t\t<a href="#" class="pp_arrow_next">Next</a> \t\t\t\t\t\t\t\t\t\t\t</div> \t\t\t\t\t\t\t\t\t\t\t<p class="pp_description"></p> \t\t\t\t\t\t\t\t\t\t\t<div class="pp_social">{pp_social}</div> \t\t\t\t\t\t\t\t\t\t\t<a class="pp_close" href="#">Close</a> \t\t\t\t\t\t\t\t\t\t</div> \t\t\t\t\t\t\t\t\t</div> \t\t\t\t\t\t\t\t</div> \t\t\t\t\t\t\t</div> \t\t\t\t\t\t\t</div> \t\t\t\t\t\t</div> \t\t\t\t\t\t<div class="pp_bottom"> \t\t\t\t\t\t\t<div class="pp_left"></div> \t\t\t\t\t\t\t<div class="pp_middle"></div> \t\t\t\t\t\t\t<div class="pp_right"></div> \t\t\t\t\t\t</div> \t\t\t\t\t</div> \t\t\t\t\t<div class="pp_overlay"></div>',gallery_markup:'<div class="pp_gallery"> \t\t\t\t\t\t\t\t<a href="#" class="pp_arrow_previous">Previous</a> \t\t\t\t\t\t\t\t<div> \t\t\t\t\t\t\t\t\t<ul> \t\t\t\t\t\t\t\t\t\t{gallery} \t\t\t\t\t\t\t\t\t</ul> \t\t\t\t\t\t\t\t</div> \t\t\t\t\t\t\t\t<a href="#" class="pp_arrow_next">Next</a> \t\t\t\t\t\t\t</div>',image_markup:'<img id="fullResImage" src="{path}" />',flash_markup:'<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="{width}" height="{height}"><param name="wmode" value="{wmode}" /><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="{path}" /><embed src="{path}" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="{width}" height="{height}" wmode="{wmode}"></embed></object>',quicktime_markup:'<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="//www.apple.com/qtactivex/qtplugin.cab" height="{height}" width="{width}"><param name="src" value="{path}"><param name="autoplay" value="{autoplay}"><param name="type" value="video/quicktime"><embed src="{path}" height="{height}" width="{width}" autoplay="{autoplay}" type="video/quicktime" pluginspage="//www.apple.com/quicktime/download/"></embed></object>',iframe_markup:'<iframe src ="{path}" width="{width}" height="{height}" frameborder="no"></iframe>',inline_markup:'<div class="pp_inline">{content}</div>',custom_markup:"",social_tools:'<div class="twitter"><a href="//twitter.com/share" class="twitter-share-button" data-count="none">Tweet</a><script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?"http":"https";if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document, "script", "twitter-wjs");<\/script></div><div class="facebook"><iframe src="//www.facebook.com/plugins/like.php?locale=en_US&href={location_href}&layout=button_count&show_faces=true&width=500&action=like&font&colorscheme=light&height=23" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:500px; height:23px;" allowTransparency="true"></iframe></div>'},p);var v,y,w,b,k,P,x,$={Android:function(){return navigator.userAgent.match(/Android/i)},BlackBerry:function(){return navigator.userAgent.match(/BlackBerry/i)},iOS:function(){return navigator.userAgent.match(/iPhone|iPad|iPod/i)},Opera:function(){return navigator.userAgent.match(/Opera Mini/i)},Windows:function(){return navigator.userAgent.match(/IEMobile/i)},any:function(){return $.Android()||$.BlackBerry()||$.iOS()||$.Opera()||$.Windows()}},j=this,I=!1,z=t(window).height(),M=t(window).width();return doresize=!0,scroll_pos=g(),t(window).unbind("resize.prettyphoto").bind("resize.prettyphoto",function(){_(),m()}),p.keyboard_shortcuts&&t(document).unbind("keydown.prettyphoto").bind("keydown.prettyphoto",function(e){if("undefined"!=typeof $pp_pic_holder&&$pp_pic_holder.is(":visible"))switch(e.keyCode){case 37:t.prettyPhoto.changePage("previous"),e.preventDefault();break;case 39:t.prettyPhoto.changePage("next"),e.preventDefault();break;case 27:settings.modal||t.prettyPhoto.close(),e.preventDefault()}}),t.prettyPhoto.initialize=function(){return settings=p,"pp_default"==settings.theme&&(settings.horizontal_padding=16),theRel=t(this).attr(settings.hook),galleryRegExp=/\-(?:.*)/,isSet=!!galleryRegExp.exec(theRel),pp_images=isSet?jQuery.map(j,function(e,i){if(-1!=t(e).attr(settings.hook).indexOf(theRel))return t(e).attr("href")}):t.makeArray(t(this).attr("href")),pp_titles=isSet?jQuery.map(j,function(e,i){if(-1!=t(e).attr(settings.hook).indexOf(theRel))return t(e).find("img").attr("alt")?t(e).find("img").attr("alt"):""}):t.makeArray(t(this).find("img").attr("alt")),pp_descriptions=isSet?jQuery.map(j,function(e,i){if(-1!=t(e).attr(settings.hook).indexOf(theRel))return t(e).attr("title")?t(e).attr("title"):""}):t.makeArray(t(this).attr("title")),pp_images.length>settings.overlay_gallery_max&&(settings.overlay_gallery=!1),set_position=jQuery.inArray(t(this).attr("href"),pp_images),rel_index=isSet?set_position:t("a["+settings.hook+"^='"+theRel+"']").index(t(this)),f(this),settings.allow_resize&&t(window).bind("scroll.prettyphoto",function(){_()}),t.prettyPhoto.open(),!1},t.prettyPhoto.open=function(e){return"undefined"==typeof settings&&(settings=p,pp_images=t.makeArray(arguments[0]),pp_titles=arguments[1]?t.makeArray(arguments[1]):t.makeArray(""),pp_descriptions=arguments[2]?t.makeArray(arguments[2]):t.makeArray(""),isSet=pp_images.length>1,set_position=arguments[3]?arguments[3]:0,f(e.target)),settings.hideflash&&t("object,embed,iframe[src*=youtube],iframe[src*=vimeo]").css("visibility","hidden"),l(t(pp_images).size()),t(".pp_loaderIcon").show(),settings.deeplinking&&i(),settings.social_tools&&(facebook_like_link=settings.social_tools.replace("{location_href}",encodeURIComponent(location.href)),$pp_pic_holder.find(".pp_social").html(facebook_like_link)),$ppt.is(":hidden")&&$ppt.css("opacity",0).show(),$pp_overlay.show().fadeTo(settings.animation_speed,settings.opacity),$pp_pic_holder.find(".currentTextHolder").text(set_position+1+settings.counter_separator_label+t(pp_images).size()),void 0!==pp_descriptions[set_position]&&""!=pp_descriptions[set_position]?$pp_pic_holder.find(".pp_description").show().html(unescape(pp_descriptions[set_position])):$pp_pic_holder.find(".pp_description").hide(),movie_width=parseFloat(a("width",pp_images[set_position]))?a("width",pp_images[set_position]):settings.default_width.toString(),movie_height=parseFloat(a("height",pp_images[set_position]))?a("height",pp_images[set_position]):settings.default_height.toString(),I=!1,-1!=movie_height.indexOf("%")&&(movie_height=parseFloat(t(window).height()*parseFloat(movie_height)/100-150),I=!0),-1!=movie_width.indexOf("%")&&(movie_width=parseFloat(t(window).width()*parseFloat(movie_width)/100-150),I=!0),$pp_pic_holder.fadeIn(function(){switch(settings.show_title&&""!=pp_titles[set_position]&&void 0!==pp_titles[set_position]?$ppt.html(unescape(pp_titles[set_position])):$ppt.html(" "),imgPreloader="",skipInjection=!1,c(pp_images[set_position])){case"image":imgPreloader=new Image,nextImage=new Image,isSet&&set_position<t(pp_images).size()-1&&(nextImage.src=pp_images[set_position+1]),prevImage=new Image,isSet&&pp_images[set_position-1]&&(prevImage.src=pp_images[set_position-1]),$pp_pic_holder.find("#pp_full_res")[0].innerHTML=settings.image_markup.replace(/{path}/g,pp_images[set_position]),imgPreloader.onload=function(){v=$.any()?s(Math.round(.9*M),Math.round(.9*z),imgPreloader.width,imgPreloader.height):d(imgPreloader.width,imgPreloader.height),n()},imgPreloader.onerror=function(){alert("Image cannot be loaded. Make sure the path is correct and image exist."),t.prettyPhoto.close()},imgPreloader.src=pp_images[set_position];break;case"youtube":v=$.any()?s(Math.round(.9*M),Math.round(.9*z),movie_width,movie_height):d(movie_width,movie_height),movie_id=a("v",pp_images[set_position]),""==movie_id&&(movie_id=pp_images[set_position].split("youtu.be/"),movie_id=movie_id[1],movie_id.indexOf("?")>0&&(movie_id=movie_id.substr(0,movie_id.indexOf("?"))),movie_id.indexOf("&")>0&&(movie_id=movie_id.substr(0,movie_id.indexOf("&")))),movie="//www.youtube.com/embed/"+movie_id,a("rel",pp_images[set_position])?movie+="?rel="+a("rel",pp_images[set_position]):movie+="?rel=1",settings.autoplay&&(movie+="&autoplay=1"),toInject=settings.iframe_markup.replace(/{width}/g,v.width).replace(/{height}/g,v.height).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,movie);break;case"vimeo":v=$.any()?s(Math.round(.9*M),Math.round(.9*z),movie_width,movie_height):d(movie_width,movie_height),movie_id=pp_images[set_position];var e=/http(s?):\/\/(www\.)?vimeo.com\/(\d+)/,i=movie_id.match(e);movie="//player.vimeo.com/video/"+i[3]+"?title=0&byline=0&portrait=0",settings.autoplay&&(movie+="&autoplay=1;"),vimeo_width=v.width+"/embed/?moog_width="+v.width,toInject=settings.iframe_markup.replace(/{width}/g,vimeo_width).replace(/{height}/g,v.height).replace(/{path}/g,movie);break;case"quicktime":(v=d(movie_width,movie_height)).height+=15,v.contentHeight+=15,v.containerHeight+=15,toInject=settings.quicktime_markup.replace(/{width}/g,v.width).replace(/{height}/g,v.height).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,pp_images[set_position]).replace(/{autoplay}/g,settings.autoplay);break;case"flash":v=$.any()?s(Math.round(.9*M),Math.round(.9*z),movie_width,movie_height):d(movie_width,movie_height),flash_vars=pp_images[set_position],flash_vars=flash_vars.substring(pp_images[set_position].indexOf("flashvars")+10,pp_images[set_position].length),filename=pp_images[set_position],filename=filename.substring(0,filename.indexOf("?")),toInject=settings.flash_markup.replace(/{width}/g,v.width).replace(/{height}/g,v.height).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,filename+"?"+flash_vars);break;case"iframe":v=$.any()?s(Math.round(.9*M),Math.round(.9*z),movie_width,movie_height):d(movie_width,movie_height),frame_url=pp_images[set_position],frame_url=frame_url.substr(0,frame_url.indexOf("iframe")-1),toInject=settings.iframe_markup.replace(/{width}/g,v.width).replace(/{height}/g,v.height).replace(/{path}/g,frame_url);break;case"ajax":doresize=!1,v=$.any()?s(Math.round(.9*M),Math.round(.9*z),movie_width,movie_height):d(movie_width,movie_height),doresize=!0,skipInjection=!0,t.get(pp_images[set_position],function(t){toInject=settings.inline_markup.replace(/{content}/g,t),$pp_pic_holder.find("#pp_full_res")[0].innerHTML=toInject,n()});break;case"custom":v=$.any()?s(Math.round(.9*M),Math.round(.9*z),movie_width,movie_height):d(movie_width,movie_height),toInject=settings.custom_markup;break;case"inline":myClone=t(pp_images[set_position]).clone().append('<br clear="all" />').css({width:settings.default_width}).wrapInner('<div id="pp_full_res"><div class="pp_inline"></div></div>').appendTo(t("body")).show(),doresize=!1,v=$.any()?s(Math.round(.9*M),Math.round(.9*z),t(myClone).width(),t(myClone).height()):d(t(myClone).width(),t(myClone).height()),doresize=!0,t(myClone).remove(),toInject=settings.inline_markup.replace(/{content}/g,t(pp_images[set_position]).html())}imgPreloader||skipInjection||($pp_pic_holder.find("#pp_full_res")[0].innerHTML=toInject,n())}),!1},t.prettyPhoto.changePage=function(e){currentGalleryPage=0,"previous"==e?--set_position<0&&(set_position=t(pp_images).size()-1):"next"==e?++set_position>t(pp_images).size()-1&&(set_position=0):set_position=e,rel_index=set_position,doresize||(doresize=!0),settings.allow_expand&&t(".pp_contract").removeClass("pp_contract").addClass("pp_expand"),r(function(){t.prettyPhoto.open()})},t.prettyPhoto.changeGalleryPage=function(t){"next"==t?++currentGalleryPage>totalPage&&(currentGalleryPage=0):"previous"==t?--currentGalleryPage<0&&(currentGalleryPage=totalPage):currentGalleryPage=t,slide_speed="next"==t||"previous"==t?settings.animation_speed:0,slide_to=currentGalleryPage*(itemsPerPage*itemWidth),$pp_gallery.find("ul").animate({left:-slide_to},slide_speed)},t.prettyPhoto.startSlideshow=function(){void 0===x?($pp_pic_holder.find(".pp_play").unbind("click").removeClass("pp_play").addClass("pp_pause").click(function(){return t.prettyPhoto.stopSlideshow(),!1}),x=setInterval(t.prettyPhoto.startSlideshow,settings.slideshow)):t.prettyPhoto.changePage("next")},t.prettyPhoto.stopSlideshow=function(){$pp_pic_holder.find(".pp_pause").unbind("click").removeClass("pp_pause").addClass("pp_play").click(function(){return t.prettyPhoto.startSlideshow(),!1}),clearInterval(x),x=void 0},t.prettyPhoto.close=function(){$pp_overlay.is(":animated")||(t.prettyPhoto.stopSlideshow(),$pp_pic_holder.stop().find("object,embed").css("visibility","hidden"),t("div.pp_pic_holder,div.ppt,.pp_fade").fadeOut(settings.animation_speed,function(){t(this).remove()}),$pp_overlay.fadeOut(settings.animation_speed,function(){settings.hideflash&&t("object,embed,iframe[src*=youtube],iframe[src*=vimeo]").css("visibility","visible"),t(this).remove(),t(window).unbind("scroll.prettyphoto"),o(),settings.callback(),doresize=!0,y=!1,delete settings}))},!pp_alreadyInitialized&&e()&&(pp_alreadyInitialized=!0,hashIndex=e(),hashRel=hashIndex,hashIndex=hashIndex.substring(hashIndex.indexOf("/")+1,hashIndex.length-1),hashRel=hashRel.substring(0,hashRel.indexOf("/")),setTimeout(function(){t("a["+p.hook+"^='"+hashRel+"']:eq("+hashIndex+")").trigger("click")},50)),this.unbind("click.prettyphoto").bind("click.prettyphoto",t.prettyPhoto.initialize)}}(jQuery);var pp_alreadyInitialized=!1;
|
assets/prettyphoto/js/jquery.prettyPhoto.js
DELETED
@@ -1,7 +0,0 @@
|
|
1 |
-
/* ------------------------------------------------------------------------
|
2 |
-
Class: prettyPhoto
|
3 |
-
Use: Lightbox clone for jQuery
|
4 |
-
Author: Stephane Caron (http://www.no-margin-for-errors.com)
|
5 |
-
Version: 3.1.5
|
6 |
-
------------------------------------------------------------------------- */
|
7 |
-
(function(e){function t(){var e=location.href;hashtag=e.indexOf("#prettyPhoto")!==-1?decodeURI(e.substring(e.indexOf("#prettyPhoto")+1,e.length)):false;return hashtag}function n(){if(typeof theRel=="undefined")return;location.hash=theRel+"/"+rel_index+"/"}function r(){if(location.href.indexOf("#prettyPhoto")!==-1)location.hash="prettyPhoto"}function i(e,t){e=e.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var n="[\\?&]"+e+"=([^&#]*)";var r=new RegExp(n);var i=r.exec(t);return i==null?"":i[1]}e.prettyPhoto={version:"3.1.5"};e.fn.prettyPhoto=function(s){function g(){e(".pp_loaderIcon").hide();projectedTop=scroll_pos["scrollTop"]+(d/2-a["containerHeight"]/2);if(projectedTop<0)projectedTop=0;$ppt.fadeTo(settings.animation_speed,1);$pp_pic_holder.find(".pp_content").animate({height:a["contentHeight"],width:a["contentWidth"]},settings.animation_speed);$pp_pic_holder.animate({top:projectedTop,left:v/2-a["containerWidth"]/2<0?0:v/2-a["containerWidth"]/2,width:a["containerWidth"]},settings.animation_speed,function(){$pp_pic_holder.find(".pp_hoverContainer,#fullResImage").height(a["height"]).width(a["width"]);$pp_pic_holder.find(".pp_fade").fadeIn(settings.animation_speed);if(isSet&&S(pp_images[set_position])=="image"){$pp_pic_holder.find(".pp_hoverContainer").show()}else{$pp_pic_holder.find(".pp_hoverContainer").hide()}if(settings.allow_expand){if(a["resized"]){e("a.pp_expand,a.pp_contract").show()}else{e("a.pp_expand").hide()}}if(settings.autoplay_slideshow&&!m&&!f)e.prettyPhoto.startSlideshow();settings.changepicturecallback();f=true});C();s.ajaxcallback()}function y(t){$pp_pic_holder.find("#pp_full_res object,#pp_full_res embed").css("visibility","hidden");$pp_pic_holder.find(".pp_fade").fadeOut(settings.animation_speed,function(){e(".pp_loaderIcon").show();t()})}function b(t){t>1?e(".pp_nav").show():e(".pp_nav").hide()}function w(e,t){resized=false;E(e,t);imageWidth=e,imageHeight=t;if((p>v||h>d)&&doresize&&settings.allow_resize&&!u){resized=true,fitting=false;while(!fitting){if(p>v){imageWidth=v-200;imageHeight=t/e*imageWidth}else if(h>d){imageHeight=d-200;imageWidth=e/t*imageHeight}else{fitting=true}h=imageHeight,p=imageWidth}if(p>v||h>d){w(p,h)}E(imageWidth,imageHeight)}return{width:Math.floor(imageWidth),height:Math.floor(imageHeight),containerHeight:Math.floor(h),containerWidth:Math.floor(p)+settings.horizontal_padding*2,contentHeight:Math.floor(l),contentWidth:Math.floor(c),resized:resized}}function E(t,n){t=parseFloat(t);n=parseFloat(n);$pp_details=$pp_pic_holder.find(".pp_details");$pp_details.width(t);detailsHeight=parseFloat($pp_details.css("marginTop"))+parseFloat($pp_details.css("marginBottom"));$pp_details=$pp_details.clone().addClass(settings.theme).width(t).appendTo(e("body")).css({position:"absolute",top:-1e4});detailsHeight+=$pp_details.height();detailsHeight=detailsHeight<=34?36:detailsHeight;$pp_details.remove();$pp_title=$pp_pic_holder.find(".ppt");$pp_title.width(t);titleHeight=parseFloat($pp_title.css("marginTop"))+parseFloat($pp_title.css("marginBottom"));$pp_title=$pp_title.clone().appendTo(e("body")).css({position:"absolute",top:-1e4});titleHeight+=$pp_title.height();$pp_title.remove();l=n+detailsHeight;c=t;h=l+titleHeight+$pp_pic_holder.find(".pp_top").height()+$pp_pic_holder.find(".pp_bottom").height();p=t}function S(e){if(e.match(/youtube\.com\/watch/i)||e.match(/youtu\.be/i)){return"youtube"}else if(e.match(/vimeo\.com/i)){return"vimeo"}else if(e.match(/\b.mov\b/i)){return"quicktime"}else if(e.match(/\b.swf\b/i)){return"flash"}else if(e.match(/\biframe=true\b/i)){return"iframe"}else if(e.match(/\bajax=true\b/i)){return"ajax"}else if(e.match(/\bcustom=true\b/i)){return"custom"}else if(e.substr(0,1)=="#"){return"inline"}else{return"image"}}function x(){if(doresize&&typeof $pp_pic_holder!="undefined"){scroll_pos=T();contentHeight=$pp_pic_holder.height(),contentwidth=$pp_pic_holder.width();projectedTop=d/2+scroll_pos["scrollTop"]-contentHeight/2;if(projectedTop<0)projectedTop=0;if(contentHeight>d)return;$pp_pic_holder.css({top:projectedTop,left:v/2+scroll_pos["scrollLeft"]-contentwidth/2})}}function T(){if(self.pageYOffset){return{scrollTop:self.pageYOffset,scrollLeft:self.pageXOffset}}else if(document.documentElement&&document.documentElement.scrollTop){return{scrollTop:document.documentElement.scrollTop,scrollLeft:document.documentElement.scrollLeft}}else if(document.body){return{scrollTop:document.body.scrollTop,scrollLeft:document.body.scrollLeft}}}function N(){d=e(window).height(),v=e(window).width();if(typeof $pp_overlay!="undefined")$pp_overlay.height(e(document).height()).width(v)}function C(){if(isSet&&settings.overlay_gallery&&S(pp_images[set_position])=="image"){itemWidth=52+5;navWidth=settings.theme=="facebook"||settings.theme=="pp_default"?50:30;itemsPerPage=Math.floor((a["containerWidth"]-100-navWidth)/itemWidth);itemsPerPage=itemsPerPage<pp_images.length?itemsPerPage:pp_images.length;totalPage=Math.ceil(pp_images.length/itemsPerPage)-1;if(totalPage==0){navWidth=0;$pp_gallery.find(".pp_arrow_next,.pp_arrow_previous").hide()}else{$pp_gallery.find(".pp_arrow_next,.pp_arrow_previous").show()}galleryWidth=itemsPerPage*itemWidth;fullGalleryWidth=pp_images.length*itemWidth;$pp_gallery.css("margin-left",-(galleryWidth/2+navWidth/2)).find("div:first").width(galleryWidth+5).find("ul").width(fullGalleryWidth).find("li.selected").removeClass("selected");goToPage=Math.floor(set_position/itemsPerPage)<totalPage?Math.floor(set_position/itemsPerPage):totalPage;e.prettyPhoto.changeGalleryPage(goToPage);$pp_gallery_li.filter(":eq("+set_position+")").addClass("selected")}else{$pp_pic_holder.find(".pp_content").unbind("mouseenter mouseleave")}}function k(t){if(settings.social_tools)facebook_like_link=settings.social_tools.replace("{location_href}",encodeURIComponent(location.href));settings.markup=settings.markup.replace("{pp_social}","");e("body").append(settings.markup);$pp_pic_holder=e(".pp_pic_holder"),$ppt=e(".ppt"),$pp_overlay=e("div.pp_overlay");if(isSet&&settings.overlay_gallery){currentGalleryPage=0;toInject="";for(var n=0;n<pp_images.length;n++){if(!pp_images[n].match(/\b(jpg|jpeg|png|gif)\b/gi)){classname="default";img_src=""}else{classname="";img_src=pp_images[n]}toInject+="<li class='"+classname+"'><a href='#'><img src='"+img_src+"' width='50' alt='' /></a></li>"}toInject=settings.gallery_markup.replace(/{gallery}/g,toInject);$pp_pic_holder.find("#pp_full_res").after(toInject);$pp_gallery=e(".pp_pic_holder .pp_gallery"),$pp_gallery_li=$pp_gallery.find("li");$pp_gallery.find(".pp_arrow_next").click(function(){e.prettyPhoto.changeGalleryPage("next");e.prettyPhoto.stopSlideshow();return false});$pp_gallery.find(".pp_arrow_previous").click(function(){e.prettyPhoto.changeGalleryPage("previous");e.prettyPhoto.stopSlideshow();return false});$pp_pic_holder.find(".pp_content").hover(function(){$pp_pic_holder.find(".pp_gallery:not(.disabled)").fadeIn()},function(){$pp_pic_holder.find(".pp_gallery:not(.disabled)").fadeOut()});itemWidth=52+5;$pp_gallery_li.each(function(t){e(this).find("a").click(function(){e.prettyPhoto.changePage(t);e.prettyPhoto.stopSlideshow();return false})})}if(settings.slideshow){$pp_pic_holder.find(".pp_nav").prepend('<a href="#" class="pp_play">Play</a>');$pp_pic_holder.find(".pp_nav .pp_play").click(function(){e.prettyPhoto.startSlideshow();return false})}$pp_pic_holder.attr("class","pp_pic_holder "+settings.theme);$pp_overlay.css({opacity:0,height:e(document).height(),width:e(window).width()}).bind("click",function(){if(!settings.modal)e.prettyPhoto.close()});e("a.pp_close").bind("click",function(){e.prettyPhoto.close();return false});if(settings.allow_expand){e("a.pp_expand").bind("click",function(t){if(e(this).hasClass("pp_expand")){e(this).removeClass("pp_expand").addClass("pp_contract");doresize=false}else{e(this).removeClass("pp_contract").addClass("pp_expand");doresize=true}y(function(){e.prettyPhoto.open()});return false})}$pp_pic_holder.find(".pp_previous, .pp_nav .pp_arrow_previous").bind("click",function(){e.prettyPhoto.changePage("previous");e.prettyPhoto.stopSlideshow();return false});$pp_pic_holder.find(".pp_next, .pp_nav .pp_arrow_next").bind("click",function(){e.prettyPhoto.changePage("next");e.prettyPhoto.stopSlideshow();return false});x()}s=jQuery.extend({hook:"rel",animation_speed:"fast",ajaxcallback:function(){},slideshow:5e3,autoplay_slideshow:false,opacity:.8,show_title:true,allow_resize:true,allow_expand:true,default_width:500,default_height:344,counter_separator_label:"/",theme:"pp_default",horizontal_padding:20,hideflash:false,wmode:"opaque",autoplay:true,modal:false,deeplinking:true,overlay_gallery:true,overlay_gallery_max:30,keyboard_shortcuts:true,changepicturecallback:function(){},callback:function(){},ie6_fallback:true,markup:'<div class="pp_pic_holder"> <div class="ppt"> </div> <div class="pp_top"> <div class="pp_left"></div> <div class="pp_middle"></div> <div class="pp_right"></div> </div> <div class="pp_content_container"> <div class="pp_left"> <div class="pp_right"> <div class="pp_content"> <div class="pp_loaderIcon"></div> <div class="pp_fade"> <a href="#" class="pp_expand" title="Expand the image">Expand</a> <div class="pp_hoverContainer"> <a class="pp_next" href="#">next</a> <a class="pp_previous" href="#">previous</a> </div> <div id="pp_full_res"></div> <div class="pp_details"> <div class="pp_nav"> <a href="#" class="pp_arrow_previous">Previous</a> <p class="currentTextHolder">0/0</p> <a href="#" class="pp_arrow_next">Next</a> </div> <p class="pp_description"></p> <div class="pp_social">{pp_social}</div> <a class="pp_close" href="#">Close</a> </div> </div> </div> </div> </div> </div> <div class="pp_bottom"> <div class="pp_left"></div> <div class="pp_middle"></div> <div class="pp_right"></div> </div> </div> <div class="pp_overlay"></div>',gallery_markup:'<div class="pp_gallery"> <a href="#" class="pp_arrow_previous">Previous</a> <div> <ul> {gallery} </ul> </div> <a href="#" class="pp_arrow_next">Next</a> </div>',image_markup:'<img id="fullResImage" src="{path}" />',flash_markup:'<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="{width}" height="{height}"><param name="wmode" value="{wmode}" /><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="{path}" /><embed src="{path}" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="{width}" height="{height}" wmode="{wmode}"></embed></object>',quicktime_markup:'<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="//www.apple.com/qtactivex/qtplugin.cab" height="{height}" width="{width}"><param name="src" value="{path}"><param name="autoplay" value="{autoplay}"><param name="type" value="video/quicktime"><embed src="{path}" height="{height}" width="{width}" autoplay="{autoplay}" type="video/quicktime" pluginspage="//www.apple.com/quicktime/download/"></embed></object>',iframe_markup:'<iframe src ="{path}" width="{width}" height="{height}" frameborder="no"></iframe>',inline_markup:'<div class="pp_inline">{content}</div>',custom_markup:"",social_tools:'<div class="twitter"><a href="//twitter.com/share" class="twitter-share-button" data-count="none">Tweet</a><script type="text/javascript" src="//platform.twitter.com/widgets.js"></script></div><div class="facebook"><iframe src="//www.facebook.com/plugins/like.php?locale=en_US&href={location_href}&layout=button_count&show_faces=true&width=500&action=like&font&colorscheme=light&height=23" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:500px; height:23px;" allowTransparency="true"></iframe></div>'},s);var o=this,u=false,a,f,l,c,h,p,d=e(window).height(),v=e(window).width(),m;doresize=true,scroll_pos=T();e(window).unbind("resize.prettyphoto").bind("resize.prettyphoto",function(){x();N()});if(s.keyboard_shortcuts){e(document).unbind("keydown.prettyphoto").bind("keydown.prettyphoto",function(t){if(typeof $pp_pic_holder!="undefined"){if($pp_pic_holder.is(":visible")){switch(t.keyCode){case 37:e.prettyPhoto.changePage("previous");t.preventDefault();break;case 39:e.prettyPhoto.changePage("next");t.preventDefault();break;case 27:if(!settings.modal)e.prettyPhoto.close();t.preventDefault();break}}}})}e.prettyPhoto.initialize=function(){settings=s;if(settings.theme=="pp_default")settings.horizontal_padding=16;theRel=e(this).attr(settings.hook);galleryRegExp=/\[(?:.*)\]/;isSet=galleryRegExp.exec(theRel)?true:false;pp_images=isSet?jQuery.map(o,function(t,n){if(e(t).attr(settings.hook).indexOf(theRel)!=-1)return e(t).attr("href")}):e.makeArray(e(this).attr("href"));pp_titles=isSet?jQuery.map(o,function(t,n){if(e(t).attr(settings.hook).indexOf(theRel)!=-1)return e(t).find("img").attr("alt")?e(t).find("img").attr("alt"):""}):e.makeArray(e(this).find("img").attr("alt"));pp_descriptions=isSet?jQuery.map(o,function(t,n){if(e(t).attr(settings.hook).indexOf(theRel)!=-1)return e(t).attr("title")?e(t).attr("title"):""}):e.makeArray(e(this).attr("title"));if(pp_images.length>settings.overlay_gallery_max)settings.overlay_gallery=false;set_position=jQuery.inArray(e(this).attr("href"),pp_images);rel_index=isSet?set_position:e("a["+settings.hook+"^='"+theRel+"']").index(e(this));k(this);if(settings.allow_resize)e(window).bind("scroll.prettyphoto",function(){x()});e.prettyPhoto.open();return false};e.prettyPhoto.open=function(t){if(typeof settings=="undefined"){settings=s;pp_images=e.makeArray(arguments[0]);pp_titles=arguments[1]?e.makeArray(arguments[1]):e.makeArray("");pp_descriptions=arguments[2]?e.makeArray(arguments[2]):e.makeArray("");isSet=pp_images.length>1?true:false;set_position=arguments[3]?arguments[3]:0;k(t.target)}if(settings.hideflash)e("object,embed,iframe[src*=youtube],iframe[src*=vimeo]").css("visibility","hidden");b(e(pp_images).size());e(".pp_loaderIcon").show();if(settings.deeplinking)n();if(settings.social_tools){facebook_like_link=settings.social_tools.replace("{location_href}",encodeURIComponent(location.href));$pp_pic_holder.find(".pp_social").html(facebook_like_link)}if($ppt.is(":hidden"))$ppt.css("opacity",0).show();$pp_overlay.show().fadeTo(settings.animation_speed,settings.opacity);$pp_pic_holder.find(".currentTextHolder").text(set_position+1+settings.counter_separator_label+e(pp_images).size());if(typeof pp_descriptions[set_position]!="undefined"&&pp_descriptions[set_position]!=""){$pp_pic_holder.find(".pp_description").show().html(unescape(pp_descriptions[set_position]))}else{$pp_pic_holder.find(".pp_description").hide()}movie_width=parseFloat(i("width",pp_images[set_position]))?i("width",pp_images[set_position]):settings.default_width.toString();movie_height=parseFloat(i("height",pp_images[set_position]))?i("height",pp_images[set_position]):settings.default_height.toString();u=false;if(movie_height.indexOf("%")!=-1){movie_height=parseFloat(e(window).height()*parseFloat(movie_height)/100-150);u=true}if(movie_width.indexOf("%")!=-1){movie_width=parseFloat(e(window).width()*parseFloat(movie_width)/100-150);u=true}$pp_pic_holder.fadeIn(function(){settings.show_title&&pp_titles[set_position]!=""&&typeof pp_titles[set_position]!="undefined"?$ppt.html(unescape(pp_titles[set_position])):$ppt.html(" ");imgPreloader="";skipInjection=false;switch(S(pp_images[set_position])){case"image":imgPreloader=new Image;nextImage=new Image;if(isSet&&set_position<e(pp_images).size()-1)nextImage.src=pp_images[set_position+1];prevImage=new Image;if(isSet&&pp_images[set_position-1])prevImage.src=pp_images[set_position-1];$pp_pic_holder.find("#pp_full_res")[0].innerHTML=settings.image_markup.replace(/{path}/g,pp_images[set_position]);imgPreloader.onload=function(){a=w(imgPreloader.width,imgPreloader.height);g()};imgPreloader.onerror=function(){alert("Image cannot be loaded. Make sure the path is correct and image exist.");e.prettyPhoto.close()};imgPreloader.src=pp_images[set_position];break;case"youtube":a=w(movie_width,movie_height);movie_id=i("v",pp_images[set_position]);if(movie_id==""){movie_id=pp_images[set_position].split("youtu.be/");movie_id=movie_id[1];if(movie_id.indexOf("?")>0)movie_id=movie_id.substr(0,movie_id.indexOf("?"));if(movie_id.indexOf("&")>0)movie_id=movie_id.substr(0,movie_id.indexOf("&"))}movie="//www.youtube.com/embed/"+movie_id;i("rel",pp_images[set_position])?movie+="?rel="+i("rel",pp_images[set_position]):movie+="?rel=1";if(settings.autoplay)movie+="&autoplay=1";toInject=settings.iframe_markup.replace(/{width}/g,a["width"]).replace(/{height}/g,a["height"]).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,movie);break;case"vimeo":a=w(movie_width,movie_height);movie_id=pp_images[set_position];var t=/http(s?):\/\/(www\.)?vimeo.com\/(\d+)/;var n=movie_id.match(t);movie="//player.vimeo.com/video/"+n[3]+"?title=0&byline=0&portrait=0";if(settings.autoplay)movie+="&autoplay=1;";vimeo_width=a["width"]+"/embed/?moog_width="+a["width"];toInject=settings.iframe_markup.replace(/{width}/g,vimeo_width).replace(/{height}/g,a["height"]).replace(/{path}/g,movie);break;case"quicktime":a=w(movie_width,movie_height);a["height"]+=15;a["contentHeight"]+=15;a["containerHeight"]+=15;toInject=settings.quicktime_markup.replace(/{width}/g,a["width"]).replace(/{height}/g,a["height"]).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,pp_images[set_position]).replace(/{autoplay}/g,settings.autoplay);break;case"flash":a=w(movie_width,movie_height);flash_vars=pp_images[set_position];flash_vars=flash_vars.substring(pp_images[set_position].indexOf("flashvars")+10,pp_images[set_position].length);filename=pp_images[set_position];filename=filename.substring(0,filename.indexOf("?"));toInject=settings.flash_markup.replace(/{width}/g,a["width"]).replace(/{height}/g,a["height"]).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,filename+"?"+flash_vars);break;case"iframe":a=w(movie_width,movie_height);frame_url=pp_images[set_position];frame_url=frame_url.substr(0,frame_url.indexOf("iframe")-1);toInject=settings.iframe_markup.replace(/{width}/g,a["width"]).replace(/{height}/g,a["height"]).replace(/{path}/g,frame_url);break;case"ajax":doresize=false;a=w(movie_width,movie_height);doresize=true;skipInjection=true;e.get(pp_images[set_position],function(e){toInject=settings.inline_markup.replace(/{content}/g,e);$pp_pic_holder.find("#pp_full_res")[0].innerHTML=toInject;g()});break;case"custom":a=w(movie_width,movie_height);toInject=settings.custom_markup;break;case"inline":myClone=e(pp_images[set_position]).clone().append('<br clear="all" />').css({width:settings.default_width}).wrapInner('<div id="pp_full_res"><div class="pp_inline"></div></div>').appendTo(e("body")).show();doresize=false;a=w(e(myClone).width(),e(myClone).height());doresize=true;e(myClone).remove();toInject=settings.inline_markup.replace(/{content}/g,e(pp_images[set_position]).html());break}if(!imgPreloader&&!skipInjection){$pp_pic_holder.find("#pp_full_res")[0].innerHTML=toInject;g()}});return false};e.prettyPhoto.changePage=function(t){currentGalleryPage=0;if(t=="previous"){set_position--;if(set_position<0)set_position=e(pp_images).size()-1}else if(t=="next"){set_position++;if(set_position>e(pp_images).size()-1)set_position=0}else{set_position=t}rel_index=set_position;if(!doresize)doresize=true;if(settings.allow_expand){e(".pp_contract").removeClass("pp_contract").addClass("pp_expand")}y(function(){e.prettyPhoto.open()})};e.prettyPhoto.changeGalleryPage=function(e){if(e=="next"){currentGalleryPage++;if(currentGalleryPage>totalPage)currentGalleryPage=0}else if(e=="previous"){currentGalleryPage--;if(currentGalleryPage<0)currentGalleryPage=totalPage}else{currentGalleryPage=e}slide_speed=e=="next"||e=="previous"?settings.animation_speed:0;slide_to=currentGalleryPage*itemsPerPage*itemWidth;$pp_gallery.find("ul").animate({left:-slide_to},slide_speed)};e.prettyPhoto.startSlideshow=function(){if(typeof m=="undefined"){$pp_pic_holder.find(".pp_play").unbind("click").removeClass("pp_play").addClass("pp_pause").click(function(){e.prettyPhoto.stopSlideshow();return false});m=setInterval(e.prettyPhoto.startSlideshow,settings.slideshow)}else{e.prettyPhoto.changePage("next")}};e.prettyPhoto.stopSlideshow=function(){$pp_pic_holder.find(".pp_pause").unbind("click").removeClass("pp_pause").addClass("pp_play").click(function(){e.prettyPhoto.startSlideshow();return false});clearInterval(m);m=undefined};e.prettyPhoto.close=function(){if($pp_overlay.is(":animated"))return;e.prettyPhoto.stopSlideshow();$pp_pic_holder.stop().find("object,embed").css("visibility","hidden");e("div.pp_pic_holder,div.ppt,.pp_fade").fadeOut(settings.animation_speed,function(){e(this).remove()});$pp_overlay.fadeOut(settings.animation_speed,function(){if(settings.hideflash)e("object,embed,iframe[src*=youtube],iframe[src*=vimeo]").css("visibility","visible");e(this).remove();e(window).unbind("scroll.prettyphoto");r();settings.callback();doresize=true;f=false;delete settings})};if(!pp_alreadyInitialized&&t()){pp_alreadyInitialized=true;hashIndex=t();hashRel=hashIndex;hashIndex=hashIndex.substring(hashIndex.indexOf("/")+1,hashIndex.length-1);hashRel=hashRel.substring(0,hashRel.indexOf("/"));setTimeout(function(){e("a["+s.hook+"^='"+hashRel+"']:eq("+hashIndex+")").trigger("click")},50)}return this.unbind("click.prettyphoto").bind("click.prettyphoto",e.prettyPhoto.initialize)};})(jQuery);var pp_alreadyInitialized=false
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/prettyphoto/prettyPhoto.css
ADDED
@@ -0,0 +1,796 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
div.pp_default .pp_top,
|
2 |
+
div.pp_default .pp_top .pp_middle,
|
3 |
+
div.pp_default .pp_top .pp_left,
|
4 |
+
div.pp_default .pp_top .pp_right,
|
5 |
+
div.pp_default .pp_bottom,
|
6 |
+
div.pp_default .pp_bottom .pp_left,
|
7 |
+
div.pp_default .pp_bottom .pp_middle,
|
8 |
+
div.pp_default .pp_bottom .pp_right {
|
9 |
+
height: 13px
|
10 |
+
}
|
11 |
+
div.pp_default .pp_top .pp_left {
|
12 |
+
background: url(images/prettyPhoto/default/sprite.png) -78px -93px no-repeat
|
13 |
+
}
|
14 |
+
div.pp_default .pp_top .pp_middle {
|
15 |
+
background: url(images/prettyPhoto/default/sprite_x.png) top left repeat-x
|
16 |
+
}
|
17 |
+
div.pp_default .pp_top .pp_right {
|
18 |
+
background: url(images/prettyPhoto/default/sprite.png) -112px -93px no-repeat
|
19 |
+
}
|
20 |
+
div.pp_default .pp_content .ppt {
|
21 |
+
color: #f8f8f8
|
22 |
+
}
|
23 |
+
div.pp_default .pp_content_container .pp_left {
|
24 |
+
background: url(images/prettyPhoto/default/sprite_y.png) -7px 0 repeat-y;
|
25 |
+
padding-left: 13px
|
26 |
+
}
|
27 |
+
div.pp_default .pp_content_container .pp_right {
|
28 |
+
background: url(images/prettyPhoto/default/sprite_y.png) top right repeat-y;
|
29 |
+
padding-right: 13px
|
30 |
+
}
|
31 |
+
div.pp_default .pp_next:hover {
|
32 |
+
background: url(images/prettyPhoto/default/sprite_next.png) center right no-repeat;
|
33 |
+
cursor: pointer
|
34 |
+
}
|
35 |
+
div.pp_default .pp_previous:hover {
|
36 |
+
background: url(images/prettyPhoto/default/sprite_prev.png) center left no-repeat;
|
37 |
+
cursor: pointer
|
38 |
+
}
|
39 |
+
div.pp_default .pp_expand {
|
40 |
+
background: url(images/prettyPhoto/default/sprite.png) 0 -29px no-repeat;
|
41 |
+
cursor: pointer;
|
42 |
+
width: 28px;
|
43 |
+
height: 28px
|
44 |
+
}
|
45 |
+
div.pp_default .pp_expand:hover {
|
46 |
+
background: url(images/prettyPhoto/default/sprite.png) 0 -56px no-repeat;
|
47 |
+
cursor: pointer
|
48 |
+
}
|
49 |
+
div.pp_default .pp_contract {
|
50 |
+
background: url(images/prettyPhoto/default/sprite.png) 0 -84px no-repeat;
|
51 |
+
cursor: pointer;
|
52 |
+
width: 28px;
|
53 |
+
height: 28px
|
54 |
+
}
|
55 |
+
div.pp_default .pp_contract:hover {
|
56 |
+
background: url(images/prettyPhoto/default/sprite.png) 0 -113px no-repeat;
|
57 |
+
cursor: pointer
|
58 |
+
}
|
59 |
+
div.pp_default .pp_close {
|
60 |
+
width: 30px;
|
61 |
+
height: 30px;
|
62 |
+
background: url(images/prettyPhoto/default/sprite.png) 2px 1px no-repeat;
|
63 |
+
cursor: pointer
|
64 |
+
}
|
65 |
+
div.pp_default .pp_gallery ul li a {
|
66 |
+
background: url(images/prettyPhoto/default/default_thumb.png) center center #f8f8f8;
|
67 |
+
border: 1px solid #aaa
|
68 |
+
}
|
69 |
+
div.pp_default .pp_social {
|
70 |
+
margin-top: 7px
|
71 |
+
}
|
72 |
+
div.pp_default .pp_gallery a.pp_arrow_previous,
|
73 |
+
div.pp_default .pp_gallery a.pp_arrow_next {
|
74 |
+
position: static;
|
75 |
+
left: auto
|
76 |
+
}
|
77 |
+
div.pp_default .pp_nav .pp_play,
|
78 |
+
div.pp_default .pp_nav .pp_pause {
|
79 |
+
background: url(images/prettyPhoto/default/sprite.png) -51px 1px no-repeat;
|
80 |
+
height: 30px;
|
81 |
+
width: 30px
|
82 |
+
}
|
83 |
+
div.pp_default .pp_nav .pp_pause {
|
84 |
+
background-position: -51px -29px
|
85 |
+
}
|
86 |
+
div.pp_default a.pp_arrow_previous,
|
87 |
+
div.pp_default a.pp_arrow_next {
|
88 |
+
background: url(images/prettyPhoto/default/sprite.png) -31px -3px no-repeat;
|
89 |
+
height: 20px;
|
90 |
+
width: 20px;
|
91 |
+
margin: 4px 0 0
|
92 |
+
}
|
93 |
+
div.pp_default a.pp_arrow_next {
|
94 |
+
left: 52px;
|
95 |
+
background-position: -82px -3px
|
96 |
+
}
|
97 |
+
div.pp_default .pp_content_container .pp_details {
|
98 |
+
margin-top: 5px
|
99 |
+
}
|
100 |
+
div.pp_default .pp_nav {
|
101 |
+
clear: none;
|
102 |
+
height: 30px;
|
103 |
+
width: 110px;
|
104 |
+
position: relative
|
105 |
+
}
|
106 |
+
div.pp_default .pp_nav .currentTextHolder {
|
107 |
+
font-family: Georgia;
|
108 |
+
font-style: italic;
|
109 |
+
color: #999;
|
110 |
+
font-size: 11px;
|
111 |
+
left: 75px;
|
112 |
+
line-height: 25px;
|
113 |
+
position: absolute;
|
114 |
+
top: 2px;
|
115 |
+
margin: 0;
|
116 |
+
padding: 0 0 0 10px
|
117 |
+
}
|
118 |
+
div.pp_default .pp_close:hover,
|
119 |
+
div.pp_default .pp_nav .pp_play:hover,
|
120 |
+
div.pp_default .pp_nav .pp_pause:hover,
|
121 |
+
div.pp_default .pp_arrow_next:hover,
|
122 |
+
div.pp_default .pp_arrow_previous:hover {
|
123 |
+
opacity: 0.7
|
124 |
+
}
|
125 |
+
div.pp_default .pp_description {
|
126 |
+
font-size: 11px;
|
127 |
+
font-weight: 700;
|
128 |
+
line-height: 14px;
|
129 |
+
margin: 5px 50px 5px 0
|
130 |
+
}
|
131 |
+
div.pp_default .pp_bottom .pp_left {
|
132 |
+
background: url(images/prettyPhoto/default/sprite.png) -78px -127px no-repeat
|
133 |
+
}
|
134 |
+
div.pp_default .pp_bottom .pp_middle {
|
135 |
+
background: url(images/prettyPhoto/default/sprite_x.png) bottom left repeat-x
|
136 |
+
}
|
137 |
+
div.pp_default .pp_bottom .pp_right {
|
138 |
+
background: url(images/prettyPhoto/default/sprite.png) -112px -127px no-repeat
|
139 |
+
}
|
140 |
+
div.pp_default .pp_loaderIcon {
|
141 |
+
background: url(images/prettyPhoto/default/loader.gif) center center no-repeat
|
142 |
+
}
|
143 |
+
div.light_rounded .pp_top .pp_left {
|
144 |
+
background: url(images/prettyPhoto/light_rounded/sprite.png) -88px -53px no-repeat
|
145 |
+
}
|
146 |
+
div.light_rounded .pp_top .pp_right {
|
147 |
+
background: url(images/prettyPhoto/light_rounded/sprite.png) -110px -53px no-repeat
|
148 |
+
}
|
149 |
+
div.light_rounded .pp_next:hover {
|
150 |
+
background: url(images/prettyPhoto/light_rounded/btnNext.png) center right no-repeat;
|
151 |
+
cursor: pointer
|
152 |
+
}
|
153 |
+
div.light_rounded .pp_previous:hover {
|
154 |
+
background: url(images/prettyPhoto/light_rounded/btnPrevious.png) center left no-repeat;
|
155 |
+
cursor: pointer
|
156 |
+
}
|
157 |
+
div.light_rounded .pp_expand {
|
158 |
+
background: url(images/prettyPhoto/light_rounded/sprite.png) -31px -26px no-repeat;
|
159 |
+
cursor: pointer
|
160 |
+
}
|
161 |
+
div.light_rounded .pp_expand:hover {
|
162 |
+
background: url(images/prettyPhoto/light_rounded/sprite.png) -31px -47px no-repeat;
|
163 |
+
cursor: pointer
|
164 |
+
}
|
165 |
+
div.light_rounded .pp_contract {
|
166 |
+
background: url(images/prettyPhoto/light_rounded/sprite.png) 0 -26px no-repeat;
|
167 |
+
cursor: pointer
|
168 |
+
}
|
169 |
+
div.light_rounded .pp_contract:hover {
|
170 |
+
background: url(images/prettyPhoto/light_rounded/sprite.png) 0 -47px no-repeat;
|
171 |
+
cursor: pointer
|
172 |
+
}
|
173 |
+
div.light_rounded .pp_close {
|
174 |
+
width: 75px;
|
175 |
+
height: 22px;
|
176 |
+
background: url(images/prettyPhoto/light_rounded/sprite.png) -1px -1px no-repeat;
|
177 |
+
cursor: pointer
|
178 |
+
}
|
179 |
+
div.light_rounded .pp_nav .pp_play {
|
180 |
+
background: url(images/prettyPhoto/light_rounded/sprite.png) -1px -100px no-repeat;
|
181 |
+
height: 15px;
|
182 |
+
width: 14px
|
183 |
+
}
|
184 |
+
div.light_rounded .pp_nav .pp_pause {
|
185 |
+
background: url(images/prettyPhoto/light_rounded/sprite.png) -24px -100px no-repeat;
|
186 |
+
height: 15px;
|
187 |
+
width: 14px
|
188 |
+
}
|
189 |
+
div.light_rounded .pp_arrow_previous {
|
190 |
+
background: url(images/prettyPhoto/light_rounded/sprite.png) 0 -71px no-repeat
|
191 |
+
}
|
192 |
+
div.light_rounded .pp_arrow_next {
|
193 |
+
background: url(images/prettyPhoto/light_rounded/sprite.png) -22px -71px no-repeat
|
194 |
+
}
|
195 |
+
div.light_rounded .pp_bottom .pp_left {
|
196 |
+
background: url(images/prettyPhoto/light_rounded/sprite.png) -88px -80px no-repeat
|
197 |
+
}
|
198 |
+
div.light_rounded .pp_bottom .pp_right {
|
199 |
+
background: url(images/prettyPhoto/light_rounded/sprite.png) -110px -80px no-repeat
|
200 |
+
}
|
201 |
+
div.dark_rounded .pp_top .pp_left {
|
202 |
+
background: url(images/prettyPhoto/dark_rounded/sprite.png) -88px -53px no-repeat
|
203 |
+
}
|
204 |
+
div.dark_rounded .pp_top .pp_right {
|
205 |
+
background: url(images/prettyPhoto/dark_rounded/sprite.png) -110px -53px no-repeat
|
206 |
+
}
|
207 |
+
div.dark_rounded .pp_content_container .pp_left {
|
208 |
+
background: url(images/prettyPhoto/dark_rounded/contentPattern.png) top left repeat-y
|
209 |
+
}
|
210 |
+
div.dark_rounded .pp_content_container .pp_right {
|
211 |
+
background: url(images/prettyPhoto/dark_rounded/contentPattern.png) top right repeat-y
|
212 |
+
}
|
213 |
+
div.dark_rounded .pp_next:hover {
|
214 |
+
background: url(images/prettyPhoto/dark_rounded/btnNext.png) center right no-repeat;
|
215 |
+
cursor: pointer
|
216 |
+
}
|
217 |
+
div.dark_rounded .pp_previous:hover {
|
218 |
+
background: url(images/prettyPhoto/dark_rounded/btnPrevious.png) center left no-repeat;
|
219 |
+
cursor: pointer
|
220 |
+
}
|
221 |
+
div.dark_rounded .pp_expand {
|
222 |
+
background: url(images/prettyPhoto/dark_rounded/sprite.png) -31px -26px no-repeat;
|
223 |
+
cursor: pointer
|
224 |
+
}
|
225 |
+
div.dark_rounded .pp_expand:hover {
|
226 |
+
background: url(images/prettyPhoto/dark_rounded/sprite.png) -31px -47px no-repeat;
|
227 |
+
cursor: pointer
|
228 |
+
}
|
229 |
+
div.dark_rounded .pp_contract {
|
230 |
+
background: url(images/prettyPhoto/dark_rounded/sprite.png) 0 -26px no-repeat;
|
231 |
+
cursor: pointer
|
232 |
+
}
|
233 |
+
div.dark_rounded .pp_contract:hover {
|
234 |
+
background: url(images/prettyPhoto/dark_rounded/sprite.png) 0 -47px no-repeat;
|
235 |
+
cursor: pointer
|
236 |
+
}
|
237 |
+
div.dark_rounded .pp_close {
|
238 |
+
width: 75px;
|
239 |
+
height: 22px;
|
240 |
+
background: url(images/prettyPhoto/dark_rounded/sprite.png) -1px -1px no-repeat;
|
241 |
+
cursor: pointer
|
242 |
+
}
|
243 |
+
div.dark_rounded .pp_description {
|
244 |
+
margin-right: 85px;
|
245 |
+
color: #fff
|
246 |
+
}
|
247 |
+
div.dark_rounded .pp_nav .pp_play {
|
248 |
+
background: url(images/prettyPhoto/dark_rounded/sprite.png) -1px -100px no-repeat;
|
249 |
+
height: 15px;
|
250 |
+
width: 14px
|
251 |
+
}
|
252 |
+
div.dark_rounded .pp_nav .pp_pause {
|
253 |
+
background: url(images/prettyPhoto/dark_rounded/sprite.png) -24px -100px no-repeat;
|
254 |
+
height: 15px;
|
255 |
+
width: 14px
|
256 |
+
}
|
257 |
+
div.dark_rounded .pp_arrow_previous {
|
258 |
+
background: url(images/prettyPhoto/dark_rounded/sprite.png) 0 -71px no-repeat
|
259 |
+
}
|
260 |
+
div.dark_rounded .pp_arrow_next {
|
261 |
+
background: url(images/prettyPhoto/dark_rounded/sprite.png) -22px -71px no-repeat
|
262 |
+
}
|
263 |
+
div.dark_rounded .pp_bottom .pp_left {
|
264 |
+
background: url(images/prettyPhoto/dark_rounded/sprite.png) -88px -80px no-repeat
|
265 |
+
}
|
266 |
+
div.dark_rounded .pp_bottom .pp_right {
|
267 |
+
background: url(images/prettyPhoto/dark_rounded/sprite.png) -110px -80px no-repeat
|
268 |
+
}
|
269 |
+
div.dark_rounded .pp_loaderIcon {
|
270 |
+
background: url(images/prettyPhoto/dark_rounded/loader.gif) center center no-repeat
|
271 |
+
}
|
272 |
+
div.dark_square .pp_left,
|
273 |
+
div.dark_square .pp_middle,
|
274 |
+
div.dark_square .pp_right,
|
275 |
+
div.dark_square .pp_content {
|
276 |
+
background: #000
|
277 |
+
}
|
278 |
+
div.dark_square .pp_description {
|
279 |
+
color: #fff;
|
280 |
+
margin: 0 85px 0 0
|
281 |
+
}
|
282 |
+
div.dark_square .pp_loaderIcon {
|
283 |
+
background: url(images/prettyPhoto/dark_square/loader.gif) center center no-repeat
|
284 |
+
}
|
285 |
+
div.dark_square .pp_expand {
|
286 |
+
background: url(images/prettyPhoto/dark_square/sprite.png) -31px -26px no-repeat;
|
287 |
+
cursor: pointer
|
288 |
+
}
|
289 |
+
div.dark_square .pp_expand:hover {
|
290 |
+
background: url(images/prettyPhoto/dark_square/sprite.png) -31px -47px no-repeat;
|
291 |
+
cursor: pointer
|
292 |
+
}
|
293 |
+
div.dark_square .pp_contract {
|
294 |
+
background: url(images/prettyPhoto/dark_square/sprite.png) 0 -26px no-repeat;
|
295 |
+
cursor: pointer
|
296 |
+
}
|
297 |
+
div.dark_square .pp_contract:hover {
|
298 |
+
background: url(images/prettyPhoto/dark_square/sprite.png) 0 -47px no-repeat;
|
299 |
+
cursor: pointer
|
300 |
+
}
|
301 |
+
div.dark_square .pp_close {
|
302 |
+
width: 75px;
|
303 |
+
height: 22px;
|
304 |
+
background: url(images/prettyPhoto/dark_square/sprite.png) -1px -1px no-repeat;
|
305 |
+
cursor: pointer
|
306 |
+
}
|
307 |
+
div.dark_square .pp_nav {
|
308 |
+
clear: none
|
309 |
+
}
|
310 |
+
div.dark_square .pp_nav .pp_play {
|
311 |
+
background: url(images/prettyPhoto/dark_square/sprite.png) -1px -100px no-repeat;
|
312 |
+
height: 15px;
|
313 |
+
width: 14px
|
314 |
+
}
|
315 |
+
div.dark_square .pp_nav .pp_pause {
|
316 |
+
background: url(images/prettyPhoto/dark_square/sprite.png) -24px -100px no-repeat;
|
317 |
+
height: 15px;
|
318 |
+
width: 14px
|
319 |
+
}
|
320 |
+
div.dark_square .pp_arrow_previous {
|
321 |
+
background: url(images/prettyPhoto/dark_square/sprite.png) 0 -71px no-repeat
|
322 |
+
}
|
323 |
+
div.dark_square .pp_arrow_next {
|
324 |
+
background: url(images/prettyPhoto/dark_square/sprite.png) -22px -71px no-repeat
|
325 |
+
}
|
326 |
+
div.dark_square .pp_next:hover {
|
327 |
+
background: url(images/prettyPhoto/dark_square/btnNext.png) center right no-repeat;
|
328 |
+
cursor: pointer
|
329 |
+
}
|
330 |
+
div.dark_square .pp_previous:hover {
|
331 |
+
background: url(images/prettyPhoto/dark_square/btnPrevious.png) center left no-repeat;
|
332 |
+
cursor: pointer
|
333 |
+
}
|
334 |
+
div.light_square .pp_expand {
|
335 |
+
background: url(images/prettyPhoto/light_square/sprite.png) -31px -26px no-repeat;
|
336 |
+
cursor: pointer
|
337 |
+
}
|
338 |
+
div.light_square .pp_expand:hover {
|
339 |
+
background: url(images/prettyPhoto/light_square/sprite.png) -31px -47px no-repeat;
|
340 |
+
cursor: pointer
|
341 |
+
}
|
342 |
+
div.light_square .pp_contract {
|
343 |
+
background: url(images/prettyPhoto/light_square/sprite.png) 0 -26px no-repeat;
|
344 |
+
cursor: pointer
|
345 |
+
}
|
346 |
+
div.light_square .pp_contract:hover {
|
347 |
+
background: url(images/prettyPhoto/light_square/sprite.png) 0 -47px no-repeat;
|
348 |
+
cursor: pointer
|
349 |
+
}
|
350 |
+
div.light_square .pp_close {
|
351 |
+
width: 75px;
|
352 |
+
height: 22px;
|
353 |
+
background: url(images/prettyPhoto/light_square/sprite.png) -1px -1px no-repeat;
|
354 |
+
cursor: pointer
|
355 |
+
}
|
356 |
+
div.light_square .pp_nav .pp_play {
|
357 |
+
background: url(images/prettyPhoto/light_square/sprite.png) -1px -100px no-repeat;
|
358 |
+
height: 15px;
|
359 |
+
width: 14px
|
360 |
+
}
|
361 |
+
div.light_square .pp_nav .pp_pause {
|
362 |
+
background: url(images/prettyPhoto/light_square/sprite.png) -24px -100px no-repeat;
|
363 |
+
height: 15px;
|
364 |
+
width: 14px
|
365 |
+
}
|
366 |
+
div.light_square .pp_arrow_previous {
|
367 |
+
background: url(images/prettyPhoto/light_square/sprite.png) 0 -71px no-repeat
|
368 |
+
}
|
369 |
+
div.light_square .pp_arrow_next {
|
370 |
+
background: url(images/prettyPhoto/light_square/sprite.png) -22px -71px no-repeat
|
371 |
+
}
|
372 |
+
div.light_square .pp_next:hover {
|
373 |
+
background: url(images/prettyPhoto/light_square/btnNext.png) center right no-repeat;
|
374 |
+
cursor: pointer
|
375 |
+
}
|
376 |
+
div.light_square .pp_previous:hover {
|
377 |
+
background: url(images/prettyPhoto/light_square/btnPrevious.png) center left no-repeat;
|
378 |
+
cursor: pointer
|
379 |
+
}
|
380 |
+
div.facebook .pp_top .pp_left {
|
381 |
+
background: url(images/prettyPhoto/facebook/sprite.png) -88px -53px no-repeat
|
382 |
+
}
|
383 |
+
div.facebook .pp_top .pp_middle {
|
384 |
+
background: url(images/prettyPhoto/facebook/contentPatternTop.png) top left repeat-x
|
385 |
+
}
|
386 |
+
div.facebook .pp_top .pp_right {
|
387 |
+
background: url(images/prettyPhoto/facebook/sprite.png) -110px -53px no-repeat
|
388 |
+
}
|
389 |
+
div.facebook .pp_content_container .pp_left {
|
390 |
+
background: url(images/prettyPhoto/facebook/contentPatternLeft.png) top left repeat-y
|
391 |
+
}
|
392 |
+
div.facebook .pp_content_container .pp_right {
|
393 |
+
background: url(images/prettyPhoto/facebook/contentPatternRight.png) top right repeat-y
|
394 |
+
}
|
395 |
+
div.facebook .pp_expand {
|
396 |
+
background: url(images/prettyPhoto/facebook/sprite.png) -31px -26px no-repeat;
|
397 |
+
cursor: pointer
|
398 |
+
}
|
399 |
+
div.facebook .pp_expand:hover {
|
400 |
+
background: url(images/prettyPhoto/facebook/sprite.png) -31px -47px no-repeat;
|
401 |
+
cursor: pointer
|
402 |
+
}
|
403 |
+
div.facebook .pp_contract {
|
404 |
+
background: url(images/prettyPhoto/facebook/sprite.png) 0 -26px no-repeat;
|
405 |
+
cursor: pointer
|
406 |
+
}
|
407 |
+
div.facebook .pp_contract:hover {
|
408 |
+
background: url(images/prettyPhoto/facebook/sprite.png) 0 -47px no-repeat;
|
409 |
+
cursor: pointer
|
410 |
+
}
|
411 |
+
div.facebook .pp_close {
|
412 |
+
width: 22px;
|
413 |
+
height: 22px;
|
414 |
+
background: url(images/prettyPhoto/facebook/sprite.png) -1px -1px no-repeat;
|
415 |
+
cursor: pointer
|
416 |
+
}
|
417 |
+
div.facebook .pp_description {
|
418 |
+
margin: 0 37px 0 0
|
419 |
+
}
|
420 |
+
div.facebook .pp_loaderIcon {
|
421 |
+
background: url(images/prettyPhoto/facebook/loader.gif) center center no-repeat
|
422 |
+
}
|
423 |
+
div.facebook .pp_arrow_previous {
|
424 |
+
background: url(images/prettyPhoto/facebook/sprite.png) 0 -71px no-repeat;
|
425 |
+
height: 22px;
|
426 |
+
margin-top: 0;
|
427 |
+
width: 22px
|
428 |
+
}
|
429 |
+
div.facebook .pp_arrow_previous.disabled {
|
430 |
+
background-position: 0 -96px;
|
431 |
+
cursor: default
|
432 |
+
}
|
433 |
+
div.facebook .pp_arrow_next {
|
434 |
+
background: url(images/prettyPhoto/facebook/sprite.png) -32px -71px no-repeat;
|
435 |
+
height: 22px;
|
436 |
+
margin-top: 0;
|
437 |
+
width: 22px
|
438 |
+
}
|
439 |
+
div.facebook .pp_arrow_next.disabled {
|
440 |
+
background-position: -32px -96px;
|
441 |
+
cursor: default
|
442 |
+
}
|
443 |
+
div.facebook .pp_nav {
|
444 |
+
margin-top: 0
|
445 |
+
}
|
446 |
+
div.facebook .pp_nav p {
|
447 |
+
font-size: 15px;
|
448 |
+
padding: 0 3px 0 4px
|
449 |
+
}
|
450 |
+
div.facebook .pp_nav .pp_play {
|
451 |
+
background: url(images/prettyPhoto/facebook/sprite.png) -1px -123px no-repeat;
|
452 |
+
height: 22px;
|
453 |
+
width: 22px
|
454 |
+
}
|
455 |
+
div.facebook .pp_nav .pp_pause {
|
456 |
+
background: url(images/prettyPhoto/facebook/sprite.png) -32px -123px no-repeat;
|
457 |
+
height: 22px;
|
458 |
+
width: 22px
|
459 |
+
}
|
460 |
+
div.facebook .pp_next:hover {
|
461 |
+
background: url(images/prettyPhoto/facebook/btnNext.png) center right no-repeat;
|
462 |
+
cursor: pointer
|
463 |
+
}
|
464 |
+
div.facebook .pp_previous:hover {
|
465 |
+
background: url(images/prettyPhoto/facebook/btnPrevious.png) center left no-repeat;
|
466 |
+
cursor: pointer
|
467 |
+
}
|
468 |
+
div.facebook .pp_bottom .pp_left {
|
469 |
+
background: url(images/prettyPhoto/facebook/sprite.png) -88px -80px no-repeat
|
470 |
+
}
|
471 |
+
div.facebook .pp_bottom .pp_middle {
|
472 |
+
background: url(images/prettyPhoto/facebook/contentPatternBottom.png) top left repeat-x
|
473 |
+
}
|
474 |
+
div.facebook .pp_bottom .pp_right {
|
475 |
+
background: url(images/prettyPhoto/facebook/sprite.png) -110px -80px no-repeat
|
476 |
+
}
|
477 |
+
div.pp_pic_holder a:focus {
|
478 |
+
outline: none
|
479 |
+
}
|
480 |
+
div.pp_overlay {
|
481 |
+
background: #000;
|
482 |
+
display: none;
|
483 |
+
left: 0;
|
484 |
+
position: absolute;
|
485 |
+
top: 0;
|
486 |
+
width: 100%;
|
487 |
+
z-index: 9500
|
488 |
+
}
|
489 |
+
div.pp_pic_holder {
|
490 |
+
display: none;
|
491 |
+
position: absolute;
|
492 |
+
width: 100px;
|
493 |
+
z-index: 10000
|
494 |
+
}
|
495 |
+
.pp_content {
|
496 |
+
height: 40px;
|
497 |
+
min-width: 40px
|
498 |
+
}
|
499 |
+
* html .pp_content {
|
500 |
+
width: 40px
|
501 |
+
}
|
502 |
+
.pp_content_container {
|
503 |
+
position: relative;
|
504 |
+
text-align: left;
|
505 |
+
width: 100%
|
506 |
+
}
|
507 |
+
.pp_content_container .pp_left {
|
508 |
+
padding-left: 20px
|
509 |
+
}
|
510 |
+
.pp_content_container .pp_right {
|
511 |
+
padding-right: 20px
|
512 |
+
}
|
513 |
+
.pp_content_container .pp_details {
|
514 |
+
float: left;
|
515 |
+
margin: 10px 0 2px
|
516 |
+
}
|
517 |
+
.pp_description {
|
518 |
+
display: none;
|
519 |
+
margin: 0
|
520 |
+
}
|
521 |
+
.pp_social {
|
522 |
+
float: left;
|
523 |
+
margin: 0
|
524 |
+
}
|
525 |
+
.pp_social .facebook {
|
526 |
+
float: left;
|
527 |
+
margin-left: 5px;
|
528 |
+
width: 55px;
|
529 |
+
overflow: hidden
|
530 |
+
}
|
531 |
+
.pp_social .twitter {
|
532 |
+
float: left
|
533 |
+
}
|
534 |
+
.pp_nav {
|
535 |
+
clear: right;
|
536 |
+
float: left;
|
537 |
+
margin: 3px 10px 0 0
|
538 |
+
}
|
539 |
+
.pp_nav p {
|
540 |
+
float: left;
|
541 |
+
white-space: nowrap;
|
542 |
+
margin: 2px 4px
|
543 |
+
}
|
544 |
+
.pp_nav .pp_play,
|
545 |
+
.pp_nav .pp_pause {
|
546 |
+
float: left;
|
547 |
+
margin-right: 4px;
|
548 |
+
text-indent: -10000px
|
549 |
+
}
|
550 |
+
a.pp_arrow_previous,
|
551 |
+
a.pp_arrow_next {
|
552 |
+
display: block;
|
553 |
+
float: left;
|
554 |
+
height: 15px;
|
555 |
+
margin-top: 3px;
|
556 |
+
overflow: hidden;
|
557 |
+
text-indent: -10000px;
|
558 |
+
width: 14px
|
559 |
+
}
|
560 |
+
.pp_hoverContainer {
|
561 |
+
position: absolute;
|
562 |
+
top: 0;
|
563 |
+
width: 100%;
|
564 |
+
z-index: 2000
|
565 |
+
}
|
566 |
+
.pp_gallery {
|
567 |
+
display: none;
|
568 |
+
left: 50%;
|
569 |
+
margin-top: -50px;
|
570 |
+
position: absolute;
|
571 |
+
z-index: 10000
|
572 |
+
}
|
573 |
+
.pp_gallery div {
|
574 |
+
float: left;
|
575 |
+
overflow: hidden;
|
576 |
+
position: relative
|
577 |
+
}
|
578 |
+
.pp_gallery ul {
|
579 |
+
float: left;
|
580 |
+
height: 35px;
|
581 |
+
position: relative;
|
582 |
+
white-space: nowrap;
|
583 |
+
margin: 0 0 0 5px;
|
584 |
+
padding: 0
|
585 |
+
}
|
586 |
+
.pp_gallery ul a {
|
587 |
+
border: 1px rgba(0, 0, 0, 0.5) solid;
|
588 |
+
display: block;
|
589 |
+
float: left;
|
590 |
+
height: 33px;
|
591 |
+
overflow: hidden
|
592 |
+
}
|
593 |
+
.pp_gallery ul a img {
|
594 |
+
border: 0
|
595 |
+
}
|
596 |
+
.pp_gallery li {
|
597 |
+
display: block;
|
598 |
+
float: left;
|
599 |
+
margin: 0 5px 0 0;
|
600 |
+
padding: 0
|
601 |
+
}
|
602 |
+
.pp_gallery li.default a {
|
603 |
+
background: url(images/prettyPhoto/facebook/default_thumbnail.gif) 0 0 no-repeat;
|
604 |
+
display: block;
|
605 |
+
height: 33px;
|
606 |
+
width: 50px
|
607 |
+
}
|
608 |
+
.pp_gallery .pp_arrow_previous,
|
609 |
+
.pp_gallery .pp_arrow_next {
|
610 |
+
margin-top: 7px!important
|
611 |
+
}
|
612 |
+
a.pp_next {
|
613 |
+
background: url(images/prettyPhoto/light_rounded/btnNext.png) no-repeat 10000px center;
|
614 |
+
display: block;
|
615 |
+
float: right;
|
616 |
+
height: 100%;
|
617 |
+
text-indent: -10000px;
|
618 |
+
width: 49%
|
619 |
+
}
|
620 |
+
a.pp_previous {
|
621 |
+
background: url(images/prettyPhoto/light_rounded/btnPrevious.png) no-repeat -10000px center;
|
622 |
+
display: block;
|
623 |
+
float: left;
|
624 |
+
height: 100%;
|
625 |
+
text-indent: -10000px;
|
626 |
+
width: 49%
|
627 |
+
}
|
628 |
+
a.pp_expand,
|
629 |
+
a.pp_contract {
|
630 |
+
cursor: pointer;
|
631 |
+
display: none;
|
632 |
+
height: 20px;
|
633 |
+
position: absolute;
|
634 |
+
right: 30px;
|
635 |
+
text-indent: -10000px;
|
636 |
+
top: 10px;
|
637 |
+
width: 20px;
|
638 |
+
z-index: 20000
|
639 |
+
}
|
640 |
+
a.pp_close {
|
641 |
+
position: absolute;
|
642 |
+
right: 0;
|
643 |
+
top: 0;
|
644 |
+
display: block;
|
645 |
+
line-height: 22px;
|
646 |
+
text-indent: -10000px
|
647 |
+
}
|
648 |
+
.pp_loaderIcon {
|
649 |
+
display: block;
|
650 |
+
height: 24px;
|
651 |
+
left: 50%;
|
652 |
+
position: absolute;
|
653 |
+
top: 50%;
|
654 |
+
width: 24px;
|
655 |
+
margin: -12px 0 0 -12px
|
656 |
+
}
|
657 |
+
#pp_full_res {
|
658 |
+
line-height: 1!important
|
659 |
+
}
|
660 |
+
#pp_full_res .pp_inline {
|
661 |
+
text-align: left
|
662 |
+
}
|
663 |
+
#pp_full_res .pp_inline p {
|
664 |
+
margin: 0 0 15px
|
665 |
+
}
|
666 |
+
div.ppt {
|
667 |
+
color: #fff;
|
668 |
+
display: none;
|
669 |
+
font-size: 17px;
|
670 |
+
z-index: 9999;
|
671 |
+
margin: 0 0 5px 15px
|
672 |
+
}
|
673 |
+
div.pp_default .pp_content,
|
674 |
+
div.light_rounded .pp_content {
|
675 |
+
background-color: #fff
|
676 |
+
}
|
677 |
+
div.pp_default #pp_full_res .pp_inline,
|
678 |
+
div.light_rounded .pp_content .ppt,
|
679 |
+
div.light_rounded #pp_full_res .pp_inline,
|
680 |
+
div.light_square .pp_content .ppt,
|
681 |
+
div.light_square #pp_full_res .pp_inline,
|
682 |
+
div.facebook .pp_content .ppt,
|
683 |
+
div.facebook #pp_full_res .pp_inline {
|
684 |
+
color: #000
|
685 |
+
}
|
686 |
+
div.pp_default .pp_gallery ul li a:hover,
|
687 |
+
div.pp_default .pp_gallery ul li.selected a,
|
688 |
+
.pp_gallery ul a:hover,
|
689 |
+
.pp_gallery li.selected a {
|
690 |
+
border-color: #fff
|
691 |
+
}
|
692 |
+
div.pp_default .pp_details,
|
693 |
+
div.light_rounded .pp_details,
|
694 |
+
div.dark_rounded .pp_details,
|
695 |
+
div.dark_square .pp_details,
|
696 |
+
div.light_square .pp_details,
|
697 |
+
div.facebook .pp_details {
|
698 |
+
position: relative
|
699 |
+
}
|
700 |
+
div.light_rounded .pp_top .pp_middle,
|
701 |
+
div.light_rounded .pp_content_container .pp_left,
|
702 |
+
div.light_rounded .pp_content_container .pp_right,
|
703 |
+
div.light_rounded .pp_bottom .pp_middle,
|
704 |
+
div.light_square .pp_left,
|
705 |
+
div.light_square .pp_middle,
|
706 |
+
div.light_square .pp_right,
|
707 |
+
div.light_square .pp_content,
|
708 |
+
div.facebook .pp_content {
|
709 |
+
background: #fff
|
710 |
+
}
|
711 |
+
div.light_rounded .pp_description,
|
712 |
+
div.light_square .pp_description {
|
713 |
+
margin-right: 85px
|
714 |
+
}
|
715 |
+
div.light_rounded .pp_gallery a.pp_arrow_previous,
|
716 |
+
div.light_rounded .pp_gallery a.pp_arrow_next,
|
717 |
+
div.dark_rounded .pp_gallery a.pp_arrow_previous,
|
718 |
+
div.dark_rounded .pp_gallery a.pp_arrow_next,
|
719 |
+
div.dark_square .pp_gallery a.pp_arrow_previous,
|
720 |
+
div.dark_square .pp_gallery a.pp_arrow_next,
|
721 |
+
div.light_square .pp_gallery a.pp_arrow_previous,
|
722 |
+
div.light_square .pp_gallery a.pp_arrow_next {
|
723 |
+
margin-top: 12px!important
|
724 |
+
}
|
725 |
+
div.light_rounded .pp_arrow_previous.disabled,
|
726 |
+
div.dark_rounded .pp_arrow_previous.disabled,
|
727 |
+
div.dark_square .pp_arrow_previous.disabled,
|
728 |
+
div.light_square .pp_arrow_previous.disabled {
|
729 |
+
background-position: 0 -87px;
|
730 |
+
cursor: default
|
731 |
+
}
|
732 |
+
div.light_rounded .pp_arrow_next.disabled,
|
733 |
+
div.dark_rounded .pp_arrow_next.disabled,
|
734 |
+
div.dark_square .pp_arrow_next.disabled,
|
735 |
+
div.light_square .pp_arrow_next.disabled {
|
736 |
+
background-position: -22px -87px;
|
737 |
+
cursor: default
|
738 |
+
}
|
739 |
+
div.light_rounded .pp_loaderIcon,
|
740 |
+
div.light_square .pp_loaderIcon {
|
741 |
+
background: url(images/prettyPhoto/light_rounded/loader.gif) center center no-repeat
|
742 |
+
}
|
743 |
+
div.dark_rounded .pp_top .pp_middle,
|
744 |
+
div.dark_rounded .pp_content,
|
745 |
+
div.dark_rounded .pp_bottom .pp_middle {
|
746 |
+
background: url(images/prettyPhoto/dark_rounded/contentPattern.png) top left repeat
|
747 |
+
}
|
748 |
+
div.dark_rounded .currentTextHolder,
|
749 |
+
div.dark_square .currentTextHolder {
|
750 |
+
color: #c4c4c4
|
751 |
+
}
|
752 |
+
div.dark_rounded #pp_full_res .pp_inline,
|
753 |
+
div.dark_square #pp_full_res .pp_inline {
|
754 |
+
color: #fff
|
755 |
+
}
|
756 |
+
.pp_top,
|
757 |
+
.pp_bottom {
|
758 |
+
height: 20px;
|
759 |
+
position: relative
|
760 |
+
}
|
761 |
+
* html .pp_top,
|
762 |
+
* html .pp_bottom {
|
763 |
+
padding: 0 20px
|
764 |
+
}
|
765 |
+
.pp_top .pp_left,
|
766 |
+
.pp_bottom .pp_left {
|
767 |
+
height: 20px;
|
768 |
+
left: 0;
|
769 |
+
position: absolute;
|
770 |
+
width: 20px
|
771 |
+
}
|
772 |
+
.pp_top .pp_middle,
|
773 |
+
.pp_bottom .pp_middle {
|
774 |
+
height: 20px;
|
775 |
+
left: 20px;
|
776 |
+
position: absolute;
|
777 |
+
right: 20px
|
778 |
+
}
|
779 |
+
* html .pp_top .pp_middle,
|
780 |
+
* html .pp_bottom .pp_middle {
|
781 |
+
left: 0;
|
782 |
+
position: static
|
783 |
+
}
|
784 |
+
.pp_top .pp_right,
|
785 |
+
.pp_bottom .pp_right {
|
786 |
+
height: 20px;
|
787 |
+
left: auto;
|
788 |
+
position: absolute;
|
789 |
+
right: 0;
|
790 |
+
top: 0;
|
791 |
+
width: 20px
|
792 |
+
}
|
793 |
+
.pp_fade,
|
794 |
+
.pp_gallery li.default a img {
|
795 |
+
display: none
|
796 |
+
}
|
assets/prettyphoto/prettyPhoto.min.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
div.pp_default .pp_top,div.pp_default .pp_top .pp_middle,div.pp_default .pp_top .pp_left,div.pp_default .pp_top .pp_right,div.pp_default .pp_bottom,div.pp_default .pp_bottom .pp_left,div.pp_default .pp_bottom .pp_middle,div.pp_default .pp_bottom .pp_right{height:13px}div.pp_default .pp_top .pp_left{background:url(images/prettyPhoto/default/sprite.png) -78px -93px no-repeat}div.pp_default .pp_top .pp_middle{background:url(images/prettyPhoto/default/sprite_x.png) top left repeat-x}div.pp_default .pp_top .pp_right{background:url(images/prettyPhoto/default/sprite.png) -112px -93px no-repeat}div.pp_default .pp_content .ppt{color:#f8f8f8}div.pp_default .pp_content_container .pp_left{background:url(images/prettyPhoto/default/sprite_y.png) -7px 0 repeat-y;padding-left:13px}div.pp_default .pp_content_container .pp_right{background:url(images/prettyPhoto/default/sprite_y.png) top right repeat-y;padding-right:13px}div.pp_default .pp_next:hover{background:url(images/prettyPhoto/default/sprite_next.png) center right no-repeat;cursor:pointer}div.pp_default .pp_previous:hover{background:url(images/prettyPhoto/default/sprite_prev.png) center left no-repeat;cursor:pointer}div.pp_default .pp_expand{background:url(images/prettyPhoto/default/sprite.png) 0 -29px no-repeat;cursor:pointer;width:28px;height:28px}div.pp_default .pp_expand:hover{background:url(images/prettyPhoto/default/sprite.png) 0 -56px no-repeat;cursor:pointer}div.pp_default .pp_contract{background:url(images/prettyPhoto/default/sprite.png) 0 -84px no-repeat;cursor:pointer;width:28px;height:28px}div.pp_default .pp_contract:hover{background:url(images/prettyPhoto/default/sprite.png) 0 -113px no-repeat;cursor:pointer}div.pp_default .pp_close{width:30px;height:30px;background:url(images/prettyPhoto/default/sprite.png) 2px 1px no-repeat;cursor:pointer}div.pp_default .pp_gallery ul li a{background:url(images/prettyPhoto/default/default_thumb.png) center center #f8f8f8;border:1px solid #aaa}div.pp_default .pp_social{margin-top:7px}div.pp_default .pp_gallery a.pp_arrow_previous,div.pp_default .pp_gallery a.pp_arrow_next{position:static;left:auto}div.pp_default .pp_nav .pp_play,div.pp_default .pp_nav .pp_pause{background:url(images/prettyPhoto/default/sprite.png) -51px 1px no-repeat;height:30px;width:30px}div.pp_default .pp_nav .pp_pause{background-position:-51px -29px}div.pp_default a.pp_arrow_previous,div.pp_default a.pp_arrow_next{background:url(images/prettyPhoto/default/sprite.png) -31px -3px no-repeat;height:20px;width:20px;margin:4px 0 0}div.pp_default a.pp_arrow_next{left:52px;background-position:-82px -3px}div.pp_default .pp_content_container .pp_details{margin-top:5px}div.pp_default .pp_nav{clear:none;height:30px;width:110px;position:relative}div.pp_default .pp_nav .currentTextHolder{font-family:Georgia;font-style:italic;color:#999;font-size:11px;left:75px;line-height:25px;position:absolute;top:2px;margin:0;padding:0 0 0 10px}div.pp_default .pp_close:hover,div.pp_default .pp_nav .pp_play:hover,div.pp_default .pp_nav .pp_pause:hover,div.pp_default .pp_arrow_next:hover,div.pp_default .pp_arrow_previous:hover{opacity:.7}div.pp_default .pp_description{font-size:11px;font-weight:700;line-height:14px;margin:5px 50px 5px 0}div.pp_default .pp_bottom .pp_left{background:url(images/prettyPhoto/default/sprite.png) -78px -127px no-repeat}div.pp_default .pp_bottom .pp_middle{background:url(images/prettyPhoto/default/sprite_x.png) bottom left repeat-x}div.pp_default .pp_bottom .pp_right{background:url(images/prettyPhoto/default/sprite.png) -112px -127px no-repeat}div.pp_default .pp_loaderIcon{background:url(images/prettyPhoto/default/loader.gif) center center no-repeat}div.light_rounded .pp_top .pp_left{background:url(images/prettyPhoto/light_rounded/sprite.png) -88px -53px no-repeat}div.light_rounded .pp_top .pp_right{background:url(images/prettyPhoto/light_rounded/sprite.png) -110px -53px no-repeat}div.light_rounded .pp_next:hover{background:url(images/prettyPhoto/light_rounded/btnNext.png) center right no-repeat;cursor:pointer}div.light_rounded .pp_previous:hover{background:url(images/prettyPhoto/light_rounded/btnPrevious.png) center left no-repeat;cursor:pointer}div.light_rounded .pp_expand{background:url(images/prettyPhoto/light_rounded/sprite.png) -31px -26px no-repeat;cursor:pointer}div.light_rounded .pp_expand:hover{background:url(images/prettyPhoto/light_rounded/sprite.png) -31px -47px no-repeat;cursor:pointer}div.light_rounded .pp_contract{background:url(images/prettyPhoto/light_rounded/sprite.png) 0 -26px no-repeat;cursor:pointer}div.light_rounded .pp_contract:hover{background:url(images/prettyPhoto/light_rounded/sprite.png) 0 -47px no-repeat;cursor:pointer}div.light_rounded .pp_close{width:75px;height:22px;background:url(images/prettyPhoto/light_rounded/sprite.png) -1px -1px no-repeat;cursor:pointer}div.light_rounded .pp_nav .pp_play{background:url(images/prettyPhoto/light_rounded/sprite.png) -1px -100px no-repeat;height:15px;width:14px}div.light_rounded .pp_nav .pp_pause{background:url(images/prettyPhoto/light_rounded/sprite.png) -24px -100px no-repeat;height:15px;width:14px}div.light_rounded .pp_arrow_previous{background:url(images/prettyPhoto/light_rounded/sprite.png) 0 -71px no-repeat}div.light_rounded .pp_arrow_next{background:url(images/prettyPhoto/light_rounded/sprite.png) -22px -71px no-repeat}div.light_rounded .pp_bottom .pp_left{background:url(images/prettyPhoto/light_rounded/sprite.png) -88px -80px no-repeat}div.light_rounded .pp_bottom .pp_right{background:url(images/prettyPhoto/light_rounded/sprite.png) -110px -80px no-repeat}div.dark_rounded .pp_top .pp_left{background:url(images/prettyPhoto/dark_rounded/sprite.png) -88px -53px no-repeat}div.dark_rounded .pp_top .pp_right{background:url(images/prettyPhoto/dark_rounded/sprite.png) -110px -53px no-repeat}div.dark_rounded .pp_content_container .pp_left{background:url(images/prettyPhoto/dark_rounded/contentPattern.png) top left repeat-y}div.dark_rounded .pp_content_container .pp_right{background:url(images/prettyPhoto/dark_rounded/contentPattern.png) top right repeat-y}div.dark_rounded .pp_next:hover{background:url(images/prettyPhoto/dark_rounded/btnNext.png) center right no-repeat;cursor:pointer}div.dark_rounded .pp_previous:hover{background:url(images/prettyPhoto/dark_rounded/btnPrevious.png) center left no-repeat;cursor:pointer}div.dark_rounded .pp_expand{background:url(images/prettyPhoto/dark_rounded/sprite.png) -31px -26px no-repeat;cursor:pointer}div.dark_rounded .pp_expand:hover{background:url(images/prettyPhoto/dark_rounded/sprite.png) -31px -47px no-repeat;cursor:pointer}div.dark_rounded .pp_contract{background:url(images/prettyPhoto/dark_rounded/sprite.png) 0 -26px no-repeat;cursor:pointer}div.dark_rounded .pp_contract:hover{background:url(images/prettyPhoto/dark_rounded/sprite.png) 0 -47px no-repeat;cursor:pointer}div.dark_rounded .pp_close{width:75px;height:22px;background:url(images/prettyPhoto/dark_rounded/sprite.png) -1px -1px no-repeat;cursor:pointer}div.dark_rounded .pp_description{margin-right:85px;color:#fff}div.dark_rounded .pp_nav .pp_play{background:url(images/prettyPhoto/dark_rounded/sprite.png) -1px -100px no-repeat;height:15px;width:14px}div.dark_rounded .pp_nav .pp_pause{background:url(images/prettyPhoto/dark_rounded/sprite.png) -24px -100px no-repeat;height:15px;width:14px}div.dark_rounded .pp_arrow_previous{background:url(images/prettyPhoto/dark_rounded/sprite.png) 0 -71px no-repeat}div.dark_rounded .pp_arrow_next{background:url(images/prettyPhoto/dark_rounded/sprite.png) -22px -71px no-repeat}div.dark_rounded .pp_bottom .pp_left{background:url(images/prettyPhoto/dark_rounded/sprite.png) -88px -80px no-repeat}div.dark_rounded .pp_bottom .pp_right{background:url(images/prettyPhoto/dark_rounded/sprite.png) -110px -80px no-repeat}div.dark_rounded .pp_loaderIcon{background:url(images/prettyPhoto/dark_rounded/loader.gif) center center no-repeat}div.dark_square .pp_left,div.dark_square .pp_middle,div.dark_square .pp_right,div.dark_square .pp_content{background:#000}div.dark_square .pp_description{color:#fff;margin:0 85px 0 0}div.dark_square .pp_loaderIcon{background:url(images/prettyPhoto/dark_square/loader.gif) center center no-repeat}div.dark_square .pp_expand{background:url(images/prettyPhoto/dark_square/sprite.png) -31px -26px no-repeat;cursor:pointer}div.dark_square .pp_expand:hover{background:url(images/prettyPhoto/dark_square/sprite.png) -31px -47px no-repeat;cursor:pointer}div.dark_square .pp_contract{background:url(images/prettyPhoto/dark_square/sprite.png) 0 -26px no-repeat;cursor:pointer}div.dark_square .pp_contract:hover{background:url(images/prettyPhoto/dark_square/sprite.png) 0 -47px no-repeat;cursor:pointer}div.dark_square .pp_close{width:75px;height:22px;background:url(images/prettyPhoto/dark_square/sprite.png) -1px -1px no-repeat;cursor:pointer}div.dark_square .pp_nav{clear:none}div.dark_square .pp_nav .pp_play{background:url(images/prettyPhoto/dark_square/sprite.png) -1px -100px no-repeat;height:15px;width:14px}div.dark_square .pp_nav .pp_pause{background:url(images/prettyPhoto/dark_square/sprite.png) -24px -100px no-repeat;height:15px;width:14px}div.dark_square .pp_arrow_previous{background:url(images/prettyPhoto/dark_square/sprite.png) 0 -71px no-repeat}div.dark_square .pp_arrow_next{background:url(images/prettyPhoto/dark_square/sprite.png) -22px -71px no-repeat}div.dark_square .pp_next:hover{background:url(images/prettyPhoto/dark_square/btnNext.png) center right no-repeat;cursor:pointer}div.dark_square .pp_previous:hover{background:url(images/prettyPhoto/dark_square/btnPrevious.png) center left no-repeat;cursor:pointer}div.light_square .pp_expand{background:url(images/prettyPhoto/light_square/sprite.png) -31px -26px no-repeat;cursor:pointer}div.light_square .pp_expand:hover{background:url(images/prettyPhoto/light_square/sprite.png) -31px -47px no-repeat;cursor:pointer}div.light_square .pp_contract{background:url(images/prettyPhoto/light_square/sprite.png) 0 -26px no-repeat;cursor:pointer}div.light_square .pp_contract:hover{background:url(images/prettyPhoto/light_square/sprite.png) 0 -47px no-repeat;cursor:pointer}div.light_square .pp_close{width:75px;height:22px;background:url(images/prettyPhoto/light_square/sprite.png) -1px -1px no-repeat;cursor:pointer}div.light_square .pp_nav .pp_play{background:url(images/prettyPhoto/light_square/sprite.png) -1px -100px no-repeat;height:15px;width:14px}div.light_square .pp_nav .pp_pause{background:url(images/prettyPhoto/light_square/sprite.png) -24px -100px no-repeat;height:15px;width:14px}div.light_square .pp_arrow_previous{background:url(images/prettyPhoto/light_square/sprite.png) 0 -71px no-repeat}div.light_square .pp_arrow_next{background:url(images/prettyPhoto/light_square/sprite.png) -22px -71px no-repeat}div.light_square .pp_next:hover{background:url(images/prettyPhoto/light_square/btnNext.png) center right no-repeat;cursor:pointer}div.light_square .pp_previous:hover{background:url(images/prettyPhoto/light_square/btnPrevious.png) center left no-repeat;cursor:pointer}div.facebook .pp_top .pp_left{background:url(images/prettyPhoto/facebook/sprite.png) -88px -53px no-repeat}div.facebook .pp_top .pp_middle{background:url(images/prettyPhoto/facebook/contentPatternTop.png) top left repeat-x}div.facebook .pp_top .pp_right{background:url(images/prettyPhoto/facebook/sprite.png) -110px -53px no-repeat}div.facebook .pp_content_container .pp_left{background:url(images/prettyPhoto/facebook/contentPatternLeft.png) top left repeat-y}div.facebook .pp_content_container .pp_right{background:url(images/prettyPhoto/facebook/contentPatternRight.png) top right repeat-y}div.facebook .pp_expand{background:url(images/prettyPhoto/facebook/sprite.png) -31px -26px no-repeat;cursor:pointer}div.facebook .pp_expand:hover{background:url(images/prettyPhoto/facebook/sprite.png) -31px -47px no-repeat;cursor:pointer}div.facebook .pp_contract{background:url(images/prettyPhoto/facebook/sprite.png) 0 -26px no-repeat;cursor:pointer}div.facebook .pp_contract:hover{background:url(images/prettyPhoto/facebook/sprite.png) 0 -47px no-repeat;cursor:pointer}div.facebook .pp_close{width:22px;height:22px;background:url(images/prettyPhoto/facebook/sprite.png) -1px -1px no-repeat;cursor:pointer}div.facebook .pp_description{margin:0 37px 0 0}div.facebook .pp_loaderIcon{background:url(images/prettyPhoto/facebook/loader.gif) center center no-repeat}div.facebook .pp_arrow_previous{background:url(images/prettyPhoto/facebook/sprite.png) 0 -71px no-repeat;height:22px;margin-top:0;width:22px}div.facebook .pp_arrow_previous.disabled{background-position:0 -96px;cursor:default}div.facebook .pp_arrow_next{background:url(images/prettyPhoto/facebook/sprite.png) -32px -71px no-repeat;height:22px;margin-top:0;width:22px}div.facebook .pp_arrow_next.disabled{background-position:-32px -96px;cursor:default}div.facebook .pp_nav{margin-top:0}div.facebook .pp_nav p{font-size:15px;padding:0 3px 0 4px}div.facebook .pp_nav .pp_play{background:url(images/prettyPhoto/facebook/sprite.png) -1px -123px no-repeat;height:22px;width:22px}div.facebook .pp_nav .pp_pause{background:url(images/prettyPhoto/facebook/sprite.png) -32px -123px no-repeat;height:22px;width:22px}div.facebook .pp_next:hover{background:url(images/prettyPhoto/facebook/btnNext.png) center right no-repeat;cursor:pointer}div.facebook .pp_previous:hover{background:url(images/prettyPhoto/facebook/btnPrevious.png) center left no-repeat;cursor:pointer}div.facebook .pp_bottom .pp_left{background:url(images/prettyPhoto/facebook/sprite.png) -88px -80px no-repeat}div.facebook .pp_bottom .pp_middle{background:url(images/prettyPhoto/facebook/contentPatternBottom.png) top left repeat-x}div.facebook .pp_bottom .pp_right{background:url(images/prettyPhoto/facebook/sprite.png) -110px -80px no-repeat}div.pp_pic_holder a:focus{outline:none}div.pp_overlay{background:#000;display:none;left:0;position:absolute;top:0;width:100%;z-index:9500}div.pp_pic_holder{display:none;position:absolute;width:100px;z-index:10000}.pp_content{height:40px;min-width:40px}* html .pp_content{width:40px}.pp_content_container{position:relative;text-align:left;width:100%}.pp_content_container .pp_left{padding-left:20px}.pp_content_container .pp_right{padding-right:20px}.pp_content_container .pp_details{float:left;margin:10px 0 2px}.pp_description{display:none;margin:0}.pp_social{float:left;margin:0}.pp_social .facebook{float:left;margin-left:5px;width:55px;overflow:hidden}.pp_social .twitter{float:left}.pp_nav{clear:right;float:left;margin:3px 10px 0 0}.pp_nav p{float:left;white-space:nowrap;margin:2px 4px}.pp_nav .pp_play,.pp_nav .pp_pause{float:left;margin-right:4px;text-indent:-10000px}a.pp_arrow_previous,a.pp_arrow_next{display:block;float:left;height:15px;margin-top:3px;overflow:hidden;text-indent:-10000px;width:14px}.pp_hoverContainer{position:absolute;top:0;width:100%;z-index:2000}.pp_gallery{display:none;left:50%;margin-top:-50px;position:absolute;z-index:10000}.pp_gallery div{float:left;overflow:hidden;position:relative}.pp_gallery ul{float:left;height:35px;position:relative;white-space:nowrap;margin:0 0 0 5px;padding:0}.pp_gallery ul a{border:1px rgba(0,0,0,.5) solid;display:block;float:left;height:33px;overflow:hidden}.pp_gallery ul a img{border:0}.pp_gallery li{display:block;float:left;margin:0 5px 0 0;padding:0}.pp_gallery li.default a{background:url(images/prettyPhoto/facebook/default_thumbnail.gif) 0 0 no-repeat;display:block;height:33px;width:50px}.pp_gallery .pp_arrow_previous,.pp_gallery .pp_arrow_next{margin-top:7px!important}a.pp_next{background:url(images/prettyPhoto/light_rounded/btnNext.png) no-repeat 10000px center;display:block;float:right;height:100%;text-indent:-10000px;width:49%}a.pp_previous{background:url(images/prettyPhoto/light_rounded/btnPrevious.png) no-repeat -10000px center;display:block;float:left;height:100%;text-indent:-10000px;width:49%}a.pp_expand,a.pp_contract{cursor:pointer;display:none;height:20px;position:absolute;right:30px;text-indent:-10000px;top:10px;width:20px;z-index:20000}a.pp_close{position:absolute;right:0;top:0;display:block;line-height:22px;text-indent:-10000px}.pp_loaderIcon{display:block;height:24px;left:50%;position:absolute;top:50%;width:24px;margin:-12px 0 0 -12px}#pp_full_res{line-height:1!important}#pp_full_res .pp_inline{text-align:left}#pp_full_res .pp_inline p{margin:0 0 15px}div.ppt{color:#fff;display:none;font-size:17px;z-index:9999;margin:0 0 5px 15px}div.pp_default .pp_content,div.light_rounded .pp_content{background-color:#fff}div.pp_default #pp_full_res .pp_inline,div.light_rounded .pp_content .ppt,div.light_rounded #pp_full_res .pp_inline,div.light_square .pp_content .ppt,div.light_square #pp_full_res .pp_inline,div.facebook .pp_content .ppt,div.facebook #pp_full_res .pp_inline{color:#000}div.pp_default .pp_gallery ul li a:hover,div.pp_default .pp_gallery ul li.selected a,.pp_gallery ul a:hover,.pp_gallery li.selected a{border-color:#fff}div.pp_default .pp_details,div.light_rounded .pp_details,div.dark_rounded .pp_details,div.dark_square .pp_details,div.light_square .pp_details,div.facebook .pp_details{position:relative}div.light_rounded .pp_top .pp_middle,div.light_rounded .pp_content_container .pp_left,div.light_rounded .pp_content_container .pp_right,div.light_rounded .pp_bottom .pp_middle,div.light_square .pp_left,div.light_square .pp_middle,div.light_square .pp_right,div.light_square .pp_content,div.facebook .pp_content{background:#fff}div.light_rounded .pp_description,div.light_square .pp_description{margin-right:85px}div.light_rounded .pp_gallery a.pp_arrow_previous,div.light_rounded .pp_gallery a.pp_arrow_next,div.dark_rounded .pp_gallery a.pp_arrow_previous,div.dark_rounded .pp_gallery a.pp_arrow_next,div.dark_square .pp_gallery a.pp_arrow_previous,div.dark_square .pp_gallery a.pp_arrow_next,div.light_square .pp_gallery a.pp_arrow_previous,div.light_square .pp_gallery a.pp_arrow_next{margin-top:12px!important}div.light_rounded .pp_arrow_previous.disabled,div.dark_rounded .pp_arrow_previous.disabled,div.dark_square .pp_arrow_previous.disabled,div.light_square .pp_arrow_previous.disabled{background-position:0 -87px;cursor:default}div.light_rounded .pp_arrow_next.disabled,div.dark_rounded .pp_arrow_next.disabled,div.dark_square .pp_arrow_next.disabled,div.light_square .pp_arrow_next.disabled{background-position:-22px -87px;cursor:default}div.light_rounded .pp_loaderIcon,div.light_square .pp_loaderIcon{background:url(images/prettyPhoto/light_rounded/loader.gif) center center no-repeat}div.dark_rounded .pp_top .pp_middle,div.dark_rounded .pp_content,div.dark_rounded .pp_bottom .pp_middle{background:url(images/prettyPhoto/dark_rounded/contentPattern.png) top left repeat}div.dark_rounded .currentTextHolder,div.dark_square .currentTextHolder{color:#c4c4c4}div.dark_rounded #pp_full_res .pp_inline,div.dark_square #pp_full_res .pp_inline{color:#fff}.pp_top,.pp_bottom{height:20px;position:relative}* html .pp_top,* html .pp_bottom{padding:0 20px}.pp_top .pp_left,.pp_bottom .pp_left{height:20px;left:0;position:absolute;width:20px}.pp_top .pp_middle,.pp_bottom .pp_middle{height:20px;left:20px;position:absolute;right:20px}* html .pp_top .pp_middle,* html .pp_bottom .pp_middle{left:0;position:static}.pp_top .pp_right,.pp_bottom .pp_right{height:20px;left:auto;position:absolute;right:0;top:0;width:20px}.pp_fade,.pp_gallery li.default a img{display:none}
|
assets/select2/css/select2.min.css
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
.select2-container{box-sizing:border-box;display:inline-block;margin:0;position:relative;vertical-align:middle}.select2-container .select2-selection--single{box-sizing:border-box;cursor:pointer;display:block;height:28px;user-select:none;-webkit-user-select:none}.select2-container .select2-selection--single .select2-selection__rendered{display:block;padding-left:8px;padding-right:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-selection--single .select2-selection__clear{position:relative}.select2-container[dir=rtl] .select2-selection--single .select2-selection__rendered{padding-right:8px;padding-left:20px}.select2-container .select2-selection--multiple{box-sizing:border-box;cursor:pointer;display:block;min-height:32px;user-select:none;-webkit-user-select:none}.select2-container .select2-selection--multiple .select2-selection__rendered{display:inline-block;overflow:hidden;padding-left:8px;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-search--inline{float:left}.select2-container .select2-search--inline .select2-search__field{box-sizing:border-box;border:none;font-size:100%;margin-top:5px;padding:0}.select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-dropdown{background-color:#fff;border:1px solid #ddd;box-shadow:inset 0 1px 2px rgba(0,0,0,.07);border-radius:0;box-sizing:border-box;display:block;position:absolute;left:-100000px;width:100%;z-index:1051}.select2-results{display:block}.select2-results__options{list-style:none;margin:0;padding:0}.select2-results__option{padding:6px;margin-bottom:0;user-select:none;-webkit-user-select:none}.select2-results__option[aria-selected]{cursor:pointer}.select2-container--open .select2-dropdown{left:0}.select2-container--open .select2-dropdown--above{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--open .select2-dropdown--below{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-search--dropdown{display:block;padding:4px}.select2-search--dropdown .select2-search__field{padding:4px;width:100%;box-sizing:border-box}.select2-search--dropdown .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-search--dropdown.select2-search--hide{display:none}.select2-close-mask{border:0;margin:0;padding:0;display:block;position:fixed;left:0;top:0;min-height:100%;min-width:100%;height:auto;width:auto;opacity:0;z-index:99;background-color:#fff;filter:alpha(opacity=0)}.select2-hidden-accessible{border:0!important;clip:rect(0 0 0 0)!important;height:1px!important;margin:-1px!important;overflow:hidden!important;padding:0!important;position:absolute!important;width:1px!important}.select2-container--classic .select2-results>.select2-results__options,.select2-container--default .select2-results>.select2-results__options{max-height:200px;overflow-y:auto}.select2-container--default .select2-selection--single{background-color:#fff;border:1px solid #ddd;box-shadow:inset 0 1px 2px rgba(0,0,0,.07);border-radius:0}.select2-container--default .select2-selection--single .select2-selection__rendered{color:#444;line-height:28px}.select2-container--default .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:700}.select2-container--default .select2-selection--single .select2-selection__placeholder{color:#999}.select2-container--default .select2-selection--single .select2-selection__arrow{height:26px;position:absolute;top:1px;right:1px;width:20px}.select2-container--default .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent;border-style:solid;border-width:5px 4px 0;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2-container--default[dir=rtl] .select2-selection--single .select2-selection__clear{float:left}.select2-container--default[dir=rtl] .select2-selection--single .select2-selection__arrow{left:1px;right:auto}.select2-container--default.select2-container--disabled .select2-selection--single{background-color:#ddd;cursor:default}.select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear{display:none}.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888;border-width:0 4px 5px}.select2-container--default .select2-selection--multiple{background-color:#fff;border:1px solid #ddd;box-shadow:inset 0 1px 2px rgba(0,0,0,.07);border-radius:0;cursor:text;padding-bottom:2px}.select2-container--default .select2-selection--multiple .select2-selection__rendered{box-sizing:border-box;list-style:none;margin:0;padding:0 5px;width:100%}.select2-container--default .select2-selection--multiple .select2-selection__rendered li{list-style:none;margin-bottom:0}.select2-container--default .select2-selection--multiple .select2-selection__placeholder{color:#999;margin-top:5px;float:left}.select2-container--default .select2-selection--multiple .select2-selection__clear{cursor:pointer;float:right;font-weight:700;margin-top:5px;margin-right:10px}.select2-container--default .select2-selection--multiple .select2-selection__choice{background-color:#f1f1f1;border:1px solid #ddd;border-radius:2px;cursor:default;float:left;margin-right:5px;margin-top:5px;margin-bottom:0;padding:0 5px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove{color:#0073aa;cursor:pointer;display:inline-block;font-weight:400;margin:0 2px 1px 0}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover{color:#5b9dd9}.select2-container--default[dir=rtl] .select2-selection--multiple .select2-search--inline,.select2-container--default[dir=rtl] .select2-selection--multiple .select2-selection__choice,.select2-container--default[dir=rtl] .select2-selection--multiple .select2-selection__placeholder{float:right}.select2-container--default[dir=rtl] .select2-selection--multiple .select2-selection__choice{margin-left:5px;margin-right:auto}.select2-container--default[dir=rtl] .select2-selection--multiple .select2-selection__choice__remove{margin-left:2px;margin-right:auto}.select2-container--default.select2-container--focus .select2-selection--multiple{border:1px solid #5b9dd9;box-shadow:0 0 2px rgba(30,140,190,.8);outline:0}.select2-container--default.select2-container--disabled .select2-selection--multiple{background-color:#ddd;cursor:default}.select2-container--default.select2-container--disabled .select2-selection__choice__remove{display:none}.select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple,.select2-container--default.select2-container--open.select2-container--above .select2-selection--single{border-top-left-radius:0;border-top-right-radius:0}.select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple,.select2-container--default.select2-container--open.select2-container--below .select2-selection--single{border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--default .select2-search--dropdown .select2-search__field{border:1px solid #ddd;box-shadow:inset 0 1px 2px rgba(0,0,0,.07)}.select2-container--default .select2-search--inline .select2-search__field{background:0 0;border:none;outline:0;box-shadow:none;-webkit-appearance:textfield}.select2-container--default .select2-results__option[role=group]{padding:0}.select2-container--default .select2-results__option[aria-disabled=true]{color:#e5e5e5}.select2-container--default .select2-results__option[aria-selected=true]{background-color:#f1f1f1}.select2-container--default .select2-results__option .select2-results__option{padding-left:1em}.select2-container--default .select2-results__option .select2-results__option .select2-results__group{padding-left:0}.select2-container--default .select2-results__option .select2-results__option .select2-results__option{margin-left:-1em;padding-left:2em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-2em;padding-left:3em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-3em;padding-left:4em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-4em;padding-left:5em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-5em;padding-left:6em}.select2-container--default .select2-results__option--highlighted[aria-selected]{background-color:#00a0d2;color:#fff}.select2-container--default .select2-results__group{cursor:default;display:block;padding:6px}.select2-container--classic .select2-selection--single{background-color:#f7f7f7;border:1px solid #ddd;box-shadow:inset 0 1px 2px rgba(0,0,0,.07);border-radius:0;outline:0;background-image:-webkit-linear-gradient(top,#fff 50%,#eee 100%);background-image:-o-linear-gradient(top,#fff 50%,#eee 100%);background-image:linear-gradient(to bottom,#fff 50%,#eee 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0)}.select2-container--classic .select2-selection--single:focus{border:1px solid #5897fb;box-shadow:0 0 2px rgba(30,140,190,.8)}.select2-container--classic .select2-selection--single .select2-selection__rendered{color:#444;line-height:28px}.select2-container--classic .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:700;margin-right:10px}.select2-container--classic .select2-selection--single .select2-selection__placeholder{color:#999}.select2-container--classic .select2-selection--single .select2-selection__arrow{background-color:#ddd;border:none;border-left:1px solid #ddd;border-top-right-radius:4px;border-bottom-right-radius:4px;height:26px;position:absolute;top:1px;right:1px;width:20px;background-image:-webkit-linear-gradient(top,#eee 50%,#ccc 100%);background-image:-o-linear-gradient(top,#eee 50%,#ccc 100%);background-image:linear-gradient(to bottom,#eee 50%,#ccc 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFCCCCCC', GradientType=0)}.select2-container--classic .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent;border-style:solid;border-width:5px 4px 0;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2-container--classic[dir=rtl] .select2-selection--single .select2-selection__clear{float:left}.select2-container--classic[dir=rtl] .select2-selection--single .select2-selection__arrow{border:none;border-right:1px solid #ddd;border-radius:4px 0 0 4px;left:1px;right:auto}.select2-container--classic.select2-container--open .select2-selection--single{border:1px solid #5897fb}.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow{background:0 0;border:none}.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888;border-width:0 4px 5px}.select2-container--classic.select2-container--open.select2-container--above .select2-selection--single{border-top:none;border-top-left-radius:0;border-top-right-radius:0;background-image:-webkit-linear-gradient(top,#fff 0,#eee 50%);background-image:-o-linear-gradient(top,#fff 0,#eee 50%);background-image:linear-gradient(to bottom,#fff 0,#eee 50%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0)}.select2-container--classic.select2-container--open.select2-container--below .select2-selection--single{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0;background-image:-webkit-linear-gradient(top,#eee 50%,#fff 100%);background-image:-o-linear-gradient(top,#eee 50%,#fff 100%);background-image:linear-gradient(to bottom,#eee 50%,#fff 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFFFFFFF', GradientType=0)}.select2-container--classic .select2-selection--multiple{background-color:#fff;border:1px solid #ddd;box-shadow:inset 0 1px 2px rgba(0,0,0,.07);border-radius:0;cursor:text;outline:0}.select2-container--classic .select2-selection--multiple:focus{border:1px solid #5897fb;box-shadow:0 0 2px rgba(30,140,190,.8)}.select2-container--classic .select2-selection--multiple .select2-selection__rendered{list-style:none;margin:0;padding:0 5px}.select2-container--classic .select2-selection--multiple .select2-selection__clear{display:none}.select2-container--classic .select2-selection--multiple .select2-selection__choice{background-color:#f1f1f1;border:1px solid #ddd;box-shadow:inset 0 1px 2px rgba(0,0,0,.07);border-radius:0;cursor:default;float:left;margin-right:5px;margin-top:5px;margin-bottom:0;padding:0 5px}.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove{color:#888;cursor:pointer;display:inline-block;font-weight:700;margin-right:2px}.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove:hover{color:#555}.select2-container--classic[dir=rtl] .select2-selection--multiple .select2-selection__choice{float:right;margin-left:5px;margin-right:auto}.select2-container--classic[dir=rtl] .select2-selection--multiple .select2-selection__choice__remove{margin-left:2px;margin-right:auto}.select2-container--classic.select2-container--open .select2-selection--multiple{border:1px solid #5897fb}.select2-container--classic.select2-container--open.select2-container--above .select2-selection--multiple{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-container--classic.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--classic .select2-search--dropdown .select2-search__field{border:1px solid #ddd;box-shadow:inset 0 1px 2px rgba(0,0,0,.07);outline:0}.select2-container--classic .select2-search--inline .select2-search__field{outline:0;box-shadow:none}.select2-container--classic .select2-dropdown{background-color:#fff;border:1px solid transparent}.select2-container--classic .select2-dropdown--above{border-bottom:none}.select2-container--classic .select2-dropdown--below{border-top:none}.select2-container--classic .select2-results__option[role=group]{padding:0}.select2-container--classic .select2-results__option[aria-disabled=true]{color:grey}.select2-container--classic .select2-results__option--highlighted[aria-selected]{background-color:#5897fb;color:#fff}.select2-container--classic .select2-results__group{cursor:default;display:block;padding:6px}.select2-container--classic.select2-container--open .select2-dropdown{border-color:#5897fb}
|
|
assets/select2/{js/i18n → i18n}/af.js
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
-
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/af",[],function(){return{errorLoading:function(){return"Die resultate kon nie gelaai word nie."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Verwyders asseblief "+t+" character";return t!=1&&(n+="s"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Voer asseblief "+t+" of meer karakters";return n},loadingMore:function(){return"Meer resultate word gelaai…"},maximumSelected:function(e){var t="Kies asseblief net "+e.maximum+" item";return e.maximum!=1&&(t+="s"),t},noResults:function(){return"Geen resultate gevind"},searching:function(){return"Besig…"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
+
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/af",[],function(){return{errorLoading:function(){return"Die resultate kon nie gelaai word nie."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Verwyders asseblief "+t+" character";return t!=1&&(n+="s"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Voer asseblief "+t+" of meer karakters";return n},loadingMore:function(){return"Meer resultate word gelaai…"},maximumSelected:function(e){var t="Kies asseblief net "+e.maximum+" item";return e.maximum!=1&&(t+="s"),t},noResults:function(){return"Geen resultate gevind"},searching:function(){return"Besig…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/{js/i18n → i18n}/ar.js
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
-
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ar",[],function(){return{errorLoading:function(){return"لا يمكن تحميل النتائج"},inputTooLong:function(e){var t=e.input.length-e.maximum;return"الرجاء حذف "+t+" عناصر"},inputTooShort:function(e){var t=e.minimum-e.input.length;return"الرجاء إضافة "+t+" عناصر"},loadingMore:function(){return"جاري تحميل نتائج إضافية..."},maximumSelected:function(e){return"تستطيع إختيار "+e.maximum+" بنود فقط"},noResults:function(){return"لم يتم العثور على أي نتائج"},searching:function(){return"جاري البحث…"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
+
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ar",[],function(){return{errorLoading:function(){return"لا يمكن تحميل النتائج"},inputTooLong:function(e){var t=e.input.length-e.maximum;return"الرجاء حذف "+t+" عناصر"},inputTooShort:function(e){var t=e.minimum-e.input.length;return"الرجاء إضافة "+t+" عناصر"},loadingMore:function(){return"جاري تحميل نتائج إضافية..."},maximumSelected:function(e){return"تستطيع إختيار "+e.maximum+" بنود فقط"},noResults:function(){return"لم يتم العثور على أي نتائج"},searching:function(){return"جاري البحث…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/{js/i18n → i18n}/az.js
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
-
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/az",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum;return t+" simvol silin"},inputTooShort:function(e){var t=e.minimum-e.input.length;return t+" simvol daxil edin"},loadingMore:function(){return"Daha çox nəticə yüklənir…"},maximumSelected:function(e){return"Sadəcə "+e.maximum+" element seçə bilərsiniz"},noResults:function(){return"Nəticə tapılmadı"},searching:function(){return"Axtarılır…"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
+
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/az",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum;return t+" simvol silin"},inputTooShort:function(e){var t=e.minimum-e.input.length;return t+" simvol daxil edin"},loadingMore:function(){return"Daha çox nəticə yüklənir…"},maximumSelected:function(e){return"Sadəcə "+e.maximum+" element seçə bilərsiniz"},noResults:function(){return"Nəticə tapılmadı"},searching:function(){return"Axtarılır…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/{js/i18n → i18n}/bg.js
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
-
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/bg",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Моля въведете с "+t+" по-малко символ";return t>1&&(n+="a"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Моля въведете още "+t+" символ";return t>1&&(n+="a"),n},loadingMore:function(){return"Зареждат се още…"},maximumSelected:function(e){var t="Можете да направите до "+e.maximum+" ";return e.maximum>1?t+="избора":t+="избор",t},noResults:function(){return"Няма намерени съвпадения"},searching:function(){return"Търсене…"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
+
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/bg",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Моля въведете с "+t+" по-малко символ";return t>1&&(n+="a"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Моля въведете още "+t+" символ";return t>1&&(n+="a"),n},loadingMore:function(){return"Зареждат се още…"},maximumSelected:function(e){var t="Можете да направите до "+e.maximum+" ";return e.maximum>1?t+="избора":t+="избор",t},noResults:function(){return"Няма намерени съвпадения"},searching:function(){return"Търсене…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/{js/i18n → i18n}/bs.js
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
-
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/bs",[],function(){function e(e,t,n,r){return e%10==1&&e%100!=11?t:e%10>=2&&e%10<=4&&(e%100<12||e%100>14)?n:r}return{errorLoading:function(){return"Preuzimanje nije uspijelo."},inputTooLong:function(t){var n=t.input.length-t.maximum,r="Obrišite "+n+" simbol";return r+=e(n,"","a","a"),r},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Ukucajte bar još "+n+" simbol";return r+=e(n,"","a","a"),r},loadingMore:function(){return"Preuzimanje još rezultata…"},maximumSelected:function(t){var n="Možete izabrati samo "+t.maximum+" stavk";return n+=e(t.maximum,"u","e","i"),n},noResults:function(){return"Ništa nije pronađeno"},searching:function(){return"Pretraga…"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
+
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/bs",[],function(){function e(e,t,n,r){return e%10==1&&e%100!=11?t:e%10>=2&&e%10<=4&&(e%100<12||e%100>14)?n:r}return{errorLoading:function(){return"Preuzimanje nije uspijelo."},inputTooLong:function(t){var n=t.input.length-t.maximum,r="Obrišite "+n+" simbol";return r+=e(n,"","a","a"),r},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Ukucajte bar još "+n+" simbol";return r+=e(n,"","a","a"),r},loadingMore:function(){return"Preuzimanje još rezultata…"},maximumSelected:function(t){var n="Možete izabrati samo "+t.maximum+" stavk";return n+=e(t.maximum,"u","e","i"),n},noResults:function(){return"Ništa nije pronađeno"},searching:function(){return"Pretraga…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/{js/i18n → i18n}/ca.js
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
-
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ca",[],function(){return{errorLoading:function(){return"La càrrega ha fallat"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Si us plau, elimina "+t+" car";return t==1?n+="àcter":n+="àcters",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Si us plau, introdueix "+t+" car";return t==1?n+="àcter":n+="àcters",n},loadingMore:function(){return"Carregant més resultats…"},maximumSelected:function(e){var t="Només es pot seleccionar "+e.maximum+" element";return e.maximum!=1&&(t+="s"),t},noResults:function(){return"No s'han trobat resultats"},searching:function(){return"Cercant…"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
+
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ca",[],function(){return{errorLoading:function(){return"La càrrega ha fallat"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Si us plau, elimina "+t+" car";return t==1?n+="àcter":n+="àcters",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Si us plau, introdueix "+t+" car";return t==1?n+="àcter":n+="àcters",n},loadingMore:function(){return"Carregant més resultats…"},maximumSelected:function(e){var t="Només es pot seleccionar "+e.maximum+" element";return e.maximum!=1&&(t+="s"),t},noResults:function(){return"No s'han trobat resultats"},searching:function(){return"Cercant…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/{js/i18n → i18n}/cs.js
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
-
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/cs",[],function(){function e(e,t){switch(e){case 2:return t?"dva":"dvě";case 3:return"tři";case 4:return"čtyři"}return""}return{errorLoading:function(){return"Výsledky nemohly být načteny."},inputTooLong:function(t){var n=t.input.length-t.maximum;return n==1?"Prosím, zadejte o jeden znak méně.":n<=4?"Prosím, zadejte o "+e(n,!0)+" znaky méně.":"Prosím, zadejte o "+n+" znaků méně."},inputTooShort:function(t){var n=t.minimum-t.input.length;return n==1?"Prosím, zadejte ještě jeden znak.":n<=4?"Prosím, zadejte ještě další "+e(n,!0)+" znaky.":"Prosím, zadejte ještě dalších "+n+" znaků."},loadingMore:function(){return"Načítají se další výsledky…"},maximumSelected:function(t){var n=t.maximum;return n==1?"Můžete zvolit jen jednu položku.":n<=4?"Můžete zvolit maximálně "+e(n,!1)+" položky.":"Můžete zvolit maximálně "+n+" položek."},noResults:function(){return"Nenalezeny žádné položky."},searching:function(){return"Vyhledávání…"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
+
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/cs",[],function(){function e(e,t){switch(e){case 2:return t?"dva":"dvě";case 3:return"tři";case 4:return"čtyři"}return""}return{errorLoading:function(){return"Výsledky nemohly být načteny."},inputTooLong:function(t){var n=t.input.length-t.maximum;return n==1?"Prosím, zadejte o jeden znak méně.":n<=4?"Prosím, zadejte o "+e(n,!0)+" znaky méně.":"Prosím, zadejte o "+n+" znaků méně."},inputTooShort:function(t){var n=t.minimum-t.input.length;return n==1?"Prosím, zadejte ještě jeden znak.":n<=4?"Prosím, zadejte ještě další "+e(n,!0)+" znaky.":"Prosím, zadejte ještě dalších "+n+" znaků."},loadingMore:function(){return"Načítají se další výsledky…"},maximumSelected:function(t){var n=t.maximum;return n==1?"Můžete zvolit jen jednu položku.":n<=4?"Můžete zvolit maximálně "+e(n,!1)+" položky.":"Můžete zvolit maximálně "+n+" položek."},noResults:function(){return"Nenalezeny žádné položky."},searching:function(){return"Vyhledávání…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/{js/i18n → i18n}/da.js
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
-
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/da",[],function(){return{errorLoading:function(){return"Resultaterne kunne ikke indlæses."},inputTooLong:function(e){var t=e.input.length-e.maximum;return"Angiv venligst "+t+" tegn mindre"},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Angiv venligst "+t+" tegn mere"},loadingMore:function(){return"Indlæser flere resultater…"},maximumSelected:function(e){var t="Du kan kun vælge "+e.maximum+" emne";return e.maximum!=1&&(t+="r"),t},noResults:function(){return"Ingen resultater fundet"},searching:function(){return"Søger…"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
+
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/da",[],function(){return{errorLoading:function(){return"Resultaterne kunne ikke indlæses."},inputTooLong:function(e){var t=e.input.length-e.maximum;return"Angiv venligst "+t+" tegn mindre"},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Angiv venligst "+t+" tegn mere"},loadingMore:function(){return"Indlæser flere resultater…"},maximumSelected:function(e){var t="Du kan kun vælge "+e.maximum+" emne";return e.maximum!=1&&(t+="r"),t},noResults:function(){return"Ingen resultater fundet"},searching:function(){return"Søger…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/{js/i18n → i18n}/de.js
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
-
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/de",[],function(){return{errorLoading:function(){return"Die Ergebnisse konnten nicht geladen werden."},inputTooLong:function(e){var t=e.input.length-e.maximum;return"Bitte "+t+" Zeichen weniger eingeben"},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Bitte "+t+" Zeichen mehr eingeben"},loadingMore:function(){return"Lade mehr Ergebnisse…"},maximumSelected:function(e){var t="Sie können nur "+e.maximum+" Eintr";return e.maximum===1?t+="ag":t+="äge",t+=" auswählen",t},noResults:function(){return"Keine Übereinstimmungen gefunden"},searching:function(){return"Suche…"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
+
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/de",[],function(){return{errorLoading:function(){return"Die Ergebnisse konnten nicht geladen werden."},inputTooLong:function(e){var t=e.input.length-e.maximum;return"Bitte "+t+" Zeichen weniger eingeben"},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Bitte "+t+" Zeichen mehr eingeben"},loadingMore:function(){return"Lade mehr Ergebnisse…"},maximumSelected:function(e){var t="Sie können nur "+e.maximum+" Eintr";return e.maximum===1?t+="ag":t+="äge",t+=" auswählen",t},noResults:function(){return"Keine Übereinstimmungen gefunden"},searching:function(){return"Suche…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/{js/i18n → i18n}/dsb.js
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
-
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/dsb",[],function(){var e=["znamuško","znamušce","znamuška","znamuškow"],t=["zapisk","zapiska","zapiski","zapiskow"],n=function(t,n){if(t===1)return n[0];if(t===2)return n[1];if(t>2&&t<=4)return n[2];if(t>=5)return n[3]};return{errorLoading:function(){return"Wuslědki njejsu se dali zacytaś."},inputTooLong:function(t){var r=t.input.length-t.maximum;return"Pšosym lašuj "+r+" "+n(r,e)},inputTooShort:function(t){var r=t.minimum-t.input.length;return"Pšosym zapódaj nanejmjenjej "+r+" "+n(r,e)},loadingMore:function(){return"Dalšne wuslědki se zacytaju…"},maximumSelected:function(e){return"Móžoš jano "+e.maximum+" "+n(e.maximum,t)+"wubraś."},noResults:function(){return"Žedne wuslědki namakane"},searching:function(){return"Pyta se…"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
+
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/dsb",[],function(){var e=["znamuško","znamušce","znamuška","znamuškow"],t=["zapisk","zapiska","zapiski","zapiskow"],n=function(t,n){if(t===1)return n[0];if(t===2)return n[1];if(t>2&&t<=4)return n[2];if(t>=5)return n[3]};return{errorLoading:function(){return"Wuslědki njejsu se dali zacytaś."},inputTooLong:function(t){var r=t.input.length-t.maximum;return"Pšosym lašuj "+r+" "+n(r,e)},inputTooShort:function(t){var r=t.minimum-t.input.length;return"Pšosym zapódaj nanejmjenjej "+r+" "+n(r,e)},loadingMore:function(){return"Dalšne wuslědki se zacytaju…"},maximumSelected:function(e){return"Móžoš jano "+e.maximum+" "+n(e.maximum,t)+"wubraś."},noResults:function(){return"Žedne wuslědki namakane"},searching:function(){return"Pyta se…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/{js/i18n → i18n}/el.js
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
-
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/el",[],function(){return{errorLoading:function(){return"Τα αποτελέσματα δεν μπόρεσαν να φορτώσουν."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Παρακαλώ διαγράψτε "+t+" χαρακτήρ";return t==1&&(n+="α"),t!=1&&(n+="ες"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Παρακαλώ συμπληρώστε "+t+" ή περισσότερους χαρακτήρες";return n},loadingMore:function(){return"Φόρτωση περισσότερων αποτελεσμάτων…"},maximumSelected:function(e){var t="Μπορείτε να επιλέξετε μόνο "+e.maximum+" επιλογ";return e.maximum==1&&(t+="ή"),e.maximum!=1&&(t+="ές"),t},noResults:function(){return"Δεν βρέθηκαν αποτελέσματα"},searching:function(){return"Αναζήτηση…"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
+
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/el",[],function(){return{errorLoading:function(){return"Τα αποτελέσματα δεν μπόρεσαν να φορτώσουν."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Παρακαλώ διαγράψτε "+t+" χαρακτήρ";return t==1&&(n+="α"),t!=1&&(n+="ες"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Παρακαλώ συμπληρώστε "+t+" ή περισσότερους χαρακτήρες";return n},loadingMore:function(){return"Φόρτωση περισσότερων αποτελεσμάτων…"},maximumSelected:function(e){var t="Μπορείτε να επιλέξετε μόνο "+e.maximum+" επιλογ";return e.maximum==1&&(t+="ή"),e.maximum!=1&&(t+="ές"),t},noResults:function(){return"Δεν βρέθηκαν αποτελέσματα"},searching:function(){return"Αναζήτηση…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/{js/i18n → i18n}/en.js
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
-
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Please delete "+t+" character";return t!=1&&(n+="s"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Please enter "+t+" or more characters";return n},loadingMore:function(){return"Loading more results…"},maximumSelected:function(e){var t="You can only select "+e.maximum+" item";return e.maximum!=1&&(t+="s"),t},noResults:function(){return"No results found"},searching:function(){return"Searching…"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
+
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Please delete "+t+" character";return t!=1&&(n+="s"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Please enter "+t+" or more characters";return n},loadingMore:function(){return"Loading more results…"},maximumSelected:function(e){var t="You can only select "+e.maximum+" item";return e.maximum!=1&&(t+="s"),t},noResults:function(){return"No results found"},searching:function(){return"Searching…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/{js/i18n → i18n}/es.js
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
-
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/es",[],function(){return{errorLoading:function(){return"No se pudieron cargar los resultados"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Por favor, elimine "+t+" car";return t==1?n+="ácter":n+="acteres",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Por favor, introduzca "+t+" car";return t==1?n+="ácter":n+="acteres",n},loadingMore:function(){return"Cargando más resultados…"},maximumSelected:function(e){var t="Sólo puede seleccionar "+e.maximum+" elemento";return e.maximum!=1&&(t+="s"),t},noResults:function(){return"No se encontraron resultados"},searching:function(){return"Buscando…"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
+
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/es",[],function(){return{errorLoading:function(){return"No se pudieron cargar los resultados"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Por favor, elimine "+t+" car";return t==1?n+="ácter":n+="acteres",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Por favor, introduzca "+t+" car";return t==1?n+="ácter":n+="acteres",n},loadingMore:function(){return"Cargando más resultados…"},maximumSelected:function(e){var t="Sólo puede seleccionar "+e.maximum+" elemento";return e.maximum!=1&&(t+="s"),t},noResults:function(){return"No se encontraron resultados"},searching:function(){return"Buscando…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/{js/i18n → i18n}/et.js
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
-
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/et",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Sisesta "+t+" täht";return t!=1&&(n+="e"),n+=" vähem",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Sisesta "+t+" täht";return t!=1&&(n+="e"),n+=" rohkem",n},loadingMore:function(){return"Laen tulemusi…"},maximumSelected:function(e){var t="Saad vaid "+e.maximum+" tulemus";return e.maximum==1?t+="e":t+="t",t+=" valida",t},noResults:function(){return"Tulemused puuduvad"},searching:function(){return"Otsin…"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
+
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/et",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Sisesta "+t+" täht";return t!=1&&(n+="e"),n+=" vähem",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Sisesta "+t+" täht";return t!=1&&(n+="e"),n+=" rohkem",n},loadingMore:function(){return"Laen tulemusi…"},maximumSelected:function(e){var t="Saad vaid "+e.maximum+" tulemus";return e.maximum==1?t+="e":t+="t",t+=" valida",t},noResults:function(){return"Tulemused puuduvad"},searching:function(){return"Otsin…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/{js/i18n → i18n}/eu.js
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
-
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/eu",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Idatzi ";return t==1?n+="karaktere bat":n+=t+" karaktere",n+=" gutxiago",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Idatzi ";return t==1?n+="karaktere bat":n+=t+" karaktere",n+=" gehiago",n},loadingMore:function(){return"Emaitza gehiago kargatzen…"},maximumSelected:function(e){return e.maximum===1?"Elementu bakarra hauta dezakezu":e.maximum+" elementu hauta ditzakezu soilik"},noResults:function(){return"Ez da bat datorrenik aurkitu"},searching:function(){return"Bilatzen…"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
+
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/eu",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Idatzi ";return t==1?n+="karaktere bat":n+=t+" karaktere",n+=" gutxiago",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Idatzi ";return t==1?n+="karaktere bat":n+=t+" karaktere",n+=" gehiago",n},loadingMore:function(){return"Emaitza gehiago kargatzen…"},maximumSelected:function(e){return e.maximum===1?"Elementu bakarra hauta dezakezu":e.maximum+" elementu hauta ditzakezu soilik"},noResults:function(){return"Ez da bat datorrenik aurkitu"},searching:function(){return"Bilatzen…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/{js/i18n → i18n}/fa.js
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
-
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/fa",[],function(){return{errorLoading:function(){return"امکان بارگذاری نتایج وجود ندارد."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="لطفاً "+t+" کاراکتر را حذف نمایید";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="لطفاً تعداد "+t+" کاراکتر یا بیشتر وارد نمایید";return n},loadingMore:function(){return"در حال بارگذاری نتایج بیشتر..."},maximumSelected:function(e){var t="شما تنها میتوانید "+e.maximum+" آیتم را انتخاب نمایید";return t},noResults:function(){return"هیچ نتیجهای یافت نشد"},searching:function(){return"در حال جستجو..."}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
+
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/fa",[],function(){return{errorLoading:function(){return"امکان بارگذاری نتایج وجود ندارد."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="لطفاً "+t+" کاراکتر را حذف نمایید";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="لطفاً تعداد "+t+" کاراکتر یا بیشتر وارد نمایید";return n},loadingMore:function(){return"در حال بارگذاری نتایج بیشتر..."},maximumSelected:function(e){var t="شما تنها میتوانید "+e.maximum+" آیتم را انتخاب نمایید";return t},noResults:function(){return"هیچ نتیجهای یافت نشد"},searching:function(){return"در حال جستجو..."}}}),{define:e.define,require:e.require}})();
|
assets/select2/{js/i18n → i18n}/fi.js
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
-
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/fi",[],function(){return{errorLoading:function(){return"Tuloksia ei saatu ladattua."},inputTooLong:function(e){var t=e.input.length-e.maximum;return"Ole hyvä ja anna "+t+" merkkiä vähemmän"},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Ole hyvä ja anna "+t+" merkkiä lisää"},loadingMore:function(){return"Ladataan lisää tuloksia…"},maximumSelected:function(e){return"Voit valita ainoastaan "+e.maximum+" kpl"},noResults:function(){return"Ei tuloksia"},searching:function(){return"Haetaan…"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
+
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/fi",[],function(){return{errorLoading:function(){return"Tuloksia ei saatu ladattua."},inputTooLong:function(e){var t=e.input.length-e.maximum;return"Ole hyvä ja anna "+t+" merkkiä vähemmän"},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Ole hyvä ja anna "+t+" merkkiä lisää"},loadingMore:function(){return"Ladataan lisää tuloksia…"},maximumSelected:function(e){return"Voit valita ainoastaan "+e.maximum+" kpl"},noResults:function(){return"Ei tuloksia"},searching:function(){return"Haetaan…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/{js/i18n → i18n}/fr.js
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
-
|
3 |
-
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/fr",[],function(){return{errorLoading:function(){return"Les résultats ne peuvent pas être chargés."},inputTooLong:function(e){var t=e.input.length-e.maximum;return"Supprimez "+t+" caractère"+(t>1
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
+
|
3 |
+
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/fr",[],function(){return{errorLoading:function(){return"Les résultats ne peuvent pas être chargés."},inputTooLong:function(e){var t=e.input.length-e.maximum;return"Supprimez "+t+" caractère"+(t>1?"s":"")},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Saisissez au moins "+t+" caractère"+(t>1?"s":"")},loadingMore:function(){return"Chargement de résultats supplémentaires…"},maximumSelected:function(e){return"Vous pouvez seulement sélectionner "+e.maximum+" élément"+(e.maximum>1?"s":"")},noResults:function(){return"Aucun résultat trouvé"},searching:function(){return"Recherche en cours…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/{js/i18n → i18n}/gl.js
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
-
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/gl",[],function(){return{errorLoading:function(){return"Non foi posíbel cargar os resultados."},inputTooLong:function(e){var t=e.input.length-e.maximum;return t===1?"Elimine un carácter":"Elimine "+t+" caracteres"},inputTooShort:function(e){var t=e.minimum-e.input.length;return t===1?"Engada un carácter":"Engada "+t+" caracteres"},loadingMore:function(){return"Cargando máis resultados…"},maximumSelected:function(e){return e.maximum===1?"Só pode seleccionar un elemento":"Só pode seleccionar "+e.maximum+" elementos"},noResults:function(){return"Non se atoparon resultados"},searching:function(){return"Buscando…"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
+
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/gl",[],function(){return{errorLoading:function(){return"Non foi posíbel cargar os resultados."},inputTooLong:function(e){var t=e.input.length-e.maximum;return t===1?"Elimine un carácter":"Elimine "+t+" caracteres"},inputTooShort:function(e){var t=e.minimum-e.input.length;return t===1?"Engada un carácter":"Engada "+t+" caracteres"},loadingMore:function(){return"Cargando máis resultados…"},maximumSelected:function(e){return e.maximum===1?"Só pode seleccionar un elemento":"Só pode seleccionar "+e.maximum+" elementos"},noResults:function(){return"Non se atoparon resultados"},searching:function(){return"Buscando…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/{js/i18n → i18n}/he.js
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
-
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/he",[],function(){return{errorLoading:function(){return"שגיאה בטעינת התוצאות"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="נא למחוק ";return t===1?n+="תו אחד":n+=t+" תווים",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="נא להכניס ";return t===1?n+="תו אחד":n+=t+" תווים",n+=" או יותר",n},loadingMore:function(){return"טוען תוצאות נוספות…"},maximumSelected:function(e){var t="באפשרותך לבחור עד ";return e.maximum===1?t+="פריט אחד":t+=e.maximum+" פריטים",t},noResults:function(){return"לא נמצאו תוצאות"},searching:function(){return"מחפש…"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
+
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/he",[],function(){return{errorLoading:function(){return"שגיאה בטעינת התוצאות"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="נא למחוק ";return t===1?n+="תו אחד":n+=t+" תווים",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="נא להכניס ";return t===1?n+="תו אחד":n+=t+" תווים",n+=" או יותר",n},loadingMore:function(){return"טוען תוצאות נוספות…"},maximumSelected:function(e){var t="באפשרותך לבחור עד ";return e.maximum===1?t+="פריט אחד":t+=e.maximum+" פריטים",t},noResults:function(){return"לא נמצאו תוצאות"},searching:function(){return"מחפש…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/{js/i18n → i18n}/hi.js
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
-
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/hi",[],function(){return{errorLoading:function(){return"परिणामों को लोड नहीं किया जा सका।"},inputTooLong:function(e){var t=e.input.length-e.maximum,n=t+" अक्षर को हटा दें";return t>1&&(n=t+" अक्षरों को हटा दें "),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="कृपया "+t+" या अधिक अक्षर दर्ज करें";return n},loadingMore:function(){return"अधिक परिणाम लोड हो रहे है..."},maximumSelected:function(e){var t="आप केवल "+e.maximum+" आइटम का चयन कर सकते हैं";return t},noResults:function(){return"कोई परिणाम नहीं मिला"},searching:function(){return"खोज रहा है..."}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
+
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/hi",[],function(){return{errorLoading:function(){return"परिणामों को लोड नहीं किया जा सका।"},inputTooLong:function(e){var t=e.input.length-e.maximum,n=t+" अक्षर को हटा दें";return t>1&&(n=t+" अक्षरों को हटा दें "),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="कृपया "+t+" या अधिक अक्षर दर्ज करें";return n},loadingMore:function(){return"अधिक परिणाम लोड हो रहे है..."},maximumSelected:function(e){var t="आप केवल "+e.maximum+" आइटम का चयन कर सकते हैं";return t},noResults:function(){return"कोई परिणाम नहीं मिला"},searching:function(){return"खोज रहा है..."}}}),{define:e.define,require:e.require}})();
|
assets/select2/{js/i18n → i18n}/hr.js
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
-
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/hr",[],function(){function e(e){var t=" "+e+" znak";return e%10<5&&e%10>0&&(e%100<5||e%100>19)?e%10>1&&(t+="a"):t+="ova",t}return{errorLoading:function(){return"Preuzimanje nije uspjelo."},inputTooLong:function(t){var n=t.input.length-t.maximum;return"Unesite "+e(n)},inputTooShort:function(t){var n=t.minimum-t.input.length;return"Unesite još "+e(n)},loadingMore:function(){return"Učitavanje rezultata…"},maximumSelected:function(e){return"Maksimalan broj odabranih stavki je "+e.maximum},noResults:function(){return"Nema rezultata"},searching:function(){return"Pretraga…"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
+
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/hr",[],function(){function e(e){var t=" "+e+" znak";return e%10<5&&e%10>0&&(e%100<5||e%100>19)?e%10>1&&(t+="a"):t+="ova",t}return{errorLoading:function(){return"Preuzimanje nije uspjelo."},inputTooLong:function(t){var n=t.input.length-t.maximum;return"Unesite "+e(n)},inputTooShort:function(t){var n=t.minimum-t.input.length;return"Unesite još "+e(n)},loadingMore:function(){return"Učitavanje rezultata…"},maximumSelected:function(e){return"Maksimalan broj odabranih stavki je "+e.maximum},noResults:function(){return"Nema rezultata"},searching:function(){return"Pretraga…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/{js/i18n → i18n}/hsb.js
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
-
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/hsb",[],function(){var e=["znamješko","znamješce","znamješka","znamješkow"],t=["zapisk","zapiskaj","zapiski","zapiskow"],n=function(t,n){if(t===1)return n[0];if(t===2)return n[1];if(t>2&&t<=4)return n[2];if(t>=5)return n[3]};return{errorLoading:function(){return"Wuslědki njedachu so začitać."},inputTooLong:function(t){var r=t.input.length-t.maximum;return"Prošu zhašej "+r+" "+n(r,e)},inputTooShort:function(t){var r=t.minimum-t.input.length;return"Prošu zapodaj znajmjeńša "+r+" "+n(r,e)},loadingMore:function(){return"Dalše wuslědki so začitaja…"},maximumSelected:function(e){return"Móžeš jenož "+e.maximum+" "+n(e.maximum,t)+"wubrać"},noResults:function(){return"Žane wuslědki namakane"},searching:function(){return"Pyta so…"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
+
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/hsb",[],function(){var e=["znamješko","znamješce","znamješka","znamješkow"],t=["zapisk","zapiskaj","zapiski","zapiskow"],n=function(t,n){if(t===1)return n[0];if(t===2)return n[1];if(t>2&&t<=4)return n[2];if(t>=5)return n[3]};return{errorLoading:function(){return"Wuslědki njedachu so začitać."},inputTooLong:function(t){var r=t.input.length-t.maximum;return"Prošu zhašej "+r+" "+n(r,e)},inputTooShort:function(t){var r=t.minimum-t.input.length;return"Prošu zapodaj znajmjeńša "+r+" "+n(r,e)},loadingMore:function(){return"Dalše wuslědki so začitaja…"},maximumSelected:function(e){return"Móžeš jenož "+e.maximum+" "+n(e.maximum,t)+"wubrać"},noResults:function(){return"Žane wuslědki namakane"},searching:function(){return"Pyta so…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/{js/i18n → i18n}/hu.js
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
-
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/hu",[],function(){return{errorLoading:function(){return"Az eredmények betöltése nem sikerült."},inputTooLong:function(e){var t=e.input.length-e.maximum;return"Túl hosszú. "+t+" karakterrel több, mint kellene."},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Túl rövid. Még "+t+" karakter hiányzik."},loadingMore:function(){return"Töltés…"},maximumSelected:function(e){return"Csak "+e.maximum+" elemet lehet kiválasztani."},noResults:function(){return"Nincs találat."},searching:function(){return"Keresés…"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
+
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/hu",[],function(){return{errorLoading:function(){return"Az eredmények betöltése nem sikerült."},inputTooLong:function(e){var t=e.input.length-e.maximum;return"Túl hosszú. "+t+" karakterrel több, mint kellene."},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Túl rövid. Még "+t+" karakter hiányzik."},loadingMore:function(){return"Töltés…"},maximumSelected:function(e){return"Csak "+e.maximum+" elemet lehet kiválasztani."},noResults:function(){return"Nincs találat."},searching:function(){return"Keresés…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/{js/i18n → i18n}/hy.js
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
-
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/hy",[],function(){return{errorLoading:function(){return"Արդյունքները հնարավոր չէ բեռնել։"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Խնդրում ենք հեռացնել "+t+" նշան";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Խնդրում ենք մուտքագրել "+t+" կամ ավել նշաններ";return n},loadingMore:function(){return"Բեռնվում են նոր արդյունքներ․․․"},maximumSelected:function(e){var t="Դուք կարող եք ընտրել առավելագույնը "+e.maximum+" կետ";return t},noResults:function(){return"Արդյունքներ չեն գտնվել"},searching:function(){return"Որոնում․․․"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
+
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/hy",[],function(){return{errorLoading:function(){return"Արդյունքները հնարավոր չէ բեռնել։"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Խնդրում ենք հեռացնել "+t+" նշան";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Խնդրում ենք մուտքագրել "+t+" կամ ավել նշաններ";return n},loadingMore:function(){return"Բեռնվում են նոր արդյունքներ․․․"},maximumSelected:function(e){var t="Դուք կարող եք ընտրել առավելագույնը "+e.maximum+" կետ";return t},noResults:function(){return"Արդյունքներ չեն գտնվել"},searching:function(){return"Որոնում․․․"}}}),{define:e.define,require:e.require}})();
|
assets/select2/{js/i18n → i18n}/id.js
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
-
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/id",[],function(){return{errorLoading:function(){return"Data tidak boleh diambil."},inputTooLong:function(e){var t=e.input.length-e.maximum;return"Hapuskan "+t+" huruf"},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Masukkan "+t+" huruf lagi"},loadingMore:function(){return"Mengambil data…"},maximumSelected:function(e){return"Anda hanya dapat memilih "+e.maximum+" pilihan"},noResults:function(){return"Tidak ada data yang sesuai"},searching:function(){return"Mencari…"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
+
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/id",[],function(){return{errorLoading:function(){return"Data tidak boleh diambil."},inputTooLong:function(e){var t=e.input.length-e.maximum;return"Hapuskan "+t+" huruf"},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Masukkan "+t+" huruf lagi"},loadingMore:function(){return"Mengambil data…"},maximumSelected:function(e){return"Anda hanya dapat memilih "+e.maximum+" pilihan"},noResults:function(){return"Tidak ada data yang sesuai"},searching:function(){return"Mencari…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/{js/i18n → i18n}/is.js
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
-
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/is",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Vinsamlegast styttið texta um "+t+" staf";return t<=1?n:n+"i"},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vinsamlegast skrifið "+t+" staf";return t>1&&(n+="i"),n+=" í viðbót",n},loadingMore:function(){return"Sæki fleiri niðurstöður…"},maximumSelected:function(e){return"Þú getur aðeins valið "+e.maximum+" atriði"},noResults:function(){return"Ekkert fannst"},searching:function(){return"Leita…"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
+
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/is",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Vinsamlegast styttið texta um "+t+" staf";return t<=1?n:n+"i"},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vinsamlegast skrifið "+t+" staf";return t>1&&(n+="i"),n+=" í viðbót",n},loadingMore:function(){return"Sæki fleiri niðurstöður…"},maximumSelected:function(e){return"Þú getur aðeins valið "+e.maximum+" atriði"},noResults:function(){return"Ekkert fannst"},searching:function(){return"Leita…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/{js/i18n → i18n}/it.js
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
-
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/it",[],function(){return{errorLoading:function(){return"I risultati non possono essere caricati."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Per favore cancella "+t+" caratter";return t!==1?n+="i":n+="e",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Per favore inserisci "+t+" o più caratteri";return n},loadingMore:function(){return"Caricando più risultati…"},maximumSelected:function(e){var t="Puoi selezionare solo "+e.maximum+" element";return e.maximum!==1?t+="i":t+="o",t},noResults:function(){return"Nessun risultato trovato"},searching:function(){return"Sto cercando…"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
+
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/it",[],function(){return{errorLoading:function(){return"I risultati non possono essere caricati."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Per favore cancella "+t+" caratter";return t!==1?n+="i":n+="e",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Per favore inserisci "+t+" o più caratteri";return n},loadingMore:function(){return"Caricando più risultati…"},maximumSelected:function(e){var t="Puoi selezionare solo "+e.maximum+" element";return e.maximum!==1?t+="i":t+="o",t},noResults:function(){return"Nessun risultato trovato"},searching:function(){return"Sto cercando…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/{js/i18n → i18n}/ja.js
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
-
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ja",[],function(){return{errorLoading:function(){return"結果が読み込まれませんでした"},inputTooLong:function(e){var t=e.input.length-e.maximum,n=t+" 文字を削除してください";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="少なくとも "+t+" 文字を入力してください";return n},loadingMore:function(){return"読み込み中…"},maximumSelected:function(e){var t=e.maximum+" 件しか選択できません";return t},noResults:function(){return"対象が見つかりません"},searching:function(){return"検索しています…"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
+
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ja",[],function(){return{errorLoading:function(){return"結果が読み込まれませんでした"},inputTooLong:function(e){var t=e.input.length-e.maximum,n=t+" 文字を削除してください";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="少なくとも "+t+" 文字を入力してください";return n},loadingMore:function(){return"読み込み中…"},maximumSelected:function(e){var t=e.maximum+" 件しか選択できません";return t},noResults:function(){return"対象が見つかりません"},searching:function(){return"検索しています…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/{js/i18n → i18n}/km.js
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
-
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/km",[],function(){return{errorLoading:function(){return"មិនអាចទាញយកទិន្នន័យ"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="សូមលុបចេញ "+t+" អក្សរ";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="សូមបញ្ចូល"+t+" អក្សរ រឺ ច្រើនជាងនេះ";return n},loadingMore:function(){return"កំពុងទាញយកទិន្នន័យបន្ថែម..."},maximumSelected:function(e){var t="អ្នកអាចជ្រើសរើសបានតែ "+e.maximum+" ជម្រើសប៉ុណ្ណោះ";return t},noResults:function(){return"មិនមានលទ្ធផល"},searching:function(){return"កំពុងស្វែងរក..."}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
+
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/km",[],function(){return{errorLoading:function(){return"មិនអាចទាញយកទិន្នន័យ"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="សូមលុបចេញ "+t+" អក្សរ";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="សូមបញ្ចូល"+t+" អក្សរ រឺ ច្រើនជាងនេះ";return n},loadingMore:function(){return"កំពុងទាញយកទិន្នន័យបន្ថែម..."},maximumSelected:function(e){var t="អ្នកអាចជ្រើសរើសបានតែ "+e.maximum+" ជម្រើសប៉ុណ្ណោះ";return t},noResults:function(){return"មិនមានលទ្ធផល"},searching:function(){return"កំពុងស្វែងរក..."}}}),{define:e.define,require:e.require}})();
|
assets/select2/{js/i18n → i18n}/ko.js
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
-
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ko",[],function(){return{errorLoading:function(){return"결과를 불러올 수 없습니다."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="너무 깁니다. "+t+" 글자 지워주세요.";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="너무 짧습니다. "+t+" 글자 더 입력해주세요.";return n},loadingMore:function(){return"불러오는 중…"},maximumSelected:function(e){var t="최대 "+e.maximum+"개까지만 선택 가능합니다.";return t},noResults:function(){return"결과가 없습니다."},searching:function(){return"검색 중…"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
+
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ko",[],function(){return{errorLoading:function(){return"결과를 불러올 수 없습니다."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="너무 깁니다. "+t+" 글자 지워주세요.";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="너무 짧습니다. "+t+" 글자 더 입력해주세요.";return n},loadingMore:function(){return"불러오는 중…"},maximumSelected:function(e){var t="최대 "+e.maximum+"개까지만 선택 가능합니다.";return t},noResults:function(){return"결과가 없습니다."},searching:function(){return"검색 중…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/{js/i18n → i18n}/lt.js
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
-
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/lt",[],function(){function e(e,t,n,r){return e%10===1&&(e%100<11||e%100>19)?t:e%10>=2&&e%10<=9&&(e%100<11||e%100>19)?n:r}return{inputTooLong:function(t){var n=t.input.length-t.maximum,r="Pašalinkite "+n+" simbol";return r+=e(n,"į","ius","ių"),r},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Įrašykite dar "+n+" simbol";return r+=e(n,"į","ius","ių"),r},loadingMore:function(){return"Kraunama daugiau rezultatų…"},maximumSelected:function(t){var n="Jūs galite pasirinkti tik "+t.maximum+" element";return n+=e(t.maximum,"ą","us","ų"),n},noResults:function(){return"Atitikmenų nerasta"},searching:function(){return"Ieškoma…"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
+
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/lt",[],function(){function e(e,t,n,r){return e%10===1&&(e%100<11||e%100>19)?t:e%10>=2&&e%10<=9&&(e%100<11||e%100>19)?n:r}return{inputTooLong:function(t){var n=t.input.length-t.maximum,r="Pašalinkite "+n+" simbol";return r+=e(n,"į","ius","ių"),r},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Įrašykite dar "+n+" simbol";return r+=e(n,"į","ius","ių"),r},loadingMore:function(){return"Kraunama daugiau rezultatų…"},maximumSelected:function(t){var n="Jūs galite pasirinkti tik "+t.maximum+" element";return n+=e(t.maximum,"ą","us","ų"),n},noResults:function(){return"Atitikmenų nerasta"},searching:function(){return"Ieškoma…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/{js/i18n → i18n}/lv.js
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
-
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/lv",[],function(){function e(e,t,n,r){return e===11?t:e%10===1?n:r}return{inputTooLong:function(t){var n=t.input.length-t.maximum,r="Lūdzu ievadiet par "+n;return r+=" simbol"+e(n,"iem","u","iem"),r+" mazāk"},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Lūdzu ievadiet vēl "+n;return r+=" simbol"+e(n,"us","u","us"),r},loadingMore:function(){return"Datu ielāde…"},maximumSelected:function(t){var n="Jūs varat izvēlēties ne vairāk kā "+t.maximum;return n+=" element"+e(t.maximum,"us","u","us"),n},noResults:function(){return"Sakritību nav"},searching:function(){return"Meklēšana…"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
+
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/lv",[],function(){function e(e,t,n,r){return e===11?t:e%10===1?n:r}return{inputTooLong:function(t){var n=t.input.length-t.maximum,r="Lūdzu ievadiet par "+n;return r+=" simbol"+e(n,"iem","u","iem"),r+" mazāk"},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Lūdzu ievadiet vēl "+n;return r+=" simbol"+e(n,"us","u","us"),r},loadingMore:function(){return"Datu ielāde…"},maximumSelected:function(t){var n="Jūs varat izvēlēties ne vairāk kā "+t.maximum;return n+=" element"+e(t.maximum,"us","u","us"),n},noResults:function(){return"Sakritību nav"},searching:function(){return"Meklēšana…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/{js/i18n → i18n}/mk.js
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
-
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/mk",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Ве молиме внесете "+e.maximum+" помалку карактер";return e.maximum!==1&&(n+="и"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Ве молиме внесете уште "+e.maximum+" карактер";return e.maximum!==1&&(n+="и"),n},loadingMore:function(){return"Вчитување резултати…"},maximumSelected:function(e){var t="Можете да изберете само "+e.maximum+" ставк";return e.maximum===1?t+="а":t+="и",t},noResults:function(){return"Нема пронајдено совпаѓања"},searching:function(){return"Пребарување…"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
+
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/mk",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Ве молиме внесете "+e.maximum+" помалку карактер";return e.maximum!==1&&(n+="и"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Ве молиме внесете уште "+e.maximum+" карактер";return e.maximum!==1&&(n+="и"),n},loadingMore:function(){return"Вчитување резултати…"},maximumSelected:function(e){var t="Можете да изберете само "+e.maximum+" ставк";return e.maximum===1?t+="а":t+="и",t},noResults:function(){return"Нема пронајдено совпаѓања"},searching:function(){return"Пребарување…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/{js/i18n → i18n}/ms.js
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
-
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ms",[],function(){return{errorLoading:function(){return"Keputusan tidak berjaya dimuatkan."},inputTooLong:function(e){var t=e.input.length-e.maximum;return"Sila hapuskan "+t+" aksara"},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Sila masukkan "+t+" atau lebih aksara"},loadingMore:function(){return"Sedang memuatkan keputusan…"},maximumSelected:function(e){return"Anda hanya boleh memilih "+e.maximum+" pilihan"},noResults:function(){return"Tiada padanan yang ditemui"},searching:function(){return"Mencari…"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
+
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ms",[],function(){return{errorLoading:function(){return"Keputusan tidak berjaya dimuatkan."},inputTooLong:function(e){var t=e.input.length-e.maximum;return"Sila hapuskan "+t+" aksara"},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Sila masukkan "+t+" atau lebih aksara"},loadingMore:function(){return"Sedang memuatkan keputusan…"},maximumSelected:function(e){return"Anda hanya boleh memilih "+e.maximum+" pilihan"},noResults:function(){return"Tiada padanan yang ditemui"},searching:function(){return"Mencari…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/i18n/nb.js
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
+
|
3 |
+
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/nb",[],function(){return{errorLoading:function(){return"Kunne ikke hente resultater."},inputTooLong:function(e){var t=e.input.length-e.maximum;return"Vennligst fjern "+t+" tegn"},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Vennligst skriv inn "+t+" tegn til"},loadingMore:function(){return"Laster flere resultater…"},maximumSelected:function(e){return"Du kan velge maks "+e.maximum+" elementer"},noResults:function(){return"Ingen treff"},searching:function(){return"Søker…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/{js/i18n → i18n}/nl.js
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
-
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/nl",[],function(){return{errorLoading:function(){return"De resultaten konden niet worden geladen."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Gelieve "+t+" karakters te verwijderen";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Gelieve "+t+" of meer karakters in te voeren";return n},loadingMore:function(){return"Meer resultaten laden…"},maximumSelected:function(e){var t=e.maximum==1?"kan":"kunnen",n="Er "+t+" maar "+e.maximum+" item";return e.maximum!=1&&(n+="s"),n+=" worden geselecteerd",n},noResults:function(){return"Geen resultaten gevonden…"},searching:function(){return"Zoeken…"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
+
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/nl",[],function(){return{errorLoading:function(){return"De resultaten konden niet worden geladen."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Gelieve "+t+" karakters te verwijderen";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Gelieve "+t+" of meer karakters in te voeren";return n},loadingMore:function(){return"Meer resultaten laden…"},maximumSelected:function(e){var t=e.maximum==1?"kan":"kunnen",n="Er "+t+" maar "+e.maximum+" item";return e.maximum!=1&&(n+="s"),n+=" worden geselecteerd",n},noResults:function(){return"Geen resultaten gevonden…"},searching:function(){return"Zoeken…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/{js/i18n → i18n}/pl.js
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
-
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/pl",[],function(){var e=["znak","znaki","znaków"],t=["element","elementy","elementów"],n=function(t,n){if(t===1)return n[0];if(t>1&&t<=4)return n[1];if(t>=5)return n[2]};return{errorLoading:function(){return"Nie można załadować wyników."},inputTooLong:function(t){var r=t.input.length-t.maximum;return"Usuń "+r+" "+n(r,e)},inputTooShort:function(t){var r=t.minimum-t.input.length;return"Podaj przynajmniej "+r+" "+n(r,e)},loadingMore:function(){return"Trwa ładowanie…"},maximumSelected:function(e){return"Możesz zaznaczyć tylko "+e.maximum+" "+n(e.maximum,t)},noResults:function(){return"Brak wyników"},searching:function(){return"Trwa wyszukiwanie…"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
+
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/pl",[],function(){var e=["znak","znaki","znaków"],t=["element","elementy","elementów"],n=function(t,n){if(t===1)return n[0];if(t>1&&t<=4)return n[1];if(t>=5)return n[2]};return{errorLoading:function(){return"Nie można załadować wyników."},inputTooLong:function(t){var r=t.input.length-t.maximum;return"Usuń "+r+" "+n(r,e)},inputTooShort:function(t){var r=t.minimum-t.input.length;return"Podaj przynajmniej "+r+" "+n(r,e)},loadingMore:function(){return"Trwa ładowanie…"},maximumSelected:function(e){return"Możesz zaznaczyć tylko "+e.maximum+" "+n(e.maximum,t)},noResults:function(){return"Brak wyników"},searching:function(){return"Trwa wyszukiwanie…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/{js/i18n → i18n}/ps.js
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
-
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ps",[],function(){return{errorLoading:function(){return"پايلي نه سي ترلاسه کېدای"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="د مهربانۍ لمخي "+t+" توری ړنګ کړئ";return t!=1&&(n=n.replace("توری","توري")),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="لږ تر لږه "+t+" يا ډېر توري وليکئ";return n},loadingMore:function(){return"نوري پايلي ترلاسه کيږي..."},maximumSelected:function(e){var t="تاسو يوازي "+e.maximum+" قلم په نښه کولای سی";return e.maximum!=1&&(t=t.replace("قلم","قلمونه")),t},noResults:function(){return"پايلي و نه موندل سوې"},searching:function(){return"لټول کيږي..."}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
+
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ps",[],function(){return{errorLoading:function(){return"پايلي نه سي ترلاسه کېدای"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="د مهربانۍ لمخي "+t+" توری ړنګ کړئ";return t!=1&&(n=n.replace("توری","توري")),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="لږ تر لږه "+t+" يا ډېر توري وليکئ";return n},loadingMore:function(){return"نوري پايلي ترلاسه کيږي..."},maximumSelected:function(e){var t="تاسو يوازي "+e.maximum+" قلم په نښه کولای سی";return e.maximum!=1&&(t=t.replace("قلم","قلمونه")),t},noResults:function(){return"پايلي و نه موندل سوې"},searching:function(){return"لټول کيږي..."}}}),{define:e.define,require:e.require}})();
|
assets/select2/{js/i18n → i18n}/pt-BR.js
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
-
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/pt-BR",[],function(){return{errorLoading:function(){return"Os resultados não puderam ser carregados."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Apague "+t+" caracter";return t!=1&&(n+="es"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Digite "+t+" ou mais caracteres";return n},loadingMore:function(){return"Carregando mais resultados…"},maximumSelected:function(e){var t="Você só pode selecionar "+e.maximum+" ite";return e.maximum==1?t+="m":t+="ns",t},noResults:function(){return"Nenhum resultado encontrado"},searching:function(){return"Buscando…"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
+
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/pt-BR",[],function(){return{errorLoading:function(){return"Os resultados não puderam ser carregados."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Apague "+t+" caracter";return t!=1&&(n+="es"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Digite "+t+" ou mais caracteres";return n},loadingMore:function(){return"Carregando mais resultados…"},maximumSelected:function(e){var t="Você só pode selecionar "+e.maximum+" ite";return e.maximum==1?t+="m":t+="ns",t},noResults:function(){return"Nenhum resultado encontrado"},searching:function(){return"Buscando…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/{js/i18n → i18n}/pt.js
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
-
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/pt",[],function(){return{errorLoading:function(){return"Os resultados não puderam ser carregados."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Por favor apague "+t+" ";return n+=t!=1?"caracteres":"caractere",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Introduza "+t+" ou mais caracteres";return n},loadingMore:function(){return"A carregar mais resultados…"},maximumSelected:function(e){var t="Apenas pode seleccionar "+e.maximum+" ";return t+=e.maximum!=1?"itens":"item",t},noResults:function(){return"Sem resultados"},searching:function(){return"A procurar…"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
+
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/pt",[],function(){return{errorLoading:function(){return"Os resultados não puderam ser carregados."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Por favor apague "+t+" ";return n+=t!=1?"caracteres":"caractere",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Introduza "+t+" ou mais caracteres";return n},loadingMore:function(){return"A carregar mais resultados…"},maximumSelected:function(e){var t="Apenas pode seleccionar "+e.maximum+" ";return t+=e.maximum!=1?"itens":"item",t},noResults:function(){return"Sem resultados"},searching:function(){return"A procurar…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/{js/i18n → i18n}/ro.js
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
-
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ro",[],function(){return{errorLoading:function(){return"Rezultatele nu au putut fi incărcate."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Vă rugăm să ștergeți"+t+" caracter";return t!==1&&(n+="e"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vă rugăm să introduceți "+t+" sau mai multe caractere";return n},loadingMore:function(){return"Se încarcă mai multe rezultate…"},maximumSelected:function(e){var t="Aveți voie să selectați cel mult "+e.maximum;return t+=" element",e.maximum!==1&&(t+="e"),t},noResults:function(){return"Nu au fost găsite rezultate"},searching:function(){return"Căutare…"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
+
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ro",[],function(){return{errorLoading:function(){return"Rezultatele nu au putut fi incărcate."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Vă rugăm să ștergeți"+t+" caracter";return t!==1&&(n+="e"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vă rugăm să introduceți "+t+" sau mai multe caractere";return n},loadingMore:function(){return"Se încarcă mai multe rezultate…"},maximumSelected:function(e){var t="Aveți voie să selectați cel mult "+e.maximum;return t+=" element",e.maximum!==1&&(t+="e"),t},noResults:function(){return"Nu au fost găsite rezultate"},searching:function(){return"Căutare…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/{js/i18n → i18n}/ru.js
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
-
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ru",[],function(){function e(e,t,n,r){return e%10<5&&e%10>0&&e%100<5||e%100>20?e%10>1?n:t:r}return{errorLoading:function(){return"Невозможно загрузить результаты"},inputTooLong:function(t){var n=t.input.length-t.maximum,r="Пожалуйста, введите на "+n+" символ";return r+=e(n,"","a","ов"),r+=" меньше",r},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Пожалуйста, введите еще хотя бы "+n+" символ";return r+=e(n,"","a","ов"),r},loadingMore:function(){return"Загрузка данных…"},maximumSelected:function(t){var n="Вы можете выбрать не более "+t.maximum+" элемент";return n+=e(t.maximum,"","a","ов"),n},noResults:function(){return"Совпадений не найдено"},searching:function(){return"Поиск…"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
+
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ru",[],function(){function e(e,t,n,r){return e%10<5&&e%10>0&&e%100<5||e%100>20?e%10>1?n:t:r}return{errorLoading:function(){return"Невозможно загрузить результаты"},inputTooLong:function(t){var n=t.input.length-t.maximum,r="Пожалуйста, введите на "+n+" символ";return r+=e(n,"","a","ов"),r+=" меньше",r},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Пожалуйста, введите еще хотя бы "+n+" символ";return r+=e(n,"","a","ов"),r},loadingMore:function(){return"Загрузка данных…"},maximumSelected:function(t){var n="Вы можете выбрать не более "+t.maximum+" элемент";return n+=e(t.maximum,"","a","ов"),n},noResults:function(){return"Совпадений не найдено"},searching:function(){return"Поиск…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/{js/i18n → i18n}/sk.js
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
-
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/sk",[],function(){var e={2:function(e){return e?"dva":"dve"},3:function(){return"tri"},4:function(){return"štyri"}};return{errorLoading:function(){return"Výsledky sa nepodarilo načítať."},inputTooLong:function(t){var n=t.input.length-t.maximum;return n==1?"Prosím, zadajte o jeden znak menej":n>=2&&n<=4?"Prosím, zadajte o "+e[n](!0)+" znaky menej":"Prosím, zadajte o "+n+" znakov menej"},inputTooShort:function(t){var n=t.minimum-t.input.length;return n==1?"Prosím, zadajte ešte jeden znak":n<=4?"Prosím, zadajte ešte ďalšie "+e[n](!0)+" znaky":"Prosím, zadajte ešte ďalších "+n+" znakov"},loadingMore:function(){return"Načítanie ďalších výsledkov…"},maximumSelected:function(t){return t.maximum==1?"Môžete zvoliť len jednu položku":t.maximum>=2&&t.maximum<=4?"Môžete zvoliť najviac "+e[t.maximum](!1)+" položky":"Môžete zvoliť najviac "+t.maximum+" položiek"},noResults:function(){return"Nenašli sa žiadne položky"},searching:function(){return"Vyhľadávanie…"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
+
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/sk",[],function(){var e={2:function(e){return e?"dva":"dve"},3:function(){return"tri"},4:function(){return"štyri"}};return{errorLoading:function(){return"Výsledky sa nepodarilo načítať."},inputTooLong:function(t){var n=t.input.length-t.maximum;return n==1?"Prosím, zadajte o jeden znak menej":n>=2&&n<=4?"Prosím, zadajte o "+e[n](!0)+" znaky menej":"Prosím, zadajte o "+n+" znakov menej"},inputTooShort:function(t){var n=t.minimum-t.input.length;return n==1?"Prosím, zadajte ešte jeden znak":n<=4?"Prosím, zadajte ešte ďalšie "+e[n](!0)+" znaky":"Prosím, zadajte ešte ďalších "+n+" znakov"},loadingMore:function(){return"Načítanie ďalších výsledkov…"},maximumSelected:function(t){return t.maximum==1?"Môžete zvoliť len jednu položku":t.maximum>=2&&t.maximum<=4?"Môžete zvoliť najviac "+e[t.maximum](!1)+" položky":"Môžete zvoliť najviac "+t.maximum+" položiek"},noResults:function(){return"Nenašli sa žiadne položky"},searching:function(){return"Vyhľadávanie…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/{js/i18n → i18n}/sl.js
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
-
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/sl",[],function(){return{errorLoading:function(){return"Zadetkov iskanja ni bilo mogoče naložiti."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Prosim zbrišite "+t+" znak";return t==2?n+="a":t!=1&&(n+="e"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Prosim vpišite še "+t+" znak";return t==2?n+="a":t!=1&&(n+="e"),n},loadingMore:function(){return"Nalagam več zadetkov…"},maximumSelected:function(e){var t="Označite lahko največ "+e.maximum+" predmet";return e.maximum==2?t+="a":e.maximum!=1&&(t+="e"),t},noResults:function(){return"Ni zadetkov."},searching:function(){return"Iščem…"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
+
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/sl",[],function(){return{errorLoading:function(){return"Zadetkov iskanja ni bilo mogoče naložiti."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Prosim zbrišite "+t+" znak";return t==2?n+="a":t!=1&&(n+="e"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Prosim vpišite še "+t+" znak";return t==2?n+="a":t!=1&&(n+="e"),n},loadingMore:function(){return"Nalagam več zadetkov…"},maximumSelected:function(e){var t="Označite lahko največ "+e.maximum+" predmet";return e.maximum==2?t+="a":e.maximum!=1&&(t+="e"),t},noResults:function(){return"Ni zadetkov."},searching:function(){return"Iščem…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/{js/i18n → i18n}/sr-Cyrl.js
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
-
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/sr-Cyrl",[],function(){function e(e,t,n,r){return e%10==1&&e%100!=11?t:e%10>=2&&e%10<=4&&(e%100<12||e%100>14)?n:r}return{errorLoading:function(){return"Преузимање није успело."},inputTooLong:function(t){var n=t.input.length-t.maximum,r="Обришите "+n+" симбол";return r+=e(n,"","а","а"),r},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Укуцајте бар још "+n+" симбол";return r+=e(n,"","а","а"),r},loadingMore:function(){return"Преузимање још резултата…"},maximumSelected:function(t){var n="Можете изабрати само "+t.maximum+" ставк";return n+=e(t.maximum,"у","е","и"),n},noResults:function(){return"Ништа није пронађено"},searching:function(){return"Претрага…"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
+
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/sr-Cyrl",[],function(){function e(e,t,n,r){return e%10==1&&e%100!=11?t:e%10>=2&&e%10<=4&&(e%100<12||e%100>14)?n:r}return{errorLoading:function(){return"Преузимање није успело."},inputTooLong:function(t){var n=t.input.length-t.maximum,r="Обришите "+n+" симбол";return r+=e(n,"","а","а"),r},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Укуцајте бар још "+n+" симбол";return r+=e(n,"","а","а"),r},loadingMore:function(){return"Преузимање још резултата…"},maximumSelected:function(t){var n="Можете изабрати само "+t.maximum+" ставк";return n+=e(t.maximum,"у","е","и"),n},noResults:function(){return"Ништа није пронађено"},searching:function(){return"Претрага…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/{js/i18n → i18n}/sr.js
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
-
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/sr",[],function(){function e(e,t,n,r){return e%10==1&&e%100!=11?t:e%10>=2&&e%10<=4&&(e%100<12||e%100>14)?n:r}return{errorLoading:function(){return"Preuzimanje nije uspelo."},inputTooLong:function(t){var n=t.input.length-t.maximum,r="Obrišite "+n+" simbol";return r+=e(n,"","a","a"),r},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Ukucajte bar još "+n+" simbol";return r+=e(n,"","a","a"),r},loadingMore:function(){return"Preuzimanje još rezultata…"},maximumSelected:function(t){var n="Možete izabrati samo "+t.maximum+" stavk";return n+=e(t.maximum,"u","e","i"),n},noResults:function(){return"Ništa nije pronađeno"},searching:function(){return"Pretraga…"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
+
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/sr",[],function(){function e(e,t,n,r){return e%10==1&&e%100!=11?t:e%10>=2&&e%10<=4&&(e%100<12||e%100>14)?n:r}return{errorLoading:function(){return"Preuzimanje nije uspelo."},inputTooLong:function(t){var n=t.input.length-t.maximum,r="Obrišite "+n+" simbol";return r+=e(n,"","a","a"),r},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Ukucajte bar još "+n+" simbol";return r+=e(n,"","a","a"),r},loadingMore:function(){return"Preuzimanje još rezultata…"},maximumSelected:function(t){var n="Možete izabrati samo "+t.maximum+" stavk";return n+=e(t.maximum,"u","e","i"),n},noResults:function(){return"Ništa nije pronađeno"},searching:function(){return"Pretraga…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/{js/i18n → i18n}/sv.js
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
-
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/sv",[],function(){return{errorLoading:function(){return"Resultat kunde inte laddas."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Vänligen sudda ut "+t+" tecken";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vänligen skriv in "+t+" eller fler tecken";return n},loadingMore:function(){return"Laddar fler resultat…"},maximumSelected:function(e){var t="Du kan max välja "+e.maximum+" element";return t},noResults:function(){return"Inga träffar"},searching:function(){return"Söker…"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
+
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/sv",[],function(){return{errorLoading:function(){return"Resultat kunde inte laddas."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Vänligen sudda ut "+t+" tecken";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vänligen skriv in "+t+" eller fler tecken";return n},loadingMore:function(){return"Laddar fler resultat…"},maximumSelected:function(e){var t="Du kan max välja "+e.maximum+" element";return t},noResults:function(){return"Inga träffar"},searching:function(){return"Söker…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/{js/i18n → i18n}/th.js
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
-
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/th",[],function(){return{errorLoading:function(){return"ไม่สามารถค้นข้อมูลได้"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="โปรดลบออก "+t+" ตัวอักษร";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="โปรดพิมพ์เพิ่มอีก "+t+" ตัวอักษร";return n},loadingMore:function(){return"กำลังค้นข้อมูลเพิ่ม…"},maximumSelected:function(e){var t="คุณสามารถเลือกได้ไม่เกิน "+e.maximum+" รายการ";return t},noResults:function(){return"ไม่พบข้อมูล"},searching:function(){return"กำลังค้นข้อมูล…"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
+
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/th",[],function(){return{errorLoading:function(){return"ไม่สามารถค้นข้อมูลได้"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="โปรดลบออก "+t+" ตัวอักษร";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="โปรดพิมพ์เพิ่มอีก "+t+" ตัวอักษร";return n},loadingMore:function(){return"กำลังค้นข้อมูลเพิ่ม…"},maximumSelected:function(e){var t="คุณสามารถเลือกได้ไม่เกิน "+e.maximum+" รายการ";return t},noResults:function(){return"ไม่พบข้อมูล"},searching:function(){return"กำลังค้นข้อมูล…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/i18n/tk.js
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
+
|
3 |
+
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/tk",[],function(){return{errorLoading:function(){return"Netije ýüklenmedi."},inputTooLong:function(e){var t=e.input.length-e.maximum,n=t+" harp bozuň.";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Ýene-de iň az "+t+" harp ýazyň.";return n},loadingMore:function(){return"Köpräk netije görkezilýär…"},maximumSelected:function(e){var t="Diňe "+e.maximum+" sanysyny saýlaň.";return t},noResults:function(){return"Netije tapylmady."},searching:function(){return"Gözlenýär…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/{js/i18n → i18n}/tr.js
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
-
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/tr",[],function(){return{errorLoading:function(){return"Sonuç yüklenemedi"},inputTooLong:function(e){var t=e.input.length-e.maximum,n=t+" karakter daha girmelisiniz";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="En az "+t+" karakter daha girmelisiniz";return n},loadingMore:function(){return"Daha fazla…"},maximumSelected:function(e){var t="Sadece "+e.maximum+" seçim yapabilirsiniz";return t},noResults:function(){return"Sonuç bulunamadı"},searching:function(){return"Aranıyor…"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
+
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/tr",[],function(){return{errorLoading:function(){return"Sonuç yüklenemedi"},inputTooLong:function(e){var t=e.input.length-e.maximum,n=t+" karakter daha girmelisiniz";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="En az "+t+" karakter daha girmelisiniz";return n},loadingMore:function(){return"Daha fazla…"},maximumSelected:function(e){var t="Sadece "+e.maximum+" seçim yapabilirsiniz";return t},noResults:function(){return"Sonuç bulunamadı"},searching:function(){return"Aranıyor…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/{js/i18n → i18n}/uk.js
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
-
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/uk",[],function(){function e(e,t,n,r){return e%100>10&&e%100<15?r:e%10===1?t:e%10>1&&e%10<5?n:r}return{errorLoading:function(){return"Неможливо завантажити результати"},inputTooLong:function(t){var n=t.input.length-t.maximum;return"Будь ласка, видаліть "+n+" "+e(t.maximum,"літеру","літери","літер")},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Будь ласка, введіть "+t+" або більше літер"},loadingMore:function(){return"Завантаження інших результатів…"},maximumSelected:function(t){return"Ви можете вибрати лише "+t.maximum+" "+e(t.maximum,"пункт","пункти","пунктів")},noResults:function(){return"Нічого не знайдено"},searching:function(){return"Пошук…"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
+
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/uk",[],function(){function e(e,t,n,r){return e%100>10&&e%100<15?r:e%10===1?t:e%10>1&&e%10<5?n:r}return{errorLoading:function(){return"Неможливо завантажити результати"},inputTooLong:function(t){var n=t.input.length-t.maximum;return"Будь ласка, видаліть "+n+" "+e(t.maximum,"літеру","літери","літер")},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Будь ласка, введіть "+t+" або більше літер"},loadingMore:function(){return"Завантаження інших результатів…"},maximumSelected:function(t){return"Ви можете вибрати лише "+t.maximum+" "+e(t.maximum,"пункт","пункти","пунктів")},noResults:function(){return"Нічого не знайдено"},searching:function(){return"Пошук…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/{js/i18n → i18n}/vi.js
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
-
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/vi",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Vui lòng nhập ít hơn "+t+" ký tự";return t!=1&&(n+="s"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vui lòng nhập nhiều hơn "+t+" ký tự";return n},loadingMore:function(){return"Đang lấy thêm kết quả…"},maximumSelected:function(e){var t="Chỉ có thể chọn được "+e.maximum+" lựa chọn";return t},noResults:function(){return"Không tìm thấy kết quả"},searching:function(){return"Đang tìm…"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
+
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/vi",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Vui lòng nhập ít hơn "+t+" ký tự";return t!=1&&(n+="s"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vui lòng nhập nhiều hơn "+t+" ký tự";return n},loadingMore:function(){return"Đang lấy thêm kết quả…"},maximumSelected:function(e){var t="Chỉ có thể chọn được "+e.maximum+" lựa chọn";return t},noResults:function(){return"Không tìm thấy kết quả"},searching:function(){return"Đang tìm…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/{js/i18n → i18n}/zh-CN.js
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
-
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/zh-CN",[],function(){return{errorLoading:function(){return"无法载入结果。"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="请删除"+t+"个字符";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="请再输入至少"+t+"个字符";return n},loadingMore:function(){return"载入更多结果…"},maximumSelected:function(e){var t="最多只能选择"+e.maximum+"个项目";return t},noResults:function(){return"未找到结果"},searching:function(){return"搜索中…"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
+
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/zh-CN",[],function(){return{errorLoading:function(){return"无法载入结果。"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="请删除"+t+"个字符";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="请再输入至少"+t+"个字符";return n},loadingMore:function(){return"载入更多结果…"},maximumSelected:function(e){var t="最多只能选择"+e.maximum+"个项目";return t},noResults:function(){return"未找到结果"},searching:function(){return"搜索中…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/{js/i18n → i18n}/zh-TW.js
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
-
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/zh-TW",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="請刪掉"+t+"個字元";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="請再輸入"+t+"個字元";return n},loadingMore:function(){return"載入中…"},maximumSelected:function(e){var t="你只能選擇最多"+e.maximum+"項";return t},noResults:function(){return"沒有找到相符的項目"},searching:function(){return"搜尋中…"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
+
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/zh-TW",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="請刪掉"+t+"個字元";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="請再輸入"+t+"個字元";return n},loadingMore:function(){return"載入中…"},maximumSelected:function(e){var t="你只能選擇最多"+e.maximum+"項";return t},noResults:function(){return"沒有找到相符的項目"},searching:function(){return"搜尋中…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/js/i18n/nb.js
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
-
|
3 |
-
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/nb",[],function(){return{errorLoading:function(){return"Kunne ikke hente resultater."},inputTooLong:function(e){var t=e.input.length-e.maximum;return"Vennligst fjern "+t+" tegn"},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vennligst skriv inn "+t+" tegn til";return n+" tegn til"},loadingMore:function(){return"Laster flere resultater…"},maximumSelected:function(e){return"Du kan velge maks "+e.maximum+" elementer"},noResults:function(){return"Ingen treff"},searching:function(){return"Søker…"}}}),{define:e.define,require:e.require}})();
|
|
|
|
|
|
assets/select2/js/select2.min.js
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.0 | https://github.com/select2/select2/blob/master/LICENSE.md */!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=function(b,c){return void 0===c&&(c="undefined"!=typeof window?require("jquery"):require("jquery")(b)),a(c),c}:a(jQuery)}(function(a){var b=function(){if(a&&a.fn&&a.fn.select2&&a.fn.select2.amd)var b=a.fn.select2.amd;var b;return function(){if(!b||!b.requirejs){b?c=b:b={};var a,c,d;!function(b){function e(a,b){return v.call(a,b)}function f(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o=b&&b.split("/"),p=t.map,q=p&&p["*"]||{};if(a){for(a=a.split("/"),g=a.length-1,t.nodeIdCompat&&x.test(a[g])&&(a[g]=a[g].replace(x,"")),"."===a[0].charAt(0)&&o&&(n=o.slice(0,o.length-1),a=n.concat(a)),k=0;k<a.length;k++)if("."===(m=a[k]))a.splice(k,1),k-=1;else if(".."===m){if(0===k||1===k&&".."===a[2]||".."===a[k-1])continue;k>0&&(a.splice(k-1,2),k-=2)}a=a.join("/")}if((o||q)&&p){for(c=a.split("/"),k=c.length;k>0;k-=1){if(d=c.slice(0,k).join("/"),o)for(l=o.length;l>0;l-=1)if((e=p[o.slice(0,l).join("/")])&&(e=e[d])){f=e,h=k;break}if(f)break;!i&&q&&q[d]&&(i=q[d],j=k)}!f&&i&&(f=i,h=j),f&&(c.splice(0,h,f),a=c.join("/"))}return a}function g(a,c){return function(){var d=w.call(arguments,0);return"string"!=typeof d[0]&&1===d.length&&d.push(null),o.apply(b,d.concat([a,c]))}}function h(a){return function(b){return f(b,a)}}function i(a){return function(b){r[a]=b}}function j(a){if(e(s,a)){var c=s[a];delete s[a],u[a]=!0,n.apply(b,c)}if(!e(r,a)&&!e(u,a))throw new Error("No "+a);return r[a]}function k(a){var b,c=a?a.indexOf("!"):-1;return c>-1&&(b=a.substring(0,c),a=a.substring(c+1,a.length)),[b,a]}function l(a){return a?k(a):[]}function m(a){return function(){return t&&t.config&&t.config[a]||{}}}var n,o,p,q,r={},s={},t={},u={},v=Object.prototype.hasOwnProperty,w=[].slice,x=/\.js$/;p=function(a,b){var c,d=k(a),e=d[0],g=b[1];return a=d[1],e&&(e=f(e,g),c=j(e)),e?a=c&&c.normalize?c.normalize(a,h(g)):f(a,g):(a=f(a,g),d=k(a),e=d[0],a=d[1],e&&(c=j(e))),{f:e?e+"!"+a:a,n:a,pr:e,p:c}},q={require:function(a){return g(a)},exports:function(a){var b=r[a];return void 0!==b?b:r[a]={}},module:function(a){return{id:a,uri:"",exports:r[a],config:m(a)}}},n=function(a,c,d,f){var h,k,m,n,o,t,v,w=[],x=typeof d;if(f=f||a,t=l(f),"undefined"===x||"function"===x){for(c=!c.length&&d.length?["require","exports","module"]:c,o=0;o<c.length;o+=1)if(n=p(c[o],t),"require"===(k=n.f))w[o]=q.require(a);else if("exports"===k)w[o]=q.exports(a),v=!0;else if("module"===k)h=w[o]=q.module(a);else if(e(r,k)||e(s,k)||e(u,k))w[o]=j(k);else{if(!n.p)throw new Error(a+" missing "+k);n.p.load(n.n,g(f,!0),i(k),{}),w[o]=r[k]}m=d?d.apply(r[a],w):void 0,a&&(h&&h.exports!==b&&h.exports!==r[a]?r[a]=h.exports:m===b&&v||(r[a]=m))}else a&&(r[a]=d)},a=c=o=function(a,c,d,e,f){if("string"==typeof a)return q[a]?q[a](c):j(p(a,l(c)).f);if(!a.splice){if(t=a,t.deps&&o(t.deps,t.callback),!c)return;c.splice?(a=c,c=d,d=null):a=b}return c=c||function(){},"function"==typeof d&&(d=e,e=f),e?n(b,a,c,d):setTimeout(function(){n(b,a,c,d)},4),o},o.config=function(a){return o(a)},a._defined=r,d=function(a,b,c){if("string"!=typeof a)throw new Error("See almond README: incorrect module build, no module name");b.splice||(c=b,b=[]),e(r,a)||e(s,a)||(s[a]=[a,b,c])},d.amd={jQuery:!0}}(),b.requirejs=a,b.require=c,b.define=d}}(),b.define("almond",function(){}),b.define("jquery",[],function(){var b=a||$;return null==b&&console&&console.error&&console.error("Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before Select2 on your web page."),b}),b.define("select2/utils",["jquery"],function(a){function b(a){var b=a.prototype,c=[];for(var d in b){"function"==typeof b[d]&&("constructor"!==d&&c.push(d))}return c}var c={};c.Extend=function(a,b){function c(){this.constructor=a}var d={}.hasOwnProperty;for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},c.Decorate=function(a,c){function d(){var b=Array.prototype.unshift,d=c.prototype.constructor.length,e=a.prototype.constructor;d>0&&(b.call(arguments,a.prototype.constructor),e=c.prototype.constructor),e.apply(this,arguments)}function e(){this.constructor=d}var f=b(c),g=b(a);c.displayName=a.displayName,d.prototype=new e;for(var h=0;h<g.length;h++){var i=g[h];d.prototype[i]=a.prototype[i]}for(var j=(function(a){var b=function(){};a in d.prototype&&(b=d.prototype[a]);var e=c.prototype[a];return function(){return Array.prototype.unshift.call(arguments,b),e.apply(this,arguments)}}),k=0;k<f.length;k++){var l=f[k];d.prototype[l]=j(l)}return d};var d=function(){this.listeners={}};d.prototype.on=function(a,b){this.listeners=this.listeners||{},a in this.listeners?this.listeners[a].push(b):this.listeners[a]=[b]},d.prototype.trigger=function(a){var b=Array.prototype.slice,c=b.call(arguments,1);this.listeners=this.listeners||{},null==c&&(c=[]),0===c.length&&c.push({}),c[0]._type=a,a in this.listeners&&this.invoke(this.listeners[a],b.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},d.prototype.invoke=function(a,b){for(var c=0,d=a.length;c<d;c++)a[c].apply(this,b)},c.Observable=d,c.generateChars=function(a){for(var b="",c=0;c<a;c++){b+=Math.floor(36*Math.random()).toString(36)}return b},c.bind=function(a,b){return function(){a.apply(b,arguments)}},c._convertData=function(a){for(var b in a){var c=b.split("-"),d=a;if(1!==c.length){for(var e=0;e<c.length;e++){var f=c[e];f=f.substring(0,1).toLowerCase()+f.substring(1),f in d||(d[f]={}),e==c.length-1&&(d[f]=a[b]),d=d[f]}delete a[b]}}return a},c.hasScroll=function(b,c){var d=a(c),e=c.style.overflowX,f=c.style.overflowY;return(e!==f||"hidden"!==f&&"visible"!==f)&&("scroll"===e||"scroll"===f||(d.innerHeight()<c.scrollHeight||d.innerWidth()<c.scrollWidth))},c.escapeMarkup=function(a){var b={"\\":"\","&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};return"string"!=typeof a?a:String(a).replace(/[&<>"'\/\\]/g,function(a){return b[a]})},c.appendMany=function(b,c){if("1.7"===a.fn.jquery.substr(0,3)){var d=a();a.map(c,function(a){d=d.add(a)}),c=d}b.append(c)},c.__cache={};var e=0;return c.GetUniqueElementId=function(a){var b=a.getAttribute("data-select2-id");return null==b&&(a.id?(b=a.id,a.setAttribute("data-select2-id",b)):(a.setAttribute("data-select2-id",++e),b=e.toString())),b},c.StoreData=function(a,b,d){var e=c.GetUniqueElementId(a);c.__cache[e]||(c.__cache[e]={}),c.__cache[e][b]=d},c.GetData=function(b,d){var e=c.GetUniqueElementId(b);return d?c.__cache[e]&&null!=c.__cache[e][d]?c.__cache[e][d]:a(b).data(d):c.__cache[e]},c.RemoveData=function(a){var b=c.GetUniqueElementId(a);null!=c.__cache[b]&&delete c.__cache[b]},c}),b.define("select2/results",["jquery","./utils"],function(a,b){function c(a,b,d){this.$element=a,this.data=d,this.options=b,c.__super__.constructor.call(this)}return b.Extend(c,b.Observable),c.prototype.render=function(){var b=a('<ul class="select2-results__options" role="tree"></ul>');return this.options.get("multiple")&&b.attr("aria-multiselectable","true"),this.$results=b,b},c.prototype.clear=function(){this.$results.empty()},c.prototype.displayMessage=function(b){var c=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var d=a('<li role="treeitem" aria-live="assertive" class="select2-results__option"></li>'),e=this.options.get("translations").get(b.message);d.append(c(e(b.args))),d[0].className+=" select2-results__message",this.$results.append(d)},c.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},c.prototype.append=function(a){this.hideLoading();var b=[];if(null==a.results||0===a.results.length)return void(0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"}));a.results=this.sort(a.results);for(var c=0;c<a.results.length;c++){var d=a.results[c],e=this.option(d);b.push(e)}this.$results.append(b)},c.prototype.position=function(a,b){b.find(".select2-results").append(a)},c.prototype.sort=function(a){return this.options.get("sorter")(a)},c.prototype.highlightFirstItem=function(){var a=this.$results.find(".select2-results__option[aria-selected]"),b=a.filter("[aria-selected=true]");b.length>0?b.first().trigger("mouseenter"):a.first().trigger("mouseenter"),this.ensureHighlightVisible()},c.prototype.setClasses=function(){var c=this;this.data.current(function(d){var e=a.map(d,function(a){return a.id.toString()});c.$results.find(".select2-results__option[aria-selected]").each(function(){var c=a(this),d=b.GetData(this,"data"),f=""+d.id;null!=d.element&&d.element.selected||null==d.element&&a.inArray(f,e)>-1?c.attr("aria-selected","true"):c.attr("aria-selected","false")})})},c.prototype.showLoading=function(a){this.hideLoading();var b=this.options.get("translations").get("searching"),c={disabled:!0,loading:!0,text:b(a)},d=this.option(c);d.className+=" loading-results",this.$results.prepend(d)},c.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},c.prototype.option=function(c){var d=document.createElement("li");d.className="select2-results__option";var e={role:"treeitem","aria-selected":"false"};c.disabled&&(delete e["aria-selected"],e["aria-disabled"]="true"),null==c.id&&delete e["aria-selected"],null!=c._resultId&&(d.id=c._resultId),c.title&&(d.title=c.title),c.children&&(e.role="group",e["aria-label"]=c.text,delete e["aria-selected"]);for(var f in e){var g=e[f];d.setAttribute(f,g)}if(c.children){var h=a(d),i=document.createElement("strong");i.className="select2-results__group";a(i);this.template(c,i);for(var j=[],k=0;k<c.children.length;k++){var l=c.children[k],m=this.option(l);j.push(m)}var n=a("<ul></ul>",{class:"select2-results__options select2-results__options--nested"});n.append(j),h.append(i),h.append(n)}else this.template(c,d);return b.StoreData(d,"data",c),d},c.prototype.bind=function(c,d){var e=this,f=c.id+"-results";this.$results.attr("id",f),c.on("results:all",function(a){e.clear(),e.append(a.data),c.isOpen()&&(e.setClasses(),e.highlightFirstItem())}),c.on("results:append",function(a){e.append(a.data),c.isOpen()&&e.setClasses()}),c.on("query",function(a){e.hideMessages(),e.showLoading(a)}),c.on("select",function(){c.isOpen()&&(e.setClasses(),e.highlightFirstItem())}),c.on("unselect",function(){c.isOpen()&&(e.setClasses(),e.highlightFirstItem())}),c.on("open",function(){e.$results.attr("aria-expanded","true"),e.$results.attr("aria-hidden","false"),e.setClasses(),e.ensureHighlightVisible()}),c.on("close",function(){e.$results.attr("aria-expanded","false"),e.$results.attr("aria-hidden","true"),e.$results.removeAttr("aria-activedescendant")}),c.on("results:toggle",function(){var a=e.getHighlightedResults();0!==a.length&&a.trigger("mouseup")}),c.on("results:select",function(){var a=e.getHighlightedResults();if(0!==a.length){var c=b.GetData(a[0],"data");"true"==a.attr("aria-selected")?e.trigger("close",{}):e.trigger("select",{data:c})}}),c.on("results:previous",function(){var a=e.getHighlightedResults(),b=e.$results.find("[aria-selected]"),c=b.index(a);if(0!==c){var d=c-1;0===a.length&&(d=0);var f=b.eq(d);f.trigger("mouseenter");var g=e.$results.offset().top,h=f.offset().top,i=e.$results.scrollTop()+(h-g);0===d?e.$results.scrollTop(0):h-g<0&&e.$results.scrollTop(i)}}),c.on("results:next",function(){var a=e.getHighlightedResults(),b=e.$results.find("[aria-selected]"),c=b.index(a),d=c+1;if(!(d>=b.length)){var f=b.eq(d);f.trigger("mouseenter");var g=e.$results.offset().top+e.$results.outerHeight(!1),h=f.offset().top+f.outerHeight(!1),i=e.$results.scrollTop()+h-g;0===d?e.$results.scrollTop(0):h>g&&e.$results.scrollTop(i)}}),c.on("results:focus",function(a){a.element.addClass("select2-results__option--highlighted")}),c.on("results:message",function(a){e.displayMessage(a)}),a.fn.mousewheel&&this.$results.on("mousewheel",function(a){var b=e.$results.scrollTop(),c=e.$results.get(0).scrollHeight-b+a.deltaY,d=a.deltaY>0&&b-a.deltaY<=0,f=a.deltaY<0&&c<=e.$results.height();d?(e.$results.scrollTop(0),a.preventDefault(),a.stopPropagation()):f&&(e.$results.scrollTop(e.$results.get(0).scrollHeight-e.$results.height()),a.preventDefault(),a.stopPropagation())}),this.$results.on("mouseup",".select2-results__option[aria-selected]",function(c){var d=a(this),f=b.GetData(this,"data");if("true"===d.attr("aria-selected"))return void(e.options.get("multiple")?e.trigger("unselect",{originalEvent:c,data:f}):e.trigger("close",{}));e.trigger("select",{originalEvent:c,data:f})}),this.$results.on("mouseenter",".select2-results__option[aria-selected]",function(c){var d=b.GetData(this,"data");e.getHighlightedResults().removeClass("select2-results__option--highlighted"),e.trigger("results:focus",{data:d,element:a(this)})})},c.prototype.getHighlightedResults=function(){return this.$results.find(".select2-results__option--highlighted")},c.prototype.destroy=function(){this.$results.remove()},c.prototype.ensureHighlightVisible=function(){var a=this.getHighlightedResults();if(0!==a.length){var b=this.$results.find("[aria-selected]"),c=b.index(a),d=this.$results.offset().top,e=a.offset().top,f=this.$results.scrollTop()+(e-d),g=e-d;f-=2*a.outerHeight(!1),c<=2?this.$results.scrollTop(0):(g>this.$results.outerHeight()||g<0)&&this.$results.scrollTop(f)}},c.prototype.template=function(b,c){var d=this.options.get("templateResult"),e=this.options.get("escapeMarkup"),f=d(b,c);null==f?c.style.display="none":"string"==typeof f?c.innerHTML=e(f):a(c).append(f)},c}),b.define("select2/keys",[],function(){return{BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46}}),b.define("select2/selection/base",["jquery","../utils","../keys"],function(a,b,c){function d(a,b){this.$element=a,this.options=b,d.__super__.constructor.call(this)}return b.Extend(d,b.Observable),d.prototype.render=function(){var c=a('<span class="select2-selection" role="combobox" aria-haspopup="true" aria-expanded="false"></span>');return this._tabindex=0,null!=b.GetData(this.$element[0],"old-tabindex")?this._tabindex=b.GetData(this.$element[0],"old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),c.attr("title",this.$element.attr("title")),c.attr("tabindex",this._tabindex),this.$selection=c,c},d.prototype.bind=function(a,b){var d=this,e=(a.id,a.id+"-results");this.container=a,this.$selection.on("focus",function(a){d.trigger("focus",a)}),this.$selection.on("blur",function(a){d._handleBlur(a)}),this.$selection.on("keydown",function(a){d.trigger("keypress",a),a.which===c.SPACE&&a.preventDefault()}),a.on("results:focus",function(a){d.$selection.attr("aria-activedescendant",a.data._resultId)}),a.on("selection:update",function(a){d.update(a.data)}),a.on("open",function(){d.$selection.attr("aria-expanded","true"),d.$selection.attr("aria-owns",e),d._attachCloseHandler(a)}),a.on("close",function(){d.$selection.attr("aria-expanded","false"),d.$selection.removeAttr("aria-activedescendant"),d.$selection.removeAttr("aria-owns"),d.$selection.focus(),d._detachCloseHandler(a)}),a.on("enable",function(){d.$selection.attr("tabindex",d._tabindex)}),a.on("disable",function(){d.$selection.attr("tabindex","-1")})},d.prototype._handleBlur=function(b){var c=this;window.setTimeout(function(){document.activeElement==c.$selection[0]||a.contains(c.$selection[0],document.activeElement)||c.trigger("blur",b)},1)},d.prototype._attachCloseHandler=function(c){a(document.body).on("mousedown.select2."+c.id,function(c){var d=a(c.target),e=d.closest(".select2");a(".select2.select2-container--open").each(function(){a(this),this!=e[0]&&b.GetData(this,"element").select2("close")})})},d.prototype._detachCloseHandler=function(b){a(document.body).off("mousedown.select2."+b.id)},d.prototype.position=function(a,b){b.find(".selection").append(a)},d.prototype.destroy=function(){this._detachCloseHandler(this.container)},d.prototype.update=function(a){throw new Error("The `update` method must be defined in child classes.")},d}),b.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(a,b,c,d){function e(){e.__super__.constructor.apply(this,arguments)}return c.Extend(e,b),e.prototype.render=function(){var a=e.__super__.render.call(this);return a.addClass("select2-selection--single"),a.html('<span class="select2-selection__rendered"></span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span>'),a},e.prototype.bind=function(a,b){var c=this;e.__super__.bind.apply(this,arguments);var d=a.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",d).attr("role","textbox").attr("aria-readonly","true"),this.$selection.attr("aria-labelledby",d),this.$selection.on("mousedown",function(a){1===a.which&&c.trigger("toggle",{originalEvent:a})}),this.$selection.on("focus",function(a){}),this.$selection.on("blur",function(a){}),a.on("focus",function(b){a.isOpen()||c.$selection.focus()})},e.prototype.clear=function(){var a=this.$selection.find(".select2-selection__rendered");a.empty(),a.removeAttr("title")},e.prototype.display=function(a,b){var c=this.options.get("templateSelection");return this.options.get("escapeMarkup")(c(a,b))},e.prototype.selectionContainer=function(){return a("<span></span>")},e.prototype.update=function(a){if(0===a.length)return void this.clear();var b=a[0],c=this.$selection.find(".select2-selection__rendered"),d=this.display(b,c);c.empty().append(d),c.attr("title",b.title||b.text)},e}),b.define("select2/selection/multiple",["jquery","./base","../utils"],function(a,b,c){function d(a,b){d.__super__.constructor.apply(this,arguments)}return c.Extend(d,b),d.prototype.render=function(){var a=d.__super__.render.call(this);return a.addClass("select2-selection--multiple"),a.html('<ul class="select2-selection__rendered"></ul>'),a},d.prototype.bind=function(b,e){var f=this;d.__super__.bind.apply(this,arguments),this.$selection.on("click",function(a){f.trigger("toggle",{originalEvent:a})}),this.$selection.on("click",".select2-selection__choice__remove",function(b){if(!f.options.get("disabled")){var d=a(this),e=d.parent(),g=c.GetData(e[0],"data");f.trigger("unselect",{originalEvent:b,data:g})}})},d.prototype.clear=function(){var a=this.$selection.find(".select2-selection__rendered");a.empty(),a.removeAttr("title")},d.prototype.display=function(a,b){var c=this.options.get("templateSelection");return this.options.get("escapeMarkup")(c(a,b))},d.prototype.selectionContainer=function(){return a('<li class="select2-selection__choice"><span class="select2-selection__choice__remove" role="presentation">×</span></li>')},d.prototype.update=function(a){if(this.clear(),0!==a.length){for(var b=[],d=0;d<a.length;d++){var e=a[d],f=this.selectionContainer(),g=this.display(e,f);f.append(g),f.attr("title",e.title||e.text),c.StoreData(f[0],"data",e),b.push(f)}var h=this.$selection.find(".select2-selection__rendered");c.appendMany(h,b)}},d}),b.define("select2/selection/placeholder",["../utils"],function(a){function b(a,b,c){this.placeholder=this.normalizePlaceholder(c.get("placeholder")),a.call(this,b,c)}return b.prototype.normalizePlaceholder=function(a,b){return"string"==typeof b&&(b={id:"",text:b}),b},b.prototype.createPlaceholder=function(a,b){var c=this.selectionContainer();return c.html(this.display(b)),c.addClass("select2-selection__placeholder").removeClass("select2-selection__choice"),c},b.prototype.update=function(a,b){var c=1==b.length&&b[0].id!=this.placeholder.id;if(b.length>1||c)return a.call(this,b);this.clear();var d=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(d)},b}),b.define("select2/selection/allowClear",["jquery","../keys","../utils"],function(a,b,c){function d(){}return d.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".select2-selection__clear",function(a){d._handleClear(a)}),b.on("keypress",function(a){d._handleKeyboardClear(a,b)})},d.prototype._handleClear=function(a,b){if(!this.options.get("disabled")){var d=this.$selection.find(".select2-selection__clear");if(0!==d.length){b.stopPropagation();var e=c.GetData(d[0],"data"),f=this.$element.val();this.$element.val(this.placeholder.id);var g={data:e};if(this.trigger("clear",g),g.prevented)return void this.$element.val(f);for(var h=0;h<e.length;h++)if(g={data:e[h]},this.trigger("unselect",g),g.prevented)return void this.$element.val(f);this.$element.trigger("change"),this.trigger("toggle",{})}}},d.prototype._handleKeyboardClear=function(a,c,d){d.isOpen()||c.which!=b.DELETE&&c.which!=b.BACKSPACE||this._handleClear(c)},d.prototype.update=function(b,d){if(b.call(this,d),!(this.$selection.find(".select2-selection__placeholder").length>0||0===d.length)){var e=a('<span class="select2-selection__clear">×</span>');c.StoreData(e[0],"data",d),this.$selection.find(".select2-selection__rendered").prepend(e)}},d}),b.define("select2/selection/search",["jquery","../utils","../keys"],function(a,b,c){function d(a,b,c){a.call(this,b,c)}return d.prototype.render=function(b){var c=a('<li class="select2-search select2-search--inline"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="none" spellcheck="false" role="textbox" aria-autocomplete="list" /></li>');this.$searchContainer=c,this.$search=c.find("input");var d=b.call(this);return this._transferTabIndex(),d},d.prototype.bind=function(a,d,e){var f=this;a.call(this,d,e),d.on("open",function(){f.$search.trigger("focus")}),d.on("close",function(){f.$search.val(""),f.$search.removeAttr("aria-activedescendant"),f.$search.trigger("focus")}),d.on("enable",function(){f.$search.prop("disabled",!1),f._transferTabIndex()}),d.on("disable",function(){f.$search.prop("disabled",!0)}),d.on("focus",function(a){f.$search.trigger("focus")}),d.on("results:focus",function(a){f.$search.attr("aria-activedescendant",a.id)}),this.$selection.on("focusin",".select2-search--inline",function(a){f.trigger("focus",a)}),this.$selection.on("focusout",".select2-search--inline",function(a){f._handleBlur(a)}),this.$selection.on("keydown",".select2-search--inline",function(a){if(a.stopPropagation(),f.trigger("keypress",a),f._keyUpPrevented=a.isDefaultPrevented(),a.which===c.BACKSPACE&&""===f.$search.val()){var d=f.$searchContainer.prev(".select2-selection__choice");if(d.length>0){var e=b.GetData(d[0],"data");f.searchRemoveChoice(e),a.preventDefault()}}});var g=document.documentMode,h=g&&g<=11;this.$selection.on("input.searchcheck",".select2-search--inline",function(a){if(h)return void f.$selection.off("input.search input.searchcheck");f.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".select2-search--inline",function(a){if(h&&"input"===a.type)return void f.$selection.off("input.search input.searchcheck");var b=a.which;b!=c.SHIFT&&b!=c.CTRL&&b!=c.ALT&&b!=c.TAB&&f.handleSearch(a)})},d.prototype._transferTabIndex=function(a){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},d.prototype.createPlaceholder=function(a,b){this.$search.attr("placeholder",b.text)},d.prototype.update=function(a,b){var c=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),a.call(this,b),this.$selection.find(".select2-selection__rendered").append(this.$searchContainer),this.resizeSearch(),c&&this.$search.focus()},d.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var a=this.$search.val();this.trigger("query",{term:a})}this._keyUpPrevented=!1},d.prototype.searchRemoveChoice=function(a,b){this.trigger("unselect",{data:b}),this.$search.val(b.text),this.handleSearch()},d.prototype.resizeSearch=function(){this.$search.css("width","25px");var a="";if(""!==this.$search.attr("placeholder"))a=this.$selection.find(".select2-selection__rendered").innerWidth();else{a=.75*(this.$search.val().length+1)+"em"}this.$search.css("width",a)},d}),b.define("select2/selection/eventRelay",["jquery"],function(a){function b(){}return b.prototype.bind=function(b,c,d){var e=this,f=["open","opening","close","closing","select","selecting","unselect","unselecting","clear","clearing"],g=["opening","closing","selecting","unselecting","clearing"];b.call(this,c,d),c.on("*",function(b,c){if(-1!==a.inArray(b,f)){c=c||{};var d=a.Event("select2:"+b,{params:c});e.$element.trigger(d),-1!==a.inArray(b,g)&&(c.prevented=d.isDefaultPrevented())}})},b}),b.define("select2/translation",["jquery","require"],function(a,b){function c(a){this.dict=a||{}}return c.prototype.all=function(){return this.dict},c.prototype.get=function(a){return this.dict[a]},c.prototype.extend=function(b){this.dict=a.extend({},b.all(),this.dict)},c._cache={},c.loadPath=function(a){if(!(a in c._cache)){var d=b(a);c._cache[a]=d}return new c(c._cache[a])},c}),b.define("select2/diacritics",[],function(){return{"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"}}),b.define("select2/data/base",["../utils"],function(a){function b(a,c){b.__super__.constructor.call(this)}return a.Extend(b,a.Observable),b.prototype.current=function(a){throw new Error("The `current` method must be defined in child classes.")},b.prototype.query=function(a,b){throw new Error("The `query` method must be defined in child classes.")},b.prototype.bind=function(a,b){},b.prototype.destroy=function(){},b.prototype.generateResultId=function(b,c){var d=b.id+"-result-";return d+=a.generateChars(4),null!=c.id?d+="-"+c.id.toString():d+="-"+a.generateChars(4),d},b}),b.define("select2/data/select",["./base","../utils","jquery"],function(a,b,c){function d(a,b){this.$element=a,this.options=b,d.__super__.constructor.call(this)}return b.Extend(d,a),d.prototype.current=function(a){var b=[],d=this;this.$element.find(":selected").each(function(){var a=c(this),e=d.item(a);b.push(e)}),a(b)},d.prototype.select=function(a){var b=this;if(a.selected=!0,c(a.element).is("option"))return a.element.selected=!0,void this.$element.trigger("change");if(this.$element.prop("multiple"))this.current(function(d){var e=[];a=[a],a.push.apply(a,d);for(var f=0;f<a.length;f++){var g=a[f].id;-1===c.inArray(g,e)&&e.push(g)}b.$element.val(e),b.$element.trigger("change")});else{var d=a.id;this.$element.val(d),this.$element.trigger("change")}},d.prototype.unselect=function(a){var b=this;if(this.$element.prop("multiple")){if(a.selected=!1,c(a.element).is("option"))return a.element.selected=!1,void this.$element.trigger("change");this.current(function(d){for(var e=[],f=0;f<d.length;f++){var g=d[f].id;g!==a.id&&-1===c.inArray(g,e)&&e.push(g)}b.$element.val(e),b.$element.trigger("change")})}},d.prototype.bind=function(a,b){var c=this;this.container=a,a.on("select",function(a){c.select(a.data)}),a.on("unselect",function(a){c.unselect(a.data)})},d.prototype.destroy=function(){this.$element.find("*").each(function(){b.RemoveData(this)})},d.prototype.query=function(a,b){var d=[],e=this;this.$element.children().each(function(){var b=c(this);if(b.is("option")||b.is("optgroup")){var f=e.item(b),g=e.matches(a,f);null!==g&&d.push(g)}}),b({results:d})},d.prototype.addOptions=function(a){b.appendMany(this.$element,a)},d.prototype.option=function(a){var d;a.children?(d=document.createElement("optgroup"),d.label=a.text):(d=document.createElement("option"),void 0!==d.textContent?d.textContent=a.text:d.innerText=a.text),void 0!==a.id&&(d.value=a.id),a.disabled&&(d.disabled=!0),a.selected&&(d.selected=!0),a.title&&(d.title=a.title);var e=c(d),f=this._normalizeItem(a);return f.element=d,b.StoreData(d,"data",f),e},d.prototype.item=function(a){var d={};if(null!=(d=b.GetData(a[0],"data")))return d;if(a.is("option"))d={id:a.val(),text:a.text(),disabled:a.prop("disabled"),selected:a.prop("selected"),title:a.prop("title")};else if(a.is("optgroup")){d={text:a.prop("label"),children:[],title:a.prop("title")};for(var e=a.children("option"),f=[],g=0;g<e.length;g++){var h=c(e[g]),i=this.item(h);f.push(i)}d.children=f}return d=this._normalizeItem(d),d.element=a[0],b.StoreData(a[0],"data",d),d},d.prototype._normalizeItem=function(a){a!==Object(a)&&(a={id:a,text:a}),a=c.extend({},{text:""},a);var b={selected:!1,disabled:!1};return null!=a.id&&(a.id=a.id.toString()),null!=a.text&&(a.text=a.text.toString()),null==a._resultId&&a.id&&null!=this.container&&(a._resultId=this.generateResultId(this.container,a)),c.extend({},b,a)},d.prototype.matches=function(a,b){return this.options.get("matcher")(a,b)},d}),b.define("select2/data/array",["./select","../utils","jquery"],function(a,b,c){function d(a,b){var c=b.get("data")||[];d.__super__.constructor.call(this,a,b),this.addOptions(this.convertToOptions(c))}return b.Extend(d,a),d.prototype.select=function(a){var b=this.$element.find("option").filter(function(b,c){return c.value==a.id.toString()});0===b.length&&(b=this.option(a),this.addOptions(b)),d.__super__.select.call(this,a)},d.prototype.convertToOptions=function(a){function d(a){return function(){return c(this).val()==a.id}}for(var e=this,f=this.$element.find("option"),g=f.map(function(){return e.item(c(this)).id}).get(),h=[],i=0;i<a.length;i++){var j=this._normalizeItem(a[i]);if(c.inArray(j.id,g)>=0){var k=f.filter(d(j)),l=this.item(k),m=c.extend(!0,{},j,l),n=this.option(m);k.replaceWith(n)}else{var o=this.option(j);if(j.children){var p=this.convertToOptions(j.children);b.appendMany(o,p)}h.push(o)}}return h},d}),b.define("select2/data/ajax",["./array","../utils","jquery"],function(a,b,c){function d(a,b){this.ajaxOptions=this._applyDefaults(b.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),d.__super__.constructor.call(this,a,b)}return b.Extend(d,a),d.prototype._applyDefaults=function(a){var b={data:function(a){return c.extend({},a,{q:a.term})},transport:function(a,b,d){var e=c.ajax(a);return e.then(b),e.fail(d),e}};return c.extend({},b,a,!0)},d.prototype.processResults=function(a){return a},d.prototype.query=function(a,b){function d(){var d=f.transport(f,function(d){var f=e.processResults(d,a);e.options.get("debug")&&window.console&&console.error&&(f&&f.results&&c.isArray(f.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),b(f)},function(){"status"in d&&(0===d.status||"0"===d.status)||e.trigger("results:message",{message:"errorLoading"})});e._request=d}var e=this;null!=this._request&&(c.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var f=c.extend({type:"GET"},this.ajaxOptions);"function"==typeof f.url&&(f.url=f.url.call(this.$element,a)),"function"==typeof f.data&&(f.data=f.data.call(this.$element,a)),this.ajaxOptions.delay&&null!=a.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(d,this.ajaxOptions.delay)):d()},d}),b.define("select2/data/tags",["jquery"],function(a){function b(b,c,d){var e=d.get("tags"),f=d.get("createTag");void 0!==f&&(this.createTag=f);var g=d.get("insertTag");if(void 0!==g&&(this.insertTag=g),b.call(this,c,d),a.isArray(e))for(var h=0;h<e.length;h++){var i=e[h],j=this._normalizeItem(i),k=this.option(j);this.$element.append(k)}}return b.prototype.query=function(a,b,c){function d(a,f){for(var g=a.results,h=0;h<g.length;h++){var i=g[h],j=null!=i.children&&!d({results:i.children},!0);if((i.text||"").toUpperCase()===(b.term||"").toUpperCase()||j)return!f&&(a.data=g,void c(a))}if(f)return!0;var k=e.createTag(b);if(null!=k){var l=e.option(k);l.attr("data-select2-tag",!0),e.addOptions([l]),e.insertTag(g,k)}a.results=g,c(a)}var e=this;if(this._removeOldTags(),null==b.term||null!=b.page)return void a.call(this,b,c);a.call(this,b,d)},b.prototype.createTag=function(b,c){var d=a.trim(c.term);return""===d?null:{id:d,text:d}},b.prototype.insertTag=function(a,b,c){b.unshift(c)},b.prototype._removeOldTags=function(b){this._lastTag;this.$element.find("option[data-select2-tag]").each(function(){this.selected||a(this).remove()})},b}),b.define("select2/data/tokenizer",["jquery"],function(a){function b(a,b,c){var d=c.get("tokenizer");void 0!==d&&(this.tokenizer=d),a.call(this,b,c)}return b.prototype.bind=function(a,b,c){a.call(this,b,c),this.$search=b.dropdown.$search||b.selection.$search||c.find(".select2-search__field")},b.prototype.query=function(b,c,d){function e(b){var c=g._normalizeItem(b);if(!g.$element.find("option").filter(function(){return a(this).val()===c.id}).length){var d=g.option(c);d.attr("data-select2-tag",!0),g._removeOldTags(),g.addOptions([d])}f(c)}function f(a){g.trigger("select",{data:a})}var g=this;c.term=c.term||"";var h=this.tokenizer(c,this.options,e);h.term!==c.term&&(this.$search.length&&(this.$search.val(h.term),this.$search.focus()),c.term=h.term),b.call(this,c,d)},b.prototype.tokenizer=function(b,c,d,e){for(var f=d.get("tokenSeparators")||[],g=c.term,h=0,i=this.createTag||function(a){return{id:a.term,text:a.term}};h<g.length;){var j=g[h];if(-1!==a.inArray(j,f)){var k=g.substr(0,h),l=a.extend({},c,{term:k}),m=i(l);null!=m?(e(m),g=g.substr(h+1)||"",h=0):h++}else h++}return{term:g}},b}),b.define("select2/data/minimumInputLength",[],function(){function a(a,b,c){this.minimumInputLength=c.get("minimumInputLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){if(b.term=b.term||"",b.term.length<this.minimumInputLength)return void this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:b.term,params:b}});a.call(this,b,c)},a}),b.define("select2/data/maximumInputLength",[],function(){function a(a,b,c){this.maximumInputLength=c.get("maximumInputLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){if(b.term=b.term||"",this.maximumInputLength>0&&b.term.length>this.maximumInputLength)return void this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:b.term,params:b}});a.call(this,b,c)},a}),b.define("select2/data/maximumSelectionLength",[],function(){function a(a,b,c){this.maximumSelectionLength=c.get("maximumSelectionLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){var d=this;this.current(function(e){var f=null!=e?e.length:0;if(d.maximumSelectionLength>0&&f>=d.maximumSelectionLength)return void d.trigger("results:message",{message:"maximumSelected",args:{maximum:d.maximumSelectionLength}});a.call(d,b,c)})},a}),b.define("select2/dropdown",["jquery","./utils"],function(a,b){function c(a,b){this.$element=a,this.options=b,c.__super__.constructor.call(this)}return b.Extend(c,b.Observable),c.prototype.render=function(){var b=a('<span class="select2-dropdown"><span class="select2-results"></span></span>');return b.attr("dir",this.options.get("dir")),this.$dropdown=b,b},c.prototype.bind=function(){},c.prototype.position=function(a,b){},c.prototype.destroy=function(){this.$dropdown.remove()},c}),b.define("select2/dropdown/search",["jquery","../utils"],function(a,b){function c(){}return c.prototype.render=function(b){var c=b.call(this),d=a('<span class="select2-search select2-search--dropdown"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="none" spellcheck="false" role="textbox" /></span>');return this.$searchContainer=d,this.$search=d.find("input"),c.prepend(d),c},c.prototype.bind=function(b,c,d){var e=this;b.call(this,c,d),this.$search.on("keydown",function(a){e.trigger("keypress",a),e._keyUpPrevented=a.isDefaultPrevented()}),this.$search.on("input",function(b){a(this).off("keyup")}),this.$search.on("keyup input",function(a){e.handleSearch(a)}),c.on("open",function(){e.$search.attr("tabindex",0),e.$search.focus(),window.setTimeout(function(){e.$search.focus()},0)}),c.on("close",function(){e.$search.attr("tabindex",-1),e.$search.val(""),e.$search.blur()}),c.on("focus",function(){c.isOpen()||e.$search.focus()}),c.on("results:all",function(a){if(null==a.query.term||""===a.query.term){e.showSearch(a)?e.$searchContainer.removeClass("select2-search--hide"):e.$searchContainer.addClass("select2-search--hide")}})},c.prototype.handleSearch=function(a){if(!this._keyUpPrevented){var b=this.$search.val();this.trigger("query",{term:b})}this._keyUpPrevented=!1},c.prototype.showSearch=function(a,b){return!0},c}),b.define("select2/dropdown/hidePlaceholder",[],function(){function a(a,b,c,d){this.placeholder=this.normalizePlaceholder(c.get("placeholder")),a.call(this,b,c,d)}return a.prototype.append=function(a,b){b.results=this.removePlaceholder(b.results),a.call(this,b)},a.prototype.normalizePlaceholder=function(a,b){return"string"==typeof b&&(b={id:"",text:b}),b},a.prototype.removePlaceholder=function(a,b){for(var c=b.slice(0),d=b.length-1;d>=0;d--){var e=b[d];this.placeholder.id===e.id&&c.splice(d,1)}return c},a}),b.define("select2/dropdown/infiniteScroll",["jquery"],function(a){function b(a,b,c,d){this.lastParams={},a.call(this,b,c,d),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return b.prototype.append=function(a,b){this.$loadingMore.remove(),this.loading=!1,a.call(this,b),this.showLoadingMore(b)&&this.$results.append(this.$loadingMore)},b.prototype.bind=function(b,c,d){var e=this;b.call(this,c,d),c.on("query",function(a){e.lastParams=a,e.loading=!0}),c.on("query:append",function(a){e.lastParams=a,e.loading=!0}),this.$results.on("scroll",function(){var b=a.contains(document.documentElement,e.$loadingMore[0]);if(!e.loading&&b){e.$results.offset().top+e.$results.outerHeight(!1)+50>=e.$loadingMore.offset().top+e.$loadingMore.outerHeight(!1)&&e.loadMore()}})},b.prototype.loadMore=function(){this.loading=!0;var b=a.extend({},{page:1},this.lastParams);b.page++,this.trigger("query:append",b)},b.prototype.showLoadingMore=function(a,b){return b.pagination&&b.pagination.more},b.prototype.createLoadingMore=function(){var b=a('<li class="select2-results__option select2-results__option--load-more"role="treeitem" aria-disabled="true"></li>'),c=this.options.get("translations").get("loadingMore");return b.html(c(this.lastParams)),b},b}),b.define("select2/dropdown/attachBody",["jquery","../utils"],function(a,b){function c(b,c,d){this.$dropdownParent=d.get("dropdownParent")||a(document.body),b.call(this,c,d)}return c.prototype.bind=function(a,b,c){var d=this,e=!1;a.call(this,b,c),b.on("open",function(){d._showDropdown(),d._attachPositioningHandler(b),e||(e=!0,b.on("results:all",function(){d._positionDropdown(),d._resizeDropdown()}),b.on("results:append",function(){d._positionDropdown(),d._resizeDropdown()}))}),b.on("close",function(){d._hideDropdown(),d._detachPositioningHandler(b)}),this.$dropdownContainer.on("mousedown",function(a){a.stopPropagation()})},c.prototype.destroy=function(a){a.call(this),this.$dropdownContainer.remove()},c.prototype.position=function(a,b,c){b.attr("class",c.attr("class")),b.removeClass("select2"),b.addClass("select2-container--open"),b.css({position:"absolute",top:-999999}),this.$container=c},c.prototype.render=function(b){var c=a("<span></span>"),d=b.call(this);return c.append(d),this.$dropdownContainer=c,c},c.prototype._hideDropdown=function(a){this.$dropdownContainer.detach()},c.prototype._attachPositioningHandler=function(c,d){var e=this,f="scroll.select2."+d.id,g="resize.select2."+d.id,h="orientationchange.select2."+d.id,i=this.$container.parents().filter(b.hasScroll);i.each(function(){b.StoreData(this,"select2-scroll-position",{x:a(this).scrollLeft(),y:a(this).scrollTop()})}),i.on(f,function(c){var d=b.GetData(this,"select2-scroll-position");a(this).scrollTop(d.y)}),a(window).on(f+" "+g+" "+h,function(a){e._positionDropdown(),e._resizeDropdown()})},c.prototype._detachPositioningHandler=function(c,d){var e="scroll.select2."+d.id,f="resize.select2."+d.id,g="orientationchange.select2."+d.id;this.$container.parents().filter(b.hasScroll).off(e),a(window).off(e+" "+f+" "+g)},c.prototype._positionDropdown=function(){var b=a(window),c=this.$dropdown.hasClass("select2-dropdown--above"),d=this.$dropdown.hasClass("select2-dropdown--below"),e=null,f=this.$container.offset();f.bottom=f.top+this.$container.outerHeight(!1);var g={height:this.$container.outerHeight(!1)};g.top=f.top,g.bottom=f.top+g.height;var h={height:this.$dropdown.outerHeight(!1)},i={top:b.scrollTop(),bottom:b.scrollTop()+b.height()},j=i.top<f.top-h.height,k=i.bottom>f.bottom+h.height,l={left:f.left,top:g.bottom},m=this.$dropdownParent;"static"===m.css("position")&&(m=m.offsetParent());var n=m.offset();l.top-=n.top,l.left-=n.left,c||d||(e="below"),k||!j||c?!j&&k&&c&&(e="below"):e="above",("above"==e||c&&"below"!==e)&&(l.top=g.top-n.top-h.height),null!=e&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+e),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+e)),this.$dropdownContainer.css(l)},c.prototype._resizeDropdown=function(){var a={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(a.minWidth=a.width,a.position="relative",a.width="auto"),this.$dropdown.css(a)},c.prototype._showDropdown=function(a){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},c}),b.define("select2/dropdown/minimumResultsForSearch",[],function(){function a(b){for(var c=0,d=0;d<b.length;d++){var e=b[d];e.children?c+=a(e.children):c++}return c}function b(a,b,c,d){this.minimumResultsForSearch=c.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),a.call(this,b,c,d)}return b.prototype.showSearch=function(b,c){return!(a(c.data.results)<this.minimumResultsForSearch)&&b.call(this,c)},b}),b.define("select2/dropdown/selectOnClose",["../utils"],function(a){function b(){}return b.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),b.on("close",function(a){d._handleSelectOnClose(a)})},b.prototype._handleSelectOnClose=function(b,c){if(c&&null!=c.originalSelect2Event){var d=c.originalSelect2Event;if("select"===d._type||"unselect"===d._type)return}var e=this.getHighlightedResults();if(!(e.length<1)){var f=a.GetData(e[0],"data");null!=f.element&&f.element.selected||null==f.element&&f.selected||this.trigger("select",{data:f})}},b}),b.define("select2/dropdown/closeOnSelect",[],function(){function a(){}return a.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),b.on("select",function(a){d._selectTriggered(a)}),b.on("unselect",function(a){d._selectTriggered(a)})},a.prototype._selectTriggered=function(a,b){var c=b.originalEvent;c&&c.ctrlKey||this.trigger("close",{originalEvent:c,originalSelect2Event:b})},a}),b.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(a){var b=a.input.length-a.maximum,c="Please delete "+b+" character";return 1!=b&&(c+="s"),c},inputTooShort:function(a){return"Please enter "+(a.minimum-a.input.length)+" or more characters"},loadingMore:function(){return"Loading more results…"},maximumSelected:function(a){var b="You can only select "+a.maximum+" item";return 1!=a.maximum&&(b+="s"),b},noResults:function(){return"No results found"},searching:function(){return"Searching…"}}}),b.define("select2/defaults",["jquery","require","./results","./selection/single","./selection/multiple","./selection/placeholder","./selection/allowClear","./selection/search","./selection/eventRelay","./utils","./translation","./diacritics","./data/select","./data/array","./data/ajax","./data/tags","./data/tokenizer","./data/minimumInputLength","./data/maximumInputLength","./data/maximumSelectionLength","./dropdown","./dropdown/search","./dropdown/hidePlaceholder","./dropdown/infiniteScroll","./dropdown/attachBody","./dropdown/minimumResultsForSearch","./dropdown/selectOnClose","./dropdown/closeOnSelect","./i18n/en"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C){function D(){this.reset()}return D.prototype.apply=function(l){if(l=a.extend(!0,{},this.defaults,l),null==l.dataAdapter){if(null!=l.ajax?l.dataAdapter=o:null!=l.data?l.dataAdapter=n:l.dataAdapter=m,l.minimumInputLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,r)),l.maximumInputLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,s)),l.maximumSelectionLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,t)),l.tags&&(l.dataAdapter=j.Decorate(l.dataAdapter,p)),null==l.tokenSeparators&&null==l.tokenizer||(l.dataAdapter=j.Decorate(l.dataAdapter,q)),null!=l.query){var C=b(l.amdBase+"compat/query");l.dataAdapter=j.Decorate(l.dataAdapter,C)}if(null!=l.initSelection){var D=b(l.amdBase+"compat/initSelection");l.dataAdapter=j.Decorate(l.dataAdapter,D)}}if(null==l.resultsAdapter&&(l.resultsAdapter=c,null!=l.ajax&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,x)),null!=l.placeholder&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,w)),l.selectOnClose&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,A))),null==l.dropdownAdapter){if(l.multiple)l.dropdownAdapter=u;else{var E=j.Decorate(u,v);l.dropdownAdapter=E}if(0!==l.minimumResultsForSearch&&(l.dropdownAdapter=j.Decorate(l.dropdownAdapter,z)),l.closeOnSelect&&(l.dropdownAdapter=j.Decorate(l.dropdownAdapter,B)),null!=l.dropdownCssClass||null!=l.dropdownCss||null!=l.adaptDropdownCssClass){var F=b(l.amdBase+"compat/dropdownCss");l.dropdownAdapter=j.Decorate(l.dropdownAdapter,F)}l.dropdownAdapter=j.Decorate(l.dropdownAdapter,y)}if(null==l.selectionAdapter){if(l.multiple?l.selectionAdapter=e:l.selectionAdapter=d,null!=l.placeholder&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,f)),l.allowClear&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,g)),l.multiple&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,h)),null!=l.containerCssClass||null!=l.containerCss||null!=l.adaptContainerCssClass){var G=b(l.amdBase+"compat/containerCss");l.selectionAdapter=j.Decorate(l.selectionAdapter,G)}l.selectionAdapter=j.Decorate(l.selectionAdapter,i)}if("string"==typeof l.language)if(l.language.indexOf("-")>0){var H=l.language.split("-"),I=H[0];l.language=[l.language,I]}else l.language=[l.language];if(a.isArray(l.language)){var J=new k;l.language.push("en");for(var K=l.language,L=0;L<K.length;L++){var M=K[L],N={};try{N=k.loadPath(M)}catch(a){try{M=this.defaults.amdLanguageBase+M,N=k.loadPath(M)}catch(a){l.debug&&window.console&&console.warn&&console.warn('Select2: The language file for "'+M+'" could not be automatically loaded. A fallback will be used instead.');continue}}J.extend(N)}l.translations=J}else{var O=k.loadPath(this.defaults.amdLanguageBase+"en"),P=new k(l.language);P.extend(O),l.translations=P}return l},D.prototype.reset=function(){function b(a){function b(a){return l[a]||a}return a.replace(/[^\u0000-\u007E]/g,b)}function c(d,e){if(""===a.trim(d.term))return e;if(e.children&&e.children.length>0){for(var f=a.extend(!0,{},e),g=e.children.length-1;g>=0;g--){null==c(d,e.children[g])&&f.children.splice(g,1)}return f.children.length>0?f:c(d,f)}var h=b(e.text).toUpperCase(),i=b(d.term).toUpperCase();return h.indexOf(i)>-1?e:null}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:j.escapeMarkup,language:C,matcher:c,minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,sorter:function(a){return a},templateResult:function(a){return a.text},templateSelection:function(a){return a.text},theme:"default",width:"resolve"}},D.prototype.set=function(b,c){var d=a.camelCase(b),e={};e[d]=c;var f=j._convertData(e);a.extend(!0,this.defaults,f)},new D}),b.define("select2/options",["require","jquery","./defaults","./utils"],function(a,b,c,d){function e(b,e){if(this.options=b,null!=e&&this.fromElement(e),this.options=c.apply(this.options),e&&e.is("input")){var f=a(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=d.Decorate(this.options.dataAdapter,f)}}return e.prototype.fromElement=function(a){var c=["select2"];null==this.options.multiple&&(this.options.multiple=a.prop("multiple")),null==this.options.disabled&&(this.options.disabled=a.prop("disabled")),null==this.options.language&&(a.prop("lang")?this.options.language=a.prop("lang").toLowerCase():a.closest("[lang]").prop("lang")&&(this.options.language=a.closest("[lang]").prop("lang"))),null==this.options.dir&&(a.prop("dir")?this.options.dir=a.prop("dir"):a.closest("[dir]").prop("dir")?this.options.dir=a.closest("[dir]").prop("dir"):this.options.dir="ltr"),a.prop("disabled",this.options.disabled),a.prop("multiple",this.options.multiple),d.GetData(a[0],"select2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'),d.StoreData(a[0],"data",d.GetData(a[0],"select2Tags")),d.StoreData(a[0],"tags",!0)),d.GetData(a[0],"ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."),a.attr("ajax--url",d.GetData(a[0],"ajaxUrl")),d.StoreData(a[0],"ajax-Url",d.GetData(a[0],"ajaxUrl")));var e={};e=b.fn.jquery&&"1."==b.fn.jquery.substr(0,2)&&a[0].dataset?b.extend(!0,{},a[0].dataset,d.GetData(a[0])):d.GetData(a[0]);var f=b.extend(!0,{},e);f=d._convertData(f);for(var g in f)b.inArray(g,c)>-1||(b.isPlainObject(this.options[g])?b.extend(this.options[g],f[g]):this.options[g]=f[g]);return this},e.prototype.get=function(a){return this.options[a]},e.prototype.set=function(a,b){this.options[a]=b},e}),b.define("select2/core",["jquery","./options","./utils","./keys"],function(a,b,c,d){var e=function(a,d){null!=c.GetData(a[0],"select2")&&c.GetData(a[0],"select2").destroy(),this.$element=a,this.id=this._generateId(a),d=d||{},this.options=new b(d,a),e.__super__.constructor.call(this);var f=a.attr("tabindex")||0;c.StoreData(a[0],"old-tabindex",f),a.attr("tabindex","-1");var g=this.options.get("dataAdapter");this.dataAdapter=new g(a,this.options);var h=this.render();this._placeContainer(h);var i=this.options.get("selectionAdapter");this.selection=new i(a,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,h);var j=this.options.get("dropdownAdapter");this.dropdown=new j(a,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,h);var k=this.options.get("resultsAdapter");this.results=new k(a,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var l=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(a){l.trigger("selection:update",{data:a})}),a.addClass("select2-hidden-accessible"),a.attr("aria-hidden","true"),this._syncAttributes(),c.StoreData(a[0],"select2",this)};return c.Extend(e,c.Observable),e.prototype._generateId=function(a){var b="";return b=null!=a.attr("id")?a.attr("id"):null!=a.attr("name")?a.attr("name")+"-"+c.generateChars(2):c.generateChars(4),b=b.replace(/(:|\.|\[|\]|,)/g,""),b="select2-"+b},e.prototype._placeContainer=function(a){a.insertAfter(this.$element);var b=this._resolveWidth(this.$element,this.options.get("width"));null!=b&&a.css("width",b)},e.prototype._resolveWidth=function(a,b){var c=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==b){var d=this._resolveWidth(a,"style");return null!=d?d:this._resolveWidth(a,"element")}if("element"==b){var e=a.outerWidth(!1);return e<=0?"auto":e+"px"}if("style"==b){var f=a.attr("style");if("string"!=typeof f)return null;for(var g=f.split(";"),h=0,i=g.length;h<i;h+=1){var j=g[h].replace(/\s/g,""),k=j.match(c);if(null!==k&&k.length>=1)return k[1]}return null}return b},e.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},e.prototype._registerDomEvents=function(){var b=this;this.$element.on("change.select2",function(){b.dataAdapter.current(function(a){b.trigger("selection:update",{data:a})})}),this.$element.on("focus.select2",function(a){b.trigger("focus",a)}),this._syncA=c.bind(this._syncAttributes,this),this._syncS=c.bind(this._syncSubtree,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._syncA);var d=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=d?(this._observer=new d(function(c){a.each(c,b._syncA),a.each(c,b._syncS)}),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})):this.$element[0].addEventListener&&(this.$element[0].addEventListener("DOMAttrModified",b._syncA,!1),this.$element[0].addEventListener("DOMNodeInserted",b._syncS,!1),this.$element[0].addEventListener("DOMNodeRemoved",b._syncS,!1))},e.prototype._registerDataEvents=function(){var a=this;this.dataAdapter.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerSelectionEvents=function(){var b=this,c=["toggle","focus"];this.selection.on("toggle",function(){b.toggleDropdown()}),this.selection.on("focus",function(a){b.focus(a)}),this.selection.on("*",function(d,e){-1===a.inArray(d,c)&&b.trigger(d,e)})},e.prototype._registerDropdownEvents=function(){var a=this;this.dropdown.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerResultsEvents=function(){var a=this;this.results.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerEvents=function(){var a=this;this.on("open",function(){a.$container.addClass("select2-container--open")}),this.on("close",function(){a.$container.removeClass("select2-container--open")}),this.on("enable",function(){a.$container.removeClass("select2-container--disabled")}),this.on("disable",function(){a.$container.addClass("select2-container--disabled")}),this.on("blur",function(){a.$container.removeClass("select2-container--focus")}),this.on("query",function(b){a.isOpen()||a.trigger("open",{}),this.dataAdapter.query(b,function(c){a.trigger("results:all",{data:c,query:b})})}),this.on("query:append",function(b){this.dataAdapter.query(b,function(c){a.trigger("results:append",{data:c,query:b})})}),this.on("keypress",function(b){var c=b.which;a.isOpen()?c===d.ESC||c===d.TAB||c===d.UP&&b.altKey?(a.close(),b.preventDefault()):c===d.ENTER?(a.trigger("results:select",{}),b.preventDefault()):c===d.SPACE&&b.ctrlKey?(a.trigger("results:toggle",{}),b.preventDefault()):c===d.UP?(a.trigger("results:previous",{}),b.preventDefault()):c===d.DOWN&&(a.trigger("results:next",{}),b.preventDefault()):(c===d.ENTER||c===d.SPACE||c===d.DOWN&&b.altKey)&&(a.open(),b.preventDefault())})},e.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.options.get("disabled")?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},e.prototype._syncSubtree=function(a,b){var c=!1,d=this;if(!a||!a.target||"OPTION"===a.target.nodeName||"OPTGROUP"===a.target.nodeName){if(b)if(b.addedNodes&&b.addedNodes.length>0)for(var e=0;e<b.addedNodes.length;e++){var f=b.addedNodes[e];f.selected&&(c=!0)}else b.removedNodes&&b.removedNodes.length>0&&(c=!0);else c=!0;c&&this.dataAdapter.current(function(a){d.trigger("selection:update",{data:a})})}},e.prototype.trigger=function(a,b){var c=e.__super__.trigger,d={open:"opening",close:"closing",select:"selecting",unselect:"unselecting",clear:"clearing"};if(void 0===b&&(b={}),a in d){var f=d[a],g={prevented:!1,name:a,args:b};if(c.call(this,f,g),g.prevented)return void(b.prevented=!0)}c.call(this,a,b)},e.prototype.toggleDropdown=function(){this.options.get("disabled")||(this.isOpen()?this.close():this.open())},e.prototype.open=function(){this.isOpen()||this.trigger("query",{})},e.prototype.close=function(){this.isOpen()&&this.trigger("close",{})},e.prototype.isOpen=function(){return this.$container.hasClass("select2-container--open")},e.prototype.hasFocus=function(){return this.$container.hasClass("select2-container--focus")},e.prototype.focus=function(a){this.hasFocus()||(this.$container.addClass("select2-container--focus"),this.trigger("focus",{}))},e.prototype.enable=function(a){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'),null!=a&&0!==a.length||(a=[!0]);var b=!a[0];this.$element.prop("disabled",b)},e.prototype.data=function(){this.options.get("debug")&&arguments.length>0&&window.console&&console.warn&&console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.');var a=[];return this.dataAdapter.current(function(b){a=b}),a},e.prototype.val=function(b){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),null==b||0===b.length)return this.$element.val();var c=b[0];a.isArray(c)&&(c=a.map(c,function(a){return a.toString()})),this.$element.val(c).trigger("change")},e.prototype.destroy=function(){this.$container.remove(),this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._syncA),null!=this._observer?(this._observer.disconnect(),this._observer=null):this.$element[0].removeEventListener&&(this.$element[0].removeEventListener("DOMAttrModified",this._syncA,!1),this.$element[0].removeEventListener("DOMNodeInserted",this._syncS,!1),this.$element[0].removeEventListener("DOMNodeRemoved",this._syncS,!1)),this._syncA=null,this._syncS=null,this.$element.off(".select2"),this.$element.attr("tabindex",c.GetData(this.$element[0],"old-tabindex")),this.$element.removeClass("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),c.RemoveData(this.$element[0]),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null},e.prototype.render=function(){var b=a('<span class="select2 select2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');return b.attr("dir",this.options.get("dir")),this.$container=b,this.$container.addClass("select2-container--"+this.options.get("theme")),c.StoreData(b[0],"element",this.$element),b},e}),b.define("jquery-mousewheel",["jquery"],function(a){return a}),b.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults","./select2/utils"],function(a,b,c,d,e){if(null==a.fn.select2){var f=["open","close","destroy"];a.fn.select2=function(b){if("object"==typeof(b=b||{}))return this.each(function(){var d=a.extend(!0,{},b);new c(a(this),d)}),this;if("string"==typeof b){var d,g=Array.prototype.slice.call(arguments,1);return this.each(function(){var a=e.GetData(this,"select2");null==a&&window.console&&console.error&&console.error("The select2('"+b+"') method was called on an element that is not using Select2."),d=a[b].apply(a,g)}),a.inArray(b,f)>-1?this:d}throw new Error("Invalid arguments for Select2: "+b)}}return null==a.fn.select2.defaults&&(a.fn.select2.defaults=d),c}),{define:b.define,require:b.require}}(),c=b.require("jquery.select2");return a.fn.select2.amd=b,c});
|
|
assets/select2/{css/select2.css → select2.css}
RENAMED
@@ -1,500 +1,484 @@
|
|
1 |
-
.select2-container {
|
2 |
-
box-sizing: border-box;
|
3 |
-
display: inline-block;
|
4 |
-
margin: 0;
|
5 |
-
position: relative;
|
6 |
-
vertical-align: middle; }
|
7 |
-
.select2-container .select2-selection--single {
|
8 |
-
box-sizing: border-box;
|
9 |
-
cursor: pointer;
|
10 |
-
display: block;
|
11 |
-
height: 28px;
|
12 |
-
user-select: none;
|
13 |
-
-webkit-user-select: none; }
|
14 |
-
.select2-container .select2-selection--single .select2-selection__rendered {
|
15 |
-
display: block;
|
16 |
-
padding-left: 8px;
|
17 |
-
padding-right: 20px;
|
18 |
-
overflow: hidden;
|
19 |
-
text-overflow: ellipsis;
|
20 |
-
white-space: nowrap; }
|
21 |
-
.select2-container .select2-selection--single .select2-selection__clear {
|
22 |
-
position: relative; }
|
23 |
-
.select2-container[dir="rtl"] .select2-selection--single .select2-selection__rendered {
|
24 |
-
padding-right: 8px;
|
25 |
-
padding-left: 20px; }
|
26 |
-
.select2-container .select2-selection--multiple {
|
27 |
-
box-sizing: border-box;
|
28 |
-
cursor: pointer;
|
29 |
-
display: block;
|
30 |
-
min-height: 32px;
|
31 |
-
user-select: none;
|
32 |
-
-webkit-user-select: none; }
|
33 |
-
.select2-container .select2-selection--multiple .select2-selection__rendered {
|
34 |
-
display: inline-block;
|
35 |
-
overflow: hidden;
|
36 |
-
padding-left: 8px;
|
37 |
-
text-overflow: ellipsis;
|
38 |
-
white-space: nowrap; }
|
39 |
-
.select2-container .select2-search--inline {
|
40 |
-
float: left; }
|
41 |
-
.select2-container .select2-search--inline .select2-search__field {
|
42 |
-
box-sizing: border-box;
|
43 |
-
border: none;
|
44 |
-
font-size: 100%;
|
45 |
-
margin-top: 5px;
|
46 |
-
padding: 0; }
|
47 |
-
.select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button {
|
48 |
-
-webkit-appearance: none; }
|
49 |
-
|
50 |
-
.select2-dropdown {
|
51 |
-
background-color:
|
52 |
-
border: 1px solid #
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
border-bottom:
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
border-top:
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
clip:
|
123 |
-
height: 1px !important;
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
.select2-container--default .select2-selection--single {
|
131 |
-
background-color: #fff;
|
132 |
-
border: 1px solid #
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
border-
|
152 |
-
border-
|
153 |
-
|
154 |
-
|
155 |
-
left:
|
156 |
-
margin-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
border-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
border:
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
.select2-container--default .select2-selection--multiple .select2-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
margin-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
.select2-container--default .select2-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
.select2-container--default .select2-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
.select2-container--default .select2-results__option
|
277 |
-
|
278 |
-
|
279 |
-
.select2-container--default .select2-results__option .select2-results__option {
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
background-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
.select2-container--classic
|
364 |
-
border:
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
.select2-container--classic.select2-container--open .select2-selection--single {
|
373 |
-
border:
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
border-
|
384 |
-
border-
|
385 |
-
|
386 |
-
background-image: -
|
387 |
-
background-image: linear-gradient(
|
388 |
-
background-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
border
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
border:
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
margin:
|
414 |
-
padding: 0 5px; }
|
415 |
-
.select2-container--classic .select2-selection--multiple .select2-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
border-bottom
|
460 |
-
|
461 |
-
.select2-container--classic .select2-
|
462 |
-
border:
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
.select2-container--classic .select2-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
padding: 0; }
|
486 |
-
|
487 |
-
.select2-container--classic .select2-results__option[aria-disabled=true] {
|
488 |
-
color: grey; }
|
489 |
-
|
490 |
-
.select2-container--classic .select2-results__option--highlighted[aria-selected] {
|
491 |
-
background-color: #5897fb;
|
492 |
-
color: #fff; }
|
493 |
-
|
494 |
-
.select2-container--classic .select2-results__group {
|
495 |
-
cursor: default;
|
496 |
-
display: block;
|
497 |
-
padding: 6px; }
|
498 |
-
|
499 |
-
.select2-container--classic.select2-container--open .select2-dropdown {
|
500 |
-
border-color: #5897fb; }
|
1 |
+
.select2-container {
|
2 |
+
box-sizing: border-box;
|
3 |
+
display: inline-block;
|
4 |
+
margin: 0;
|
5 |
+
position: relative;
|
6 |
+
vertical-align: middle; }
|
7 |
+
.select2-container .select2-selection--single {
|
8 |
+
box-sizing: border-box;
|
9 |
+
cursor: pointer;
|
10 |
+
display: block;
|
11 |
+
height: 28px;
|
12 |
+
user-select: none;
|
13 |
+
-webkit-user-select: none; }
|
14 |
+
.select2-container .select2-selection--single .select2-selection__rendered {
|
15 |
+
display: block;
|
16 |
+
padding-left: 8px;
|
17 |
+
padding-right: 20px;
|
18 |
+
overflow: hidden;
|
19 |
+
text-overflow: ellipsis;
|
20 |
+
white-space: nowrap; }
|
21 |
+
.select2-container .select2-selection--single .select2-selection__clear {
|
22 |
+
position: relative; }
|
23 |
+
.select2-container[dir="rtl"] .select2-selection--single .select2-selection__rendered {
|
24 |
+
padding-right: 8px;
|
25 |
+
padding-left: 20px; }
|
26 |
+
.select2-container .select2-selection--multiple {
|
27 |
+
box-sizing: border-box;
|
28 |
+
cursor: pointer;
|
29 |
+
display: block;
|
30 |
+
min-height: 32px;
|
31 |
+
user-select: none;
|
32 |
+
-webkit-user-select: none; }
|
33 |
+
.select2-container .select2-selection--multiple .select2-selection__rendered {
|
34 |
+
display: inline-block;
|
35 |
+
overflow: hidden;
|
36 |
+
padding-left: 8px;
|
37 |
+
text-overflow: ellipsis;
|
38 |
+
white-space: nowrap; }
|
39 |
+
.select2-container .select2-search--inline {
|
40 |
+
float: left; }
|
41 |
+
.select2-container .select2-search--inline .select2-search__field {
|
42 |
+
box-sizing: border-box;
|
43 |
+
border: none;
|
44 |
+
font-size: 100%;
|
45 |
+
margin-top: 5px;
|
46 |
+
padding: 0; }
|
47 |
+
.select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button {
|
48 |
+
-webkit-appearance: none; }
|
49 |
+
|
50 |
+
.select2-dropdown {
|
51 |
+
background-color: white;
|
52 |
+
border: 1px solid #aaa;
|
53 |
+
border-radius: 4px;
|
54 |
+
box-sizing: border-box;
|
55 |
+
display: block;
|
56 |
+
position: absolute;
|
57 |
+
left: -100000px;
|
58 |
+
width: 100%;
|
59 |
+
z-index: 1051; }
|
60 |
+
|
61 |
+
.select2-results {
|
62 |
+
display: block; }
|
63 |
+
|
64 |
+
.select2-results__options {
|
65 |
+
list-style: none;
|
66 |
+
margin: 0;
|
67 |
+
padding: 0; }
|
68 |
+
|
69 |
+
.select2-results__option {
|
70 |
+
padding: 6px;
|
71 |
+
user-select: none;
|
72 |
+
-webkit-user-select: none; }
|
73 |
+
.select2-results__option[aria-selected] {
|
74 |
+
cursor: pointer; }
|
75 |
+
|
76 |
+
.select2-container--open .select2-dropdown {
|
77 |
+
left: 0; }
|
78 |
+
|
79 |
+
.select2-container--open .select2-dropdown--above {
|
80 |
+
border-bottom: none;
|
81 |
+
border-bottom-left-radius: 0;
|
82 |
+
border-bottom-right-radius: 0; }
|
83 |
+
|
84 |
+
.select2-container--open .select2-dropdown--below {
|
85 |
+
border-top: none;
|
86 |
+
border-top-left-radius: 0;
|
87 |
+
border-top-right-radius: 0; }
|
88 |
+
|
89 |
+
.select2-search--dropdown {
|
90 |
+
display: block;
|
91 |
+
padding: 4px; }
|
92 |
+
.select2-search--dropdown .select2-search__field {
|
93 |
+
padding: 4px;
|
94 |
+
width: 100%;
|
95 |
+
box-sizing: border-box; }
|
96 |
+
.select2-search--dropdown .select2-search__field::-webkit-search-cancel-button {
|
97 |
+
-webkit-appearance: none; }
|
98 |
+
.select2-search--dropdown.select2-search--hide {
|
99 |
+
display: none; }
|
100 |
+
|
101 |
+
.select2-close-mask {
|
102 |
+
border: 0;
|
103 |
+
margin: 0;
|
104 |
+
padding: 0;
|
105 |
+
display: block;
|
106 |
+
position: fixed;
|
107 |
+
left: 0;
|
108 |
+
top: 0;
|
109 |
+
min-height: 100%;
|
110 |
+
min-width: 100%;
|
111 |
+
height: auto;
|
112 |
+
width: auto;
|
113 |
+
opacity: 0;
|
114 |
+
z-index: 99;
|
115 |
+
background-color: #fff;
|
116 |
+
filter: alpha(opacity=0); }
|
117 |
+
|
118 |
+
.select2-hidden-accessible {
|
119 |
+
border: 0 !important;
|
120 |
+
clip: rect(0 0 0 0) !important;
|
121 |
+
-webkit-clip-path: inset(50%) !important;
|
122 |
+
clip-path: inset(50%) !important;
|
123 |
+
height: 1px !important;
|
124 |
+
overflow: hidden !important;
|
125 |
+
padding: 0 !important;
|
126 |
+
position: absolute !important;
|
127 |
+
width: 1px !important;
|
128 |
+
white-space: nowrap !important; }
|
129 |
+
|
130 |
+
.select2-container--default .select2-selection--single {
|
131 |
+
background-color: #fff;
|
132 |
+
border: 1px solid #aaa;
|
133 |
+
border-radius: 4px; }
|
134 |
+
.select2-container--default .select2-selection--single .select2-selection__rendered {
|
135 |
+
color: #444;
|
136 |
+
line-height: 28px; }
|
137 |
+
.select2-container--default .select2-selection--single .select2-selection__clear {
|
138 |
+
cursor: pointer;
|
139 |
+
float: right;
|
140 |
+
font-weight: bold; }
|
141 |
+
.select2-container--default .select2-selection--single .select2-selection__placeholder {
|
142 |
+
color: #999; }
|
143 |
+
.select2-container--default .select2-selection--single .select2-selection__arrow {
|
144 |
+
height: 26px;
|
145 |
+
position: absolute;
|
146 |
+
top: 1px;
|
147 |
+
right: 1px;
|
148 |
+
width: 20px; }
|
149 |
+
.select2-container--default .select2-selection--single .select2-selection__arrow b {
|
150 |
+
border-color: #888 transparent transparent transparent;
|
151 |
+
border-style: solid;
|
152 |
+
border-width: 5px 4px 0 4px;
|
153 |
+
height: 0;
|
154 |
+
left: 50%;
|
155 |
+
margin-left: -4px;
|
156 |
+
margin-top: -2px;
|
157 |
+
position: absolute;
|
158 |
+
top: 50%;
|
159 |
+
width: 0; }
|
160 |
+
|
161 |
+
.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__clear {
|
162 |
+
float: left; }
|
163 |
+
|
164 |
+
.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__arrow {
|
165 |
+
left: 1px;
|
166 |
+
right: auto; }
|
167 |
+
|
168 |
+
.select2-container--default.select2-container--disabled .select2-selection--single {
|
169 |
+
background-color: #eee;
|
170 |
+
cursor: default; }
|
171 |
+
.select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear {
|
172 |
+
display: none; }
|
173 |
+
|
174 |
+
.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
|
175 |
+
border-color: transparent transparent #888 transparent;
|
176 |
+
border-width: 0 4px 5px 4px; }
|
177 |
+
|
178 |
+
.select2-container--default .select2-selection--multiple {
|
179 |
+
background-color: white;
|
180 |
+
border: 1px solid #aaa;
|
181 |
+
border-radius: 4px;
|
182 |
+
cursor: text; }
|
183 |
+
.select2-container--default .select2-selection--multiple .select2-selection__rendered {
|
184 |
+
box-sizing: border-box;
|
185 |
+
list-style: none;
|
186 |
+
margin: 0;
|
187 |
+
padding: 0 5px;
|
188 |
+
width: 100%; }
|
189 |
+
.select2-container--default .select2-selection--multiple .select2-selection__rendered li {
|
190 |
+
list-style: none; }
|
191 |
+
.select2-container--default .select2-selection--multiple .select2-selection__placeholder {
|
192 |
+
color: #999;
|
193 |
+
margin-top: 5px;
|
194 |
+
float: left; }
|
195 |
+
.select2-container--default .select2-selection--multiple .select2-selection__clear {
|
196 |
+
cursor: pointer;
|
197 |
+
float: right;
|
198 |
+
font-weight: bold;
|
199 |
+
margin-top: 5px;
|
200 |
+
margin-right: 10px; }
|
201 |
+
.select2-container--default .select2-selection--multiple .select2-selection__choice {
|
202 |
+
background-color: #e4e4e4;
|
203 |
+
border: 1px solid #aaa;
|
204 |
+
border-radius: 4px;
|
205 |
+
cursor: default;
|
206 |
+
float: left;
|
207 |
+
margin-right: 5px;
|
208 |
+
margin-top: 5px;
|
209 |
+
padding: 0 5px; }
|
210 |
+
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
|
211 |
+
color: #999;
|
212 |
+
cursor: pointer;
|
213 |
+
display: inline-block;
|
214 |
+
font-weight: bold;
|
215 |
+
margin-right: 2px; }
|
216 |
+
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
|
217 |
+
color: #333; }
|
218 |
+
|
219 |
+
.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice, .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__placeholder, .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-search--inline {
|
220 |
+
float: right; }
|
221 |
+
|
222 |
+
.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
|
223 |
+
margin-left: 5px;
|
224 |
+
margin-right: auto; }
|
225 |
+
|
226 |
+
.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove {
|
227 |
+
margin-left: 2px;
|
228 |
+
margin-right: auto; }
|
229 |
+
|
230 |
+
.select2-container--default.select2-container--focus .select2-selection--multiple {
|
231 |
+
border: solid black 1px;
|
232 |
+
outline: 0; }
|
233 |
+
|
234 |
+
.select2-container--default.select2-container--disabled .select2-selection--multiple {
|
235 |
+
background-color: #eee;
|
236 |
+
cursor: default; }
|
237 |
+
|
238 |
+
.select2-container--default.select2-container--disabled .select2-selection__choice__remove {
|
239 |
+
display: none; }
|
240 |
+
|
241 |
+
.select2-container--default.select2-container--open.select2-container--above .select2-selection--single, .select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple {
|
242 |
+
border-top-left-radius: 0;
|
243 |
+
border-top-right-radius: 0; }
|
244 |
+
|
245 |
+
.select2-container--default.select2-container--open.select2-container--below .select2-selection--single, .select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple {
|
246 |
+
border-bottom-left-radius: 0;
|
247 |
+
border-bottom-right-radius: 0; }
|
248 |
+
|
249 |
+
.select2-container--default .select2-search--dropdown .select2-search__field {
|
250 |
+
border: 1px solid #aaa; }
|
251 |
+
|
252 |
+
.select2-container--default .select2-search--inline .select2-search__field {
|
253 |
+
background: transparent;
|
254 |
+
border: none;
|
255 |
+
outline: 0;
|
256 |
+
box-shadow: none;
|
257 |
+
-webkit-appearance: textfield; }
|
258 |
+
|
259 |
+
.select2-container--default .select2-results > .select2-results__options {
|
260 |
+
max-height: 200px;
|
261 |
+
overflow-y: auto; }
|
262 |
+
|
263 |
+
.select2-container--default .select2-results__option[role=group] {
|
264 |
+
padding: 0; }
|
265 |
+
|
266 |
+
.select2-container--default .select2-results__option[aria-disabled=true] {
|
267 |
+
color: #999; }
|
268 |
+
|
269 |
+
.select2-container--default .select2-results__option[aria-selected=true] {
|
270 |
+
background-color: #ddd; }
|
271 |
+
|
272 |
+
.select2-container--default .select2-results__option .select2-results__option {
|
273 |
+
padding-left: 1em; }
|
274 |
+
.select2-container--default .select2-results__option .select2-results__option .select2-results__group {
|
275 |
+
padding-left: 0; }
|
276 |
+
.select2-container--default .select2-results__option .select2-results__option .select2-results__option {
|
277 |
+
margin-left: -1em;
|
278 |
+
padding-left: 2em; }
|
279 |
+
.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
|
280 |
+
margin-left: -2em;
|
281 |
+
padding-left: 3em; }
|
282 |
+
.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
|
283 |
+
margin-left: -3em;
|
284 |
+
padding-left: 4em; }
|
285 |
+
.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
|
286 |
+
margin-left: -4em;
|
287 |
+
padding-left: 5em; }
|
288 |
+
.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
|
289 |
+
margin-left: -5em;
|
290 |
+
padding-left: 6em; }
|
291 |
+
|
292 |
+
.select2-container--default .select2-results__option--highlighted[aria-selected] {
|
293 |
+
background-color: #5897fb;
|
294 |
+
color: white; }
|
295 |
+
|
296 |
+
.select2-container--default .select2-results__group {
|
297 |
+
cursor: default;
|
298 |
+
display: block;
|
299 |
+
padding: 6px; }
|
300 |
+
|
301 |
+
.select2-container--classic .select2-selection--single {
|
302 |
+
background-color: #f7f7f7;
|
303 |
+
border: 1px solid #aaa;
|
304 |
+
border-radius: 4px;
|
305 |
+
outline: 0;
|
306 |
+
background-image: -webkit-linear-gradient(top, white 50%, #eeeeee 100%);
|
307 |
+
background-image: -o-linear-gradient(top, white 50%, #eeeeee 100%);
|
308 |
+
background-image: linear-gradient(to bottom, white 50%, #eeeeee 100%);
|
309 |
+
background-repeat: repeat-x;
|
310 |
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0); }
|
311 |
+
.select2-container--classic .select2-selection--single:focus {
|
312 |
+
border: 1px solid #5897fb; }
|
313 |
+
.select2-container--classic .select2-selection--single .select2-selection__rendered {
|
314 |
+
color: #444;
|
315 |
+
line-height: 28px; }
|
316 |
+
.select2-container--classic .select2-selection--single .select2-selection__clear {
|
317 |
+
cursor: pointer;
|
318 |
+
float: right;
|
319 |
+
font-weight: bold;
|
320 |
+
margin-right: 10px; }
|
321 |
+
.select2-container--classic .select2-selection--single .select2-selection__placeholder {
|
322 |
+
color: #999; }
|
323 |
+
.select2-container--classic .select2-selection--single .select2-selection__arrow {
|
324 |
+
background-color: #ddd;
|
325 |
+
border: none;
|
326 |
+
border-left: 1px solid #aaa;
|
327 |
+
border-top-right-radius: 4px;
|
328 |
+
border-bottom-right-radius: 4px;
|
329 |
+
height: 26px;
|
330 |
+
position: absolute;
|
331 |
+
top: 1px;
|
332 |
+
right: 1px;
|
333 |
+
width: 20px;
|
334 |
+
background-image: -webkit-linear-gradient(top, #eeeeee 50%, #cccccc 100%);
|
335 |
+
background-image: -o-linear-gradient(top, #eeeeee 50%, #cccccc 100%);
|
336 |
+
background-image: linear-gradient(to bottom, #eeeeee 50%, #cccccc 100%);
|
337 |
+
background-repeat: repeat-x;
|
338 |
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFCCCCCC', GradientType=0); }
|
339 |
+
.select2-container--classic .select2-selection--single .select2-selection__arrow b {
|
340 |
+
border-color: #888 transparent transparent transparent;
|
341 |
+
border-style: solid;
|
342 |
+
border-width: 5px 4px 0 4px;
|
343 |
+
height: 0;
|
344 |
+
left: 50%;
|
345 |
+
margin-left: -4px;
|
346 |
+
margin-top: -2px;
|
347 |
+
position: absolute;
|
348 |
+
top: 50%;
|
349 |
+
width: 0; }
|
350 |
+
|
351 |
+
.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__clear {
|
352 |
+
float: left; }
|
353 |
+
|
354 |
+
.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__arrow {
|
355 |
+
border: none;
|
356 |
+
border-right: 1px solid #aaa;
|
357 |
+
border-radius: 0;
|
358 |
+
border-top-left-radius: 4px;
|
359 |
+
border-bottom-left-radius: 4px;
|
360 |
+
left: 1px;
|
361 |
+
right: auto; }
|
362 |
+
|
363 |
+
.select2-container--classic.select2-container--open .select2-selection--single {
|
364 |
+
border: 1px solid #5897fb; }
|
365 |
+
.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow {
|
366 |
+
background: transparent;
|
367 |
+
border: none; }
|
368 |
+
.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow b {
|
369 |
+
border-color: transparent transparent #888 transparent;
|
370 |
+
border-width: 0 4px 5px 4px; }
|
371 |
+
|
372 |
+
.select2-container--classic.select2-container--open.select2-container--above .select2-selection--single {
|
373 |
+
border-top: none;
|
374 |
+
border-top-left-radius: 0;
|
375 |
+
border-top-right-radius: 0;
|
376 |
+
background-image: -webkit-linear-gradient(top, white 0%, #eeeeee 50%);
|
377 |
+
background-image: -o-linear-gradient(top, white 0%, #eeeeee 50%);
|
378 |
+
background-image: linear-gradient(to bottom, white 0%, #eeeeee 50%);
|
379 |
+
background-repeat: repeat-x;
|
380 |
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0); }
|
381 |
+
|
382 |
+
.select2-container--classic.select2-container--open.select2-container--below .select2-selection--single {
|
383 |
+
border-bottom: none;
|
384 |
+
border-bottom-left-radius: 0;
|
385 |
+
border-bottom-right-radius: 0;
|
386 |
+
background-image: -webkit-linear-gradient(top, #eeeeee 50%, white 100%);
|
387 |
+
background-image: -o-linear-gradient(top, #eeeeee 50%, white 100%);
|
388 |
+
background-image: linear-gradient(to bottom, #eeeeee 50%, white 100%);
|
389 |
+
background-repeat: repeat-x;
|
390 |
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFFFFFFF', GradientType=0); }
|
391 |
+
|
392 |
+
.select2-container--classic .select2-selection--multiple {
|
393 |
+
background-color: white;
|
394 |
+
border: 1px solid #aaa;
|
395 |
+
border-radius: 4px;
|
396 |
+
cursor: text;
|
397 |
+
outline: 0; }
|
398 |
+
.select2-container--classic .select2-selection--multiple:focus {
|
399 |
+
border: 1px solid #5897fb; }
|
400 |
+
.select2-container--classic .select2-selection--multiple .select2-selection__rendered {
|
401 |
+
list-style: none;
|
402 |
+
margin: 0;
|
403 |
+
padding: 0 5px; }
|
404 |
+
.select2-container--classic .select2-selection--multiple .select2-selection__clear {
|
405 |
+
display: none; }
|
406 |
+
.select2-container--classic .select2-selection--multiple .select2-selection__choice {
|
407 |
+
background-color: #e4e4e4;
|
408 |
+
border: 1px solid #aaa;
|
409 |
+
border-radius: 4px;
|
410 |
+
cursor: default;
|
411 |
+
float: left;
|
412 |
+
margin-right: 5px;
|
413 |
+
margin-top: 5px;
|
414 |
+
padding: 0 5px; }
|
415 |
+
.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove {
|
416 |
+
color: #888;
|
417 |
+
cursor: pointer;
|
418 |
+
display: inline-block;
|
419 |
+
font-weight: bold;
|
420 |
+
margin-right: 2px; }
|
421 |
+
.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove:hover {
|
422 |
+
color: #555; }
|
423 |
+
|
424 |
+
.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
|
425 |
+
float: right;
|
426 |
+
margin-left: 5px;
|
427 |
+
margin-right: auto; }
|
428 |
+
|
429 |
+
.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove {
|
430 |
+
margin-left: 2px;
|
431 |
+
margin-right: auto; }
|
432 |
+
|
433 |
+
.select2-container--classic.select2-container--open .select2-selection--multiple {
|
434 |
+
border: 1px solid #5897fb; }
|
435 |
+
|
436 |
+
.select2-container--classic.select2-container--open.select2-container--above .select2-selection--multiple {
|
437 |
+
border-top: none;
|
438 |
+
border-top-left-radius: 0;
|
439 |
+
border-top-right-radius: 0; }
|
440 |
+
|
441 |
+
.select2-container--classic.select2-container--open.select2-container--below .select2-selection--multiple {
|
442 |
+
border-bottom: none;
|
443 |
+
border-bottom-left-radius: 0;
|
444 |
+
border-bottom-right-radius: 0; }
|
445 |
+
|
446 |
+
.select2-container--classic .select2-search--dropdown .select2-search__field {
|
447 |
+
border: 1px solid #aaa;
|
448 |
+
outline: 0; }
|
449 |
+
|
450 |
+
.select2-container--classic .select2-search--inline .select2-search__field {
|
451 |
+
outline: 0;
|
452 |
+
box-shadow: none; }
|
453 |
+
|
454 |
+
.select2-container--classic .select2-dropdown {
|
455 |
+
background-color: white;
|
456 |
+
border: 1px solid transparent; }
|
457 |
+
|
458 |
+
.select2-container--classic .select2-dropdown--above {
|
459 |
+
border-bottom: none; }
|
460 |
+
|
461 |
+
.select2-container--classic .select2-dropdown--below {
|
462 |
+
border-top: none; }
|
463 |
+
|
464 |
+
.select2-container--classic .select2-results > .select2-results__options {
|
465 |
+
max-height: 200px;
|
466 |
+
overflow-y: auto; }
|
467 |
+
|
468 |
+
.select2-container--classic .select2-results__option[role=group] {
|
469 |
+
padding: 0; }
|
470 |
+
|
471 |
+
.select2-container--classic .select2-results__option[aria-disabled=true] {
|
472 |
+
color: grey; }
|
473 |
+
|
474 |
+
.select2-container--classic .select2-results__option--highlighted[aria-selected] {
|
475 |
+
background-color: #3875d7;
|
476 |
+
color: white; }
|
477 |
+
|
478 |
+
.select2-container--classic .select2-results__group {
|
479 |
+
cursor: default;
|
480 |
+
display: block;
|
481 |
+
padding: 6px; }
|
482 |
+
|
483 |
+
.select2-container--classic.select2-container--open .select2-dropdown {
|
484 |
+
border-color: #5897fb; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/select2/{js/select2.js → select2.full.js}
RENAMED
@@ -1,5833 +1,6559 @@
|
|
1 |
-
/*!
|
2 |
-
* Select2 4.0.6-rc.
|
3 |
-
* https://select2.github.io
|
4 |
-
*
|
5 |
-
* Released under the MIT license
|
6 |
-
* https://github.com/select2/select2/blob/master/LICENSE.md
|
7 |
-
*/
|
8 |
-
;(function (factory) {
|
9 |
-
if (typeof define === 'function' && define.amd) {
|
10 |
-
// AMD. Register as an anonymous module.
|
11 |
-
define(['jquery'], factory);
|
12 |
-
} else if (typeof module === 'object' && module.exports) {
|
13 |
-
// Node/CommonJS
|
14 |
-
module.exports = function (root, jQuery) {
|
15 |
-
if (jQuery === undefined) {
|
16 |
-
// require('jQuery') returns a factory that requires window to
|
17 |
-
// build a jQuery instance, we normalize how we use modules
|
18 |
-
// that require this pattern but the window provided is a noop
|
19 |
-
// if it's defined (how jquery works)
|
20 |
-
if (typeof window !== 'undefined') {
|
21 |
-
jQuery = require('jquery');
|
22 |
-
}
|
23 |
-
else {
|
24 |
-
jQuery = require('jquery')(root);
|
25 |
-
}
|
26 |
-
}
|
27 |
-
factory(jQuery);
|
28 |
-
return jQuery;
|
29 |
-
};
|
30 |
-
} else {
|
31 |
-
// Browser globals
|
32 |
-
factory(jQuery);
|
33 |
-
}
|
34 |
-
} (function (jQuery) {
|
35 |
-
// This is needed so we can catch the AMD loader configuration and use it
|
36 |
-
// The inner file should be wrapped (by `banner.start.js`) in a function that
|
37 |
-
// returns the AMD loader references.
|
38 |
-
var S2 =(function () {
|
39 |
-
// Restore the Select2 AMD loader so it can be used
|
40 |
-
// Needed mostly in the language files, where the loader is not inserted
|
41 |
-
if (jQuery && jQuery.fn && jQuery.fn.select2 && jQuery.fn.select2.amd) {
|
42 |
-
var S2 = jQuery.fn.select2.amd;
|
43 |
-
}
|
44 |
-
var S2;(function () { if (!S2 || !S2.requirejs) {
|
45 |
-
if (!S2) { S2 = {}; } else { require = S2; }
|
46 |
-
/**
|
47 |
-
* @license almond 0.3.3 Copyright jQuery Foundation and other contributors.
|
48 |
-
* Released under MIT license, http://github.com/requirejs/almond/LICENSE
|
49 |
-
*/
|
50 |
-
//Going sloppy to avoid 'use strict' string cost, but strict practices should
|
51 |
-
//be followed.
|
52 |
-
/*global setTimeout: false */
|
53 |
-
|
54 |
-
var requirejs, require, define;
|
55 |
-
(function (undef) {
|
56 |
-
var main, req, makeMap, handlers,
|
57 |
-
defined = {},
|
58 |
-
waiting = {},
|
59 |
-
config = {},
|
60 |
-
defining = {},
|
61 |
-
hasOwn = Object.prototype.hasOwnProperty,
|
62 |
-
aps = [].slice,
|
63 |
-
jsSuffixRegExp = /\.js$/;
|
64 |
-
|
65 |
-
function hasProp(obj, prop) {
|
66 |
-
return hasOwn.call(obj, prop);
|
67 |
-
}
|
68 |
-
|
69 |
-
/**
|
70 |
-
* Given a relative module name, like ./something, normalize it to
|
71 |
-
* a real name that can be mapped to a path.
|
72 |
-
* @param {String} name the relative name
|
73 |
-
* @param {String} baseName a real name that the name arg is relative
|
74 |
-
* to.
|
75 |
-
* @returns {String} normalized name
|
76 |
-
*/
|
77 |
-
function normalize(name, baseName) {
|
78 |
-
var nameParts, nameSegment, mapValue, foundMap, lastIndex,
|
79 |
-
foundI, foundStarMap, starI, i, j, part, normalizedBaseParts,
|
80 |
-
baseParts = baseName && baseName.split("/"),
|
81 |
-
map = config.map,
|
82 |
-
starMap = (map && map['*']) || {};
|
83 |
-
|
84 |
-
//Adjust any relative paths.
|
85 |
-
if (name) {
|
86 |
-
name = name.split('/');
|
87 |
-
lastIndex = name.length - 1;
|
88 |
-
|
89 |
-
// If wanting node ID compatibility, strip .js from end
|
90 |
-
// of IDs. Have to do this here, and not in nameToUrl
|
91 |
-
// because node allows either .js or non .js to map
|
92 |
-
// to same file.
|
93 |
-
if (config.nodeIdCompat && jsSuffixRegExp.test(name[lastIndex])) {
|
94 |
-
name[lastIndex] = name[lastIndex].replace(jsSuffixRegExp, '');
|
95 |
-
}
|
96 |
-
|
97 |
-
// Starts with a '.' so need the baseName
|
98 |
-
if (name[0].charAt(0) === '.' && baseParts) {
|
99 |
-
//Convert baseName to array, and lop off the last part,
|
100 |
-
//so that . matches that 'directory' and not name of the baseName's
|
101 |
-
//module. For instance, baseName of 'one/two/three', maps to
|
102 |
-
//'one/two/three.js', but we want the directory, 'one/two' for
|
103 |
-
//this normalization.
|
104 |
-
normalizedBaseParts = baseParts.slice(0, baseParts.length - 1);
|
105 |
-
name = normalizedBaseParts.concat(name);
|
106 |
-
}
|
107 |
-
|
108 |
-
//start trimDots
|
109 |
-
for (i = 0; i < name.length; i++) {
|
110 |
-
part = name[i];
|
111 |
-
if (part === '.') {
|
112 |
-
name.splice(i, 1);
|
113 |
-
i -= 1;
|
114 |
-
} else if (part === '..') {
|
115 |
-
// If at the start, or previous value is still ..,
|
116 |
-
// keep them so that when converted to a path it may
|
117 |
-
// still work when converted to a path, even though
|
118 |
-
// as an ID it is less than ideal. In larger point
|
119 |
-
// releases, may be better to just kick out an error.
|
120 |
-
if (i === 0 || (i === 1 && name[2] === '..') || name[i - 1] === '..') {
|
121 |
-
continue;
|
122 |
-
} else if (i > 0) {
|
123 |
-
name.splice(i - 1, 2);
|
124 |
-
i -= 2;
|
125 |
-
}
|
126 |
-
}
|
127 |
-
}
|
128 |
-
//end trimDots
|
129 |
-
|
130 |
-
name = name.join('/');
|
131 |
-
}
|
132 |
-
|
133 |
-
//Apply map config if available.
|
134 |
-
if ((baseParts || starMap) && map) {
|
135 |
-
nameParts = name.split('/');
|
136 |
-
|
137 |
-
for (i = nameParts.length; i > 0; i -= 1) {
|
138 |
-
nameSegment = nameParts.slice(0, i).join("/");
|
139 |
-
|
140 |
-
if (baseParts) {
|
141 |
-
//Find the longest baseName segment match in the config.
|
142 |
-
//So, do joins on the biggest to smallest lengths of baseParts.
|
143 |
-
for (j = baseParts.length; j > 0; j -= 1) {
|
144 |
-
mapValue = map[baseParts.slice(0, j).join('/')];
|
145 |
-
|
146 |
-
//baseName segment has config, find if it has one for
|
147 |
-
//this name.
|
148 |
-
if (mapValue) {
|
149 |
-
mapValue = mapValue[nameSegment];
|
150 |
-
if (mapValue) {
|
151 |
-
//Match, update name to the new value.
|
152 |
-
foundMap = mapValue;
|
153 |
-
foundI = i;
|
154 |
-
break;
|
155 |
-
}
|
156 |
-
}
|
157 |
-
}
|
158 |
-
}
|
159 |
-
|
160 |
-
if (foundMap) {
|
161 |
-
break;
|
162 |
-
}
|
163 |
-
|
164 |
-
//Check for a star map match, but just hold on to it,
|
165 |
-
//if there is a shorter segment match later in a matching
|
166 |
-
//config, then favor over this star map.
|
167 |
-
if (!foundStarMap && starMap && starMap[nameSegment]) {
|
168 |
-
foundStarMap = starMap[nameSegment];
|
169 |
-
starI = i;
|
170 |
-
}
|
171 |
-
}
|
172 |
-
|
173 |
-
if (!foundMap && foundStarMap) {
|
174 |
-
foundMap = foundStarMap;
|
175 |
-
foundI = starI;
|
176 |
-
}
|
177 |
-
|
178 |
-
if (foundMap) {
|
179 |
-
nameParts.splice(0, foundI, foundMap);
|
180 |
-
name = nameParts.join('/');
|
181 |
-
}
|
182 |
-
}
|
183 |
-
|
184 |
-
return name;
|
185 |
-
}
|
186 |
-
|
187 |
-
function makeRequire(relName, forceSync) {
|
188 |
-
return function () {
|
189 |
-
//A version of a require function that passes a moduleName
|
190 |
-
//value for items that may need to
|
191 |
-
//look up paths relative to the moduleName
|
192 |
-
var args = aps.call(arguments, 0);
|
193 |
-
|
194 |
-
//If first arg is not require('string'), and there is only
|
195 |
-
//one arg, it is the array form without a callback. Insert
|
196 |
-
//a null so that the following concat is correct.
|
197 |
-
if (typeof args[0] !== 'string' && args.length === 1) {
|
198 |
-
args.push(null);
|
199 |
-
}
|
200 |
-
return req.apply(undef, args.concat([relName, forceSync]));
|
201 |
-
};
|
202 |
-
}
|
203 |
-
|
204 |
-
function makeNormalize(relName) {
|
205 |
-
return function (name) {
|
206 |
-
return normalize(name, relName);
|
207 |
-
};
|
208 |
-
}
|
209 |
-
|
210 |
-
function makeLoad(depName) {
|
211 |
-
return function (value) {
|
212 |
-
defined[depName] = value;
|
213 |
-
};
|
214 |
-
}
|
215 |
-
|
216 |
-
function callDep(name) {
|
217 |
-
if (hasProp(waiting, name)) {
|
218 |
-
var args = waiting[name];
|
219 |
-
delete waiting[name];
|
220 |
-
defining[name] = true;
|
221 |
-
main.apply(undef, args);
|
222 |
-
}
|
223 |
-
|
224 |
-
if (!hasProp(defined, name) && !hasProp(defining, name)) {
|
225 |
-
throw new Error('No ' + name);
|
226 |
-
}
|
227 |
-
return defined[name];
|
228 |
-
}
|
229 |
-
|
230 |
-
//Turns a plugin!resource to [plugin, resource]
|
231 |
-
//with the plugin being undefined if the name
|
232 |
-
//did not have a plugin prefix.
|
233 |
-
function splitPrefix(name) {
|
234 |
-
var prefix,
|
235 |
-
index = name ? name.indexOf('!') : -1;
|
236 |
-
if (index > -1) {
|
237 |
-
prefix = name.substring(0, index);
|
238 |
-
name = name.substring(index + 1, name.length);
|
239 |
-
}
|
240 |
-
return [prefix, name];
|
241 |
-
}
|
242 |
-
|
243 |
-
//Creates a parts array for a relName where first part is plugin ID,
|
244 |
-
//second part is resource ID. Assumes relName has already been normalized.
|
245 |
-
function makeRelParts(relName) {
|
246 |
-
return relName ? splitPrefix(relName) : [];
|
247 |
-
}
|
248 |
-
|
249 |
-
/**
|
250 |
-
* Makes a name map, normalizing the name, and using a plugin
|
251 |
-
* for normalization if necessary. Grabs a ref to plugin
|
252 |
-
* too, as an optimization.
|
253 |
-
*/
|
254 |
-
makeMap = function (name, relParts) {
|
255 |
-
var plugin,
|
256 |
-
parts = splitPrefix(name),
|
257 |
-
prefix = parts[0],
|
258 |
-
relResourceName = relParts[1];
|
259 |
-
|
260 |
-
name = parts[1];
|
261 |
-
|
262 |
-
if (prefix) {
|
263 |
-
prefix = normalize(prefix, relResourceName);
|
264 |
-
plugin = callDep(prefix);
|
265 |
-
}
|
266 |
-
|
267 |
-
//Normalize according
|
268 |
-
if (prefix) {
|
269 |
-
if (plugin && plugin.normalize) {
|
270 |
-
name = plugin.normalize(name, makeNormalize(relResourceName));
|
271 |
-
} else {
|
272 |
-
name = normalize(name, relResourceName);
|
273 |
-
}
|
274 |
-
} else {
|
275 |
-
name = normalize(name, relResourceName);
|
276 |
-
parts = splitPrefix(name);
|
277 |
-
prefix = parts[0];
|
278 |
-
name = parts[1];
|
279 |
-
if (prefix) {
|
280 |
-
plugin = callDep(prefix);
|
281 |
-
}
|
282 |
-
}
|
283 |
-
|
284 |
-
//Using ridiculous property names for space reasons
|
285 |
-
return {
|
286 |
-
f: prefix ? prefix + '!' + name : name, //fullName
|
287 |
-
n: name,
|
288 |
-
pr: prefix,
|
289 |
-
p: plugin
|
290 |
-
};
|
291 |
-
};
|
292 |
-
|
293 |
-
function makeConfig(name) {
|
294 |
-
return function () {
|
295 |
-
return (config && config.config && config.config[name]) || {};
|
296 |
-
};
|
297 |
-
}
|
298 |
-
|
299 |
-
handlers = {
|
300 |
-
require: function (name) {
|
301 |
-
return makeRequire(name);
|
302 |
-
},
|
303 |
-
exports: function (name) {
|
304 |
-
var e = defined[name];
|
305 |
-
if (typeof e !== 'undefined') {
|
306 |
-
return e;
|
307 |
-
} else {
|
308 |
-
return (defined[name] = {});
|
309 |
-
}
|
310 |
-
},
|
311 |
-
module: function (name) {
|
312 |
-
return {
|
313 |
-
id: name,
|
314 |
-
uri: '',
|
315 |
-
exports: defined[name],
|
316 |
-
config: makeConfig(name)
|
317 |
-
};
|
318 |
-
}
|
319 |
-
};
|
320 |
-
|
321 |
-
main = function (name, deps, callback, relName) {
|
322 |
-
var cjsModule, depName, ret, map, i, relParts,
|
323 |
-
args = [],
|
324 |
-
callbackType = typeof callback,
|
325 |
-
usingExports;
|
326 |
-
|
327 |
-
//Use name if no relName
|
328 |
-
relName = relName || name;
|
329 |
-
relParts = makeRelParts(relName);
|
330 |
-
|
331 |
-
//Call the callback to define the module, if necessary.
|
332 |
-
if (callbackType === 'undefined' || callbackType === 'function') {
|
333 |
-
//Pull out the defined dependencies and pass the ordered
|
334 |
-
//values to the callback.
|
335 |
-
//Default to [require, exports, module] if no deps
|
336 |
-
deps = !deps.length && callback.length ? ['require', 'exports', 'module'] : deps;
|
337 |
-
for (i = 0; i < deps.length; i += 1) {
|
338 |
-
map = makeMap(deps[i], relParts);
|
339 |
-
depName = map.f;
|
340 |
-
|
341 |
-
//Fast path CommonJS standard dependencies.
|
342 |
-
if (depName === "require") {
|
343 |
-
args[i] = handlers.require(name);
|
344 |
-
} else if (depName === "exports") {
|
345 |
-
//CommonJS module spec 1.1
|
346 |
-
args[i] = handlers.exports(name);
|
347 |
-
usingExports = true;
|
348 |
-
} else if (depName === "module") {
|
349 |
-
//CommonJS module spec 1.1
|
350 |
-
cjsModule = args[i] = handlers.module(name);
|
351 |
-
} else if (hasProp(defined, depName) ||
|
352 |
-
hasProp(waiting, depName) ||
|
353 |
-
hasProp(defining, depName)) {
|
354 |
-
args[i] = callDep(depName);
|
355 |
-
} else if (map.p) {
|
356 |
-
map.p.load(map.n, makeRequire(relName, true), makeLoad(depName), {});
|
357 |
-
args[i] = defined[depName];
|
358 |
-
} else {
|
359 |
-
throw new Error(name + ' missing ' + depName);
|
360 |
-
}
|
361 |
-
}
|
362 |
-
|
363 |
-
ret = callback ? callback.apply(defined[name], args) : undefined;
|
364 |
-
|
365 |
-
if (name) {
|
366 |
-
//If setting exports via "module" is in play,
|
367 |
-
//favor that over return value and exports. After that,
|
368 |
-
//favor a non-undefined return value over exports use.
|
369 |
-
if (cjsModule && cjsModule.exports !== undef &&
|
370 |
-
cjsModule.exports !== defined[name]) {
|
371 |
-
defined[name] = cjsModule.exports;
|
372 |
-
} else if (ret !== undef || !usingExports) {
|
373 |
-
//Use the return value from the function.
|
374 |
-
defined[name] = ret;
|
375 |
-
}
|
376 |
-
}
|
377 |
-
} else if (name) {
|
378 |
-
//May just be an object definition for the module. Only
|
379 |
-
//worry about defining if have a module name.
|
380 |
-
defined[name] = callback;
|
381 |
-
}
|
382 |
-
};
|
383 |
-
|
384 |
-
requirejs = require = req = function (deps, callback, relName, forceSync, alt) {
|
385 |
-
if (typeof deps === "string") {
|
386 |
-
if (handlers[deps]) {
|
387 |
-
//callback in this case is really relName
|
388 |
-
return handlers[deps](callback);
|
389 |
-
}
|
390 |
-
//Just return the module wanted. In this scenario, the
|
391 |
-
//deps arg is the module name, and second arg (if passed)
|
392 |
-
//is just the relName.
|
393 |
-
//Normalize module name, if it contains . or ..
|
394 |
-
return callDep(makeMap(deps, makeRelParts(callback)).f);
|
395 |
-
} else if (!deps.splice) {
|
396 |
-
//deps is a config object, not an array.
|
397 |
-
config = deps;
|
398 |
-
if (config.deps) {
|
399 |
-
req(config.deps, config.callback);
|
400 |
-
}
|
401 |
-
if (!callback) {
|
402 |
-
return;
|
403 |
-
}
|
404 |
-
|
405 |
-
if (callback.splice) {
|
406 |
-
//callback is an array, which means it is a dependency list.
|
407 |
-
//Adjust args if there are dependencies
|
408 |
-
deps = callback;
|
409 |
-
callback = relName;
|
410 |
-
relName = null;
|
411 |
-
} else {
|
412 |
-
deps = undef;
|
413 |
-
}
|
414 |
-
}
|
415 |
-
|
416 |
-
//Support require(['a'])
|
417 |
-
callback = callback || function () {};
|
418 |
-
|
419 |
-
//If relName is a function, it is an errback handler,
|
420 |
-
//so remove it.
|
421 |
-
if (typeof relName === 'function') {
|
422 |
-
relName = forceSync;
|
423 |
-
forceSync = alt;
|
424 |
-
}
|
425 |
-
|
426 |
-
//Simulate async callback;
|
427 |
-
if (forceSync) {
|
428 |
-
main(undef, deps, callback, relName);
|
429 |
-
} else {
|
430 |
-
//Using a non-zero value because of concern for what old browsers
|
431 |
-
//do, and latest browsers "upgrade" to 4 if lower value is used:
|
432 |
-
//http://www.whatwg.org/specs/web-apps/current-work/multipage/timers.html#dom-windowtimers-settimeout:
|
433 |
-
//If want a value immediately, use require('id') instead -- something
|
434 |
-
//that works in almond on the global level, but not guaranteed and
|
435 |
-
//unlikely to work in other AMD implementations.
|
436 |
-
setTimeout(function () {
|
437 |
-
main(undef, deps, callback, relName);
|
438 |
-
}, 4);
|
439 |
-
}
|
440 |
-
|
441 |
-
return req;
|
442 |
-
};
|
443 |
-
|
444 |
-
/**
|
445 |
-
* Just drops the config on the floor, but returns req in case
|
446 |
-
* the config return value is used.
|
447 |
-
*/
|
448 |
-
req.config = function (cfg) {
|
449 |
-
return req(cfg);
|
450 |
-
};
|
451 |
-
|
452 |
-
/**
|
453 |
-
* Expose module registry for debugging and tooling
|
454 |
-
*/
|
455 |
-
requirejs._defined = defined;
|
456 |
-
|
457 |
-
define = function (name, deps, callback) {
|
458 |
-
if (typeof name !== 'string') {
|
459 |
-
throw new Error('See almond README: incorrect module build, no module name');
|
460 |
-
}
|
461 |
-
|
462 |
-
//This module may not have dependencies
|
463 |
-
if (!deps.splice) {
|
464 |
-
//deps is not an array, so probably means
|
465 |
-
//an object literal or factory function for
|
466 |
-
//the value. Adjust args.
|
467 |
-
callback = deps;
|
468 |
-
deps = [];
|
469 |
-
}
|
470 |
-
|
471 |
-
if (!hasProp(defined, name) && !hasProp(waiting, name)) {
|
472 |
-
waiting[name] = [name, deps, callback];
|
473 |
-
}
|
474 |
-
};
|
475 |
-
|
476 |
-
define.amd = {
|
477 |
-
jQuery: true
|
478 |
-
};
|
479 |
-
}());
|
480 |
-
|
481 |
-
S2.requirejs = requirejs;S2.require = require;S2.define = define;
|
482 |
-
}
|
483 |
-
}());
|
484 |
-
S2.define("almond", function(){});
|
485 |
-
|
486 |
-
/* global jQuery:false, $:false */
|
487 |
-
S2.define('jquery',[],function () {
|
488 |
-
var _$ = jQuery || $;
|
489 |
-
|
490 |
-
if (_$ == null && console && console.error) {
|
491 |
-
console.error(
|
492 |
-
'Select2: An instance of jQuery or a jQuery-compatible library was not ' +
|
493 |
-
'found. Make sure that you are including jQuery before Select2 on your ' +
|
494 |
-
'web page.'
|
495 |
-
);
|
496 |
-
}
|
497 |
-
|
498 |
-
return _$;
|
499 |
-
});
|
500 |
-
|
501 |
-
S2.define('select2/utils',[
|
502 |
-
'jquery'
|
503 |
-
], function ($) {
|
504 |
-
var Utils = {};
|
505 |
-
|
506 |
-
Utils.Extend = function (ChildClass, SuperClass) {
|
507 |
-
var __hasProp = {}.hasOwnProperty;
|
508 |
-
|
509 |
-
function BaseConstructor () {
|
510 |
-
this.constructor = ChildClass;
|
511 |
-
}
|
512 |
-
|
513 |
-
for (var key in SuperClass) {
|
514 |
-
if (__hasProp.call(SuperClass, key)) {
|
515 |
-
ChildClass[key] = SuperClass[key];
|
516 |
-
}
|
517 |
-
}
|
518 |
-
|
519 |
-
BaseConstructor.prototype = SuperClass.prototype;
|
520 |
-
ChildClass.prototype = new BaseConstructor();
|
521 |
-
ChildClass.__super__ = SuperClass.prototype;
|
522 |
-
|
523 |
-
return ChildClass;
|
524 |
-
};
|
525 |
-
|
526 |
-
function getMethods (theClass) {
|
527 |
-
var proto = theClass.prototype;
|
528 |
-
|
529 |
-
var methods = [];
|
530 |
-
|
531 |
-
for (var methodName in proto) {
|
532 |
-
var m = proto[methodName];
|
533 |
-
|
534 |
-
if (typeof m !== 'function') {
|
535 |
-
continue;
|
536 |
-
}
|
537 |
-
|
538 |
-
if (methodName === 'constructor') {
|
539 |
-
continue;
|
540 |
-
}
|
541 |
-
|
542 |
-
methods.push(methodName);
|
543 |
-
}
|
544 |
-
|
545 |
-
return methods;
|
546 |
-
}
|
547 |
-
|
548 |
-
Utils.Decorate = function (SuperClass, DecoratorClass) {
|
549 |
-
var decoratedMethods = getMethods(DecoratorClass);
|
550 |
-
var superMethods = getMethods(SuperClass);
|
551 |
-
|
552 |
-
function DecoratedClass () {
|
553 |
-
var unshift = Array.prototype.unshift;
|
554 |
-
|
555 |
-
var argCount = DecoratorClass.prototype.constructor.length;
|
556 |
-
|
557 |
-
var calledConstructor = SuperClass.prototype.constructor;
|
558 |
-
|
559 |
-
if (argCount > 0) {
|
560 |
-
unshift.call(arguments, SuperClass.prototype.constructor);
|
561 |
-
|
562 |
-
calledConstructor = DecoratorClass.prototype.constructor;
|
563 |
-
}
|
564 |
-
|
565 |
-
calledConstructor.apply(this, arguments);
|
566 |
-
}
|
567 |
-
|
568 |
-
DecoratorClass.displayName = SuperClass.displayName;
|
569 |
-
|
570 |
-
function ctr () {
|
571 |
-
this.constructor = DecoratedClass;
|
572 |
-
}
|
573 |
-
|
574 |
-
DecoratedClass.prototype = new ctr();
|
575 |
-
|
576 |
-
for (var m = 0; m < superMethods.length; m++) {
|
577 |
-
var superMethod = superMethods[m];
|
578 |
-
|
579 |
-
DecoratedClass.prototype[superMethod] =
|
580 |
-
SuperClass.prototype[superMethod];
|
581 |
-
}
|
582 |
-
|
583 |
-
var calledMethod = function (methodName) {
|
584 |
-
// Stub out the original method if it's not decorating an actual method
|
585 |
-
var originalMethod = function () {};
|
586 |
-
|
587 |
-
if (methodName in DecoratedClass.prototype) {
|
588 |
-
originalMethod = DecoratedClass.prototype[methodName];
|
589 |
-
}
|
590 |
-
|
591 |
-
var decoratedMethod = DecoratorClass.prototype[methodName];
|
592 |
-
|
593 |
-
return function () {
|
594 |
-
var unshift = Array.prototype.unshift;
|
595 |
-
|
596 |
-
unshift.call(arguments, originalMethod);
|
597 |
-
|
598 |
-
return decoratedMethod.apply(this, arguments);
|
599 |
-
};
|
600 |
-
};
|
601 |
-
|
602 |
-
for (var d = 0; d < decoratedMethods.length; d++) {
|
603 |
-
var decoratedMethod = decoratedMethods[d];
|
604 |
-
|
605 |
-
DecoratedClass.prototype[decoratedMethod] = calledMethod(decoratedMethod);
|
606 |
-
}
|
607 |
-
|
608 |
-
return DecoratedClass;
|
609 |
-
};
|
610 |
-
|
611 |
-
var Observable = function () {
|
612 |
-
this.listeners = {};
|
613 |
-
};
|
614 |
-
|
615 |
-
Observable.prototype.on = function (event, callback) {
|
616 |
-
this.listeners = this.listeners || {};
|
617 |
-
|
618 |
-
if (event in this.listeners) {
|
619 |
-
this.listeners[event].push(callback);
|
620 |
-
} else {
|
621 |
-
this.listeners[event] = [callback];
|
622 |
-
}
|
623 |
-
};
|
624 |
-
|
625 |
-
Observable.prototype.trigger = function (event) {
|
626 |
-
var slice = Array.prototype.slice;
|
627 |
-
var params = slice.call(arguments, 1);
|
628 |
-
|
629 |
-
this.listeners = this.listeners || {};
|
630 |
-
|
631 |
-
// Params should always come in as an array
|
632 |
-
if (params == null) {
|
633 |
-
params = [];
|
634 |
-
}
|
635 |
-
|
636 |
-
// If there are no arguments to the event, use a temporary object
|
637 |
-
if (params.length === 0) {
|
638 |
-
params.push({});
|
639 |
-
}
|
640 |
-
|
641 |
-
// Set the `_type` of the first object to the event
|
642 |
-
params[0]._type = event;
|
643 |
-
|
644 |
-
if (event in this.listeners) {
|
645 |
-
this.invoke(this.listeners[event], slice.call(arguments, 1));
|
646 |
-
}
|
647 |
-
|
648 |
-
if ('*' in this.listeners) {
|
649 |
-
this.invoke(this.listeners['*'], arguments);
|
650 |
-
}
|
651 |
-
};
|
652 |
-
|
653 |
-
Observable.prototype.invoke = function (listeners, params) {
|
654 |
-
for (var i = 0, len = listeners.length; i < len; i++) {
|
655 |
-
listeners[i].apply(this, params);
|
656 |
-
}
|
657 |
-
};
|
658 |
-
|
659 |
-
Utils.Observable = Observable;
|
660 |
-
|
661 |
-
Utils.generateChars = function (length) {
|
662 |
-
var chars = '';
|
663 |
-
|
664 |
-
for (var i = 0; i < length; i++) {
|
665 |
-
var randomChar = Math.floor(Math.random() * 36);
|
666 |
-
chars += randomChar.toString(36);
|
667 |
-
}
|
668 |
-
|
669 |
-
return chars;
|
670 |
-
};
|
671 |
-
|
672 |
-
Utils.bind = function (func, context) {
|
673 |
-
return function () {
|
674 |
-
func.apply(context, arguments);
|
675 |
-
};
|
676 |
-
};
|
677 |
-
|
678 |
-
Utils._convertData = function (data) {
|
679 |
-
for (var originalKey in data) {
|
680 |
-
var keys = originalKey.split('-');
|
681 |
-
|
682 |
-
var dataLevel = data;
|
683 |
-
|
684 |
-
if (keys.length === 1) {
|
685 |
-
continue;
|
686 |
-
}
|
687 |
-
|
688 |
-
for (var k = 0; k < keys.length; k++) {
|
689 |
-
var key = keys[k];
|
690 |
-
|
691 |
-
// Lowercase the first letter
|
692 |
-
// By default, dash-separated becomes camelCase
|
693 |
-
key = key.substring(0, 1).toLowerCase() + key.substring(1);
|
694 |
-
|
695 |
-
if (!(key in dataLevel)) {
|
696 |
-
dataLevel[key] = {};
|
697 |
-
}
|
698 |
-
|
699 |
-
if (k == keys.length - 1) {
|
700 |
-
dataLevel[key] = data[originalKey];
|
701 |
-
}
|
702 |
-
|
703 |
-
dataLevel = dataLevel[key];
|
704 |
-
}
|
705 |
-
|
706 |
-
delete data[originalKey];
|
707 |
-
}
|
708 |
-
|
709 |
-
return data;
|
710 |
-
};
|
711 |
-
|
712 |
-
Utils.hasScroll = function (index, el) {
|
713 |
-
// Adapted from the function created by @ShadowScripter
|
714 |
-
// and adapted by @BillBarry on the Stack Exchange Code Review website.
|
715 |
-
// The original code can be found at
|
716 |
-
// http://codereview.stackexchange.com/q/13338
|
717 |
-
// and was designed to be used with the Sizzle selector engine.
|
718 |
-
|
719 |
-
var $el = $(el);
|
720 |
-
var overflowX = el.style.overflowX;
|
721 |
-
var overflowY = el.style.overflowY;
|
722 |
-
|
723 |
-
//Check both x and y declarations
|
724 |
-
if (overflowX === overflowY &&
|
725 |
-
(overflowY === 'hidden' || overflowY === 'visible')) {
|
726 |
-
return false;
|
727 |
-
}
|
728 |
-
|
729 |
-
if (overflowX === 'scroll' || overflowY === 'scroll') {
|
730 |
-
return true;
|
731 |
-
}
|
732 |
-
|
733 |
-
return ($el.innerHeight() < el.scrollHeight ||
|
734 |
-
$el.innerWidth() < el.scrollWidth);
|
735 |
-
};
|
736 |
-
|
737 |
-
Utils.escapeMarkup = function (markup) {
|
738 |
-
var replaceMap = {
|
739 |
-
'\\': '\',
|
740 |
-
'&': '&',
|
741 |
-
'<': '<',
|
742 |
-
'>': '>',
|
743 |
-
'"': '"',
|
744 |
-
'\'': ''',
|
745 |
-
'/': '/'
|
746 |
-
};
|
747 |
-
|
748 |
-
// Do not try to escape the markup if it's not a string
|
749 |
-
if (typeof markup !== 'string') {
|
750 |
-
return markup;
|
751 |
-
}
|
752 |
-
|
753 |
-
return String(markup).replace(/[&<>"'\/\\]/g, function (match) {
|
754 |
-
return replaceMap[match];
|
755 |
-
});
|
756 |
-
};
|
757 |
-
|
758 |
-
// Append an array of jQuery nodes to a given element.
|
759 |
-
Utils.appendMany = function ($element, $nodes) {
|
760 |
-
// jQuery 1.7.x does not support $.fn.append() with an array
|
761 |
-
// Fall back to a jQuery object collection using $.fn.add()
|
762 |
-
if ($.fn.jquery.substr(0, 3) === '1.7') {
|
763 |
-
var $jqNodes = $();
|
764 |
-
|
765 |
-
$.map($nodes, function (node) {
|
766 |
-
$jqNodes = $jqNodes.add(node);
|
767 |
-
});
|
768 |
-
|
769 |
-
$nodes = $jqNodes;
|
770 |
-
}
|
771 |
-
|
772 |
-
$element.append($nodes);
|
773 |
-
};
|
774 |
-
|
775 |
-
// Cache objects in Utils.__cache instead of $.data (see #4346)
|
776 |
-
Utils.__cache = {};
|
777 |
-
|
778 |
-
var id = 0;
|
779 |
-
Utils.GetUniqueElementId = function (element) {
|
780 |
-
// Get a unique element Id. If element has no id,
|
781 |
-
// creates a new unique number, stores it in the id
|
782 |
-
// attribute and returns the new id.
|
783 |
-
// If an id already exists, it simply returns it.
|
784 |
-
|
785 |
-
var select2Id = element.getAttribute('data-select2-id');
|
786 |
-
if (select2Id == null) {
|
787 |
-
// If element has id, use it.
|
788 |
-
if (element.id) {
|
789 |
-
select2Id = element.id;
|
790 |
-
element.setAttribute('data-select2-id', select2Id);
|
791 |
-
} else {
|
792 |
-
element.setAttribute('data-select2-id', ++id);
|
793 |
-
select2Id = id.toString();
|
794 |
-
}
|
795 |
-
}
|
796 |
-
return select2Id;
|
797 |
-
};
|
798 |
-
|
799 |
-
Utils.StoreData = function (element, name, value) {
|
800 |
-
// Stores an item in the cache for a specified element.
|
801 |
-
// name is the cache key.
|
802 |
-
var id = Utils.GetUniqueElementId(element);
|
803 |
-
if (!Utils.__cache[id]) {
|
804 |
-
Utils.__cache[id] = {};
|
805 |
-
}
|
806 |
-
|
807 |
-
Utils.__cache[id][name] = value;
|
808 |
-
};
|
809 |
-
|
810 |
-
Utils.GetData = function (element, name) {
|
811 |
-
// Retrieves a value from the cache by its key (name)
|
812 |
-
// name is optional. If no name specified, return
|
813 |
-
// all cache items for the specified element.
|
814 |
-
// and for a specified element.
|
815 |
-
var id = Utils.GetUniqueElementId(element);
|
816 |
-
if (name) {
|
817 |
-
if (Utils.__cache[id]) {
|
818 |
-
return Utils.__cache[id][name] != null ?
|
819 |
-
Utils.__cache[id][name]:
|
820 |
-
$(element).data(name); // Fallback to HTML5 data attribs.
|
821 |
-
}
|
822 |
-
return $(element).data(name); // Fallback to HTML5 data attribs.
|
823 |
-
} else {
|
824 |
-
return Utils.__cache[id];
|
825 |
-
}
|
826 |
-
};
|
827 |
-
|
828 |
-
Utils.RemoveData = function (element) {
|
829 |
-
// Removes all cached items for a specified element.
|
830 |
-
var id = Utils.GetUniqueElementId(element);
|
831 |
-
if (Utils.__cache[id] != null) {
|
832 |
-
delete Utils.__cache[id];
|
833 |
-
}
|
834 |
-
};
|
835 |
-
|
836 |
-
return Utils;
|
837 |
-
});
|
838 |
-
|
839 |
-
S2.define('select2/results',[
|
840 |
-
'jquery',
|
841 |
-
'./utils'
|
842 |
-
], function ($, Utils) {
|
843 |
-
function Results ($element, options, dataAdapter) {
|
844 |
-
this.$element = $element;
|
845 |
-
this.data = dataAdapter;
|
846 |
-
this.options = options;
|
847 |
-
|
848 |
-
Results.__super__.constructor.call(this);
|
849 |
-
}
|
850 |
-
|
851 |
-
Utils.Extend(Results, Utils.Observable);
|
852 |
-
|
853 |
-
Results.prototype.render = function () {
|
854 |
-
var $results = $(
|
855 |
-
'<ul class="select2-results__options" role="tree"></ul>'
|
856 |
-
);
|
857 |
-
|
858 |
-
if (this.options.get('multiple')) {
|
859 |
-
$results.attr('aria-multiselectable', 'true');
|
860 |
-
}
|
861 |
-
|
862 |
-
this.$results = $results;
|
863 |
-
|
864 |
-
return $results;
|
865 |
-
};
|
866 |
-
|
867 |
-
Results.prototype.clear = function () {
|
868 |
-
this.$results.empty();
|
869 |
-
};
|
870 |
-
|
871 |
-
Results.prototype.displayMessage = function (params) {
|
872 |
-
var escapeMarkup = this.options.get('escapeMarkup');
|
873 |
-
|
874 |
-
this.clear();
|
875 |
-
this.hideLoading();
|
876 |
-
|
877 |
-
var $message = $(
|
878 |
-
'<li role="treeitem" aria-live="assertive"' +
|
879 |
-
' class="select2-results__option"></li>'
|
880 |
-
);
|
881 |
-
|
882 |
-
var message = this.options.get('translations').get(params.message);
|
883 |
-
|
884 |
-
$message.append(
|
885 |
-
escapeMarkup(
|
886 |
-
message(params.args)
|
887 |
-
)
|
888 |
-
);
|
889 |
-
|
890 |
-
$message[0].className += ' select2-results__message';
|
891 |
-
|
892 |
-
this.$results.append($message);
|
893 |
-
};
|
894 |
-
|
895 |
-
Results.prototype.hideMessages = function () {
|
896 |
-
this.$results.find('.select2-results__message').remove();
|
897 |
-
};
|
898 |
-
|
899 |
-
Results.prototype.append = function (data) {
|
900 |
-
this.hideLoading();
|
901 |
-
|
902 |
-
var $options = [];
|
903 |
-
|
904 |
-
if (data.results == null || data.results.length === 0) {
|
905 |
-
if (this.$results.children().length === 0) {
|
906 |
-
this.trigger('results:message', {
|
907 |
-
message: 'noResults'
|
908 |
-
});
|
909 |
-
}
|
910 |
-
|
911 |
-
return;
|
912 |
-
}
|
913 |
-
|
914 |
-
data.results = this.sort(data.results);
|
915 |
-
|
916 |
-
for (var d = 0; d < data.results.length; d++) {
|
917 |
-
var item = data.results[d];
|
918 |
-
|
919 |
-
var $option = this.option(item);
|
920 |
-
|
921 |
-
$options.push($option);
|
922 |
-
}
|
923 |
-
|
924 |
-
this.$results.append($options);
|
925 |
-
};
|
926 |
-
|
927 |
-
Results.prototype.position = function ($results, $dropdown) {
|
928 |
-
var $resultsContainer = $dropdown.find('.select2-results');
|
929 |
-
$resultsContainer.append($results);
|
930 |
-
};
|
931 |
-
|
932 |
-
Results.prototype.sort = function (data) {
|
933 |
-
var sorter = this.options.get('sorter');
|
934 |
-
|
935 |
-
return sorter(data);
|
936 |
-
};
|
937 |
-
|
938 |
-
Results.prototype.highlightFirstItem = function () {
|
939 |
-
var $options = this.$results
|
940 |
-
.find('.select2-results__option[aria-selected]');
|
941 |
-
|
942 |
-
var $selected = $options.filter('[aria-selected=true]');
|
943 |
-
|
944 |
-
// Check if there are any selected options
|
945 |
-
if ($selected.length > 0) {
|
946 |
-
// If there are selected options, highlight the first
|
947 |
-
$selected.first().trigger('mouseenter');
|
948 |
-
} else {
|
949 |
-
// If there are no selected options, highlight the first option
|
950 |
-
// in the dropdown
|
951 |
-
$options.first().trigger('mouseenter');
|
952 |
-
}
|
953 |
-
|
954 |
-
this.ensureHighlightVisible();
|
955 |
-
};
|
956 |
-
|
957 |
-
Results.prototype.setClasses = function () {
|
958 |
-
var self = this;
|
959 |
-
|
960 |
-
this.data.current(function (selected) {
|
961 |
-
var selectedIds = $.map(selected, function (s) {
|
962 |
-
return s.id.toString();
|
963 |
-
});
|
964 |
-
|
965 |
-
var $options = self.$results
|
966 |
-
.find('.select2-results__option[aria-selected]');
|
967 |
-
|
968 |
-
$options.each(function () {
|
969 |
-
var $option = $(this);
|
970 |
-
|
971 |
-
var item = Utils.GetData(this, 'data');
|
972 |
-
|
973 |
-
// id needs to be converted to a string when comparing
|
974 |
-
var id = '' + item.id;
|
975 |
-
|
976 |
-
if ((item.element != null && item.element.selected) ||
|
977 |
-
(item.element == null && $.inArray(id, selectedIds) > -1)) {
|
978 |
-
$option.attr('aria-selected', 'true');
|
979 |
-
} else {
|
980 |
-
$option.attr('aria-selected', 'false');
|
981 |
-
}
|
982 |
-
});
|
983 |
-
|
984 |
-
});
|
985 |
-
};
|
986 |
-
|
987 |
-
Results.prototype.showLoading = function (params) {
|
988 |
-
this.hideLoading();
|
989 |
-
|
990 |
-
var loadingMore = this.options.get('translations').get('searching');
|
991 |
-
|
992 |
-
var loading = {
|
993 |
-
disabled: true,
|
994 |
-
loading: true,
|
995 |
-
text: loadingMore(params)
|
996 |
-
};
|
997 |
-
var $loading = this.option(loading);
|
998 |
-
$loading.className += ' loading-results';
|
999 |
-
|
1000 |
-
this.$results.prepend($loading);
|
1001 |
-
};
|
1002 |
-
|
1003 |
-
Results.prototype.hideLoading = function () {
|
1004 |
-
this.$results.find('.loading-results').remove();
|
1005 |
-
};
|
1006 |
-
|
1007 |
-
Results.prototype.option = function (data) {
|
1008 |
-
var option = document.createElement('li');
|
1009 |
-
option.className = 'select2-results__option';
|
1010 |
-
|
1011 |
-
var attrs = {
|
1012 |
-
'role': 'treeitem',
|
1013 |
-
'aria-selected': 'false'
|
1014 |
-
};
|
1015 |
-
|
1016 |
-
if (data.disabled) {
|
1017 |
-
delete attrs['aria-selected'];
|
1018 |
-
attrs['aria-disabled'] = 'true';
|
1019 |
-
}
|
1020 |
-
|
1021 |
-
if (data.id == null) {
|
1022 |
-
delete attrs['aria-selected'];
|
1023 |
-
}
|
1024 |
-
|
1025 |
-
if (data._resultId != null) {
|
1026 |
-
option.id = data._resultId;
|
1027 |
-
}
|
1028 |
-
|
1029 |
-
if (data.title) {
|
1030 |
-
option.title = data.title;
|
1031 |
-
}
|
1032 |
-
|
1033 |
-
if (data.children) {
|
1034 |
-
attrs.role = 'group';
|
1035 |
-
attrs['aria-label'] = data.text;
|
1036 |
-
delete attrs['aria-selected'];
|
1037 |
-
}
|
1038 |
-
|
1039 |
-
for (var attr in attrs) {
|
1040 |
-
var val = attrs[attr];
|
1041 |
-
|
1042 |
-
option.setAttribute(attr, val);
|
1043 |
-
}
|
1044 |
-
|
1045 |
-
if (data.children) {
|
1046 |
-
var $option = $(option);
|
1047 |
-
|
1048 |
-
var label = document.createElement('strong');
|
1049 |
-
label.className = 'select2-results__group';
|
1050 |
-
|
1051 |
-
var $label = $(label);
|
1052 |
-
this.template(data, label);
|
1053 |
-
|
1054 |
-
var $children = [];
|
1055 |
-
|
1056 |
-
for (var c = 0; c < data.children.length; c++) {
|
1057 |
-
var child = data.children[c];
|
1058 |
-
|
1059 |
-
var $child = this.option(child);
|
1060 |
-
|
1061 |
-
$children.push($child);
|
1062 |
-
}
|
1063 |
-
|
1064 |
-
var $childrenContainer = $('<ul></ul>', {
|
1065 |
-
'class': 'select2-results__options select2-results__options--nested'
|
1066 |
-
});
|
1067 |
-
|
1068 |
-
$childrenContainer.append($children);
|
1069 |
-
|
1070 |
-
$option.append(label);
|
1071 |
-
$option.append($childrenContainer);
|
1072 |
-
} else {
|
1073 |
-
this.template(data, option);
|
1074 |
-
}
|
1075 |
-
|
1076 |
-
Utils.StoreData(option, 'data', data);
|
1077 |
-
|
1078 |
-
return option;
|
1079 |
-
};
|
1080 |
-
|
1081 |
-
Results.prototype.bind = function (container, $container) {
|
1082 |
-
var self = this;
|
1083 |
-
|
1084 |
-
var id = container.id + '-results';
|
1085 |
-
|
1086 |
-
this.$results.attr('id', id);
|
1087 |
-
|
1088 |
-
container.on('results:all', function (params) {
|
1089 |
-
self.clear();
|
1090 |
-
self.append(params.data);
|
1091 |
-
|
1092 |
-
if (container.isOpen()) {
|
1093 |
-
self.setClasses();
|
1094 |
-
self.highlightFirstItem();
|
1095 |
-
}
|
1096 |
-
});
|
1097 |
-
|
1098 |
-
container.on('results:append', function (params) {
|
1099 |
-
self.append(params.data);
|
1100 |
-
|
1101 |
-
if (container.isOpen()) {
|
1102 |
-
self.setClasses();
|
1103 |
-
}
|
1104 |
-
});
|
1105 |
-
|
1106 |
-
container.on('query', function (params) {
|
1107 |
-
self.hideMessages();
|
1108 |
-
self.showLoading(params);
|
1109 |
-
});
|
1110 |
-
|
1111 |
-
container.on('select', function () {
|
1112 |
-
if (!container.isOpen()) {
|
1113 |
-
return;
|
1114 |
-
}
|
1115 |
-
|
1116 |
-
self.setClasses();
|
1117 |
-
self.highlightFirstItem();
|
1118 |
-
});
|
1119 |
-
|
1120 |
-
container.on('unselect', function () {
|
1121 |
-
if (!container.isOpen()) {
|
1122 |
-
return;
|
1123 |
-
}
|
1124 |
-
|
1125 |
-
self.setClasses();
|
1126 |
-
self.highlightFirstItem();
|
1127 |
-
});
|
1128 |
-
|
1129 |
-
container.on('open', function () {
|
1130 |
-
// When the dropdown is open, aria-expended="true"
|
1131 |
-
self.$results.attr('aria-expanded', 'true');
|
1132 |
-
self.$results.attr('aria-hidden', 'false');
|
1133 |
-
|
1134 |
-
self.setClasses();
|
1135 |
-
self.ensureHighlightVisible();
|
1136 |
-
});
|
1137 |
-
|
1138 |
-
container.on('close', function () {
|
1139 |
-
// When the dropdown is closed, aria-expended="false"
|
1140 |
-
self.$results.attr('aria-expanded', 'false');
|
1141 |
-
self.$results.attr('aria-hidden', 'true');
|
1142 |
-
self.$results.removeAttr('aria-activedescendant');
|
1143 |
-
});
|
1144 |
-
|
1145 |
-
container.on('results:toggle', function () {
|
1146 |
-
var $highlighted = self.getHighlightedResults();
|
1147 |
-
|
1148 |
-
if ($highlighted.length === 0) {
|
1149 |
-
return;
|
1150 |
-
}
|
1151 |
-
|
1152 |
-
$highlighted.trigger('mouseup');
|
1153 |
-
});
|
1154 |
-
|
1155 |
-
container.on('results:select', function () {
|
1156 |
-
var $highlighted = self.getHighlightedResults();
|
1157 |
-
|
1158 |
-
if ($highlighted.length === 0) {
|
1159 |
-
return;
|
1160 |
-
}
|
1161 |
-
|
1162 |
-
var data = Utils.GetData($highlighted[0], 'data');
|
1163 |
-
|
1164 |
-
if ($highlighted.attr('aria-selected') == 'true') {
|
1165 |
-
self.trigger('close', {});
|
1166 |
-
} else {
|
1167 |
-
self.trigger('select', {
|
1168 |
-
data: data
|
1169 |
-
});
|
1170 |
-
}
|
1171 |
-
});
|
1172 |
-
|
1173 |
-
container.on('results:previous', function () {
|
1174 |
-
var $highlighted = self.getHighlightedResults();
|
1175 |
-
|
1176 |
-
var $options = self.$results.find('[aria-selected]');
|
1177 |
-
|
1178 |
-
var currentIndex = $options.index($highlighted);
|
1179 |
-
|
1180 |
-
// If we are already at te top, don't move further
|
1181 |
-
|
1182 |
-
|
1183 |
-
|
1184 |
-
|
1185 |
-
|
1186 |
-
|
1187 |
-
|
1188 |
-
|
1189 |
-
|
1190 |
-
|
1191 |
-
|
1192 |
-
|
1193 |
-
|
1194 |
-
|
1195 |
-
|
1196 |
-
|
1197 |
-
var
|
1198 |
-
var
|
1199 |
-
|
1200 |
-
|
1201 |
-
|
1202 |
-
|
1203 |
-
|
1204 |
-
|
1205 |
-
|
1206 |
-
|
1207 |
-
|
1208 |
-
|
1209 |
-
|
1210 |
-
|
1211 |
-
|
1212 |
-
|
1213 |
-
|
1214 |
-
|
1215 |
-
|
1216 |
-
|
1217 |
-
|
1218 |
-
|
1219 |
-
|
1220 |
-
|
1221 |
-
|
1222 |
-
|
1223 |
-
|
1224 |
-
|
1225 |
-
|
1226 |
-
|
1227 |
-
|
1228 |
-
var
|
1229 |
-
|
1230 |
-
|
1231 |
-
|
1232 |
-
|
1233 |
-
|
1234 |
-
|
1235 |
-
|
1236 |
-
|
1237 |
-
|
1238 |
-
|
1239 |
-
|
1240 |
-
|
1241 |
-
|
1242 |
-
|
1243 |
-
|
1244 |
-
|
1245 |
-
|
1246 |
-
|
1247 |
-
|
1248 |
-
|
1249 |
-
|
1250 |
-
|
1251 |
-
|
1252 |
-
var
|
1253 |
-
|
1254 |
-
|
1255 |
-
|
1256 |
-
|
1257 |
-
|
1258 |
-
e.
|
1259 |
-
|
1260 |
-
|
1261 |
-
|
1262 |
-
|
1263 |
-
|
1264 |
-
|
1265 |
-
e.
|
1266 |
-
|
1267 |
-
|
1268 |
-
|
1269 |
-
|
1270 |
-
|
1271 |
-
|
1272 |
-
|
1273 |
-
|
1274 |
-
|
1275 |
-
|
1276 |
-
|
1277 |
-
|
1278 |
-
|
1279 |
-
|
1280 |
-
|
1281 |
-
|
1282 |
-
|
1283 |
-
|
1284 |
-
|
1285 |
-
|
1286 |
-
|
1287 |
-
|
1288 |
-
|
1289 |
-
|
1290 |
-
|
1291 |
-
|
1292 |
-
|
1293 |
-
|
1294 |
-
|
1295 |
-
|
1296 |
-
|
1297 |
-
|
1298 |
-
|
1299 |
-
|
1300 |
-
|
1301 |
-
|
1302 |
-
|
1303 |
-
|
1304 |
-
|
1305 |
-
|
1306 |
-
|
1307 |
-
|
1308 |
-
|
1309 |
-
|
1310 |
-
|
1311 |
-
|
1312 |
-
|
1313 |
-
|
1314 |
-
|
1315 |
-
|
1316 |
-
|
1317 |
-
|
1318 |
-
|
1319 |
-
|
1320 |
-
|
1321 |
-
|
1322 |
-
|
1323 |
-
|
1324 |
-
|
1325 |
-
|
1326 |
-
|
1327 |
-
|
1328 |
-
|
1329 |
-
|
1330 |
-
|
1331 |
-
|
1332 |
-
var
|
1333 |
-
var
|
1334 |
-
|
1335 |
-
|
1336 |
-
|
1337 |
-
|
1338 |
-
|
1339 |
-
|
1340 |
-
|
1341 |
-
|
1342 |
-
|
1343 |
-
|
1344 |
-
|
1345 |
-
|
1346 |
-
|
1347 |
-
var
|
1348 |
-
|
1349 |
-
|
1350 |
-
|
1351 |
-
|
1352 |
-
|
1353 |
-
|
1354 |
-
|
1355 |
-
|
1356 |
-
|
1357 |
-
|
1358 |
-
|
1359 |
-
|
1360 |
-
|
1361 |
-
|
1362 |
-
|
1363 |
-
|
1364 |
-
|
1365 |
-
|
1366 |
-
|
1367 |
-
|
1368 |
-
|
1369 |
-
|
1370 |
-
|
1371 |
-
|
1372 |
-
|
1373 |
-
|
1374 |
-
|
1375 |
-
|
1376 |
-
|
1377 |
-
|
1378 |
-
|
1379 |
-
|
1380 |
-
|
1381 |
-
|
1382 |
-
|
1383 |
-
|
1384 |
-
|
1385 |
-
|
1386 |
-
|
1387 |
-
|
1388 |
-
|
1389 |
-
|
1390 |
-
|
1391 |
-
'
|
1392 |
-
'../
|
1393 |
-
|
1394 |
-
|
1395 |
-
|
1396 |
-
this
|
1397 |
-
|
1398 |
-
|
1399 |
-
|
1400 |
-
|
1401 |
-
|
1402 |
-
|
1403 |
-
|
1404 |
-
|
1405 |
-
|
1406 |
-
'
|
1407 |
-
'
|
1408 |
-
|
1409 |
-
|
1410 |
-
|
1411 |
-
|
1412 |
-
|
1413 |
-
|
1414 |
-
|
1415 |
-
|
1416 |
-
|
1417 |
-
|
1418 |
-
|
1419 |
-
$selection.attr('
|
1420 |
-
|
1421 |
-
|
1422 |
-
|
1423 |
-
|
1424 |
-
|
1425 |
-
|
1426 |
-
|
1427 |
-
|
1428 |
-
|
1429 |
-
|
1430 |
-
var
|
1431 |
-
|
1432 |
-
|
1433 |
-
|
1434 |
-
|
1435 |
-
|
1436 |
-
|
1437 |
-
|
1438 |
-
|
1439 |
-
|
1440 |
-
|
1441 |
-
|
1442 |
-
|
1443 |
-
|
1444 |
-
|
1445 |
-
|
1446 |
-
|
1447 |
-
|
1448 |
-
|
1449 |
-
|
1450 |
-
|
1451 |
-
|
1452 |
-
|
1453 |
-
|
1454 |
-
|
1455 |
-
|
1456 |
-
|
1457 |
-
|
1458 |
-
|
1459 |
-
|
1460 |
-
|
1461 |
-
self.$selection.attr('aria-
|
1462 |
-
|
1463 |
-
|
1464 |
-
|
1465 |
-
|
1466 |
-
|
1467 |
-
|
1468 |
-
|
1469 |
-
self.$selection.
|
1470 |
-
self.$selection.removeAttr('aria-
|
1471 |
-
|
1472 |
-
|
1473 |
-
|
1474 |
-
|
1475 |
-
|
1476 |
-
|
1477 |
-
|
1478 |
-
self
|
1479 |
-
});
|
1480 |
-
|
1481 |
-
container.on('
|
1482 |
-
self.$selection.attr('tabindex',
|
1483 |
-
});
|
1484 |
-
|
1485 |
-
|
1486 |
-
|
1487 |
-
|
1488 |
-
|
1489 |
-
|
1490 |
-
|
1491 |
-
|
1492 |
-
|
1493 |
-
|
1494 |
-
|
1495 |
-
|
1496 |
-
|
1497 |
-
|
1498 |
-
|
1499 |
-
|
1500 |
-
|
1501 |
-
|
1502 |
-
|
1503 |
-
|
1504 |
-
|
1505 |
-
|
1506 |
-
|
1507 |
-
|
1508 |
-
|
1509 |
-
|
1510 |
-
|
1511 |
-
|
1512 |
-
var $
|
1513 |
-
|
1514 |
-
$
|
1515 |
-
|
1516 |
-
|
1517 |
-
|
1518 |
-
|
1519 |
-
|
1520 |
-
|
1521 |
-
|
1522 |
-
|
1523 |
-
|
1524 |
-
|
1525 |
-
|
1526 |
-
|
1527 |
-
|
1528 |
-
|
1529 |
-
|
1530 |
-
};
|
1531 |
-
|
1532 |
-
BaseSelection.prototype.
|
1533 |
-
|
1534 |
-
|
1535 |
-
|
1536 |
-
|
1537 |
-
|
1538 |
-
|
1539 |
-
};
|
1540 |
-
|
1541 |
-
BaseSelection.prototype.
|
1542 |
-
|
1543 |
-
};
|
1544 |
-
|
1545 |
-
|
1546 |
-
|
1547 |
-
|
1548 |
-
|
1549 |
-
|
1550 |
-
|
1551 |
-
|
1552 |
-
|
1553 |
-
|
1554 |
-
|
1555 |
-
|
1556 |
-
|
1557 |
-
|
1558 |
-
|
1559 |
-
|
1560 |
-
|
1561 |
-
|
1562 |
-
|
1563 |
-
|
1564 |
-
|
1565 |
-
$selection.
|
1566 |
-
|
1567 |
-
|
1568 |
-
|
1569 |
-
|
1570 |
-
|
1571 |
-
|
1572 |
-
|
1573 |
-
|
1574 |
-
|
1575 |
-
|
1576 |
-
|
1577 |
-
|
1578 |
-
|
1579 |
-
|
1580 |
-
var
|
1581 |
-
|
1582 |
-
|
1583 |
-
|
1584 |
-
|
1585 |
-
|
1586 |
-
this.$selection.
|
1587 |
-
|
1588 |
-
|
1589 |
-
|
1590 |
-
|
1591 |
-
|
1592 |
-
|
1593 |
-
|
1594 |
-
|
1595 |
-
|
1596 |
-
}
|
1597 |
-
|
1598 |
-
|
1599 |
-
|
1600 |
-
|
1601 |
-
});
|
1602 |
-
|
1603 |
-
this.$selection.on('
|
1604 |
-
// User
|
1605 |
-
});
|
1606 |
-
|
1607 |
-
|
1608 |
-
|
1609 |
-
|
1610 |
-
|
1611 |
-
|
1612 |
-
|
1613 |
-
|
1614 |
-
|
1615 |
-
|
1616 |
-
|
1617 |
-
|
1618 |
-
|
1619 |
-
|
1620 |
-
|
1621 |
-
|
1622 |
-
|
1623 |
-
|
1624 |
-
|
1625 |
-
|
1626 |
-
|
1627 |
-
|
1628 |
-
return
|
1629 |
-
};
|
1630 |
-
|
1631 |
-
SingleSelection.prototype.
|
1632 |
-
|
1633 |
-
|
1634 |
-
|
1635 |
-
|
1636 |
-
|
1637 |
-
|
1638 |
-
|
1639 |
-
|
1640 |
-
|
1641 |
-
|
1642 |
-
|
1643 |
-
$rendered.
|
1644 |
-
|
1645 |
-
|
1646 |
-
|
1647 |
-
|
1648 |
-
|
1649 |
-
|
1650 |
-
|
1651 |
-
|
1652 |
-
|
1653 |
-
|
1654 |
-
|
1655 |
-
|
1656 |
-
|
1657 |
-
|
1658 |
-
|
1659 |
-
|
1660 |
-
|
1661 |
-
|
1662 |
-
|
1663 |
-
|
1664 |
-
|
1665 |
-
$selection.
|
1666 |
-
|
1667 |
-
);
|
1668 |
-
|
1669 |
-
|
1670 |
-
|
1671 |
-
|
1672 |
-
|
1673 |
-
|
1674 |
-
|
1675 |
-
|
1676 |
-
|
1677 |
-
|
1678 |
-
|
1679 |
-
|
1680 |
-
|
1681 |
-
|
1682 |
-
|
1683 |
-
|
1684 |
-
|
1685 |
-
|
1686 |
-
|
1687 |
-
|
1688 |
-
|
1689 |
-
|
1690 |
-
|
1691 |
-
|
1692 |
-
|
1693 |
-
|
1694 |
-
|
1695 |
-
|
1696 |
-
|
1697 |
-
|
1698 |
-
|
1699 |
-
|
1700 |
-
|
1701 |
-
|
1702 |
-
|
1703 |
-
|
1704 |
-
|
1705 |
-
|
1706 |
-
|
1707 |
-
|
1708 |
-
|
1709 |
-
|
1710 |
-
|
1711 |
-
|
1712 |
-
|
1713 |
-
|
1714 |
-
|
1715 |
-
|
1716 |
-
|
1717 |
-
|
1718 |
-
|
1719 |
-
|
1720 |
-
|
1721 |
-
|
1722 |
-
|
1723 |
-
|
1724 |
-
'
|
1725 |
-
|
1726 |
-
|
1727 |
-
|
1728 |
-
|
1729 |
-
|
1730 |
-
|
1731 |
-
|
1732 |
-
|
1733 |
-
|
1734 |
-
|
1735 |
-
|
1736 |
-
|
1737 |
-
|
1738 |
-
|
1739 |
-
|
1740 |
-
|
1741 |
-
|
1742 |
-
|
1743 |
-
|
1744 |
-
|
1745 |
-
|
1746 |
-
$selection
|
1747 |
-
|
1748 |
-
|
1749 |
-
|
1750 |
-
$
|
1751 |
-
|
1752 |
-
|
1753 |
-
|
1754 |
-
|
1755 |
-
|
1756 |
-
|
1757 |
-
|
1758 |
-
|
1759 |
-
|
1760 |
-
|
1761 |
-
|
1762 |
-
|
1763 |
-
|
1764 |
-
|
1765 |
-
|
1766 |
-
|
1767 |
-
|
1768 |
-
|
1769 |
-
|
1770 |
-
|
1771 |
-
|
1772 |
-
|
1773 |
-
|
1774 |
-
|
1775 |
-
|
1776 |
-
|
1777 |
-
|
1778 |
-
|
1779 |
-
|
1780 |
-
|
1781 |
-
|
1782 |
-
|
1783 |
-
|
1784 |
-
|
1785 |
-
|
1786 |
-
|
1787 |
-
|
1788 |
-
|
1789 |
-
|
1790 |
-
|
1791 |
-
|
1792 |
-
|
1793 |
-
|
1794 |
-
|
1795 |
-
|
1796 |
-
|
1797 |
-
|
1798 |
-
|
1799 |
-
|
1800 |
-
|
1801 |
-
|
1802 |
-
|
1803 |
-
|
1804 |
-
|
1805 |
-
this
|
1806 |
-
|
1807 |
-
|
1808 |
-
|
1809 |
-
|
1810 |
-
|
1811 |
-
|
1812 |
-
|
1813 |
-
|
1814 |
-
|
1815 |
-
|
1816 |
-
|
1817 |
-
|
1818 |
-
|
1819 |
-
|
1820 |
-
|
1821 |
-
|
1822 |
-
|
1823 |
-
|
1824 |
-
|
1825 |
-
|
1826 |
-
|
1827 |
-
|
1828 |
-
|
1829 |
-
|
1830 |
-
|
1831 |
-
|
1832 |
-
|
1833 |
-
|
1834 |
-
|
1835 |
-
|
1836 |
-
|
1837 |
-
|
1838 |
-
|
1839 |
-
});
|
1840 |
-
|
1841 |
-
|
1842 |
-
|
1843 |
-
|
1844 |
-
|
1845 |
-
|
1846 |
-
|
1847 |
-
|
1848 |
-
|
1849 |
-
|
1850 |
-
|
1851 |
-
|
1852 |
-
|
1853 |
-
|
1854 |
-
|
1855 |
-
|
1856 |
-
|
1857 |
-
|
1858 |
-
|
1859 |
-
|
1860 |
-
|
1861 |
-
|
1862 |
-
|
1863 |
-
|
1864 |
-
|
1865 |
-
|
1866 |
-
|
1867 |
-
|
1868 |
-
|
1869 |
-
|
1870 |
-
|
1871 |
-
|
1872 |
-
|
1873 |
-
|
1874 |
-
|
1875 |
-
|
1876 |
-
|
1877 |
-
|
1878 |
-
|
1879 |
-
|
1880 |
-
//
|
1881 |
-
|
1882 |
-
|
1883 |
-
|
1884 |
-
|
1885 |
-
|
1886 |
-
|
1887 |
-
|
1888 |
-
|
1889 |
-
|
1890 |
-
|
1891 |
-
|
1892 |
-
|
1893 |
-
|
1894 |
-
|
1895 |
-
|
1896 |
-
|
1897 |
-
if (
|
1898 |
-
|
1899 |
-
}
|
1900 |
-
|
1901 |
-
|
1902 |
-
|
1903 |
-
|
1904 |
-
|
1905 |
-
|
1906 |
-
|
1907 |
-
|
1908 |
-
|
1909 |
-
|
1910 |
-
|
1911 |
-
|
1912 |
-
|
1913 |
-
|
1914 |
-
|
1915 |
-
|
1916 |
-
|
1917 |
-
|
1918 |
-
|
1919 |
-
|
1920 |
-
|
1921 |
-
|
1922 |
-
|
1923 |
-
|
1924 |
-
|
1925 |
-
|
1926 |
-
|
1927 |
-
|
1928 |
-
|
1929 |
-
|
1930 |
-
|
1931 |
-
|
1932 |
-
Search
|
1933 |
-
|
1934 |
-
|
1935 |
-
|
1936 |
-
|
1937 |
-
|
1938 |
-
'
|
1939 |
-
|
1940 |
-
|
1941 |
-
|
1942 |
-
|
1943 |
-
|
1944 |
-
|
1945 |
-
|
1946 |
-
this.
|
1947 |
-
|
1948 |
-
|
1949 |
-
|
1950 |
-
|
1951 |
-
|
1952 |
-
|
1953 |
-
|
1954 |
-
|
1955 |
-
|
1956 |
-
|
1957 |
-
|
1958 |
-
|
1959 |
-
|
1960 |
-
container.on('
|
1961 |
-
self.$search.
|
1962 |
-
|
1963 |
-
|
1964 |
-
|
1965 |
-
|
1966 |
-
|
1967 |
-
self.$search.
|
1968 |
-
|
1969 |
-
|
1970 |
-
|
1971 |
-
|
1972 |
-
|
1973 |
-
self
|
1974 |
-
});
|
1975 |
-
|
1976 |
-
container.on('
|
1977 |
-
self.$search.
|
1978 |
-
});
|
1979 |
-
|
1980 |
-
container.on('
|
1981 |
-
self.$search.
|
1982 |
-
});
|
1983 |
-
|
1984 |
-
|
1985 |
-
self.
|
1986 |
-
});
|
1987 |
-
|
1988 |
-
this.$selection.on('
|
1989 |
-
self.
|
1990 |
-
});
|
1991 |
-
|
1992 |
-
this.$selection.on('
|
1993 |
-
|
1994 |
-
|
1995 |
-
|
1996 |
-
|
1997 |
-
|
1998 |
-
|
1999 |
-
|
2000 |
-
|
2001 |
-
|
2002 |
-
|
2003 |
-
|
2004 |
-
|
2005 |
-
|
2006 |
-
|
2007 |
-
|
2008 |
-
|
2009 |
-
|
2010 |
-
|
2011 |
-
|
2012 |
-
|
2013 |
-
|
2014 |
-
|
2015 |
-
|
2016 |
-
|
2017 |
-
|
2018 |
-
|
2019 |
-
//
|
2020 |
-
|
2021 |
-
|
2022 |
-
|
2023 |
-
//
|
2024 |
-
|
2025 |
-
|
2026 |
-
|
2027 |
-
|
2028 |
-
|
2029 |
-
|
2030 |
-
|
2031 |
-
|
2032 |
-
|
2033 |
-
|
2034 |
-
|
2035 |
-
|
2036 |
-
|
2037 |
-
|
2038 |
-
|
2039 |
-
|
2040 |
-
|
2041 |
-
|
2042 |
-
|
2043 |
-
|
2044 |
-
|
2045 |
-
|
2046 |
-
|
2047 |
-
|
2048 |
-
|
2049 |
-
|
2050 |
-
|
2051 |
-
|
2052 |
-
|
2053 |
-
|
2054 |
-
|
2055 |
-
|
2056 |
-
|
2057 |
-
|
2058 |
-
|
2059 |
-
|
2060 |
-
|
2061 |
-
|
2062 |
-
|
2063 |
-
|
2064 |
-
|
2065 |
-
|
2066 |
-
|
2067 |
-
|
2068 |
-
|
2069 |
-
|
2070 |
-
|
2071 |
-
|
2072 |
-
|
2073 |
-
|
2074 |
-
|
2075 |
-
|
2076 |
-
|
2077 |
-
*
|
2078 |
-
|
2079 |
-
|
2080 |
-
|
2081 |
-
|
2082 |
-
|
2083 |
-
|
2084 |
-
|
2085 |
-
this.$
|
2086 |
-
};
|
2087 |
-
|
2088 |
-
Search.prototype.
|
2089 |
-
|
2090 |
-
|
2091 |
-
|
2092 |
-
|
2093 |
-
|
2094 |
-
|
2095 |
-
this.$
|
2096 |
-
|
2097 |
-
|
2098 |
-
|
2099 |
-
|
2100 |
-
|
2101 |
-
|
2102 |
-
|
2103 |
-
|
2104 |
-
|
2105 |
-
|
2106 |
-
|
2107 |
-
|
2108 |
-
|
2109 |
-
|
2110 |
-
|
2111 |
-
|
2112 |
-
|
2113 |
-
|
2114 |
-
|
2115 |
-
this.
|
2116 |
-
|
2117 |
-
|
2118 |
-
|
2119 |
-
|
2120 |
-
|
2121 |
-
|
2122 |
-
|
2123 |
-
|
2124 |
-
|
2125 |
-
|
2126 |
-
|
2127 |
-
|
2128 |
-
|
2129 |
-
|
2130 |
-
|
2131 |
-
|
2132 |
-
|
2133 |
-
|
2134 |
-
|
2135 |
-
|
2136 |
-
|
2137 |
-
|
2138 |
-
|
2139 |
-
|
2140 |
-
|
2141 |
-
|
2142 |
-
|
2143 |
-
|
2144 |
-
}
|
2145 |
-
|
2146 |
-
|
2147 |
-
|
2148 |
-
|
2149 |
-
|
2150 |
-
|
2151 |
-
|
2152 |
-
|
2153 |
-
|
2154 |
-
|
2155 |
-
|
2156 |
-
|
2157 |
-
|
2158 |
-
|
2159 |
-
|
2160 |
-
|
2161 |
-
|
2162 |
-
|
2163 |
-
|
2164 |
-
|
2165 |
-
|
2166 |
-
|
2167 |
-
|
2168 |
-
|
2169 |
-
|
2170 |
-
|
2171 |
-
|
2172 |
-
|
2173 |
-
|
2174 |
-
|
2175 |
-
|
2176 |
-
|
2177 |
-
|
2178 |
-
|
2179 |
-
|
2180 |
-
|
2181 |
-
|
2182 |
-
|
2183 |
-
//
|
2184 |
-
|
2185 |
-
|
2186 |
-
|
2187 |
-
|
2188 |
-
|
2189 |
-
|
2190 |
-
|
2191 |
-
|
2192 |
-
|
2193 |
-
|
2194 |
-
|
2195 |
-
|
2196 |
-
|
2197 |
-
|
2198 |
-
|
2199 |
-
|
2200 |
-
|
2201 |
-
|
2202 |
-
|
2203 |
-
|
2204 |
-
|
2205 |
-
|
2206 |
-
|
2207 |
-
|
2208 |
-
|
2209 |
-
|
2210 |
-
|
2211 |
-
|
2212 |
-
|
2213 |
-
|
2214 |
-
|
2215 |
-
|
2216 |
-
|
2217 |
-
Translation.
|
2218 |
-
|
2219 |
-
|
2220 |
-
|
2221 |
-
|
2222 |
-
|
2223 |
-
|
2224 |
-
|
2225 |
-
|
2226 |
-
|
2227 |
-
};
|
2228 |
-
|
2229 |
-
|
2230 |
-
|
2231 |
-
|
2232 |
-
|
2233 |
-
|
2234 |
-
|
2235 |
-
|
2236 |
-
|
2237 |
-
|
2238 |
-
|
2239 |
-
|
2240 |
-
|
2241 |
-
|
2242 |
-
|
2243 |
-
|
2244 |
-
|
2245 |
-
|
2246 |
-
'\
|
2247 |
-
'\
|
2248 |
-
'\
|
2249 |
-
'\
|
2250 |
-
'\
|
2251 |
-
'\
|
2252 |
-
'\
|
2253 |
-
'\
|
2254 |
-
'\
|
2255 |
-
'\
|
2256 |
-
'\
|
2257 |
-
'\
|
2258 |
-
'\
|
2259 |
-
'\
|
2260 |
-
'\
|
2261 |
-
'\
|
2262 |
-
'\
|
2263 |
-
'\
|
2264 |
-
'\
|
2265 |
-
'\
|
2266 |
-
'\
|
2267 |
-
'\
|
2268 |
-
'\
|
2269 |
-
'\
|
2270 |
-
'\
|
2271 |
-
'\
|
2272 |
-
'\
|
2273 |
-
'\
|
2274 |
-
'\
|
2275 |
-
'\
|
2276 |
-
'\
|
2277 |
-
'\
|
2278 |
-
'\
|
2279 |
-
'\
|
2280 |
-
'\
|
2281 |
-
'\
|
2282 |
-
'\
|
2283 |
-
'\
|
2284 |
-
'\
|
2285 |
-
'\
|
2286 |
-
'\
|
2287 |
-
'\
|
2288 |
-
'\
|
2289 |
-
'\
|
2290 |
-
'\
|
2291 |
-
'\
|
2292 |
-
'\
|
2293 |
-
'\
|
2294 |
-
'\
|
2295 |
-
'\
|
2296 |
-
'\
|
2297 |
-
'\
|
2298 |
-
'\
|
2299 |
-
'\
|
2300 |
-
'\
|
2301 |
-
'\
|
2302 |
-
'\
|
2303 |
-
'\
|
2304 |
-
'\
|
2305 |
-
'\
|
2306 |
-
'\
|
2307 |
-
'\
|
2308 |
-
'\
|
2309 |
-
'\
|
2310 |
-
'\
|
2311 |
-
'\
|
2312 |
-
'\
|
2313 |
-
'\
|
2314 |
-
'\
|
2315 |
-
'\
|
2316 |
-
'\
|
2317 |
-
'\
|
2318 |
-
'\
|
2319 |
-
'\
|
2320 |
-
'\
|
2321 |
-
'\
|
2322 |
-
'\
|
2323 |
-
'\
|
2324 |
-
'\
|
2325 |
-
'\
|
2326 |
-
'\
|
2327 |
-
'\
|
2328 |
-
'\
|
2329 |
-
'\
|
2330 |
-
'\
|
2331 |
-
'\
|
2332 |
-
'\
|
2333 |
-
'\
|
2334 |
-
'\
|
2335 |
-
'\
|
2336 |
-
'\
|
2337 |
-
'\
|
2338 |
-
'\
|
2339 |
-
'\
|
2340 |
-
'\
|
2341 |
-
'\
|
2342 |
-
'\
|
2343 |
-
'\
|
2344 |
-
'\
|
2345 |
-
'\
|
2346 |
-
'\
|
2347 |
-
'\
|
2348 |
-
'\
|
2349 |
-
'\
|
2350 |
-
'\
|
2351 |
-
'\
|
2352 |
-
'\
|
2353 |
-
'\
|
2354 |
-
'\
|
2355 |
-
'\
|
2356 |
-
'\
|
2357 |
-
'\
|
2358 |
-
'\
|
2359 |
-
'\
|
2360 |
-
'\
|
2361 |
-
'\
|
2362 |
-
'\
|
2363 |
-
'\
|
2364 |
-
'\
|
2365 |
-
'\
|
2366 |
-
'\
|
2367 |
-
'\
|
2368 |
-
'\
|
2369 |
-
'\
|
2370 |
-
'\
|
2371 |
-
'\
|
2372 |
-
'\
|
2373 |
-
'\
|
2374 |
-
'\
|
2375 |
-
'\
|
2376 |
-
'\
|
2377 |
-
'\
|
2378 |
-
'\
|
2379 |
-
'\
|
2380 |
-
'\
|
2381 |
-
'\
|
2382 |
-
'\
|
2383 |
-
'\
|
2384 |
-
'\
|
2385 |
-
'\
|
2386 |
-
'\
|
2387 |
-
'\
|
2388 |
-
'\
|
2389 |
-
'\
|
2390 |
-
'\
|
2391 |
-
'\
|
2392 |
-
'\
|
2393 |
-
'\
|
2394 |
-
'\
|
2395 |
-
'\
|
2396 |
-
'\
|
2397 |
-
'\
|
2398 |
-
'\
|
2399 |
-
'\
|
2400 |
-
'\
|
2401 |
-
'\
|
2402 |
-
'\
|
2403 |
-
'\
|
2404 |
-
'\
|
2405 |
-
'\
|
2406 |
-
'\
|
2407 |
-
'\
|
2408 |
-
'\
|
2409 |
-
'\
|
2410 |
-
'\
|
2411 |
-
'\
|
2412 |
-
'\
|
2413 |
-
'\
|
2414 |
-
'\
|
2415 |
-
'\
|
2416 |
-
'\
|
2417 |
-
'\
|
2418 |
-
'\
|
2419 |
-
'\
|
2420 |
-
'\
|
2421 |
-
'\
|
2422 |
-
'\
|
2423 |
-
'\
|
2424 |
-
'\
|
2425 |
-
'\
|
2426 |
-
'\
|
2427 |
-
'\
|
2428 |
-
'\
|
2429 |
-
'\
|
2430 |
-
'\
|
2431 |
-
'\
|
2432 |
-
'\
|
2433 |
-
'\
|
2434 |
-
'\
|
2435 |
-
'\
|
2436 |
-
'\
|
2437 |
-
'\
|
2438 |
-
'\
|
2439 |
-
'\
|
2440 |
-
'\
|
2441 |
-
'\
|
2442 |
-
'\
|
2443 |
-
'\
|
2444 |
-
'\
|
2445 |
-
'\
|
2446 |
-
'\
|
2447 |
-
'\
|
2448 |
-
'\
|
2449 |
-
'\
|
2450 |
-
'\
|
2451 |
-
'\
|
2452 |
-
'\
|
2453 |
-
'\
|
2454 |
-
'\
|
2455 |
-
'\
|
2456 |
-
'\
|
2457 |
-
'\
|
2458 |
-
'\
|
2459 |
-
'\
|
2460 |
-
'\
|
2461 |
-
'\
|
2462 |
-
'\
|
2463 |
-
'\
|
2464 |
-
'\
|
2465 |
-
'\
|
2466 |
-
'\
|
2467 |
-
'\
|
2468 |
-
'\
|
2469 |
-
'\
|
2470 |
-
'\
|
2471 |
-
'\
|
2472 |
-
'\
|
2473 |
-
'\
|
2474 |
-
'\
|
2475 |
-
'\
|
2476 |
-
'\
|
2477 |
-
'\
|
2478 |
-
'\
|
2479 |
-
'\
|
2480 |
-
'\
|
2481 |
-
'\
|
2482 |
-
'\
|
2483 |
-
'\
|
2484 |
-
'\
|
2485 |
-
'\
|
2486 |
-
'\
|
2487 |
-
'\
|
2488 |
-
'\
|
2489 |
-
'\
|
2490 |
-
'\
|
2491 |
-
'\
|
2492 |
-
'\
|
2493 |
-
'\
|
2494 |
-
'\
|
2495 |
-
'\
|
2496 |
-
'\
|
2497 |
-
'\
|
2498 |
-
'\
|
2499 |
-
'\
|
2500 |
-
'\
|
2501 |
-
'\
|
2502 |
-
'\
|
2503 |
-
'\
|
2504 |
-
'\
|
2505 |
-
'\
|
2506 |
-
'\
|
2507 |
-
'\
|
2508 |
-
'\
|
2509 |
-
'\
|
2510 |
-
'\
|
2511 |
-
'\
|
2512 |
-
'\
|
2513 |
-
'\
|
2514 |
-
'\
|
2515 |
-
'\
|
2516 |
-
'\
|
2517 |
-
'\
|
2518 |
-
'\
|
2519 |
-
'\
|
2520 |
-
'\
|
2521 |
-
'\
|
2522 |
-
'\
|
2523 |
-
'\
|
2524 |
-
'\
|
2525 |
-
'\
|
2526 |
-
'\
|
2527 |
-
'\
|
2528 |
-
'\
|
2529 |
-
'\
|
2530 |
-
'\
|
2531 |
-
'\
|
2532 |
-
'\
|
2533 |
-
'\
|
2534 |
-
'\
|
2535 |
-
'\
|
2536 |
-
'\
|
2537 |
-
'\
|
2538 |
-
'\
|
2539 |
-
'\
|
2540 |
-
'\
|
2541 |
-
'\
|
2542 |
-
'\
|
2543 |
-
'\
|
2544 |
-
'\
|
2545 |
-
'\
|
2546 |
-
'\
|
2547 |
-
'\
|
2548 |
-
'\
|
2549 |
-
'\
|
2550 |
-
'\
|
2551 |
-
'\
|
2552 |
-
'\
|
2553 |
-
'\
|
2554 |
-
'\
|
2555 |
-
'\
|
2556 |
-
'\
|
2557 |
-
'\
|
2558 |
-
'\
|
2559 |
-
'\
|
2560 |
-
'\
|
2561 |
-
'\
|
2562 |
-
'\
|
2563 |
-
'\
|
2564 |
-
'\
|
2565 |
-
'\
|
2566 |
-
'\
|
2567 |
-
'\
|
2568 |
-
'\
|
2569 |
-
'\
|
2570 |
-
'\
|
2571 |
-
'\
|
2572 |
-
'\
|
2573 |
-
'\
|
2574 |
-
'\
|
2575 |
-
'\
|
2576 |
-
'\
|
2577 |
-
'\
|
2578 |
-
'\
|
2579 |
-
'\
|
2580 |
-
'\
|
2581 |
-
'\
|
2582 |
-
'\
|
2583 |
-
'\
|
2584 |
-
'\
|
2585 |
-
'\
|
2586 |
-
'\
|
2587 |
-
'\
|
2588 |
-
'\
|
2589 |
-
'\
|
2590 |
-
'\
|
2591 |
-
'\
|
2592 |
-
'\
|
2593 |
-
'\
|
2594 |
-
'\
|
2595 |
-
'\
|
2596 |
-
'\
|
2597 |
-
'\
|
2598 |
-
'\
|
2599 |
-
'\
|
2600 |
-
'\
|
2601 |
-
'\
|
2602 |
-
'\
|
2603 |
-
'\
|
2604 |
-
'\
|
2605 |
-
'\
|
2606 |
-
'\
|
2607 |
-
'\
|
2608 |
-
'\
|
2609 |
-
'\
|
2610 |
-
'\
|
2611 |
-
'\
|
2612 |
-
'\
|
2613 |
-
'\
|
2614 |
-
'\
|
2615 |
-
'\
|
2616 |
-
'\
|
2617 |
-
'\
|
2618 |
-
'\
|
2619 |
-
'\
|
2620 |
-
'\
|
2621 |
-
'\
|
2622 |
-
'\
|
2623 |
-
'\
|
2624 |
-
'\
|
2625 |
-
'\
|
2626 |
-
'\
|
2627 |
-
'\
|
2628 |
-
'\
|
2629 |
-
'\
|
2630 |
-
'\
|
2631 |
-
'\
|
2632 |
-
'\
|
2633 |
-
'\
|
2634 |
-
'\
|
2635 |
-
'\
|
2636 |
-
'\
|
2637 |
-
'\
|
2638 |
-
'\
|
2639 |
-
'\
|
2640 |
-
'\
|
2641 |
-
'\
|
2642 |
-
'\
|
2643 |
-
'\
|
2644 |
-
'\
|
2645 |
-
'\
|
2646 |
-
'\
|
2647 |
-
'\
|
2648 |
-
'\
|
2649 |
-
'\
|
2650 |
-
'\
|
2651 |
-
'\
|
2652 |
-
'\
|
2653 |
-
'\
|
2654 |
-
'\
|
2655 |
-
'\
|
2656 |
-
'\
|
2657 |
-
'\
|
2658 |
-
'\
|
2659 |
-
'\
|
2660 |
-
'\
|
2661 |
-
'\
|
2662 |
-
'\
|
2663 |
-
'\
|
2664 |
-
'\
|
2665 |
-
'\
|
2666 |
-
'\
|
2667 |
-
'\
|
2668 |
-
'\
|
2669 |
-
'\
|
2670 |
-
'\
|
2671 |
-
'\
|
2672 |
-
'\
|
2673 |
-
'\
|
2674 |
-
'\
|
2675 |
-
'\
|
2676 |
-
'\
|
2677 |
-
'\
|
2678 |
-
'\
|
2679 |
-
'\
|
2680 |
-
'\
|
2681 |
-
'\
|
2682 |
-
'\
|
2683 |
-
'\
|
2684 |
-
'\
|
2685 |
-
'\
|
2686 |
-
'\
|
2687 |
-
'\
|
2688 |
-
'\
|
2689 |
-
'\
|
2690 |
-
'\
|
2691 |
-
'\
|
2692 |
-
'\
|
2693 |
-
'\
|
2694 |
-
'\
|
2695 |
-
'\
|
2696 |
-
'\
|
2697 |
-
'\
|
2698 |
-
'\
|
2699 |
-
'\
|
2700 |
-
'\
|
2701 |
-
'\
|
2702 |
-
'\
|
2703 |
-
'\
|
2704 |
-
'\
|
2705 |
-
'\
|
2706 |
-
'\
|
2707 |
-
'\
|
2708 |
-
'\
|
2709 |
-
'\
|
2710 |
-
'\
|
2711 |
-
'\
|
2712 |
-
'\
|
2713 |
-
'\
|
2714 |
-
'\
|
2715 |
-
'\
|
2716 |
-
'\
|
2717 |
-
'\
|
2718 |
-
'\
|
2719 |
-
'\
|
2720 |
-
'\
|
2721 |
-
'\
|
2722 |
-
'\
|
2723 |
-
'\
|
2724 |
-
'\
|
2725 |
-
'\
|
2726 |
-
'\
|
2727 |
-
'\
|
2728 |
-
'\
|
2729 |
-
'\
|
2730 |
-
'\
|
2731 |
-
'\
|
2732 |
-
'\
|
2733 |
-
'\
|
2734 |
-
'\
|
2735 |
-
'\
|
2736 |
-
'\
|
2737 |
-
'\
|
2738 |
-
'\
|
2739 |
-
'\
|
2740 |
-
'\
|
2741 |
-
'\
|
2742 |
-
'\
|
2743 |
-
'\
|
2744 |
-
'\
|
2745 |
-
'\
|
2746 |
-
'\
|
2747 |
-
'\
|
2748 |
-
'\
|
2749 |
-
'\
|
2750 |
-
'\
|
2751 |
-
'\
|
2752 |
-
'\
|
2753 |
-
'\
|
2754 |
-
'\
|
2755 |
-
'\
|
2756 |
-
'\
|
2757 |
-
'\
|
2758 |
-
'\
|
2759 |
-
'\
|
2760 |
-
'\
|
2761 |
-
'\
|
2762 |
-
'\
|
2763 |
-
'\
|
2764 |
-
'\
|
2765 |
-
'\
|
2766 |
-
'\
|
2767 |
-
'\
|
2768 |
-
'\
|
2769 |
-
'\
|
2770 |
-
'\
|
2771 |
-
'\
|
2772 |
-
'\
|
2773 |
-
'\
|
2774 |
-
'\
|
2775 |
-
'\
|
2776 |
-
'\
|
2777 |
-
'\
|
2778 |
-
'\
|
2779 |
-
'\
|
2780 |
-
'\
|
2781 |
-
'\
|
2782 |
-
'\
|
2783 |
-
'\
|
2784 |
-
'\
|
2785 |
-
'\
|
2786 |
-
'\
|
2787 |
-
'\
|
2788 |
-
'\
|
2789 |
-
'\
|
2790 |
-
'\
|
2791 |
-
'\
|
2792 |
-
'\
|
2793 |
-
'\
|
2794 |
-
'\
|
2795 |
-
'\
|
2796 |
-
'\
|
2797 |
-
'\
|
2798 |
-
'\
|
2799 |
-
'\
|
2800 |
-
'\
|
2801 |
-
'\
|
2802 |
-
'\
|
2803 |
-
'\
|
2804 |
-
'\
|
2805 |
-
'\
|
2806 |
-
'\
|
2807 |
-
'\
|
2808 |
-
'\
|
2809 |
-
'\
|
2810 |
-
'\
|
2811 |
-
'\
|
2812 |
-
'\
|
2813 |
-
'\
|
2814 |
-
'\
|
2815 |
-
'\
|
2816 |
-
'\
|
2817 |
-
'\
|
2818 |
-
'\
|
2819 |
-
'\
|
2820 |
-
'\
|
2821 |
-
'\
|
2822 |
-
'\
|
2823 |
-
'\
|
2824 |
-
'\
|
2825 |
-
'\
|
2826 |
-
'\
|
2827 |
-
'\
|
2828 |
-
'\
|
2829 |
-
'\
|
2830 |
-
'\
|
2831 |
-
'\
|
2832 |
-
'\
|
2833 |
-
'\
|
2834 |
-
'\
|
2835 |
-
'\
|
2836 |
-
'\
|
2837 |
-
'\
|
2838 |
-
'\
|
2839 |
-
'\
|
2840 |
-
'\
|
2841 |
-
'\
|
2842 |
-
'\
|
2843 |
-
'\
|
2844 |
-
'\
|
2845 |
-
'\
|
2846 |
-
'\
|
2847 |
-
'\
|
2848 |
-
'\
|
2849 |
-
'\
|
2850 |
-
'\
|
2851 |
-
'\
|
2852 |
-
'\
|
2853 |
-
'\
|
2854 |
-
'\
|
2855 |
-
'\
|
2856 |
-
'\
|
2857 |
-
'\
|
2858 |
-
'\
|
2859 |
-
'\
|
2860 |
-
'\
|
2861 |
-
'\
|
2862 |
-
'\
|
2863 |
-
'\
|
2864 |
-
'\
|
2865 |
-
'\
|
2866 |
-
'\
|
2867 |
-
'\
|
2868 |
-
'\
|
2869 |
-
'\
|
2870 |
-
'\
|
2871 |
-
'\
|
2872 |
-
'\
|
2873 |
-
'\
|
2874 |
-
'\
|
2875 |
-
'\
|
2876 |
-
'\
|
2877 |
-
'\
|
2878 |
-
'\
|
2879 |
-
'\
|
2880 |
-
'\
|
2881 |
-
'\
|
2882 |
-
'\
|
2883 |
-
'\
|
2884 |
-
'\
|
2885 |
-
'\
|
2886 |
-
'\
|
2887 |
-
'\
|
2888 |
-
'\
|
2889 |
-
'\
|
2890 |
-
'\
|
2891 |
-
'\
|
2892 |
-
'\
|
2893 |
-
'\
|
2894 |
-
'\
|
2895 |
-
'\
|
2896 |
-
'\
|
2897 |
-
'\
|
2898 |
-
'\
|
2899 |
-
'\
|
2900 |
-
'\
|
2901 |
-
'\
|
2902 |
-
'\
|
2903 |
-
'\
|
2904 |
-
'\
|
2905 |
-
'\
|
2906 |
-
'\
|
2907 |
-
'\
|
2908 |
-
'\
|
2909 |
-
'\
|
2910 |
-
'\
|
2911 |
-
'\
|
2912 |
-
'\
|
2913 |
-
'\
|
2914 |
-
'\
|
2915 |
-
'\
|
2916 |
-
'\
|
2917 |
-
'\
|
2918 |
-
'\
|
2919 |
-
'\
|
2920 |
-
'\
|
2921 |
-
'\
|
2922 |
-
'\
|
2923 |
-
'\
|
2924 |
-
'\
|
2925 |
-
'\
|
2926 |
-
'\
|
2927 |
-
'\
|
2928 |
-
'\
|
2929 |
-
'\
|
2930 |
-
'\
|
2931 |
-
'\
|
2932 |
-
'\
|
2933 |
-
'\
|
2934 |
-
'\
|
2935 |
-
'\
|
2936 |
-
'\
|
2937 |
-
'\
|
2938 |
-
'\
|
2939 |
-
'\
|
2940 |
-
'\
|
2941 |
-
'\
|
2942 |
-
'\
|
2943 |
-
'\
|
2944 |
-
'\
|
2945 |
-
'\
|
2946 |
-
'\
|
2947 |
-
'\
|
2948 |
-
'\
|
2949 |
-
'\
|
2950 |
-
'\
|
2951 |
-
'\
|
2952 |
-
'\
|
2953 |
-
'\
|
2954 |
-
'\
|
2955 |
-
'\
|
2956 |
-
'\
|
2957 |
-
'\
|
2958 |
-
'\
|
2959 |
-
'\
|
2960 |
-
'\
|
2961 |
-
'\
|
2962 |
-
'\
|
2963 |
-
'\
|
2964 |
-
'\
|
2965 |
-
'\
|
2966 |
-
'\
|
2967 |
-
'\
|
2968 |
-
'\
|
2969 |
-
'\
|
2970 |
-
'\
|
2971 |
-
'\
|
2972 |
-
'\
|
2973 |
-
'\
|
2974 |
-
'\
|
2975 |
-
'\
|
2976 |
-
'\
|
2977 |
-
'\
|
2978 |
-
'\
|
2979 |
-
'\
|
2980 |
-
'\
|
2981 |
-
'\
|
2982 |
-
'\
|
2983 |
-
'\
|
2984 |
-
'\
|
2985 |
-
'\
|
2986 |
-
'\
|
2987 |
-
'\
|
2988 |
-
'\
|
2989 |
-
'\
|
2990 |
-
'\
|
2991 |
-
'\
|
2992 |
-
'\
|
2993 |
-
'\
|
2994 |
-
'\
|
2995 |
-
'\
|
2996 |
-
'\
|
2997 |
-
'\
|
2998 |
-
'\
|
2999 |
-
'\
|
3000 |
-
'\
|
3001 |
-
'\
|
3002 |
-
'\
|
3003 |
-
'\
|
3004 |
-
'\
|
3005 |
-
'\
|
3006 |
-
'\
|
3007 |
-
'\
|
3008 |
-
'\
|
3009 |
-
'\
|
3010 |
-
'\
|
3011 |
-
'\
|
3012 |
-
'\
|
3013 |
-
'\
|
3014 |
-
'\
|
3015 |
-
'\
|
3016 |
-
'\
|
3017 |
-
'\
|
3018 |
-
'\
|
3019 |
-
'\
|
3020 |
-
'\
|
3021 |
-
'\
|
3022 |
-
'\
|
3023 |
-
'\
|
3024 |
-
'\
|
3025 |
-
'\
|
3026 |
-
'\
|
3027 |
-
'\
|
3028 |
-
'\
|
3029 |
-
'\
|
3030 |
-
'\
|
3031 |
-
'\
|
3032 |
-
'\
|
3033 |
-
'\
|
3034 |
-
'\
|
3035 |
-
'\
|
3036 |
-
'\
|
3037 |
-
'\
|
3038 |
-
'\
|
3039 |
-
'\
|
3040 |
-
'\
|
3041 |
-
'\
|
3042 |
-
'\
|
3043 |
-
'\
|
3044 |
-
'\
|
3045 |
-
'\
|
3046 |
-
'\
|
3047 |
-
'\
|
3048 |
-
'\
|
3049 |
-
'\
|
3050 |
-
'\
|
3051 |
-
'\
|
3052 |
-
'\
|
3053 |
-
'\
|
3054 |
-
'\
|
3055 |
-
'\
|
3056 |
-
'\
|
3057 |
-
'\
|
3058 |
-
'\
|
3059 |
-
'\
|
3060 |
-
'\
|
3061 |
-
'\
|
3062 |
-
'\
|
3063 |
-
'\
|
3064 |
-
'\
|
3065 |
-
'\
|
3066 |
-
'\
|
3067 |
-
'\
|
3068 |
-
'\
|
3069 |
-
'\
|
3070 |
-
'\
|
3071 |
-
'\
|
3072 |
-
'\
|
3073 |
-
'\
|
3074 |
-
'\
|
3075 |
-
|
3076 |
-
|
3077 |
-
|
3078 |
-
|
3079 |
-
|
3080 |
-
|
3081 |
-
|
3082 |
-
|
3083 |
-
|
3084 |
-
|
3085 |
-
}
|
3086 |
-
|
3087 |
-
|
3088 |
-
|
3089 |
-
|
3090 |
-
|
3091 |
-
|
3092 |
-
|
3093 |
-
BaseAdapter
|
3094 |
-
|
3095 |
-
}
|
3096 |
-
|
3097 |
-
|
3098 |
-
|
3099 |
-
|
3100 |
-
|
3101 |
-
|
3102 |
-
|
3103 |
-
|
3104 |
-
|
3105 |
-
|
3106 |
-
|
3107 |
-
|
3108 |
-
|
3109 |
-
|
3110 |
-
|
3111 |
-
|
3112 |
-
|
3113 |
-
|
3114 |
-
|
3115 |
-
|
3116 |
-
|
3117 |
-
|
3118 |
-
|
3119 |
-
|
3120 |
-
|
3121 |
-
|
3122 |
-
|
3123 |
-
|
3124 |
-
|
3125 |
-
|
3126 |
-
|
3127 |
-
|
3128 |
-
|
3129 |
-
|
3130 |
-
|
3131 |
-
|
3132 |
-
|
3133 |
-
|
3134 |
-
|
3135 |
-
|
3136 |
-
|
3137 |
-
|
3138 |
-
|
3139 |
-
|
3140 |
-
|
3141 |
-
|
3142 |
-
|
3143 |
-
|
3144 |
-
|
3145 |
-
|
3146 |
-
|
3147 |
-
|
3148 |
-
|
3149 |
-
|
3150 |
-
|
3151 |
-
|
3152 |
-
|
3153 |
-
|
3154 |
-
|
3155 |
-
|
3156 |
-
|
3157 |
-
|
3158 |
-
|
3159 |
-
|
3160 |
-
|
3161 |
-
|
3162 |
-
|
3163 |
-
|
3164 |
-
|
3165 |
-
|
3166 |
-
|
3167 |
-
|
3168 |
-
|
3169 |
-
|
3170 |
-
|
3171 |
-
|
3172 |
-
|
3173 |
-
|
3174 |
-
|
3175 |
-
|
3176 |
-
|
3177 |
-
|
3178 |
-
|
3179 |
-
|
3180 |
-
|
3181 |
-
|
3182 |
-
|
3183 |
-
|
3184 |
-
|
3185 |
-
|
3186 |
-
|
3187 |
-
|
3188 |
-
|
3189 |
-
|
3190 |
-
|
3191 |
-
|
3192 |
-
|
3193 |
-
|
3194 |
-
|
3195 |
-
|
3196 |
-
|
3197 |
-
|
3198 |
-
|
3199 |
-
|
3200 |
-
|
3201 |
-
|
3202 |
-
|
3203 |
-
|
3204 |
-
return;
|
3205 |
-
}
|
3206 |
-
|
3207 |
-
|
3208 |
-
|
3209 |
-
|
3210 |
-
|
3211 |
-
|
3212 |
-
|
3213 |
-
|
3214 |
-
|
3215 |
-
|
3216 |
-
|
3217 |
-
|
3218 |
-
|
3219 |
-
|
3220 |
-
|
3221 |
-
|
3222 |
-
|
3223 |
-
|
3224 |
-
|
3225 |
-
|
3226 |
-
|
3227 |
-
|
3228 |
-
|
3229 |
-
|
3230 |
-
self.
|
3231 |
-
});
|
3232 |
-
|
3233 |
-
|
3234 |
-
|
3235 |
-
|
3236 |
-
|
3237 |
-
|
3238 |
-
|
3239 |
-
|
3240 |
-
|
3241 |
-
|
3242 |
-
|
3243 |
-
|
3244 |
-
|
3245 |
-
|
3246 |
-
|
3247 |
-
|
3248 |
-
|
3249 |
-
|
3250 |
-
|
3251 |
-
|
3252 |
-
|
3253 |
-
|
3254 |
-
|
3255 |
-
|
3256 |
-
|
3257 |
-
|
3258 |
-
|
3259 |
-
|
3260 |
-
|
3261 |
-
|
3262 |
-
|
3263 |
-
|
3264 |
-
|
3265 |
-
|
3266 |
-
|
3267 |
-
|
3268 |
-
|
3269 |
-
|
3270 |
-
|
3271 |
-
|
3272 |
-
|
3273 |
-
|
3274 |
-
|
3275 |
-
|
3276 |
-
|
3277 |
-
|
3278 |
-
|
3279 |
-
|
3280 |
-
|
3281 |
-
|
3282 |
-
|
3283 |
-
|
3284 |
-
|
3285 |
-
|
3286 |
-
|
3287 |
-
|
3288 |
-
|
3289 |
-
|
3290 |
-
|
3291 |
-
|
3292 |
-
|
3293 |
-
|
3294 |
-
option
|
3295 |
-
|
3296 |
-
|
3297 |
-
|
3298 |
-
|
3299 |
-
|
3300 |
-
|
3301 |
-
|
3302 |
-
|
3303 |
-
|
3304 |
-
|
3305 |
-
|
3306 |
-
|
3307 |
-
|
3308 |
-
|
3309 |
-
|
3310 |
-
|
3311 |
-
|
3312 |
-
|
3313 |
-
|
3314 |
-
|
3315 |
-
|
3316 |
-
|
3317 |
-
|
3318 |
-
|
3319 |
-
|
3320 |
-
|
3321 |
-
var
|
3322 |
-
|
3323 |
-
|
3324 |
-
|
3325 |
-
|
3326 |
-
|
3327 |
-
|
3328 |
-
|
3329 |
-
|
3330 |
-
|
3331 |
-
|
3332 |
-
|
3333 |
-
|
3334 |
-
|
3335 |
-
|
3336 |
-
|
3337 |
-
}
|
3338 |
-
|
3339 |
-
|
3340 |
-
|
3341 |
-
|
3342 |
-
|
3343 |
-
|
3344 |
-
|
3345 |
-
|
3346 |
-
|
3347 |
-
|
3348 |
-
|
3349 |
-
|
3350 |
-
|
3351 |
-
|
3352 |
-
|
3353 |
-
|
3354 |
-
|
3355 |
-
|
3356 |
-
|
3357 |
-
|
3358 |
-
|
3359 |
-
|
3360 |
-
|
3361 |
-
|
3362 |
-
|
3363 |
-
|
3364 |
-
|
3365 |
-
|
3366 |
-
|
3367 |
-
|
3368 |
-
|
3369 |
-
|
3370 |
-
|
3371 |
-
|
3372 |
-
|
3373 |
-
|
3374 |
-
|
3375 |
-
|
3376 |
-
|
3377 |
-
|
3378 |
-
|
3379 |
-
|
3380 |
-
|
3381 |
-
|
3382 |
-
|
3383 |
-
|
3384 |
-
|
3385 |
-
|
3386 |
-
|
3387 |
-
|
3388 |
-
|
3389 |
-
|
3390 |
-
|
3391 |
-
|
3392 |
-
|
3393 |
-
|
3394 |
-
|
3395 |
-
|
3396 |
-
|
3397 |
-
|
3398 |
-
|
3399 |
-
|
3400 |
-
|
3401 |
-
|
3402 |
-
|
3403 |
-
|
3404 |
-
|
3405 |
-
});
|
3406 |
-
|
3407 |
-
|
3408 |
-
|
3409 |
-
|
3410 |
-
|
3411 |
-
|
3412 |
-
|
3413 |
-
|
3414 |
-
|
3415 |
-
|
3416 |
-
|
3417 |
-
|
3418 |
-
|
3419 |
-
|
3420 |
-
|
3421 |
-
|
3422 |
-
ArrayAdapter
|
3423 |
-
var
|
3424 |
-
|
3425 |
-
|
3426 |
-
|
3427 |
-
|
3428 |
-
|
3429 |
-
|
3430 |
-
|
3431 |
-
|
3432 |
-
|
3433 |
-
|
3434 |
-
|
3435 |
-
|
3436 |
-
|
3437 |
-
|
3438 |
-
|
3439 |
-
|
3440 |
-
|
3441 |
-
|
3442 |
-
|
3443 |
-
|
3444 |
-
|
3445 |
-
|
3446 |
-
|
3447 |
-
|
3448 |
-
|
3449 |
-
|
3450 |
-
|
3451 |
-
|
3452 |
-
|
3453 |
-
|
3454 |
-
|
3455 |
-
|
3456 |
-
|
3457 |
-
|
3458 |
-
|
3459 |
-
|
3460 |
-
|
3461 |
-
|
3462 |
-
|
3463 |
-
|
3464 |
-
|
3465 |
-
|
3466 |
-
|
3467 |
-
|
3468 |
-
|
3469 |
-
|
3470 |
-
|
3471 |
-
|
3472 |
-
|
3473 |
-
var $
|
3474 |
-
|
3475 |
-
|
3476 |
-
|
3477 |
-
|
3478 |
-
|
3479 |
-
|
3480 |
-
|
3481 |
-
|
3482 |
-
|
3483 |
-
|
3484 |
-
|
3485 |
-
|
3486 |
-
|
3487 |
-
|
3488 |
-
|
3489 |
-
|
3490 |
-
|
3491 |
-
|
3492 |
-
|
3493 |
-
|
3494 |
-
|
3495 |
-
|
3496 |
-
|
3497 |
-
|
3498 |
-
|
3499 |
-
|
3500 |
-
|
3501 |
-
|
3502 |
-
|
3503 |
-
|
3504 |
-
|
3505 |
-
|
3506 |
-
|
3507 |
-
|
3508 |
-
|
3509 |
-
|
3510 |
-
|
3511 |
-
|
3512 |
-
|
3513 |
-
|
3514 |
-
|
3515 |
-
|
3516 |
-
|
3517 |
-
return
|
3518 |
-
|
3519 |
-
|
3520 |
-
|
3521 |
-
|
3522 |
-
|
3523 |
-
|
3524 |
-
|
3525 |
-
|
3526 |
-
|
3527 |
-
|
3528 |
-
|
3529 |
-
|
3530 |
-
|
3531 |
-
|
3532 |
-
|
3533 |
-
|
3534 |
-
|
3535 |
-
|
3536 |
-
|
3537 |
-
|
3538 |
-
|
3539 |
-
|
3540 |
-
|
3541 |
-
|
3542 |
-
|
3543 |
-
|
3544 |
-
|
3545 |
-
|
3546 |
-
|
3547 |
-
|
3548 |
-
|
3549 |
-
|
3550 |
-
|
3551 |
-
|
3552 |
-
|
3553 |
-
|
3554 |
-
|
3555 |
-
|
3556 |
-
|
3557 |
-
|
3558 |
-
|
3559 |
-
|
3560 |
-
|
3561 |
-
|
3562 |
-
|
3563 |
-
|
3564 |
-
|
3565 |
-
|
3566 |
-
|
3567 |
-
|
3568 |
-
|
3569 |
-
|
3570 |
-
|
3571 |
-
|
3572 |
-
|
3573 |
-
|
3574 |
-
|
3575 |
-
|
3576 |
-
|
3577 |
-
|
3578 |
-
|
3579 |
-
|
3580 |
-
|
3581 |
-
|
3582 |
-
|
3583 |
-
|
3584 |
-
|
3585 |
-
|
3586 |
-
|
3587 |
-
|
3588 |
-
|
3589 |
-
|
3590 |
-
|
3591 |
-
request
|
3592 |
-
}
|
3593 |
-
|
3594 |
-
|
3595 |
-
|
3596 |
-
|
3597 |
-
|
3598 |
-
|
3599 |
-
|
3600 |
-
|
3601 |
-
|
3602 |
-
|
3603 |
-
|
3604 |
-
|
3605 |
-
|
3606 |
-
|
3607 |
-
|
3608 |
-
|
3609 |
-
|
3610 |
-
|
3611 |
-
|
3612 |
-
|
3613 |
-
|
3614 |
-
|
3615 |
-
|
3616 |
-
|
3617 |
-
|
3618 |
-
|
3619 |
-
|
3620 |
-
|
3621 |
-
|
3622 |
-
|
3623 |
-
|
3624 |
-
|
3625 |
-
|
3626 |
-
|
3627 |
-
|
3628 |
-
|
3629 |
-
|
3630 |
-
|
3631 |
-
|
3632 |
-
|
3633 |
-
|
3634 |
-
|
3635 |
-
|
3636 |
-
|
3637 |
-
|
3638 |
-
|
3639 |
-
|
3640 |
-
|
3641 |
-
|
3642 |
-
|
3643 |
-
|
3644 |
-
|
3645 |
-
|
3646 |
-
|
3647 |
-
|
3648 |
-
|
3649 |
-
|
3650 |
-
|
3651 |
-
|
3652 |
-
|
3653 |
-
|
3654 |
-
var
|
3655 |
-
|
3656 |
-
var
|
3657 |
-
|
3658 |
-
|
3659 |
-
|
3660 |
-
|
3661 |
-
|
3662 |
-
|
3663 |
-
|
3664 |
-
|
3665 |
-
|
3666 |
-
|
3667 |
-
|
3668 |
-
|
3669 |
-
|
3670 |
-
|
3671 |
-
|
3672 |
-
|
3673 |
-
|
3674 |
-
|
3675 |
-
|
3676 |
-
|
3677 |
-
|
3678 |
-
|
3679 |
-
|
3680 |
-
|
3681 |
-
|
3682 |
-
|
3683 |
-
|
3684 |
-
|
3685 |
-
|
3686 |
-
|
3687 |
-
|
3688 |
-
|
3689 |
-
|
3690 |
-
|
3691 |
-
|
3692 |
-
|
3693 |
-
|
3694 |
-
|
3695 |
-
|
3696 |
-
|
3697 |
-
|
3698 |
-
}
|
3699 |
-
|
3700 |
-
|
3701 |
-
|
3702 |
-
|
3703 |
-
|
3704 |
-
|
3705 |
-
|
3706 |
-
|
3707 |
-
|
3708 |
-
|
3709 |
-
|
3710 |
-
|
3711 |
-
|
3712 |
-
|
3713 |
-
|
3714 |
-
|
3715 |
-
|
3716 |
-
|
3717 |
-
|
3718 |
-
|
3719 |
-
|
3720 |
-
|
3721 |
-
|
3722 |
-
|
3723 |
-
|
3724 |
-
|
3725 |
-
|
3726 |
-
|
3727 |
-
|
3728 |
-
|
3729 |
-
|
3730 |
-
|
3731 |
-
|
3732 |
-
|
3733 |
-
|
3734 |
-
|
3735 |
-
|
3736 |
-
|
3737 |
-
|
3738 |
-
|
3739 |
-
|
3740 |
-
Tokenizer
|
3741 |
-
|
3742 |
-
|
3743 |
-
|
3744 |
-
|
3745 |
-
|
3746 |
-
|
3747 |
-
|
3748 |
-
|
3749 |
-
|
3750 |
-
|
3751 |
-
|
3752 |
-
|
3753 |
-
|
3754 |
-
|
3755 |
-
|
3756 |
-
|
3757 |
-
|
3758 |
-
|
3759 |
-
|
3760 |
-
|
3761 |
-
|
3762 |
-
|
3763 |
-
|
3764 |
-
|
3765 |
-
|
3766 |
-
|
3767 |
-
|
3768 |
-
|
3769 |
-
|
3770 |
-
|
3771 |
-
|
3772 |
-
|
3773 |
-
|
3774 |
-
|
3775 |
-
|
3776 |
-
|
3777 |
-
|
3778 |
-
|
3779 |
-
|
3780 |
-
|
3781 |
-
|
3782 |
-
|
3783 |
-
|
3784 |
-
|
3785 |
-
|
3786 |
-
|
3787 |
-
|
3788 |
-
|
3789 |
-
|
3790 |
-
|
3791 |
-
|
3792 |
-
|
3793 |
-
|
3794 |
-
|
3795 |
-
|
3796 |
-
|
3797 |
-
|
3798 |
-
|
3799 |
-
|
3800 |
-
|
3801 |
-
|
3802 |
-
|
3803 |
-
|
3804 |
-
|
3805 |
-
|
3806 |
-
|
3807 |
-
|
3808 |
-
|
3809 |
-
|
3810 |
-
|
3811 |
-
|
3812 |
-
|
3813 |
-
|
3814 |
-
|
3815 |
-
}
|
3816 |
-
|
3817 |
-
|
3818 |
-
|
3819 |
-
|
3820 |
-
|
3821 |
-
|
3822 |
-
|
3823 |
-
|
3824 |
-
|
3825 |
-
|
3826 |
-
|
3827 |
-
|
3828 |
-
|
3829 |
-
|
3830 |
-
|
3831 |
-
|
3832 |
-
|
3833 |
-
|
3834 |
-
|
3835 |
-
|
3836 |
-
|
3837 |
-
|
3838 |
-
|
3839 |
-
|
3840 |
-
|
3841 |
-
|
3842 |
-
|
3843 |
-
|
3844 |
-
|
3845 |
-
|
3846 |
-
|
3847 |
-
|
3848 |
-
|
3849 |
-
|
3850 |
-
|
3851 |
-
|
3852 |
-
|
3853 |
-
|
3854 |
-
|
3855 |
-
|
3856 |
-
|
3857 |
-
|
3858 |
-
|
3859 |
-
|
3860 |
-
|
3861 |
-
|
3862 |
-
|
3863 |
-
|
3864 |
-
|
3865 |
-
|
3866 |
-
|
3867 |
-
|
3868 |
-
|
3869 |
-
|
3870 |
-
|
3871 |
-
|
3872 |
-
|
3873 |
-
}
|
3874 |
-
|
3875 |
-
|
3876 |
-
|
3877 |
-
|
3878 |
-
|
3879 |
-
this
|
3880 |
-
|
3881 |
-
|
3882 |
-
|
3883 |
-
|
3884 |
-
|
3885 |
-
|
3886 |
-
|
3887 |
-
|
3888 |
-
|
3889 |
-
|
3890 |
-
|
3891 |
-
|
3892 |
-
|
3893 |
-
|
3894 |
-
|
3895 |
-
|
3896 |
-
|
3897 |
-
|
3898 |
-
|
3899 |
-
|
3900 |
-
|
3901 |
-
|
3902 |
-
|
3903 |
-
|
3904 |
-
|
3905 |
-
}
|
3906 |
-
|
3907 |
-
|
3908 |
-
|
3909 |
-
|
3910 |
-
|
3911 |
-
this
|
3912 |
-
|
3913 |
-
|
3914 |
-
|
3915 |
-
|
3916 |
-
|
3917 |
-
|
3918 |
-
|
3919 |
-
|
3920 |
-
|
3921 |
-
|
3922 |
-
|
3923 |
-
|
3924 |
-
|
3925 |
-
|
3926 |
-
|
3927 |
-
|
3928 |
-
|
3929 |
-
|
3930 |
-
|
3931 |
-
|
3932 |
-
|
3933 |
-
|
3934 |
-
|
3935 |
-
|
3936 |
-
|
3937 |
-
|
3938 |
-
|
3939 |
-
|
3940 |
-
|
3941 |
-
|
3942 |
-
|
3943 |
-
|
3944 |
-
|
3945 |
-
|
3946 |
-
|
3947 |
-
|
3948 |
-
|
3949 |
-
|
3950 |
-
|
3951 |
-
|
3952 |
-
|
3953 |
-
|
3954 |
-
|
3955 |
-
|
3956 |
-
|
3957 |
-
);
|
3958 |
-
|
3959 |
-
|
3960 |
-
|
3961 |
-
|
3962 |
-
|
3963 |
-
|
3964 |
-
|
3965 |
-
|
3966 |
-
|
3967 |
-
|
3968 |
-
|
3969 |
-
|
3970 |
-
|
3971 |
-
|
3972 |
-
|
3973 |
-
|
3974 |
-
|
3975 |
-
|
3976 |
-
|
3977 |
-
|
3978 |
-
|
3979 |
-
|
3980 |
-
|
3981 |
-
|
3982 |
-
|
3983 |
-
|
3984 |
-
|
3985 |
-
|
3986 |
-
|
3987 |
-
|
3988 |
-
|
3989 |
-
|
3990 |
-
|
3991 |
-
|
3992 |
-
|
3993 |
-
|
3994 |
-
|
3995 |
-
|
3996 |
-
|
3997 |
-
|
3998 |
-
|
3999 |
-
|
4000 |
-
|
4001 |
-
|
4002 |
-
|
4003 |
-
|
4004 |
-
|
4005 |
-
|
4006 |
-
|
4007 |
-
|
4008 |
-
|
4009 |
-
|
4010 |
-
|
4011 |
-
|
4012 |
-
|
4013 |
-
|
4014 |
-
|
4015 |
-
|
4016 |
-
|
4017 |
-
|
4018 |
-
|
4019 |
-
|
4020 |
-
|
4021 |
-
|
4022 |
-
|
4023 |
-
|
4024 |
-
|
4025 |
-
|
4026 |
-
|
4027 |
-
|
4028 |
-
|
4029 |
-
|
4030 |
-
|
4031 |
-
|
4032 |
-
|
4033 |
-
|
4034 |
-
|
4035 |
-
|
4036 |
-
|
4037 |
-
|
4038 |
-
});
|
4039 |
-
|
4040 |
-
container.on('
|
4041 |
-
self.$search.attr('tabindex',
|
4042 |
-
|
4043 |
-
self.$search.
|
4044 |
-
|
4045 |
-
|
4046 |
-
|
4047 |
-
|
4048 |
-
|
4049 |
-
|
4050 |
-
|
4051 |
-
|
4052 |
-
|
4053 |
-
|
4054 |
-
|
4055 |
-
|
4056 |
-
|
4057 |
-
|
4058 |
-
|
4059 |
-
|
4060 |
-
|
4061 |
-
|
4062 |
-
|
4063 |
-
|
4064 |
-
|
4065 |
-
|
4066 |
-
|
4067 |
-
|
4068 |
-
|
4069 |
-
|
4070 |
-
|
4071 |
-
|
4072 |
-
}
|
4073 |
-
}
|
4074 |
-
|
4075 |
-
|
4076 |
-
|
4077 |
-
|
4078 |
-
|
4079 |
-
|
4080 |
-
|
4081 |
-
|
4082 |
-
|
4083 |
-
}
|
4084 |
-
|
4085 |
-
|
4086 |
-
|
4087 |
-
|
4088 |
-
function
|
4089 |
-
|
4090 |
-
|
4091 |
-
|
4092 |
-
|
4093 |
-
|
4094 |
-
|
4095 |
-
|
4096 |
-
|
4097 |
-
|
4098 |
-
|
4099 |
-
|
4100 |
-
|
4101 |
-
|
4102 |
-
|
4103 |
-
|
4104 |
-
|
4105 |
-
|
4106 |
-
|
4107 |
-
|
4108 |
-
|
4109 |
-
|
4110 |
-
|
4111 |
-
|
4112 |
-
|
4113 |
-
|
4114 |
-
|
4115 |
-
|
4116 |
-
|
4117 |
-
|
4118 |
-
|
4119 |
-
|
4120 |
-
|
4121 |
-
|
4122 |
-
|
4123 |
-
|
4124 |
-
|
4125 |
-
|
4126 |
-
|
4127 |
-
|
4128 |
-
|
4129 |
-
|
4130 |
-
|
4131 |
-
|
4132 |
-
|
4133 |
-
|
4134 |
-
|
4135 |
-
|
4136 |
-
|
4137 |
-
|
4138 |
-
|
4139 |
-
|
4140 |
-
|
4141 |
-
|
4142 |
-
this.
|
4143 |
-
|
4144 |
-
decorated.call(this,
|
4145 |
-
|
4146 |
-
|
4147 |
-
|
4148 |
-
|
4149 |
-
|
4150 |
-
|
4151 |
-
|
4152 |
-
|
4153 |
-
|
4154 |
-
decorated.call(this,
|
4155 |
-
|
4156 |
-
|
4157 |
-
|
4158 |
-
|
4159 |
-
|
4160 |
-
|
4161 |
-
|
4162 |
-
|
4163 |
-
|
4164 |
-
|
4165 |
-
|
4166 |
-
|
4167 |
-
|
4168 |
-
|
4169 |
-
|
4170 |
-
|
4171 |
-
|
4172 |
-
|
4173 |
-
|
4174 |
-
|
4175 |
-
|
4176 |
-
|
4177 |
-
|
4178 |
-
|
4179 |
-
self.$loadingMore
|
4180 |
-
|
4181 |
-
|
4182 |
-
|
4183 |
-
|
4184 |
-
|
4185 |
-
|
4186 |
-
|
4187 |
-
|
4188 |
-
|
4189 |
-
|
4190 |
-
|
4191 |
-
|
4192 |
-
|
4193 |
-
|
4194 |
-
|
4195 |
-
};
|
4196 |
-
|
4197 |
-
InfiniteScroll.prototype.
|
4198 |
-
|
4199 |
-
|
4200 |
-
|
4201 |
-
|
4202 |
-
|
4203 |
-
|
4204 |
-
|
4205 |
-
|
4206 |
-
|
4207 |
-
|
4208 |
-
|
4209 |
-
|
4210 |
-
|
4211 |
-
|
4212 |
-
|
4213 |
-
|
4214 |
-
|
4215 |
-
|
4216 |
-
|
4217 |
-
|
4218 |
-
|
4219 |
-
|
4220 |
-
|
4221 |
-
|
4222 |
-
|
4223 |
-
|
4224 |
-
|
4225 |
-
|
4226 |
-
|
4227 |
-
|
4228 |
-
|
4229 |
-
|
4230 |
-
|
4231 |
-
|
4232 |
-
|
4233 |
-
|
4234 |
-
|
4235 |
-
|
4236 |
-
|
4237 |
-
|
4238 |
-
|
4239 |
-
|
4240 |
-
|
4241 |
-
|
4242 |
-
|
4243 |
-
|
4244 |
-
|
4245 |
-
|
4246 |
-
|
4247 |
-
|
4248 |
-
|
4249 |
-
|
4250 |
-
|
4251 |
-
|
4252 |
-
|
4253 |
-
|
4254 |
-
|
4255 |
-
|
4256 |
-
|
4257 |
-
|
4258 |
-
|
4259 |
-
|
4260 |
-
|
4261 |
-
|
4262 |
-
|
4263 |
-
|
4264 |
-
|
4265 |
-
|
4266 |
-
|
4267 |
-
|
4268 |
-
|
4269 |
-
|
4270 |
-
|
4271 |
-
|
4272 |
-
|
4273 |
-
|
4274 |
-
|
4275 |
-
|
4276 |
-
|
4277 |
-
|
4278 |
-
|
4279 |
-
|
4280 |
-
|
4281 |
-
|
4282 |
-
|
4283 |
-
|
4284 |
-
|
4285 |
-
|
4286 |
-
|
4287 |
-
|
4288 |
-
|
4289 |
-
|
4290 |
-
|
4291 |
-
|
4292 |
-
|
4293 |
-
|
4294 |
-
|
4295 |
-
|
4296 |
-
|
4297 |
-
|
4298 |
-
|
4299 |
-
|
4300 |
-
|
4301 |
-
|
4302 |
-
|
4303 |
-
|
4304 |
-
|
4305 |
-
|
4306 |
-
|
4307 |
-
|
4308 |
-
|
4309 |
-
|
4310 |
-
|
4311 |
-
|
4312 |
-
|
4313 |
-
|
4314 |
-
|
4315 |
-
|
4316 |
-
|
4317 |
-
|
4318 |
-
|
4319 |
-
|
4320 |
-
|
4321 |
-
|
4322 |
-
|
4323 |
-
|
4324 |
-
|
4325 |
-
|
4326 |
-
|
4327 |
-
|
4328 |
-
|
4329 |
-
|
4330 |
-
|
4331 |
-
|
4332 |
-
|
4333 |
-
|
4334 |
-
|
4335 |
-
|
4336 |
-
|
4337 |
-
|
4338 |
-
|
4339 |
-
|
4340 |
-
|
4341 |
-
var
|
4342 |
-
|
4343 |
-
|
4344 |
-
var
|
4345 |
-
|
4346 |
-
|
4347 |
-
|
4348 |
-
|
4349 |
-
|
4350 |
-
|
4351 |
-
|
4352 |
-
|
4353 |
-
|
4354 |
-
|
4355 |
-
|
4356 |
-
|
4357 |
-
|
4358 |
-
|
4359 |
-
|
4360 |
-
|
4361 |
-
|
4362 |
-
|
4363 |
-
|
4364 |
-
|
4365 |
-
|
4366 |
-
|
4367 |
-
|
4368 |
-
|
4369 |
-
var
|
4370 |
-
|
4371 |
-
|
4372 |
-
|
4373 |
-
|
4374 |
-
|
4375 |
-
|
4376 |
-
|
4377 |
-
|
4378 |
-
|
4379 |
-
|
4380 |
-
|
4381 |
-
|
4382 |
-
|
4383 |
-
|
4384 |
-
|
4385 |
-
|
4386 |
-
|
4387 |
-
|
4388 |
-
|
4389 |
-
|
4390 |
-
|
4391 |
-
|
4392 |
-
|
4393 |
-
|
4394 |
-
|
4395 |
-
|
4396 |
-
|
4397 |
-
|
4398 |
-
|
4399 |
-
|
4400 |
-
if (
|
4401 |
-
|
4402 |
-
|
4403 |
-
|
4404 |
-
|
4405 |
-
|
4406 |
-
|
4407 |
-
|
4408 |
-
|
4409 |
-
|
4410 |
-
|
4411 |
-
|
4412 |
-
|
4413 |
-
|
4414 |
-
|
4415 |
-
|
4416 |
-
|
4417 |
-
|
4418 |
-
|
4419 |
-
|
4420 |
-
|
4421 |
-
|
4422 |
-
|
4423 |
-
|
4424 |
-
|
4425 |
-
|
4426 |
-
|
4427 |
-
|
4428 |
-
|
4429 |
-
|
4430 |
-
|
4431 |
-
|
4432 |
-
this
|
4433 |
-
|
4434 |
-
|
4435 |
-
|
4436 |
-
|
4437 |
-
|
4438 |
-
|
4439 |
-
}
|
4440 |
-
|
4441 |
-
|
4442 |
-
|
4443 |
-
|
4444 |
-
|
4445 |
-
|
4446 |
-
|
4447 |
-
|
4448 |
-
|
4449 |
-
|
4450 |
-
|
4451 |
-
|
4452 |
-
|
4453 |
-
|
4454 |
-
|
4455 |
-
|
4456 |
-
|
4457 |
-
|
4458 |
-
|
4459 |
-
|
4460 |
-
|
4461 |
-
|
4462 |
-
|
4463 |
-
|
4464 |
-
|
4465 |
-
}
|
4466 |
-
|
4467 |
-
|
4468 |
-
}
|
4469 |
-
|
4470 |
-
MinimumResultsForSearch
|
4471 |
-
|
4472 |
-
|
4473 |
-
|
4474 |
-
|
4475 |
-
|
4476 |
-
|
4477 |
-
|
4478 |
-
|
4479 |
-
|
4480 |
-
|
4481 |
-
|
4482 |
-
|
4483 |
-
|
4484 |
-
|
4485 |
-
|
4486 |
-
|
4487 |
-
|
4488 |
-
|
4489 |
-
|
4490 |
-
|
4491 |
-
|
4492 |
-
|
4493 |
-
|
4494 |
-
}
|
4495 |
-
|
4496 |
-
SelectOnClose.prototype.
|
4497 |
-
|
4498 |
-
|
4499 |
-
|
4500 |
-
|
4501 |
-
|
4502 |
-
|
4503 |
-
|
4504 |
-
|
4505 |
-
|
4506 |
-
|
4507 |
-
|
4508 |
-
|
4509 |
-
|
4510 |
-
|
4511 |
-
|
4512 |
-
|
4513 |
-
|
4514 |
-
|
4515 |
-
|
4516 |
-
|
4517 |
-
|
4518 |
-
|
4519 |
-
|
4520 |
-
) {
|
4521 |
-
return;
|
4522 |
-
}
|
4523 |
-
|
4524 |
-
|
4525 |
-
|
4526 |
-
|
4527 |
-
|
4528 |
-
|
4529 |
-
|
4530 |
-
|
4531 |
-
|
4532 |
-
|
4533 |
-
|
4534 |
-
|
4535 |
-
|
4536 |
-
|
4537 |
-
|
4538 |
-
|
4539 |
-
|
4540 |
-
|
4541 |
-
|
4542 |
-
|
4543 |
-
|
4544 |
-
|
4545 |
-
|
4546 |
-
|
4547 |
-
|
4548 |
-
|
4549 |
-
|
4550 |
-
|
4551 |
-
|
4552 |
-
|
4553 |
-
|
4554 |
-
|
4555 |
-
|
4556 |
-
|
4557 |
-
|
4558 |
-
|
4559 |
-
|
4560 |
-
|
4561 |
-
|
4562 |
-
|
4563 |
-
|
4564 |
-
|
4565 |
-
|
4566 |
-
|
4567 |
-
|
4568 |
-
|
4569 |
-
|
4570 |
-
|
4571 |
-
|
4572 |
-
|
4573 |
-
|
4574 |
-
|
4575 |
-
|
4576 |
-
|
4577 |
-
|
4578 |
-
|
4579 |
-
|
4580 |
-
|
4581 |
-
|
4582 |
-
|
4583 |
-
|
4584 |
-
|
4585 |
-
|
4586 |
-
|
4587 |
-
|
4588 |
-
|
4589 |
-
|
4590 |
-
|
4591 |
-
|
4592 |
-
|
4593 |
-
return
|
4594 |
-
},
|
4595 |
-
|
4596 |
-
var
|
4597 |
-
|
4598 |
-
|
4599 |
-
|
4600 |
-
|
4601 |
-
|
4602 |
-
|
4603 |
-
|
4604 |
-
|
4605 |
-
|
4606 |
-
|
4607 |
-
|
4608 |
-
|
4609 |
-
|
4610 |
-
|
4611 |
-
|
4612 |
-
|
4613 |
-
|
4614 |
-
|
4615 |
-
|
4616 |
-
|
4617 |
-
|
4618 |
-
|
4619 |
-
|
4620 |
-
|
4621 |
-
|
4622 |
-
|
4623 |
-
|
4624 |
-
'
|
4625 |
-
|
4626 |
-
|
4627 |
-
'./
|
4628 |
-
|
4629 |
-
|
4630 |
-
'./
|
4631 |
-
'./
|
4632 |
-
'./
|
4633 |
-
'./
|
4634 |
-
'./
|
4635 |
-
|
4636 |
-
'./
|
4637 |
-
'./
|
4638 |
-
|
4639 |
-
|
4640 |
-
'./
|
4641 |
-
'./
|
4642 |
-
'./
|
4643 |
-
'./
|
4644 |
-
'./
|
4645 |
-
'./
|
4646 |
-
'./
|
4647 |
-
|
4648 |
-
|
4649 |
-
|
4650 |
-
|
4651 |
-
|
4652 |
-
|
4653 |
-
|
4654 |
-
|
4655 |
-
|
4656 |
-
|
4657 |
-
|
4658 |
-
|
4659 |
-
|
4660 |
-
|
4661 |
-
|
4662 |
-
|
4663 |
-
|
4664 |
-
|
4665 |
-
|
4666 |
-
|
4667 |
-
|
4668 |
-
|
4669 |
-
|
4670 |
-
|
4671 |
-
|
4672 |
-
|
4673 |
-
|
4674 |
-
|
4675 |
-
|
4676 |
-
|
4677 |
-
|
4678 |
-
|
4679 |
-
|
4680 |
-
|
4681 |
-
|
4682 |
-
|
4683 |
-
|
4684 |
-
|
4685 |
-
|
4686 |
-
|
4687 |
-
|
4688 |
-
|
4689 |
-
|
4690 |
-
|
4691 |
-
|
4692 |
-
|
4693 |
-
|
4694 |
-
|
4695 |
-
|
4696 |
-
|
4697 |
-
|
4698 |
-
|
4699 |
-
|
4700 |
-
|
4701 |
-
|
4702 |
-
|
4703 |
-
|
4704 |
-
|
4705 |
-
|
4706 |
-
|
4707 |
-
|
4708 |
-
|
4709 |
-
|
4710 |
-
|
4711 |
-
|
4712 |
-
|
4713 |
-
|
4714 |
-
|
4715 |
-
|
4716 |
-
|
4717 |
-
|
4718 |
-
|
4719 |
-
|
4720 |
-
|
4721 |
-
|
4722 |
-
|
4723 |
-
|
4724 |
-
|
4725 |
-
|
4726 |
-
|
4727 |
-
|
4728 |
-
|
4729 |
-
|
4730 |
-
|
4731 |
-
|
4732 |
-
|
4733 |
-
|
4734 |
-
|
4735 |
-
|
4736 |
-
|
4737 |
-
|
4738 |
-
|
4739 |
-
|
4740 |
-
|
4741 |
-
|
4742 |
-
|
4743 |
-
|
4744 |
-
|
4745 |
-
|
4746 |
-
|
4747 |
-
|
4748 |
-
|
4749 |
-
|
4750 |
-
|
4751 |
-
|
4752 |
-
|
4753 |
-
|
4754 |
-
|
4755 |
-
|
4756 |
-
|
4757 |
-
|
4758 |
-
|
4759 |
-
|
4760 |
-
|
4761 |
-
|
4762 |
-
|
4763 |
-
|
4764 |
-
}
|
4765 |
-
|
4766 |
-
|
4767 |
-
|
4768 |
-
|
4769 |
-
|
4770 |
-
|
4771 |
-
|
4772 |
-
|
4773 |
-
|
4774 |
-
|
4775 |
-
|
4776 |
-
|
4777 |
-
|
4778 |
-
|
4779 |
-
|
4780 |
-
|
4781 |
-
|
4782 |
-
|
4783 |
-
|
4784 |
-
|
4785 |
-
|
4786 |
-
|
4787 |
-
|
4788 |
-
|
4789 |
-
|
4790 |
-
|
4791 |
-
|
4792 |
-
|
4793 |
-
|
4794 |
-
|
4795 |
-
|
4796 |
-
|
4797 |
-
|
4798 |
-
|
4799 |
-
|
4800 |
-
|
4801 |
-
|
4802 |
-
|
4803 |
-
|
4804 |
-
|
4805 |
-
|
4806 |
-
|
4807 |
-
|
4808 |
-
|
4809 |
-
|
4810 |
-
|
4811 |
-
|
4812 |
-
}
|
4813 |
-
|
4814 |
-
|
4815 |
-
|
4816 |
-
|
4817 |
-
|
4818 |
-
|
4819 |
-
|
4820 |
-
|
4821 |
-
|
4822 |
-
|
4823 |
-
|
4824 |
-
|
4825 |
-
|
4826 |
-
|
4827 |
-
|
4828 |
-
|
4829 |
-
|
4830 |
-
|
4831 |
-
|
4832 |
-
|
4833 |
-
|
4834 |
-
|
4835 |
-
|
4836 |
-
|
4837 |
-
|
4838 |
-
|
4839 |
-
|
4840 |
-
|
4841 |
-
|
4842 |
-
|
4843 |
-
|
4844 |
-
|
4845 |
-
|
4846 |
-
|
4847 |
-
|
4848 |
-
|
4849 |
-
|
4850 |
-
|
4851 |
-
|
4852 |
-
|
4853 |
-
|
4854 |
-
|
4855 |
-
|
4856 |
-
|
4857 |
-
|
4858 |
-
|
4859 |
-
|
4860 |
-
|
4861 |
-
|
4862 |
-
|
4863 |
-
|
4864 |
-
|
4865 |
-
|
4866 |
-
|
4867 |
-
|
4868 |
-
|
4869 |
-
|
4870 |
-
|
4871 |
-
|
4872 |
-
|
4873 |
-
|
4874 |
-
|
4875 |
-
|
4876 |
-
|
4877 |
-
|
4878 |
-
|
4879 |
-
|
4880 |
-
|
4881 |
-
|
4882 |
-
|
4883 |
-
|
4884 |
-
|
4885 |
-
|
4886 |
-
|
4887 |
-
|
4888 |
-
|
4889 |
-
|
4890 |
-
|
4891 |
-
|
4892 |
-
|
4893 |
-
|
4894 |
-
|
4895 |
-
|
4896 |
-
|
4897 |
-
|
4898 |
-
|
4899 |
-
|
4900 |
-
|
4901 |
-
|
4902 |
-
|
4903 |
-
|
4904 |
-
|
4905 |
-
|
4906 |
-
|
4907 |
-
|
4908 |
-
|
4909 |
-
|
4910 |
-
|
4911 |
-
|
4912 |
-
|
4913 |
-
|
4914 |
-
|
4915 |
-
|
4916 |
-
|
4917 |
-
|
4918 |
-
|
4919 |
-
|
4920 |
-
|
4921 |
-
|
4922 |
-
|
4923 |
-
|
4924 |
-
|
4925 |
-
|
4926 |
-
|
4927 |
-
|
4928 |
-
|
4929 |
-
|
4930 |
-
|
4931 |
-
|
4932 |
-
|
4933 |
-
|
4934 |
-
|
4935 |
-
|
4936 |
-
|
4937 |
-
|
4938 |
-
|
4939 |
-
|
4940 |
-
|
4941 |
-
|
4942 |
-
|
4943 |
-
|
4944 |
-
|
4945 |
-
|
4946 |
-
|
4947 |
-
|
4948 |
-
|
4949 |
-
|
4950 |
-
|
4951 |
-
|
4952 |
-
|
4953 |
-
|
4954 |
-
|
4955 |
-
|
4956 |
-
|
4957 |
-
|
4958 |
-
|
4959 |
-
|
4960 |
-
|
4961 |
-
|
4962 |
-
|
4963 |
-
|
4964 |
-
|
4965 |
-
|
4966 |
-
|
4967 |
-
|
4968 |
-
|
4969 |
-
|
4970 |
-
|
4971 |
-
|
4972 |
-
|
4973 |
-
|
4974 |
-
|
4975 |
-
|
4976 |
-
|
4977 |
-
|
4978 |
-
|
4979 |
-
|
4980 |
-
|
4981 |
-
|
4982 |
-
|
4983 |
-
|
4984 |
-
|
4985 |
-
|
4986 |
-
|
4987 |
-
|
4988 |
-
|
4989 |
-
|
4990 |
-
|
4991 |
-
|
4992 |
-
|
4993 |
-
|
4994 |
-
|
4995 |
-
|
4996 |
-
|
4997 |
-
|
4998 |
-
|
4999 |
-
|
5000 |
-
|
5001 |
-
|
5002 |
-
|
5003 |
-
|
5004 |
-
|
5005 |
-
|
5006 |
-
|
5007 |
-
|
5008 |
-
|
5009 |
-
|
5010 |
-
|
5011 |
-
|
5012 |
-
|
5013 |
-
|
5014 |
-
|
5015 |
-
|
5016 |
-
|
5017 |
-
|
5018 |
-
|
5019 |
-
|
5020 |
-
|
5021 |
-
|
5022 |
-
|
5023 |
-
|
5024 |
-
|
5025 |
-
|
5026 |
-
|
5027 |
-
|
5028 |
-
|
5029 |
-
|
5030 |
-
|
5031 |
-
|
5032 |
-
|
5033 |
-
|
5034 |
-
|
5035 |
-
|
5036 |
-
|
5037 |
-
|
5038 |
-
|
5039 |
-
|
5040 |
-
|
5041 |
-
|
5042 |
-
|
5043 |
-
|
5044 |
-
|
5045 |
-
|
5046 |
-
|
5047 |
-
|
5048 |
-
|
5049 |
-
|
5050 |
-
|
5051 |
-
|
5052 |
-
|
5053 |
-
|
5054 |
-
|
5055 |
-
|
5056 |
-
|
5057 |
-
|
5058 |
-
this.options.
|
5059 |
-
} else {
|
5060 |
-
this.options.
|
5061 |
-
}
|
5062 |
-
}
|
5063 |
-
|
5064 |
-
|
5065 |
-
|
5066 |
-
|
5067 |
-
|
5068 |
-
|
5069 |
-
|
5070 |
-
|
5071 |
-
|
5072 |
-
|
5073 |
-
|
5074 |
-
|
5075 |
-
|
5076 |
-
|
5077 |
-
|
5078 |
-
|
5079 |
-
|
5080 |
-
|
5081 |
-
|
5082 |
-
|
5083 |
-
|
5084 |
-
|
5085 |
-
|
5086 |
-
|
5087 |
-
|
5088 |
-
|
5089 |
-
|
5090 |
-
|
5091 |
-
|
5092 |
-
|
5093 |
-
|
5094 |
-
|
5095 |
-
|
5096 |
-
|
5097 |
-
|
5098 |
-
|
5099 |
-
|
5100 |
-
|
5101 |
-
|
5102 |
-
}
|
5103 |
-
|
5104 |
-
var
|
5105 |
-
|
5106 |
-
|
5107 |
-
|
5108 |
-
|
5109 |
-
|
5110 |
-
|
5111 |
-
|
5112 |
-
|
5113 |
-
|
5114 |
-
|
5115 |
-
|
5116 |
-
|
5117 |
-
|
5118 |
-
|
5119 |
-
|
5120 |
-
|
5121 |
-
|
5122 |
-
|
5123 |
-
|
5124 |
-
|
5125 |
-
|
5126 |
-
|
5127 |
-
|
5128 |
-
|
5129 |
-
|
5130 |
-
|
5131 |
-
|
5132 |
-
|
5133 |
-
|
5134 |
-
|
5135 |
-
|
5136 |
-
|
5137 |
-
|
5138 |
-
|
5139 |
-
|
5140 |
-
|
5141 |
-
|
5142 |
-
|
5143 |
-
|
5144 |
-
|
5145 |
-
|
5146 |
-
|
5147 |
-
|
5148 |
-
|
5149 |
-
|
5150 |
-
|
5151 |
-
|
5152 |
-
|
5153 |
-
|
5154 |
-
|
5155 |
-
|
5156 |
-
|
5157 |
-
|
5158 |
-
|
5159 |
-
|
5160 |
-
|
5161 |
-
|
5162 |
-
|
5163 |
-
|
5164 |
-
|
5165 |
-
|
5166 |
-
|
5167 |
-
|
5168 |
-
|
5169 |
-
|
5170 |
-
|
5171 |
-
|
5172 |
-
|
5173 |
-
|
5174 |
-
this.
|
5175 |
-
|
5176 |
-
var
|
5177 |
-
|
5178 |
-
this
|
5179 |
-
|
5180 |
-
this.
|
5181 |
-
|
5182 |
-
|
5183 |
-
|
5184 |
-
this
|
5185 |
-
|
5186 |
-
this.
|
5187 |
-
|
5188 |
-
|
5189 |
-
|
5190 |
-
|
5191 |
-
|
5192 |
-
|
5193 |
-
this.
|
5194 |
-
|
5195 |
-
|
5196 |
-
this.
|
5197 |
-
|
5198 |
-
//
|
5199 |
-
|
5200 |
-
this
|
5201 |
-
|
5202 |
-
|
5203 |
-
this.
|
5204 |
-
|
5205 |
-
//
|
5206 |
-
this.
|
5207 |
-
|
5208 |
-
|
5209 |
-
|
5210 |
-
|
5211 |
-
|
5212 |
-
|
5213 |
-
|
5214 |
-
|
5215 |
-
|
5216 |
-
|
5217 |
-
|
5218 |
-
|
5219 |
-
|
5220 |
-
|
5221 |
-
|
5222 |
-
|
5223 |
-
|
5224 |
-
|
5225 |
-
|
5226 |
-
|
5227 |
-
|
5228 |
-
|
5229 |
-
|
5230 |
-
|
5231 |
-
|
5232 |
-
|
5233 |
-
|
5234 |
-
|
5235 |
-
|
5236 |
-
|
5237 |
-
|
5238 |
-
|
5239 |
-
|
5240 |
-
|
5241 |
-
|
5242 |
-
$
|
5243 |
-
|
5244 |
-
|
5245 |
-
|
5246 |
-
|
5247 |
-
|
5248 |
-
|
5249 |
-
|
5250 |
-
|
5251 |
-
|
5252 |
-
|
5253 |
-
|
5254 |
-
|
5255 |
-
|
5256 |
-
|
5257 |
-
|
5258 |
-
|
5259 |
-
|
5260 |
-
|
5261 |
-
|
5262 |
-
|
5263 |
-
|
5264 |
-
|
5265 |
-
|
5266 |
-
|
5267 |
-
|
5268 |
-
|
5269 |
-
|
5270 |
-
|
5271 |
-
|
5272 |
-
|
5273 |
-
|
5274 |
-
|
5275 |
-
|
5276 |
-
|
5277 |
-
|
5278 |
-
|
5279 |
-
|
5280 |
-
|
5281 |
-
|
5282 |
-
|
5283 |
-
|
5284 |
-
|
5285 |
-
|
5286 |
-
|
5287 |
-
|
5288 |
-
|
5289 |
-
|
5290 |
-
|
5291 |
-
|
5292 |
-
|
5293 |
-
|
5294 |
-
|
5295 |
-
|
5296 |
-
|
5297 |
-
|
5298 |
-
|
5299 |
-
|
5300 |
-
|
5301 |
-
|
5302 |
-
|
5303 |
-
|
5304 |
-
|
5305 |
-
|
5306 |
-
|
5307 |
-
|
5308 |
-
|
5309 |
-
|
5310 |
-
|
5311 |
-
|
5312 |
-
|
5313 |
-
|
5314 |
-
|
5315 |
-
|
5316 |
-
|
5317 |
-
|
5318 |
-
|
5319 |
-
|
5320 |
-
|
5321 |
-
|
5322 |
-
this.
|
5323 |
-
|
5324 |
-
|
5325 |
-
|
5326 |
-
|
5327 |
-
|
5328 |
-
|
5329 |
-
|
5330 |
-
|
5331 |
-
|
5332 |
-
|
5333 |
-
|
5334 |
-
|
5335 |
-
|
5336 |
-
|
5337 |
-
|
5338 |
-
this
|
5339 |
-
|
5340 |
-
|
5341 |
-
|
5342 |
-
|
5343 |
-
|
5344 |
-
|
5345 |
-
|
5346 |
-
|
5347 |
-
|
5348 |
-
|
5349 |
-
|
5350 |
-
|
5351 |
-
|
5352 |
-
|
5353 |
-
|
5354 |
-
|
5355 |
-
|
5356 |
-
|
5357 |
-
|
5358 |
-
|
5359 |
-
|
5360 |
-
|
5361 |
-
|
5362 |
-
|
5363 |
-
|
5364 |
-
|
5365 |
-
|
5366 |
-
|
5367 |
-
|
5368 |
-
|
5369 |
-
|
5370 |
-
|
5371 |
-
|
5372 |
-
|
5373 |
-
|
5374 |
-
|
5375 |
-
|
5376 |
-
|
5377 |
-
|
5378 |
-
this.
|
5379 |
-
self.
|
5380 |
-
});
|
5381 |
-
|
5382 |
-
|
5383 |
-
|
5384 |
-
|
5385 |
-
|
5386 |
-
|
5387 |
-
|
5388 |
-
|
5389 |
-
|
5390 |
-
|
5391 |
-
|
5392 |
-
|
5393 |
-
|
5394 |
-
|
5395 |
-
|
5396 |
-
|
5397 |
-
|
5398 |
-
|
5399 |
-
|
5400 |
-
|
5401 |
-
|
5402 |
-
|
5403 |
-
|
5404 |
-
|
5405 |
-
|
5406 |
-
|
5407 |
-
|
5408 |
-
|
5409 |
-
|
5410 |
-
|
5411 |
-
|
5412 |
-
|
5413 |
-
|
5414 |
-
|
5415 |
-
|
5416 |
-
|
5417 |
-
|
5418 |
-
|
5419 |
-
|
5420 |
-
|
5421 |
-
|
5422 |
-
|
5423 |
-
|
5424 |
-
|
5425 |
-
|
5426 |
-
|
5427 |
-
|
5428 |
-
|
5429 |
-
|
5430 |
-
|
5431 |
-
|
5432 |
-
|
5433 |
-
|
5434 |
-
|
5435 |
-
|
5436 |
-
|
5437 |
-
|
5438 |
-
|
5439 |
-
|
5440 |
-
|
5441 |
-
});
|
5442 |
-
|
5443 |
-
this.on('query
|
5444 |
-
|
5445 |
-
self.trigger('
|
5446 |
-
|
5447 |
-
|
5448 |
-
|
5449 |
-
|
5450 |
-
|
5451 |
-
|
5452 |
-
|
5453 |
-
|
5454 |
-
|
5455 |
-
|
5456 |
-
|
5457 |
-
|
5458 |
-
|
5459 |
-
|
5460 |
-
|
5461 |
-
}
|
5462 |
-
|
5463 |
-
|
5464 |
-
|
5465 |
-
|
5466 |
-
|
5467 |
-
|
5468 |
-
|
5469 |
-
|
5470 |
-
|
5471 |
-
|
5472 |
-
|
5473 |
-
|
5474 |
-
|
5475 |
-
|
5476 |
-
|
5477 |
-
|
5478 |
-
|
5479 |
-
|
5480 |
-
|
5481 |
-
|
5482 |
-
|
5483 |
-
|
5484 |
-
|
5485 |
-
|
5486 |
-
|
5487 |
-
|
5488 |
-
|
5489 |
-
|
5490 |
-
|
5491 |
-
|
5492 |
-
|
5493 |
-
|
5494 |
-
|
5495 |
-
|
5496 |
-
|
5497 |
-
|
5498 |
-
|
5499 |
-
|
5500 |
-
|
5501 |
-
|
5502 |
-
|
5503 |
-
|
5504 |
-
|
5505 |
-
|
5506 |
-
|
5507 |
-
|
5508 |
-
|
5509 |
-
|
5510 |
-
|
5511 |
-
|
5512 |
-
)
|
5513 |
-
|
5514 |
-
|
5515 |
-
|
5516 |
-
|
5517 |
-
|
5518 |
-
|
5519 |
-
|
5520 |
-
|
5521 |
-
|
5522 |
-
|
5523 |
-
|
5524 |
-
|
5525 |
-
|
5526 |
-
|
5527 |
-
|
5528 |
-
|
5529 |
-
|
5530 |
-
|
5531 |
-
|
5532 |
-
|
5533 |
-
|
5534 |
-
if (
|
5535 |
-
|
5536 |
-
|
5537 |
-
|
5538 |
-
|
5539 |
-
|
5540 |
-
|
5541 |
-
|
5542 |
-
|
5543 |
-
|
5544 |
-
|
5545 |
-
|
5546 |
-
|
5547 |
-
|
5548 |
-
|
5549 |
-
|
5550 |
-
|
5551 |
-
|
5552 |
-
|
5553 |
-
|
5554 |
-
|
5555 |
-
|
5556 |
-
|
5557 |
-
|
5558 |
-
|
5559 |
-
|
5560 |
-
|
5561 |
-
|
5562 |
-
|
5563 |
-
|
5564 |
-
|
5565 |
-
|
5566 |
-
|
5567 |
-
|
5568 |
-
|
5569 |
-
|
5570 |
-
|
5571 |
-
|
5572 |
-
|
5573 |
-
|
5574 |
-
|
5575 |
-
|
5576 |
-
|
5577 |
-
|
5578 |
-
|
5579 |
-
|
5580 |
-
|
5581 |
-
|
5582 |
-
|
5583 |
-
|
5584 |
-
|
5585 |
-
|
5586 |
-
|
5587 |
-
|
5588 |
-
|
5589 |
-
|
5590 |
-
|
5591 |
-
|
5592 |
-
|
5593 |
-
|
5594 |
-
|
5595 |
-
|
5596 |
-
|
5597 |
-
|
5598 |
-
|
5599 |
-
|
5600 |
-
|
5601 |
-
|
5602 |
-
|
5603 |
-
|
5604 |
-
|
5605 |
-
|
5606 |
-
|
5607 |
-
|
5608 |
-
|
5609 |
-
|
5610 |
-
|
5611 |
-
|
5612 |
-
|
5613 |
-
|
5614 |
-
|
5615 |
-
|
5616 |
-
|
5617 |
-
|
5618 |
-
|
5619 |
-
|
5620 |
-
|
5621 |
-
|
5622 |
-
|
5623 |
-
this.$container.
|
5624 |
-
|
5625 |
-
|
5626 |
-
|
5627 |
-
|
5628 |
-
|
5629 |
-
|
5630 |
-
|
5631 |
-
|
5632 |
-
|
5633 |
-
|
5634 |
-
}
|
5635 |
-
|
5636 |
-
|
5637 |
-
|
5638 |
-
|
5639 |
-
|
5640 |
-
|
5641 |
-
|
5642 |
-
|
5643 |
-
|
5644 |
-
|
5645 |
-
|
5646 |
-
|
5647 |
-
|
5648 |
-
|
5649 |
-
|
5650 |
-
|
5651 |
-
|
5652 |
-
|
5653 |
-
|
5654 |
-
|
5655 |
-
|
5656 |
-
|
5657 |
-
|
5658 |
-
|
5659 |
-
|
5660 |
-
|
5661 |
-
|
5662 |
-
|
5663 |
-
|
5664 |
-
|
5665 |
-
|
5666 |
-
|
5667 |
-
|
5668 |
-
|
5669 |
-
|
5670 |
-
|
5671 |
-
|
5672 |
-
|
5673 |
-
|
5674 |
-
|
5675 |
-
|
5676 |
-
|
5677 |
-
if (
|
5678 |
-
|
5679 |
-
|
5680 |
-
|
5681 |
-
|
5682 |
-
|
5683 |
-
|
5684 |
-
|
5685 |
-
|
5686 |
-
|
5687 |
-
|
5688 |
-
|
5689 |
-
|
5690 |
-
|
5691 |
-
|
5692 |
-
|
5693 |
-
|
5694 |
-
|
5695 |
-
|
5696 |
-
|
5697 |
-
|
5698 |
-
|
5699 |
-
|
5700 |
-
|
5701 |
-
|
5702 |
-
|
5703 |
-
|
5704 |
-
|
5705 |
-
|
5706 |
-
this.
|
5707 |
-
|
5708 |
-
|
5709 |
-
this.$element.
|
5710 |
-
|
5711 |
-
|
5712 |
-
|
5713 |
-
|
5714 |
-
|
5715 |
-
|
5716 |
-
|
5717 |
-
|
5718 |
-
this.
|
5719 |
-
this.
|
5720 |
-
|
5721 |
-
this.
|
5722 |
-
this.
|
5723 |
-
this
|
5724 |
-
|
5725 |
-
|
5726 |
-
|
5727 |
-
|
5728 |
-
|
5729 |
-
|
5730 |
-
|
5731 |
-
|
5732 |
-
|
5733 |
-
);
|
5734 |
-
|
5735 |
-
|
5736 |
-
|
5737 |
-
this
|
5738 |
-
|
5739 |
-
|
5740 |
-
|
5741 |
-
|
5742 |
-
|
5743 |
-
|
5744 |
-
|
5745 |
-
|
5746 |
-
|
5747 |
-
|
5748 |
-
|
5749 |
-
|
5750 |
-
|
5751 |
-
|
5752 |
-
|
5753 |
-
|
5754 |
-
|
5755 |
-
|
5756 |
-
|
5757 |
-
|
5758 |
-
|
5759 |
-
|
5760 |
-
|
5761 |
-
|
5762 |
-
|
5763 |
-
|
5764 |
-
|
5765 |
-
|
5766 |
-
|
5767 |
-
|
5768 |
-
|
5769 |
-
|
5770 |
-
|
5771 |
-
|
5772 |
-
|
5773 |
-
|
5774 |
-
|
5775 |
-
|
5776 |
-
|
5777 |
-
|
5778 |
-
|
5779 |
-
}
|
5780 |
-
|
5781 |
-
|
5782 |
-
|
5783 |
-
|
5784 |
-
|
5785 |
-
|
5786 |
-
|
5787 |
-
|
5788 |
-
|
5789 |
-
|
5790 |
-
|
5791 |
-
|
5792 |
-
|
5793 |
-
|
5794 |
-
|
5795 |
-
|
5796 |
-
|
5797 |
-
|
5798 |
-
|
5799 |
-
|
5800 |
-
|
5801 |
-
|
5802 |
-
|
5803 |
-
|
5804 |
-
|
5805 |
-
|
5806 |
-
|
5807 |
-
|
5808 |
-
|
5809 |
-
|
5810 |
-
|
5811 |
-
|
5812 |
-
|
5813 |
-
|
5814 |
-
|
5815 |
-
|
5816 |
-
|
5817 |
-
|
5818 |
-
|
5819 |
-
|
5820 |
-
|
5821 |
-
|
5822 |
-
|
5823 |
-
|
5824 |
-
|
5825 |
-
|
5826 |
-
|
5827 |
-
|
5828 |
-
|
5829 |
-
|
5830 |
-
|
5831 |
-
|
5832 |
-
|
5833 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*!
|
2 |
+
* Select2 4.0.6-rc.1
|
3 |
+
* https://select2.github.io
|
4 |
+
*
|
5 |
+
* Released under the MIT license
|
6 |
+
* https://github.com/select2/select2/blob/master/LICENSE.md
|
7 |
+
*/
|
8 |
+
;(function (factory) {
|
9 |
+
if (typeof define === 'function' && define.amd) {
|
10 |
+
// AMD. Register as an anonymous module.
|
11 |
+
define(['jquery'], factory);
|
12 |
+
} else if (typeof module === 'object' && module.exports) {
|
13 |
+
// Node/CommonJS
|
14 |
+
module.exports = function (root, jQuery) {
|
15 |
+
if (jQuery === undefined) {
|
16 |
+
// require('jQuery') returns a factory that requires window to
|
17 |
+
// build a jQuery instance, we normalize how we use modules
|
18 |
+
// that require this pattern but the window provided is a noop
|
19 |
+
// if it's defined (how jquery works)
|
20 |
+
if (typeof window !== 'undefined') {
|
21 |
+
jQuery = require('jquery');
|
22 |
+
}
|
23 |
+
else {
|
24 |
+
jQuery = require('jquery')(root);
|
25 |
+
}
|
26 |
+
}
|
27 |
+
factory(jQuery);
|
28 |
+
return jQuery;
|
29 |
+
};
|
30 |
+
} else {
|
31 |
+
// Browser globals
|
32 |
+
factory(jQuery);
|
33 |
+
}
|
34 |
+
} (function (jQuery) {
|
35 |
+
// This is needed so we can catch the AMD loader configuration and use it
|
36 |
+
// The inner file should be wrapped (by `banner.start.js`) in a function that
|
37 |
+
// returns the AMD loader references.
|
38 |
+
var S2 =(function () {
|
39 |
+
// Restore the Select2 AMD loader so it can be used
|
40 |
+
// Needed mostly in the language files, where the loader is not inserted
|
41 |
+
if (jQuery && jQuery.fn && jQuery.fn.select2 && jQuery.fn.select2.amd) {
|
42 |
+
var S2 = jQuery.fn.select2.amd;
|
43 |
+
}
|
44 |
+
var S2;(function () { if (!S2 || !S2.requirejs) {
|
45 |
+
if (!S2) { S2 = {}; } else { require = S2; }
|
46 |
+
/**
|
47 |
+
* @license almond 0.3.3 Copyright jQuery Foundation and other contributors.
|
48 |
+
* Released under MIT license, http://github.com/requirejs/almond/LICENSE
|
49 |
+
*/
|
50 |
+
//Going sloppy to avoid 'use strict' string cost, but strict practices should
|
51 |
+
//be followed.
|
52 |
+
/*global setTimeout: false */
|
53 |
+
|
54 |
+
var requirejs, require, define;
|
55 |
+
(function (undef) {
|
56 |
+
var main, req, makeMap, handlers,
|
57 |
+
defined = {},
|
58 |
+
waiting = {},
|
59 |
+
config = {},
|
60 |
+
defining = {},
|
61 |
+
hasOwn = Object.prototype.hasOwnProperty,
|
62 |
+
aps = [].slice,
|
63 |
+
jsSuffixRegExp = /\.js$/;
|
64 |
+
|
65 |
+
function hasProp(obj, prop) {
|
66 |
+
return hasOwn.call(obj, prop);
|
67 |
+
}
|
68 |
+
|
69 |
+
/**
|
70 |
+
* Given a relative module name, like ./something, normalize it to
|
71 |
+
* a real name that can be mapped to a path.
|
72 |
+
* @param {String} name the relative name
|
73 |
+
* @param {String} baseName a real name that the name arg is relative
|
74 |
+
* to.
|
75 |
+
* @returns {String} normalized name
|
76 |
+
*/
|
77 |
+
function normalize(name, baseName) {
|
78 |
+
var nameParts, nameSegment, mapValue, foundMap, lastIndex,
|
79 |
+
foundI, foundStarMap, starI, i, j, part, normalizedBaseParts,
|
80 |
+
baseParts = baseName && baseName.split("/"),
|
81 |
+
map = config.map,
|
82 |
+
starMap = (map && map['*']) || {};
|
83 |
+
|
84 |
+
//Adjust any relative paths.
|
85 |
+
if (name) {
|
86 |
+
name = name.split('/');
|
87 |
+
lastIndex = name.length - 1;
|
88 |
+
|
89 |
+
// If wanting node ID compatibility, strip .js from end
|
90 |
+
// of IDs. Have to do this here, and not in nameToUrl
|
91 |
+
// because node allows either .js or non .js to map
|
92 |
+
// to same file.
|
93 |
+
if (config.nodeIdCompat && jsSuffixRegExp.test(name[lastIndex])) {
|
94 |
+
name[lastIndex] = name[lastIndex].replace(jsSuffixRegExp, '');
|
95 |
+
}
|
96 |
+
|
97 |
+
// Starts with a '.' so need the baseName
|
98 |
+
if (name[0].charAt(0) === '.' && baseParts) {
|
99 |
+
//Convert baseName to array, and lop off the last part,
|
100 |
+
//so that . matches that 'directory' and not name of the baseName's
|
101 |
+
//module. For instance, baseName of 'one/two/three', maps to
|
102 |
+
//'one/two/three.js', but we want the directory, 'one/two' for
|
103 |
+
//this normalization.
|
104 |
+
normalizedBaseParts = baseParts.slice(0, baseParts.length - 1);
|
105 |
+
name = normalizedBaseParts.concat(name);
|
106 |
+
}
|
107 |
+
|
108 |
+
//start trimDots
|
109 |
+
for (i = 0; i < name.length; i++) {
|
110 |
+
part = name[i];
|
111 |
+
if (part === '.') {
|
112 |
+
name.splice(i, 1);
|
113 |
+
i -= 1;
|
114 |
+
} else if (part === '..') {
|
115 |
+
// If at the start, or previous value is still ..,
|
116 |
+
// keep them so that when converted to a path it may
|
117 |
+
// still work when converted to a path, even though
|
118 |
+
// as an ID it is less than ideal. In larger point
|
119 |
+
// releases, may be better to just kick out an error.
|
120 |
+
if (i === 0 || (i === 1 && name[2] === '..') || name[i - 1] === '..') {
|
121 |
+
continue;
|
122 |
+
} else if (i > 0) {
|
123 |
+
name.splice(i - 1, 2);
|
124 |
+
i -= 2;
|
125 |
+
}
|
126 |
+
}
|
127 |
+
}
|
128 |
+
//end trimDots
|
129 |
+
|
130 |
+
name = name.join('/');
|
131 |
+
}
|
132 |
+
|
133 |
+
//Apply map config if available.
|
134 |
+
if ((baseParts || starMap) && map) {
|
135 |
+
nameParts = name.split('/');
|
136 |
+
|
137 |
+
for (i = nameParts.length; i > 0; i -= 1) {
|
138 |
+
nameSegment = nameParts.slice(0, i).join("/");
|
139 |
+
|
140 |
+
if (baseParts) {
|
141 |
+
//Find the longest baseName segment match in the config.
|
142 |
+
//So, do joins on the biggest to smallest lengths of baseParts.
|
143 |
+
for (j = baseParts.length; j > 0; j -= 1) {
|
144 |
+
mapValue = map[baseParts.slice(0, j).join('/')];
|
145 |
+
|
146 |
+
//baseName segment has config, find if it has one for
|
147 |
+
//this name.
|
148 |
+
if (mapValue) {
|
149 |
+
mapValue = mapValue[nameSegment];
|
150 |
+
if (mapValue) {
|
151 |
+
//Match, update name to the new value.
|
152 |
+
foundMap = mapValue;
|
153 |
+
foundI = i;
|
154 |
+
break;
|
155 |
+
}
|
156 |
+
}
|
157 |
+
}
|
158 |
+
}
|
159 |
+
|
160 |
+
if (foundMap) {
|
161 |
+
break;
|
162 |
+
}
|
163 |
+
|
164 |
+
//Check for a star map match, but just hold on to it,
|
165 |
+
//if there is a shorter segment match later in a matching
|
166 |
+
//config, then favor over this star map.
|
167 |
+
if (!foundStarMap && starMap && starMap[nameSegment]) {
|
168 |
+
foundStarMap = starMap[nameSegment];
|
169 |
+
starI = i;
|
170 |
+
}
|
171 |
+
}
|
172 |
+
|
173 |
+
if (!foundMap && foundStarMap) {
|
174 |
+
foundMap = foundStarMap;
|
175 |
+
foundI = starI;
|
176 |
+
}
|
177 |
+
|
178 |
+
if (foundMap) {
|
179 |
+
nameParts.splice(0, foundI, foundMap);
|
180 |
+
name = nameParts.join('/');
|
181 |
+
}
|
182 |
+
}
|
183 |
+
|
184 |
+
return name;
|
185 |
+
}
|
186 |
+
|
187 |
+
function makeRequire(relName, forceSync) {
|
188 |
+
return function () {
|
189 |
+
//A version of a require function that passes a moduleName
|
190 |
+
//value for items that may need to
|
191 |
+
//look up paths relative to the moduleName
|
192 |
+
var args = aps.call(arguments, 0);
|
193 |
+
|
194 |
+
//If first arg is not require('string'), and there is only
|
195 |
+
//one arg, it is the array form without a callback. Insert
|
196 |
+
//a null so that the following concat is correct.
|
197 |
+
if (typeof args[0] !== 'string' && args.length === 1) {
|
198 |
+
args.push(null);
|
199 |
+
}
|
200 |
+
return req.apply(undef, args.concat([relName, forceSync]));
|
201 |
+
};
|
202 |
+
}
|
203 |
+
|
204 |
+
function makeNormalize(relName) {
|
205 |
+
return function (name) {
|
206 |
+
return normalize(name, relName);
|
207 |
+
};
|
208 |
+
}
|
209 |
+
|
210 |
+
function makeLoad(depName) {
|
211 |
+
return function (value) {
|
212 |
+
defined[depName] = value;
|
213 |
+
};
|
214 |
+
}
|
215 |
+
|
216 |
+
function callDep(name) {
|
217 |
+
if (hasProp(waiting, name)) {
|
218 |
+
var args = waiting[name];
|
219 |
+
delete waiting[name];
|
220 |
+
defining[name] = true;
|
221 |
+
main.apply(undef, args);
|
222 |
+
}
|
223 |
+
|
224 |
+
if (!hasProp(defined, name) && !hasProp(defining, name)) {
|
225 |
+
throw new Error('No ' + name);
|
226 |
+
}
|
227 |
+
return defined[name];
|
228 |
+
}
|
229 |
+
|
230 |
+
//Turns a plugin!resource to [plugin, resource]
|
231 |
+
//with the plugin being undefined if the name
|
232 |
+
//did not have a plugin prefix.
|
233 |
+
function splitPrefix(name) {
|
234 |
+
var prefix,
|
235 |
+
index = name ? name.indexOf('!') : -1;
|
236 |
+
if (index > -1) {
|
237 |
+
prefix = name.substring(0, index);
|
238 |
+
name = name.substring(index + 1, name.length);
|
239 |
+
}
|
240 |
+
return [prefix, name];
|
241 |
+
}
|
242 |
+
|
243 |
+
//Creates a parts array for a relName where first part is plugin ID,
|
244 |
+
//second part is resource ID. Assumes relName has already been normalized.
|
245 |
+
function makeRelParts(relName) {
|
246 |
+
return relName ? splitPrefix(relName) : [];
|
247 |
+
}
|
248 |
+
|
249 |
+
/**
|
250 |
+
* Makes a name map, normalizing the name, and using a plugin
|
251 |
+
* for normalization if necessary. Grabs a ref to plugin
|
252 |
+
* too, as an optimization.
|
253 |
+
*/
|
254 |
+
makeMap = function (name, relParts) {
|
255 |
+
var plugin,
|
256 |
+
parts = splitPrefix(name),
|
257 |
+
prefix = parts[0],
|
258 |
+
relResourceName = relParts[1];
|
259 |
+
|
260 |
+
name = parts[1];
|
261 |
+
|
262 |
+
if (prefix) {
|
263 |
+
prefix = normalize(prefix, relResourceName);
|
264 |
+
plugin = callDep(prefix);
|
265 |
+
}
|
266 |
+
|
267 |
+
//Normalize according
|
268 |
+
if (prefix) {
|
269 |
+
if (plugin && plugin.normalize) {
|
270 |
+
name = plugin.normalize(name, makeNormalize(relResourceName));
|
271 |
+
} else {
|
272 |
+
name = normalize(name, relResourceName);
|
273 |
+
}
|
274 |
+
} else {
|
275 |
+
name = normalize(name, relResourceName);
|
276 |
+
parts = splitPrefix(name);
|
277 |
+
prefix = parts[0];
|
278 |
+
name = parts[1];
|
279 |
+
if (prefix) {
|
280 |
+
plugin = callDep(prefix);
|
281 |
+
}
|
282 |
+
}
|
283 |
+
|
284 |
+
//Using ridiculous property names for space reasons
|
285 |
+
return {
|
286 |
+
f: prefix ? prefix + '!' + name : name, //fullName
|
287 |
+
n: name,
|
288 |
+
pr: prefix,
|
289 |
+
p: plugin
|
290 |
+
};
|
291 |
+
};
|
292 |
+
|
293 |
+
function makeConfig(name) {
|
294 |
+
return function () {
|
295 |
+
return (config && config.config && config.config[name]) || {};
|
296 |
+
};
|
297 |
+
}
|
298 |
+
|
299 |
+
handlers = {
|
300 |
+
require: function (name) {
|
301 |
+
return makeRequire(name);
|
302 |
+
},
|
303 |
+
exports: function (name) {
|
304 |
+
var e = defined[name];
|
305 |
+
if (typeof e !== 'undefined') {
|
306 |
+
return e;
|
307 |
+
} else {
|
308 |
+
return (defined[name] = {});
|
309 |
+
}
|
310 |
+
},
|
311 |
+
module: function (name) {
|
312 |
+
return {
|
313 |
+
id: name,
|
314 |
+
uri: '',
|
315 |
+
exports: defined[name],
|
316 |
+
config: makeConfig(name)
|
317 |
+
};
|
318 |
+
}
|
319 |
+
};
|
320 |
+
|
321 |
+
main = function (name, deps, callback, relName) {
|
322 |
+
var cjsModule, depName, ret, map, i, relParts,
|
323 |
+
args = [],
|
324 |
+
callbackType = typeof callback,
|
325 |
+
usingExports;
|
326 |
+
|
327 |
+
//Use name if no relName
|
328 |
+
relName = relName || name;
|
329 |
+
relParts = makeRelParts(relName);
|
330 |
+
|
331 |
+
//Call the callback to define the module, if necessary.
|
332 |
+
if (callbackType === 'undefined' || callbackType === 'function') {
|
333 |
+
//Pull out the defined dependencies and pass the ordered
|
334 |
+
//values to the callback.
|
335 |
+
//Default to [require, exports, module] if no deps
|
336 |
+
deps = !deps.length && callback.length ? ['require', 'exports', 'module'] : deps;
|
337 |
+
for (i = 0; i < deps.length; i += 1) {
|
338 |
+
map = makeMap(deps[i], relParts);
|
339 |
+
depName = map.f;
|
340 |
+
|
341 |
+
//Fast path CommonJS standard dependencies.
|
342 |
+
if (depName === "require") {
|
343 |
+
args[i] = handlers.require(name);
|
344 |
+
} else if (depName === "exports") {
|
345 |
+
//CommonJS module spec 1.1
|
346 |
+
args[i] = handlers.exports(name);
|
347 |
+
usingExports = true;
|
348 |
+
} else if (depName === "module") {
|
349 |
+
//CommonJS module spec 1.1
|
350 |
+
cjsModule = args[i] = handlers.module(name);
|
351 |
+
} else if (hasProp(defined, depName) ||
|
352 |
+
hasProp(waiting, depName) ||
|
353 |
+
hasProp(defining, depName)) {
|
354 |
+
args[i] = callDep(depName);
|
355 |
+
} else if (map.p) {
|
356 |
+
map.p.load(map.n, makeRequire(relName, true), makeLoad(depName), {});
|
357 |
+
args[i] = defined[depName];
|
358 |
+
} else {
|
359 |
+
throw new Error(name + ' missing ' + depName);
|
360 |
+
}
|
361 |
+
}
|
362 |
+
|
363 |
+
ret = callback ? callback.apply(defined[name], args) : undefined;
|
364 |
+
|
365 |
+
if (name) {
|
366 |
+
//If setting exports via "module" is in play,
|
367 |
+
//favor that over return value and exports. After that,
|
368 |
+
//favor a non-undefined return value over exports use.
|
369 |
+
if (cjsModule && cjsModule.exports !== undef &&
|
370 |
+
cjsModule.exports !== defined[name]) {
|
371 |
+
defined[name] = cjsModule.exports;
|
372 |
+
} else if (ret !== undef || !usingExports) {
|
373 |
+
//Use the return value from the function.
|
374 |
+
defined[name] = ret;
|
375 |
+
}
|
376 |
+
}
|
377 |
+
} else if (name) {
|
378 |
+
//May just be an object definition for the module. Only
|
379 |
+
//worry about defining if have a module name.
|
380 |
+
defined[name] = callback;
|
381 |
+
}
|
382 |
+
};
|
383 |
+
|
384 |
+
requirejs = require = req = function (deps, callback, relName, forceSync, alt) {
|
385 |
+
if (typeof deps === "string") {
|
386 |
+
if (handlers[deps]) {
|
387 |
+
//callback in this case is really relName
|
388 |
+
return handlers[deps](callback);
|
389 |
+
}
|
390 |
+
//Just return the module wanted. In this scenario, the
|
391 |
+
//deps arg is the module name, and second arg (if passed)
|
392 |
+
//is just the relName.
|
393 |
+
//Normalize module name, if it contains . or ..
|
394 |
+
return callDep(makeMap(deps, makeRelParts(callback)).f);
|
395 |
+
} else if (!deps.splice) {
|
396 |
+
//deps is a config object, not an array.
|
397 |
+
config = deps;
|
398 |
+
if (config.deps) {
|
399 |
+
req(config.deps, config.callback);
|
400 |
+
}
|
401 |
+
if (!callback) {
|
402 |
+
return;
|
403 |
+
}
|
404 |
+
|
405 |
+
if (callback.splice) {
|
406 |
+
//callback is an array, which means it is a dependency list.
|
407 |
+
//Adjust args if there are dependencies
|
408 |
+
deps = callback;
|
409 |
+
callback = relName;
|
410 |
+
relName = null;
|
411 |
+
} else {
|
412 |
+
deps = undef;
|
413 |
+
}
|
414 |
+
}
|
415 |
+
|
416 |
+
//Support require(['a'])
|
417 |
+
callback = callback || function () {};
|
418 |
+
|
419 |
+
//If relName is a function, it is an errback handler,
|
420 |
+
//so remove it.
|
421 |
+
if (typeof relName === 'function') {
|
422 |
+
relName = forceSync;
|
423 |
+
forceSync = alt;
|
424 |
+
}
|
425 |
+
|
426 |
+
//Simulate async callback;
|
427 |
+
if (forceSync) {
|
428 |
+
main(undef, deps, callback, relName);
|
429 |
+
} else {
|
430 |
+
//Using a non-zero value because of concern for what old browsers
|
431 |
+
//do, and latest browsers "upgrade" to 4 if lower value is used:
|
432 |
+
//http://www.whatwg.org/specs/web-apps/current-work/multipage/timers.html#dom-windowtimers-settimeout:
|
433 |
+
//If want a value immediately, use require('id') instead -- something
|
434 |
+
//that works in almond on the global level, but not guaranteed and
|
435 |
+
//unlikely to work in other AMD implementations.
|
436 |
+
setTimeout(function () {
|
437 |
+
main(undef, deps, callback, relName);
|
438 |
+
}, 4);
|
439 |
+
}
|
440 |
+
|
441 |
+
return req;
|
442 |
+
};
|
443 |
+
|
444 |
+
/**
|
445 |
+
* Just drops the config on the floor, but returns req in case
|
446 |
+
* the config return value is used.
|
447 |
+
*/
|
448 |
+
req.config = function (cfg) {
|
449 |
+
return req(cfg);
|
450 |
+
};
|
451 |
+
|
452 |
+
/**
|
453 |
+
* Expose module registry for debugging and tooling
|
454 |
+
*/
|
455 |
+
requirejs._defined = defined;
|
456 |
+
|
457 |
+
define = function (name, deps, callback) {
|
458 |
+
if (typeof name !== 'string') {
|
459 |
+
throw new Error('See almond README: incorrect module build, no module name');
|
460 |
+
}
|
461 |
+
|
462 |
+
//This module may not have dependencies
|
463 |
+
if (!deps.splice) {
|
464 |
+
//deps is not an array, so probably means
|
465 |
+
//an object literal or factory function for
|
466 |
+
//the value. Adjust args.
|
467 |
+
callback = deps;
|
468 |
+
deps = [];
|
469 |
+
}
|
470 |
+
|
471 |
+
if (!hasProp(defined, name) && !hasProp(waiting, name)) {
|
472 |
+
waiting[name] = [name, deps, callback];
|
473 |
+
}
|
474 |
+
};
|
475 |
+
|
476 |
+
define.amd = {
|
477 |
+
jQuery: true
|
478 |
+
};
|
479 |
+
}());
|
480 |
+
|
481 |
+
S2.requirejs = requirejs;S2.require = require;S2.define = define;
|
482 |
+
}
|
483 |
+
}());
|
484 |
+
S2.define("almond", function(){});
|
485 |
+
|
486 |
+
/* global jQuery:false, $:false */
|
487 |
+
S2.define('jquery',[],function () {
|
488 |
+
var _$ = jQuery || $;
|
489 |
+
|
490 |
+
if (_$ == null && console && console.error) {
|
491 |
+
console.error(
|
492 |
+
'Select2: An instance of jQuery or a jQuery-compatible library was not ' +
|
493 |
+
'found. Make sure that you are including jQuery before Select2 on your ' +
|
494 |
+
'web page.'
|
495 |
+
);
|
496 |
+
}
|
497 |
+
|
498 |
+
return _$;
|
499 |
+
});
|
500 |
+
|
501 |
+
S2.define('select2/utils',[
|
502 |
+
'jquery'
|
503 |
+
], function ($) {
|
504 |
+
var Utils = {};
|
505 |
+
|
506 |
+
Utils.Extend = function (ChildClass, SuperClass) {
|
507 |
+
var __hasProp = {}.hasOwnProperty;
|
508 |
+
|
509 |
+
function BaseConstructor () {
|
510 |
+
this.constructor = ChildClass;
|
511 |
+
}
|
512 |
+
|
513 |
+
for (var key in SuperClass) {
|
514 |
+
if (__hasProp.call(SuperClass, key)) {
|
515 |
+
ChildClass[key] = SuperClass[key];
|
516 |
+
}
|
517 |
+
}
|
518 |
+
|
519 |
+
BaseConstructor.prototype = SuperClass.prototype;
|
520 |
+
ChildClass.prototype = new BaseConstructor();
|
521 |
+
ChildClass.__super__ = SuperClass.prototype;
|
522 |
+
|
523 |
+
return ChildClass;
|
524 |
+
};
|
525 |
+
|
526 |
+
function getMethods (theClass) {
|
527 |
+
var proto = theClass.prototype;
|
528 |
+
|
529 |
+
var methods = [];
|
530 |
+
|
531 |
+
for (var methodName in proto) {
|
532 |
+
var m = proto[methodName];
|
533 |
+
|
534 |
+
if (typeof m !== 'function') {
|
535 |
+
continue;
|
536 |
+
}
|
537 |
+
|
538 |
+
if (methodName === 'constructor') {
|
539 |
+
continue;
|
540 |
+
}
|
541 |
+
|
542 |
+
methods.push(methodName);
|
543 |
+
}
|
544 |
+
|
545 |
+
return methods;
|
546 |
+
}
|
547 |
+
|
548 |
+
Utils.Decorate = function (SuperClass, DecoratorClass) {
|
549 |
+
var decoratedMethods = getMethods(DecoratorClass);
|
550 |
+
var superMethods = getMethods(SuperClass);
|
551 |
+
|
552 |
+
function DecoratedClass () {
|
553 |
+
var unshift = Array.prototype.unshift;
|
554 |
+
|
555 |
+
var argCount = DecoratorClass.prototype.constructor.length;
|
556 |
+
|
557 |
+
var calledConstructor = SuperClass.prototype.constructor;
|
558 |
+
|
559 |
+
if (argCount > 0) {
|
560 |
+
unshift.call(arguments, SuperClass.prototype.constructor);
|
561 |
+
|
562 |
+
calledConstructor = DecoratorClass.prototype.constructor;
|
563 |
+
}
|
564 |
+
|
565 |
+
calledConstructor.apply(this, arguments);
|
566 |
+
}
|
567 |
+
|
568 |
+
DecoratorClass.displayName = SuperClass.displayName;
|
569 |
+
|
570 |
+
function ctr () {
|
571 |
+
this.constructor = DecoratedClass;
|
572 |
+
}
|
573 |
+
|
574 |
+
DecoratedClass.prototype = new ctr();
|
575 |
+
|
576 |
+
for (var m = 0; m < superMethods.length; m++) {
|
577 |
+
var superMethod = superMethods[m];
|
578 |
+
|
579 |
+
DecoratedClass.prototype[superMethod] =
|
580 |
+
SuperClass.prototype[superMethod];
|
581 |
+
}
|
582 |
+
|
583 |
+
var calledMethod = function (methodName) {
|
584 |
+
// Stub out the original method if it's not decorating an actual method
|
585 |
+
var originalMethod = function () {};
|
586 |
+
|
587 |
+
if (methodName in DecoratedClass.prototype) {
|
588 |
+
originalMethod = DecoratedClass.prototype[methodName];
|
589 |
+
}
|
590 |
+
|
591 |
+
var decoratedMethod = DecoratorClass.prototype[methodName];
|
592 |
+
|
593 |
+
return function () {
|
594 |
+
var unshift = Array.prototype.unshift;
|
595 |
+
|
596 |
+
unshift.call(arguments, originalMethod);
|
597 |
+
|
598 |
+
return decoratedMethod.apply(this, arguments);
|
599 |
+
};
|
600 |
+
};
|
601 |
+
|
602 |
+
for (var d = 0; d < decoratedMethods.length; d++) {
|
603 |
+
var decoratedMethod = decoratedMethods[d];
|
604 |
+
|
605 |
+
DecoratedClass.prototype[decoratedMethod] = calledMethod(decoratedMethod);
|
606 |
+
}
|
607 |
+
|
608 |
+
return DecoratedClass;
|
609 |
+
};
|
610 |
+
|
611 |
+
var Observable = function () {
|
612 |
+
this.listeners = {};
|
613 |
+
};
|
614 |
+
|
615 |
+
Observable.prototype.on = function (event, callback) {
|
616 |
+
this.listeners = this.listeners || {};
|
617 |
+
|
618 |
+
if (event in this.listeners) {
|
619 |
+
this.listeners[event].push(callback);
|
620 |
+
} else {
|
621 |
+
this.listeners[event] = [callback];
|
622 |
+
}
|
623 |
+
};
|
624 |
+
|
625 |
+
Observable.prototype.trigger = function (event) {
|
626 |
+
var slice = Array.prototype.slice;
|
627 |
+
var params = slice.call(arguments, 1);
|
628 |
+
|
629 |
+
this.listeners = this.listeners || {};
|
630 |
+
|
631 |
+
// Params should always come in as an array
|
632 |
+
if (params == null) {
|
633 |
+
params = [];
|
634 |
+
}
|
635 |
+
|
636 |
+
// If there are no arguments to the event, use a temporary object
|
637 |
+
if (params.length === 0) {
|
638 |
+
params.push({});
|
639 |
+
}
|
640 |
+
|
641 |
+
// Set the `_type` of the first object to the event
|
642 |
+
params[0]._type = event;
|
643 |
+
|
644 |
+
if (event in this.listeners) {
|
645 |
+
this.invoke(this.listeners[event], slice.call(arguments, 1));
|
646 |
+
}
|
647 |
+
|
648 |
+
if ('*' in this.listeners) {
|
649 |
+
this.invoke(this.listeners['*'], arguments);
|
650 |
+
}
|
651 |
+
};
|
652 |
+
|
653 |
+
Observable.prototype.invoke = function (listeners, params) {
|
654 |
+
for (var i = 0, len = listeners.length; i < len; i++) {
|
655 |
+
listeners[i].apply(this, params);
|
656 |
+
}
|
657 |
+
};
|
658 |
+
|
659 |
+
Utils.Observable = Observable;
|
660 |
+
|
661 |
+
Utils.generateChars = function (length) {
|
662 |
+
var chars = '';
|
663 |
+
|
664 |
+
for (var i = 0; i < length; i++) {
|
665 |
+
var randomChar = Math.floor(Math.random() * 36);
|
666 |
+
chars += randomChar.toString(36);
|
667 |
+
}
|
668 |
+
|
669 |
+
return chars;
|
670 |
+
};
|
671 |
+
|
672 |
+
Utils.bind = function (func, context) {
|
673 |
+
return function () {
|
674 |
+
func.apply(context, arguments);
|
675 |
+
};
|
676 |
+
};
|
677 |
+
|
678 |
+
Utils._convertData = function (data) {
|
679 |
+
for (var originalKey in data) {
|
680 |
+
var keys = originalKey.split('-');
|
681 |
+
|
682 |
+
var dataLevel = data;
|
683 |
+
|
684 |
+
if (keys.length === 1) {
|
685 |
+
continue;
|
686 |
+
}
|
687 |
+
|
688 |
+
for (var k = 0; k < keys.length; k++) {
|
689 |
+
var key = keys[k];
|
690 |
+
|
691 |
+
// Lowercase the first letter
|
692 |
+
// By default, dash-separated becomes camelCase
|
693 |
+
key = key.substring(0, 1).toLowerCase() + key.substring(1);
|
694 |
+
|
695 |
+
if (!(key in dataLevel)) {
|
696 |
+
dataLevel[key] = {};
|
697 |
+
}
|
698 |
+
|
699 |
+
if (k == keys.length - 1) {
|
700 |
+
dataLevel[key] = data[originalKey];
|
701 |
+
}
|
702 |
+
|
703 |
+
dataLevel = dataLevel[key];
|
704 |
+
}
|
705 |
+
|
706 |
+
delete data[originalKey];
|
707 |
+
}
|
708 |
+
|
709 |
+
return data;
|
710 |
+
};
|
711 |
+
|
712 |
+
Utils.hasScroll = function (index, el) {
|
713 |
+
// Adapted from the function created by @ShadowScripter
|
714 |
+
// and adapted by @BillBarry on the Stack Exchange Code Review website.
|
715 |
+
// The original code can be found at
|
716 |
+
// http://codereview.stackexchange.com/q/13338
|
717 |
+
// and was designed to be used with the Sizzle selector engine.
|
718 |
+
|
719 |
+
var $el = $(el);
|
720 |
+
var overflowX = el.style.overflowX;
|
721 |
+
var overflowY = el.style.overflowY;
|
722 |
+
|
723 |
+
//Check both x and y declarations
|
724 |
+
if (overflowX === overflowY &&
|
725 |
+
(overflowY === 'hidden' || overflowY === 'visible')) {
|
726 |
+
return false;
|
727 |
+
}
|
728 |
+
|
729 |
+
if (overflowX === 'scroll' || overflowY === 'scroll') {
|
730 |
+
return true;
|
731 |
+
}
|
732 |
+
|
733 |
+
return ($el.innerHeight() < el.scrollHeight ||
|
734 |
+
$el.innerWidth() < el.scrollWidth);
|
735 |
+
};
|
736 |
+
|
737 |
+
Utils.escapeMarkup = function (markup) {
|
738 |
+
var replaceMap = {
|
739 |
+
'\\': '\',
|
740 |
+
'&': '&',
|
741 |
+
'<': '<',
|
742 |
+
'>': '>',
|
743 |
+
'"': '"',
|
744 |
+
'\'': ''',
|
745 |
+
'/': '/'
|
746 |
+
};
|
747 |
+
|
748 |
+
// Do not try to escape the markup if it's not a string
|
749 |
+
if (typeof markup !== 'string') {
|
750 |
+
return markup;
|
751 |
+
}
|
752 |
+
|
753 |
+
return String(markup).replace(/[&<>"'\/\\]/g, function (match) {
|
754 |
+
return replaceMap[match];
|
755 |
+
});
|
756 |
+
};
|
757 |
+
|
758 |
+
// Append an array of jQuery nodes to a given element.
|
759 |
+
Utils.appendMany = function ($element, $nodes) {
|
760 |
+
// jQuery 1.7.x does not support $.fn.append() with an array
|
761 |
+
// Fall back to a jQuery object collection using $.fn.add()
|
762 |
+
if ($.fn.jquery.substr(0, 3) === '1.7') {
|
763 |
+
var $jqNodes = $();
|
764 |
+
|
765 |
+
$.map($nodes, function (node) {
|
766 |
+
$jqNodes = $jqNodes.add(node);
|
767 |
+
});
|
768 |
+
|
769 |
+
$nodes = $jqNodes;
|
770 |
+
}
|
771 |
+
|
772 |
+
$element.append($nodes);
|
773 |
+
};
|
774 |
+
|
775 |
+
// Cache objects in Utils.__cache instead of $.data (see #4346)
|
776 |
+
Utils.__cache = {};
|
777 |
+
|
778 |
+
var id = 0;
|
779 |
+
Utils.GetUniqueElementId = function (element) {
|
780 |
+
// Get a unique element Id. If element has no id,
|
781 |
+
// creates a new unique number, stores it in the id
|
782 |
+
// attribute and returns the new id.
|
783 |
+
// If an id already exists, it simply returns it.
|
784 |
+
|
785 |
+
var select2Id = element.getAttribute('data-select2-id');
|
786 |
+
if (select2Id == null) {
|
787 |
+
// If element has id, use it.
|
788 |
+
if (element.id) {
|
789 |
+
select2Id = element.id;
|
790 |
+
element.setAttribute('data-select2-id', select2Id);
|
791 |
+
} else {
|
792 |
+
element.setAttribute('data-select2-id', ++id);
|
793 |
+
select2Id = id.toString();
|
794 |
+
}
|
795 |
+
}
|
796 |
+
return select2Id;
|
797 |
+
};
|
798 |
+
|
799 |
+
Utils.StoreData = function (element, name, value) {
|
800 |
+
// Stores an item in the cache for a specified element.
|
801 |
+
// name is the cache key.
|
802 |
+
var id = Utils.GetUniqueElementId(element);
|
803 |
+
if (!Utils.__cache[id]) {
|
804 |
+
Utils.__cache[id] = {};
|
805 |
+
}
|
806 |
+
|
807 |
+
Utils.__cache[id][name] = value;
|
808 |
+
};
|
809 |
+
|
810 |
+
Utils.GetData = function (element, name) {
|
811 |
+
// Retrieves a value from the cache by its key (name)
|
812 |
+
// name is optional. If no name specified, return
|
813 |
+
// all cache items for the specified element.
|
814 |
+
// and for a specified element.
|
815 |
+
var id = Utils.GetUniqueElementId(element);
|
816 |
+
if (name) {
|
817 |
+
if (Utils.__cache[id]) {
|
818 |
+
return Utils.__cache[id][name] != null ?
|
819 |
+
Utils.__cache[id][name]:
|
820 |
+
$(element).data(name); // Fallback to HTML5 data attribs.
|
821 |
+
}
|
822 |
+
return $(element).data(name); // Fallback to HTML5 data attribs.
|
823 |
+
} else {
|
824 |
+
return Utils.__cache[id];
|
825 |
+
}
|
826 |
+
};
|
827 |
+
|
828 |
+
Utils.RemoveData = function (element) {
|
829 |
+
// Removes all cached items for a specified element.
|
830 |
+
var id = Utils.GetUniqueElementId(element);
|
831 |
+
if (Utils.__cache[id] != null) {
|
832 |
+
delete Utils.__cache[id];
|
833 |
+
}
|
834 |
+
};
|
835 |
+
|
836 |
+
return Utils;
|
837 |
+
});
|
838 |
+
|
839 |
+
S2.define('select2/results',[
|
840 |
+
'jquery',
|
841 |
+
'./utils'
|
842 |
+
], function ($, Utils) {
|
843 |
+
function Results ($element, options, dataAdapter) {
|
844 |
+
this.$element = $element;
|
845 |
+
this.data = dataAdapter;
|
846 |
+
this.options = options;
|
847 |
+
|
848 |
+
Results.__super__.constructor.call(this);
|
849 |
+
}
|
850 |
+
|
851 |
+
Utils.Extend(Results, Utils.Observable);
|
852 |
+
|
853 |
+
Results.prototype.render = function () {
|
854 |
+
var $results = $(
|
855 |
+
'<ul class="select2-results__options" role="tree"></ul>'
|
856 |
+
);
|
857 |
+
|
858 |
+
if (this.options.get('multiple')) {
|
859 |
+
$results.attr('aria-multiselectable', 'true');
|
860 |
+
}
|
861 |
+
|
862 |
+
this.$results = $results;
|
863 |
+
|
864 |
+
return $results;
|
865 |
+
};
|
866 |
+
|
867 |
+
Results.prototype.clear = function () {
|
868 |
+
this.$results.empty();
|
869 |
+
};
|
870 |
+
|
871 |
+
Results.prototype.displayMessage = function (params) {
|
872 |
+
var escapeMarkup = this.options.get('escapeMarkup');
|
873 |
+
|
874 |
+
this.clear();
|
875 |
+
this.hideLoading();
|
876 |
+
|
877 |
+
var $message = $(
|
878 |
+
'<li role="treeitem" aria-live="assertive"' +
|
879 |
+
' class="select2-results__option"></li>'
|
880 |
+
);
|
881 |
+
|
882 |
+
var message = this.options.get('translations').get(params.message);
|
883 |
+
|
884 |
+
$message.append(
|
885 |
+
escapeMarkup(
|
886 |
+
message(params.args)
|
887 |
+
)
|
888 |
+
);
|
889 |
+
|
890 |
+
$message[0].className += ' select2-results__message';
|
891 |
+
|
892 |
+
this.$results.append($message);
|
893 |
+
};
|
894 |
+
|
895 |
+
Results.prototype.hideMessages = function () {
|
896 |
+
this.$results.find('.select2-results__message').remove();
|
897 |
+
};
|
898 |
+
|
899 |
+
Results.prototype.append = function (data) {
|
900 |
+
this.hideLoading();
|
901 |
+
|
902 |
+
var $options = [];
|
903 |
+
|
904 |
+
if (data.results == null || data.results.length === 0) {
|
905 |
+
if (this.$results.children().length === 0) {
|
906 |
+
this.trigger('results:message', {
|
907 |
+
message: 'noResults'
|
908 |
+
});
|
909 |
+
}
|
910 |
+
|
911 |
+
return;
|
912 |
+
}
|
913 |
+
|
914 |
+
data.results = this.sort(data.results);
|
915 |
+
|
916 |
+
for (var d = 0; d < data.results.length; d++) {
|
917 |
+
var item = data.results[d];
|
918 |
+
|
919 |
+
var $option = this.option(item);
|
920 |
+
|
921 |
+
$options.push($option);
|
922 |
+
}
|
923 |
+
|
924 |
+
this.$results.append($options);
|
925 |
+
};
|
926 |
+
|
927 |
+
Results.prototype.position = function ($results, $dropdown) {
|
928 |
+
var $resultsContainer = $dropdown.find('.select2-results');
|
929 |
+
$resultsContainer.append($results);
|
930 |
+
};
|
931 |
+
|
932 |
+
Results.prototype.sort = function (data) {
|
933 |
+
var sorter = this.options.get('sorter');
|
934 |
+
|
935 |
+
return sorter(data);
|
936 |
+
};
|
937 |
+
|
938 |
+
Results.prototype.highlightFirstItem = function () {
|
939 |
+
var $options = this.$results
|
940 |
+
.find('.select2-results__option[aria-selected]');
|
941 |
+
|
942 |
+
var $selected = $options.filter('[aria-selected=true]');
|
943 |
+
|
944 |
+
// Check if there are any selected options
|
945 |
+
if ($selected.length > 0) {
|
946 |
+
// If there are selected options, highlight the first
|
947 |
+
$selected.first().trigger('mouseenter');
|
948 |
+
} else {
|
949 |
+
// If there are no selected options, highlight the first option
|
950 |
+
// in the dropdown
|
951 |
+
$options.first().trigger('mouseenter');
|
952 |
+
}
|
953 |
+
|
954 |
+
this.ensureHighlightVisible();
|
955 |
+
};
|
956 |
+
|
957 |
+
Results.prototype.setClasses = function () {
|
958 |
+
var self = this;
|
959 |
+
|
960 |
+
this.data.current(function (selected) {
|
961 |
+
var selectedIds = $.map(selected, function (s) {
|
962 |
+
return s.id.toString();
|
963 |
+
});
|
964 |
+
|
965 |
+
var $options = self.$results
|
966 |
+
.find('.select2-results__option[aria-selected]');
|
967 |
+
|
968 |
+
$options.each(function () {
|
969 |
+
var $option = $(this);
|
970 |
+
|
971 |
+
var item = Utils.GetData(this, 'data');
|
972 |
+
|
973 |
+
// id needs to be converted to a string when comparing
|
974 |
+
var id = '' + item.id;
|
975 |
+
|
976 |
+
if ((item.element != null && item.element.selected) ||
|
977 |
+
(item.element == null && $.inArray(id, selectedIds) > -1)) {
|
978 |
+
$option.attr('aria-selected', 'true');
|
979 |
+
} else {
|
980 |
+
$option.attr('aria-selected', 'false');
|
981 |
+
}
|
982 |
+
});
|
983 |
+
|
984 |
+
});
|
985 |
+
};
|
986 |
+
|
987 |
+
Results.prototype.showLoading = function (params) {
|
988 |
+
this.hideLoading();
|
989 |
+
|
990 |
+
var loadingMore = this.options.get('translations').get('searching');
|
991 |
+
|
992 |
+
var loading = {
|
993 |
+
disabled: true,
|
994 |
+
loading: true,
|
995 |
+
text: loadingMore(params)
|
996 |
+
};
|
997 |
+
var $loading = this.option(loading);
|
998 |
+
$loading.className += ' loading-results';
|
999 |
+
|
1000 |
+
this.$results.prepend($loading);
|
1001 |
+
};
|
1002 |
+
|
1003 |
+
Results.prototype.hideLoading = function () {
|
1004 |
+
this.$results.find('.loading-results').remove();
|
1005 |
+
};
|
1006 |
+
|
1007 |
+
Results.prototype.option = function (data) {
|
1008 |
+
var option = document.createElement('li');
|
1009 |
+
option.className = 'select2-results__option';
|
1010 |
+
|
1011 |
+
var attrs = {
|
1012 |
+
'role': 'treeitem',
|
1013 |
+
'aria-selected': 'false'
|
1014 |
+
};
|
1015 |
+
|
1016 |
+
if (data.disabled) {
|
1017 |
+
delete attrs['aria-selected'];
|
1018 |
+
attrs['aria-disabled'] = 'true';
|
1019 |
+
}
|
1020 |
+
|
1021 |
+
if (data.id == null) {
|
1022 |
+
delete attrs['aria-selected'];
|
1023 |
+
}
|
1024 |
+
|
1025 |
+
if (data._resultId != null) {
|
1026 |
+
option.id = data._resultId;
|
1027 |
+
}
|
1028 |
+
|
1029 |
+
if (data.title) {
|
1030 |
+
option.title = data.title;
|
1031 |
+
}
|
1032 |
+
|
1033 |
+
if (data.children) {
|
1034 |
+
attrs.role = 'group';
|
1035 |
+
attrs['aria-label'] = data.text;
|
1036 |
+
delete attrs['aria-selected'];
|
1037 |
+
}
|
1038 |
+
|
1039 |
+
for (var attr in attrs) {
|
1040 |
+
var val = attrs[attr];
|
1041 |
+
|
1042 |
+
option.setAttribute(attr, val);
|
1043 |
+
}
|
1044 |
+
|
1045 |
+
if (data.children) {
|
1046 |
+
var $option = $(option);
|
1047 |
+
|
1048 |
+
var label = document.createElement('strong');
|
1049 |
+
label.className = 'select2-results__group';
|
1050 |
+
|
1051 |
+
var $label = $(label);
|
1052 |
+
this.template(data, label);
|
1053 |
+
|
1054 |
+
var $children = [];
|
1055 |
+
|
1056 |
+
for (var c = 0; c < data.children.length; c++) {
|
1057 |
+
var child = data.children[c];
|
1058 |
+
|
1059 |
+
var $child = this.option(child);
|
1060 |
+
|
1061 |
+
$children.push($child);
|
1062 |
+
}
|
1063 |
+
|
1064 |
+
var $childrenContainer = $('<ul></ul>', {
|
1065 |
+
'class': 'select2-results__options select2-results__options--nested'
|
1066 |
+
});
|
1067 |
+
|
1068 |
+
$childrenContainer.append($children);
|
1069 |
+
|
1070 |
+
$option.append(label);
|
1071 |
+
$option.append($childrenContainer);
|
1072 |
+
} else {
|
1073 |
+
this.template(data, option);
|
1074 |
+
}
|
1075 |
+
|
1076 |
+
Utils.StoreData(option, 'data', data);
|
1077 |
+
|
1078 |
+
return option;
|
1079 |
+
};
|
1080 |
+
|
1081 |
+
Results.prototype.bind = function (container, $container) {
|
1082 |
+
var self = this;
|
1083 |
+
|
1084 |
+
var id = container.id + '-results';
|
1085 |
+
|
1086 |
+
this.$results.attr('id', id);
|
1087 |
+
|
1088 |
+
container.on('results:all', function (params) {
|
1089 |
+
self.clear();
|
1090 |
+
self.append(params.data);
|
1091 |
+
|
1092 |
+
if (container.isOpen()) {
|
1093 |
+
self.setClasses();
|
1094 |
+
self.highlightFirstItem();
|
1095 |
+
}
|
1096 |
+
});
|
1097 |
+
|
1098 |
+
container.on('results:append', function (params) {
|
1099 |
+
self.append(params.data);
|
1100 |
+
|
1101 |
+
if (container.isOpen()) {
|
1102 |
+
self.setClasses();
|
1103 |
+
}
|
1104 |
+
});
|
1105 |
+
|
1106 |
+
container.on('query', function (params) {
|
1107 |
+
self.hideMessages();
|
1108 |
+
self.showLoading(params);
|
1109 |
+
});
|
1110 |
+
|
1111 |
+
container.on('select', function () {
|
1112 |
+
if (!container.isOpen()) {
|
1113 |
+
return;
|
1114 |
+
}
|
1115 |
+
|
1116 |
+
self.setClasses();
|
1117 |
+
self.highlightFirstItem();
|
1118 |
+
});
|
1119 |
+
|
1120 |
+
container.on('unselect', function () {
|
1121 |
+
if (!container.isOpen()) {
|
1122 |
+
return;
|
1123 |
+
}
|
1124 |
+
|
1125 |
+
self.setClasses();
|
1126 |
+
self.highlightFirstItem();
|
1127 |
+
});
|
1128 |
+
|
1129 |
+
container.on('open', function () {
|
1130 |
+
// When the dropdown is open, aria-expended="true"
|
1131 |
+
self.$results.attr('aria-expanded', 'true');
|
1132 |
+
self.$results.attr('aria-hidden', 'false');
|
1133 |
+
|
1134 |
+
self.setClasses();
|
1135 |
+
self.ensureHighlightVisible();
|
1136 |
+
});
|
1137 |
+
|
1138 |
+
container.on('close', function () {
|
1139 |
+
// When the dropdown is closed, aria-expended="false"
|
1140 |
+
self.$results.attr('aria-expanded', 'false');
|
1141 |
+
self.$results.attr('aria-hidden', 'true');
|
1142 |
+
self.$results.removeAttr('aria-activedescendant');
|
1143 |
+
});
|
1144 |
+
|
1145 |
+
container.on('results:toggle', function () {
|
1146 |
+
var $highlighted = self.getHighlightedResults();
|
1147 |
+
|
1148 |
+
if ($highlighted.length === 0) {
|
1149 |
+
return;
|
1150 |
+
}
|
1151 |
+
|
1152 |
+
$highlighted.trigger('mouseup');
|
1153 |
+
});
|
1154 |
+
|
1155 |
+
container.on('results:select', function () {
|
1156 |
+
var $highlighted = self.getHighlightedResults();
|
1157 |
+
|
1158 |
+
if ($highlighted.length === 0) {
|
1159 |
+
return;
|
1160 |
+
}
|
1161 |
+
|
1162 |
+
var data = Utils.GetData($highlighted[0], 'data');
|
1163 |
+
|
1164 |
+
if ($highlighted.attr('aria-selected') == 'true') {
|
1165 |
+
self.trigger('close', {});
|
1166 |
+
} else {
|
1167 |
+
self.trigger('select', {
|
1168 |
+
data: data
|
1169 |
+
});
|
1170 |
+
}
|
1171 |
+
});
|
1172 |
+
|
1173 |
+
container.on('results:previous', function () {
|
1174 |
+
var $highlighted = self.getHighlightedResults();
|
1175 |
+
|
1176 |
+
var $options = self.$results.find('[aria-selected]');
|
1177 |
+
|
1178 |
+
var currentIndex = $options.index($highlighted);
|
1179 |
+
|
1180 |
+
// If we are already at te top, don't move further
|
1181 |
+
// If no options, currentIndex will be -1
|
1182 |
+
if (currentIndex <= 0) {
|
1183 |
+
return;
|
1184 |
+
}
|
1185 |
+
|
1186 |
+
var nextIndex = currentIndex - 1;
|
1187 |
+
|
1188 |
+
// If none are highlighted, highlight the first
|
1189 |
+
if ($highlighted.length === 0) {
|
1190 |
+
nextIndex = 0;
|
1191 |
+
}
|
1192 |
+
|
1193 |
+
var $next = $options.eq(nextIndex);
|
1194 |
+
|
1195 |
+
$next.trigger('mouseenter');
|
1196 |
+
|
1197 |
+
var currentOffset = self.$results.offset().top;
|
1198 |
+
var nextTop = $next.offset().top;
|
1199 |
+
var nextOffset = self.$results.scrollTop() + (nextTop - currentOffset);
|
1200 |
+
|
1201 |
+
if (nextIndex === 0) {
|
1202 |
+
self.$results.scrollTop(0);
|
1203 |
+
} else if (nextTop - currentOffset < 0) {
|
1204 |
+
self.$results.scrollTop(nextOffset);
|
1205 |
+
}
|
1206 |
+
});
|
1207 |
+
|
1208 |
+
container.on('results:next', function () {
|
1209 |
+
var $highlighted = self.getHighlightedResults();
|
1210 |
+
|
1211 |
+
var $options = self.$results.find('[aria-selected]');
|
1212 |
+
|
1213 |
+
var currentIndex = $options.index($highlighted);
|
1214 |
+
|
1215 |
+
var nextIndex = currentIndex + 1;
|
1216 |
+
|
1217 |
+
// If we are at the last option, stay there
|
1218 |
+
if (nextIndex >= $options.length) {
|
1219 |
+
return;
|
1220 |
+
}
|
1221 |
+
|
1222 |
+
var $next = $options.eq(nextIndex);
|
1223 |
+
|
1224 |
+
$next.trigger('mouseenter');
|
1225 |
+
|
1226 |
+
var currentOffset = self.$results.offset().top +
|
1227 |
+
self.$results.outerHeight(false);
|
1228 |
+
var nextBottom = $next.offset().top + $next.outerHeight(false);
|
1229 |
+
var nextOffset = self.$results.scrollTop() + nextBottom - currentOffset;
|
1230 |
+
|
1231 |
+
if (nextIndex === 0) {
|
1232 |
+
self.$results.scrollTop(0);
|
1233 |
+
} else if (nextBottom > currentOffset) {
|
1234 |
+
self.$results.scrollTop(nextOffset);
|
1235 |
+
}
|
1236 |
+
});
|
1237 |
+
|
1238 |
+
container.on('results:focus', function (params) {
|
1239 |
+
params.element.addClass('select2-results__option--highlighted');
|
1240 |
+
});
|
1241 |
+
|
1242 |
+
container.on('results:message', function (params) {
|
1243 |
+
self.displayMessage(params);
|
1244 |
+
});
|
1245 |
+
|
1246 |
+
if ($.fn.mousewheel) {
|
1247 |
+
this.$results.on('mousewheel', function (e) {
|
1248 |
+
var top = self.$results.scrollTop();
|
1249 |
+
|
1250 |
+
var bottom = self.$results.get(0).scrollHeight - top + e.deltaY;
|
1251 |
+
|
1252 |
+
var isAtTop = e.deltaY > 0 && top - e.deltaY <= 0;
|
1253 |
+
var isAtBottom = e.deltaY < 0 && bottom <= self.$results.height();
|
1254 |
+
|
1255 |
+
if (isAtTop) {
|
1256 |
+
self.$results.scrollTop(0);
|
1257 |
+
|
1258 |
+
e.preventDefault();
|
1259 |
+
e.stopPropagation();
|
1260 |
+
} else if (isAtBottom) {
|
1261 |
+
self.$results.scrollTop(
|
1262 |
+
self.$results.get(0).scrollHeight - self.$results.height()
|
1263 |
+
);
|
1264 |
+
|
1265 |
+
e.preventDefault();
|
1266 |
+
e.stopPropagation();
|
1267 |
+
}
|
1268 |
+
});
|
1269 |
+
}
|
1270 |
+
|
1271 |
+
this.$results.on('mouseup', '.select2-results__option[aria-selected]',
|
1272 |
+
function (evt) {
|
1273 |
+
var $this = $(this);
|
1274 |
+
|
1275 |
+
var data = Utils.GetData(this, 'data');
|
1276 |
+
|
1277 |
+
if ($this.attr('aria-selected') === 'true') {
|
1278 |
+
if (self.options.get('multiple')) {
|
1279 |
+
self.trigger('unselect', {
|
1280 |
+
originalEvent: evt,
|
1281 |
+
data: data
|
1282 |
+
});
|
1283 |
+
} else {
|
1284 |
+
self.trigger('close', {});
|
1285 |
+
}
|
1286 |
+
|
1287 |
+
return;
|
1288 |
+
}
|
1289 |
+
|
1290 |
+
self.trigger('select', {
|
1291 |
+
originalEvent: evt,
|
1292 |
+
data: data
|
1293 |
+
});
|
1294 |
+
});
|
1295 |
+
|
1296 |
+
this.$results.on('mouseenter', '.select2-results__option[aria-selected]',
|
1297 |
+
function (evt) {
|
1298 |
+
var data = Utils.GetData(this, 'data');
|
1299 |
+
|
1300 |
+
self.getHighlightedResults()
|
1301 |
+
.removeClass('select2-results__option--highlighted');
|
1302 |
+
|
1303 |
+
self.trigger('results:focus', {
|
1304 |
+
data: data,
|
1305 |
+
element: $(this)
|
1306 |
+
});
|
1307 |
+
});
|
1308 |
+
};
|
1309 |
+
|
1310 |
+
Results.prototype.getHighlightedResults = function () {
|
1311 |
+
var $highlighted = this.$results
|
1312 |
+
.find('.select2-results__option--highlighted');
|
1313 |
+
|
1314 |
+
return $highlighted;
|
1315 |
+
};
|
1316 |
+
|
1317 |
+
Results.prototype.destroy = function () {
|
1318 |
+
this.$results.remove();
|
1319 |
+
};
|
1320 |
+
|
1321 |
+
Results.prototype.ensureHighlightVisible = function () {
|
1322 |
+
var $highlighted = this.getHighlightedResults();
|
1323 |
+
|
1324 |
+
if ($highlighted.length === 0) {
|
1325 |
+
return;
|
1326 |
+
}
|
1327 |
+
|
1328 |
+
var $options = this.$results.find('[aria-selected]');
|
1329 |
+
|
1330 |
+
var currentIndex = $options.index($highlighted);
|
1331 |
+
|
1332 |
+
var currentOffset = this.$results.offset().top;
|
1333 |
+
var nextTop = $highlighted.offset().top;
|
1334 |
+
var nextOffset = this.$results.scrollTop() + (nextTop - currentOffset);
|
1335 |
+
|
1336 |
+
var offsetDelta = nextTop - currentOffset;
|
1337 |
+
nextOffset -= $highlighted.outerHeight(false) * 2;
|
1338 |
+
|
1339 |
+
if (currentIndex <= 2) {
|
1340 |
+
this.$results.scrollTop(0);
|
1341 |
+
} else if (offsetDelta > this.$results.outerHeight() || offsetDelta < 0) {
|
1342 |
+
this.$results.scrollTop(nextOffset);
|
1343 |
+
}
|
1344 |
+
};
|
1345 |
+
|
1346 |
+
Results.prototype.template = function (result, container) {
|
1347 |
+
var template = this.options.get('templateResult');
|
1348 |
+
var escapeMarkup = this.options.get('escapeMarkup');
|
1349 |
+
|
1350 |
+
var content = template(result, container);
|
1351 |
+
|
1352 |
+
if (content == null) {
|
1353 |
+
container.style.display = 'none';
|
1354 |
+
} else if (typeof content === 'string') {
|
1355 |
+
container.innerHTML = escapeMarkup(content);
|
1356 |
+
} else {
|
1357 |
+
$(container).append(content);
|
1358 |
+
}
|
1359 |
+
};
|
1360 |
+
|
1361 |
+
return Results;
|
1362 |
+
});
|
1363 |
+
|
1364 |
+
S2.define('select2/keys',[
|
1365 |
+
|
1366 |
+
], function () {
|
1367 |
+
var KEYS = {
|
1368 |
+
BACKSPACE: 8,
|
1369 |
+
TAB: 9,
|
1370 |
+
ENTER: 13,
|
1371 |
+
SHIFT: 16,
|
1372 |
+
CTRL: 17,
|
1373 |
+
ALT: 18,
|
1374 |
+
ESC: 27,
|
1375 |
+
SPACE: 32,
|
1376 |
+
PAGE_UP: 33,
|
1377 |
+
PAGE_DOWN: 34,
|
1378 |
+
END: 35,
|
1379 |
+
HOME: 36,
|
1380 |
+
LEFT: 37,
|
1381 |
+
UP: 38,
|
1382 |
+
RIGHT: 39,
|
1383 |
+
DOWN: 40,
|
1384 |
+
DELETE: 46
|
1385 |
+
};
|
1386 |
+
|
1387 |
+
return KEYS;
|
1388 |
+
});
|
1389 |
+
|
1390 |
+
S2.define('select2/selection/base',[
|
1391 |
+
'jquery',
|
1392 |
+
'../utils',
|
1393 |
+
'../keys'
|
1394 |
+
], function ($, Utils, KEYS) {
|
1395 |
+
function BaseSelection ($element, options) {
|
1396 |
+
this.$element = $element;
|
1397 |
+
this.options = options;
|
1398 |
+
|
1399 |
+
BaseSelection.__super__.constructor.call(this);
|
1400 |
+
}
|
1401 |
+
|
1402 |
+
Utils.Extend(BaseSelection, Utils.Observable);
|
1403 |
+
|
1404 |
+
BaseSelection.prototype.render = function () {
|
1405 |
+
var $selection = $(
|
1406 |
+
'<span class="select2-selection" role="combobox" ' +
|
1407 |
+
' aria-haspopup="true" aria-expanded="false">' +
|
1408 |
+
'</span>'
|
1409 |
+
);
|
1410 |
+
|
1411 |
+
this._tabindex = 0;
|
1412 |
+
|
1413 |
+
if (Utils.GetData(this.$element[0], 'old-tabindex') != null) {
|
1414 |
+
this._tabindex = Utils.GetData(this.$element[0], 'old-tabindex');
|
1415 |
+
} else if (this.$element.attr('tabindex') != null) {
|
1416 |
+
this._tabindex = this.$element.attr('tabindex');
|
1417 |
+
}
|
1418 |
+
|
1419 |
+
$selection.attr('title', this.$element.attr('title'));
|
1420 |
+
$selection.attr('tabindex', this._tabindex);
|
1421 |
+
|
1422 |
+
this.$selection = $selection;
|
1423 |
+
|
1424 |
+
return $selection;
|
1425 |
+
};
|
1426 |
+
|
1427 |
+
BaseSelection.prototype.bind = function (container, $container) {
|
1428 |
+
var self = this;
|
1429 |
+
|
1430 |
+
var id = container.id + '-container';
|
1431 |
+
var resultsId = container.id + '-results';
|
1432 |
+
|
1433 |
+
this.container = container;
|
1434 |
+
|
1435 |
+
this.$selection.on('focus', function (evt) {
|
1436 |
+
self.trigger('focus', evt);
|
1437 |
+
});
|
1438 |
+
|
1439 |
+
this.$selection.on('blur', function (evt) {
|
1440 |
+
self._handleBlur(evt);
|
1441 |
+
});
|
1442 |
+
|
1443 |
+
this.$selection.on('keydown', function (evt) {
|
1444 |
+
self.trigger('keypress', evt);
|
1445 |
+
|
1446 |
+
if (evt.which === KEYS.SPACE) {
|
1447 |
+
evt.preventDefault();
|
1448 |
+
}
|
1449 |
+
});
|
1450 |
+
|
1451 |
+
container.on('results:focus', function (params) {
|
1452 |
+
self.$selection.attr('aria-activedescendant', params.data._resultId);
|
1453 |
+
});
|
1454 |
+
|
1455 |
+
container.on('selection:update', function (params) {
|
1456 |
+
self.update(params.data);
|
1457 |
+
});
|
1458 |
+
|
1459 |
+
container.on('open', function () {
|
1460 |
+
// When the dropdown is open, aria-expanded="true"
|
1461 |
+
self.$selection.attr('aria-expanded', 'true');
|
1462 |
+
self.$selection.attr('aria-owns', resultsId);
|
1463 |
+
|
1464 |
+
self._attachCloseHandler(container);
|
1465 |
+
});
|
1466 |
+
|
1467 |
+
container.on('close', function () {
|
1468 |
+
// When the dropdown is closed, aria-expanded="false"
|
1469 |
+
self.$selection.attr('aria-expanded', 'false');
|
1470 |
+
self.$selection.removeAttr('aria-activedescendant');
|
1471 |
+
self.$selection.removeAttr('aria-owns');
|
1472 |
+
|
1473 |
+
self.$selection.focus();
|
1474 |
+
window.setTimeout(function () {
|
1475 |
+
self.$selection.focus();
|
1476 |
+
}, 0);
|
1477 |
+
|
1478 |
+
self._detachCloseHandler(container);
|
1479 |
+
});
|
1480 |
+
|
1481 |
+
container.on('enable', function () {
|
1482 |
+
self.$selection.attr('tabindex', self._tabindex);
|
1483 |
+
});
|
1484 |
+
|
1485 |
+
container.on('disable', function () {
|
1486 |
+
self.$selection.attr('tabindex', '-1');
|
1487 |
+
});
|
1488 |
+
};
|
1489 |
+
|
1490 |
+
BaseSelection.prototype._handleBlur = function (evt) {
|
1491 |
+
var self = this;
|
1492 |
+
|
1493 |
+
// This needs to be delayed as the active element is the body when the tab
|
1494 |
+
// key is pressed, possibly along with others.
|
1495 |
+
window.setTimeout(function () {
|
1496 |
+
// Don't trigger `blur` if the focus is still in the selection
|
1497 |
+
if (
|
1498 |
+
(document.activeElement == self.$selection[0]) ||
|
1499 |
+
($.contains(self.$selection[0], document.activeElement))
|
1500 |
+
) {
|
1501 |
+
return;
|
1502 |
+
}
|
1503 |
+
|
1504 |
+
self.trigger('blur', evt);
|
1505 |
+
}, 1);
|
1506 |
+
};
|
1507 |
+
|
1508 |
+
BaseSelection.prototype._attachCloseHandler = function (container) {
|
1509 |
+
var self = this;
|
1510 |
+
|
1511 |
+
$(document.body).on('mousedown.select2.' + container.id, function (e) {
|
1512 |
+
var $target = $(e.target);
|
1513 |
+
|
1514 |
+
var $select = $target.closest('.select2');
|
1515 |
+
|
1516 |
+
var $all = $('.select2.select2-container--open');
|
1517 |
+
|
1518 |
+
$all.each(function () {
|
1519 |
+
var $this = $(this);
|
1520 |
+
|
1521 |
+
if (this == $select[0]) {
|
1522 |
+
return;
|
1523 |
+
}
|
1524 |
+
|
1525 |
+
var $element = Utils.GetData(this, 'element');
|
1526 |
+
|
1527 |
+
$element.select2('close');
|
1528 |
+
});
|
1529 |
+
});
|
1530 |
+
};
|
1531 |
+
|
1532 |
+
BaseSelection.prototype._detachCloseHandler = function (container) {
|
1533 |
+
$(document.body).off('mousedown.select2.' + container.id);
|
1534 |
+
};
|
1535 |
+
|
1536 |
+
BaseSelection.prototype.position = function ($selection, $container) {
|
1537 |
+
var $selectionContainer = $container.find('.selection');
|
1538 |
+
$selectionContainer.append($selection);
|
1539 |
+
};
|
1540 |
+
|
1541 |
+
BaseSelection.prototype.destroy = function () {
|
1542 |
+
this._detachCloseHandler(this.container);
|
1543 |
+
};
|
1544 |
+
|
1545 |
+
BaseSelection.prototype.update = function (data) {
|
1546 |
+
throw new Error('The `update` method must be defined in child classes.');
|
1547 |
+
};
|
1548 |
+
|
1549 |
+
return BaseSelection;
|
1550 |
+
});
|
1551 |
+
|
1552 |
+
S2.define('select2/selection/single',[
|
1553 |
+
'jquery',
|
1554 |
+
'./base',
|
1555 |
+
'../utils',
|
1556 |
+
'../keys'
|
1557 |
+
], function ($, BaseSelection, Utils, KEYS) {
|
1558 |
+
function SingleSelection () {
|
1559 |
+
SingleSelection.__super__.constructor.apply(this, arguments);
|
1560 |
+
}
|
1561 |
+
|
1562 |
+
Utils.Extend(SingleSelection, BaseSelection);
|
1563 |
+
|
1564 |
+
SingleSelection.prototype.render = function () {
|
1565 |
+
var $selection = SingleSelection.__super__.render.call(this);
|
1566 |
+
|
1567 |
+
$selection.addClass('select2-selection--single');
|
1568 |
+
|
1569 |
+
$selection.html(
|
1570 |
+
'<span class="select2-selection__rendered"></span>' +
|
1571 |
+
'<span class="select2-selection__arrow" role="presentation">' +
|
1572 |
+
'<b role="presentation"></b>' +
|
1573 |
+
'</span>'
|
1574 |
+
);
|
1575 |
+
|
1576 |
+
return $selection;
|
1577 |
+
};
|
1578 |
+
|
1579 |
+
SingleSelection.prototype.bind = function (container, $container) {
|
1580 |
+
var self = this;
|
1581 |
+
|
1582 |
+
SingleSelection.__super__.bind.apply(this, arguments);
|
1583 |
+
|
1584 |
+
var id = container.id + '-container';
|
1585 |
+
|
1586 |
+
this.$selection.find('.select2-selection__rendered')
|
1587 |
+
.attr('id', id)
|
1588 |
+
.attr('role', 'textbox')
|
1589 |
+
.attr('aria-readonly', 'true');
|
1590 |
+
this.$selection.attr('aria-labelledby', id);
|
1591 |
+
|
1592 |
+
this.$selection.on('mousedown', function (evt) {
|
1593 |
+
// Only respond to left clicks
|
1594 |
+
if (evt.which !== 1) {
|
1595 |
+
return;
|
1596 |
+
}
|
1597 |
+
|
1598 |
+
self.trigger('toggle', {
|
1599 |
+
originalEvent: evt
|
1600 |
+
});
|
1601 |
+
});
|
1602 |
+
|
1603 |
+
this.$selection.on('focus', function (evt) {
|
1604 |
+
// User focuses on the container
|
1605 |
+
});
|
1606 |
+
|
1607 |
+
this.$selection.on('blur', function (evt) {
|
1608 |
+
// User exits the container
|
1609 |
+
});
|
1610 |
+
|
1611 |
+
container.on('focus', function (evt) {
|
1612 |
+
if (!container.isOpen()) {
|
1613 |
+
self.$selection.focus();
|
1614 |
+
}
|
1615 |
+
});
|
1616 |
+
};
|
1617 |
+
|
1618 |
+
SingleSelection.prototype.clear = function () {
|
1619 |
+
var $rendered = this.$selection.find('.select2-selection__rendered');
|
1620 |
+
$rendered.empty();
|
1621 |
+
$rendered.removeAttr('title'); // clear tooltip on empty
|
1622 |
+
};
|
1623 |
+
|
1624 |
+
SingleSelection.prototype.display = function (data, container) {
|
1625 |
+
var template = this.options.get('templateSelection');
|
1626 |
+
var escapeMarkup = this.options.get('escapeMarkup');
|
1627 |
+
|
1628 |
+
return escapeMarkup(template(data, container));
|
1629 |
+
};
|
1630 |
+
|
1631 |
+
SingleSelection.prototype.selectionContainer = function () {
|
1632 |
+
return $('<span></span>');
|
1633 |
+
};
|
1634 |
+
|
1635 |
+
SingleSelection.prototype.update = function (data) {
|
1636 |
+
if (data.length === 0) {
|
1637 |
+
this.clear();
|
1638 |
+
return;
|
1639 |
+
}
|
1640 |
+
|
1641 |
+
var selection = data[0];
|
1642 |
+
|
1643 |
+
var $rendered = this.$selection.find('.select2-selection__rendered');
|
1644 |
+
var formatted = this.display(selection, $rendered);
|
1645 |
+
|
1646 |
+
$rendered.empty().append(formatted);
|
1647 |
+
$rendered.attr('title', selection.title || selection.text);
|
1648 |
+
};
|
1649 |
+
|
1650 |
+
return SingleSelection;
|
1651 |
+
});
|
1652 |
+
|
1653 |
+
S2.define('select2/selection/multiple',[
|
1654 |
+
'jquery',
|
1655 |
+
'./base',
|
1656 |
+
'../utils'
|
1657 |
+
], function ($, BaseSelection, Utils) {
|
1658 |
+
function MultipleSelection ($element, options) {
|
1659 |
+
MultipleSelection.__super__.constructor.apply(this, arguments);
|
1660 |
+
}
|
1661 |
+
|
1662 |
+
Utils.Extend(MultipleSelection, BaseSelection);
|
1663 |
+
|
1664 |
+
MultipleSelection.prototype.render = function () {
|
1665 |
+
var $selection = MultipleSelection.__super__.render.call(this);
|
1666 |
+
|
1667 |
+
$selection.addClass('select2-selection--multiple');
|
1668 |
+
|
1669 |
+
$selection.html(
|
1670 |
+
'<ul class="select2-selection__rendered"></ul>'
|
1671 |
+
);
|
1672 |
+
|
1673 |
+
return $selection;
|
1674 |
+
};
|
1675 |
+
|
1676 |
+
MultipleSelection.prototype.bind = function (container, $container) {
|
1677 |
+
var self = this;
|
1678 |
+
|
1679 |
+
MultipleSelection.__super__.bind.apply(this, arguments);
|
1680 |
+
|
1681 |
+
this.$selection.on('click', function (evt) {
|
1682 |
+
self.trigger('toggle', {
|
1683 |
+
originalEvent: evt
|
1684 |
+
});
|
1685 |
+
});
|
1686 |
+
|
1687 |
+
this.$selection.on(
|
1688 |
+
'click',
|
1689 |
+
'.select2-selection__choice__remove',
|
1690 |
+
function (evt) {
|
1691 |
+
// Ignore the event if it is disabled
|
1692 |
+
if (self.options.get('disabled')) {
|
1693 |
+
return;
|
1694 |
+
}
|
1695 |
+
|
1696 |
+
var $remove = $(this);
|
1697 |
+
var $selection = $remove.parent();
|
1698 |
+
|
1699 |
+
var data = Utils.GetData($selection[0], 'data');
|
1700 |
+
|
1701 |
+
self.trigger('unselect', {
|
1702 |
+
originalEvent: evt,
|
1703 |
+
data: data
|
1704 |
+
});
|
1705 |
+
}
|
1706 |
+
);
|
1707 |
+
};
|
1708 |
+
|
1709 |
+
MultipleSelection.prototype.clear = function () {
|
1710 |
+
var $rendered = this.$selection.find('.select2-selection__rendered');
|
1711 |
+
$rendered.empty();
|
1712 |
+
$rendered.removeAttr('title');
|
1713 |
+
};
|
1714 |
+
|
1715 |
+
MultipleSelection.prototype.display = function (data, container) {
|
1716 |
+
var template = this.options.get('templateSelection');
|
1717 |
+
var escapeMarkup = this.options.get('escapeMarkup');
|
1718 |
+
|
1719 |
+
return escapeMarkup(template(data, container));
|
1720 |
+
};
|
1721 |
+
|
1722 |
+
MultipleSelection.prototype.selectionContainer = function () {
|
1723 |
+
var $container = $(
|
1724 |
+
'<li class="select2-selection__choice">' +
|
1725 |
+
'<span class="select2-selection__choice__remove" role="presentation">' +
|
1726 |
+
'×' +
|
1727 |
+
'</span>' +
|
1728 |
+
'</li>'
|
1729 |
+
);
|
1730 |
+
|
1731 |
+
return $container;
|
1732 |
+
};
|
1733 |
+
|
1734 |
+
MultipleSelection.prototype.update = function (data) {
|
1735 |
+
this.clear();
|
1736 |
+
|
1737 |
+
if (data.length === 0) {
|
1738 |
+
return;
|
1739 |
+
}
|
1740 |
+
|
1741 |
+
var $selections = [];
|
1742 |
+
|
1743 |
+
for (var d = 0; d < data.length; d++) {
|
1744 |
+
var selection = data[d];
|
1745 |
+
|
1746 |
+
var $selection = this.selectionContainer();
|
1747 |
+
var formatted = this.display(selection, $selection);
|
1748 |
+
|
1749 |
+
$selection.append(formatted);
|
1750 |
+
$selection.attr('title', selection.title || selection.text);
|
1751 |
+
|
1752 |
+
Utils.StoreData($selection[0], 'data', selection);
|
1753 |
+
|
1754 |
+
$selections.push($selection);
|
1755 |
+
}
|
1756 |
+
|
1757 |
+
var $rendered = this.$selection.find('.select2-selection__rendered');
|
1758 |
+
|
1759 |
+
Utils.appendMany($rendered, $selections);
|
1760 |
+
};
|
1761 |
+
|
1762 |
+
return MultipleSelection;
|
1763 |
+
});
|
1764 |
+
|
1765 |
+
S2.define('select2/selection/placeholder',[
|
1766 |
+
'../utils'
|
1767 |
+
], function (Utils) {
|
1768 |
+
function Placeholder (decorated, $element, options) {
|
1769 |
+
this.placeholder = this.normalizePlaceholder(options.get('placeholder'));
|
1770 |
+
|
1771 |
+
decorated.call(this, $element, options);
|
1772 |
+
}
|
1773 |
+
|
1774 |
+
Placeholder.prototype.normalizePlaceholder = function (_, placeholder) {
|
1775 |
+
if (typeof placeholder === 'string') {
|
1776 |
+
placeholder = {
|
1777 |
+
id: '',
|
1778 |
+
text: placeholder
|
1779 |
+
};
|
1780 |
+
}
|
1781 |
+
|
1782 |
+
return placeholder;
|
1783 |
+
};
|
1784 |
+
|
1785 |
+
Placeholder.prototype.createPlaceholder = function (decorated, placeholder) {
|
1786 |
+
var $placeholder = this.selectionContainer();
|
1787 |
+
|
1788 |
+
$placeholder.html(this.display(placeholder));
|
1789 |
+
$placeholder.addClass('select2-selection__placeholder')
|
1790 |
+
.removeClass('select2-selection__choice');
|
1791 |
+
|
1792 |
+
return $placeholder;
|
1793 |
+
};
|
1794 |
+
|
1795 |
+
Placeholder.prototype.update = function (decorated, data) {
|
1796 |
+
var singlePlaceholder = (
|
1797 |
+
data.length == 1 && data[0].id != this.placeholder.id
|
1798 |
+
);
|
1799 |
+
var multipleSelections = data.length > 1;
|
1800 |
+
|
1801 |
+
if (multipleSelections || singlePlaceholder) {
|
1802 |
+
return decorated.call(this, data);
|
1803 |
+
}
|
1804 |
+
|
1805 |
+
this.clear();
|
1806 |
+
|
1807 |
+
var $placeholder = this.createPlaceholder(this.placeholder);
|
1808 |
+
|
1809 |
+
this.$selection.find('.select2-selection__rendered').append($placeholder);
|
1810 |
+
};
|
1811 |
+
|
1812 |
+
return Placeholder;
|
1813 |
+
});
|
1814 |
+
|
1815 |
+
S2.define('select2/selection/allowClear',[
|
1816 |
+
'jquery',
|
1817 |
+
'../keys',
|
1818 |
+
'../utils'
|
1819 |
+
], function ($, KEYS, Utils) {
|
1820 |
+
function AllowClear () { }
|
1821 |
+
|
1822 |
+
AllowClear.prototype.bind = function (decorated, container, $container) {
|
1823 |
+
var self = this;
|
1824 |
+
|
1825 |
+
decorated.call(this, container, $container);
|
1826 |
+
|
1827 |
+
if (this.placeholder == null) {
|
1828 |
+
if (this.options.get('debug') && window.console && console.error) {
|
1829 |
+
console.error(
|
1830 |
+
'Select2: The `allowClear` option should be used in combination ' +
|
1831 |
+
'with the `placeholder` option.'
|
1832 |
+
);
|
1833 |
+
}
|
1834 |
+
}
|
1835 |
+
|
1836 |
+
this.$selection.on('mousedown', '.select2-selection__clear',
|
1837 |
+
function (evt) {
|
1838 |
+
self._handleClear(evt);
|
1839 |
+
});
|
1840 |
+
|
1841 |
+
container.on('keypress', function (evt) {
|
1842 |
+
self._handleKeyboardClear(evt, container);
|
1843 |
+
});
|
1844 |
+
};
|
1845 |
+
|
1846 |
+
AllowClear.prototype._handleClear = function (_, evt) {
|
1847 |
+
// Ignore the event if it is disabled
|
1848 |
+
if (this.options.get('disabled')) {
|
1849 |
+
return;
|
1850 |
+
}
|
1851 |
+
|
1852 |
+
var $clear = this.$selection.find('.select2-selection__clear');
|
1853 |
+
|
1854 |
+
// Ignore the event if nothing has been selected
|
1855 |
+
if ($clear.length === 0) {
|
1856 |
+
return;
|
1857 |
+
}
|
1858 |
+
|
1859 |
+
evt.stopPropagation();
|
1860 |
+
|
1861 |
+
var data = Utils.GetData($clear[0], 'data');
|
1862 |
+
|
1863 |
+
var previousVal = this.$element.val();
|
1864 |
+
this.$element.val(this.placeholder.id);
|
1865 |
+
|
1866 |
+
var unselectData = {
|
1867 |
+
data: data
|
1868 |
+
};
|
1869 |
+
this.trigger('clear', unselectData);
|
1870 |
+
if (unselectData.prevented) {
|
1871 |
+
this.$element.val(previousVal);
|
1872 |
+
return;
|
1873 |
+
}
|
1874 |
+
|
1875 |
+
for (var d = 0; d < data.length; d++) {
|
1876 |
+
unselectData = {
|
1877 |
+
data: data[d]
|
1878 |
+
};
|
1879 |
+
|
1880 |
+
// Trigger the `unselect` event, so people can prevent it from being
|
1881 |
+
// cleared.
|
1882 |
+
this.trigger('unselect', unselectData);
|
1883 |
+
|
1884 |
+
// If the event was prevented, don't clear it out.
|
1885 |
+
if (unselectData.prevented) {
|
1886 |
+
this.$element.val(previousVal);
|
1887 |
+
return;
|
1888 |
+
}
|
1889 |
+
}
|
1890 |
+
|
1891 |
+
this.$element.trigger('change');
|
1892 |
+
|
1893 |
+
this.trigger('toggle', {});
|
1894 |
+
};
|
1895 |
+
|
1896 |
+
AllowClear.prototype._handleKeyboardClear = function (_, evt, container) {
|
1897 |
+
if (container.isOpen()) {
|
1898 |
+
return;
|
1899 |
+
}
|
1900 |
+
|
1901 |
+
if (evt.which == KEYS.DELETE || evt.which == KEYS.BACKSPACE) {
|
1902 |
+
this._handleClear(evt);
|
1903 |
+
}
|
1904 |
+
};
|
1905 |
+
|
1906 |
+
AllowClear.prototype.update = function (decorated, data) {
|
1907 |
+
decorated.call(this, data);
|
1908 |
+
|
1909 |
+
if (this.$selection.find('.select2-selection__placeholder').length > 0 ||
|
1910 |
+
data.length === 0) {
|
1911 |
+
return;
|
1912 |
+
}
|
1913 |
+
|
1914 |
+
var $remove = $(
|
1915 |
+
'<span class="select2-selection__clear">' +
|
1916 |
+
'×' +
|
1917 |
+
'</span>'
|
1918 |
+
);
|
1919 |
+
Utils.StoreData($remove[0], 'data', data);
|
1920 |
+
|
1921 |
+
this.$selection.find('.select2-selection__rendered').prepend($remove);
|
1922 |
+
};
|
1923 |
+
|
1924 |
+
return AllowClear;
|
1925 |
+
});
|
1926 |
+
|
1927 |
+
S2.define('select2/selection/search',[
|
1928 |
+
'jquery',
|
1929 |
+
'../utils',
|
1930 |
+
'../keys'
|
1931 |
+
], function ($, Utils, KEYS) {
|
1932 |
+
function Search (decorated, $element, options) {
|
1933 |
+
decorated.call(this, $element, options);
|
1934 |
+
}
|
1935 |
+
|
1936 |
+
Search.prototype.render = function (decorated) {
|
1937 |
+
var $search = $(
|
1938 |
+
'<li class="select2-search select2-search--inline">' +
|
1939 |
+
'<input class="select2-search__field" type="search" tabindex="-1"' +
|
1940 |
+
' autocomplete="off" autocorrect="off" autocapitalize="none"' +
|
1941 |
+
' spellcheck="false" role="textbox" aria-autocomplete="list" />' +
|
1942 |
+
'</li>'
|
1943 |
+
);
|
1944 |
+
|
1945 |
+
this.$searchContainer = $search;
|
1946 |
+
this.$search = $search.find('input');
|
1947 |
+
|
1948 |
+
var $rendered = decorated.call(this);
|
1949 |
+
|
1950 |
+
this._transferTabIndex();
|
1951 |
+
|
1952 |
+
return $rendered;
|
1953 |
+
};
|
1954 |
+
|
1955 |
+
Search.prototype.bind = function (decorated, container, $container) {
|
1956 |
+
var self = this;
|
1957 |
+
|
1958 |
+
decorated.call(this, container, $container);
|
1959 |
+
|
1960 |
+
container.on('open', function () {
|
1961 |
+
self.$search.trigger('focus');
|
1962 |
+
});
|
1963 |
+
|
1964 |
+
container.on('close', function () {
|
1965 |
+
self.$search.val('');
|
1966 |
+
self.$search.removeAttr('aria-activedescendant');
|
1967 |
+
self.$search.trigger('focus');
|
1968 |
+
});
|
1969 |
+
|
1970 |
+
container.on('enable', function () {
|
1971 |
+
self.$search.prop('disabled', false);
|
1972 |
+
|
1973 |
+
self._transferTabIndex();
|
1974 |
+
});
|
1975 |
+
|
1976 |
+
container.on('disable', function () {
|
1977 |
+
self.$search.prop('disabled', true);
|
1978 |
+
});
|
1979 |
+
|
1980 |
+
container.on('focus', function (evt) {
|
1981 |
+
self.$search.trigger('focus');
|
1982 |
+
});
|
1983 |
+
|
1984 |
+
container.on('results:focus', function (params) {
|
1985 |
+
self.$search.attr('aria-activedescendant', params.id);
|
1986 |
+
});
|
1987 |
+
|
1988 |
+
this.$selection.on('focusin', '.select2-search--inline', function (evt) {
|
1989 |
+
self.trigger('focus', evt);
|
1990 |
+
});
|
1991 |
+
|
1992 |
+
this.$selection.on('focusout', '.select2-search--inline', function (evt) {
|
1993 |
+
self._handleBlur(evt);
|
1994 |
+
});
|
1995 |
+
|
1996 |
+
this.$selection.on('keydown', '.select2-search--inline', function (evt) {
|
1997 |
+
evt.stopPropagation();
|
1998 |
+
|
1999 |
+
self.trigger('keypress', evt);
|
2000 |
+
|
2001 |
+
self._keyUpPrevented = evt.isDefaultPrevented();
|
2002 |
+
|
2003 |
+
var key = evt.which;
|
2004 |
+
|
2005 |
+
if (key === KEYS.BACKSPACE && self.$search.val() === '') {
|
2006 |
+
var $previousChoice = self.$searchContainer
|
2007 |
+
.prev('.select2-selection__choice');
|
2008 |
+
|
2009 |
+
if ($previousChoice.length > 0) {
|
2010 |
+
var item = Utils.GetData($previousChoice[0], 'data');
|
2011 |
+
|
2012 |
+
self.searchRemoveChoice(item);
|
2013 |
+
|
2014 |
+
evt.preventDefault();
|
2015 |
+
}
|
2016 |
+
}
|
2017 |
+
});
|
2018 |
+
|
2019 |
+
// Try to detect the IE version should the `documentMode` property that
|
2020 |
+
// is stored on the document. This is only implemented in IE and is
|
2021 |
+
// slightly cleaner than doing a user agent check.
|
2022 |
+
// This property is not available in Edge, but Edge also doesn't have
|
2023 |
+
// this bug.
|
2024 |
+
var msie = document.documentMode;
|
2025 |
+
var disableInputEvents = msie && msie <= 11;
|
2026 |
+
|
2027 |
+
// Workaround for browsers which do not support the `input` event
|
2028 |
+
// This will prevent double-triggering of events for browsers which support
|
2029 |
+
// both the `keyup` and `input` events.
|
2030 |
+
this.$selection.on(
|
2031 |
+
'input.searchcheck',
|
2032 |
+
'.select2-search--inline',
|
2033 |
+
function (evt) {
|
2034 |
+
// IE will trigger the `input` event when a placeholder is used on a
|
2035 |
+
// search box. To get around this issue, we are forced to ignore all
|
2036 |
+
// `input` events in IE and keep using `keyup`.
|
2037 |
+
if (disableInputEvents) {
|
2038 |
+
self.$selection.off('input.search input.searchcheck');
|
2039 |
+
return;
|
2040 |
+
}
|
2041 |
+
|
2042 |
+
// Unbind the duplicated `keyup` event
|
2043 |
+
self.$selection.off('keyup.search');
|
2044 |
+
}
|
2045 |
+
);
|
2046 |
+
|
2047 |
+
this.$selection.on(
|
2048 |
+
'keyup.search input.search',
|
2049 |
+
'.select2-search--inline',
|
2050 |
+
function (evt) {
|
2051 |
+
// IE will trigger the `input` event when a placeholder is used on a
|
2052 |
+
// search box. To get around this issue, we are forced to ignore all
|
2053 |
+
// `input` events in IE and keep using `keyup`.
|
2054 |
+
if (disableInputEvents && evt.type === 'input') {
|
2055 |
+
self.$selection.off('input.search input.searchcheck');
|
2056 |
+
return;
|
2057 |
+
}
|
2058 |
+
|
2059 |
+
var key = evt.which;
|
2060 |
+
|
2061 |
+
// We can freely ignore events from modifier keys
|
2062 |
+
if (key == KEYS.SHIFT || key == KEYS.CTRL || key == KEYS.ALT) {
|
2063 |
+
return;
|
2064 |
+
}
|
2065 |
+
|
2066 |
+
// Tabbing will be handled during the `keydown` phase
|
2067 |
+
if (key == KEYS.TAB) {
|
2068 |
+
return;
|
2069 |
+
}
|
2070 |
+
|
2071 |
+
self.handleSearch(evt);
|
2072 |
+
}
|
2073 |
+
);
|
2074 |
+
};
|
2075 |
+
|
2076 |
+
/**
|
2077 |
+
* This method will transfer the tabindex attribute from the rendered
|
2078 |
+
* selection to the search box. This allows for the search box to be used as
|
2079 |
+
* the primary focus instead of the selection container.
|
2080 |
+
*
|
2081 |
+
* @private
|
2082 |
+
*/
|
2083 |
+
Search.prototype._transferTabIndex = function (decorated) {
|
2084 |
+
this.$search.attr('tabindex', this.$selection.attr('tabindex'));
|
2085 |
+
this.$selection.attr('tabindex', '-1');
|
2086 |
+
};
|
2087 |
+
|
2088 |
+
Search.prototype.createPlaceholder = function (decorated, placeholder) {
|
2089 |
+
this.$search.attr('placeholder', placeholder.text);
|
2090 |
+
};
|
2091 |
+
|
2092 |
+
Search.prototype.update = function (decorated, data) {
|
2093 |
+
var searchHadFocus = this.$search[0] == document.activeElement;
|
2094 |
+
|
2095 |
+
this.$search.attr('placeholder', '');
|
2096 |
+
|
2097 |
+
decorated.call(this, data);
|
2098 |
+
|
2099 |
+
this.$selection.find('.select2-selection__rendered')
|
2100 |
+
.append(this.$searchContainer);
|
2101 |
+
|
2102 |
+
this.resizeSearch();
|
2103 |
+
if (searchHadFocus) {
|
2104 |
+
var isTagInput = this.$element.find('[data-select2-tag]').length;
|
2105 |
+
if (isTagInput) {
|
2106 |
+
// fix IE11 bug where tag input lost focus
|
2107 |
+
this.$element.focus();
|
2108 |
+
} else {
|
2109 |
+
this.$search.focus();
|
2110 |
+
}
|
2111 |
+
}
|
2112 |
+
};
|
2113 |
+
|
2114 |
+
Search.prototype.handleSearch = function () {
|
2115 |
+
this.resizeSearch();
|
2116 |
+
|
2117 |
+
if (!this._keyUpPrevented) {
|
2118 |
+
var input = this.$search.val();
|
2119 |
+
|
2120 |
+
this.trigger('query', {
|
2121 |
+
term: input
|
2122 |
+
});
|
2123 |
+
}
|
2124 |
+
|
2125 |
+
this._keyUpPrevented = false;
|
2126 |
+
};
|
2127 |
+
|
2128 |
+
Search.prototype.searchRemoveChoice = function (decorated, item) {
|
2129 |
+
this.trigger('unselect', {
|
2130 |
+
data: item
|
2131 |
+
});
|
2132 |
+
|
2133 |
+
this.$search.val(item.text);
|
2134 |
+
this.handleSearch();
|
2135 |
+
};
|
2136 |
+
|
2137 |
+
Search.prototype.resizeSearch = function () {
|
2138 |
+
this.$search.css('width', '25px');
|
2139 |
+
|
2140 |
+
var width = '';
|
2141 |
+
|
2142 |
+
if (this.$search.attr('placeholder') !== '') {
|
2143 |
+
width = this.$selection.find('.select2-selection__rendered').innerWidth();
|
2144 |
+
} else {
|
2145 |
+
var minimumWidth = this.$search.val().length + 1;
|
2146 |
+
|
2147 |
+
width = (minimumWidth * 0.75) + 'em';
|
2148 |
+
}
|
2149 |
+
|
2150 |
+
this.$search.css('width', width);
|
2151 |
+
};
|
2152 |
+
|
2153 |
+
return Search;
|
2154 |
+
});
|
2155 |
+
|
2156 |
+
S2.define('select2/selection/eventRelay',[
|
2157 |
+
'jquery'
|
2158 |
+
], function ($) {
|
2159 |
+
function EventRelay () { }
|
2160 |
+
|
2161 |
+
EventRelay.prototype.bind = function (decorated, container, $container) {
|
2162 |
+
var self = this;
|
2163 |
+
var relayEvents = [
|
2164 |
+
'open', 'opening',
|
2165 |
+
'close', 'closing',
|
2166 |
+
'select', 'selecting',
|
2167 |
+
'unselect', 'unselecting',
|
2168 |
+
'clear', 'clearing'
|
2169 |
+
];
|
2170 |
+
|
2171 |
+
var preventableEvents = [
|
2172 |
+
'opening', 'closing', 'selecting', 'unselecting', 'clearing'
|
2173 |
+
];
|
2174 |
+
|
2175 |
+
decorated.call(this, container, $container);
|
2176 |
+
|
2177 |
+
container.on('*', function (name, params) {
|
2178 |
+
// Ignore events that should not be relayed
|
2179 |
+
if ($.inArray(name, relayEvents) === -1) {
|
2180 |
+
return;
|
2181 |
+
}
|
2182 |
+
|
2183 |
+
// The parameters should always be an object
|
2184 |
+
params = params || {};
|
2185 |
+
|
2186 |
+
// Generate the jQuery event for the Select2 event
|
2187 |
+
var evt = $.Event('select2:' + name, {
|
2188 |
+
params: params
|
2189 |
+
});
|
2190 |
+
|
2191 |
+
self.$element.trigger(evt);
|
2192 |
+
|
2193 |
+
// Only handle preventable events if it was one
|
2194 |
+
if ($.inArray(name, preventableEvents) === -1) {
|
2195 |
+
return;
|
2196 |
+
}
|
2197 |
+
|
2198 |
+
params.prevented = evt.isDefaultPrevented();
|
2199 |
+
});
|
2200 |
+
};
|
2201 |
+
|
2202 |
+
return EventRelay;
|
2203 |
+
});
|
2204 |
+
|
2205 |
+
S2.define('select2/translation',[
|
2206 |
+
'jquery',
|
2207 |
+
'require'
|
2208 |
+
], function ($, require) {
|
2209 |
+
function Translation (dict) {
|
2210 |
+
this.dict = dict || {};
|
2211 |
+
}
|
2212 |
+
|
2213 |
+
Translation.prototype.all = function () {
|
2214 |
+
return this.dict;
|
2215 |
+
};
|
2216 |
+
|
2217 |
+
Translation.prototype.get = function (key) {
|
2218 |
+
return this.dict[key];
|
2219 |
+
};
|
2220 |
+
|
2221 |
+
Translation.prototype.extend = function (translation) {
|
2222 |
+
this.dict = $.extend({}, translation.all(), this.dict);
|
2223 |
+
};
|
2224 |
+
|
2225 |
+
// Static functions
|
2226 |
+
|
2227 |
+
Translation._cache = {};
|
2228 |
+
|
2229 |
+
Translation.loadPath = function (path) {
|
2230 |
+
if (!(path in Translation._cache)) {
|
2231 |
+
var translations = require(path);
|
2232 |
+
|
2233 |
+
Translation._cache[path] = translations;
|
2234 |
+
}
|
2235 |
+
|
2236 |
+
return new Translation(Translation._cache[path]);
|
2237 |
+
};
|
2238 |
+
|
2239 |
+
return Translation;
|
2240 |
+
});
|
2241 |
+
|
2242 |
+
S2.define('select2/diacritics',[
|
2243 |
+
|
2244 |
+
], function () {
|
2245 |
+
var diacritics = {
|
2246 |
+
'\u24B6': 'A',
|
2247 |
+
'\uFF21': 'A',
|
2248 |
+
'\u00C0': 'A',
|
2249 |
+
'\u00C1': 'A',
|
2250 |
+
'\u00C2': 'A',
|
2251 |
+
'\u1EA6': 'A',
|
2252 |
+
'\u1EA4': 'A',
|
2253 |
+
'\u1EAA': 'A',
|
2254 |
+
'\u1EA8': 'A',
|
2255 |
+
'\u00C3': 'A',
|
2256 |
+
'\u0100': 'A',
|
2257 |
+
'\u0102': 'A',
|
2258 |
+
'\u1EB0': 'A',
|
2259 |
+
'\u1EAE': 'A',
|
2260 |
+
'\u1EB4': 'A',
|
2261 |
+
'\u1EB2': 'A',
|
2262 |
+
'\u0226': 'A',
|
2263 |
+
'\u01E0': 'A',
|
2264 |
+
'\u00C4': 'A',
|
2265 |
+
'\u01DE': 'A',
|
2266 |
+
'\u1EA2': 'A',
|
2267 |
+
'\u00C5': 'A',
|
2268 |
+
'\u01FA': 'A',
|
2269 |
+
'\u01CD': 'A',
|
2270 |
+
'\u0200': 'A',
|
2271 |
+
'\u0202': 'A',
|
2272 |
+
'\u1EA0': 'A',
|
2273 |
+
'\u1EAC': 'A',
|
2274 |
+
'\u1EB6': 'A',
|
2275 |
+
'\u1E00': 'A',
|
2276 |
+
'\u0104': 'A',
|
2277 |
+
'\u023A': 'A',
|
2278 |
+
'\u2C6F': 'A',
|
2279 |
+
'\uA732': 'AA',
|
2280 |
+
'\u00C6': 'AE',
|
2281 |
+
'\u01FC': 'AE',
|
2282 |
+
'\u01E2': 'AE',
|
2283 |
+
'\uA734': 'AO',
|
2284 |
+
'\uA736': 'AU',
|
2285 |
+
'\uA738': 'AV',
|
2286 |
+
'\uA73A': 'AV',
|
2287 |
+
'\uA73C': 'AY',
|
2288 |
+
'\u24B7': 'B',
|
2289 |
+
'\uFF22': 'B',
|
2290 |
+
'\u1E02': 'B',
|
2291 |
+
'\u1E04': 'B',
|
2292 |
+
'\u1E06': 'B',
|
2293 |
+
'\u0243': 'B',
|
2294 |
+
'\u0182': 'B',
|
2295 |
+
'\u0181': 'B',
|
2296 |
+
'\u24B8': 'C',
|
2297 |
+
'\uFF23': 'C',
|
2298 |
+
'\u0106': 'C',
|
2299 |
+
'\u0108': 'C',
|
2300 |
+
'\u010A': 'C',
|
2301 |
+
'\u010C': 'C',
|
2302 |
+
'\u00C7': 'C',
|
2303 |
+
'\u1E08': 'C',
|
2304 |
+
'\u0187': 'C',
|
2305 |
+
'\u023B': 'C',
|
2306 |
+
'\uA73E': 'C',
|
2307 |
+
'\u24B9': 'D',
|
2308 |
+
'\uFF24': 'D',
|
2309 |
+
'\u1E0A': 'D',
|
2310 |
+
'\u010E': 'D',
|
2311 |
+
'\u1E0C': 'D',
|
2312 |
+
'\u1E10': 'D',
|
2313 |
+
'\u1E12': 'D',
|
2314 |
+
'\u1E0E': 'D',
|
2315 |
+
'\u0110': 'D',
|
2316 |
+
'\u018B': 'D',
|
2317 |
+
'\u018A': 'D',
|
2318 |
+
'\u0189': 'D',
|
2319 |
+
'\uA779': 'D',
|
2320 |
+
'\u01F1': 'DZ',
|
2321 |
+
'\u01C4': 'DZ',
|
2322 |
+
'\u01F2': 'Dz',
|
2323 |
+
'\u01C5': 'Dz',
|
2324 |
+
'\u24BA': 'E',
|
2325 |
+
'\uFF25': 'E',
|
2326 |
+
'\u00C8': 'E',
|
2327 |
+
'\u00C9': 'E',
|
2328 |
+
'\u00CA': 'E',
|
2329 |
+
'\u1EC0': 'E',
|
2330 |
+
'\u1EBE': 'E',
|
2331 |
+
'\u1EC4': 'E',
|
2332 |
+
'\u1EC2': 'E',
|
2333 |
+
'\u1EBC': 'E',
|
2334 |
+
'\u0112': 'E',
|
2335 |
+
'\u1E14': 'E',
|
2336 |
+
'\u1E16': 'E',
|
2337 |
+
'\u0114': 'E',
|
2338 |
+
'\u0116': 'E',
|
2339 |
+
'\u00CB': 'E',
|
2340 |
+
'\u1EBA': 'E',
|
2341 |
+
'\u011A': 'E',
|
2342 |
+
'\u0204': 'E',
|
2343 |
+
'\u0206': 'E',
|
2344 |
+
'\u1EB8': 'E',
|
2345 |
+
'\u1EC6': 'E',
|
2346 |
+
'\u0228': 'E',
|
2347 |
+
'\u1E1C': 'E',
|
2348 |
+
'\u0118': 'E',
|
2349 |
+
'\u1E18': 'E',
|
2350 |
+
'\u1E1A': 'E',
|
2351 |
+
'\u0190': 'E',
|
2352 |
+
'\u018E': 'E',
|
2353 |
+
'\u24BB': 'F',
|
2354 |
+
'\uFF26': 'F',
|
2355 |
+
'\u1E1E': 'F',
|
2356 |
+
'\u0191': 'F',
|
2357 |
+
'\uA77B': 'F',
|
2358 |
+
'\u24BC': 'G',
|
2359 |
+
'\uFF27': 'G',
|
2360 |
+
'\u01F4': 'G',
|
2361 |
+
'\u011C': 'G',
|
2362 |
+
'\u1E20': 'G',
|
2363 |
+
'\u011E': 'G',
|
2364 |
+
'\u0120': 'G',
|
2365 |
+
'\u01E6': 'G',
|
2366 |
+
'\u0122': 'G',
|
2367 |
+
'\u01E4': 'G',
|
2368 |
+
'\u0193': 'G',
|
2369 |
+
'\uA7A0': 'G',
|
2370 |
+
'\uA77D': 'G',
|
2371 |
+
'\uA77E': 'G',
|
2372 |
+
'\u24BD': 'H',
|
2373 |
+
'\uFF28': 'H',
|
2374 |
+
'\u0124': 'H',
|
2375 |
+
'\u1E22': 'H',
|
2376 |
+
'\u1E26': 'H',
|
2377 |
+
'\u021E': 'H',
|
2378 |
+
'\u1E24': 'H',
|
2379 |
+
'\u1E28': 'H',
|
2380 |
+
'\u1E2A': 'H',
|
2381 |
+
'\u0126': 'H',
|
2382 |
+
'\u2C67': 'H',
|
2383 |
+
'\u2C75': 'H',
|
2384 |
+
'\uA78D': 'H',
|
2385 |
+
'\u24BE': 'I',
|
2386 |
+
'\uFF29': 'I',
|
2387 |
+
'\u00CC': 'I',
|
2388 |
+
'\u00CD': 'I',
|
2389 |
+
'\u00CE': 'I',
|
2390 |
+
'\u0128': 'I',
|
2391 |
+
'\u012A': 'I',
|
2392 |
+
'\u012C': 'I',
|
2393 |
+
'\u0130': 'I',
|
2394 |
+
'\u00CF': 'I',
|
2395 |
+
'\u1E2E': 'I',
|
2396 |
+
'\u1EC8': 'I',
|
2397 |
+
'\u01CF': 'I',
|
2398 |
+
'\u0208': 'I',
|
2399 |
+
'\u020A': 'I',
|
2400 |
+
'\u1ECA': 'I',
|
2401 |
+
'\u012E': 'I',
|
2402 |
+
'\u1E2C': 'I',
|
2403 |
+
'\u0197': 'I',
|
2404 |
+
'\u24BF': 'J',
|
2405 |
+
'\uFF2A': 'J',
|
2406 |
+
'\u0134': 'J',
|
2407 |
+
'\u0248': 'J',
|
2408 |
+
'\u24C0': 'K',
|
2409 |
+
'\uFF2B': 'K',
|
2410 |
+
'\u1E30': 'K',
|
2411 |
+
'\u01E8': 'K',
|
2412 |
+
'\u1E32': 'K',
|
2413 |
+
'\u0136': 'K',
|
2414 |
+
'\u1E34': 'K',
|
2415 |
+
'\u0198': 'K',
|
2416 |
+
'\u2C69': 'K',
|
2417 |
+
'\uA740': 'K',
|
2418 |
+
'\uA742': 'K',
|
2419 |
+
'\uA744': 'K',
|
2420 |
+
'\uA7A2': 'K',
|
2421 |
+
'\u24C1': 'L',
|
2422 |
+
'\uFF2C': 'L',
|
2423 |
+
'\u013F': 'L',
|
2424 |
+
'\u0139': 'L',
|
2425 |
+
'\u013D': 'L',
|
2426 |
+
'\u1E36': 'L',
|
2427 |
+
'\u1E38': 'L',
|
2428 |
+
'\u013B': 'L',
|
2429 |
+
'\u1E3C': 'L',
|
2430 |
+
'\u1E3A': 'L',
|
2431 |
+
'\u0141': 'L',
|
2432 |
+
'\u023D': 'L',
|
2433 |
+
'\u2C62': 'L',
|
2434 |
+
'\u2C60': 'L',
|
2435 |
+
'\uA748': 'L',
|
2436 |
+
'\uA746': 'L',
|
2437 |
+
'\uA780': 'L',
|
2438 |
+
'\u01C7': 'LJ',
|
2439 |
+
'\u01C8': 'Lj',
|
2440 |
+
'\u24C2': 'M',
|
2441 |
+
'\uFF2D': 'M',
|
2442 |
+
'\u1E3E': 'M',
|
2443 |
+
'\u1E40': 'M',
|
2444 |
+
'\u1E42': 'M',
|
2445 |
+
'\u2C6E': 'M',
|
2446 |
+
'\u019C': 'M',
|
2447 |
+
'\u24C3': 'N',
|
2448 |
+
'\uFF2E': 'N',
|
2449 |
+
'\u01F8': 'N',
|
2450 |
+
'\u0143': 'N',
|
2451 |
+
'\u00D1': 'N',
|
2452 |
+
'\u1E44': 'N',
|
2453 |
+
'\u0147': 'N',
|
2454 |
+
'\u1E46': 'N',
|
2455 |
+
'\u0145': 'N',
|
2456 |
+
'\u1E4A': 'N',
|
2457 |
+
'\u1E48': 'N',
|
2458 |
+
'\u0220': 'N',
|
2459 |
+
'\u019D': 'N',
|
2460 |
+
'\uA790': 'N',
|
2461 |
+
'\uA7A4': 'N',
|
2462 |
+
'\u01CA': 'NJ',
|
2463 |
+
'\u01CB': 'Nj',
|
2464 |
+
'\u24C4': 'O',
|
2465 |
+
'\uFF2F': 'O',
|
2466 |
+
'\u00D2': 'O',
|
2467 |
+
'\u00D3': 'O',
|
2468 |
+
'\u00D4': 'O',
|
2469 |
+
'\u1ED2': 'O',
|
2470 |
+
'\u1ED0': 'O',
|
2471 |
+
'\u1ED6': 'O',
|
2472 |
+
'\u1ED4': 'O',
|
2473 |
+
'\u00D5': 'O',
|
2474 |
+
'\u1E4C': 'O',
|
2475 |
+
'\u022C': 'O',
|
2476 |
+
'\u1E4E': 'O',
|
2477 |
+
'\u014C': 'O',
|
2478 |
+
'\u1E50': 'O',
|
2479 |
+
'\u1E52': 'O',
|
2480 |
+
'\u014E': 'O',
|
2481 |
+
'\u022E': 'O',
|
2482 |
+
'\u0230': 'O',
|
2483 |
+
'\u00D6': 'O',
|
2484 |
+
'\u022A': 'O',
|
2485 |
+
'\u1ECE': 'O',
|
2486 |
+
'\u0150': 'O',
|
2487 |
+
'\u01D1': 'O',
|
2488 |
+
'\u020C': 'O',
|
2489 |
+
'\u020E': 'O',
|
2490 |
+
'\u01A0': 'O',
|
2491 |
+
'\u1EDC': 'O',
|
2492 |
+
'\u1EDA': 'O',
|
2493 |
+
'\u1EE0': 'O',
|
2494 |
+
'\u1EDE': 'O',
|
2495 |
+
'\u1EE2': 'O',
|
2496 |
+
'\u1ECC': 'O',
|
2497 |
+
'\u1ED8': 'O',
|
2498 |
+
'\u01EA': 'O',
|
2499 |
+
'\u01EC': 'O',
|
2500 |
+
'\u00D8': 'O',
|
2501 |
+
'\u01FE': 'O',
|
2502 |
+
'\u0186': 'O',
|
2503 |
+
'\u019F': 'O',
|
2504 |
+
'\uA74A': 'O',
|
2505 |
+
'\uA74C': 'O',
|
2506 |
+
'\u01A2': 'OI',
|
2507 |
+
'\uA74E': 'OO',
|
2508 |
+
'\u0222': 'OU',
|
2509 |
+
'\u24C5': 'P',
|
2510 |
+
'\uFF30': 'P',
|
2511 |
+
'\u1E54': 'P',
|
2512 |
+
'\u1E56': 'P',
|
2513 |
+
'\u01A4': 'P',
|
2514 |
+
'\u2C63': 'P',
|
2515 |
+
'\uA750': 'P',
|
2516 |
+
'\uA752': 'P',
|
2517 |
+
'\uA754': 'P',
|
2518 |
+
'\u24C6': 'Q',
|
2519 |
+
'\uFF31': 'Q',
|
2520 |
+
'\uA756': 'Q',
|
2521 |
+
'\uA758': 'Q',
|
2522 |
+
'\u024A': 'Q',
|
2523 |
+
'\u24C7': 'R',
|
2524 |
+
'\uFF32': 'R',
|
2525 |
+
'\u0154': 'R',
|
2526 |
+
'\u1E58': 'R',
|
2527 |
+
'\u0158': 'R',
|
2528 |
+
'\u0210': 'R',
|
2529 |
+
'\u0212': 'R',
|
2530 |
+
'\u1E5A': 'R',
|
2531 |
+
'\u1E5C': 'R',
|
2532 |
+
'\u0156': 'R',
|
2533 |
+
'\u1E5E': 'R',
|
2534 |
+
'\u024C': 'R',
|
2535 |
+
'\u2C64': 'R',
|
2536 |
+
'\uA75A': 'R',
|
2537 |
+
'\uA7A6': 'R',
|
2538 |
+
'\uA782': 'R',
|
2539 |
+
'\u24C8': 'S',
|
2540 |
+
'\uFF33': 'S',
|
2541 |
+
'\u1E9E': 'S',
|
2542 |
+
'\u015A': 'S',
|
2543 |
+
'\u1E64': 'S',
|
2544 |
+
'\u015C': 'S',
|
2545 |
+
'\u1E60': 'S',
|
2546 |
+
'\u0160': 'S',
|
2547 |
+
'\u1E66': 'S',
|
2548 |
+
'\u1E62': 'S',
|
2549 |
+
'\u1E68': 'S',
|
2550 |
+
'\u0218': 'S',
|
2551 |
+
'\u015E': 'S',
|
2552 |
+
'\u2C7E': 'S',
|
2553 |
+
'\uA7A8': 'S',
|
2554 |
+
'\uA784': 'S',
|
2555 |
+
'\u24C9': 'T',
|
2556 |
+
'\uFF34': 'T',
|
2557 |
+
'\u1E6A': 'T',
|
2558 |
+
'\u0164': 'T',
|
2559 |
+
'\u1E6C': 'T',
|
2560 |
+
'\u021A': 'T',
|
2561 |
+
'\u0162': 'T',
|
2562 |
+
'\u1E70': 'T',
|
2563 |
+
'\u1E6E': 'T',
|
2564 |
+
'\u0166': 'T',
|
2565 |
+
'\u01AC': 'T',
|
2566 |
+
'\u01AE': 'T',
|
2567 |
+
'\u023E': 'T',
|
2568 |
+
'\uA786': 'T',
|
2569 |
+
'\uA728': 'TZ',
|
2570 |
+
'\u24CA': 'U',
|
2571 |
+
'\uFF35': 'U',
|
2572 |
+
'\u00D9': 'U',
|
2573 |
+
'\u00DA': 'U',
|
2574 |
+
'\u00DB': 'U',
|
2575 |
+
'\u0168': 'U',
|
2576 |
+
'\u1E78': 'U',
|
2577 |
+
'\u016A': 'U',
|
2578 |
+
'\u1E7A': 'U',
|
2579 |
+
'\u016C': 'U',
|
2580 |
+
'\u00DC': 'U',
|
2581 |
+
'\u01DB': 'U',
|
2582 |
+
'\u01D7': 'U',
|
2583 |
+
'\u01D5': 'U',
|
2584 |
+
'\u01D9': 'U',
|
2585 |
+
'\u1EE6': 'U',
|
2586 |
+
'\u016E': 'U',
|
2587 |
+
'\u0170': 'U',
|
2588 |
+
'\u01D3': 'U',
|
2589 |
+
'\u0214': 'U',
|
2590 |
+
'\u0216': 'U',
|
2591 |
+
'\u01AF': 'U',
|
2592 |
+
'\u1EEA': 'U',
|
2593 |
+
'\u1EE8': 'U',
|
2594 |
+
'\u1EEE': 'U',
|
2595 |
+
'\u1EEC': 'U',
|
2596 |
+
'\u1EF0': 'U',
|
2597 |
+
'\u1EE4': 'U',
|
2598 |
+
'\u1E72': 'U',
|
2599 |
+
'\u0172': 'U',
|
2600 |
+
'\u1E76': 'U',
|
2601 |
+
'\u1E74': 'U',
|
2602 |
+
'\u0244': 'U',
|
2603 |
+
'\u24CB': 'V',
|
2604 |
+
'\uFF36': 'V',
|
2605 |
+
'\u1E7C': 'V',
|
2606 |
+
'\u1E7E': 'V',
|
2607 |
+
'\u01B2': 'V',
|
2608 |
+
'\uA75E': 'V',
|
2609 |
+
'\u0245': 'V',
|
2610 |
+
'\uA760': 'VY',
|
2611 |
+
'\u24CC': 'W',
|
2612 |
+
'\uFF37': 'W',
|
2613 |
+
'\u1E80': 'W',
|
2614 |
+
'\u1E82': 'W',
|
2615 |
+
'\u0174': 'W',
|
2616 |
+
'\u1E86': 'W',
|
2617 |
+
'\u1E84': 'W',
|
2618 |
+
'\u1E88': 'W',
|
2619 |
+
'\u2C72': 'W',
|
2620 |
+
'\u24CD': 'X',
|
2621 |
+
'\uFF38': 'X',
|
2622 |
+
'\u1E8A': 'X',
|
2623 |
+
'\u1E8C': 'X',
|
2624 |
+
'\u24CE': 'Y',
|
2625 |
+
'\uFF39': 'Y',
|
2626 |
+
'\u1EF2': 'Y',
|
2627 |
+
'\u00DD': 'Y',
|
2628 |
+
'\u0176': 'Y',
|
2629 |
+
'\u1EF8': 'Y',
|
2630 |
+
'\u0232': 'Y',
|
2631 |
+
'\u1E8E': 'Y',
|
2632 |
+
'\u0178': 'Y',
|
2633 |
+
'\u1EF6': 'Y',
|
2634 |
+
'\u1EF4': 'Y',
|
2635 |
+
'\u01B3': 'Y',
|
2636 |
+
'\u024E': 'Y',
|
2637 |
+
'\u1EFE': 'Y',
|
2638 |
+
'\u24CF': 'Z',
|
2639 |
+
'\uFF3A': 'Z',
|
2640 |
+
'\u0179': 'Z',
|
2641 |
+
'\u1E90': 'Z',
|
2642 |
+
'\u017B': 'Z',
|
2643 |
+
'\u017D': 'Z',
|
2644 |
+
'\u1E92': 'Z',
|
2645 |
+
'\u1E94': 'Z',
|
2646 |
+
'\u01B5': 'Z',
|
2647 |
+
'\u0224': 'Z',
|
2648 |
+
'\u2C7F': 'Z',
|
2649 |
+
'\u2C6B': 'Z',
|
2650 |
+
'\uA762': 'Z',
|
2651 |
+
'\u24D0': 'a',
|
2652 |
+
'\uFF41': 'a',
|
2653 |
+
'\u1E9A': 'a',
|
2654 |
+
'\u00E0': 'a',
|
2655 |
+
'\u00E1': 'a',
|
2656 |
+
'\u00E2': 'a',
|
2657 |
+
'\u1EA7': 'a',
|
2658 |
+
'\u1EA5': 'a',
|
2659 |
+
'\u1EAB': 'a',
|
2660 |
+
'\u1EA9': 'a',
|
2661 |
+
'\u00E3': 'a',
|
2662 |
+
'\u0101': 'a',
|
2663 |
+
'\u0103': 'a',
|
2664 |
+
'\u1EB1': 'a',
|
2665 |
+
'\u1EAF': 'a',
|
2666 |
+
'\u1EB5': 'a',
|
2667 |
+
'\u1EB3': 'a',
|
2668 |
+
'\u0227': 'a',
|
2669 |
+
'\u01E1': 'a',
|
2670 |
+
'\u00E4': 'a',
|
2671 |
+
'\u01DF': 'a',
|
2672 |
+
'\u1EA3': 'a',
|
2673 |
+
'\u00E5': 'a',
|
2674 |
+
'\u01FB': 'a',
|
2675 |
+
'\u01CE': 'a',
|
2676 |
+
'\u0201': 'a',
|
2677 |
+
'\u0203': 'a',
|
2678 |
+
'\u1EA1': 'a',
|
2679 |
+
'\u1EAD': 'a',
|
2680 |
+
'\u1EB7': 'a',
|
2681 |
+
'\u1E01': 'a',
|
2682 |
+
'\u0105': 'a',
|
2683 |
+
'\u2C65': 'a',
|
2684 |
+
'\u0250': 'a',
|
2685 |
+
'\uA733': 'aa',
|
2686 |
+
'\u00E6': 'ae',
|
2687 |
+
'\u01FD': 'ae',
|
2688 |
+
'\u01E3': 'ae',
|
2689 |
+
'\uA735': 'ao',
|
2690 |
+
'\uA737': 'au',
|
2691 |
+
'\uA739': 'av',
|
2692 |
+
'\uA73B': 'av',
|
2693 |
+
'\uA73D': 'ay',
|
2694 |
+
'\u24D1': 'b',
|
2695 |
+
'\uFF42': 'b',
|
2696 |
+
'\u1E03': 'b',
|
2697 |
+
'\u1E05': 'b',
|
2698 |
+
'\u1E07': 'b',
|
2699 |
+
'\u0180': 'b',
|
2700 |
+
'\u0183': 'b',
|
2701 |
+
'\u0253': 'b',
|
2702 |
+
'\u24D2': 'c',
|
2703 |
+
'\uFF43': 'c',
|
2704 |
+
'\u0107': 'c',
|
2705 |
+
'\u0109': 'c',
|
2706 |
+
'\u010B': 'c',
|
2707 |
+
'\u010D': 'c',
|
2708 |
+
'\u00E7': 'c',
|
2709 |
+
'\u1E09': 'c',
|
2710 |
+
'\u0188': 'c',
|
2711 |
+
'\u023C': 'c',
|
2712 |
+
'\uA73F': 'c',
|
2713 |
+
'\u2184': 'c',
|
2714 |
+
'\u24D3': 'd',
|
2715 |
+
'\uFF44': 'd',
|
2716 |
+
'\u1E0B': 'd',
|
2717 |
+
'\u010F': 'd',
|
2718 |
+
'\u1E0D': 'd',
|
2719 |
+
'\u1E11': 'd',
|
2720 |
+
'\u1E13': 'd',
|
2721 |
+
'\u1E0F': 'd',
|
2722 |
+
'\u0111': 'd',
|
2723 |
+
'\u018C': 'd',
|
2724 |
+
'\u0256': 'd',
|
2725 |
+
'\u0257': 'd',
|
2726 |
+
'\uA77A': 'd',
|
2727 |
+
'\u01F3': 'dz',
|
2728 |
+
'\u01C6': 'dz',
|
2729 |
+
'\u24D4': 'e',
|
2730 |
+
'\uFF45': 'e',
|
2731 |
+
'\u00E8': 'e',
|
2732 |
+
'\u00E9': 'e',
|
2733 |
+
'\u00EA': 'e',
|
2734 |
+
'\u1EC1': 'e',
|
2735 |
+
'\u1EBF': 'e',
|
2736 |
+
'\u1EC5': 'e',
|
2737 |
+
'\u1EC3': 'e',
|
2738 |
+
'\u1EBD': 'e',
|
2739 |
+
'\u0113': 'e',
|
2740 |
+
'\u1E15': 'e',
|
2741 |
+
'\u1E17': 'e',
|
2742 |
+
'\u0115': 'e',
|
2743 |
+
'\u0117': 'e',
|
2744 |
+
'\u00EB': 'e',
|
2745 |
+
'\u1EBB': 'e',
|
2746 |
+
'\u011B': 'e',
|
2747 |
+
'\u0205': 'e',
|
2748 |
+
'\u0207': 'e',
|
2749 |
+
'\u1EB9': 'e',
|
2750 |
+
'\u1EC7': 'e',
|
2751 |
+
'\u0229': 'e',
|
2752 |
+
'\u1E1D': 'e',
|
2753 |
+
'\u0119': 'e',
|
2754 |
+
'\u1E19': 'e',
|
2755 |
+
'\u1E1B': 'e',
|
2756 |
+
'\u0247': 'e',
|
2757 |
+
'\u025B': 'e',
|
2758 |
+
'\u01DD': 'e',
|
2759 |
+
'\u24D5': 'f',
|
2760 |
+
'\uFF46': 'f',
|
2761 |
+
'\u1E1F': 'f',
|
2762 |
+
'\u0192': 'f',
|
2763 |
+
'\uA77C': 'f',
|
2764 |
+
'\u24D6': 'g',
|
2765 |
+
'\uFF47': 'g',
|
2766 |
+
'\u01F5': 'g',
|
2767 |
+
'\u011D': 'g',
|
2768 |
+
'\u1E21': 'g',
|
2769 |
+
'\u011F': 'g',
|
2770 |
+
'\u0121': 'g',
|
2771 |
+
'\u01E7': 'g',
|
2772 |
+
'\u0123': 'g',
|
2773 |
+
'\u01E5': 'g',
|
2774 |
+
'\u0260': 'g',
|
2775 |
+
'\uA7A1': 'g',
|
2776 |
+
'\u1D79': 'g',
|
2777 |
+
'\uA77F': 'g',
|
2778 |
+
'\u24D7': 'h',
|
2779 |
+
'\uFF48': 'h',
|
2780 |
+
'\u0125': 'h',
|
2781 |
+
'\u1E23': 'h',
|
2782 |
+
'\u1E27': 'h',
|
2783 |
+
'\u021F': 'h',
|
2784 |
+
'\u1E25': 'h',
|
2785 |
+
'\u1E29': 'h',
|
2786 |
+
'\u1E2B': 'h',
|
2787 |
+
'\u1E96': 'h',
|
2788 |
+
'\u0127': 'h',
|
2789 |
+
'\u2C68': 'h',
|
2790 |
+
'\u2C76': 'h',
|
2791 |
+
'\u0265': 'h',
|
2792 |
+
'\u0195': 'hv',
|
2793 |
+
'\u24D8': 'i',
|
2794 |
+
'\uFF49': 'i',
|
2795 |
+
'\u00EC': 'i',
|
2796 |
+
'\u00ED': 'i',
|
2797 |
+
'\u00EE': 'i',
|
2798 |
+
'\u0129': 'i',
|
2799 |
+
'\u012B': 'i',
|
2800 |
+
'\u012D': 'i',
|
2801 |
+
'\u00EF': 'i',
|
2802 |
+
'\u1E2F': 'i',
|
2803 |
+
'\u1EC9': 'i',
|
2804 |
+
'\u01D0': 'i',
|
2805 |
+
'\u0209': 'i',
|
2806 |
+
'\u020B': 'i',
|
2807 |
+
'\u1ECB': 'i',
|
2808 |
+
'\u012F': 'i',
|
2809 |
+
'\u1E2D': 'i',
|
2810 |
+
'\u0268': 'i',
|
2811 |
+
'\u0131': 'i',
|
2812 |
+
'\u24D9': 'j',
|
2813 |
+
'\uFF4A': 'j',
|
2814 |
+
'\u0135': 'j',
|
2815 |
+
'\u01F0': 'j',
|
2816 |
+
'\u0249': 'j',
|
2817 |
+
'\u24DA': 'k',
|
2818 |
+
'\uFF4B': 'k',
|
2819 |
+
'\u1E31': 'k',
|
2820 |
+
'\u01E9': 'k',
|
2821 |
+
'\u1E33': 'k',
|
2822 |
+
'\u0137': 'k',
|
2823 |
+
'\u1E35': 'k',
|
2824 |
+
'\u0199': 'k',
|
2825 |
+
'\u2C6A': 'k',
|
2826 |
+
'\uA741': 'k',
|
2827 |
+
'\uA743': 'k',
|
2828 |
+
'\uA745': 'k',
|
2829 |
+
'\uA7A3': 'k',
|
2830 |
+
'\u24DB': 'l',
|
2831 |
+
'\uFF4C': 'l',
|
2832 |
+
'\u0140': 'l',
|
2833 |
+
'\u013A': 'l',
|
2834 |
+
'\u013E': 'l',
|
2835 |
+
'\u1E37': 'l',
|
2836 |
+
'\u1E39': 'l',
|
2837 |
+
'\u013C': 'l',
|
2838 |
+
'\u1E3D': 'l',
|
2839 |
+
'\u1E3B': 'l',
|
2840 |
+
'\u017F': 'l',
|
2841 |
+
'\u0142': 'l',
|
2842 |
+
'\u019A': 'l',
|
2843 |
+
'\u026B': 'l',
|
2844 |
+
'\u2C61': 'l',
|
2845 |
+
'\uA749': 'l',
|
2846 |
+
'\uA781': 'l',
|
2847 |
+
'\uA747': 'l',
|
2848 |
+
'\u01C9': 'lj',
|
2849 |
+
'\u24DC': 'm',
|
2850 |
+
'\uFF4D': 'm',
|
2851 |
+
'\u1E3F': 'm',
|
2852 |
+
'\u1E41': 'm',
|
2853 |
+
'\u1E43': 'm',
|
2854 |
+
'\u0271': 'm',
|
2855 |
+
'\u026F': 'm',
|
2856 |
+
'\u24DD': 'n',
|
2857 |
+
'\uFF4E': 'n',
|
2858 |
+
'\u01F9': 'n',
|
2859 |
+
'\u0144': 'n',
|
2860 |
+
'\u00F1': 'n',
|
2861 |
+
'\u1E45': 'n',
|
2862 |
+
'\u0148': 'n',
|
2863 |
+
'\u1E47': 'n',
|
2864 |
+
'\u0146': 'n',
|
2865 |
+
'\u1E4B': 'n',
|
2866 |
+
'\u1E49': 'n',
|
2867 |
+
'\u019E': 'n',
|
2868 |
+
'\u0272': 'n',
|
2869 |
+
'\u0149': 'n',
|
2870 |
+
'\uA791': 'n',
|
2871 |
+
'\uA7A5': 'n',
|
2872 |
+
'\u01CC': 'nj',
|
2873 |
+
'\u24DE': 'o',
|
2874 |
+
'\uFF4F': 'o',
|
2875 |
+
'\u00F2': 'o',
|
2876 |
+
'\u00F3': 'o',
|
2877 |
+
'\u00F4': 'o',
|
2878 |
+
'\u1ED3': 'o',
|
2879 |
+
'\u1ED1': 'o',
|
2880 |
+
'\u1ED7': 'o',
|
2881 |
+
'\u1ED5': 'o',
|
2882 |
+
'\u00F5': 'o',
|
2883 |
+
'\u1E4D': 'o',
|
2884 |
+
'\u022D': 'o',
|
2885 |
+
'\u1E4F': 'o',
|
2886 |
+
'\u014D': 'o',
|
2887 |
+
'\u1E51': 'o',
|
2888 |
+
'\u1E53': 'o',
|
2889 |
+
'\u014F': 'o',
|
2890 |
+
'\u022F': 'o',
|
2891 |
+
'\u0231': 'o',
|
2892 |
+
'\u00F6': 'o',
|
2893 |
+
'\u022B': 'o',
|
2894 |
+
'\u1ECF': 'o',
|
2895 |
+
'\u0151': 'o',
|
2896 |
+
'\u01D2': 'o',
|
2897 |
+
'\u020D': 'o',
|
2898 |
+
'\u020F': 'o',
|
2899 |
+
'\u01A1': 'o',
|
2900 |
+
'\u1EDD': 'o',
|
2901 |
+
'\u1EDB': 'o',
|
2902 |
+
'\u1EE1': 'o',
|
2903 |
+
'\u1EDF': 'o',
|
2904 |
+
'\u1EE3': 'o',
|
2905 |
+
'\u1ECD': 'o',
|
2906 |
+
'\u1ED9': 'o',
|
2907 |
+
'\u01EB': 'o',
|
2908 |
+
'\u01ED': 'o',
|
2909 |
+
'\u00F8': 'o',
|
2910 |
+
'\u01FF': 'o',
|
2911 |
+
'\u0254': 'o',
|
2912 |
+
'\uA74B': 'o',
|
2913 |
+
'\uA74D': 'o',
|
2914 |
+
'\u0275': 'o',
|
2915 |
+
'\u01A3': 'oi',
|
2916 |
+
'\u0223': 'ou',
|
2917 |
+
'\uA74F': 'oo',
|
2918 |
+
'\u24DF': 'p',
|
2919 |
+
'\uFF50': 'p',
|
2920 |
+
'\u1E55': 'p',
|
2921 |
+
'\u1E57': 'p',
|
2922 |
+
'\u01A5': 'p',
|
2923 |
+
'\u1D7D': 'p',
|
2924 |
+
'\uA751': 'p',
|
2925 |
+
'\uA753': 'p',
|
2926 |
+
'\uA755': 'p',
|
2927 |
+
'\u24E0': 'q',
|
2928 |
+
'\uFF51': 'q',
|
2929 |
+
'\u024B': 'q',
|
2930 |
+
'\uA757': 'q',
|
2931 |
+
'\uA759': 'q',
|
2932 |
+
'\u24E1': 'r',
|
2933 |
+
'\uFF52': 'r',
|
2934 |
+
'\u0155': 'r',
|
2935 |
+
'\u1E59': 'r',
|
2936 |
+
'\u0159': 'r',
|
2937 |
+
'\u0211': 'r',
|
2938 |
+
'\u0213': 'r',
|
2939 |
+
'\u1E5B': 'r',
|
2940 |
+
'\u1E5D': 'r',
|
2941 |
+
'\u0157': 'r',
|
2942 |
+
'\u1E5F': 'r',
|
2943 |
+
'\u024D': 'r',
|
2944 |
+
'\u027D': 'r',
|
2945 |
+
'\uA75B': 'r',
|
2946 |
+
'\uA7A7': 'r',
|
2947 |
+
'\uA783': 'r',
|
2948 |
+
'\u24E2': 's',
|
2949 |
+
'\uFF53': 's',
|
2950 |
+
'\u00DF': 's',
|
2951 |
+
'\u015B': 's',
|
2952 |
+
'\u1E65': 's',
|
2953 |
+
'\u015D': 's',
|
2954 |
+
'\u1E61': 's',
|
2955 |
+
'\u0161': 's',
|
2956 |
+
'\u1E67': 's',
|
2957 |
+
'\u1E63': 's',
|
2958 |
+
'\u1E69': 's',
|
2959 |
+
'\u0219': 's',
|
2960 |
+
'\u015F': 's',
|
2961 |
+
'\u023F': 's',
|
2962 |
+
'\uA7A9': 's',
|
2963 |
+
'\uA785': 's',
|
2964 |
+
'\u1E9B': 's',
|
2965 |
+
'\u24E3': 't',
|
2966 |
+
'\uFF54': 't',
|
2967 |
+
'\u1E6B': 't',
|
2968 |
+
'\u1E97': 't',
|
2969 |
+
'\u0165': 't',
|
2970 |
+
'\u1E6D': 't',
|
2971 |
+
'\u021B': 't',
|
2972 |
+
'\u0163': 't',
|
2973 |
+
'\u1E71': 't',
|
2974 |
+
'\u1E6F': 't',
|
2975 |
+
'\u0167': 't',
|
2976 |
+
'\u01AD': 't',
|
2977 |
+
'\u0288': 't',
|
2978 |
+
'\u2C66': 't',
|
2979 |
+
'\uA787': 't',
|
2980 |
+
'\uA729': 'tz',
|
2981 |
+
'\u24E4': 'u',
|
2982 |
+
'\uFF55': 'u',
|
2983 |
+
'\u00F9': 'u',
|
2984 |
+
'\u00FA': 'u',
|
2985 |
+
'\u00FB': 'u',
|
2986 |
+
'\u0169': 'u',
|
2987 |
+
'\u1E79': 'u',
|
2988 |
+
'\u016B': 'u',
|
2989 |
+
'\u1E7B': 'u',
|
2990 |
+
'\u016D': 'u',
|
2991 |
+
'\u00FC': 'u',
|
2992 |
+
'\u01DC': 'u',
|
2993 |
+
'\u01D8': 'u',
|
2994 |
+
'\u01D6': 'u',
|
2995 |
+
'\u01DA': 'u',
|
2996 |
+
'\u1EE7': 'u',
|
2997 |
+
'\u016F': 'u',
|
2998 |
+
'\u0171': 'u',
|
2999 |
+
'\u01D4': 'u',
|
3000 |
+
'\u0215': 'u',
|
3001 |
+
'\u0217': 'u',
|
3002 |
+
'\u01B0': 'u',
|
3003 |
+
'\u1EEB': 'u',
|
3004 |
+
'\u1EE9': 'u',
|
3005 |
+
'\u1EEF': 'u',
|
3006 |
+
'\u1EED': 'u',
|
3007 |
+
'\u1EF1': 'u',
|
3008 |
+
'\u1EE5': 'u',
|
3009 |
+
'\u1E73': 'u',
|
3010 |
+
'\u0173': 'u',
|
3011 |
+
'\u1E77': 'u',
|
3012 |
+
'\u1E75': 'u',
|
3013 |
+
'\u0289': 'u',
|
3014 |
+
'\u24E5': 'v',
|
3015 |
+
'\uFF56': 'v',
|
3016 |
+
'\u1E7D': 'v',
|
3017 |
+
'\u1E7F': 'v',
|
3018 |
+
'\u028B': 'v',
|
3019 |
+
'\uA75F': 'v',
|
3020 |
+
'\u028C': 'v',
|
3021 |
+
'\uA761': 'vy',
|
3022 |
+
'\u24E6': 'w',
|
3023 |
+
'\uFF57': 'w',
|
3024 |
+
'\u1E81': 'w',
|
3025 |
+
'\u1E83': 'w',
|
3026 |
+
'\u0175': 'w',
|
3027 |
+
'\u1E87': 'w',
|
3028 |
+
'\u1E85': 'w',
|
3029 |
+
'\u1E98': 'w',
|
3030 |
+
'\u1E89': 'w',
|
3031 |
+
'\u2C73': 'w',
|
3032 |
+
'\u24E7': 'x',
|
3033 |
+
'\uFF58': 'x',
|
3034 |
+
'\u1E8B': 'x',
|
3035 |
+
'\u1E8D': 'x',
|
3036 |
+
'\u24E8': 'y',
|
3037 |
+
'\uFF59': 'y',
|
3038 |
+
'\u1EF3': 'y',
|
3039 |
+
'\u00FD': 'y',
|
3040 |
+
'\u0177': 'y',
|
3041 |
+
'\u1EF9': 'y',
|
3042 |
+
'\u0233': 'y',
|
3043 |
+
'\u1E8F': 'y',
|
3044 |
+
'\u00FF': 'y',
|
3045 |
+
'\u1EF7': 'y',
|
3046 |
+
'\u1E99': 'y',
|
3047 |
+
'\u1EF5': 'y',
|
3048 |
+
'\u01B4': 'y',
|
3049 |
+
'\u024F': 'y',
|
3050 |
+
'\u1EFF': 'y',
|
3051 |
+
'\u24E9': 'z',
|
3052 |
+
'\uFF5A': 'z',
|
3053 |
+
'\u017A': 'z',
|
3054 |
+
'\u1E91': 'z',
|
3055 |
+
'\u017C': 'z',
|
3056 |
+
'\u017E': 'z',
|
3057 |
+
'\u1E93': 'z',
|
3058 |
+
'\u1E95': 'z',
|
3059 |
+
'\u01B6': 'z',
|
3060 |
+
'\u0225': 'z',
|
3061 |
+
'\u0240': 'z',
|
3062 |
+
'\u2C6C': 'z',
|
3063 |
+
'\uA763': 'z',
|
3064 |
+
'\u0386': '\u0391',
|
3065 |
+
'\u0388': '\u0395',
|
3066 |
+
'\u0389': '\u0397',
|
3067 |
+
'\u038A': '\u0399',
|
3068 |
+
'\u03AA': '\u0399',
|
3069 |
+
'\u038C': '\u039F',
|
3070 |
+
'\u038E': '\u03A5',
|
3071 |
+
'\u03AB': '\u03A5',
|
3072 |
+
'\u038F': '\u03A9',
|
3073 |
+
'\u03AC': '\u03B1',
|
3074 |
+
'\u03AD': '\u03B5',
|
3075 |
+
'\u03AE': '\u03B7',
|
3076 |
+
'\u03AF': '\u03B9',
|
3077 |
+
'\u03CA': '\u03B9',
|
3078 |
+
'\u0390': '\u03B9',
|
3079 |
+
'\u03CC': '\u03BF',
|
3080 |
+
'\u03CD': '\u03C5',
|
3081 |
+
'\u03CB': '\u03C5',
|
3082 |
+
'\u03B0': '\u03C5',
|
3083 |
+
'\u03C9': '\u03C9',
|
3084 |
+
'\u03C2': '\u03C3'
|
3085 |
+
};
|
3086 |
+
|
3087 |
+
return diacritics;
|
3088 |
+
});
|
3089 |
+
|
3090 |
+
S2.define('select2/data/base',[
|
3091 |
+
'../utils'
|
3092 |
+
], function (Utils) {
|
3093 |
+
function BaseAdapter ($element, options) {
|
3094 |
+
BaseAdapter.__super__.constructor.call(this);
|
3095 |
+
}
|
3096 |
+
|
3097 |
+
Utils.Extend(BaseAdapter, Utils.Observable);
|
3098 |
+
|
3099 |
+
BaseAdapter.prototype.current = function (callback) {
|
3100 |
+
throw new Error('The `current` method must be defined in child classes.');
|
3101 |
+
};
|
3102 |
+
|
3103 |
+
BaseAdapter.prototype.query = function (params, callback) {
|
3104 |
+
throw new Error('The `query` method must be defined in child classes.');
|
3105 |
+
};
|
3106 |
+
|
3107 |
+
BaseAdapter.prototype.bind = function (container, $container) {
|
3108 |
+
// Can be implemented in subclasses
|
3109 |
+
};
|
3110 |
+
|
3111 |
+
BaseAdapter.prototype.destroy = function () {
|
3112 |
+
// Can be implemented in subclasses
|
3113 |
+
};
|
3114 |
+
|
3115 |
+
BaseAdapter.prototype.generateResultId = function (container, data) {
|
3116 |
+
var id = container.id + '-result-';
|
3117 |
+
|
3118 |
+
id += Utils.generateChars(4);
|
3119 |
+
|
3120 |
+
if (data.id != null) {
|
3121 |
+
id += '-' + data.id.toString();
|
3122 |
+
} else {
|
3123 |
+
id += '-' + Utils.generateChars(4);
|
3124 |
+
}
|
3125 |
+
return id;
|
3126 |
+
};
|
3127 |
+
|
3128 |
+
return BaseAdapter;
|
3129 |
+
});
|
3130 |
+
|
3131 |
+
S2.define('select2/data/select',[
|
3132 |
+
'./base',
|
3133 |
+
'../utils',
|
3134 |
+
'jquery'
|
3135 |
+
], function (BaseAdapter, Utils, $) {
|
3136 |
+
function SelectAdapter ($element, options) {
|
3137 |
+
this.$element = $element;
|
3138 |
+
this.options = options;
|
3139 |
+
|
3140 |
+
SelectAdapter.__super__.constructor.call(this);
|
3141 |
+
}
|
3142 |
+
|
3143 |
+
Utils.Extend(SelectAdapter, BaseAdapter);
|
3144 |
+
|
3145 |
+
SelectAdapter.prototype.current = function (callback) {
|
3146 |
+
var data = [];
|
3147 |
+
var self = this;
|
3148 |
+
|
3149 |
+
this.$element.find(':selected').each(function () {
|
3150 |
+
var $option = $(this);
|
3151 |
+
|
3152 |
+
var option = self.item($option);
|
3153 |
+
|
3154 |
+
data.push(option);
|
3155 |
+
});
|
3156 |
+
|
3157 |
+
callback(data);
|
3158 |
+
};
|
3159 |
+
|
3160 |
+
SelectAdapter.prototype.select = function (data) {
|
3161 |
+
var self = this;
|
3162 |
+
|
3163 |
+
data.selected = true;
|
3164 |
+
|
3165 |
+
// If data.element is a DOM node, use it instead
|
3166 |
+
if ($(data.element).is('option')) {
|
3167 |
+
data.element.selected = true;
|
3168 |
+
|
3169 |
+
this.$element.trigger('change');
|
3170 |
+
|
3171 |
+
return;
|
3172 |
+
}
|
3173 |
+
|
3174 |
+
if (this.$element.prop('multiple')) {
|
3175 |
+
this.current(function (currentData) {
|
3176 |
+
var val = [];
|
3177 |
+
|
3178 |
+
data = [data];
|
3179 |
+
data.push.apply(data, currentData);
|
3180 |
+
|
3181 |
+
for (var d = 0; d < data.length; d++) {
|
3182 |
+
var id = data[d].id;
|
3183 |
+
|
3184 |
+
if ($.inArray(id, val) === -1) {
|
3185 |
+
val.push(id);
|
3186 |
+
}
|
3187 |
+
}
|
3188 |
+
|
3189 |
+
self.$element.val(val);
|
3190 |
+
self.$element.trigger('change');
|
3191 |
+
});
|
3192 |
+
} else {
|
3193 |
+
var val = data.id;
|
3194 |
+
|
3195 |
+
this.$element.val(val);
|
3196 |
+
this.$element.trigger('change');
|
3197 |
+
}
|
3198 |
+
};
|
3199 |
+
|
3200 |
+
SelectAdapter.prototype.unselect = function (data) {
|
3201 |
+
var self = this;
|
3202 |
+
|
3203 |
+
if (!this.$element.prop('multiple')) {
|
3204 |
+
return;
|
3205 |
+
}
|
3206 |
+
|
3207 |
+
data.selected = false;
|
3208 |
+
|
3209 |
+
if ($(data.element).is('option')) {
|
3210 |
+
data.element.selected = false;
|
3211 |
+
|
3212 |
+
this.$element.trigger('change');
|
3213 |
+
|
3214 |
+
return;
|
3215 |
+
}
|
3216 |
+
|
3217 |
+
this.current(function (currentData) {
|
3218 |
+
var val = [];
|
3219 |
+
|
3220 |
+
for (var d = 0; d < currentData.length; d++) {
|
3221 |
+
var id = currentData[d].id;
|
3222 |
+
|
3223 |
+
if (id !== data.id && $.inArray(id, val) === -1) {
|
3224 |
+
val.push(id);
|
3225 |
+
}
|
3226 |
+
}
|
3227 |
+
|
3228 |
+
self.$element.val(val);
|
3229 |
+
|
3230 |
+
self.$element.trigger('change');
|
3231 |
+
});
|
3232 |
+
};
|
3233 |
+
|
3234 |
+
SelectAdapter.prototype.bind = function (container, $container) {
|
3235 |
+
var self = this;
|
3236 |
+
|
3237 |
+
this.container = container;
|
3238 |
+
|
3239 |
+
container.on('select', function (params) {
|
3240 |
+
self.select(params.data);
|
3241 |
+
});
|
3242 |
+
|
3243 |
+
container.on('unselect', function (params) {
|
3244 |
+
self.unselect(params.data);
|
3245 |
+
});
|
3246 |
+
};
|
3247 |
+
|
3248 |
+
SelectAdapter.prototype.destroy = function () {
|
3249 |
+
// Remove anything added to child elements
|
3250 |
+
this.$element.find('*').each(function () {
|
3251 |
+
// Remove any custom data set by Select2
|
3252 |
+
Utils.RemoveData(this);
|
3253 |
+
});
|
3254 |
+
};
|
3255 |
+
|
3256 |
+
SelectAdapter.prototype.query = function (params, callback) {
|
3257 |
+
var data = [];
|
3258 |
+
var self = this;
|
3259 |
+
|
3260 |
+
var $options = this.$element.children();
|
3261 |
+
|
3262 |
+
$options.each(function () {
|
3263 |
+
var $option = $(this);
|
3264 |
+
|
3265 |
+
if (!$option.is('option') && !$option.is('optgroup')) {
|
3266 |
+
return;
|
3267 |
+
}
|
3268 |
+
|
3269 |
+
var option = self.item($option);
|
3270 |
+
|
3271 |
+
var matches = self.matches(params, option);
|
3272 |
+
|
3273 |
+
if (matches !== null) {
|
3274 |
+
data.push(matches);
|
3275 |
+
}
|
3276 |
+
});
|
3277 |
+
|
3278 |
+
callback({
|
3279 |
+
results: data
|
3280 |
+
});
|
3281 |
+
};
|
3282 |
+
|
3283 |
+
SelectAdapter.prototype.addOptions = function ($options) {
|
3284 |
+
Utils.appendMany(this.$element, $options);
|
3285 |
+
};
|
3286 |
+
|
3287 |
+
SelectAdapter.prototype.option = function (data) {
|
3288 |
+
var option;
|
3289 |
+
|
3290 |
+
if (data.children) {
|
3291 |
+
option = document.createElement('optgroup');
|
3292 |
+
option.label = data.text;
|
3293 |
+
} else {
|
3294 |
+
option = document.createElement('option');
|
3295 |
+
|
3296 |
+
if (option.textContent !== undefined) {
|
3297 |
+
option.textContent = data.text;
|
3298 |
+
} else {
|
3299 |
+
option.innerText = data.text;
|
3300 |
+
}
|
3301 |
+
}
|
3302 |
+
|
3303 |
+
if (data.id !== undefined) {
|
3304 |
+
option.value = data.id;
|
3305 |
+
}
|
3306 |
+
|
3307 |
+
if (data.disabled) {
|
3308 |
+
option.disabled = true;
|
3309 |
+
}
|
3310 |
+
|
3311 |
+
if (data.selected) {
|
3312 |
+
option.selected = true;
|
3313 |
+
}
|
3314 |
+
|
3315 |
+
if (data.title) {
|
3316 |
+
option.title = data.title;
|
3317 |
+
}
|
3318 |
+
|
3319 |
+
var $option = $(option);
|
3320 |
+
|
3321 |
+
var normalizedData = this._normalizeItem(data);
|
3322 |
+
normalizedData.element = option;
|
3323 |
+
|
3324 |
+
// Override the option's data with the combined data
|
3325 |
+
Utils.StoreData(option, 'data', normalizedData);
|
3326 |
+
|
3327 |
+
return $option;
|
3328 |
+
};
|
3329 |
+
|
3330 |
+
SelectAdapter.prototype.item = function ($option) {
|
3331 |
+
var data = {};
|
3332 |
+
|
3333 |
+
data = Utils.GetData($option[0], 'data');
|
3334 |
+
|
3335 |
+
if (data != null) {
|
3336 |
+
return data;
|
3337 |
+
}
|
3338 |
+
|
3339 |
+
if ($option.is('option')) {
|
3340 |
+
data = {
|
3341 |
+
id: $option.val(),
|
3342 |
+
text: $option.text(),
|
3343 |
+
disabled: $option.prop('disabled'),
|
3344 |
+
selected: $option.prop('selected'),
|
3345 |
+
title: $option.prop('title')
|
3346 |
+
};
|
3347 |
+
} else if ($option.is('optgroup')) {
|
3348 |
+
data = {
|
3349 |
+
text: $option.prop('label'),
|
3350 |
+
children: [],
|
3351 |
+
title: $option.prop('title')
|
3352 |
+
};
|
3353 |
+
|
3354 |
+
var $children = $option.children('option');
|
3355 |
+
var children = [];
|
3356 |
+
|
3357 |
+
for (var c = 0; c < $children.length; c++) {
|
3358 |
+
var $child = $($children[c]);
|
3359 |
+
|
3360 |
+
var child = this.item($child);
|
3361 |
+
|
3362 |
+
children.push(child);
|
3363 |
+
}
|
3364 |
+
|
3365 |
+
data.children = children;
|
3366 |
+
}
|
3367 |
+
|
3368 |
+
data = this._normalizeItem(data);
|
3369 |
+
data.element = $option[0];
|
3370 |
+
|
3371 |
+
Utils.StoreData($option[0], 'data', data);
|
3372 |
+
|
3373 |
+
return data;
|
3374 |
+
};
|
3375 |
+
|
3376 |
+
SelectAdapter.prototype._normalizeItem = function (item) {
|
3377 |
+
if (item !== Object(item)) {
|
3378 |
+
item = {
|
3379 |
+
id: item,
|
3380 |
+
text: item
|
3381 |
+
};
|
3382 |
+
}
|
3383 |
+
|
3384 |
+
item = $.extend({}, {
|
3385 |
+
text: ''
|
3386 |
+
}, item);
|
3387 |
+
|
3388 |
+
var defaults = {
|
3389 |
+
selected: false,
|
3390 |
+
disabled: false
|
3391 |
+
};
|
3392 |
+
|
3393 |
+
if (item.id != null) {
|
3394 |
+
item.id = item.id.toString();
|
3395 |
+
}
|
3396 |
+
|
3397 |
+
if (item.text != null) {
|
3398 |
+
item.text = item.text.toString();
|
3399 |
+
}
|
3400 |
+
|
3401 |
+
if (item._resultId == null && item.id && this.container != null) {
|
3402 |
+
item._resultId = this.generateResultId(this.container, item);
|
3403 |
+
}
|
3404 |
+
|
3405 |
+
return $.extend({}, defaults, item);
|
3406 |
+
};
|
3407 |
+
|
3408 |
+
SelectAdapter.prototype.matches = function (params, data) {
|
3409 |
+
var matcher = this.options.get('matcher');
|
3410 |
+
|
3411 |
+
return matcher(params, data);
|
3412 |
+
};
|
3413 |
+
|
3414 |
+
return SelectAdapter;
|
3415 |
+
});
|
3416 |
+
|
3417 |
+
S2.define('select2/data/array',[
|
3418 |
+
'./select',
|
3419 |
+
'../utils',
|
3420 |
+
'jquery'
|
3421 |
+
], function (SelectAdapter, Utils, $) {
|
3422 |
+
function ArrayAdapter ($element, options) {
|
3423 |
+
var data = options.get('data') || [];
|
3424 |
+
|
3425 |
+
ArrayAdapter.__super__.constructor.call(this, $element, options);
|
3426 |
+
|
3427 |
+
this.addOptions(this.convertToOptions(data));
|
3428 |
+
}
|
3429 |
+
|
3430 |
+
Utils.Extend(ArrayAdapter, SelectAdapter);
|
3431 |
+
|
3432 |
+
ArrayAdapter.prototype.select = function (data) {
|
3433 |
+
var $option = this.$element.find('option').filter(function (i, elm) {
|
3434 |
+
return elm.value == data.id.toString();
|
3435 |
+
});
|
3436 |
+
|
3437 |
+
if ($option.length === 0) {
|
3438 |
+
$option = this.option(data);
|
3439 |
+
|
3440 |
+
this.addOptions($option);
|
3441 |
+
}
|
3442 |
+
|
3443 |
+
ArrayAdapter.__super__.select.call(this, data);
|
3444 |
+
};
|
3445 |
+
|
3446 |
+
ArrayAdapter.prototype.convertToOptions = function (data) {
|
3447 |
+
var self = this;
|
3448 |
+
|
3449 |
+
var $existing = this.$element.find('option');
|
3450 |
+
var existingIds = $existing.map(function () {
|
3451 |
+
return self.item($(this)).id;
|
3452 |
+
}).get();
|
3453 |
+
|
3454 |
+
var $options = [];
|
3455 |
+
|
3456 |
+
// Filter out all items except for the one passed in the argument
|
3457 |
+
function onlyItem (item) {
|
3458 |
+
return function () {
|
3459 |
+
return $(this).val() == item.id;
|
3460 |
+
};
|
3461 |
+
}
|
3462 |
+
|
3463 |
+
for (var d = 0; d < data.length; d++) {
|
3464 |
+
var item = this._normalizeItem(data[d]);
|
3465 |
+
|
3466 |
+
// Skip items which were pre-loaded, only merge the data
|
3467 |
+
if ($.inArray(item.id, existingIds) >= 0) {
|
3468 |
+
var $existingOption = $existing.filter(onlyItem(item));
|
3469 |
+
|
3470 |
+
var existingData = this.item($existingOption);
|
3471 |
+
var newData = $.extend(true, {}, item, existingData);
|
3472 |
+
|
3473 |
+
var $newOption = this.option(newData);
|
3474 |
+
|
3475 |
+
$existingOption.replaceWith($newOption);
|
3476 |
+
|
3477 |
+
continue;
|
3478 |
+
}
|
3479 |
+
|
3480 |
+
var $option = this.option(item);
|
3481 |
+
|
3482 |
+
if (item.children) {
|
3483 |
+
var $children = this.convertToOptions(item.children);
|
3484 |
+
|
3485 |
+
Utils.appendMany($option, $children);
|
3486 |
+
}
|
3487 |
+
|
3488 |
+
$options.push($option);
|
3489 |
+
}
|
3490 |
+
|
3491 |
+
return $options;
|
3492 |
+
};
|
3493 |
+
|
3494 |
+
return ArrayAdapter;
|
3495 |
+
});
|
3496 |
+
|
3497 |
+
S2.define('select2/data/ajax',[
|
3498 |
+
'./array',
|
3499 |
+
'../utils',
|
3500 |
+
'jquery'
|
3501 |
+
], function (ArrayAdapter, Utils, $) {
|
3502 |
+
function AjaxAdapter ($element, options) {
|
3503 |
+
this.ajaxOptions = this._applyDefaults(options.get('ajax'));
|
3504 |
+
|
3505 |
+
if (this.ajaxOptions.processResults != null) {
|
3506 |
+
this.processResults = this.ajaxOptions.processResults;
|
3507 |
+
}
|
3508 |
+
|
3509 |
+
AjaxAdapter.__super__.constructor.call(this, $element, options);
|
3510 |
+
}
|
3511 |
+
|
3512 |
+
Utils.Extend(AjaxAdapter, ArrayAdapter);
|
3513 |
+
|
3514 |
+
AjaxAdapter.prototype._applyDefaults = function (options) {
|
3515 |
+
var defaults = {
|
3516 |
+
data: function (params) {
|
3517 |
+
return $.extend({}, params, {
|
3518 |
+
q: params.term
|
3519 |
+
});
|
3520 |
+
},
|
3521 |
+
transport: function (params, success, failure) {
|
3522 |
+
var $request = $.ajax(params);
|
3523 |
+
|
3524 |
+
$request.then(success);
|
3525 |
+
$request.fail(failure);
|
3526 |
+
|
3527 |
+
return $request;
|
3528 |
+
}
|
3529 |
+
};
|
3530 |
+
|
3531 |
+
return $.extend({}, defaults, options, true);
|
3532 |
+
};
|
3533 |
+
|
3534 |
+
AjaxAdapter.prototype.processResults = function (results) {
|
3535 |
+
return results;
|
3536 |
+
};
|
3537 |
+
|
3538 |
+
AjaxAdapter.prototype.query = function (params, callback) {
|
3539 |
+
var matches = [];
|
3540 |
+
var self = this;
|
3541 |
+
|
3542 |
+
if (this._request != null) {
|
3543 |
+
// JSONP requests cannot always be aborted
|
3544 |
+
if ($.isFunction(this._request.abort)) {
|
3545 |
+
this._request.abort();
|
3546 |
+
}
|
3547 |
+
|
3548 |
+
this._request = null;
|
3549 |
+
}
|
3550 |
+
|
3551 |
+
var options = $.extend({
|
3552 |
+
type: 'GET'
|
3553 |
+
}, this.ajaxOptions);
|
3554 |
+
|
3555 |
+
if (typeof options.url === 'function') {
|
3556 |
+
options.url = options.url.call(this.$element, params);
|
3557 |
+
}
|
3558 |
+
|
3559 |
+
if (typeof options.data === 'function') {
|
3560 |
+
options.data = options.data.call(this.$element, params);
|
3561 |
+
}
|
3562 |
+
|
3563 |
+
function request () {
|
3564 |
+
var $request = options.transport(options, function (data) {
|
3565 |
+
var results = self.processResults(data, params);
|
3566 |
+
|
3567 |
+
if (self.options.get('debug') && window.console && console.error) {
|
3568 |
+
// Check to make sure that the response included a `results` key.
|
3569 |
+
if (!results || !results.results || !$.isArray(results.results)) {
|
3570 |
+
console.error(
|
3571 |
+
'Select2: The AJAX results did not return an array in the ' +
|
3572 |
+
'`results` key of the response.'
|
3573 |
+
);
|
3574 |
+
}
|
3575 |
+
}
|
3576 |
+
|
3577 |
+
callback(results);
|
3578 |
+
}, function () {
|
3579 |
+
// Attempt to detect if a request was aborted
|
3580 |
+
// Only works if the transport exposes a status property
|
3581 |
+
if ('status' in $request &&
|
3582 |
+
($request.status === 0 || $request.status === '0')) {
|
3583 |
+
return;
|
3584 |
+
}
|
3585 |
+
|
3586 |
+
self.trigger('results:message', {
|
3587 |
+
message: 'errorLoading'
|
3588 |
+
});
|
3589 |
+
});
|
3590 |
+
|
3591 |
+
self._request = $request;
|
3592 |
+
}
|
3593 |
+
|
3594 |
+
if (this.ajaxOptions.delay && params.term != null) {
|
3595 |
+
if (this._queryTimeout) {
|
3596 |
+
window.clearTimeout(this._queryTimeout);
|
3597 |
+
}
|
3598 |
+
|
3599 |
+
this._queryTimeout = window.setTimeout(request, this.ajaxOptions.delay);
|
3600 |
+
} else {
|
3601 |
+
request();
|
3602 |
+
}
|
3603 |
+
};
|
3604 |
+
|
3605 |
+
return AjaxAdapter;
|
3606 |
+
});
|
3607 |
+
|
3608 |
+
S2.define('select2/data/tags',[
|
3609 |
+
'jquery'
|
3610 |
+
], function ($) {
|
3611 |
+
function Tags (decorated, $element, options) {
|
3612 |
+
var tags = options.get('tags');
|
3613 |
+
|
3614 |
+
var createTag = options.get('createTag');
|
3615 |
+
|
3616 |
+
if (createTag !== undefined) {
|
3617 |
+
this.createTag = createTag;
|
3618 |
+
}
|
3619 |
+
|
3620 |
+
var insertTag = options.get('insertTag');
|
3621 |
+
|
3622 |
+
if (insertTag !== undefined) {
|
3623 |
+
this.insertTag = insertTag;
|
3624 |
+
}
|
3625 |
+
|
3626 |
+
decorated.call(this, $element, options);
|
3627 |
+
|
3628 |
+
if ($.isArray(tags)) {
|
3629 |
+
for (var t = 0; t < tags.length; t++) {
|
3630 |
+
var tag = tags[t];
|
3631 |
+
var item = this._normalizeItem(tag);
|
3632 |
+
|
3633 |
+
var $option = this.option(item);
|
3634 |
+
|
3635 |
+
this.$element.append($option);
|
3636 |
+
}
|
3637 |
+
}
|
3638 |
+
}
|
3639 |
+
|
3640 |
+
Tags.prototype.query = function (decorated, params, callback) {
|
3641 |
+
var self = this;
|
3642 |
+
|
3643 |
+
this._removeOldTags();
|
3644 |
+
|
3645 |
+
if (params.term == null || params.page != null) {
|
3646 |
+
decorated.call(this, params, callback);
|
3647 |
+
return;
|
3648 |
+
}
|
3649 |
+
|
3650 |
+
function wrapper (obj, child) {
|
3651 |
+
var data = obj.results;
|
3652 |
+
|
3653 |
+
for (var i = 0; i < data.length; i++) {
|
3654 |
+
var option = data[i];
|
3655 |
+
|
3656 |
+
var checkChildren = (
|
3657 |
+
option.children != null &&
|
3658 |
+
!wrapper({
|
3659 |
+
results: option.children
|
3660 |
+
}, true)
|
3661 |
+
);
|
3662 |
+
|
3663 |
+
var optionText = (option.text || '').toUpperCase();
|
3664 |
+
var paramsTerm = (params.term || '').toUpperCase();
|
3665 |
+
|
3666 |
+
var checkText = optionText === paramsTerm;
|
3667 |
+
|
3668 |
+
if (checkText || checkChildren) {
|
3669 |
+
if (child) {
|
3670 |
+
return false;
|
3671 |
+
}
|
3672 |
+
|
3673 |
+
obj.data = data;
|
3674 |
+
callback(obj);
|
3675 |
+
|
3676 |
+
return;
|
3677 |
+
}
|
3678 |
+
}
|
3679 |
+
|
3680 |
+
if (child) {
|
3681 |
+
return true;
|
3682 |
+
}
|
3683 |
+
|
3684 |
+
var tag = self.createTag(params);
|
3685 |
+
|
3686 |
+
if (tag != null) {
|
3687 |
+
var $option = self.option(tag);
|
3688 |
+
$option.attr('data-select2-tag', true);
|
3689 |
+
|
3690 |
+
self.addOptions([$option]);
|
3691 |
+
|
3692 |
+
self.insertTag(data, tag);
|
3693 |
+
}
|
3694 |
+
|
3695 |
+
obj.results = data;
|
3696 |
+
|
3697 |
+
callback(obj);
|
3698 |
+
}
|
3699 |
+
|
3700 |
+
decorated.call(this, params, wrapper);
|
3701 |
+
};
|
3702 |
+
|
3703 |
+
Tags.prototype.createTag = function (decorated, params) {
|
3704 |
+
var term = $.trim(params.term);
|
3705 |
+
|
3706 |
+
if (term === '') {
|
3707 |
+
return null;
|
3708 |
+
}
|
3709 |
+
|
3710 |
+
return {
|
3711 |
+
id: term,
|
3712 |
+
text: term
|
3713 |
+
};
|
3714 |
+
};
|
3715 |
+
|
3716 |
+
Tags.prototype.insertTag = function (_, data, tag) {
|
3717 |
+
data.unshift(tag);
|
3718 |
+
};
|
3719 |
+
|
3720 |
+
Tags.prototype._removeOldTags = function (_) {
|
3721 |
+
var tag = this._lastTag;
|
3722 |
+
|
3723 |
+
var $options = this.$element.find('option[data-select2-tag]');
|
3724 |
+
|
3725 |
+
$options.each(function () {
|
3726 |
+
if (this.selected) {
|
3727 |
+
return;
|
3728 |
+
}
|
3729 |
+
|
3730 |
+
$(this).remove();
|
3731 |
+
});
|
3732 |
+
};
|
3733 |
+
|
3734 |
+
return Tags;
|
3735 |
+
});
|
3736 |
+
|
3737 |
+
S2.define('select2/data/tokenizer',[
|
3738 |
+
'jquery'
|
3739 |
+
], function ($) {
|
3740 |
+
function Tokenizer (decorated, $element, options) {
|
3741 |
+
var tokenizer = options.get('tokenizer');
|
3742 |
+
|
3743 |
+
if (tokenizer !== undefined) {
|
3744 |
+
this.tokenizer = tokenizer;
|
3745 |
+
}
|
3746 |
+
|
3747 |
+
decorated.call(this, $element, options);
|
3748 |
+
}
|
3749 |
+
|
3750 |
+
Tokenizer.prototype.bind = function (decorated, container, $container) {
|
3751 |
+
decorated.call(this, container, $container);
|
3752 |
+
|
3753 |
+
this.$search = container.dropdown.$search || container.selection.$search ||
|
3754 |
+
$container.find('.select2-search__field');
|
3755 |
+
};
|
3756 |
+
|
3757 |
+
Tokenizer.prototype.query = function (decorated, params, callback) {
|
3758 |
+
var self = this;
|
3759 |
+
|
3760 |
+
function createAndSelect (data) {
|
3761 |
+
// Normalize the data object so we can use it for checks
|
3762 |
+
var item = self._normalizeItem(data);
|
3763 |
+
|
3764 |
+
// Check if the data object already exists as a tag
|
3765 |
+
// Select it if it doesn't
|
3766 |
+
var $existingOptions = self.$element.find('option').filter(function () {
|
3767 |
+
return $(this).val() === item.id;
|
3768 |
+
});
|
3769 |
+
|
3770 |
+
// If an existing option wasn't found for it, create the option
|
3771 |
+
if (!$existingOptions.length) {
|
3772 |
+
var $option = self.option(item);
|
3773 |
+
$option.attr('data-select2-tag', true);
|
3774 |
+
|
3775 |
+
self._removeOldTags();
|
3776 |
+
self.addOptions([$option]);
|
3777 |
+
}
|
3778 |
+
|
3779 |
+
// Select the item, now that we know there is an option for it
|
3780 |
+
select(item);
|
3781 |
+
}
|
3782 |
+
|
3783 |
+
function select (data) {
|
3784 |
+
self.trigger('select', {
|
3785 |
+
data: data
|
3786 |
+
});
|
3787 |
+
}
|
3788 |
+
|
3789 |
+
params.term = params.term || '';
|
3790 |
+
|
3791 |
+
var tokenData = this.tokenizer(params, this.options, createAndSelect);
|
3792 |
+
|
3793 |
+
if (tokenData.term !== params.term) {
|
3794 |
+
// Replace the search term if we have the search box
|
3795 |
+
if (this.$search.length) {
|
3796 |
+
this.$search.val(tokenData.term);
|
3797 |
+
this.$search.focus();
|
3798 |
+
}
|
3799 |
+
|
3800 |
+
params.term = tokenData.term;
|
3801 |
+
}
|
3802 |
+
|
3803 |
+
decorated.call(this, params, callback);
|
3804 |
+
};
|
3805 |
+
|
3806 |
+
Tokenizer.prototype.tokenizer = function (_, params, options, callback) {
|
3807 |
+
var separators = options.get('tokenSeparators') || [];
|
3808 |
+
var term = params.term;
|
3809 |
+
var i = 0;
|
3810 |
+
|
3811 |
+
var createTag = this.createTag || function (params) {
|
3812 |
+
return {
|
3813 |
+
id: params.term,
|
3814 |
+
text: params.term
|
3815 |
+
};
|
3816 |
+
};
|
3817 |
+
|
3818 |
+
while (i < term.length) {
|
3819 |
+
var termChar = term[i];
|
3820 |
+
|
3821 |
+
if ($.inArray(termChar, separators) === -1) {
|
3822 |
+
i++;
|
3823 |
+
|
3824 |
+
continue;
|
3825 |
+
}
|
3826 |
+
|
3827 |
+
var part = term.substr(0, i);
|
3828 |
+
var partParams = $.extend({}, params, {
|
3829 |
+
term: part
|
3830 |
+
});
|
3831 |
+
|
3832 |
+
var data = createTag(partParams);
|
3833 |
+
|
3834 |
+
if (data == null) {
|
3835 |
+
i++;
|
3836 |
+
continue;
|
3837 |
+
}
|
3838 |
+
|
3839 |
+
callback(data);
|
3840 |
+
|
3841 |
+
// Reset the term to not include the tokenized portion
|
3842 |
+
term = term.substr(i + 1) || '';
|
3843 |
+
i = 0;
|
3844 |
+
}
|
3845 |
+
|
3846 |
+
return {
|
3847 |
+
term: term
|
3848 |
+
};
|
3849 |
+
};
|
3850 |
+
|
3851 |
+
return Tokenizer;
|
3852 |
+
});
|
3853 |
+
|
3854 |
+
S2.define('select2/data/minimumInputLength',[
|
3855 |
+
|
3856 |
+
], function () {
|
3857 |
+
function MinimumInputLength (decorated, $e, options) {
|
3858 |
+
this.minimumInputLength = options.get('minimumInputLength');
|
3859 |
+
|
3860 |
+
decorated.call(this, $e, options);
|
3861 |
+
}
|
3862 |
+
|
3863 |
+
MinimumInputLength.prototype.query = function (decorated, params, callback) {
|
3864 |
+
params.term = params.term || '';
|
3865 |
+
|
3866 |
+
if (params.term.length < this.minimumInputLength) {
|
3867 |
+
this.trigger('results:message', {
|
3868 |
+
message: 'inputTooShort',
|
3869 |
+
args: {
|
3870 |
+
minimum: this.minimumInputLength,
|
3871 |
+
input: params.term,
|
3872 |
+
params: params
|
3873 |
+
}
|
3874 |
+
});
|
3875 |
+
|
3876 |
+
return;
|
3877 |
+
}
|
3878 |
+
|
3879 |
+
decorated.call(this, params, callback);
|
3880 |
+
};
|
3881 |
+
|
3882 |
+
return MinimumInputLength;
|
3883 |
+
});
|
3884 |
+
|
3885 |
+
S2.define('select2/data/maximumInputLength',[
|
3886 |
+
|
3887 |
+
], function () {
|
3888 |
+
function MaximumInputLength (decorated, $e, options) {
|
3889 |
+
this.maximumInputLength = options.get('maximumInputLength');
|
3890 |
+
|
3891 |
+
decorated.call(this, $e, options);
|
3892 |
+
}
|
3893 |
+
|
3894 |
+
MaximumInputLength.prototype.query = function (decorated, params, callback) {
|
3895 |
+
params.term = params.term || '';
|
3896 |
+
|
3897 |
+
if (this.maximumInputLength > 0 &&
|
3898 |
+
params.term.length > this.maximumInputLength) {
|
3899 |
+
this.trigger('results:message', {
|
3900 |
+
message: 'inputTooLong',
|
3901 |
+
args: {
|
3902 |
+
maximum: this.maximumInputLength,
|
3903 |
+
input: params.term,
|
3904 |
+
params: params
|
3905 |
+
}
|
3906 |
+
});
|
3907 |
+
|
3908 |
+
return;
|
3909 |
+
}
|
3910 |
+
|
3911 |
+
decorated.call(this, params, callback);
|
3912 |
+
};
|
3913 |
+
|
3914 |
+
return MaximumInputLength;
|
3915 |
+
});
|
3916 |
+
|
3917 |
+
S2.define('select2/data/maximumSelectionLength',[
|
3918 |
+
|
3919 |
+
], function (){
|
3920 |
+
function MaximumSelectionLength (decorated, $e, options) {
|
3921 |
+
this.maximumSelectionLength = options.get('maximumSelectionLength');
|
3922 |
+
|
3923 |
+
decorated.call(this, $e, options);
|
3924 |
+
}
|
3925 |
+
|
3926 |
+
MaximumSelectionLength.prototype.query =
|
3927 |
+
function (decorated, params, callback) {
|
3928 |
+
var self = this;
|
3929 |
+
|
3930 |
+
this.current(function (currentData) {
|
3931 |
+
var count = currentData != null ? currentData.length : 0;
|
3932 |
+
if (self.maximumSelectionLength > 0 &&
|
3933 |
+
count >= self.maximumSelectionLength) {
|
3934 |
+
self.trigger('results:message', {
|
3935 |
+
message: 'maximumSelected',
|
3936 |
+
args: {
|
3937 |
+
maximum: self.maximumSelectionLength
|
3938 |
+
}
|
3939 |
+
});
|
3940 |
+
return;
|
3941 |
+
}
|
3942 |
+
decorated.call(self, params, callback);
|
3943 |
+
});
|
3944 |
+
};
|
3945 |
+
|
3946 |
+
return MaximumSelectionLength;
|
3947 |
+
});
|
3948 |
+
|
3949 |
+
S2.define('select2/dropdown',[
|
3950 |
+
'jquery',
|
3951 |
+
'./utils'
|
3952 |
+
], function ($, Utils) {
|
3953 |
+
function Dropdown ($element, options) {
|
3954 |
+
this.$element = $element;
|
3955 |
+
this.options = options;
|
3956 |
+
|
3957 |
+
Dropdown.__super__.constructor.call(this);
|
3958 |
+
}
|
3959 |
+
|
3960 |
+
Utils.Extend(Dropdown, Utils.Observable);
|
3961 |
+
|
3962 |
+
Dropdown.prototype.render = function () {
|
3963 |
+
var $dropdown = $(
|
3964 |
+
'<span class="select2-dropdown">' +
|
3965 |
+
'<span class="select2-results"></span>' +
|
3966 |
+
'</span>'
|
3967 |
+
);
|
3968 |
+
|
3969 |
+
$dropdown.attr('dir', this.options.get('dir'));
|
3970 |
+
|
3971 |
+
this.$dropdown = $dropdown;
|
3972 |
+
|
3973 |
+
return $dropdown;
|
3974 |
+
};
|
3975 |
+
|
3976 |
+
Dropdown.prototype.bind = function () {
|
3977 |
+
// Should be implemented in subclasses
|
3978 |
+
};
|
3979 |
+
|
3980 |
+
Dropdown.prototype.position = function ($dropdown, $container) {
|
3981 |
+
// Should be implmented in subclasses
|
3982 |
+
};
|
3983 |
+
|
3984 |
+
Dropdown.prototype.destroy = function () {
|
3985 |
+
// Remove the dropdown from the DOM
|
3986 |
+
this.$dropdown.remove();
|
3987 |
+
};
|
3988 |
+
|
3989 |
+
return Dropdown;
|
3990 |
+
});
|
3991 |
+
|
3992 |
+
S2.define('select2/dropdown/search',[
|
3993 |
+
'jquery',
|
3994 |
+
'../utils'
|
3995 |
+
], function ($, Utils) {
|
3996 |
+
function Search () { }
|
3997 |
+
|
3998 |
+
Search.prototype.render = function (decorated) {
|
3999 |
+
var $rendered = decorated.call(this);
|
4000 |
+
|
4001 |
+
var $search = $(
|
4002 |
+
'<span class="select2-search select2-search--dropdown">' +
|
4003 |
+
'<input class="select2-search__field" type="search" tabindex="-1"' +
|
4004 |
+
' autocomplete="off" autocorrect="off" autocapitalize="none"' +
|
4005 |
+
' spellcheck="false" role="textbox" />' +
|
4006 |
+
'</span>'
|
4007 |
+
);
|
4008 |
+
|
4009 |
+
this.$searchContainer = $search;
|
4010 |
+
this.$search = $search.find('input');
|
4011 |
+
|
4012 |
+
$rendered.prepend($search);
|
4013 |
+
|
4014 |
+
return $rendered;
|
4015 |
+
};
|
4016 |
+
|
4017 |
+
Search.prototype.bind = function (decorated, container, $container) {
|
4018 |
+
var self = this;
|
4019 |
+
|
4020 |
+
decorated.call(this, container, $container);
|
4021 |
+
|
4022 |
+
this.$search.on('keydown', function (evt) {
|
4023 |
+
self.trigger('keypress', evt);
|
4024 |
+
|
4025 |
+
self._keyUpPrevented = evt.isDefaultPrevented();
|
4026 |
+
});
|
4027 |
+
|
4028 |
+
// Workaround for browsers which do not support the `input` event
|
4029 |
+
// This will prevent double-triggering of events for browsers which support
|
4030 |
+
// both the `keyup` and `input` events.
|
4031 |
+
this.$search.on('input', function (evt) {
|
4032 |
+
// Unbind the duplicated `keyup` event
|
4033 |
+
$(this).off('keyup');
|
4034 |
+
});
|
4035 |
+
|
4036 |
+
this.$search.on('keyup input', function (evt) {
|
4037 |
+
self.handleSearch(evt);
|
4038 |
+
});
|
4039 |
+
|
4040 |
+
container.on('open', function () {
|
4041 |
+
self.$search.attr('tabindex', 0);
|
4042 |
+
|
4043 |
+
self.$search.focus();
|
4044 |
+
|
4045 |
+
window.setTimeout(function () {
|
4046 |
+
self.$search.focus();
|
4047 |
+
}, 0);
|
4048 |
+
});
|
4049 |
+
|
4050 |
+
container.on('close', function () {
|
4051 |
+
self.$search.attr('tabindex', -1);
|
4052 |
+
|
4053 |
+
self.$search.val('');
|
4054 |
+
self.$search.blur();
|
4055 |
+
});
|
4056 |
+
|
4057 |
+
container.on('focus', function () {
|
4058 |
+
if (!container.isOpen()) {
|
4059 |
+
self.$search.focus();
|
4060 |
+
}
|
4061 |
+
});
|
4062 |
+
|
4063 |
+
container.on('results:all', function (params) {
|
4064 |
+
if (params.query.term == null || params.query.term === '') {
|
4065 |
+
var showSearch = self.showSearch(params);
|
4066 |
+
|
4067 |
+
if (showSearch) {
|
4068 |
+
self.$searchContainer.removeClass('select2-search--hide');
|
4069 |
+
} else {
|
4070 |
+
self.$searchContainer.addClass('select2-search--hide');
|
4071 |
+
}
|
4072 |
+
}
|
4073 |
+
});
|
4074 |
+
};
|
4075 |
+
|
4076 |
+
Search.prototype.handleSearch = function (evt) {
|
4077 |
+
if (!this._keyUpPrevented) {
|
4078 |
+
var input = this.$search.val();
|
4079 |
+
|
4080 |
+
this.trigger('query', {
|
4081 |
+
term: input
|
4082 |
+
});
|
4083 |
+
}
|
4084 |
+
|
4085 |
+
this._keyUpPrevented = false;
|
4086 |
+
};
|
4087 |
+
|
4088 |
+
Search.prototype.showSearch = function (_, params) {
|
4089 |
+
return true;
|
4090 |
+
};
|
4091 |
+
|
4092 |
+
return Search;
|
4093 |
+
});
|
4094 |
+
|
4095 |
+
S2.define('select2/dropdown/hidePlaceholder',[
|
4096 |
+
|
4097 |
+
], function () {
|
4098 |
+
function HidePlaceholder (decorated, $element, options, dataAdapter) {
|
4099 |
+
this.placeholder = this.normalizePlaceholder(options.get('placeholder'));
|
4100 |
+
|
4101 |
+
decorated.call(this, $element, options, dataAdapter);
|
4102 |
+
}
|
4103 |
+
|
4104 |
+
HidePlaceholder.prototype.append = function (decorated, data) {
|
4105 |
+
data.results = this.removePlaceholder(data.results);
|
4106 |
+
|
4107 |
+
decorated.call(this, data);
|
4108 |
+
};
|
4109 |
+
|
4110 |
+
HidePlaceholder.prototype.normalizePlaceholder = function (_, placeholder) {
|
4111 |
+
if (typeof placeholder === 'string') {
|
4112 |
+
placeholder = {
|
4113 |
+
id: '',
|
4114 |
+
text: placeholder
|
4115 |
+
};
|
4116 |
+
}
|
4117 |
+
|
4118 |
+
return placeholder;
|
4119 |
+
};
|
4120 |
+
|
4121 |
+
HidePlaceholder.prototype.removePlaceholder = function (_, data) {
|
4122 |
+
var modifiedData = data.slice(0);
|
4123 |
+
|
4124 |
+
for (var d = data.length - 1; d >= 0; d--) {
|
4125 |
+
var item = data[d];
|
4126 |
+
|
4127 |
+
if (this.placeholder.id === item.id) {
|
4128 |
+
modifiedData.splice(d, 1);
|
4129 |
+
}
|
4130 |
+
}
|
4131 |
+
|
4132 |
+
return modifiedData;
|
4133 |
+
};
|
4134 |
+
|
4135 |
+
return HidePlaceholder;
|
4136 |
+
});
|
4137 |
+
|
4138 |
+
S2.define('select2/dropdown/infiniteScroll',[
|
4139 |
+
'jquery'
|
4140 |
+
], function ($) {
|
4141 |
+
function InfiniteScroll (decorated, $element, options, dataAdapter) {
|
4142 |
+
this.lastParams = {};
|
4143 |
+
|
4144 |
+
decorated.call(this, $element, options, dataAdapter);
|
4145 |
+
|
4146 |
+
this.$loadingMore = this.createLoadingMore();
|
4147 |
+
this.loading = false;
|
4148 |
+
}
|
4149 |
+
|
4150 |
+
InfiniteScroll.prototype.append = function (decorated, data) {
|
4151 |
+
this.$loadingMore.remove();
|
4152 |
+
this.loading = false;
|
4153 |
+
|
4154 |
+
decorated.call(this, data);
|
4155 |
+
|
4156 |
+
if (this.showLoadingMore(data)) {
|
4157 |
+
this.$results.append(this.$loadingMore);
|
4158 |
+
}
|
4159 |
+
};
|
4160 |
+
|
4161 |
+
InfiniteScroll.prototype.bind = function (decorated, container, $container) {
|
4162 |
+
var self = this;
|
4163 |
+
|
4164 |
+
decorated.call(this, container, $container);
|
4165 |
+
|
4166 |
+
container.on('query', function (params) {
|
4167 |
+
self.lastParams = params;
|
4168 |
+
self.loading = true;
|
4169 |
+
});
|
4170 |
+
|
4171 |
+
container.on('query:append', function (params) {
|
4172 |
+
self.lastParams = params;
|
4173 |
+
self.loading = true;
|
4174 |
+
});
|
4175 |
+
|
4176 |
+
this.$results.on('scroll', function () {
|
4177 |
+
var isLoadMoreVisible = $.contains(
|
4178 |
+
document.documentElement,
|
4179 |
+
self.$loadingMore[0]
|
4180 |
+
);
|
4181 |
+
|
4182 |
+
if (self.loading || !isLoadMoreVisible) {
|
4183 |
+
return;
|
4184 |
+
}
|
4185 |
+
|
4186 |
+
var currentOffset = self.$results.offset().top +
|
4187 |
+
self.$results.outerHeight(false);
|
4188 |
+
var loadingMoreOffset = self.$loadingMore.offset().top +
|
4189 |
+
self.$loadingMore.outerHeight(false);
|
4190 |
+
|
4191 |
+
if (currentOffset + 50 >= loadingMoreOffset) {
|
4192 |
+
self.loadMore();
|
4193 |
+
}
|
4194 |
+
});
|
4195 |
+
};
|
4196 |
+
|
4197 |
+
InfiniteScroll.prototype.loadMore = function () {
|
4198 |
+
this.loading = true;
|
4199 |
+
|
4200 |
+
var params = $.extend({}, {page: 1}, this.lastParams);
|
4201 |
+
|
4202 |
+
params.page++;
|
4203 |
+
|
4204 |
+
this.trigger('query:append', params);
|
4205 |
+
};
|
4206 |
+
|
4207 |
+
InfiniteScroll.prototype.showLoadingMore = function (_, data) {
|
4208 |
+
return data.pagination && data.pagination.more;
|
4209 |
+
};
|
4210 |
+
|
4211 |
+
InfiniteScroll.prototype.createLoadingMore = function () {
|
4212 |
+
var $option = $(
|
4213 |
+
'<li ' +
|
4214 |
+
'class="select2-results__option select2-results__option--load-more"' +
|
4215 |
+
'role="treeitem" aria-disabled="true"></li>'
|
4216 |
+
);
|
4217 |
+
|
4218 |
+
var message = this.options.get('translations').get('loadingMore');
|
4219 |
+
|
4220 |
+
$option.html(message(this.lastParams));
|
4221 |
+
|
4222 |
+
return $option;
|
4223 |
+
};
|
4224 |
+
|
4225 |
+
return InfiniteScroll;
|
4226 |
+
});
|
4227 |
+
|
4228 |
+
S2.define('select2/dropdown/attachBody',[
|
4229 |
+
'jquery',
|
4230 |
+
'../utils'
|
4231 |
+
], function ($, Utils) {
|
4232 |
+
function AttachBody (decorated, $element, options) {
|
4233 |
+
this.$dropdownParent = options.get('dropdownParent') || $(document.body);
|
4234 |
+
|
4235 |
+
decorated.call(this, $element, options);
|
4236 |
+
}
|
4237 |
+
|
4238 |
+
AttachBody.prototype.bind = function (decorated, container, $container) {
|
4239 |
+
var self = this;
|
4240 |
+
|
4241 |
+
var setupResultsEvents = false;
|
4242 |
+
|
4243 |
+
decorated.call(this, container, $container);
|
4244 |
+
|
4245 |
+
container.on('open', function () {
|
4246 |
+
self._showDropdown();
|
4247 |
+
self._attachPositioningHandler(container);
|
4248 |
+
|
4249 |
+
if (!setupResultsEvents) {
|
4250 |
+
setupResultsEvents = true;
|
4251 |
+
|
4252 |
+
container.on('results:all', function () {
|
4253 |
+
self._positionDropdown();
|
4254 |
+
self._resizeDropdown();
|
4255 |
+
});
|
4256 |
+
|
4257 |
+
container.on('results:append', function () {
|
4258 |
+
self._positionDropdown();
|
4259 |
+
self._resizeDropdown();
|
4260 |
+
});
|
4261 |
+
}
|
4262 |
+
});
|
4263 |
+
|
4264 |
+
container.on('close', function () {
|
4265 |
+
self._hideDropdown();
|
4266 |
+
self._detachPositioningHandler(container);
|
4267 |
+
});
|
4268 |
+
|
4269 |
+
this.$dropdownContainer.on('mousedown', function (evt) {
|
4270 |
+
evt.stopPropagation();
|
4271 |
+
});
|
4272 |
+
};
|
4273 |
+
|
4274 |
+
AttachBody.prototype.destroy = function (decorated) {
|
4275 |
+
decorated.call(this);
|
4276 |
+
|
4277 |
+
this.$dropdownContainer.remove();
|
4278 |
+
};
|
4279 |
+
|
4280 |
+
AttachBody.prototype.position = function (decorated, $dropdown, $container) {
|
4281 |
+
// Clone all of the container classes
|
4282 |
+
$dropdown.attr('class', $container.attr('class'));
|
4283 |
+
|
4284 |
+
$dropdown.removeClass('select2');
|
4285 |
+
$dropdown.addClass('select2-container--open');
|
4286 |
+
|
4287 |
+
$dropdown.css({
|
4288 |
+
position: 'absolute',
|
4289 |
+
top: -999999
|
4290 |
+
});
|
4291 |
+
|
4292 |
+
this.$container = $container;
|
4293 |
+
};
|
4294 |
+
|
4295 |
+
AttachBody.prototype.render = function (decorated) {
|
4296 |
+
var $container = $('<span></span>');
|
4297 |
+
|
4298 |
+
var $dropdown = decorated.call(this);
|
4299 |
+
$container.append($dropdown);
|
4300 |
+
|
4301 |
+
this.$dropdownContainer = $container;
|
4302 |
+
|
4303 |
+
return $container;
|
4304 |
+
};
|
4305 |
+
|
4306 |
+
AttachBody.prototype._hideDropdown = function (decorated) {
|
4307 |
+
this.$dropdownContainer.detach();
|
4308 |
+
};
|
4309 |
+
|
4310 |
+
AttachBody.prototype._attachPositioningHandler =
|
4311 |
+
function (decorated, container) {
|
4312 |
+
var self = this;
|
4313 |
+
|
4314 |
+
var scrollEvent = 'scroll.select2.' + container.id;
|
4315 |
+
var resizeEvent = 'resize.select2.' + container.id;
|
4316 |
+
var orientationEvent = 'orientationchange.select2.' + container.id;
|
4317 |
+
|
4318 |
+
var $watchers = this.$container.parents().filter(Utils.hasScroll);
|
4319 |
+
$watchers.each(function () {
|
4320 |
+
Utils.StoreData(this, 'select2-scroll-position', {
|
4321 |
+
x: $(this).scrollLeft(),
|
4322 |
+
y: $(this).scrollTop()
|
4323 |
+
});
|
4324 |
+
});
|
4325 |
+
|
4326 |
+
$watchers.on(scrollEvent, function (ev) {
|
4327 |
+
var position = Utils.GetData(this, 'select2-scroll-position');
|
4328 |
+
$(this).scrollTop(position.y);
|
4329 |
+
});
|
4330 |
+
|
4331 |
+
$(window).on(scrollEvent + ' ' + resizeEvent + ' ' + orientationEvent,
|
4332 |
+
function (e) {
|
4333 |
+
self._positionDropdown();
|
4334 |
+
self._resizeDropdown();
|
4335 |
+
});
|
4336 |
+
};
|
4337 |
+
|
4338 |
+
AttachBody.prototype._detachPositioningHandler =
|
4339 |
+
function (decorated, container) {
|
4340 |
+
var scrollEvent = 'scroll.select2.' + container.id;
|
4341 |
+
var resizeEvent = 'resize.select2.' + container.id;
|
4342 |
+
var orientationEvent = 'orientationchange.select2.' + container.id;
|
4343 |
+
|
4344 |
+
var $watchers = this.$container.parents().filter(Utils.hasScroll);
|
4345 |
+
$watchers.off(scrollEvent);
|
4346 |
+
|
4347 |
+
$(window).off(scrollEvent + ' ' + resizeEvent + ' ' + orientationEvent);
|
4348 |
+
};
|
4349 |
+
|
4350 |
+
AttachBody.prototype._positionDropdown = function () {
|
4351 |
+
var $window = $(window);
|
4352 |
+
|
4353 |
+
var isCurrentlyAbove = this.$dropdown.hasClass('select2-dropdown--above');
|
4354 |
+
var isCurrentlyBelow = this.$dropdown.hasClass('select2-dropdown--below');
|
4355 |
+
|
4356 |
+
var newDirection = null;
|
4357 |
+
|
4358 |
+
var offset = this.$container.offset();
|
4359 |
+
|
4360 |
+
offset.bottom = offset.top + this.$container.outerHeight(false);
|
4361 |
+
|
4362 |
+
var container = {
|
4363 |
+
height: this.$container.outerHeight(false)
|
4364 |
+
};
|
4365 |
+
|
4366 |
+
container.top = offset.top;
|
4367 |
+
container.bottom = offset.top + container.height;
|
4368 |
+
|
4369 |
+
var dropdown = {
|
4370 |
+
height: this.$dropdown.outerHeight(false)
|
4371 |
+
};
|
4372 |
+
|
4373 |
+
var viewport = {
|
4374 |
+
top: $window.scrollTop(),
|
4375 |
+
bottom: $window.scrollTop() + $window.height()
|
4376 |
+
};
|
4377 |
+
|
4378 |
+
var enoughRoomAbove = viewport.top < (offset.top - dropdown.height);
|
4379 |
+
var enoughRoomBelow = viewport.bottom > (offset.bottom + dropdown.height);
|
4380 |
+
|
4381 |
+
var css = {
|
4382 |
+
left: offset.left,
|
4383 |
+
top: container.bottom
|
4384 |
+
};
|
4385 |
+
|
4386 |
+
// Determine what the parent element is to use for calciulating the offset
|
4387 |
+
var $offsetParent = this.$dropdownParent;
|
4388 |
+
|
4389 |
+
// For statically positoned elements, we need to get the element
|
4390 |
+
// that is determining the offset
|
4391 |
+
if ($offsetParent.css('position') === 'static') {
|
4392 |
+
$offsetParent = $offsetParent.offsetParent();
|
4393 |
+
}
|
4394 |
+
|
4395 |
+
var parentOffset = $offsetParent.offset();
|
4396 |
+
|
4397 |
+
css.top -= parentOffset.top;
|
4398 |
+
css.left -= parentOffset.left;
|
4399 |
+
|
4400 |
+
if (!isCurrentlyAbove && !isCurrentlyBelow) {
|
4401 |
+
newDirection = 'below';
|
4402 |
+
}
|
4403 |
+
|
4404 |
+
if (!enoughRoomBelow && enoughRoomAbove && !isCurrentlyAbove) {
|
4405 |
+
newDirection = 'above';
|
4406 |
+
} else if (!enoughRoomAbove && enoughRoomBelow && isCurrentlyAbove) {
|
4407 |
+
newDirection = 'below';
|
4408 |
+
}
|
4409 |
+
|
4410 |
+
if (newDirection == 'above' ||
|
4411 |
+
(isCurrentlyAbove && newDirection !== 'below')) {
|
4412 |
+
css.top = container.top - parentOffset.top - dropdown.height;
|
4413 |
+
}
|
4414 |
+
|
4415 |
+
if (newDirection != null) {
|
4416 |
+
this.$dropdown
|
4417 |
+
.removeClass('select2-dropdown--below select2-dropdown--above')
|
4418 |
+
.addClass('select2-dropdown--' + newDirection);
|
4419 |
+
this.$container
|
4420 |
+
.removeClass('select2-container--below select2-container--above')
|
4421 |
+
.addClass('select2-container--' + newDirection);
|
4422 |
+
}
|
4423 |
+
|
4424 |
+
this.$dropdownContainer.css(css);
|
4425 |
+
};
|
4426 |
+
|
4427 |
+
AttachBody.prototype._resizeDropdown = function () {
|
4428 |
+
var css = {
|
4429 |
+
width: this.$container.outerWidth(false) + 'px'
|
4430 |
+
};
|
4431 |
+
|
4432 |
+
if (this.options.get('dropdownAutoWidth')) {
|
4433 |
+
css.minWidth = css.width;
|
4434 |
+
css.position = 'relative';
|
4435 |
+
css.width = 'auto';
|
4436 |
+
}
|
4437 |
+
|
4438 |
+
this.$dropdown.css(css);
|
4439 |
+
};
|
4440 |
+
|
4441 |
+
AttachBody.prototype._showDropdown = function (decorated) {
|
4442 |
+
this.$dropdownContainer.appendTo(this.$dropdownParent);
|
4443 |
+
|
4444 |
+
this._positionDropdown();
|
4445 |
+
this._resizeDropdown();
|
4446 |
+
};
|
4447 |
+
|
4448 |
+
return AttachBody;
|
4449 |
+
});
|
4450 |
+
|
4451 |
+
S2.define('select2/dropdown/minimumResultsForSearch',[
|
4452 |
+
|
4453 |
+
], function () {
|
4454 |
+
function countResults (data) {
|
4455 |
+
var count = 0;
|
4456 |
+
|
4457 |
+
for (var d = 0; d < data.length; d++) {
|
4458 |
+
var item = data[d];
|
4459 |
+
|
4460 |
+
if (item.children) {
|
4461 |
+
count += countResults(item.children);
|
4462 |
+
} else {
|
4463 |
+
count++;
|
4464 |
+
}
|
4465 |
+
}
|
4466 |
+
|
4467 |
+
return count;
|
4468 |
+
}
|
4469 |
+
|
4470 |
+
function MinimumResultsForSearch (decorated, $element, options, dataAdapter) {
|
4471 |
+
this.minimumResultsForSearch = options.get('minimumResultsForSearch');
|
4472 |
+
|
4473 |
+
if (this.minimumResultsForSearch < 0) {
|
4474 |
+
this.minimumResultsForSearch = Infinity;
|
4475 |
+
}
|
4476 |
+
|
4477 |
+
decorated.call(this, $element, options, dataAdapter);
|
4478 |
+
}
|
4479 |
+
|
4480 |
+
MinimumResultsForSearch.prototype.showSearch = function (decorated, params) {
|
4481 |
+
if (countResults(params.data.results) < this.minimumResultsForSearch) {
|
4482 |
+
return false;
|
4483 |
+
}
|
4484 |
+
|
4485 |
+
return decorated.call(this, params);
|
4486 |
+
};
|
4487 |
+
|
4488 |
+
return MinimumResultsForSearch;
|
4489 |
+
});
|
4490 |
+
|
4491 |
+
S2.define('select2/dropdown/selectOnClose',[
|
4492 |
+
'../utils'
|
4493 |
+
], function (Utils) {
|
4494 |
+
function SelectOnClose () { }
|
4495 |
+
|
4496 |
+
SelectOnClose.prototype.bind = function (decorated, container, $container) {
|
4497 |
+
var self = this;
|
4498 |
+
|
4499 |
+
decorated.call(this, container, $container);
|
4500 |
+
|
4501 |
+
container.on('close', function (params) {
|
4502 |
+
self._handleSelectOnClose(params);
|
4503 |
+
});
|
4504 |
+
};
|
4505 |
+
|
4506 |
+
SelectOnClose.prototype._handleSelectOnClose = function (_, params) {
|
4507 |
+
if (params && params.originalSelect2Event != null) {
|
4508 |
+
var event = params.originalSelect2Event;
|
4509 |
+
|
4510 |
+
// Don't select an item if the close event was triggered from a select or
|
4511 |
+
// unselect event
|
4512 |
+
if (event._type === 'select' || event._type === 'unselect') {
|
4513 |
+
return;
|
4514 |
+
}
|
4515 |
+
}
|
4516 |
+
|
4517 |
+
var $highlightedResults = this.getHighlightedResults();
|
4518 |
+
|
4519 |
+
// Only select highlighted results
|
4520 |
+
if ($highlightedResults.length < 1) {
|
4521 |
+
return;
|
4522 |
+
}
|
4523 |
+
|
4524 |
+
var data = Utils.GetData($highlightedResults[0], 'data');
|
4525 |
+
|
4526 |
+
// Don't re-select already selected resulte
|
4527 |
+
if (
|
4528 |
+
(data.element != null && data.element.selected) ||
|
4529 |
+
(data.element == null && data.selected)
|
4530 |
+
) {
|
4531 |
+
return;
|
4532 |
+
}
|
4533 |
+
|
4534 |
+
this.trigger('select', {
|
4535 |
+
data: data
|
4536 |
+
});
|
4537 |
+
};
|
4538 |
+
|
4539 |
+
return SelectOnClose;
|
4540 |
+
});
|
4541 |
+
|
4542 |
+
S2.define('select2/dropdown/closeOnSelect',[
|
4543 |
+
|
4544 |
+
], function () {
|
4545 |
+
function CloseOnSelect () { }
|
4546 |
+
|
4547 |
+
CloseOnSelect.prototype.bind = function (decorated, container, $container) {
|
4548 |
+
var self = this;
|
4549 |
+
|
4550 |
+
decorated.call(this, container, $container);
|
4551 |
+
|
4552 |
+
container.on('select', function (evt) {
|
4553 |
+
self._selectTriggered(evt);
|
4554 |
+
});
|
4555 |
+
|
4556 |
+
container.on('unselect', function (evt) {
|
4557 |
+
self._selectTriggered(evt);
|
4558 |
+
});
|
4559 |
+
};
|
4560 |
+
|
4561 |
+
CloseOnSelect.prototype._selectTriggered = function (_, evt) {
|
4562 |
+
var originalEvent = evt.originalEvent;
|
4563 |
+
|
4564 |
+
// Don't close if the control key is being held
|
4565 |
+
if (originalEvent && originalEvent.ctrlKey) {
|
4566 |
+
return;
|
4567 |
+
}
|
4568 |
+
|
4569 |
+
this.trigger('close', {
|
4570 |
+
originalEvent: originalEvent,
|
4571 |
+
originalSelect2Event: evt
|
4572 |
+
});
|
4573 |
+
};
|
4574 |
+
|
4575 |
+
return CloseOnSelect;
|
4576 |
+
});
|
4577 |
+
|
4578 |
+
S2.define('select2/i18n/en',[],function () {
|
4579 |
+
// English
|
4580 |
+
return {
|
4581 |
+
errorLoading: function () {
|
4582 |
+
return 'The results could not be loaded.';
|
4583 |
+
},
|
4584 |
+
inputTooLong: function (args) {
|
4585 |
+
var overChars = args.input.length - args.maximum;
|
4586 |
+
|
4587 |
+
var message = 'Please delete ' + overChars + ' character';
|
4588 |
+
|
4589 |
+
if (overChars != 1) {
|
4590 |
+
message += 's';
|
4591 |
+
}
|
4592 |
+
|
4593 |
+
return message;
|
4594 |
+
},
|
4595 |
+
inputTooShort: function (args) {
|
4596 |
+
var remainingChars = args.minimum - args.input.length;
|
4597 |
+
|
4598 |
+
var message = 'Please enter ' + remainingChars + ' or more characters';
|
4599 |
+
|
4600 |
+
return message;
|
4601 |
+
},
|
4602 |
+
loadingMore: function () {
|
4603 |
+
return 'Loading more results…';
|
4604 |
+
},
|
4605 |
+
maximumSelected: function (args) {
|
4606 |
+
var message = 'You can only select ' + args.maximum + ' item';
|
4607 |
+
|
4608 |
+
if (args.maximum != 1) {
|
4609 |
+
message += 's';
|
4610 |
+
}
|
4611 |
+
|
4612 |
+
return message;
|
4613 |
+
},
|
4614 |
+
noResults: function () {
|
4615 |
+
return 'No results found';
|
4616 |
+
},
|
4617 |
+
searching: function () {
|
4618 |
+
return 'Searching…';
|
4619 |
+
}
|
4620 |
+
};
|
4621 |
+
});
|
4622 |
+
|
4623 |
+
S2.define('select2/defaults',[
|
4624 |
+
'jquery',
|
4625 |
+
'require',
|
4626 |
+
|
4627 |
+
'./results',
|
4628 |
+
|
4629 |
+
'./selection/single',
|
4630 |
+
'./selection/multiple',
|
4631 |
+
'./selection/placeholder',
|
4632 |
+
'./selection/allowClear',
|
4633 |
+
'./selection/search',
|
4634 |
+
'./selection/eventRelay',
|
4635 |
+
|
4636 |
+
'./utils',
|
4637 |
+
'./translation',
|
4638 |
+
'./diacritics',
|
4639 |
+
|
4640 |
+
'./data/select',
|
4641 |
+
'./data/array',
|
4642 |
+
'./data/ajax',
|
4643 |
+
'./data/tags',
|
4644 |
+
'./data/tokenizer',
|
4645 |
+
'./data/minimumInputLength',
|
4646 |
+
'./data/maximumInputLength',
|
4647 |
+
'./data/maximumSelectionLength',
|
4648 |
+
|
4649 |
+
'./dropdown',
|
4650 |
+
'./dropdown/search',
|
4651 |
+
'./dropdown/hidePlaceholder',
|
4652 |
+
'./dropdown/infiniteScroll',
|
4653 |
+
'./dropdown/attachBody',
|
4654 |
+
'./dropdown/minimumResultsForSearch',
|
4655 |
+
'./dropdown/selectOnClose',
|
4656 |
+
'./dropdown/closeOnSelect',
|
4657 |
+
|
4658 |
+
'./i18n/en'
|
4659 |
+
], function ($, require,
|
4660 |
+
|
4661 |
+
ResultsList,
|
4662 |
+
|
4663 |
+
SingleSelection, MultipleSelection, Placeholder, AllowClear,
|
4664 |
+
SelectionSearch, EventRelay,
|
4665 |
+
|
4666 |
+
Utils, Translation, DIACRITICS,
|
4667 |
+
|
4668 |
+
SelectData, ArrayData, AjaxData, Tags, Tokenizer,
|
4669 |
+
MinimumInputLength, MaximumInputLength, MaximumSelectionLength,
|
4670 |
+
|
4671 |
+
Dropdown, DropdownSearch, HidePlaceholder, InfiniteScroll,
|
4672 |
+
AttachBody, MinimumResultsForSearch, SelectOnClose, CloseOnSelect,
|
4673 |
+
|
4674 |
+
EnglishTranslation) {
|
4675 |
+
function Defaults () {
|
4676 |
+
this.reset();
|
4677 |
+
}
|
4678 |
+
|
4679 |
+
Defaults.prototype.apply = function (options) {
|
4680 |
+
options = $.extend(true, {}, this.defaults, options);
|
4681 |
+
|
4682 |
+
if (options.dataAdapter == null) {
|
4683 |
+
if (options.ajax != null) {
|
4684 |
+
options.dataAdapter = AjaxData;
|
4685 |
+
} else if (options.data != null) {
|
4686 |
+
options.dataAdapter = ArrayData;
|
4687 |
+
} else {
|
4688 |
+
options.dataAdapter = SelectData;
|
4689 |
+
}
|
4690 |
+
|
4691 |
+
if (options.minimumInputLength > 0) {
|
4692 |
+
options.dataAdapter = Utils.Decorate(
|
4693 |
+
options.dataAdapter,
|
4694 |
+
MinimumInputLength
|
4695 |
+
);
|
4696 |
+
}
|
4697 |
+
|
4698 |
+
if (options.maximumInputLength > 0) {
|
4699 |
+
options.dataAdapter = Utils.Decorate(
|
4700 |
+
options.dataAdapter,
|
4701 |
+
MaximumInputLength
|
4702 |
+
);
|
4703 |
+
}
|
4704 |
+
|
4705 |
+
if (options.maximumSelectionLength > 0) {
|
4706 |
+
options.dataAdapter = Utils.Decorate(
|
4707 |
+
options.dataAdapter,
|
4708 |
+
MaximumSelectionLength
|
4709 |
+
);
|
4710 |
+
}
|
4711 |
+
|
4712 |
+
if (options.tags) {
|
4713 |
+
options.dataAdapter = Utils.Decorate(options.dataAdapter, Tags);
|
4714 |
+
}
|
4715 |
+
|
4716 |
+
if (options.tokenSeparators != null || options.tokenizer != null) {
|
4717 |
+
options.dataAdapter = Utils.Decorate(
|
4718 |
+
options.dataAdapter,
|
4719 |
+
Tokenizer
|
4720 |
+
);
|
4721 |
+
}
|
4722 |
+
|
4723 |
+
if (options.query != null) {
|
4724 |
+
var Query = require(options.amdBase + 'compat/query');
|
4725 |
+
|
4726 |
+
options.dataAdapter = Utils.Decorate(
|
4727 |
+
options.dataAdapter,
|
4728 |
+
Query
|
4729 |
+
);
|
4730 |
+
}
|
4731 |
+
|
4732 |
+
if (options.initSelection != null) {
|
4733 |
+
var InitSelection = require(options.amdBase + 'compat/initSelection');
|
4734 |
+
|
4735 |
+
options.dataAdapter = Utils.Decorate(
|
4736 |
+
options.dataAdapter,
|
4737 |
+
InitSelection
|
4738 |
+
);
|
4739 |
+
}
|
4740 |
+
}
|
4741 |
+
|
4742 |
+
if (options.resultsAdapter == null) {
|
4743 |
+
options.resultsAdapter = ResultsList;
|
4744 |
+
|
4745 |
+
if (options.ajax != null) {
|
4746 |
+
options.resultsAdapter = Utils.Decorate(
|
4747 |
+
options.resultsAdapter,
|
4748 |
+
InfiniteScroll
|
4749 |
+
);
|
4750 |
+
}
|
4751 |
+
|
4752 |
+
if (options.placeholder != null) {
|
4753 |
+
options.resultsAdapter = Utils.Decorate(
|
4754 |
+
options.resultsAdapter,
|
4755 |
+
HidePlaceholder
|
4756 |
+
);
|
4757 |
+
}
|
4758 |
+
|
4759 |
+
if (options.selectOnClose) {
|
4760 |
+
options.resultsAdapter = Utils.Decorate(
|
4761 |
+
options.resultsAdapter,
|
4762 |
+
SelectOnClose
|
4763 |
+
);
|
4764 |
+
}
|
4765 |
+
}
|
4766 |
+
|
4767 |
+
if (options.dropdownAdapter == null) {
|
4768 |
+
if (options.multiple) {
|
4769 |
+
options.dropdownAdapter = Dropdown;
|
4770 |
+
} else {
|
4771 |
+
var SearchableDropdown = Utils.Decorate(Dropdown, DropdownSearch);
|
4772 |
+
|
4773 |
+
options.dropdownAdapter = SearchableDropdown;
|
4774 |
+
}
|
4775 |
+
|
4776 |
+
if (options.minimumResultsForSearch !== 0) {
|
4777 |
+
options.dropdownAdapter = Utils.Decorate(
|
4778 |
+
options.dropdownAdapter,
|
4779 |
+
MinimumResultsForSearch
|
4780 |
+
);
|
4781 |
+
}
|
4782 |
+
|
4783 |
+
if (options.closeOnSelect) {
|
4784 |
+
options.dropdownAdapter = Utils.Decorate(
|
4785 |
+
options.dropdownAdapter,
|
4786 |
+
CloseOnSelect
|
4787 |
+
);
|
4788 |
+
}
|
4789 |
+
|
4790 |
+
if (
|
4791 |
+
options.dropdownCssClass != null ||
|
4792 |
+
options.dropdownCss != null ||
|
4793 |
+
options.adaptDropdownCssClass != null
|
4794 |
+
) {
|
4795 |
+
var DropdownCSS = require(options.amdBase + 'compat/dropdownCss');
|
4796 |
+
|
4797 |
+
options.dropdownAdapter = Utils.Decorate(
|
4798 |
+
options.dropdownAdapter,
|
4799 |
+
DropdownCSS
|
4800 |
+
);
|
4801 |
+
}
|
4802 |
+
|
4803 |
+
options.dropdownAdapter = Utils.Decorate(
|
4804 |
+
options.dropdownAdapter,
|
4805 |
+
AttachBody
|
4806 |
+
);
|
4807 |
+
}
|
4808 |
+
|
4809 |
+
if (options.selectionAdapter == null) {
|
4810 |
+
if (options.multiple) {
|
4811 |
+
options.selectionAdapter = MultipleSelection;
|
4812 |
+
} else {
|
4813 |
+
options.selectionAdapter = SingleSelection;
|
4814 |
+
}
|
4815 |
+
|
4816 |
+
// Add the placeholder mixin if a placeholder was specified
|
4817 |
+
if (options.placeholder != null) {
|
4818 |
+
options.selectionAdapter = Utils.Decorate(
|
4819 |
+
options.selectionAdapter,
|
4820 |
+
Placeholder
|
4821 |
+
);
|
4822 |
+
}
|
4823 |
+
|
4824 |
+
if (options.allowClear) {
|
4825 |
+
options.selectionAdapter = Utils.Decorate(
|
4826 |
+
options.selectionAdapter,
|
4827 |
+
AllowClear
|
4828 |
+
);
|
4829 |
+
}
|
4830 |
+
|
4831 |
+
if (options.multiple) {
|
4832 |
+
options.selectionAdapter = Utils.Decorate(
|
4833 |
+
options.selectionAdapter,
|
4834 |
+
SelectionSearch
|
4835 |
+
);
|
4836 |
+
}
|
4837 |
+
|
4838 |
+
if (
|
4839 |
+
options.containerCssClass != null ||
|
4840 |
+
options.containerCss != null ||
|
4841 |
+
options.adaptContainerCssClass != null
|
4842 |
+
) {
|
4843 |
+
var ContainerCSS = require(options.amdBase + 'compat/containerCss');
|
4844 |
+
|
4845 |
+
options.selectionAdapter = Utils.Decorate(
|
4846 |
+
options.selectionAdapter,
|
4847 |
+
ContainerCSS
|
4848 |
+
);
|
4849 |
+
}
|
4850 |
+
|
4851 |
+
options.selectionAdapter = Utils.Decorate(
|
4852 |
+
options.selectionAdapter,
|
4853 |
+
EventRelay
|
4854 |
+
);
|
4855 |
+
}
|
4856 |
+
|
4857 |
+
if (typeof options.language === 'string') {
|
4858 |
+
// Check if the language is specified with a region
|
4859 |
+
if (options.language.indexOf('-') > 0) {
|
4860 |
+
// Extract the region information if it is included
|
4861 |
+
var languageParts = options.language.split('-');
|
4862 |
+
var baseLanguage = languageParts[0];
|
4863 |
+
|
4864 |
+
options.language = [options.language, baseLanguage];
|
4865 |
+
} else {
|
4866 |
+
options.language = [options.language];
|
4867 |
+
}
|
4868 |
+
}
|
4869 |
+
|
4870 |
+
if ($.isArray(options.language)) {
|
4871 |
+
var languages = new Translation();
|
4872 |
+
options.language.push('en');
|
4873 |
+
|
4874 |
+
var languageNames = options.language;
|
4875 |
+
|
4876 |
+
for (var l = 0; l < languageNames.length; l++) {
|
4877 |
+
var name = languageNames[l];
|
4878 |
+
var language = {};
|
4879 |
+
|
4880 |
+
try {
|
4881 |
+
// Try to load it with the original name
|
4882 |
+
language = Translation.loadPath(name);
|
4883 |
+
} catch (e) {
|
4884 |
+
try {
|
4885 |
+
// If we couldn't load it, check if it wasn't the full path
|
4886 |
+
name = this.defaults.amdLanguageBase + name;
|
4887 |
+
language = Translation.loadPath(name);
|
4888 |
+
} catch (ex) {
|
4889 |
+
// The translation could not be loaded at all. Sometimes this is
|
4890 |
+
// because of a configuration problem, other times this can be
|
4891 |
+
// because of how Select2 helps load all possible translation files.
|
4892 |
+
if (options.debug && window.console && console.warn) {
|
4893 |
+
console.warn(
|
4894 |
+
'Select2: The language file for "' + name + '" could not be ' +
|
4895 |
+
'automatically loaded. A fallback will be used instead.'
|
4896 |
+
);
|
4897 |
+
}
|
4898 |
+
|
4899 |
+
continue;
|
4900 |
+
}
|
4901 |
+
}
|
4902 |
+
|
4903 |
+
languages.extend(language);
|
4904 |
+
}
|
4905 |
+
|
4906 |
+
options.translations = languages;
|
4907 |
+
} else {
|
4908 |
+
var baseTranslation = Translation.loadPath(
|
4909 |
+
this.defaults.amdLanguageBase + 'en'
|
4910 |
+
);
|
4911 |
+
var customTranslation = new Translation(options.language);
|
4912 |
+
|
4913 |
+
customTranslation.extend(baseTranslation);
|
4914 |
+
|
4915 |
+
options.translations = customTranslation;
|
4916 |
+
}
|
4917 |
+
|
4918 |
+
return options;
|
4919 |
+
};
|
4920 |
+
|
4921 |
+
Defaults.prototype.reset = function () {
|
4922 |
+
function stripDiacritics (text) {
|
4923 |
+
// Used 'uni range + named function' from http://jsperf.com/diacritics/18
|
4924 |
+
function match(a) {
|
4925 |
+
return DIACRITICS[a] || a;
|
4926 |
+
}
|
4927 |
+
|
4928 |
+
return text.replace(/[^\u0000-\u007E]/g, match);
|
4929 |
+
}
|
4930 |
+
|
4931 |
+
function matcher (params, data) {
|
4932 |
+
// Always return the object if there is nothing to compare
|
4933 |
+
if ($.trim(params.term) === '') {
|
4934 |
+
return data;
|
4935 |
+
}
|
4936 |
+
|
4937 |
+
// Do a recursive check for options with children
|
4938 |
+
if (data.children && data.children.length > 0) {
|
4939 |
+
// Clone the data object if there are children
|
4940 |
+
// This is required as we modify the object to remove any non-matches
|
4941 |
+
var match = $.extend(true, {}, data);
|
4942 |
+
|
4943 |
+
// Check each child of the option
|
4944 |
+
for (var c = data.children.length - 1; c >= 0; c--) {
|
4945 |
+
var child = data.children[c];
|
4946 |
+
|
4947 |
+
var matches = matcher(params, child);
|
4948 |
+
|
4949 |
+
// If there wasn't a match, remove the object in the array
|
4950 |
+
if (matches == null) {
|
4951 |
+
match.children.splice(c, 1);
|
4952 |
+
}
|
4953 |
+
}
|
4954 |
+
|
4955 |
+
// If any children matched, return the new object
|
4956 |
+
if (match.children.length > 0) {
|
4957 |
+
return match;
|
4958 |
+
}
|
4959 |
+
|
4960 |
+
// If there were no matching children, check just the plain object
|
4961 |
+
return matcher(params, match);
|
4962 |
+
}
|
4963 |
+
|
4964 |
+
var original = stripDiacritics(data.text).toUpperCase();
|
4965 |
+
var term = stripDiacritics(params.term).toUpperCase();
|
4966 |
+
|
4967 |
+
// Check if the text contains the term
|
4968 |
+
if (original.indexOf(term) > -1) {
|
4969 |
+
return data;
|
4970 |
+
}
|
4971 |
+
|
4972 |
+
// If it doesn't contain the term, don't return anything
|
4973 |
+
return null;
|
4974 |
+
}
|
4975 |
+
|
4976 |
+
this.defaults = {
|
4977 |
+
amdBase: './',
|
4978 |
+
amdLanguageBase: './i18n/',
|
4979 |
+
closeOnSelect: true,
|
4980 |
+
debug: false,
|
4981 |
+
dropdownAutoWidth: false,
|
4982 |
+
escapeMarkup: Utils.escapeMarkup,
|
4983 |
+
language: EnglishTranslation,
|
4984 |
+
matcher: matcher,
|
4985 |
+
minimumInputLength: 0,
|
4986 |
+
maximumInputLength: 0,
|
4987 |
+
maximumSelectionLength: 0,
|
4988 |
+
minimumResultsForSearch: 0,
|
4989 |
+
selectOnClose: false,
|
4990 |
+
sorter: function (data) {
|
4991 |
+
return data;
|
4992 |
+
},
|
4993 |
+
templateResult: function (result) {
|
4994 |
+
return result.text;
|
4995 |
+
},
|
4996 |
+
templateSelection: function (selection) {
|
4997 |
+
return selection.text;
|
4998 |
+
},
|
4999 |
+
theme: 'default',
|
5000 |
+
width: 'resolve'
|
5001 |
+
};
|
5002 |
+
};
|
5003 |
+
|
5004 |
+
Defaults.prototype.set = function (key, value) {
|
5005 |
+
var camelKey = $.camelCase(key);
|
5006 |
+
|
5007 |
+
var data = {};
|
5008 |
+
data[camelKey] = value;
|
5009 |
+
|
5010 |
+
var convertedData = Utils._convertData(data);
|
5011 |
+
|
5012 |
+
$.extend(true, this.defaults, convertedData);
|
5013 |
+
};
|
5014 |
+
|
5015 |
+
var defaults = new Defaults();
|
5016 |
+
|
5017 |
+
return defaults;
|
5018 |
+
});
|
5019 |
+
|
5020 |
+
S2.define('select2/options',[
|
5021 |
+
'require',
|
5022 |
+
'jquery',
|
5023 |
+
'./defaults',
|
5024 |
+
'./utils'
|
5025 |
+
], function (require, $, Defaults, Utils) {
|
5026 |
+
function Options (options, $element) {
|
5027 |
+
this.options = options;
|
5028 |
+
|
5029 |
+
if ($element != null) {
|
5030 |
+
this.fromElement($element);
|
5031 |
+
}
|
5032 |
+
|
5033 |
+
this.options = Defaults.apply(this.options);
|
5034 |
+
|
5035 |
+
if ($element && $element.is('input')) {
|
5036 |
+
var InputCompat = require(this.get('amdBase') + 'compat/inputData');
|
5037 |
+
|
5038 |
+
this.options.dataAdapter = Utils.Decorate(
|
5039 |
+
this.options.dataAdapter,
|
5040 |
+
InputCompat
|
5041 |
+
);
|
5042 |
+
}
|
5043 |
+
}
|
5044 |
+
|
5045 |
+
Options.prototype.fromElement = function ($e) {
|
5046 |
+
var excludedData = ['select2'];
|
5047 |
+
|
5048 |
+
if (this.options.multiple == null) {
|
5049 |
+
this.options.multiple = $e.prop('multiple');
|
5050 |
+
}
|
5051 |
+
|
5052 |
+
if (this.options.disabled == null) {
|
5053 |
+
this.options.disabled = $e.prop('disabled');
|
5054 |
+
}
|
5055 |
+
|
5056 |
+
if (this.options.language == null) {
|
5057 |
+
if ($e.prop('lang')) {
|
5058 |
+
this.options.language = $e.prop('lang').toLowerCase();
|
5059 |
+
} else if ($e.closest('[lang]').prop('lang')) {
|
5060 |
+
this.options.language = $e.closest('[lang]').prop('lang');
|
5061 |
+
}
|
5062 |
+
}
|
5063 |
+
|
5064 |
+
if (this.options.dir == null) {
|
5065 |
+
if ($e.prop('dir')) {
|
5066 |
+
this.options.dir = $e.prop('dir');
|
5067 |
+
} else if ($e.closest('[dir]').prop('dir')) {
|
5068 |
+
this.options.dir = $e.closest('[dir]').prop('dir');
|
5069 |
+
} else {
|
5070 |
+
this.options.dir = 'ltr';
|
5071 |
+
}
|
5072 |
+
}
|
5073 |
+
|
5074 |
+
$e.prop('disabled', this.options.disabled);
|
5075 |
+
$e.prop('multiple', this.options.multiple);
|
5076 |
+
|
5077 |
+
if (Utils.GetData($e[0], 'select2Tags')) {
|
5078 |
+
if (this.options.debug && window.console && console.warn) {
|
5079 |
+
console.warn(
|
5080 |
+
'Select2: The `data-select2-tags` attribute has been changed to ' +
|
5081 |
+
'use the `data-data` and `data-tags="true"` attributes and will be ' +
|
5082 |
+
'removed in future versions of Select2.'
|
5083 |
+
);
|
5084 |
+
}
|
5085 |
+
|
5086 |
+
Utils.StoreData($e[0], 'data', Utils.GetData($e[0], 'select2Tags'));
|
5087 |
+
Utils.StoreData($e[0], 'tags', true);
|
5088 |
+
}
|
5089 |
+
|
5090 |
+
if (Utils.GetData($e[0], 'ajaxUrl')) {
|
5091 |
+
if (this.options.debug && window.console && console.warn) {
|
5092 |
+
console.warn(
|
5093 |
+
'Select2: The `data-ajax-url` attribute has been changed to ' +
|
5094 |
+
'`data-ajax--url` and support for the old attribute will be removed' +
|
5095 |
+
' in future versions of Select2.'
|
5096 |
+
);
|
5097 |
+
}
|
5098 |
+
|
5099 |
+
$e.attr('ajax--url', Utils.GetData($e[0], 'ajaxUrl'));
|
5100 |
+
Utils.StoreData($e[0], 'ajax-Url', Utils.GetData($e[0], 'ajaxUrl'));
|
5101 |
+
|
5102 |
+
}
|
5103 |
+
|
5104 |
+
var dataset = {};
|
5105 |
+
|
5106 |
+
// Prefer the element's `dataset` attribute if it exists
|
5107 |
+
// jQuery 1.x does not correctly handle data attributes with multiple dashes
|
5108 |
+
if ($.fn.jquery && $.fn.jquery.substr(0, 2) == '1.' && $e[0].dataset) {
|
5109 |
+
dataset = $.extend(true, {}, $e[0].dataset, Utils.GetData($e[0]));
|
5110 |
+
} else {
|
5111 |
+
dataset = Utils.GetData($e[0]);
|
5112 |
+
}
|
5113 |
+
|
5114 |
+
var data = $.extend(true, {}, dataset);
|
5115 |
+
|
5116 |
+
data = Utils._convertData(data);
|
5117 |
+
|
5118 |
+
for (var key in data) {
|
5119 |
+
if ($.inArray(key, excludedData) > -1) {
|
5120 |
+
continue;
|
5121 |
+
}
|
5122 |
+
|
5123 |
+
if ($.isPlainObject(this.options[key])) {
|
5124 |
+
$.extend(this.options[key], data[key]);
|
5125 |
+
} else {
|
5126 |
+
this.options[key] = data[key];
|
5127 |
+
}
|
5128 |
+
}
|
5129 |
+
|
5130 |
+
return this;
|
5131 |
+
};
|
5132 |
+
|
5133 |
+
Options.prototype.get = function (key) {
|
5134 |
+
return this.options[key];
|
5135 |
+
};
|
5136 |
+
|
5137 |
+
Options.prototype.set = function (key, val) {
|
5138 |
+
this.options[key] = val;
|
5139 |
+
};
|
5140 |
+
|
5141 |
+
return Options;
|
5142 |
+
});
|
5143 |
+
|
5144 |
+
S2.define('select2/core',[
|
5145 |
+
'jquery',
|
5146 |
+
'./options',
|
5147 |
+
'./utils',
|
5148 |
+
'./keys'
|
5149 |
+
], function ($, Options, Utils, KEYS) {
|
5150 |
+
var Select2 = function ($element, options) {
|
5151 |
+
if (Utils.GetData($element[0], 'select2') != null) {
|
5152 |
+
Utils.GetData($element[0], 'select2').destroy();
|
5153 |
+
}
|
5154 |
+
|
5155 |
+
this.$element = $element;
|
5156 |
+
|
5157 |
+
this.id = this._generateId($element);
|
5158 |
+
|
5159 |
+
options = options || {};
|
5160 |
+
|
5161 |
+
this.options = new Options(options, $element);
|
5162 |
+
|
5163 |
+
Select2.__super__.constructor.call(this);
|
5164 |
+
|
5165 |
+
// Set up the tabindex
|
5166 |
+
|
5167 |
+
var tabindex = $element.attr('tabindex') || 0;
|
5168 |
+
Utils.StoreData($element[0], 'old-tabindex', tabindex);
|
5169 |
+
$element.attr('tabindex', '-1');
|
5170 |
+
|
5171 |
+
// Set up containers and adapters
|
5172 |
+
|
5173 |
+
var DataAdapter = this.options.get('dataAdapter');
|
5174 |
+
this.dataAdapter = new DataAdapter($element, this.options);
|
5175 |
+
|
5176 |
+
var $container = this.render();
|
5177 |
+
|
5178 |
+
this._placeContainer($container);
|
5179 |
+
|
5180 |
+
var SelectionAdapter = this.options.get('selectionAdapter');
|
5181 |
+
this.selection = new SelectionAdapter($element, this.options);
|
5182 |
+
this.$selection = this.selection.render();
|
5183 |
+
|
5184 |
+
this.selection.position(this.$selection, $container);
|
5185 |
+
|
5186 |
+
var DropdownAdapter = this.options.get('dropdownAdapter');
|
5187 |
+
this.dropdown = new DropdownAdapter($element, this.options);
|
5188 |
+
this.$dropdown = this.dropdown.render();
|
5189 |
+
|
5190 |
+
this.dropdown.position(this.$dropdown, $container);
|
5191 |
+
|
5192 |
+
var ResultsAdapter = this.options.get('resultsAdapter');
|
5193 |
+
this.results = new ResultsAdapter($element, this.options, this.dataAdapter);
|
5194 |
+
this.$results = this.results.render();
|
5195 |
+
|
5196 |
+
this.results.position(this.$results, this.$dropdown);
|
5197 |
+
|
5198 |
+
// Bind events
|
5199 |
+
|
5200 |
+
var self = this;
|
5201 |
+
|
5202 |
+
// Bind the container to all of the adapters
|
5203 |
+
this._bindAdapters();
|
5204 |
+
|
5205 |
+
// Register any DOM event handlers
|
5206 |
+
this._registerDomEvents();
|
5207 |
+
|
5208 |
+
// Register any internal event handlers
|
5209 |
+
this._registerDataEvents();
|
5210 |
+
this._registerSelectionEvents();
|
5211 |
+
this._registerDropdownEvents();
|
5212 |
+
this._registerResultsEvents();
|
5213 |
+
this._registerEvents();
|
5214 |
+
|
5215 |
+
// Set the initial state
|
5216 |
+
this.dataAdapter.current(function (initialData) {
|
5217 |
+
self.trigger('selection:update', {
|
5218 |
+
data: initialData
|
5219 |
+
});
|
5220 |
+
});
|
5221 |
+
|
5222 |
+
// Hide the original select
|
5223 |
+
$element.addClass('select2-hidden-accessible');
|
5224 |
+
$element.attr('aria-hidden', 'true');
|
5225 |
+
|
5226 |
+
// Synchronize any monitored attributes
|
5227 |
+
this._syncAttributes();
|
5228 |
+
|
5229 |
+
Utils.StoreData($element[0], 'select2', this);
|
5230 |
+
|
5231 |
+
// Ensure backwards compatibility with $element.data('select2').
|
5232 |
+
$element.data('select2', this);
|
5233 |
+
};
|
5234 |
+
|
5235 |
+
Utils.Extend(Select2, Utils.Observable);
|
5236 |
+
|
5237 |
+
Select2.prototype._generateId = function ($element) {
|
5238 |
+
var id = '';
|
5239 |
+
|
5240 |
+
if ($element.attr('id') != null) {
|
5241 |
+
id = $element.attr('id');
|
5242 |
+
} else if ($element.attr('name') != null) {
|
5243 |
+
id = $element.attr('name') + '-' + Utils.generateChars(2);
|
5244 |
+
} else {
|
5245 |
+
id = Utils.generateChars(4);
|
5246 |
+
}
|
5247 |
+
|
5248 |
+
id = id.replace(/(:|\.|\[|\]|,)/g, '');
|
5249 |
+
id = 'select2-' + id;
|
5250 |
+
|
5251 |
+
return id;
|
5252 |
+
};
|
5253 |
+
|
5254 |
+
Select2.prototype._placeContainer = function ($container) {
|
5255 |
+
$container.insertAfter(this.$element);
|
5256 |
+
|
5257 |
+
var width = this._resolveWidth(this.$element, this.options.get('width'));
|
5258 |
+
|
5259 |
+
if (width != null) {
|
5260 |
+
$container.css('width', width);
|
5261 |
+
}
|
5262 |
+
};
|
5263 |
+
|
5264 |
+
Select2.prototype._resolveWidth = function ($element, method) {
|
5265 |
+
var WIDTH = /^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;
|
5266 |
+
|
5267 |
+
if (method == 'resolve') {
|
5268 |
+
var styleWidth = this._resolveWidth($element, 'style');
|
5269 |
+
|
5270 |
+
if (styleWidth != null) {
|
5271 |
+
return styleWidth;
|
5272 |
+
}
|
5273 |
+
|
5274 |
+
return this._resolveWidth($element, 'element');
|
5275 |
+
}
|
5276 |
+
|
5277 |
+
if (method == 'element') {
|
5278 |
+
var elementWidth = $element.outerWidth(false);
|
5279 |
+
|
5280 |
+
if (elementWidth <= 0) {
|
5281 |
+
return 'auto';
|
5282 |
+
}
|
5283 |
+
|
5284 |
+
return elementWidth + 'px';
|
5285 |
+
}
|
5286 |
+
|
5287 |
+
if (method == 'style') {
|
5288 |
+
var style = $element.attr('style');
|
5289 |
+
|
5290 |
+
if (typeof(style) !== 'string') {
|
5291 |
+
return null;
|
5292 |
+
}
|
5293 |
+
|
5294 |
+
var attrs = style.split(';');
|
5295 |
+
|
5296 |
+
for (var i = 0, l = attrs.length; i < l; i = i + 1) {
|
5297 |
+
var attr = attrs[i].replace(/\s/g, '');
|
5298 |
+
var matches = attr.match(WIDTH);
|
5299 |
+
|
5300 |
+
if (matches !== null && matches.length >= 1) {
|
5301 |
+
return matches[1];
|
5302 |
+
}
|
5303 |
+
}
|
5304 |
+
|
5305 |
+
return null;
|
5306 |
+
}
|
5307 |
+
|
5308 |
+
return method;
|
5309 |
+
};
|
5310 |
+
|
5311 |
+
Select2.prototype._bindAdapters = function () {
|
5312 |
+
this.dataAdapter.bind(this, this.$container);
|
5313 |
+
this.selection.bind(this, this.$container);
|
5314 |
+
|
5315 |
+
this.dropdown.bind(this, this.$container);
|
5316 |
+
this.results.bind(this, this.$container);
|
5317 |
+
};
|
5318 |
+
|
5319 |
+
Select2.prototype._registerDomEvents = function () {
|
5320 |
+
var self = this;
|
5321 |
+
|
5322 |
+
this.$element.on('change.select2', function () {
|
5323 |
+
self.dataAdapter.current(function (data) {
|
5324 |
+
self.trigger('selection:update', {
|
5325 |
+
data: data
|
5326 |
+
});
|
5327 |
+
});
|
5328 |
+
});
|
5329 |
+
|
5330 |
+
this.$element.on('focus.select2', function (evt) {
|
5331 |
+
self.trigger('focus', evt);
|
5332 |
+
});
|
5333 |
+
|
5334 |
+
this._syncA = Utils.bind(this._syncAttributes, this);
|
5335 |
+
this._syncS = Utils.bind(this._syncSubtree, this);
|
5336 |
+
|
5337 |
+
if (this.$element[0].attachEvent) {
|
5338 |
+
this.$element[0].attachEvent('onpropertychange', this._syncA);
|
5339 |
+
}
|
5340 |
+
|
5341 |
+
var observer = window.MutationObserver ||
|
5342 |
+
window.WebKitMutationObserver ||
|
5343 |
+
window.MozMutationObserver
|
5344 |
+
;
|
5345 |
+
|
5346 |
+
if (observer != null) {
|
5347 |
+
this._observer = new observer(function (mutations) {
|
5348 |
+
$.each(mutations, self._syncA);
|
5349 |
+
$.each(mutations, self._syncS);
|
5350 |
+
});
|
5351 |
+
this._observer.observe(this.$element[0], {
|
5352 |
+
attributes: true,
|
5353 |
+
childList: true,
|
5354 |
+
subtree: false
|
5355 |
+
});
|
5356 |
+
} else if (this.$element[0].addEventListener) {
|
5357 |
+
this.$element[0].addEventListener(
|
5358 |
+
'DOMAttrModified',
|
5359 |
+
self._syncA,
|
5360 |
+
false
|
5361 |
+
);
|
5362 |
+
this.$element[0].addEventListener(
|
5363 |
+
'DOMNodeInserted',
|
5364 |
+
self._syncS,
|
5365 |
+
false
|
5366 |
+
);
|
5367 |
+
this.$element[0].addEventListener(
|
5368 |
+
'DOMNodeRemoved',
|
5369 |
+
self._syncS,
|
5370 |
+
false
|
5371 |
+
);
|
5372 |
+
}
|
5373 |
+
};
|
5374 |
+
|
5375 |
+
Select2.prototype._registerDataEvents = function () {
|
5376 |
+
var self = this;
|
5377 |
+
|
5378 |
+
this.dataAdapter.on('*', function (name, params) {
|
5379 |
+
self.trigger(name, params);
|
5380 |
+
});
|
5381 |
+
};
|
5382 |
+
|
5383 |
+
Select2.prototype._registerSelectionEvents = function () {
|
5384 |
+
var self = this;
|
5385 |
+
var nonRelayEvents = ['toggle', 'focus'];
|
5386 |
+
|
5387 |
+
this.selection.on('toggle', function () {
|
5388 |
+
self.toggleDropdown();
|
5389 |
+
});
|
5390 |
+
|
5391 |
+
this.selection.on('focus', function (params) {
|
5392 |
+
self.focus(params);
|
5393 |
+
});
|
5394 |
+
|
5395 |
+
this.selection.on('*', function (name, params) {
|
5396 |
+
if ($.inArray(name, nonRelayEvents) !== -1) {
|
5397 |
+
return;
|
5398 |
+
}
|
5399 |
+
|
5400 |
+
self.trigger(name, params);
|
5401 |
+
});
|
5402 |
+
};
|
5403 |
+
|
5404 |
+
Select2.prototype._registerDropdownEvents = function () {
|
5405 |
+
var self = this;
|
5406 |
+
|
5407 |
+
this.dropdown.on('*', function (name, params) {
|
5408 |
+
self.trigger(name, params);
|
5409 |
+
});
|
5410 |
+
};
|
5411 |
+
|
5412 |
+
Select2.prototype._registerResultsEvents = function () {
|
5413 |
+
var self = this;
|
5414 |
+
|
5415 |
+
this.results.on('*', function (name, params) {
|
5416 |
+
self.trigger(name, params);
|
5417 |
+
});
|
5418 |
+
};
|
5419 |
+
|
5420 |
+
Select2.prototype._registerEvents = function () {
|
5421 |
+
var self = this;
|
5422 |
+
|
5423 |
+
this.on('open', function () {
|
5424 |
+
self.$container.addClass('select2-container--open');
|
5425 |
+
});
|
5426 |
+
|
5427 |
+
this.on('close', function () {
|
5428 |
+
self.$container.removeClass('select2-container--open');
|
5429 |
+
});
|
5430 |
+
|
5431 |
+
this.on('enable', function () {
|
5432 |
+
self.$container.removeClass('select2-container--disabled');
|
5433 |
+
});
|
5434 |
+
|
5435 |
+
this.on('disable', function () {
|
5436 |
+
self.$container.addClass('select2-container--disabled');
|
5437 |
+
});
|
5438 |
+
|
5439 |
+
this.on('blur', function () {
|
5440 |
+
self.$container.removeClass('select2-container--focus');
|
5441 |
+
});
|
5442 |
+
|
5443 |
+
this.on('query', function (params) {
|
5444 |
+
if (!self.isOpen()) {
|
5445 |
+
self.trigger('open', {});
|
5446 |
+
}
|
5447 |
+
|
5448 |
+
this.dataAdapter.query(params, function (data) {
|
5449 |
+
self.trigger('results:all', {
|
5450 |
+
data: data,
|
5451 |
+
query: params
|
5452 |
+
});
|
5453 |
+
});
|
5454 |
+
});
|
5455 |
+
|
5456 |
+
this.on('query:append', function (params) {
|
5457 |
+
this.dataAdapter.query(params, function (data) {
|
5458 |
+
self.trigger('results:append', {
|
5459 |
+
data: data,
|
5460 |
+
query: params
|
5461 |
+
});
|
5462 |
+
});
|
5463 |
+
});
|
5464 |
+
|
5465 |
+
this.on('keypress', function (evt) {
|
5466 |
+
var key = evt.which;
|
5467 |
+
|
5468 |
+
if (self.isOpen()) {
|
5469 |
+
if (key === KEYS.ESC || key === KEYS.TAB ||
|
5470 |
+
(key === KEYS.UP && evt.altKey)) {
|
5471 |
+
self.close();
|
5472 |
+
|
5473 |
+
evt.preventDefault();
|
5474 |
+
} else if (key === KEYS.ENTER) {
|
5475 |
+
self.trigger('results:select', {});
|
5476 |
+
|
5477 |
+
evt.preventDefault();
|
5478 |
+
} else if ((key === KEYS.SPACE && evt.ctrlKey)) {
|
5479 |
+
self.trigger('results:toggle', {});
|
5480 |
+
|
5481 |
+
evt.preventDefault();
|
5482 |
+
} else if (key === KEYS.UP) {
|
5483 |
+
self.trigger('results:previous', {});
|
5484 |
+
|
5485 |
+
evt.preventDefault();
|
5486 |
+
} else if (key === KEYS.DOWN) {
|
5487 |
+
self.trigger('results:next', {});
|
5488 |
+
|
5489 |
+
evt.preventDefault();
|
5490 |
+
}
|
5491 |
+
} else {
|
5492 |
+
if (key === KEYS.ENTER || key === KEYS.SPACE ||
|
5493 |
+
(key === KEYS.DOWN && evt.altKey)) {
|
5494 |
+
self.open();
|
5495 |
+
|
5496 |
+
evt.preventDefault();
|
5497 |
+
}
|
5498 |
+
}
|
5499 |
+
});
|
5500 |
+
};
|
5501 |
+
|
5502 |
+
Select2.prototype._syncAttributes = function () {
|
5503 |
+
this.options.set('disabled', this.$element.prop('disabled'));
|
5504 |
+
|
5505 |
+
if (this.options.get('disabled')) {
|
5506 |
+
if (this.isOpen()) {
|
5507 |
+
this.close();
|
5508 |
+
}
|
5509 |
+
|
5510 |
+
this.trigger('disable', {});
|
5511 |
+
} else {
|
5512 |
+
this.trigger('enable', {});
|
5513 |
+
}
|
5514 |
+
};
|
5515 |
+
|
5516 |
+
Select2.prototype._syncSubtree = function (evt, mutations) {
|
5517 |
+
var changed = false;
|
5518 |
+
var self = this;
|
5519 |
+
|
5520 |
+
// Ignore any mutation events raised for elements that aren't options or
|
5521 |
+
// optgroups. This handles the case when the select element is destroyed
|
5522 |
+
if (
|
5523 |
+
evt && evt.target && (
|
5524 |
+
evt.target.nodeName !== 'OPTION' && evt.target.nodeName !== 'OPTGROUP'
|
5525 |
+
)
|
5526 |
+
) {
|
5527 |
+
return;
|
5528 |
+
}
|
5529 |
+
|
5530 |
+
if (!mutations) {
|
5531 |
+
// If mutation events aren't supported, then we can only assume that the
|
5532 |
+
// change affected the selections
|
5533 |
+
changed = true;
|
5534 |
+
} else if (mutations.addedNodes && mutations.addedNodes.length > 0) {
|
5535 |
+
for (var n = 0; n < mutations.addedNodes.length; n++) {
|
5536 |
+
var node = mutations.addedNodes[n];
|
5537 |
+
|
5538 |
+
if (node.selected) {
|
5539 |
+
changed = true;
|
5540 |
+
}
|
5541 |
+
}
|
5542 |
+
} else if (mutations.removedNodes && mutations.removedNodes.length > 0) {
|
5543 |
+
changed = true;
|
5544 |
+
}
|
5545 |
+
|
5546 |
+
// Only re-pull the data if we think there is a change
|
5547 |
+
if (changed) {
|
5548 |
+
this.dataAdapter.current(function (currentData) {
|
5549 |
+
self.trigger('selection:update', {
|
5550 |
+
data: currentData
|
5551 |
+
});
|
5552 |
+
});
|
5553 |
+
}
|
5554 |
+
};
|
5555 |
+
|
5556 |
+
/**
|
5557 |
+
* Override the trigger method to automatically trigger pre-events when
|
5558 |
+
* there are events that can be prevented.
|
5559 |
+
*/
|
5560 |
+
Select2.prototype.trigger = function (name, args) {
|
5561 |
+
var actualTrigger = Select2.__super__.trigger;
|
5562 |
+
var preTriggerMap = {
|
5563 |
+
'open': 'opening',
|
5564 |
+
'close': 'closing',
|
5565 |
+
'select': 'selecting',
|
5566 |
+
'unselect': 'unselecting',
|
5567 |
+
'clear': 'clearing'
|
5568 |
+
};
|
5569 |
+
|
5570 |
+
if (args === undefined) {
|
5571 |
+
args = {};
|
5572 |
+
}
|
5573 |
+
|
5574 |
+
if (name in preTriggerMap) {
|
5575 |
+
var preTriggerName = preTriggerMap[name];
|
5576 |
+
var preTriggerArgs = {
|
5577 |
+
prevented: false,
|
5578 |
+
name: name,
|
5579 |
+
args: args
|
5580 |
+
};
|
5581 |
+
|
5582 |
+
actualTrigger.call(this, preTriggerName, preTriggerArgs);
|
5583 |
+
|
5584 |
+
if (preTriggerArgs.prevented) {
|
5585 |
+
args.prevented = true;
|
5586 |
+
|
5587 |
+
return;
|
5588 |
+
}
|
5589 |
+
}
|
5590 |
+
|
5591 |
+
actualTrigger.call(this, name, args);
|
5592 |
+
};
|
5593 |
+
|
5594 |
+
Select2.prototype.toggleDropdown = function () {
|
5595 |
+
if (this.options.get('disabled')) {
|
5596 |
+
return;
|
5597 |
+
}
|
5598 |
+
|
5599 |
+
if (this.isOpen()) {
|
5600 |
+
this.close();
|
5601 |
+
} else {
|
5602 |
+
this.open();
|
5603 |
+
}
|
5604 |
+
};
|
5605 |
+
|
5606 |
+
Select2.prototype.open = function () {
|
5607 |
+
if (this.isOpen()) {
|
5608 |
+
return;
|
5609 |
+
}
|
5610 |
+
|
5611 |
+
this.trigger('query', {});
|
5612 |
+
};
|
5613 |
+
|
5614 |
+
Select2.prototype.close = function () {
|
5615 |
+
if (!this.isOpen()) {
|
5616 |
+
return;
|
5617 |
+
}
|
5618 |
+
|
5619 |
+
this.trigger('close', {});
|
5620 |
+
};
|
5621 |
+
|
5622 |
+
Select2.prototype.isOpen = function () {
|
5623 |
+
return this.$container.hasClass('select2-container--open');
|
5624 |
+
};
|
5625 |
+
|
5626 |
+
Select2.prototype.hasFocus = function () {
|
5627 |
+
return this.$container.hasClass('select2-container--focus');
|
5628 |
+
};
|
5629 |
+
|
5630 |
+
Select2.prototype.focus = function (data) {
|
5631 |
+
// No need to re-trigger focus events if we are already focused
|
5632 |
+
if (this.hasFocus()) {
|
5633 |
+
return;
|
5634 |
+
}
|
5635 |
+
|
5636 |
+
this.$container.addClass('select2-container--focus');
|
5637 |
+
this.trigger('focus', {});
|
5638 |
+
};
|
5639 |
+
|
5640 |
+
Select2.prototype.enable = function (args) {
|
5641 |
+
if (this.options.get('debug') && window.console && console.warn) {
|
5642 |
+
console.warn(
|
5643 |
+
'Select2: The `select2("enable")` method has been deprecated and will' +
|
5644 |
+
' be removed in later Select2 versions. Use $element.prop("disabled")' +
|
5645 |
+
' instead.'
|
5646 |
+
);
|
5647 |
+
}
|
5648 |
+
|
5649 |
+
if (args == null || args.length === 0) {
|
5650 |
+
args = [true];
|
5651 |
+
}
|
5652 |
+
|
5653 |
+
var disabled = !args[0];
|
5654 |
+
|
5655 |
+
this.$element.prop('disabled', disabled);
|
5656 |
+
};
|
5657 |
+
|
5658 |
+
Select2.prototype.data = function () {
|
5659 |
+
if (this.options.get('debug') &&
|
5660 |
+
arguments.length > 0 && window.console && console.warn) {
|
5661 |
+
console.warn(
|
5662 |
+
'Select2: Data can no longer be set using `select2("data")`. You ' +
|
5663 |
+
'should consider setting the value instead using `$element.val()`.'
|
5664 |
+
);
|
5665 |
+
}
|
5666 |
+
|
5667 |
+
var data = [];
|
5668 |
+
|
5669 |
+
this.dataAdapter.current(function (currentData) {
|
5670 |
+
data = currentData;
|
5671 |
+
});
|
5672 |
+
|
5673 |
+
return data;
|
5674 |
+
};
|
5675 |
+
|
5676 |
+
Select2.prototype.val = function (args) {
|
5677 |
+
if (this.options.get('debug') && window.console && console.warn) {
|
5678 |
+
console.warn(
|
5679 |
+
'Select2: The `select2("val")` method has been deprecated and will be' +
|
5680 |
+
' removed in later Select2 versions. Use $element.val() instead.'
|
5681 |
+
);
|
5682 |
+
}
|
5683 |
+
|
5684 |
+
if (args == null || args.length === 0) {
|
5685 |
+
return this.$element.val();
|
5686 |
+
}
|
5687 |
+
|
5688 |
+
var newVal = args[0];
|
5689 |
+
|
5690 |
+
if ($.isArray(newVal)) {
|
5691 |
+
newVal = $.map(newVal, function (obj) {
|
5692 |
+
return obj.toString();
|
5693 |
+
});
|
5694 |
+
}
|
5695 |
+
|
5696 |
+
this.$element.val(newVal).trigger('change');
|
5697 |
+
};
|
5698 |
+
|
5699 |
+
Select2.prototype.destroy = function () {
|
5700 |
+
this.$container.remove();
|
5701 |
+
|
5702 |
+
if (this.$element[0].detachEvent) {
|
5703 |
+
this.$element[0].detachEvent('onpropertychange', this._syncA);
|
5704 |
+
}
|
5705 |
+
|
5706 |
+
if (this._observer != null) {
|
5707 |
+
this._observer.disconnect();
|
5708 |
+
this._observer = null;
|
5709 |
+
} else if (this.$element[0].removeEventListener) {
|
5710 |
+
this.$element[0]
|
5711 |
+
.removeEventListener('DOMAttrModified', this._syncA, false);
|
5712 |
+
this.$element[0]
|
5713 |
+
.removeEventListener('DOMNodeInserted', this._syncS, false);
|
5714 |
+
this.$element[0]
|
5715 |
+
.removeEventListener('DOMNodeRemoved', this._syncS, false);
|
5716 |
+
}
|
5717 |
+
|
5718 |
+
this._syncA = null;
|
5719 |
+
this._syncS = null;
|
5720 |
+
|
5721 |
+
this.$element.off('.select2');
|
5722 |
+
this.$element.attr('tabindex',
|
5723 |
+
Utils.GetData(this.$element[0], 'old-tabindex'));
|
5724 |
+
|
5725 |
+
this.$element.removeClass('select2-hidden-accessible');
|
5726 |
+
this.$element.attr('aria-hidden', 'false');
|
5727 |
+
Utils.RemoveData(this.$element[0]);
|
5728 |
+
this.$element.removeData('select2');
|
5729 |
+
|
5730 |
+
this.dataAdapter.destroy();
|
5731 |
+
this.selection.destroy();
|
5732 |
+
this.dropdown.destroy();
|
5733 |
+
this.results.destroy();
|
5734 |
+
|
5735 |
+
this.dataAdapter = null;
|
5736 |
+
this.selection = null;
|
5737 |
+
this.dropdown = null;
|
5738 |
+
this.results = null;
|
5739 |
+
};
|
5740 |
+
|
5741 |
+
Select2.prototype.render = function () {
|
5742 |
+
var $container = $(
|
5743 |
+
'<span class="select2 select2-container">' +
|
5744 |
+
'<span class="selection"></span>' +
|
5745 |
+
'<span class="dropdown-wrapper" aria-hidden="true"></span>' +
|
5746 |
+
'</span>'
|
5747 |
+
);
|
5748 |
+
|
5749 |
+
$container.attr('dir', this.options.get('dir'));
|
5750 |
+
|
5751 |
+
this.$container = $container;
|
5752 |
+
|
5753 |
+
this.$container.addClass('select2-container--' + this.options.get('theme'));
|
5754 |
+
|
5755 |
+
Utils.StoreData($container[0], 'element', this.$element);
|
5756 |
+
|
5757 |
+
return $container;
|
5758 |
+
};
|
5759 |
+
|
5760 |
+
return Select2;
|
5761 |
+
});
|
5762 |
+
|
5763 |
+
S2.define('select2/compat/utils',[
|
5764 |
+
'jquery'
|
5765 |
+
], function ($) {
|
5766 |
+
function syncCssClasses ($dest, $src, adapter) {
|
5767 |
+
var classes, replacements = [], adapted;
|
5768 |
+
|
5769 |
+
classes = $.trim($dest.attr('class'));
|
5770 |
+
|
5771 |
+
if (classes) {
|
5772 |
+
classes = '' + classes; // for IE which returns object
|
5773 |
+
|
5774 |
+
$(classes.split(/\s+/)).each(function () {
|
5775 |
+
// Save all Select2 classes
|
5776 |
+
if (this.indexOf('select2-') === 0) {
|
5777 |
+
replacements.push(this);
|
5778 |
+
}
|
5779 |
+
});
|
5780 |
+
}
|
5781 |
+
|
5782 |
+
classes = $.trim($src.attr('class'));
|
5783 |
+
|
5784 |
+
if (classes) {
|
5785 |
+
classes = '' + classes; // for IE which returns object
|
5786 |
+
|
5787 |
+
$(classes.split(/\s+/)).each(function () {
|
5788 |
+
// Only adapt non-Select2 classes
|
5789 |
+
if (this.indexOf('select2-') !== 0) {
|
5790 |
+
adapted = adapter(this);
|
5791 |
+
|
5792 |
+
if (adapted != null) {
|
5793 |
+
replacements.push(adapted);
|
5794 |
+
}
|
5795 |
+
}
|
5796 |
+
});
|
5797 |
+
}
|
5798 |
+
|
5799 |
+
$dest.attr('class', replacements.join(' '));
|
5800 |
+
}
|
5801 |
+
|
5802 |
+
return {
|
5803 |
+
syncCssClasses: syncCssClasses
|
5804 |
+
};
|
5805 |
+
});
|
5806 |
+
|
5807 |
+
S2.define('select2/compat/containerCss',[
|
5808 |
+
'jquery',
|
5809 |
+
'./utils'
|
5810 |
+
], function ($, CompatUtils) {
|
5811 |
+
// No-op CSS adapter that discards all classes by default
|
5812 |
+
function _containerAdapter (clazz) {
|
5813 |
+
return null;
|
5814 |
+
}
|
5815 |
+
|
5816 |
+
function ContainerCSS () { }
|
5817 |
+
|
5818 |
+
ContainerCSS.prototype.render = function (decorated) {
|
5819 |
+
var $container = decorated.call(this);
|
5820 |
+
|
5821 |
+
var containerCssClass = this.options.get('containerCssClass') || '';
|
5822 |
+
|
5823 |
+
if ($.isFunction(containerCssClass)) {
|
5824 |
+
containerCssClass = containerCssClass(this.$element);
|
5825 |
+
}
|
5826 |
+
|
5827 |
+
var containerCssAdapter = this.options.get('adaptContainerCssClass');
|
5828 |
+
containerCssAdapter = containerCssAdapter || _containerAdapter;
|
5829 |
+
|
5830 |
+
if (containerCssClass.indexOf(':all:') !== -1) {
|
5831 |
+
containerCssClass = containerCssClass.replace(':all:', '');
|
5832 |
+
|
5833 |
+
var _cssAdapter = containerCssAdapter;
|
5834 |
+
|
5835 |
+
containerCssAdapter = function (clazz) {
|
5836 |
+
var adapted = _cssAdapter(clazz);
|
5837 |
+
|
5838 |
+
if (adapted != null) {
|
5839 |
+
// Append the old one along with the adapted one
|
5840 |
+
return adapted + ' ' + clazz;
|
5841 |
+
}
|
5842 |
+
|
5843 |
+
return clazz;
|
5844 |
+
};
|
5845 |
+
}
|
5846 |
+
|
5847 |
+
var containerCss = this.options.get('containerCss') || {};
|
5848 |
+
|
5849 |
+
if ($.isFunction(containerCss)) {
|
5850 |
+
containerCss = containerCss(this.$element);
|
5851 |
+
}
|
5852 |
+
|
5853 |
+
CompatUtils.syncCssClasses($container, this.$element, containerCssAdapter);
|
5854 |
+
|
5855 |
+
$container.css(containerCss);
|
5856 |
+
$container.addClass(containerCssClass);
|
5857 |
+
|
5858 |
+
return $container;
|
5859 |
+
};
|
5860 |
+
|
5861 |
+
return ContainerCSS;
|
5862 |
+
});
|
5863 |
+
|
5864 |
+
S2.define('select2/compat/dropdownCss',[
|
5865 |
+
'jquery',
|
5866 |
+
'./utils'
|
5867 |
+
], function ($, CompatUtils) {
|
5868 |
+
// No-op CSS adapter that discards all classes by default
|
5869 |
+
function _dropdownAdapter (clazz) {
|
5870 |
+
return null;
|
5871 |
+
}
|
5872 |
+
|
5873 |
+
function DropdownCSS () { }
|
5874 |
+
|
5875 |
+
DropdownCSS.prototype.render = function (decorated) {
|
5876 |
+
var $dropdown = decorated.call(this);
|
5877 |
+
|
5878 |
+
var dropdownCssClass = this.options.get('dropdownCssClass') || '';
|
5879 |
+
|
5880 |
+
if ($.isFunction(dropdownCssClass)) {
|
5881 |
+
dropdownCssClass = dropdownCssClass(this.$element);
|
5882 |
+
}
|
5883 |
+
|
5884 |
+
var dropdownCssAdapter = this.options.get('adaptDropdownCssClass');
|
5885 |
+
dropdownCssAdapter = dropdownCssAdapter || _dropdownAdapter;
|
5886 |
+
|
5887 |
+
if (dropdownCssClass.indexOf(':all:') !== -1) {
|
5888 |
+
dropdownCssClass = dropdownCssClass.replace(':all:', '');
|
5889 |
+
|
5890 |
+
var _cssAdapter = dropdownCssAdapter;
|
5891 |
+
|
5892 |
+
dropdownCssAdapter = function (clazz) {
|
5893 |
+
var adapted = _cssAdapter(clazz);
|
5894 |
+
|
5895 |
+
if (adapted != null) {
|
5896 |
+
// Append the old one along with the adapted one
|
5897 |
+
return adapted + ' ' + clazz;
|
5898 |
+
}
|
5899 |
+
|
5900 |
+
return clazz;
|
5901 |
+
};
|
5902 |
+
}
|
5903 |
+
|
5904 |
+
var dropdownCss = this.options.get('dropdownCss') || {};
|
5905 |
+
|
5906 |
+
if ($.isFunction(dropdownCss)) {
|
5907 |
+
dropdownCss = dropdownCss(this.$element);
|
5908 |
+
}
|
5909 |
+
|
5910 |
+
CompatUtils.syncCssClasses($dropdown, this.$element, dropdownCssAdapter);
|
5911 |
+
|
5912 |
+
$dropdown.css(dropdownCss);
|
5913 |
+
$dropdown.addClass(dropdownCssClass);
|
5914 |
+
|
5915 |
+
return $dropdown;
|
5916 |
+
};
|
5917 |
+
|
5918 |
+
return DropdownCSS;
|
5919 |
+
});
|
5920 |
+
|
5921 |
+
S2.define('select2/compat/initSelection',[
|
5922 |
+
'jquery'
|
5923 |
+
], function ($) {
|
5924 |
+
function InitSelection (decorated, $element, options) {
|
5925 |
+
if (options.get('debug') && window.console && console.warn) {
|
5926 |
+
console.warn(
|
5927 |
+
'Select2: The `initSelection` option has been deprecated in favor' +
|
5928 |
+
' of a custom data adapter that overrides the `current` method. ' +
|
5929 |
+
'This method is now called multiple times instead of a single ' +
|
5930 |
+
'time when the instance is initialized. Support will be removed ' +
|
5931 |
+
'for the `initSelection` option in future versions of Select2'
|
5932 |
+
);
|
5933 |
+
}
|
5934 |
+
|
5935 |
+
this.initSelection = options.get('initSelection');
|
5936 |
+
this._isInitialized = false;
|
5937 |
+
|
5938 |
+
decorated.call(this, $element, options);
|
5939 |
+
}
|
5940 |
+
|
5941 |
+
InitSelection.prototype.current = function (decorated, callback) {
|
5942 |
+
var self = this;
|
5943 |
+
|
5944 |
+
if (this._isInitialized) {
|
5945 |
+
decorated.call(this, callback);
|
5946 |
+
|
5947 |
+
return;
|
5948 |
+
}
|
5949 |
+
|
5950 |
+
this.initSelection.call(null, this.$element, function (data) {
|
5951 |
+
self._isInitialized = true;
|
5952 |
+
|
5953 |
+
if (!$.isArray(data)) {
|
5954 |
+
data = [data];
|
5955 |
+
}
|
5956 |
+
|
5957 |
+
callback(data);
|
5958 |
+
});
|
5959 |
+
};
|
5960 |
+
|
5961 |
+
return InitSelection;
|
5962 |
+
});
|
5963 |
+
|
5964 |
+
S2.define('select2/compat/inputData',[
|
5965 |
+
'jquery',
|
5966 |
+
'../utils'
|
5967 |
+
], function ($, Utils) {
|
5968 |
+
function InputData (decorated, $element, options) {
|
5969 |
+
this._currentData = [];
|
5970 |
+
this._valueSeparator = options.get('valueSeparator') || ',';
|
5971 |
+
|
5972 |
+
if ($element.prop('type') === 'hidden') {
|
5973 |
+
if (options.get('debug') && console && console.warn) {
|
5974 |
+
console.warn(
|
5975 |
+
'Select2: Using a hidden input with Select2 is no longer ' +
|
5976 |
+
'supported and may stop working in the future. It is recommended ' +
|
5977 |
+
'to use a `<select>` element instead.'
|
5978 |
+
);
|
5979 |
+
}
|
5980 |
+
}
|
5981 |
+
|
5982 |
+
decorated.call(this, $element, options);
|
5983 |
+
}
|
5984 |
+
|
5985 |
+
InputData.prototype.current = function (_, callback) {
|
5986 |
+
function getSelected (data, selectedIds) {
|
5987 |
+
var selected = [];
|
5988 |
+
|
5989 |
+
if (data.selected || $.inArray(data.id, selectedIds) !== -1) {
|
5990 |
+
data.selected = true;
|
5991 |
+
selected.push(data);
|
5992 |
+
} else {
|
5993 |
+
data.selected = false;
|
5994 |
+
}
|
5995 |
+
|
5996 |
+
if (data.children) {
|
5997 |
+
selected.push.apply(selected, getSelected(data.children, selectedIds));
|
5998 |
+
}
|
5999 |
+
|
6000 |
+
return selected;
|
6001 |
+
}
|
6002 |
+
|
6003 |
+
var selected = [];
|
6004 |
+
|
6005 |
+
for (var d = 0; d < this._currentData.length; d++) {
|
6006 |
+
var data = this._currentData[d];
|
6007 |
+
|
6008 |
+
selected.push.apply(
|
6009 |
+
selected,
|
6010 |
+
getSelected(
|
6011 |
+
data,
|
6012 |
+
this.$element.val().split(
|
6013 |
+
this._valueSeparator
|
6014 |
+
)
|
6015 |
+
)
|
6016 |
+
);
|
6017 |
+
}
|
6018 |
+
|
6019 |
+
callback(selected);
|
6020 |
+
};
|
6021 |
+
|
6022 |
+
InputData.prototype.select = function (_, data) {
|
6023 |
+
if (!this.options.get('multiple')) {
|
6024 |
+
this.current(function (allData) {
|
6025 |
+
$.map(allData, function (data) {
|
6026 |
+
data.selected = false;
|
6027 |
+
});
|
6028 |
+
});
|
6029 |
+
|
6030 |
+
this.$element.val(data.id);
|
6031 |
+
this.$element.trigger('change');
|
6032 |
+
} else {
|
6033 |
+
var value = this.$element.val();
|
6034 |
+
value += this._valueSeparator + data.id;
|
6035 |
+
|
6036 |
+
this.$element.val(value);
|
6037 |
+
this.$element.trigger('change');
|
6038 |
+
}
|
6039 |
+
};
|
6040 |
+
|
6041 |
+
InputData.prototype.unselect = function (_, data) {
|
6042 |
+
var self = this;
|
6043 |
+
|
6044 |
+
data.selected = false;
|
6045 |
+
|
6046 |
+
this.current(function (allData) {
|
6047 |
+
var values = [];
|
6048 |
+
|
6049 |
+
for (var d = 0; d < allData.length; d++) {
|
6050 |
+
var item = allData[d];
|
6051 |
+
|
6052 |
+
if (data.id == item.id) {
|
6053 |
+
continue;
|
6054 |
+
}
|
6055 |
+
|
6056 |
+
values.push(item.id);
|
6057 |
+
}
|
6058 |
+
|
6059 |
+
self.$element.val(values.join(self._valueSeparator));
|
6060 |
+
self.$element.trigger('change');
|
6061 |
+
});
|
6062 |
+
};
|
6063 |
+
|
6064 |
+
InputData.prototype.query = function (_, params, callback) {
|
6065 |
+
var results = [];
|
6066 |
+
|
6067 |
+
for (var d = 0; d < this._currentData.length; d++) {
|
6068 |
+
var data = this._currentData[d];
|
6069 |
+
|
6070 |
+
var matches = this.matches(params, data);
|
6071 |
+
|
6072 |
+
if (matches !== null) {
|
6073 |
+
results.push(matches);
|
6074 |
+
}
|
6075 |
+
}
|
6076 |
+
|
6077 |
+
callback({
|
6078 |
+
results: results
|
6079 |
+
});
|
6080 |
+
};
|
6081 |
+
|
6082 |
+
InputData.prototype.addOptions = function (_, $options) {
|
6083 |
+
var options = $.map($options, function ($option) {
|
6084 |
+
return Utils.GetData($option[0], 'data');
|
6085 |
+
});
|
6086 |
+
|
6087 |
+
this._currentData.push.apply(this._currentData, options);
|
6088 |
+
};
|
6089 |
+
|
6090 |
+
return InputData;
|
6091 |
+
});
|
6092 |
+
|
6093 |
+
S2.define('select2/compat/matcher',[
|
6094 |
+
'jquery'
|
6095 |
+
], function ($) {
|
6096 |
+
function oldMatcher (matcher) {
|
6097 |
+
function wrappedMatcher (params, data) {
|
6098 |
+
var match = $.extend(true, {}, data);
|
6099 |
+
|
6100 |
+
if (params.term == null || $.trim(params.term) === '') {
|
6101 |
+
return match;
|
6102 |
+
}
|
6103 |
+
|
6104 |
+
if (data.children) {
|
6105 |
+
for (var c = data.children.length - 1; c >= 0; c--) {
|
6106 |
+
var child = data.children[c];
|
6107 |
+
|
6108 |
+
// Check if the child object matches
|
6109 |
+
// The old matcher returned a boolean true or false
|
6110 |
+
var doesMatch = matcher(params.term, child.text, child);
|
6111 |
+
|
6112 |
+
// If the child didn't match, pop it off
|
6113 |
+
if (!doesMatch) {
|
6114 |
+
match.children.splice(c, 1);
|
6115 |
+
}
|
6116 |
+
}
|
6117 |
+
|
6118 |
+
if (match.children.length > 0) {
|
6119 |
+
return match;
|
6120 |
+
}
|
6121 |
+
}
|
6122 |
+
|
6123 |
+
if (matcher(params.term, data.text, data)) {
|
6124 |
+
return match;
|
6125 |
+
}
|
6126 |
+
|
6127 |
+
return null;
|
6128 |
+
}
|
6129 |
+
|
6130 |
+
return wrappedMatcher;
|
6131 |
+
}
|
6132 |
+
|
6133 |
+
return oldMatcher;
|
6134 |
+
});
|
6135 |
+
|
6136 |
+
S2.define('select2/compat/query',[
|
6137 |
+
|
6138 |
+
], function () {
|
6139 |
+
function Query (decorated, $element, options) {
|
6140 |
+
if (options.get('debug') && window.console && console.warn) {
|
6141 |
+
console.warn(
|
6142 |
+
'Select2: The `query` option has been deprecated in favor of a ' +
|
6143 |
+
'custom data adapter that overrides the `query` method. Support ' +
|
6144 |
+
'will be removed for the `query` option in future versions of ' +
|
6145 |
+
'Select2.'
|
6146 |
+
);
|
6147 |
+
}
|
6148 |
+
|
6149 |
+
decorated.call(this, $element, options);
|
6150 |
+
}
|
6151 |
+
|
6152 |
+
Query.prototype.query = function (_, params, callback) {
|
6153 |
+
params.callback = callback;
|
6154 |
+
|
6155 |
+
var query = this.options.get('query');
|
6156 |
+
|
6157 |
+
query.call(null, params);
|
6158 |
+
};
|
6159 |
+
|
6160 |
+
return Query;
|
6161 |
+
});
|
6162 |
+
|
6163 |
+
S2.define('select2/dropdown/attachContainer',[
|
6164 |
+
|
6165 |
+
], function () {
|
6166 |
+
function AttachContainer (decorated, $element, options) {
|
6167 |
+
decorated.call(this, $element, options);
|
6168 |
+
}
|
6169 |
+
|
6170 |
+
AttachContainer.prototype.position =
|
6171 |
+
function (decorated, $dropdown, $container) {
|
6172 |
+
var $dropdownContainer = $container.find('.dropdown-wrapper');
|
6173 |
+
$dropdownContainer.append($dropdown);
|
6174 |
+
|
6175 |
+
$dropdown.addClass('select2-dropdown--below');
|
6176 |
+
$container.addClass('select2-container--below');
|
6177 |
+
};
|
6178 |
+
|
6179 |
+
return AttachContainer;
|
6180 |
+
});
|
6181 |
+
|
6182 |
+
S2.define('select2/dropdown/stopPropagation',[
|
6183 |
+
|
6184 |
+
], function () {
|
6185 |
+
function StopPropagation () { }
|
6186 |
+
|
6187 |
+
StopPropagation.prototype.bind = function (decorated, container, $container) {
|
6188 |
+
decorated.call(this, container, $container);
|
6189 |
+
|
6190 |
+
var stoppedEvents = [
|
6191 |
+
'blur',
|
6192 |
+
'change',
|
6193 |
+
'click',
|
6194 |
+
'dblclick',
|
6195 |
+
'focus',
|
6196 |
+
'focusin',
|
6197 |
+
'focusout',
|
6198 |
+
'input',
|
6199 |
+
'keydown',
|
6200 |
+
'keyup',
|
6201 |
+
'keypress',
|
6202 |
+
'mousedown',
|
6203 |
+
'mouseenter',
|
6204 |
+
'mouseleave',
|
6205 |
+
'mousemove',
|
6206 |
+
'mouseover',
|
6207 |
+
'mouseup',
|
6208 |
+
'search',
|
6209 |
+
'touchend',
|
6210 |
+
'touchstart'
|
6211 |
+
];
|
6212 |
+
|
6213 |
+
this.$dropdown.on(stoppedEvents.join(' '), function (evt) {
|
6214 |
+
evt.stopPropagation();
|
6215 |
+
});
|
6216 |
+
};
|
6217 |
+
|
6218 |
+
return StopPropagation;
|
6219 |
+
});
|
6220 |
+
|
6221 |
+
S2.define('select2/selection/stopPropagation',[
|
6222 |
+
|
6223 |
+
], function () {
|
6224 |
+
function StopPropagation () { }
|
6225 |
+
|
6226 |
+
StopPropagation.prototype.bind = function (decorated, container, $container) {
|
6227 |
+
decorated.call(this, container, $container);
|
6228 |
+
|
6229 |
+
var stoppedEvents = [
|
6230 |
+
'blur',
|
6231 |
+
'change',
|
6232 |
+
'click',
|
6233 |
+
'dblclick',
|
6234 |
+
'focus',
|
6235 |
+
'focusin',
|
6236 |
+
'focusout',
|
6237 |
+
'input',
|
6238 |
+
'keydown',
|
6239 |
+
'keyup',
|
6240 |
+
'keypress',
|
6241 |
+
'mousedown',
|
6242 |
+
'mouseenter',
|
6243 |
+
'mouseleave',
|
6244 |
+
'mousemove',
|
6245 |
+
'mouseover',
|
6246 |
+
'mouseup',
|
6247 |
+
'search',
|
6248 |
+
'touchend',
|
6249 |
+
'touchstart'
|
6250 |
+
];
|
6251 |
+
|
6252 |
+
this.$selection.on(stoppedEvents.join(' '), function (evt) {
|
6253 |
+
evt.stopPropagation();
|
6254 |
+
});
|
6255 |
+
};
|
6256 |
+
|
6257 |
+
return StopPropagation;
|
6258 |
+
});
|
6259 |
+
|
6260 |
+
/*!
|
6261 |
+
* jQuery Mousewheel 3.1.13
|
6262 |
+
*
|
6263 |
+
* Copyright jQuery Foundation and other contributors
|
6264 |
+
* Released under the MIT license
|
6265 |
+
* http://jquery.org/license
|
6266 |
+
*/
|
6267 |
+
|
6268 |
+
(function (factory) {
|
6269 |
+
if ( typeof S2.define === 'function' && S2.define.amd ) {
|
6270 |
+
// AMD. Register as an anonymous module.
|
6271 |
+
S2.define('jquery-mousewheel',['jquery'], factory);
|
6272 |
+
} else if (typeof exports === 'object') {
|
6273 |
+
// Node/CommonJS style for Browserify
|
6274 |
+
module.exports = factory;
|
6275 |
+
} else {
|
6276 |
+
// Browser globals
|
6277 |
+
factory(jQuery);
|
6278 |
+
}
|
6279 |
+
}(function ($) {
|
6280 |
+
|
6281 |
+
var toFix = ['wheel', 'mousewheel', 'DOMMouseScroll', 'MozMousePixelScroll'],
|
6282 |
+
toBind = ( 'onwheel' in document || document.documentMode >= 9 ) ?
|
6283 |
+
['wheel'] : ['mousewheel', 'DomMouseScroll', 'MozMousePixelScroll'],
|
6284 |
+
slice = Array.prototype.slice,
|
6285 |
+
nullLowestDeltaTimeout, lowestDelta;
|
6286 |
+
|
6287 |
+
if ( $.event.fixHooks ) {
|
6288 |
+
for ( var i = toFix.length; i; ) {
|
6289 |
+
$.event.fixHooks[ toFix[--i] ] = $.event.mouseHooks;
|
6290 |
+
}
|
6291 |
+
}
|
6292 |
+
|
6293 |
+
var special = $.event.special.mousewheel = {
|
6294 |
+
version: '3.1.12',
|
6295 |
+
|
6296 |
+
setup: function() {
|
6297 |
+
if ( this.addEventListener ) {
|
6298 |
+
for ( var i = toBind.length; i; ) {
|
6299 |
+
this.addEventListener( toBind[--i], handler, false );
|
6300 |
+
}
|
6301 |
+
} else {
|
6302 |
+
this.onmousewheel = handler;
|
6303 |
+
}
|
6304 |
+
// Store the line height and page height for this particular element
|
6305 |
+
$.data(this, 'mousewheel-line-height', special.getLineHeight(this));
|
6306 |
+
$.data(this, 'mousewheel-page-height', special.getPageHeight(this));
|
6307 |
+
},
|
6308 |
+
|
6309 |
+
teardown: function() {
|
6310 |
+
if ( this.removeEventListener ) {
|
6311 |
+
for ( var i = toBind.length; i; ) {
|
6312 |
+
this.removeEventListener( toBind[--i], handler, false );
|
6313 |
+
}
|
6314 |
+
} else {
|
6315 |
+
this.onmousewheel = null;
|
6316 |
+
}
|
6317 |
+
// Clean up the data we added to the element
|
6318 |
+
$.removeData(this, 'mousewheel-line-height');
|
6319 |
+
$.removeData(this, 'mousewheel-page-height');
|
6320 |
+
},
|
6321 |
+
|
6322 |
+
getLineHeight: function(elem) {
|
6323 |
+
var $elem = $(elem),
|
6324 |
+
$parent = $elem['offsetParent' in $.fn ? 'offsetParent' : 'parent']();
|
6325 |
+
if (!$parent.length) {
|
6326 |
+
$parent = $('body');
|
6327 |
+
}
|
6328 |
+
return parseInt($parent.css('fontSize'), 10) || parseInt($elem.css('fontSize'), 10) || 16;
|
6329 |
+
},
|
6330 |
+
|
6331 |
+
getPageHeight: function(elem) {
|
6332 |
+
return $(elem).height();
|
6333 |
+
},
|
6334 |
+
|
6335 |
+
settings: {
|
6336 |
+
adjustOldDeltas: true, // see shouldAdjustOldDeltas() below
|
6337 |
+
normalizeOffset: true // calls getBoundingClientRect for each event
|
6338 |
+
}
|
6339 |
+
};
|
6340 |
+
|
6341 |
+
$.fn.extend({
|
6342 |
+
mousewheel: function(fn) {
|
6343 |
+
return fn ? this.bind('mousewheel', fn) : this.trigger('mousewheel');
|
6344 |
+
},
|
6345 |
+
|
6346 |
+
unmousewheel: function(fn) {
|
6347 |
+
return this.unbind('mousewheel', fn);
|
6348 |
+
}
|
6349 |
+
});
|
6350 |
+
|
6351 |
+
|
6352 |
+
function handler(event) {
|
6353 |
+
var orgEvent = event || window.event,
|
6354 |
+
args = slice.call(arguments, 1),
|
6355 |
+
delta = 0,
|
6356 |
+
deltaX = 0,
|
6357 |
+
deltaY = 0,
|
6358 |
+
absDelta = 0,
|
6359 |
+
offsetX = 0,
|
6360 |
+
offsetY = 0;
|
6361 |
+
event = $.event.fix(orgEvent);
|
6362 |
+
event.type = 'mousewheel';
|
6363 |
+
|
6364 |
+
// Old school scrollwheel delta
|
6365 |
+
if ( 'detail' in orgEvent ) { deltaY = orgEvent.detail * -1; }
|
6366 |
+
if ( 'wheelDelta' in orgEvent ) { deltaY = orgEvent.wheelDelta; }
|
6367 |
+
if ( 'wheelDeltaY' in orgEvent ) { deltaY = orgEvent.wheelDeltaY; }
|
6368 |
+
if ( 'wheelDeltaX' in orgEvent ) { deltaX = orgEvent.wheelDeltaX * -1; }
|
6369 |
+
|
6370 |
+
// Firefox < 17 horizontal scrolling related to DOMMouseScroll event
|
6371 |
+
if ( 'axis' in orgEvent && orgEvent.axis === orgEvent.HORIZONTAL_AXIS ) {
|
6372 |
+
deltaX = deltaY * -1;
|
6373 |
+
deltaY = 0;
|
6374 |
+
}
|
6375 |
+
|
6376 |
+
// Set delta to be deltaY or deltaX if deltaY is 0 for backwards compatabilitiy
|
6377 |
+
delta = deltaY === 0 ? deltaX : deltaY;
|
6378 |
+
|
6379 |
+
// New school wheel delta (wheel event)
|
6380 |
+
if ( 'deltaY' in orgEvent ) {
|
6381 |
+
deltaY = orgEvent.deltaY * -1;
|
6382 |
+
delta = deltaY;
|
6383 |
+
}
|
6384 |
+
if ( 'deltaX' in orgEvent ) {
|
6385 |
+
deltaX = orgEvent.deltaX;
|
6386 |
+
if ( deltaY === 0 ) { delta = deltaX * -1; }
|
6387 |
+
}
|
6388 |
+
|
6389 |
+
// No change actually happened, no reason to go any further
|
6390 |
+
if ( deltaY === 0 && deltaX === 0 ) { return; }
|
6391 |
+
|
6392 |
+
// Need to convert lines and pages to pixels if we aren't already in pixels
|
6393 |
+
// There are three delta modes:
|
6394 |
+
// * deltaMode 0 is by pixels, nothing to do
|
6395 |
+
// * deltaMode 1 is by lines
|
6396 |
+
// * deltaMode 2 is by pages
|
6397 |
+
if ( orgEvent.deltaMode === 1 ) {
|
6398 |
+
var lineHeight = $.data(this, 'mousewheel-line-height');
|
6399 |
+
delta *= lineHeight;
|
6400 |
+
deltaY *= lineHeight;
|
6401 |
+
deltaX *= lineHeight;
|
6402 |
+
} else if ( orgEvent.deltaMode === 2 ) {
|
6403 |
+
var pageHeight = $.data(this, 'mousewheel-page-height');
|
6404 |
+
delta *= pageHeight;
|
6405 |
+
deltaY *= pageHeight;
|
6406 |
+
deltaX *= pageHeight;
|
6407 |
+
}
|
6408 |
+
|
6409 |
+
// Store lowest absolute delta to normalize the delta values
|
6410 |
+
absDelta = Math.max( Math.abs(deltaY), Math.abs(deltaX) );
|
6411 |
+
|
6412 |
+
if ( !lowestDelta || absDelta < lowestDelta ) {
|
6413 |
+
lowestDelta = absDelta;
|
6414 |
+
|
6415 |
+
// Adjust older deltas if necessary
|
6416 |
+
if ( shouldAdjustOldDeltas(orgEvent, absDelta) ) {
|
6417 |
+
lowestDelta /= 40;
|
6418 |
+
}
|
6419 |
+
}
|
6420 |
+
|
6421 |
+
// Adjust older deltas if necessary
|
6422 |
+
if ( shouldAdjustOldDeltas(orgEvent, absDelta) ) {
|
6423 |
+
// Divide all the things by 40!
|
6424 |
+
delta /= 40;
|
6425 |
+
deltaX /= 40;
|
6426 |
+
deltaY /= 40;
|
6427 |
+
}
|
6428 |
+
|
6429 |
+
// Get a whole, normalized value for the deltas
|
6430 |
+
delta = Math[ delta >= 1 ? 'floor' : 'ceil' ](delta / lowestDelta);
|
6431 |
+
deltaX = Math[ deltaX >= 1 ? 'floor' : 'ceil' ](deltaX / lowestDelta);
|
6432 |
+
deltaY = Math[ deltaY >= 1 ? 'floor' : 'ceil' ](deltaY / lowestDelta);
|
6433 |
+
|
6434 |
+
// Normalise offsetX and offsetY properties
|
6435 |
+
if ( special.settings.normalizeOffset && this.getBoundingClientRect ) {
|
6436 |
+
var boundingRect = this.getBoundingClientRect();
|
6437 |
+
offsetX = event.clientX - boundingRect.left;
|
6438 |
+
offsetY = event.clientY - boundingRect.top;
|
6439 |
+
}
|
6440 |
+
|
6441 |
+
// Add information to the event object
|
6442 |
+
event.deltaX = deltaX;
|
6443 |
+
event.deltaY = deltaY;
|
6444 |
+
event.deltaFactor = lowestDelta;
|
6445 |
+
event.offsetX = offsetX;
|
6446 |
+
event.offsetY = offsetY;
|
6447 |
+
// Go ahead and set deltaMode to 0 since we converted to pixels
|
6448 |
+
// Although this is a little odd since we overwrite the deltaX/Y
|
6449 |
+
// properties with normalized deltas.
|
6450 |
+
event.deltaMode = 0;
|
6451 |
+
|
6452 |
+
// Add event and delta to the front of the arguments
|
6453 |
+
args.unshift(event, delta, deltaX, deltaY);
|
6454 |
+
|
6455 |
+
// Clearout lowestDelta after sometime to better
|
6456 |
+
// handle multiple device types that give different
|
6457 |
+
// a different lowestDelta
|
6458 |
+
// Ex: trackpad = 3 and mouse wheel = 120
|
6459 |
+
if (nullLowestDeltaTimeout) { clearTimeout(nullLowestDeltaTimeout); }
|
6460 |
+
nullLowestDeltaTimeout = setTimeout(nullLowestDelta, 200);
|
6461 |
+
|
6462 |
+
return ($.event.dispatch || $.event.handle).apply(this, args);
|
6463 |
+
}
|
6464 |
+
|
6465 |
+
function nullLowestDelta() {
|
6466 |
+
lowestDelta = null;
|
6467 |
+
}
|
6468 |
+
|
6469 |
+
function shouldAdjustOldDeltas(orgEvent, absDelta) {
|
6470 |
+
// If this is an older event and the delta is divisable by 120,
|
6471 |
+
// then we are assuming that the browser is treating this as an
|
6472 |
+
// older mouse wheel event and that we should divide the deltas
|
6473 |
+
// by 40 to try and get a more usable deltaFactor.
|
6474 |
+
// Side note, this actually impacts the reported scroll distance
|
6475 |
+
// in older browsers and can cause scrolling to be slower than native.
|
6476 |
+
// Turn this off by setting $.event.special.mousewheel.settings.adjustOldDeltas to false.
|
6477 |
+
return special.settings.adjustOldDeltas && orgEvent.type === 'mousewheel' && absDelta % 120 === 0;
|
6478 |
+
}
|
6479 |
+
|
6480 |
+
}));
|
6481 |
+
|
6482 |
+
S2.define('jquery.select2',[
|
6483 |
+
'jquery',
|
6484 |
+
'jquery-mousewheel',
|
6485 |
+
|
6486 |
+
'./select2/core',
|
6487 |
+
'./select2/defaults',
|
6488 |
+
'./select2/utils'
|
6489 |
+
], function ($, _, Select2, Defaults, Utils) {
|
6490 |
+
if ($.fn.select2 == null) {
|
6491 |
+
// All methods that should return the element
|
6492 |
+
var thisMethods = ['open', 'close', 'destroy'];
|
6493 |
+
|
6494 |
+
$.fn.select2 = function (options) {
|
6495 |
+
options = options || {};
|
6496 |
+
|
6497 |
+
if (typeof options === 'object') {
|
6498 |
+
this.each(function () {
|
6499 |
+
var instanceOptions = $.extend(true, {}, options);
|
6500 |
+
|
6501 |
+
var instance = new Select2($(this), instanceOptions);
|
6502 |
+
});
|
6503 |
+
|
6504 |
+
return this;
|
6505 |
+
} else if (typeof options === 'string') {
|
6506 |
+
var ret;
|
6507 |
+
var args = Array.prototype.slice.call(arguments, 1);
|
6508 |
+
|
6509 |
+
this.each(function () {
|
6510 |
+
var instance = Utils.GetData(this, 'select2');
|
6511 |
+
|
6512 |
+
if (instance == null && window.console && console.error) {
|
6513 |
+
console.error(
|
6514 |
+
'The select2(\'' + options + '\') method was called on an ' +
|
6515 |
+
'element that is not using Select2.'
|
6516 |
+
);
|
6517 |
+
}
|
6518 |
+
|
6519 |
+
ret = instance[options].apply(instance, args);
|
6520 |
+
});
|
6521 |
+
|
6522 |
+
// Check if we should be returning `this`
|
6523 |
+
if ($.inArray(options, thisMethods) > -1) {
|
6524 |
+
return this;
|
6525 |
+
}
|
6526 |
+
|
6527 |
+
return ret;
|
6528 |
+
} else {
|
6529 |
+
throw new Error('Invalid arguments for Select2: ' + options);
|
6530 |
+
}
|
6531 |
+
};
|
6532 |
+
}
|
6533 |
+
|
6534 |
+
if ($.fn.select2.defaults == null) {
|
6535 |
+
$.fn.select2.defaults = Defaults;
|
6536 |
+
}
|
6537 |
+
|
6538 |
+
return Select2;
|
6539 |
+
});
|
6540 |
+
|
6541 |
+
// Return the AMD loader configuration so it can be used outside of this file
|
6542 |
+
return {
|
6543 |
+
define: S2.define,
|
6544 |
+
require: S2.require
|
6545 |
+
};
|
6546 |
+
}());
|
6547 |
+
|
6548 |
+
// Autoload the jQuery bindings
|
6549 |
+
// We know that all of the modules exist above this, so we're safe
|
6550 |
+
var select2 = S2.require('jquery.select2');
|
6551 |
+
|
6552 |
+
// Hold the AMD module references on the jQuery function that was just loaded
|
6553 |
+
// This allows Select2 to use the internal loader outside of this file, such
|
6554 |
+
// as in the language files.
|
6555 |
+
jQuery.fn.select2.amd = S2;
|
6556 |
+
|
6557 |
+
// Return the Select2 instance for anyone who is importing it.
|
6558 |
+
return select2;
|
6559 |
+
}));
|
assets/select2/select2.full.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=function(b,c){return void 0===c&&(c="undefined"!=typeof window?require("jquery"):require("jquery")(b)),a(c),c}:a(jQuery)}(function(a){var b=function(){if(a&&a.fn&&a.fn.select2&&a.fn.select2.amd)var b=a.fn.select2.amd;var b;return function(){if(!b||!b.requirejs){b?c=b:b={};var a,c,d;!function(b){function e(a,b){return v.call(a,b)}function f(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o=b&&b.split("/"),p=t.map,q=p&&p["*"]||{};if(a){for(a=a.split("/"),g=a.length-1,t.nodeIdCompat&&x.test(a[g])&&(a[g]=a[g].replace(x,"")),"."===a[0].charAt(0)&&o&&(n=o.slice(0,o.length-1),a=n.concat(a)),k=0;k<a.length;k++)if("."===(m=a[k]))a.splice(k,1),k-=1;else if(".."===m){if(0===k||1===k&&".."===a[2]||".."===a[k-1])continue;k>0&&(a.splice(k-1,2),k-=2)}a=a.join("/")}if((o||q)&&p){for(c=a.split("/"),k=c.length;k>0;k-=1){if(d=c.slice(0,k).join("/"),o)for(l=o.length;l>0;l-=1)if((e=p[o.slice(0,l).join("/")])&&(e=e[d])){f=e,h=k;break}if(f)break;!i&&q&&q[d]&&(i=q[d],j=k)}!f&&i&&(f=i,h=j),f&&(c.splice(0,h,f),a=c.join("/"))}return a}function g(a,c){return function(){var d=w.call(arguments,0);return"string"!=typeof d[0]&&1===d.length&&d.push(null),o.apply(b,d.concat([a,c]))}}function h(a){return function(b){return f(b,a)}}function i(a){return function(b){r[a]=b}}function j(a){if(e(s,a)){var c=s[a];delete s[a],u[a]=!0,n.apply(b,c)}if(!e(r,a)&&!e(u,a))throw new Error("No "+a);return r[a]}function k(a){var b,c=a?a.indexOf("!"):-1;return c>-1&&(b=a.substring(0,c),a=a.substring(c+1,a.length)),[b,a]}function l(a){return a?k(a):[]}function m(a){return function(){return t&&t.config&&t.config[a]||{}}}var n,o,p,q,r={},s={},t={},u={},v=Object.prototype.hasOwnProperty,w=[].slice,x=/\.js$/;p=function(a,b){var c,d=k(a),e=d[0],g=b[1];return a=d[1],e&&(e=f(e,g),c=j(e)),e?a=c&&c.normalize?c.normalize(a,h(g)):f(a,g):(a=f(a,g),d=k(a),e=d[0],a=d[1],e&&(c=j(e))),{f:e?e+"!"+a:a,n:a,pr:e,p:c}},q={require:function(a){return g(a)},exports:function(a){var b=r[a];return void 0!==b?b:r[a]={}},module:function(a){return{id:a,uri:"",exports:r[a],config:m(a)}}},n=function(a,c,d,f){var h,k,m,n,o,t,v,w=[],x=typeof d;if(f=f||a,t=l(f),"undefined"===x||"function"===x){for(c=!c.length&&d.length?["require","exports","module"]:c,o=0;o<c.length;o+=1)if(n=p(c[o],t),"require"===(k=n.f))w[o]=q.require(a);else if("exports"===k)w[o]=q.exports(a),v=!0;else if("module"===k)h=w[o]=q.module(a);else if(e(r,k)||e(s,k)||e(u,k))w[o]=j(k);else{if(!n.p)throw new Error(a+" missing "+k);n.p.load(n.n,g(f,!0),i(k),{}),w[o]=r[k]}m=d?d.apply(r[a],w):void 0,a&&(h&&h.exports!==b&&h.exports!==r[a]?r[a]=h.exports:m===b&&v||(r[a]=m))}else a&&(r[a]=d)},a=c=o=function(a,c,d,e,f){if("string"==typeof a)return q[a]?q[a](c):j(p(a,l(c)).f);if(!a.splice){if(t=a,t.deps&&o(t.deps,t.callback),!c)return;c.splice?(a=c,c=d,d=null):a=b}return c=c||function(){},"function"==typeof d&&(d=e,e=f),e?n(b,a,c,d):setTimeout(function(){n(b,a,c,d)},4),o},o.config=function(a){return o(a)},a._defined=r,d=function(a,b,c){if("string"!=typeof a)throw new Error("See almond README: incorrect module build, no module name");b.splice||(c=b,b=[]),e(r,a)||e(s,a)||(s[a]=[a,b,c])},d.amd={jQuery:!0}}(),b.requirejs=a,b.require=c,b.define=d}}(),b.define("almond",function(){}),b.define("jquery",[],function(){var b=a||$;return null==b&&console&&console.error&&console.error("Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before Select2 on your web page."),b}),b.define("select2/utils",["jquery"],function(a){function b(a){var b=a.prototype,c=[];for(var d in b){"function"==typeof b[d]&&("constructor"!==d&&c.push(d))}return c}var c={};c.Extend=function(a,b){function c(){this.constructor=a}var d={}.hasOwnProperty;for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},c.Decorate=function(a,c){function d(){var b=Array.prototype.unshift,d=c.prototype.constructor.length,e=a.prototype.constructor;d>0&&(b.call(arguments,a.prototype.constructor),e=c.prototype.constructor),e.apply(this,arguments)}function e(){this.constructor=d}var f=b(c),g=b(a);c.displayName=a.displayName,d.prototype=new e;for(var h=0;h<g.length;h++){var i=g[h];d.prototype[i]=a.prototype[i]}for(var j=(function(a){var b=function(){};a in d.prototype&&(b=d.prototype[a]);var e=c.prototype[a];return function(){return Array.prototype.unshift.call(arguments,b),e.apply(this,arguments)}}),k=0;k<f.length;k++){var l=f[k];d.prototype[l]=j(l)}return d};var d=function(){this.listeners={}};d.prototype.on=function(a,b){this.listeners=this.listeners||{},a in this.listeners?this.listeners[a].push(b):this.listeners[a]=[b]},d.prototype.trigger=function(a){var b=Array.prototype.slice,c=b.call(arguments,1);this.listeners=this.listeners||{},null==c&&(c=[]),0===c.length&&c.push({}),c[0]._type=a,a in this.listeners&&this.invoke(this.listeners[a],b.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},d.prototype.invoke=function(a,b){for(var c=0,d=a.length;c<d;c++)a[c].apply(this,b)},c.Observable=d,c.generateChars=function(a){for(var b="",c=0;c<a;c++){b+=Math.floor(36*Math.random()).toString(36)}return b},c.bind=function(a,b){return function(){a.apply(b,arguments)}},c._convertData=function(a){for(var b in a){var c=b.split("-"),d=a;if(1!==c.length){for(var e=0;e<c.length;e++){var f=c[e];f=f.substring(0,1).toLowerCase()+f.substring(1),f in d||(d[f]={}),e==c.length-1&&(d[f]=a[b]),d=d[f]}delete a[b]}}return a},c.hasScroll=function(b,c){var d=a(c),e=c.style.overflowX,f=c.style.overflowY;return(e!==f||"hidden"!==f&&"visible"!==f)&&("scroll"===e||"scroll"===f||(d.innerHeight()<c.scrollHeight||d.innerWidth()<c.scrollWidth))},c.escapeMarkup=function(a){var b={"\\":"\","&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};return"string"!=typeof a?a:String(a).replace(/[&<>"'\/\\]/g,function(a){return b[a]})},c.appendMany=function(b,c){if("1.7"===a.fn.jquery.substr(0,3)){var d=a();a.map(c,function(a){d=d.add(a)}),c=d}b.append(c)},c.__cache={};var e=0;return c.GetUniqueElementId=function(a){var b=a.getAttribute("data-select2-id");return null==b&&(a.id?(b=a.id,a.setAttribute("data-select2-id",b)):(a.setAttribute("data-select2-id",++e),b=e.toString())),b},c.StoreData=function(a,b,d){var e=c.GetUniqueElementId(a);c.__cache[e]||(c.__cache[e]={}),c.__cache[e][b]=d},c.GetData=function(b,d){var e=c.GetUniqueElementId(b);return d?c.__cache[e]&&null!=c.__cache[e][d]?c.__cache[e][d]:a(b).data(d):c.__cache[e]},c.RemoveData=function(a){var b=c.GetUniqueElementId(a);null!=c.__cache[b]&&delete c.__cache[b]},c}),b.define("select2/results",["jquery","./utils"],function(a,b){function c(a,b,d){this.$element=a,this.data=d,this.options=b,c.__super__.constructor.call(this)}return b.Extend(c,b.Observable),c.prototype.render=function(){var b=a('<ul class="select2-results__options" role="tree"></ul>');return this.options.get("multiple")&&b.attr("aria-multiselectable","true"),this.$results=b,b},c.prototype.clear=function(){this.$results.empty()},c.prototype.displayMessage=function(b){var c=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var d=a('<li role="treeitem" aria-live="assertive" class="select2-results__option"></li>'),e=this.options.get("translations").get(b.message);d.append(c(e(b.args))),d[0].className+=" select2-results__message",this.$results.append(d)},c.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},c.prototype.append=function(a){this.hideLoading();var b=[];if(null==a.results||0===a.results.length)return void(0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"}));a.results=this.sort(a.results);for(var c=0;c<a.results.length;c++){var d=a.results[c],e=this.option(d);b.push(e)}this.$results.append(b)},c.prototype.position=function(a,b){b.find(".select2-results").append(a)},c.prototype.sort=function(a){return this.options.get("sorter")(a)},c.prototype.highlightFirstItem=function(){var a=this.$results.find(".select2-results__option[aria-selected]"),b=a.filter("[aria-selected=true]");b.length>0?b.first().trigger("mouseenter"):a.first().trigger("mouseenter"),this.ensureHighlightVisible()},c.prototype.setClasses=function(){var c=this;this.data.current(function(d){var e=a.map(d,function(a){return a.id.toString()});c.$results.find(".select2-results__option[aria-selected]").each(function(){var c=a(this),d=b.GetData(this,"data"),f=""+d.id;null!=d.element&&d.element.selected||null==d.element&&a.inArray(f,e)>-1?c.attr("aria-selected","true"):c.attr("aria-selected","false")})})},c.prototype.showLoading=function(a){this.hideLoading();var b=this.options.get("translations").get("searching"),c={disabled:!0,loading:!0,text:b(a)},d=this.option(c);d.className+=" loading-results",this.$results.prepend(d)},c.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},c.prototype.option=function(c){var d=document.createElement("li");d.className="select2-results__option";var e={role:"treeitem","aria-selected":"false"};c.disabled&&(delete e["aria-selected"],e["aria-disabled"]="true"),null==c.id&&delete e["aria-selected"],null!=c._resultId&&(d.id=c._resultId),c.title&&(d.title=c.title),c.children&&(e.role="group",e["aria-label"]=c.text,delete e["aria-selected"]);for(var f in e){var g=e[f];d.setAttribute(f,g)}if(c.children){var h=a(d),i=document.createElement("strong");i.className="select2-results__group";a(i);this.template(c,i);for(var j=[],k=0;k<c.children.length;k++){var l=c.children[k],m=this.option(l);j.push(m)}var n=a("<ul></ul>",{class:"select2-results__options select2-results__options--nested"});n.append(j),h.append(i),h.append(n)}else this.template(c,d);return b.StoreData(d,"data",c),d},c.prototype.bind=function(c,d){var e=this,f=c.id+"-results";this.$results.attr("id",f),c.on("results:all",function(a){e.clear(),e.append(a.data),c.isOpen()&&(e.setClasses(),e.highlightFirstItem())}),c.on("results:append",function(a){e.append(a.data),c.isOpen()&&e.setClasses()}),c.on("query",function(a){e.hideMessages(),e.showLoading(a)}),c.on("select",function(){c.isOpen()&&(e.setClasses(),e.highlightFirstItem())}),c.on("unselect",function(){c.isOpen()&&(e.setClasses(),e.highlightFirstItem())}),c.on("open",function(){e.$results.attr("aria-expanded","true"),e.$results.attr("aria-hidden","false"),e.setClasses(),e.ensureHighlightVisible()}),c.on("close",function(){e.$results.attr("aria-expanded","false"),e.$results.attr("aria-hidden","true"),e.$results.removeAttr("aria-activedescendant")}),c.on("results:toggle",function(){var a=e.getHighlightedResults();0!==a.length&&a.trigger("mouseup")}),c.on("results:select",function(){var a=e.getHighlightedResults();if(0!==a.length){var c=b.GetData(a[0],"data");"true"==a.attr("aria-selected")?e.trigger("close",{}):e.trigger("select",{data:c})}}),c.on("results:previous",function(){var a=e.getHighlightedResults(),b=e.$results.find("[aria-selected]"),c=b.index(a);if(!(c<=0)){var d=c-1;0===a.length&&(d=0);var f=b.eq(d);f.trigger("mouseenter");var g=e.$results.offset().top,h=f.offset().top,i=e.$results.scrollTop()+(h-g);0===d?e.$results.scrollTop(0):h-g<0&&e.$results.scrollTop(i)}}),c.on("results:next",function(){var a=e.getHighlightedResults(),b=e.$results.find("[aria-selected]"),c=b.index(a),d=c+1;if(!(d>=b.length)){var f=b.eq(d);f.trigger("mouseenter");var g=e.$results.offset().top+e.$results.outerHeight(!1),h=f.offset().top+f.outerHeight(!1),i=e.$results.scrollTop()+h-g;0===d?e.$results.scrollTop(0):h>g&&e.$results.scrollTop(i)}}),c.on("results:focus",function(a){a.element.addClass("select2-results__option--highlighted")}),c.on("results:message",function(a){e.displayMessage(a)}),a.fn.mousewheel&&this.$results.on("mousewheel",function(a){var b=e.$results.scrollTop(),c=e.$results.get(0).scrollHeight-b+a.deltaY,d=a.deltaY>0&&b-a.deltaY<=0,f=a.deltaY<0&&c<=e.$results.height();d?(e.$results.scrollTop(0),a.preventDefault(),a.stopPropagation()):f&&(e.$results.scrollTop(e.$results.get(0).scrollHeight-e.$results.height()),a.preventDefault(),a.stopPropagation())}),this.$results.on("mouseup",".select2-results__option[aria-selected]",function(c){var d=a(this),f=b.GetData(this,"data");if("true"===d.attr("aria-selected"))return void(e.options.get("multiple")?e.trigger("unselect",{originalEvent:c,data:f}):e.trigger("close",{}));e.trigger("select",{originalEvent:c,data:f})}),this.$results.on("mouseenter",".select2-results__option[aria-selected]",function(c){var d=b.GetData(this,"data");e.getHighlightedResults().removeClass("select2-results__option--highlighted"),e.trigger("results:focus",{data:d,element:a(this)})})},c.prototype.getHighlightedResults=function(){return this.$results.find(".select2-results__option--highlighted")},c.prototype.destroy=function(){this.$results.remove()},c.prototype.ensureHighlightVisible=function(){var a=this.getHighlightedResults();if(0!==a.length){var b=this.$results.find("[aria-selected]"),c=b.index(a),d=this.$results.offset().top,e=a.offset().top,f=this.$results.scrollTop()+(e-d),g=e-d;f-=2*a.outerHeight(!1),c<=2?this.$results.scrollTop(0):(g>this.$results.outerHeight()||g<0)&&this.$results.scrollTop(f)}},c.prototype.template=function(b,c){var d=this.options.get("templateResult"),e=this.options.get("escapeMarkup"),f=d(b,c);null==f?c.style.display="none":"string"==typeof f?c.innerHTML=e(f):a(c).append(f)},c}),b.define("select2/keys",[],function(){return{BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46}}),b.define("select2/selection/base",["jquery","../utils","../keys"],function(a,b,c){function d(a,b){this.$element=a,this.options=b,d.__super__.constructor.call(this)}return b.Extend(d,b.Observable),d.prototype.render=function(){var c=a('<span class="select2-selection" role="combobox" aria-haspopup="true" aria-expanded="false"></span>');return this._tabindex=0,null!=b.GetData(this.$element[0],"old-tabindex")?this._tabindex=b.GetData(this.$element[0],"old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),c.attr("title",this.$element.attr("title")),c.attr("tabindex",this._tabindex),this.$selection=c,c},d.prototype.bind=function(a,b){var d=this,e=(a.id,a.id+"-results");this.container=a,this.$selection.on("focus",function(a){d.trigger("focus",a)}),this.$selection.on("blur",function(a){d._handleBlur(a)}),this.$selection.on("keydown",function(a){d.trigger("keypress",a),a.which===c.SPACE&&a.preventDefault()}),a.on("results:focus",function(a){d.$selection.attr("aria-activedescendant",a.data._resultId)}),a.on("selection:update",function(a){d.update(a.data)}),a.on("open",function(){d.$selection.attr("aria-expanded","true"),d.$selection.attr("aria-owns",e),d._attachCloseHandler(a)}),a.on("close",function(){d.$selection.attr("aria-expanded","false"),d.$selection.removeAttr("aria-activedescendant"),d.$selection.removeAttr("aria-owns"),d.$selection.focus(),window.setTimeout(function(){d.$selection.focus()},0),d._detachCloseHandler(a)}),a.on("enable",function(){d.$selection.attr("tabindex",d._tabindex)}),a.on("disable",function(){d.$selection.attr("tabindex","-1")})},d.prototype._handleBlur=function(b){var c=this;window.setTimeout(function(){document.activeElement==c.$selection[0]||a.contains(c.$selection[0],document.activeElement)||c.trigger("blur",b)},1)},d.prototype._attachCloseHandler=function(c){a(document.body).on("mousedown.select2."+c.id,function(c){var d=a(c.target),e=d.closest(".select2");a(".select2.select2-container--open").each(function(){a(this),this!=e[0]&&b.GetData(this,"element").select2("close")})})},d.prototype._detachCloseHandler=function(b){a(document.body).off("mousedown.select2."+b.id)},d.prototype.position=function(a,b){b.find(".selection").append(a)},d.prototype.destroy=function(){this._detachCloseHandler(this.container)},d.prototype.update=function(a){throw new Error("The `update` method must be defined in child classes.")},d}),b.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(a,b,c,d){function e(){e.__super__.constructor.apply(this,arguments)}return c.Extend(e,b),e.prototype.render=function(){var a=e.__super__.render.call(this);return a.addClass("select2-selection--single"),a.html('<span class="select2-selection__rendered"></span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span>'),a},e.prototype.bind=function(a,b){var c=this;e.__super__.bind.apply(this,arguments);var d=a.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",d).attr("role","textbox").attr("aria-readonly","true"),this.$selection.attr("aria-labelledby",d),this.$selection.on("mousedown",function(a){1===a.which&&c.trigger("toggle",{originalEvent:a})}),this.$selection.on("focus",function(a){}),this.$selection.on("blur",function(a){}),a.on("focus",function(b){a.isOpen()||c.$selection.focus()})},e.prototype.clear=function(){var a=this.$selection.find(".select2-selection__rendered");a.empty(),a.removeAttr("title")},e.prototype.display=function(a,b){var c=this.options.get("templateSelection");return this.options.get("escapeMarkup")(c(a,b))},e.prototype.selectionContainer=function(){return a("<span></span>")},e.prototype.update=function(a){if(0===a.length)return void this.clear();var b=a[0],c=this.$selection.find(".select2-selection__rendered"),d=this.display(b,c);c.empty().append(d),c.attr("title",b.title||b.text)},e}),b.define("select2/selection/multiple",["jquery","./base","../utils"],function(a,b,c){function d(a,b){d.__super__.constructor.apply(this,arguments)}return c.Extend(d,b),d.prototype.render=function(){var a=d.__super__.render.call(this);return a.addClass("select2-selection--multiple"),a.html('<ul class="select2-selection__rendered"></ul>'),a},d.prototype.bind=function(b,e){var f=this;d.__super__.bind.apply(this,arguments),this.$selection.on("click",function(a){f.trigger("toggle",{originalEvent:a})}),this.$selection.on("click",".select2-selection__choice__remove",function(b){if(!f.options.get("disabled")){var d=a(this),e=d.parent(),g=c.GetData(e[0],"data");f.trigger("unselect",{originalEvent:b,data:g})}})},d.prototype.clear=function(){var a=this.$selection.find(".select2-selection__rendered");a.empty(),a.removeAttr("title")},d.prototype.display=function(a,b){var c=this.options.get("templateSelection");return this.options.get("escapeMarkup")(c(a,b))},d.prototype.selectionContainer=function(){return a('<li class="select2-selection__choice"><span class="select2-selection__choice__remove" role="presentation">×</span></li>')},d.prototype.update=function(a){if(this.clear(),0!==a.length){for(var b=[],d=0;d<a.length;d++){var e=a[d],f=this.selectionContainer(),g=this.display(e,f);f.append(g),f.attr("title",e.title||e.text),c.StoreData(f[0],"data",e),b.push(f)}var h=this.$selection.find(".select2-selection__rendered");c.appendMany(h,b)}},d}),b.define("select2/selection/placeholder",["../utils"],function(a){function b(a,b,c){this.placeholder=this.normalizePlaceholder(c.get("placeholder")),a.call(this,b,c)}return b.prototype.normalizePlaceholder=function(a,b){return"string"==typeof b&&(b={id:"",text:b}),b},b.prototype.createPlaceholder=function(a,b){var c=this.selectionContainer();return c.html(this.display(b)),c.addClass("select2-selection__placeholder").removeClass("select2-selection__choice"),c},b.prototype.update=function(a,b){var c=1==b.length&&b[0].id!=this.placeholder.id;if(b.length>1||c)return a.call(this,b);this.clear();var d=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(d)},b}),b.define("select2/selection/allowClear",["jquery","../keys","../utils"],function(a,b,c){function d(){}return d.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".select2-selection__clear",function(a){d._handleClear(a)}),b.on("keypress",function(a){d._handleKeyboardClear(a,b)})},d.prototype._handleClear=function(a,b){if(!this.options.get("disabled")){var d=this.$selection.find(".select2-selection__clear");if(0!==d.length){b.stopPropagation();var e=c.GetData(d[0],"data"),f=this.$element.val();this.$element.val(this.placeholder.id);var g={data:e};if(this.trigger("clear",g),g.prevented)return void this.$element.val(f);for(var h=0;h<e.length;h++)if(g={data:e[h]},this.trigger("unselect",g),g.prevented)return void this.$element.val(f);this.$element.trigger("change"),this.trigger("toggle",{})}}},d.prototype._handleKeyboardClear=function(a,c,d){d.isOpen()||c.which!=b.DELETE&&c.which!=b.BACKSPACE||this._handleClear(c)},d.prototype.update=function(b,d){if(b.call(this,d),!(this.$selection.find(".select2-selection__placeholder").length>0||0===d.length)){var e=a('<span class="select2-selection__clear">×</span>');c.StoreData(e[0],"data",d),this.$selection.find(".select2-selection__rendered").prepend(e)}},d}),b.define("select2/selection/search",["jquery","../utils","../keys"],function(a,b,c){function d(a,b,c){a.call(this,b,c)}return d.prototype.render=function(b){var c=a('<li class="select2-search select2-search--inline"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="none" spellcheck="false" role="textbox" aria-autocomplete="list" /></li>');this.$searchContainer=c,this.$search=c.find("input");var d=b.call(this);return this._transferTabIndex(),d},d.prototype.bind=function(a,d,e){var f=this;a.call(this,d,e),d.on("open",function(){f.$search.trigger("focus")}),d.on("close",function(){f.$search.val(""),f.$search.removeAttr("aria-activedescendant"),f.$search.trigger("focus")}),d.on("enable",function(){f.$search.prop("disabled",!1),f._transferTabIndex()}),d.on("disable",function(){f.$search.prop("disabled",!0)}),d.on("focus",function(a){f.$search.trigger("focus")}),d.on("results:focus",function(a){f.$search.attr("aria-activedescendant",a.id)}),this.$selection.on("focusin",".select2-search--inline",function(a){f.trigger("focus",a)}),this.$selection.on("focusout",".select2-search--inline",function(a){f._handleBlur(a)}),this.$selection.on("keydown",".select2-search--inline",function(a){if(a.stopPropagation(),f.trigger("keypress",a),f._keyUpPrevented=a.isDefaultPrevented(),a.which===c.BACKSPACE&&""===f.$search.val()){var d=f.$searchContainer.prev(".select2-selection__choice");if(d.length>0){var e=b.GetData(d[0],"data");f.searchRemoveChoice(e),a.preventDefault()}}});var g=document.documentMode,h=g&&g<=11;this.$selection.on("input.searchcheck",".select2-search--inline",function(a){if(h)return void f.$selection.off("input.search input.searchcheck");f.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".select2-search--inline",function(a){if(h&&"input"===a.type)return void f.$selection.off("input.search input.searchcheck");var b=a.which;b!=c.SHIFT&&b!=c.CTRL&&b!=c.ALT&&b!=c.TAB&&f.handleSearch(a)})},d.prototype._transferTabIndex=function(a){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},d.prototype.createPlaceholder=function(a,b){this.$search.attr("placeholder",b.text)},d.prototype.update=function(a,b){var c=this.$search[0]==document.activeElement;if(this.$search.attr("placeholder",""),a.call(this,b),this.$selection.find(".select2-selection__rendered").append(this.$searchContainer),this.resizeSearch(),c){this.$element.find("[data-select2-tag]").length?this.$element.focus():this.$search.focus()}},d.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var a=this.$search.val();this.trigger("query",{term:a})}this._keyUpPrevented=!1},d.prototype.searchRemoveChoice=function(a,b){this.trigger("unselect",{data:b}),this.$search.val(b.text),this.handleSearch()},d.prototype.resizeSearch=function(){this.$search.css("width","25px");var a="";if(""!==this.$search.attr("placeholder"))a=this.$selection.find(".select2-selection__rendered").innerWidth();else{a=.75*(this.$search.val().length+1)+"em"}this.$search.css("width",a)},d}),b.define("select2/selection/eventRelay",["jquery"],function(a){function b(){}return b.prototype.bind=function(b,c,d){var e=this,f=["open","opening","close","closing","select","selecting","unselect","unselecting","clear","clearing"],g=["opening","closing","selecting","unselecting","clearing"];b.call(this,c,d),c.on("*",function(b,c){if(-1!==a.inArray(b,f)){c=c||{};var d=a.Event("select2:"+b,{params:c});e.$element.trigger(d),-1!==a.inArray(b,g)&&(c.prevented=d.isDefaultPrevented())}})},b}),b.define("select2/translation",["jquery","require"],function(a,b){function c(a){this.dict=a||{}}return c.prototype.all=function(){return this.dict},c.prototype.get=function(a){return this.dict[a]},c.prototype.extend=function(b){this.dict=a.extend({},b.all(),this.dict)},c._cache={},c.loadPath=function(a){if(!(a in c._cache)){var d=b(a);c._cache[a]=d}return new c(c._cache[a])},c}),b.define("select2/diacritics",[],function(){return{"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"}}),b.define("select2/data/base",["../utils"],function(a){function b(a,c){b.__super__.constructor.call(this)}return a.Extend(b,a.Observable),b.prototype.current=function(a){throw new Error("The `current` method must be defined in child classes.")},b.prototype.query=function(a,b){throw new Error("The `query` method must be defined in child classes.")},b.prototype.bind=function(a,b){},b.prototype.destroy=function(){},b.prototype.generateResultId=function(b,c){var d=b.id+"-result-";return d+=a.generateChars(4),null!=c.id?d+="-"+c.id.toString():d+="-"+a.generateChars(4),d},b}),b.define("select2/data/select",["./base","../utils","jquery"],function(a,b,c){function d(a,b){this.$element=a,this.options=b,d.__super__.constructor.call(this)}return b.Extend(d,a),d.prototype.current=function(a){var b=[],d=this;this.$element.find(":selected").each(function(){var a=c(this),e=d.item(a);b.push(e)}),a(b)},d.prototype.select=function(a){var b=this;if(a.selected=!0,c(a.element).is("option"))return a.element.selected=!0,void this.$element.trigger("change");if(this.$element.prop("multiple"))this.current(function(d){var e=[];a=[a],a.push.apply(a,d);for(var f=0;f<a.length;f++){var g=a[f].id;-1===c.inArray(g,e)&&e.push(g)}b.$element.val(e),b.$element.trigger("change")});else{var d=a.id;this.$element.val(d),this.$element.trigger("change")}},d.prototype.unselect=function(a){var b=this;if(this.$element.prop("multiple")){if(a.selected=!1,c(a.element).is("option"))return a.element.selected=!1,void this.$element.trigger("change");this.current(function(d){for(var e=[],f=0;f<d.length;f++){var g=d[f].id;g!==a.id&&-1===c.inArray(g,e)&&e.push(g)}b.$element.val(e),b.$element.trigger("change")})}},d.prototype.bind=function(a,b){var c=this;this.container=a,a.on("select",function(a){c.select(a.data)}),a.on("unselect",function(a){c.unselect(a.data)})},d.prototype.destroy=function(){this.$element.find("*").each(function(){b.RemoveData(this)})},d.prototype.query=function(a,b){var d=[],e=this;this.$element.children().each(function(){var b=c(this);if(b.is("option")||b.is("optgroup")){var f=e.item(b),g=e.matches(a,f);null!==g&&d.push(g)}}),b({results:d})},d.prototype.addOptions=function(a){b.appendMany(this.$element,a)},d.prototype.option=function(a){var d;a.children?(d=document.createElement("optgroup"),d.label=a.text):(d=document.createElement("option"),void 0!==d.textContent?d.textContent=a.text:d.innerText=a.text),void 0!==a.id&&(d.value=a.id),a.disabled&&(d.disabled=!0),a.selected&&(d.selected=!0),a.title&&(d.title=a.title);var e=c(d),f=this._normalizeItem(a);return f.element=d,b.StoreData(d,"data",f),e},d.prototype.item=function(a){var d={};if(null!=(d=b.GetData(a[0],"data")))return d;if(a.is("option"))d={id:a.val(),text:a.text(),disabled:a.prop("disabled"),selected:a.prop("selected"),title:a.prop("title")};else if(a.is("optgroup")){d={text:a.prop("label"),children:[],title:a.prop("title")};for(var e=a.children("option"),f=[],g=0;g<e.length;g++){var h=c(e[g]),i=this.item(h);f.push(i)}d.children=f}return d=this._normalizeItem(d),d.element=a[0],b.StoreData(a[0],"data",d),d},d.prototype._normalizeItem=function(a){a!==Object(a)&&(a={id:a,text:a}),a=c.extend({},{text:""},a);var b={selected:!1,disabled:!1};return null!=a.id&&(a.id=a.id.toString()),null!=a.text&&(a.text=a.text.toString()),null==a._resultId&&a.id&&null!=this.container&&(a._resultId=this.generateResultId(this.container,a)),c.extend({},b,a)},d.prototype.matches=function(a,b){return this.options.get("matcher")(a,b)},d}),b.define("select2/data/array",["./select","../utils","jquery"],function(a,b,c){function d(a,b){var c=b.get("data")||[];d.__super__.constructor.call(this,a,b),this.addOptions(this.convertToOptions(c))}return b.Extend(d,a),d.prototype.select=function(a){var b=this.$element.find("option").filter(function(b,c){return c.value==a.id.toString()});0===b.length&&(b=this.option(a),this.addOptions(b)),d.__super__.select.call(this,a)},d.prototype.convertToOptions=function(a){function d(a){return function(){return c(this).val()==a.id}}for(var e=this,f=this.$element.find("option"),g=f.map(function(){return e.item(c(this)).id}).get(),h=[],i=0;i<a.length;i++){var j=this._normalizeItem(a[i]);if(c.inArray(j.id,g)>=0){var k=f.filter(d(j)),l=this.item(k),m=c.extend(!0,{},j,l),n=this.option(m);k.replaceWith(n)}else{var o=this.option(j);if(j.children){var p=this.convertToOptions(j.children);b.appendMany(o,p)}h.push(o)}}return h},d}),b.define("select2/data/ajax",["./array","../utils","jquery"],function(a,b,c){function d(a,b){this.ajaxOptions=this._applyDefaults(b.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),d.__super__.constructor.call(this,a,b)}return b.Extend(d,a),d.prototype._applyDefaults=function(a){var b={data:function(a){return c.extend({},a,{q:a.term})},transport:function(a,b,d){var e=c.ajax(a);return e.then(b),e.fail(d),e}};return c.extend({},b,a,!0)},d.prototype.processResults=function(a){return a},d.prototype.query=function(a,b){function d(){var d=f.transport(f,function(d){var f=e.processResults(d,a);e.options.get("debug")&&window.console&&console.error&&(f&&f.results&&c.isArray(f.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),b(f)},function(){"status"in d&&(0===d.status||"0"===d.status)||e.trigger("results:message",{message:"errorLoading"})});e._request=d}var e=this;null!=this._request&&(c.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var f=c.extend({type:"GET"},this.ajaxOptions);"function"==typeof f.url&&(f.url=f.url.call(this.$element,a)),"function"==typeof f.data&&(f.data=f.data.call(this.$element,a)),this.ajaxOptions.delay&&null!=a.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(d,this.ajaxOptions.delay)):d()},d}),b.define("select2/data/tags",["jquery"],function(a){function b(b,c,d){var e=d.get("tags"),f=d.get("createTag");void 0!==f&&(this.createTag=f);var g=d.get("insertTag");if(void 0!==g&&(this.insertTag=g),b.call(this,c,d),a.isArray(e))for(var h=0;h<e.length;h++){var i=e[h],j=this._normalizeItem(i),k=this.option(j);this.$element.append(k)}}return b.prototype.query=function(a,b,c){function d(a,f){for(var g=a.results,h=0;h<g.length;h++){var i=g[h],j=null!=i.children&&!d({results:i.children},!0);if((i.text||"").toUpperCase()===(b.term||"").toUpperCase()||j)return!f&&(a.data=g,void c(a))}if(f)return!0;var k=e.createTag(b);if(null!=k){var l=e.option(k);l.attr("data-select2-tag",!0),e.addOptions([l]),e.insertTag(g,k)}a.results=g,c(a)}var e=this;if(this._removeOldTags(),null==b.term||null!=b.page)return void a.call(this,b,c);a.call(this,b,d)},b.prototype.createTag=function(b,c){var d=a.trim(c.term);return""===d?null:{id:d,text:d}},b.prototype.insertTag=function(a,b,c){b.unshift(c)},b.prototype._removeOldTags=function(b){this._lastTag;this.$element.find("option[data-select2-tag]").each(function(){this.selected||a(this).remove()})},b}),b.define("select2/data/tokenizer",["jquery"],function(a){function b(a,b,c){var d=c.get("tokenizer");void 0!==d&&(this.tokenizer=d),a.call(this,b,c)}return b.prototype.bind=function(a,b,c){a.call(this,b,c),this.$search=b.dropdown.$search||b.selection.$search||c.find(".select2-search__field")},b.prototype.query=function(b,c,d){function e(b){var c=g._normalizeItem(b);if(!g.$element.find("option").filter(function(){return a(this).val()===c.id}).length){var d=g.option(c);d.attr("data-select2-tag",!0),g._removeOldTags(),g.addOptions([d])}f(c)}function f(a){g.trigger("select",{data:a})}var g=this;c.term=c.term||"";var h=this.tokenizer(c,this.options,e);h.term!==c.term&&(this.$search.length&&(this.$search.val(h.term),this.$search.focus()),c.term=h.term),b.call(this,c,d)},b.prototype.tokenizer=function(b,c,d,e){for(var f=d.get("tokenSeparators")||[],g=c.term,h=0,i=this.createTag||function(a){return{id:a.term,text:a.term}};h<g.length;){var j=g[h];if(-1!==a.inArray(j,f)){var k=g.substr(0,h),l=a.extend({},c,{term:k}),m=i(l);null!=m?(e(m),g=g.substr(h+1)||"",h=0):h++}else h++}return{term:g}},b}),b.define("select2/data/minimumInputLength",[],function(){function a(a,b,c){this.minimumInputLength=c.get("minimumInputLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){if(b.term=b.term||"",b.term.length<this.minimumInputLength)return void this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:b.term,params:b}});a.call(this,b,c)},a}),b.define("select2/data/maximumInputLength",[],function(){function a(a,b,c){this.maximumInputLength=c.get("maximumInputLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){if(b.term=b.term||"",this.maximumInputLength>0&&b.term.length>this.maximumInputLength)return void this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:b.term,params:b}});a.call(this,b,c)},a}),b.define("select2/data/maximumSelectionLength",[],function(){function a(a,b,c){this.maximumSelectionLength=c.get("maximumSelectionLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){var d=this;this.current(function(e){var f=null!=e?e.length:0;if(d.maximumSelectionLength>0&&f>=d.maximumSelectionLength)return void d.trigger("results:message",{message:"maximumSelected",args:{maximum:d.maximumSelectionLength}});a.call(d,b,c)})},a}),b.define("select2/dropdown",["jquery","./utils"],function(a,b){function c(a,b){this.$element=a,this.options=b,c.__super__.constructor.call(this)}return b.Extend(c,b.Observable),c.prototype.render=function(){var b=a('<span class="select2-dropdown"><span class="select2-results"></span></span>');return b.attr("dir",this.options.get("dir")),this.$dropdown=b,b},c.prototype.bind=function(){},c.prototype.position=function(a,b){},c.prototype.destroy=function(){this.$dropdown.remove()},c}),b.define("select2/dropdown/search",["jquery","../utils"],function(a,b){function c(){}return c.prototype.render=function(b){var c=b.call(this),d=a('<span class="select2-search select2-search--dropdown"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="none" spellcheck="false" role="textbox" /></span>');return this.$searchContainer=d,this.$search=d.find("input"),c.prepend(d),c},c.prototype.bind=function(b,c,d){var e=this;b.call(this,c,d),this.$search.on("keydown",function(a){e.trigger("keypress",a),e._keyUpPrevented=a.isDefaultPrevented()}),this.$search.on("input",function(b){a(this).off("keyup")}),this.$search.on("keyup input",function(a){e.handleSearch(a)}),c.on("open",function(){e.$search.attr("tabindex",0),e.$search.focus(),window.setTimeout(function(){e.$search.focus()},0)}),c.on("close",function(){e.$search.attr("tabindex",-1),e.$search.val(""),e.$search.blur()}),c.on("focus",function(){c.isOpen()||e.$search.focus()}),c.on("results:all",function(a){if(null==a.query.term||""===a.query.term){e.showSearch(a)?e.$searchContainer.removeClass("select2-search--hide"):e.$searchContainer.addClass("select2-search--hide")}})},c.prototype.handleSearch=function(a){if(!this._keyUpPrevented){var b=this.$search.val();this.trigger("query",{term:b})}this._keyUpPrevented=!1},c.prototype.showSearch=function(a,b){return!0},c}),b.define("select2/dropdown/hidePlaceholder",[],function(){function a(a,b,c,d){this.placeholder=this.normalizePlaceholder(c.get("placeholder")),a.call(this,b,c,d)}return a.prototype.append=function(a,b){b.results=this.removePlaceholder(b.results),a.call(this,b)},a.prototype.normalizePlaceholder=function(a,b){return"string"==typeof b&&(b={id:"",text:b}),b},a.prototype.removePlaceholder=function(a,b){for(var c=b.slice(0),d=b.length-1;d>=0;d--){var e=b[d];this.placeholder.id===e.id&&c.splice(d,1)}return c},a}),b.define("select2/dropdown/infiniteScroll",["jquery"],function(a){function b(a,b,c,d){this.lastParams={},a.call(this,b,c,d),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return b.prototype.append=function(a,b){this.$loadingMore.remove(),this.loading=!1,a.call(this,b),this.showLoadingMore(b)&&this.$results.append(this.$loadingMore)},b.prototype.bind=function(b,c,d){var e=this;b.call(this,c,d),c.on("query",function(a){e.lastParams=a,e.loading=!0}),c.on("query:append",function(a){e.lastParams=a,e.loading=!0}),this.$results.on("scroll",function(){var b=a.contains(document.documentElement,e.$loadingMore[0]);if(!e.loading&&b){e.$results.offset().top+e.$results.outerHeight(!1)+50>=e.$loadingMore.offset().top+e.$loadingMore.outerHeight(!1)&&e.loadMore()}})},b.prototype.loadMore=function(){this.loading=!0;var b=a.extend({},{page:1},this.lastParams);b.page++,this.trigger("query:append",b)},b.prototype.showLoadingMore=function(a,b){return b.pagination&&b.pagination.more},b.prototype.createLoadingMore=function(){var b=a('<li class="select2-results__option select2-results__option--load-more"role="treeitem" aria-disabled="true"></li>'),c=this.options.get("translations").get("loadingMore");return b.html(c(this.lastParams)),b},b}),b.define("select2/dropdown/attachBody",["jquery","../utils"],function(a,b){function c(b,c,d){this.$dropdownParent=d.get("dropdownParent")||a(document.body),b.call(this,c,d)}return c.prototype.bind=function(a,b,c){var d=this,e=!1;a.call(this,b,c),b.on("open",function(){d._showDropdown(),d._attachPositioningHandler(b),e||(e=!0,b.on("results:all",function(){d._positionDropdown(),d._resizeDropdown()}),b.on("results:append",function(){d._positionDropdown(),d._resizeDropdown()}))}),b.on("close",function(){d._hideDropdown(),d._detachPositioningHandler(b)}),this.$dropdownContainer.on("mousedown",function(a){a.stopPropagation()})},c.prototype.destroy=function(a){a.call(this),this.$dropdownContainer.remove()},c.prototype.position=function(a,b,c){b.attr("class",c.attr("class")),b.removeClass("select2"),b.addClass("select2-container--open"),b.css({position:"absolute",top:-999999}),this.$container=c},c.prototype.render=function(b){var c=a("<span></span>"),d=b.call(this);return c.append(d),this.$dropdownContainer=c,c},c.prototype._hideDropdown=function(a){this.$dropdownContainer.detach()},c.prototype._attachPositioningHandler=function(c,d){var e=this,f="scroll.select2."+d.id,g="resize.select2."+d.id,h="orientationchange.select2."+d.id,i=this.$container.parents().filter(b.hasScroll);i.each(function(){b.StoreData(this,"select2-scroll-position",{x:a(this).scrollLeft(),y:a(this).scrollTop()})}),i.on(f,function(c){var d=b.GetData(this,"select2-scroll-position");a(this).scrollTop(d.y)}),a(window).on(f+" "+g+" "+h,function(a){e._positionDropdown(),e._resizeDropdown()})},c.prototype._detachPositioningHandler=function(c,d){var e="scroll.select2."+d.id,f="resize.select2."+d.id,g="orientationchange.select2."+d.id;this.$container.parents().filter(b.hasScroll).off(e),a(window).off(e+" "+f+" "+g)},c.prototype._positionDropdown=function(){var b=a(window),c=this.$dropdown.hasClass("select2-dropdown--above"),d=this.$dropdown.hasClass("select2-dropdown--below"),e=null,f=this.$container.offset();f.bottom=f.top+this.$container.outerHeight(!1);var g={height:this.$container.outerHeight(!1)};g.top=f.top,g.bottom=f.top+g.height;var h={height:this.$dropdown.outerHeight(!1)},i={top:b.scrollTop(),bottom:b.scrollTop()+b.height()},j=i.top<f.top-h.height,k=i.bottom>f.bottom+h.height,l={left:f.left,top:g.bottom},m=this.$dropdownParent;"static"===m.css("position")&&(m=m.offsetParent());var n=m.offset();l.top-=n.top,l.left-=n.left,c||d||(e="below"),k||!j||c?!j&&k&&c&&(e="below"):e="above",("above"==e||c&&"below"!==e)&&(l.top=g.top-n.top-h.height),null!=e&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+e),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+e)),this.$dropdownContainer.css(l)},c.prototype._resizeDropdown=function(){var a={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(a.minWidth=a.width,a.position="relative",a.width="auto"),this.$dropdown.css(a)},c.prototype._showDropdown=function(a){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},c}),b.define("select2/dropdown/minimumResultsForSearch",[],function(){function a(b){for(var c=0,d=0;d<b.length;d++){var e=b[d];e.children?c+=a(e.children):c++}return c}function b(a,b,c,d){this.minimumResultsForSearch=c.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),a.call(this,b,c,d)}return b.prototype.showSearch=function(b,c){return!(a(c.data.results)<this.minimumResultsForSearch)&&b.call(this,c)},b}),b.define("select2/dropdown/selectOnClose",["../utils"],function(a){function b(){}return b.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),b.on("close",function(a){d._handleSelectOnClose(a)})},b.prototype._handleSelectOnClose=function(b,c){if(c&&null!=c.originalSelect2Event){var d=c.originalSelect2Event;if("select"===d._type||"unselect"===d._type)return}var e=this.getHighlightedResults();if(!(e.length<1)){var f=a.GetData(e[0],"data");null!=f.element&&f.element.selected||null==f.element&&f.selected||this.trigger("select",{data:f})}},b}),b.define("select2/dropdown/closeOnSelect",[],function(){function a(){}return a.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),b.on("select",function(a){d._selectTriggered(a)}),b.on("unselect",function(a){d._selectTriggered(a)})},a.prototype._selectTriggered=function(a,b){var c=b.originalEvent;c&&c.ctrlKey||this.trigger("close",{originalEvent:c,originalSelect2Event:b})},a}),b.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(a){var b=a.input.length-a.maximum,c="Please delete "+b+" character";return 1!=b&&(c+="s"),c},inputTooShort:function(a){return"Please enter "+(a.minimum-a.input.length)+" or more characters"},loadingMore:function(){return"Loading more results…"},maximumSelected:function(a){var b="You can only select "+a.maximum+" item";return 1!=a.maximum&&(b+="s"),b},noResults:function(){return"No results found"},searching:function(){return"Searching…"}}}),b.define("select2/defaults",["jquery","require","./results","./selection/single","./selection/multiple","./selection/placeholder","./selection/allowClear","./selection/search","./selection/eventRelay","./utils","./translation","./diacritics","./data/select","./data/array","./data/ajax","./data/tags","./data/tokenizer","./data/minimumInputLength","./data/maximumInputLength","./data/maximumSelectionLength","./dropdown","./dropdown/search","./dropdown/hidePlaceholder","./dropdown/infiniteScroll","./dropdown/attachBody","./dropdown/minimumResultsForSearch","./dropdown/selectOnClose","./dropdown/closeOnSelect","./i18n/en"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C){function D(){this.reset()}return D.prototype.apply=function(l){if(l=a.extend(!0,{},this.defaults,l),null==l.dataAdapter){if(null!=l.ajax?l.dataAdapter=o:null!=l.data?l.dataAdapter=n:l.dataAdapter=m,l.minimumInputLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,r)),l.maximumInputLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,s)),l.maximumSelectionLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,t)),l.tags&&(l.dataAdapter=j.Decorate(l.dataAdapter,p)),null==l.tokenSeparators&&null==l.tokenizer||(l.dataAdapter=j.Decorate(l.dataAdapter,q)),null!=l.query){var C=b(l.amdBase+"compat/query");l.dataAdapter=j.Decorate(l.dataAdapter,C)}if(null!=l.initSelection){var D=b(l.amdBase+"compat/initSelection");l.dataAdapter=j.Decorate(l.dataAdapter,D)}}if(null==l.resultsAdapter&&(l.resultsAdapter=c,null!=l.ajax&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,x)),null!=l.placeholder&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,w)),l.selectOnClose&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,A))),null==l.dropdownAdapter){if(l.multiple)l.dropdownAdapter=u;else{var E=j.Decorate(u,v);l.dropdownAdapter=E}if(0!==l.minimumResultsForSearch&&(l.dropdownAdapter=j.Decorate(l.dropdownAdapter,z)),l.closeOnSelect&&(l.dropdownAdapter=j.Decorate(l.dropdownAdapter,B)),null!=l.dropdownCssClass||null!=l.dropdownCss||null!=l.adaptDropdownCssClass){var F=b(l.amdBase+"compat/dropdownCss");l.dropdownAdapter=j.Decorate(l.dropdownAdapter,F)}l.dropdownAdapter=j.Decorate(l.dropdownAdapter,y)}if(null==l.selectionAdapter){if(l.multiple?l.selectionAdapter=e:l.selectionAdapter=d,null!=l.placeholder&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,f)),l.allowClear&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,g)),l.multiple&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,h)),null!=l.containerCssClass||null!=l.containerCss||null!=l.adaptContainerCssClass){var G=b(l.amdBase+"compat/containerCss");l.selectionAdapter=j.Decorate(l.selectionAdapter,G)}l.selectionAdapter=j.Decorate(l.selectionAdapter,i)}if("string"==typeof l.language)if(l.language.indexOf("-")>0){var H=l.language.split("-"),I=H[0];l.language=[l.language,I]}else l.language=[l.language];if(a.isArray(l.language)){var J=new k;l.language.push("en");for(var K=l.language,L=0;L<K.length;L++){var M=K[L],N={};try{N=k.loadPath(M)}catch(a){try{M=this.defaults.amdLanguageBase+M,N=k.loadPath(M)}catch(a){l.debug&&window.console&&console.warn&&console.warn('Select2: The language file for "'+M+'" could not be automatically loaded. A fallback will be used instead.');continue}}J.extend(N)}l.translations=J}else{var O=k.loadPath(this.defaults.amdLanguageBase+"en"),P=new k(l.language);P.extend(O),l.translations=P}return l},D.prototype.reset=function(){function b(a){function b(a){return l[a]||a}return a.replace(/[^\u0000-\u007E]/g,b)}function c(d,e){if(""===a.trim(d.term))return e;if(e.children&&e.children.length>0){for(var f=a.extend(!0,{},e),g=e.children.length-1;g>=0;g--){null==c(d,e.children[g])&&f.children.splice(g,1)}return f.children.length>0?f:c(d,f)}var h=b(e.text).toUpperCase(),i=b(d.term).toUpperCase();return h.indexOf(i)>-1?e:null}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:j.escapeMarkup,language:C,matcher:c,minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,sorter:function(a){return a},templateResult:function(a){return a.text},templateSelection:function(a){return a.text},theme:"default",width:"resolve"}},D.prototype.set=function(b,c){var d=a.camelCase(b),e={};e[d]=c;var f=j._convertData(e);a.extend(!0,this.defaults,f)},new D}),b.define("select2/options",["require","jquery","./defaults","./utils"],function(a,b,c,d){function e(b,e){if(this.options=b,null!=e&&this.fromElement(e),this.options=c.apply(this.options),e&&e.is("input")){var f=a(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=d.Decorate(this.options.dataAdapter,f)}}return e.prototype.fromElement=function(a){var c=["select2"];null==this.options.multiple&&(this.options.multiple=a.prop("multiple")),null==this.options.disabled&&(this.options.disabled=a.prop("disabled")),null==this.options.language&&(a.prop("lang")?this.options.language=a.prop("lang").toLowerCase():a.closest("[lang]").prop("lang")&&(this.options.language=a.closest("[lang]").prop("lang"))),null==this.options.dir&&(a.prop("dir")?this.options.dir=a.prop("dir"):a.closest("[dir]").prop("dir")?this.options.dir=a.closest("[dir]").prop("dir"):this.options.dir="ltr"),a.prop("disabled",this.options.disabled),a.prop("multiple",this.options.multiple),d.GetData(a[0],"select2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'),d.StoreData(a[0],"data",d.GetData(a[0],"select2Tags")),d.StoreData(a[0],"tags",!0)),d.GetData(a[0],"ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."),a.attr("ajax--url",d.GetData(a[0],"ajaxUrl")),d.StoreData(a[0],"ajax-Url",d.GetData(a[0],"ajaxUrl")));var e={};e=b.fn.jquery&&"1."==b.fn.jquery.substr(0,2)&&a[0].dataset?b.extend(!0,{},a[0].dataset,d.GetData(a[0])):d.GetData(a[0]);var f=b.extend(!0,{},e);f=d._convertData(f);for(var g in f)b.inArray(g,c)>-1||(b.isPlainObject(this.options[g])?b.extend(this.options[g],f[g]):this.options[g]=f[g]);return this},e.prototype.get=function(a){return this.options[a]},e.prototype.set=function(a,b){this.options[a]=b},e}),b.define("select2/core",["jquery","./options","./utils","./keys"],function(a,b,c,d){var e=function(a,d){null!=c.GetData(a[0],"select2")&&c.GetData(a[0],"select2").destroy(),this.$element=a,this.id=this._generateId(a),d=d||{},this.options=new b(d,a),e.__super__.constructor.call(this);var f=a.attr("tabindex")||0;c.StoreData(a[0],"old-tabindex",f),a.attr("tabindex","-1");var g=this.options.get("dataAdapter");this.dataAdapter=new g(a,this.options);var h=this.render();this._placeContainer(h);var i=this.options.get("selectionAdapter");this.selection=new i(a,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,h);var j=this.options.get("dropdownAdapter");this.dropdown=new j(a,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,h);var k=this.options.get("resultsAdapter");this.results=new k(a,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var l=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(a){l.trigger("selection:update",{data:a})}),a.addClass("select2-hidden-accessible"),a.attr("aria-hidden","true"),this._syncAttributes(),c.StoreData(a[0],"select2",this),a.data("select2",this)};return c.Extend(e,c.Observable),e.prototype._generateId=function(a){var b="";return b=null!=a.attr("id")?a.attr("id"):null!=a.attr("name")?a.attr("name")+"-"+c.generateChars(2):c.generateChars(4),b=b.replace(/(:|\.|\[|\]|,)/g,""),b="select2-"+b},e.prototype._placeContainer=function(a){a.insertAfter(this.$element);var b=this._resolveWidth(this.$element,this.options.get("width"));null!=b&&a.css("width",b)},e.prototype._resolveWidth=function(a,b){var c=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==b){var d=this._resolveWidth(a,"style");return null!=d?d:this._resolveWidth(a,"element")}if("element"==b){var e=a.outerWidth(!1);return e<=0?"auto":e+"px"}if("style"==b){var f=a.attr("style");if("string"!=typeof f)return null;for(var g=f.split(";"),h=0,i=g.length;h<i;h+=1){var j=g[h].replace(/\s/g,""),k=j.match(c);if(null!==k&&k.length>=1)return k[1]}return null}return b},e.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},e.prototype._registerDomEvents=function(){var b=this;this.$element.on("change.select2",function(){b.dataAdapter.current(function(a){b.trigger("selection:update",{data:a})})}),this.$element.on("focus.select2",function(a){b.trigger("focus",a)}),this._syncA=c.bind(this._syncAttributes,this),this._syncS=c.bind(this._syncSubtree,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._syncA);var d=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=d?(this._observer=new d(function(c){a.each(c,b._syncA),a.each(c,b._syncS)}),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})):this.$element[0].addEventListener&&(this.$element[0].addEventListener("DOMAttrModified",b._syncA,!1),this.$element[0].addEventListener("DOMNodeInserted",b._syncS,!1),this.$element[0].addEventListener("DOMNodeRemoved",b._syncS,!1))},e.prototype._registerDataEvents=function(){var a=this;this.dataAdapter.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerSelectionEvents=function(){var b=this,c=["toggle","focus"];this.selection.on("toggle",function(){b.toggleDropdown()}),this.selection.on("focus",function(a){b.focus(a)}),this.selection.on("*",function(d,e){-1===a.inArray(d,c)&&b.trigger(d,e)})},e.prototype._registerDropdownEvents=function(){var a=this;this.dropdown.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerResultsEvents=function(){var a=this;this.results.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerEvents=function(){var a=this;this.on("open",function(){a.$container.addClass("select2-container--open")}),this.on("close",function(){a.$container.removeClass("select2-container--open")}),this.on("enable",function(){a.$container.removeClass("select2-container--disabled")}),this.on("disable",function(){a.$container.addClass("select2-container--disabled")}),this.on("blur",function(){a.$container.removeClass("select2-container--focus")}),this.on("query",function(b){a.isOpen()||a.trigger("open",{}),this.dataAdapter.query(b,function(c){a.trigger("results:all",{data:c,query:b})})}),this.on("query:append",function(b){this.dataAdapter.query(b,function(c){a.trigger("results:append",{data:c,query:b})})}),this.on("keypress",function(b){var c=b.which;a.isOpen()?c===d.ESC||c===d.TAB||c===d.UP&&b.altKey?(a.close(),b.preventDefault()):c===d.ENTER?(a.trigger("results:select",{}),b.preventDefault()):c===d.SPACE&&b.ctrlKey?(a.trigger("results:toggle",{}),b.preventDefault()):c===d.UP?(a.trigger("results:previous",{}),b.preventDefault()):c===d.DOWN&&(a.trigger("results:next",{}),b.preventDefault()):(c===d.ENTER||c===d.SPACE||c===d.DOWN&&b.altKey)&&(a.open(),b.preventDefault())})},e.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.options.get("disabled")?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},e.prototype._syncSubtree=function(a,b){var c=!1,d=this;if(!a||!a.target||"OPTION"===a.target.nodeName||"OPTGROUP"===a.target.nodeName){if(b)if(b.addedNodes&&b.addedNodes.length>0)for(var e=0;e<b.addedNodes.length;e++){var f=b.addedNodes[e];f.selected&&(c=!0)}else b.removedNodes&&b.removedNodes.length>0&&(c=!0);else c=!0;c&&this.dataAdapter.current(function(a){d.trigger("selection:update",{data:a})})}},e.prototype.trigger=function(a,b){var c=e.__super__.trigger,d={open:"opening",close:"closing",select:"selecting",unselect:"unselecting",clear:"clearing"};if(void 0===b&&(b={}),a in d){var f=d[a],g={prevented:!1,name:a,args:b};if(c.call(this,f,g),g.prevented)return void(b.prevented=!0)}c.call(this,a,b)},e.prototype.toggleDropdown=function(){this.options.get("disabled")||(this.isOpen()?this.close():this.open())},e.prototype.open=function(){this.isOpen()||this.trigger("query",{})},e.prototype.close=function(){this.isOpen()&&this.trigger("close",{})},e.prototype.isOpen=function(){return this.$container.hasClass("select2-container--open")},e.prototype.hasFocus=function(){return this.$container.hasClass("select2-container--focus")},e.prototype.focus=function(a){this.hasFocus()||(this.$container.addClass("select2-container--focus"),this.trigger("focus",{}))},e.prototype.enable=function(a){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'),null!=a&&0!==a.length||(a=[!0]);var b=!a[0];this.$element.prop("disabled",b)},e.prototype.data=function(){this.options.get("debug")&&arguments.length>0&&window.console&&console.warn&&console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.');var a=[];return this.dataAdapter.current(function(b){a=b}),a},e.prototype.val=function(b){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),null==b||0===b.length)return this.$element.val();var c=b[0];a.isArray(c)&&(c=a.map(c,function(a){return a.toString()})),this.$element.val(c).trigger("change")},e.prototype.destroy=function(){this.$container.remove(),this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._syncA),null!=this._observer?(this._observer.disconnect(),this._observer=null):this.$element[0].removeEventListener&&(this.$element[0].removeEventListener("DOMAttrModified",this._syncA,!1),this.$element[0].removeEventListener("DOMNodeInserted",this._syncS,!1),this.$element[0].removeEventListener("DOMNodeRemoved",this._syncS,!1)),this._syncA=null,this._syncS=null,this.$element.off(".select2"),this.$element.attr("tabindex",c.GetData(this.$element[0],"old-tabindex")),this.$element.removeClass("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),c.RemoveData(this.$element[0]),this.$element.removeData("select2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null},e.prototype.render=function(){var b=a('<span class="select2 select2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');return b.attr("dir",this.options.get("dir")),this.$container=b,this.$container.addClass("select2-container--"+this.options.get("theme")),c.StoreData(b[0],"element",this.$element),b},e}),b.define("select2/compat/utils",["jquery"],function(a){function b(b,c,d){var e,f,g=[];e=a.trim(b.attr("class")),e&&(e=""+e,a(e.split(/\s+/)).each(function(){0===this.indexOf("select2-")&&g.push(this)})),e=a.trim(c.attr("class")),e&&(e=""+e,a(e.split(/\s+/)).each(function(){0!==this.indexOf("select2-")&&null!=(f=d(this))&&g.push(f)})),b.attr("class",g.join(" "))}return{syncCssClasses:b}}),b.define("select2/compat/containerCss",["jquery","./utils"],function(a,b){function c(a){return null}function d(){}return d.prototype.render=function(d){var e=d.call(this),f=this.options.get("containerCssClass")||"";a.isFunction(f)&&(f=f(this.$element));var g=this.options.get("adaptContainerCssClass");if(g=g||c,-1!==f.indexOf(":all:")){f=f.replace(":all:","");var h=g;g=function(a){var b=h(a);return null!=b?b+" "+a:a}}var i=this.options.get("containerCss")||{};return a.isFunction(i)&&(i=i(this.$element)),b.syncCssClasses(e,this.$element,g),e.css(i),e.addClass(f),e},d}),b.define("select2/compat/dropdownCss",["jquery","./utils"],function(a,b){function c(a){return null}function d(){}return d.prototype.render=function(d){var e=d.call(this),f=this.options.get("dropdownCssClass")||"";a.isFunction(f)&&(f=f(this.$element));var g=this.options.get("adaptDropdownCssClass");if(g=g||c,-1!==f.indexOf(":all:")){f=f.replace(":all:","");var h=g;g=function(a){var b=h(a);return null!=b?b+" "+a:a}}var i=this.options.get("dropdownCss")||{};return a.isFunction(i)&&(i=i(this.$element)),b.syncCssClasses(e,this.$element,g),e.css(i),e.addClass(f),e},d}),b.define("select2/compat/initSelection",["jquery"],function(a){function b(a,b,c){c.get("debug")&&window.console&&console.warn&&console.warn("Select2: The `initSelection` option has been deprecated in favor of a custom data adapter that overrides the `current` method. This method is now called multiple times instead of a single time when the instance is initialized. Support will be removed for the `initSelection` option in future versions of Select2"),this.initSelection=c.get("initSelection"),this._isInitialized=!1,a.call(this,b,c)}return b.prototype.current=function(b,c){var d=this;if(this._isInitialized)return void b.call(this,c);this.initSelection.call(null,this.$element,function(b){d._isInitialized=!0,a.isArray(b)||(b=[b]),c(b)})},b}),b.define("select2/compat/inputData",["jquery","../utils"],function(a,b){function c(a,b,c){this._currentData=[],this._valueSeparator=c.get("valueSeparator")||",","hidden"===b.prop("type")&&c.get("debug")&&console&&console.warn&&console.warn("Select2: Using a hidden input with Select2 is no longer supported and may stop working in the future. It is recommended to use a `<select>` element instead."),a.call(this,b,c)}return c.prototype.current=function(b,c){function d(b,c){var e=[];return b.selected||-1!==a.inArray(b.id,c)?(b.selected=!0,e.push(b)):b.selected=!1,b.children&&e.push.apply(e,d(b.children,c)),e}for(var e=[],f=0;f<this._currentData.length;f++){var g=this._currentData[f];e.push.apply(e,d(g,this.$element.val().split(this._valueSeparator)))}c(e)},c.prototype.select=function(b,c){if(this.options.get("multiple")){var d=this.$element.val();d+=this._valueSeparator+c.id,this.$element.val(d),this.$element.trigger("change")}else this.current(function(b){a.map(b,function(a){a.selected=!1})}),this.$element.val(c.id),this.$element.trigger("change")},c.prototype.unselect=function(a,b){var c=this;b.selected=!1,this.current(function(a){for(var d=[],e=0;e<a.length;e++){var f=a[e];b.id!=f.id&&d.push(f.id)}c.$element.val(d.join(c._valueSeparator)),c.$element.trigger("change")})},c.prototype.query=function(a,b,c){for(var d=[],e=0;e<this._currentData.length;e++){var f=this._currentData[e],g=this.matches(b,f);null!==g&&d.push(g)}c({results:d})},c.prototype.addOptions=function(c,d){var e=a.map(d,function(a){return b.GetData(a[0],"data")});this._currentData.push.apply(this._currentData,e)},c}),b.define("select2/compat/matcher",["jquery"],function(a){function b(b){function c(c,d){var e=a.extend(!0,{},d);if(null==c.term||""===a.trim(c.term))return e;if(d.children){for(var f=d.children.length-1;f>=0;f--){var g=d.children[f];b(c.term,g.text,g)||e.children.splice(f,1)}if(e.children.length>0)return e}return b(c.term,d.text,d)?e:null}return c}return b}),b.define("select2/compat/query",[],function(){function a(a,b,c){c.get("debug")&&window.console&&console.warn&&console.warn("Select2: The `query` option has been deprecated in favor of a custom data adapter that overrides the `query` method. Support will be removed for the `query` option in future versions of Select2."),a.call(this,b,c)}return a.prototype.query=function(a,b,c){b.callback=c,this.options.get("query").call(null,b)},a}),b.define("select2/dropdown/attachContainer",[],function(){function a(a,b,c){a.call(this,b,c)}return a.prototype.position=function(a,b,c){c.find(".dropdown-wrapper").append(b),b.addClass("select2-dropdown--below"),c.addClass("select2-container--below")},a}),b.define("select2/dropdown/stopPropagation",[],function(){function a(){}return a.prototype.bind=function(a,b,c){a.call(this,b,c);var d=["blur","change","click","dblclick","focus","focusin","focusout","input","keydown","keyup","keypress","mousedown","mouseenter","mouseleave","mousemove","mouseover","mouseup","search","touchend","touchstart"];this.$dropdown.on(d.join(" "),function(a){a.stopPropagation()})},a}),b.define("select2/selection/stopPropagation",[],function(){function a(){}return a.prototype.bind=function(a,b,c){a.call(this,b,c);var d=["blur","change","click","dblclick","focus","focusin","focusout","input","keydown","keyup","keypress","mousedown","mouseenter","mouseleave","mousemove","mouseover","mouseup","search","touchend","touchstart"];this.$selection.on(d.join(" "),function(a){a.stopPropagation()})},a}),function(c){"function"==typeof b.define&&b.define.amd?b.define("jquery-mousewheel",["jquery"],c):"object"==typeof exports?module.exports=c:c(a)}(function(a){function b(b){var g=b||window.event,h=i.call(arguments,1),j=0,l=0,m=0,n=0,o=0,p=0;if(b=a.event.fix(g),b.type="mousewheel","detail"in g&&(m=-1*g.detail),"wheelDelta"in g&&(m=g.wheelDelta),"wheelDeltaY"in g&&(m=g.wheelDeltaY),"wheelDeltaX"in g&&(l=-1*g.wheelDeltaX),"axis"in g&&g.axis===g.HORIZONTAL_AXIS&&(l=-1*m,m=0),j=0===m?l:m,"deltaY"in g&&(m=-1*g.deltaY,j=m),"deltaX"in g&&(l=g.deltaX,0===m&&(j=-1*l)),0!==m||0!==l){if(1===g.deltaMode){var q=a.data(this,"mousewheel-line-height");j*=q,m*=q,l*=q}else if(2===g.deltaMode){var r=a.data(this,"mousewheel-page-height");j*=r,m*=r,l*=r}if(n=Math.max(Math.abs(m),Math.abs(l)),(!f||n<f)&&(f=n,d(g,n)&&(f/=40)),d(g,n)&&(j/=40,l/=40,m/=40),j=Math[j>=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120==0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var c=h.length;c;)this.addEventListener(h[--c],b,!1);else this.onmousewheel=b;a.data(this,"mousewheel-line-height",k.getLineHeight(this)),a.data(this,"mousewheel-page-height",k.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var c=h.length;c;)this.removeEventListener(h[--c],b,!1);else this.onmousewheel=null;a.removeData(this,"mousewheel-line-height"),a.removeData(this,"mousewheel-page-height")},getLineHeight:function(b){var c=a(b),d=c["offsetParent"in a.fn?"offsetParent":"parent"]();return d.length||(d=a("body")),parseInt(d.css("fontSize"),10)||parseInt(c.css("fontSize"),10)||16},getPageHeight:function(b){return a(b).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})}),b.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults","./select2/utils"],function(a,b,c,d,e){if(null==a.fn.select2){var f=["open","close","destroy"];a.fn.select2=function(b){if("object"==typeof(b=b||{}))return this.each(function(){var d=a.extend(!0,{},b);new c(a(this),d)}),this;if("string"==typeof b){var d,g=Array.prototype.slice.call(arguments,1);return this.each(function(){var a=e.GetData(this,"select2");null==a&&window.console&&console.error&&console.error("The select2('"+b+"') method was called on an element that is not using Select2."),d=a[b].apply(a,g)}),a.inArray(b,f)>-1?this:d}throw new Error("Invalid arguments for Select2: "+b)}}return null==a.fn.select2.defaults&&(a.fn.select2.defaults=d),c}),{define:b.define,require:b.require}}(),c=b.require("jquery.select2");return a.fn.select2.amd=b,c});
|
assets/select2/select2.min.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
.select2-container{box-sizing:border-box;display:inline-block;margin:0;position:relative;vertical-align:middle}.select2-container .select2-selection--single{box-sizing:border-box;cursor:pointer;display:block;height:28px;user-select:none;-webkit-user-select:none}.select2-container .select2-selection--single .select2-selection__rendered{display:block;padding-left:8px;padding-right:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-selection--single .select2-selection__clear{position:relative}.select2-container[dir="rtl"] .select2-selection--single .select2-selection__rendered{padding-right:8px;padding-left:20px}.select2-container .select2-selection--multiple{box-sizing:border-box;cursor:pointer;display:block;min-height:32px;user-select:none;-webkit-user-select:none}.select2-container .select2-selection--multiple .select2-selection__rendered{display:inline-block;overflow:hidden;padding-left:8px;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-search--inline{float:left}.select2-container .select2-search--inline .select2-search__field{box-sizing:border-box;border:none;font-size:100%;margin-top:5px;padding:0}.select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-dropdown{background-color:white;border:1px solid #aaa;border-radius:4px;box-sizing:border-box;display:block;position:absolute;left:-100000px;width:100%;z-index:1051}.select2-results{display:block}.select2-results__options{list-style:none;margin:0;padding:0}.select2-results__option{padding:6px;user-select:none;-webkit-user-select:none}.select2-results__option[aria-selected]{cursor:pointer}.select2-container--open .select2-dropdown{left:0}.select2-container--open .select2-dropdown--above{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--open .select2-dropdown--below{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-search--dropdown{display:block;padding:4px}.select2-search--dropdown .select2-search__field{padding:4px;width:100%;box-sizing:border-box}.select2-search--dropdown .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-search--dropdown.select2-search--hide{display:none}.select2-close-mask{border:0;margin:0;padding:0;display:block;position:fixed;left:0;top:0;min-height:100%;min-width:100%;height:auto;width:auto;opacity:0;z-index:99;background-color:#fff;filter:alpha(opacity=0)}.select2-hidden-accessible{border:0 !important;clip:rect(0 0 0 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;height:1px !important;overflow:hidden !important;padding:0 !important;position:absolute !important;width:1px !important;white-space:nowrap !important}.select2-container--default .select2-selection--single{background-color:#fff;border:1px solid #aaa;border-radius:4px}.select2-container--default .select2-selection--single .select2-selection__rendered{color:#444;line-height:28px}.select2-container--default .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:bold}.select2-container--default .select2-selection--single .select2-selection__placeholder{color:#999}.select2-container--default .select2-selection--single .select2-selection__arrow{height:26px;position:absolute;top:1px;right:1px;width:20px}.select2-container--default .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent transparent;border-style:solid;border-width:5px 4px 0 4px;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__clear{float:left}.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__arrow{left:1px;right:auto}.select2-container--default.select2-container--disabled .select2-selection--single{background-color:#eee;cursor:default}.select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear{display:none}.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px}.select2-container--default .select2-selection--multiple{background-color:white;border:1px solid #aaa;border-radius:4px;cursor:text}.select2-container--default .select2-selection--multiple .select2-selection__rendered{box-sizing:border-box;list-style:none;margin:0;padding:0 5px;width:100%}.select2-container--default .select2-selection--multiple .select2-selection__rendered li{list-style:none}.select2-container--default .select2-selection--multiple .select2-selection__placeholder{color:#999;margin-top:5px;float:left}.select2-container--default .select2-selection--multiple .select2-selection__clear{cursor:pointer;float:right;font-weight:bold;margin-top:5px;margin-right:10px}.select2-container--default .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;cursor:default;float:left;margin-right:5px;margin-top:5px;padding:0 5px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove{color:#999;cursor:pointer;display:inline-block;font-weight:bold;margin-right:2px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover{color:#333}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice,.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__placeholder,.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-search--inline{float:right}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice{margin-left:5px;margin-right:auto}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove{margin-left:2px;margin-right:auto}.select2-container--default.select2-container--focus .select2-selection--multiple{border:solid black 1px;outline:0}.select2-container--default.select2-container--disabled .select2-selection--multiple{background-color:#eee;cursor:default}.select2-container--default.select2-container--disabled .select2-selection__choice__remove{display:none}.select2-container--default.select2-container--open.select2-container--above .select2-selection--single,.select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple{border-top-left-radius:0;border-top-right-radius:0}.select2-container--default.select2-container--open.select2-container--below .select2-selection--single,.select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--default .select2-search--dropdown .select2-search__field{border:1px solid #aaa}.select2-container--default .select2-search--inline .select2-search__field{background:transparent;border:none;outline:0;box-shadow:none;-webkit-appearance:textfield}.select2-container--default .select2-results>.select2-results__options{max-height:200px;overflow-y:auto}.select2-container--default .select2-results__option[role=group]{padding:0}.select2-container--default .select2-results__option[aria-disabled=true]{color:#999}.select2-container--default .select2-results__option[aria-selected=true]{background-color:#ddd}.select2-container--default .select2-results__option .select2-results__option{padding-left:1em}.select2-container--default .select2-results__option .select2-results__option .select2-results__group{padding-left:0}.select2-container--default .select2-results__option .select2-results__option .select2-results__option{margin-left:-1em;padding-left:2em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-2em;padding-left:3em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-3em;padding-left:4em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-4em;padding-left:5em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-5em;padding-left:6em}.select2-container--default .select2-results__option--highlighted[aria-selected]{background-color:#5897fb;color:white}.select2-container--default .select2-results__group{cursor:default;display:block;padding:6px}.select2-container--classic .select2-selection--single{background-color:#f7f7f7;border:1px solid #aaa;border-radius:4px;outline:0;background-image:-webkit-linear-gradient(top, #fff 50%, #eee 100%);background-image:-o-linear-gradient(top, #fff 50%, #eee 100%);background-image:linear-gradient(to bottom, #fff 50%, #eee 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0)}.select2-container--classic .select2-selection--single:focus{border:1px solid #5897fb}.select2-container--classic .select2-selection--single .select2-selection__rendered{color:#444;line-height:28px}.select2-container--classic .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:bold;margin-right:10px}.select2-container--classic .select2-selection--single .select2-selection__placeholder{color:#999}.select2-container--classic .select2-selection--single .select2-selection__arrow{background-color:#ddd;border:none;border-left:1px solid #aaa;border-top-right-radius:4px;border-bottom-right-radius:4px;height:26px;position:absolute;top:1px;right:1px;width:20px;background-image:-webkit-linear-gradient(top, #eee 50%, #ccc 100%);background-image:-o-linear-gradient(top, #eee 50%, #ccc 100%);background-image:linear-gradient(to bottom, #eee 50%, #ccc 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFCCCCCC', GradientType=0)}.select2-container--classic .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent transparent;border-style:solid;border-width:5px 4px 0 4px;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__clear{float:left}.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__arrow{border:none;border-right:1px solid #aaa;border-radius:0;border-top-left-radius:4px;border-bottom-left-radius:4px;left:1px;right:auto}.select2-container--classic.select2-container--open .select2-selection--single{border:1px solid #5897fb}.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow{background:transparent;border:none}.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px}.select2-container--classic.select2-container--open.select2-container--above .select2-selection--single{border-top:none;border-top-left-radius:0;border-top-right-radius:0;background-image:-webkit-linear-gradient(top, #fff 0%, #eee 50%);background-image:-o-linear-gradient(top, #fff 0%, #eee 50%);background-image:linear-gradient(to bottom, #fff 0%, #eee 50%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0)}.select2-container--classic.select2-container--open.select2-container--below .select2-selection--single{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0;background-image:-webkit-linear-gradient(top, #eee 50%, #fff 100%);background-image:-o-linear-gradient(top, #eee 50%, #fff 100%);background-image:linear-gradient(to bottom, #eee 50%, #fff 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFFFFFFF', GradientType=0)}.select2-container--classic .select2-selection--multiple{background-color:white;border:1px solid #aaa;border-radius:4px;cursor:text;outline:0}.select2-container--classic .select2-selection--multiple:focus{border:1px solid #5897fb}.select2-container--classic .select2-selection--multiple .select2-selection__rendered{list-style:none;margin:0;padding:0 5px}.select2-container--classic .select2-selection--multiple .select2-selection__clear{display:none}.select2-container--classic .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;cursor:default;float:left;margin-right:5px;margin-top:5px;padding:0 5px}.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove{color:#888;cursor:pointer;display:inline-block;font-weight:bold;margin-right:2px}.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove:hover{color:#555}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice{float:right;margin-left:5px;margin-right:auto}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove{margin-left:2px;margin-right:auto}.select2-container--classic.select2-container--open .select2-selection--multiple{border:1px solid #5897fb}.select2-container--classic.select2-container--open.select2-container--above .select2-selection--multiple{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-container--classic.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--classic .select2-search--dropdown .select2-search__field{border:1px solid #aaa;outline:0}.select2-container--classic .select2-search--inline .select2-search__field{outline:0;box-shadow:none}.select2-container--classic .select2-dropdown{background-color:#fff;border:1px solid transparent}.select2-container--classic .select2-dropdown--above{border-bottom:none}.select2-container--classic .select2-dropdown--below{border-top:none}.select2-container--classic .select2-results>.select2-results__options{max-height:200px;overflow-y:auto}.select2-container--classic .select2-results__option[role=group]{padding:0}.select2-container--classic .select2-results__option[aria-disabled=true]{color:grey}.select2-container--classic .select2-results__option--highlighted[aria-selected]{background-color:#3875d7;color:#fff}.select2-container--classic .select2-results__group{cursor:default;display:block;padding:6px}.select2-container--classic.select2-container--open .select2-dropdown{border-color:#5897fb}
|
assets/swipebox/jquery.swipebox.js
ADDED
@@ -0,0 +1,958 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*! Swipebox v1.4.4 | Constantin Saguin csag.co | MIT License | github.com/brutaldesign/swipebox */
|
2 |
+
|
3 |
+
;( function ( window, document, $, undefined ) {
|
4 |
+
|
5 |
+
$.swipebox = function( elem, options ) {
|
6 |
+
|
7 |
+
// Default options
|
8 |
+
var ui,
|
9 |
+
defaults = {
|
10 |
+
useCSS : true,
|
11 |
+
useSVG : true,
|
12 |
+
initialIndexOnArray : 0,
|
13 |
+
removeBarsOnMobile : true,
|
14 |
+
hideCloseButtonOnMobile : false,
|
15 |
+
hideBarsDelay : 3000,
|
16 |
+
videoMaxWidth : 1140,
|
17 |
+
vimeoColor : 'cccccc',
|
18 |
+
beforeOpen: null,
|
19 |
+
afterOpen: null,
|
20 |
+
afterClose: null,
|
21 |
+
afterMedia: null,
|
22 |
+
nextSlide: null,
|
23 |
+
prevSlide: null,
|
24 |
+
loopAtEnd: false,
|
25 |
+
autoplayVideos: false,
|
26 |
+
queryStringData: {},
|
27 |
+
toggleClassOnLoad: ''
|
28 |
+
},
|
29 |
+
|
30 |
+
plugin = this,
|
31 |
+
elements = [], // slides array [ { href:'...', title:'...' }, ...],
|
32 |
+
$elem,
|
33 |
+
selector = elem.selector,
|
34 |
+
isMobile = navigator.userAgent.match( /(iPad)|(iPhone)|(iPod)|(Android)|(PlayBook)|(BB10)|(BlackBerry)|(Opera Mini)|(IEMobile)|(webOS)|(MeeGo)/i ),
|
35 |
+
isTouch = isMobile !== null || document.createTouch !== undefined || ( 'ontouchstart' in window ) || ( 'onmsgesturechange' in window ) || navigator.msMaxTouchPoints,
|
36 |
+
supportSVG = !! document.createElementNS && !! document.createElementNS( 'http://www.w3.org/2000/svg', 'svg').createSVGRect,
|
37 |
+
winWidth = window.innerWidth ? window.innerWidth : $( window ).width(),
|
38 |
+
winHeight = window.innerHeight ? window.innerHeight : $( window ).height(),
|
39 |
+
currentX = 0,
|
40 |
+
/* jshint multistr: true */
|
41 |
+
html = '<div id="swipebox-overlay">\
|
42 |
+
<div id="swipebox-container">\
|
43 |
+
<div id="swipebox-slider"></div>\
|
44 |
+
<div id="swipebox-top-bar">\
|
45 |
+
<div id="swipebox-title"></div>\
|
46 |
+
</div>\
|
47 |
+
<div id="swipebox-bottom-bar">\
|
48 |
+
<div id="swipebox-arrows">\
|
49 |
+
<a id="swipebox-prev"></a>\
|
50 |
+
<a id="swipebox-next"></a>\
|
51 |
+
</div>\
|
52 |
+
</div>\
|
53 |
+
<a id="swipebox-close"></a>\
|
54 |
+
</div>\
|
55 |
+
</div>';
|
56 |
+
|
57 |
+
plugin.settings = {};
|
58 |
+
|
59 |
+
$.swipebox.close = function () {
|
60 |
+
ui.closeSlide();
|
61 |
+
};
|
62 |
+
|
63 |
+
$.swipebox.extend = function () {
|
64 |
+
return ui;
|
65 |
+
};
|
66 |
+
|
67 |
+
plugin.init = function() {
|
68 |
+
|
69 |
+
plugin.settings = $.extend( {}, defaults, options );
|
70 |
+
|
71 |
+
if ( $.isArray( elem ) ) {
|
72 |
+
|
73 |
+
elements = elem;
|
74 |
+
ui.target = $( window );
|
75 |
+
ui.init( plugin.settings.initialIndexOnArray );
|
76 |
+
|
77 |
+
} else {
|
78 |
+
|
79 |
+
$( document ).on( 'click', selector, function( event ) {
|
80 |
+
|
81 |
+
// console.log( isTouch );
|
82 |
+
|
83 |
+
if ( event.target.parentNode.className === 'slide current' ) {
|
84 |
+
|
85 |
+
return false;
|
86 |
+
}
|
87 |
+
|
88 |
+
if ( ! $.isArray( elem ) ) {
|
89 |
+
ui.destroy();
|
90 |
+
$elem = $( selector );
|
91 |
+
ui.actions();
|
92 |
+
}
|
93 |
+
|
94 |
+
elements = [];
|
95 |
+
var index, relType, relVal;
|
96 |
+
|
97 |
+
// Allow for HTML5 compliant attribute before legacy use of rel
|
98 |
+
if ( ! relVal ) {
|
99 |
+
relType = 'data-rel';
|
100 |
+
relVal = $( this ).attr( relType );
|
101 |
+
}
|
102 |
+
|
103 |
+
if ( ! relVal ) {
|
104 |
+
relType = 'rel';
|
105 |
+
relVal = $( this ).attr( relType );
|
106 |
+
}
|
107 |
+
|
108 |
+
if ( relVal && relVal !== '' && relVal !== 'nofollow' ) {
|
109 |
+
$elem = $( selector ).filter( '[' + relType + '="' + relVal + '"]' );
|
110 |
+
} else {
|
111 |
+
$elem = $( selector );
|
112 |
+
}
|
113 |
+
|
114 |
+
$elem.each( function() {
|
115 |
+
|
116 |
+
var title = null,
|
117 |
+
href = null;
|
118 |
+
|
119 |
+
if ( $( this ).attr( 'title' ) ) {
|
120 |
+
title = $( this ).attr( 'title' );
|
121 |
+
}
|
122 |
+
|
123 |
+
|
124 |
+
if ( $( this ).attr( 'href' ) ) {
|
125 |
+
href = $( this ).attr( 'href' );
|
126 |
+
}
|
127 |
+
|
128 |
+
elements.push( {
|
129 |
+
href: href,
|
130 |
+
title: title
|
131 |
+
} );
|
132 |
+
} );
|
133 |
+
|
134 |
+
index = $elem.index( $( this ) );
|
135 |
+
event.preventDefault();
|
136 |
+
event.stopPropagation();
|
137 |
+
ui.target = $( event.target );
|
138 |
+
ui.init( index );
|
139 |
+
} );
|
140 |
+
}
|
141 |
+
};
|
142 |
+
|
143 |
+
ui = {
|
144 |
+
|
145 |
+
/**
|
146 |
+
* Initiate Swipebox
|
147 |
+
*/
|
148 |
+
init : function( index ) {
|
149 |
+
if ( plugin.settings.beforeOpen ) {
|
150 |
+
plugin.settings.beforeOpen();
|
151 |
+
}
|
152 |
+
this.target.trigger( 'swipebox-start' );
|
153 |
+
$.swipebox.isOpen = true;
|
154 |
+
this.build();
|
155 |
+
this.openSlide( index );
|
156 |
+
this.openMedia( index );
|
157 |
+
this.preloadMedia( index+1 );
|
158 |
+
this.preloadMedia( index-1 );
|
159 |
+
if ( plugin.settings.afterOpen ) {
|
160 |
+
plugin.settings.afterOpen(index);
|
161 |
+
}
|
162 |
+
},
|
163 |
+
|
164 |
+
/**
|
165 |
+
* Built HTML containers and fire main functions
|
166 |
+
*/
|
167 |
+
build : function () {
|
168 |
+
var $this = this, bg;
|
169 |
+
|
170 |
+
$( 'body' ).append( html );
|
171 |
+
|
172 |
+
if ( supportSVG && plugin.settings.useSVG === true ) {
|
173 |
+
bg = $( '#swipebox-close' ).css( 'background-image' );
|
174 |
+
bg = bg.replace( 'png', 'svg' );
|
175 |
+
$( '#swipebox-prev, #swipebox-next, #swipebox-close' ).css( {
|
176 |
+
'background-image' : bg
|
177 |
+
} );
|
178 |
+
}
|
179 |
+
|
180 |
+
if ( isMobile && plugin.settings.removeBarsOnMobile ) {
|
181 |
+
$( '#swipebox-bottom-bar, #swipebox-top-bar' ).remove();
|
182 |
+
}
|
183 |
+
|
184 |
+
$.each( elements, function() {
|
185 |
+
$( '#swipebox-slider' ).append( '<div class="slide"></div>' );
|
186 |
+
} );
|
187 |
+
|
188 |
+
$this.setDim();
|
189 |
+
$this.actions();
|
190 |
+
|
191 |
+
if ( isTouch ) {
|
192 |
+
$this.gesture();
|
193 |
+
}
|
194 |
+
|
195 |
+
// Devices can have both touch and keyboard input so always allow key events
|
196 |
+
$this.keyboard();
|
197 |
+
|
198 |
+
$this.animBars();
|
199 |
+
$this.resize();
|
200 |
+
|
201 |
+
},
|
202 |
+
|
203 |
+
/**
|
204 |
+
* Set dimensions depending on windows width and height
|
205 |
+
*/
|
206 |
+
setDim : function () {
|
207 |
+
|
208 |
+
var width, height, sliderCss = {};
|
209 |
+
|
210 |
+
// Reset dimensions on mobile orientation change
|
211 |
+
if ( 'onorientationchange' in window ) {
|
212 |
+
|
213 |
+
window.addEventListener( 'orientationchange', function() {
|
214 |
+
if ( window.orientation === 0 ) {
|
215 |
+
width = winWidth;
|
216 |
+
height = winHeight;
|
217 |
+
} else if ( window.orientation === 90 || window.orientation === -90 ) {
|
218 |
+
width = winHeight;
|
219 |
+
height = winWidth;
|
220 |
+
}
|
221 |
+
}, false );
|
222 |
+
|
223 |
+
|
224 |
+
} else {
|
225 |
+
|
226 |
+
width = window.innerWidth ? window.innerWidth : $( window ).width();
|
227 |
+
height = window.innerHeight ? window.innerHeight : $( window ).height();
|
228 |
+
}
|
229 |
+
|
230 |
+
sliderCss = {
|
231 |
+
width : width,
|
232 |
+
height : height
|
233 |
+
};
|
234 |
+
|
235 |
+
$( '#swipebox-overlay' ).css( sliderCss );
|
236 |
+
|
237 |
+
},
|
238 |
+
|
239 |
+
/**
|
240 |
+
* Reset dimensions on window resize envent
|
241 |
+
*/
|
242 |
+
resize : function () {
|
243 |
+
var $this = this;
|
244 |
+
|
245 |
+
$( window ).resize( function() {
|
246 |
+
$this.setDim();
|
247 |
+
} ).resize();
|
248 |
+
},
|
249 |
+
|
250 |
+
/**
|
251 |
+
* Check if device supports CSS transitions
|
252 |
+
*/
|
253 |
+
supportTransition : function () {
|
254 |
+
|
255 |
+
var prefixes = 'transition WebkitTransition MozTransition OTransition msTransition KhtmlTransition'.split( ' ' ),
|
256 |
+
i;
|
257 |
+
|
258 |
+
for ( i = 0; i < prefixes.length; i++ ) {
|
259 |
+
if ( document.createElement( 'div' ).style[ prefixes[i] ] !== undefined ) {
|
260 |
+
return prefixes[i];
|
261 |
+
}
|
262 |
+
}
|
263 |
+
return false;
|
264 |
+
},
|
265 |
+
|
266 |
+
/**
|
267 |
+
* Check if CSS transitions are allowed (options + devicesupport)
|
268 |
+
*/
|
269 |
+
doCssTrans : function () {
|
270 |
+
if ( plugin.settings.useCSS && this.supportTransition() ) {
|
271 |
+
return true;
|
272 |
+
}
|
273 |
+
},
|
274 |
+
|
275 |
+
/**
|
276 |
+
* Touch navigation
|
277 |
+
*/
|
278 |
+
gesture : function () {
|
279 |
+
|
280 |
+
var $this = this,
|
281 |
+
index,
|
282 |
+
hDistance,
|
283 |
+
vDistance,
|
284 |
+
hDistanceLast,
|
285 |
+
vDistanceLast,
|
286 |
+
hDistancePercent,
|
287 |
+
vSwipe = false,
|
288 |
+
hSwipe = false,
|
289 |
+
hSwipMinDistance = 10,
|
290 |
+
vSwipMinDistance = 50,
|
291 |
+
startCoords = {},
|
292 |
+
endCoords = {},
|
293 |
+
bars = $( '#swipebox-top-bar, #swipebox-bottom-bar' ),
|
294 |
+
slider = $( '#swipebox-slider' );
|
295 |
+
|
296 |
+
bars.addClass( 'visible-bars' );
|
297 |
+
$this.setTimeout();
|
298 |
+
|
299 |
+
$( 'body' ).bind( 'touchstart', function( event ) {
|
300 |
+
|
301 |
+
$( this ).addClass( 'touching' );
|
302 |
+
index = $( '#swipebox-slider .slide' ).index( $( '#swipebox-slider .slide.current' ) );
|
303 |
+
endCoords = event.originalEvent.targetTouches[0];
|
304 |
+
startCoords.pageX = event.originalEvent.targetTouches[0].pageX;
|
305 |
+
startCoords.pageY = event.originalEvent.targetTouches[0].pageY;
|
306 |
+
|
307 |
+
$( '#swipebox-slider' ).css( {
|
308 |
+
'-webkit-transform' : 'translate3d(' + currentX +'%, 0, 0)',
|
309 |
+
'transform' : 'translate3d(' + currentX + '%, 0, 0)'
|
310 |
+
} );
|
311 |
+
|
312 |
+
$( '.touching' ).bind( 'touchmove',function( event ) {
|
313 |
+
event.preventDefault();
|
314 |
+
event.stopPropagation();
|
315 |
+
endCoords = event.originalEvent.targetTouches[0];
|
316 |
+
|
317 |
+
if ( ! hSwipe ) {
|
318 |
+
vDistanceLast = vDistance;
|
319 |
+
vDistance = endCoords.pageY - startCoords.pageY;
|
320 |
+
if ( Math.abs( vDistance ) >= vSwipMinDistance || vSwipe ) {
|
321 |
+
var opacity = 0.75 - Math.abs(vDistance) / slider.height();
|
322 |
+
|
323 |
+
slider.css( { 'top': vDistance + 'px' } );
|
324 |
+
slider.css( { 'opacity': opacity } );
|
325 |
+
|
326 |
+
vSwipe = true;
|
327 |
+
}
|
328 |
+
}
|
329 |
+
|
330 |
+
hDistanceLast = hDistance;
|
331 |
+
hDistance = endCoords.pageX - startCoords.pageX;
|
332 |
+
hDistancePercent = hDistance * 100 / winWidth;
|
333 |
+
|
334 |
+
if ( ! hSwipe && ! vSwipe && Math.abs( hDistance ) >= hSwipMinDistance ) {
|
335 |
+
$( '#swipebox-slider' ).css( {
|
336 |
+
'-webkit-transition' : '',
|
337 |
+
'transition' : ''
|
338 |
+
} );
|
339 |
+
hSwipe = true;
|
340 |
+
}
|
341 |
+
|
342 |
+
if ( hSwipe ) {
|
343 |
+
|
344 |
+
// swipe left
|
345 |
+
if ( 0 < hDistance ) {
|
346 |
+
|
347 |
+
// first slide
|
348 |
+
if ( 0 === index ) {
|
349 |
+
// console.log( 'first' );
|
350 |
+
$( '#swipebox-overlay' ).addClass( 'leftSpringTouch' );
|
351 |
+
} else {
|
352 |
+
// Follow gesture
|
353 |
+
$( '#swipebox-overlay' ).removeClass( 'leftSpringTouch' ).removeClass( 'rightSpringTouch' );
|
354 |
+
$( '#swipebox-slider' ).css( {
|
355 |
+
'-webkit-transform' : 'translate3d(' + ( currentX + hDistancePercent ) +'%, 0, 0)',
|
356 |
+
'transform' : 'translate3d(' + ( currentX + hDistancePercent ) + '%, 0, 0)'
|
357 |
+
} );
|
358 |
+
}
|
359 |
+
|
360 |
+
// swipe rught
|
361 |
+
} else if ( 0 > hDistance ) {
|
362 |
+
|
363 |
+
// last Slide
|
364 |
+
if ( elements.length === index +1 ) {
|
365 |
+
// console.log( 'last' );
|
366 |
+
$( '#swipebox-overlay' ).addClass( 'rightSpringTouch' );
|
367 |
+
} else {
|
368 |
+
$( '#swipebox-overlay' ).removeClass( 'leftSpringTouch' ).removeClass( 'rightSpringTouch' );
|
369 |
+
$( '#swipebox-slider' ).css( {
|
370 |
+
'-webkit-transform' : 'translate3d(' + ( currentX + hDistancePercent ) +'%, 0, 0)',
|
371 |
+
'transform' : 'translate3d(' + ( currentX + hDistancePercent ) + '%, 0, 0)'
|
372 |
+
} );
|
373 |
+
}
|
374 |
+
|
375 |
+
}
|
376 |
+
}
|
377 |
+
} );
|
378 |
+
|
379 |
+
return false;
|
380 |
+
|
381 |
+
} ).bind( 'touchend',function( event ) {
|
382 |
+
event.preventDefault();
|
383 |
+
event.stopPropagation();
|
384 |
+
|
385 |
+
$( '#swipebox-slider' ).css( {
|
386 |
+
'-webkit-transition' : '-webkit-transform 0.4s ease',
|
387 |
+
'transition' : 'transform 0.4s ease'
|
388 |
+
} );
|
389 |
+
|
390 |
+
vDistance = endCoords.pageY - startCoords.pageY;
|
391 |
+
hDistance = endCoords.pageX - startCoords.pageX;
|
392 |
+
hDistancePercent = hDistance*100/winWidth;
|
393 |
+
|
394 |
+
// Swipe to bottom to close
|
395 |
+
if ( vSwipe ) {
|
396 |
+
vSwipe = false;
|
397 |
+
if ( Math.abs( vDistance ) >= 2 * vSwipMinDistance && Math.abs( vDistance ) > Math.abs( vDistanceLast ) ) {
|
398 |
+
var vOffset = vDistance > 0 ? slider.height() : - slider.height();
|
399 |
+
slider.animate( { top: vOffset + 'px', 'opacity': 0 },
|
400 |
+
300,
|
401 |
+
function () {
|
402 |
+
$this.closeSlide();
|
403 |
+
} );
|
404 |
+
} else {
|
405 |
+
slider.animate( { top: 0, 'opacity': 1 }, 300 );
|
406 |
+
}
|
407 |
+
|
408 |
+
} else if ( hSwipe ) {
|
409 |
+
|
410 |
+
hSwipe = false;
|
411 |
+
|
412 |
+
// swipeLeft
|
413 |
+
if( hDistance >= hSwipMinDistance && hDistance >= hDistanceLast) {
|
414 |
+
|
415 |
+
$this.getPrev();
|
416 |
+
|
417 |
+
// swipeRight
|
418 |
+
} else if ( hDistance <= -hSwipMinDistance && hDistance <= hDistanceLast) {
|
419 |
+
|
420 |
+
$this.getNext();
|
421 |
+
}
|
422 |
+
|
423 |
+
} else { // Top and bottom bars have been removed on touchable devices
|
424 |
+
// tap
|
425 |
+
if ( ! bars.hasClass( 'visible-bars' ) ) {
|
426 |
+
$this.showBars();
|
427 |
+
$this.setTimeout();
|
428 |
+
} else {
|
429 |
+
$this.clearTimeout();
|
430 |
+
$this.hideBars();
|
431 |
+
}
|
432 |
+
}
|
433 |
+
|
434 |
+
$( '#swipebox-slider' ).css( {
|
435 |
+
'-webkit-transform' : 'translate3d(' + currentX + '%, 0, 0)',
|
436 |
+
'transform' : 'translate3d(' + currentX + '%, 0, 0)'
|
437 |
+
} );
|
438 |
+
|
439 |
+
$( '#swipebox-overlay' ).removeClass( 'leftSpringTouch' ).removeClass( 'rightSpringTouch' );
|
440 |
+
$( '.touching' ).off( 'touchmove' ).removeClass( 'touching' );
|
441 |
+
|
442 |
+
} );
|
443 |
+
},
|
444 |
+
|
445 |
+
/**
|
446 |
+
* Set timer to hide the action bars
|
447 |
+
*/
|
448 |
+
setTimeout: function () {
|
449 |
+
if ( plugin.settings.hideBarsDelay > 0 ) {
|
450 |
+
var $this = this;
|
451 |
+
$this.clearTimeout();
|
452 |
+
$this.timeout = window.setTimeout( function() {
|
453 |
+
$this.hideBars();
|
454 |
+
},
|
455 |
+
|
456 |
+
plugin.settings.hideBarsDelay
|
457 |
+
);
|
458 |
+
}
|
459 |
+
},
|
460 |
+
|
461 |
+
/**
|
462 |
+
* Clear timer
|
463 |
+
*/
|
464 |
+
clearTimeout: function () {
|
465 |
+
window.clearTimeout( this.timeout );
|
466 |
+
this.timeout = null;
|
467 |
+
},
|
468 |
+
|
469 |
+
/**
|
470 |
+
* Show navigation and title bars
|
471 |
+
*/
|
472 |
+
showBars : function () {
|
473 |
+
var bars = $( '#swipebox-top-bar, #swipebox-bottom-bar' );
|
474 |
+
if ( this.doCssTrans() ) {
|
475 |
+
bars.addClass( 'visible-bars' );
|
476 |
+
} else {
|
477 |
+
$( '#swipebox-top-bar' ).animate( { top : 0 }, 500 );
|
478 |
+
$( '#swipebox-bottom-bar' ).animate( { bottom : 0 }, 500 );
|
479 |
+
setTimeout( function() {
|
480 |
+
bars.addClass( 'visible-bars' );
|
481 |
+
}, 1000 );
|
482 |
+
}
|
483 |
+
},
|
484 |
+
|
485 |
+
/**
|
486 |
+
* Hide navigation and title bars
|
487 |
+
*/
|
488 |
+
hideBars : function () {
|
489 |
+
var bars = $( '#swipebox-top-bar, #swipebox-bottom-bar' );
|
490 |
+
if ( this.doCssTrans() ) {
|
491 |
+
bars.removeClass( 'visible-bars' );
|
492 |
+
} else {
|
493 |
+
$( '#swipebox-top-bar' ).animate( { top : '-50px' }, 500 );
|
494 |
+
$( '#swipebox-bottom-bar' ).animate( { bottom : '-50px' }, 500 );
|
495 |
+
setTimeout( function() {
|
496 |
+
bars.removeClass( 'visible-bars' );
|
497 |
+
}, 1000 );
|
498 |
+
}
|
499 |
+
},
|
500 |
+
|
501 |
+
/**
|
502 |
+
* Animate navigation and top bars
|
503 |
+
*/
|
504 |
+
animBars : function () {
|
505 |
+
var $this = this,
|
506 |
+
bars = $( '#swipebox-top-bar, #swipebox-bottom-bar' );
|
507 |
+
|
508 |
+
bars.addClass( 'visible-bars' );
|
509 |
+
$this.setTimeout();
|
510 |
+
|
511 |
+
$( '#swipebox-slider' ).click( function() {
|
512 |
+
if ( ! bars.hasClass( 'visible-bars' ) ) {
|
513 |
+
$this.showBars();
|
514 |
+
$this.setTimeout();
|
515 |
+
}
|
516 |
+
} );
|
517 |
+
|
518 |
+
$( '#swipebox-bottom-bar' ).hover( function() {
|
519 |
+
$this.showBars();
|
520 |
+
bars.addClass( 'visible-bars' );
|
521 |
+
$this.clearTimeout();
|
522 |
+
|
523 |
+
}, function() {
|
524 |
+
if ( plugin.settings.hideBarsDelay > 0 ) {
|
525 |
+
bars.removeClass( 'visible-bars' );
|
526 |
+
$this.setTimeout();
|
527 |
+
}
|
528 |
+
|
529 |
+
} );
|
530 |
+
},
|
531 |
+
|
532 |
+
/**
|
533 |
+
* Keyboard navigation
|
534 |
+
*/
|
535 |
+
keyboard : function () {
|
536 |
+
var $this = this;
|
537 |
+
$( window ).bind( 'keyup', function( event ) {
|
538 |
+
event.preventDefault();
|
539 |
+
event.stopPropagation();
|
540 |
+
|
541 |
+
if ( event.keyCode === 37 ) {
|
542 |
+
|
543 |
+
$this.getPrev();
|
544 |
+
|
545 |
+
} else if ( event.keyCode === 39 ) {
|
546 |
+
|
547 |
+
$this.getNext();
|
548 |
+
|
549 |
+
} else if ( event.keyCode === 27 ) {
|
550 |
+
|
551 |
+
$this.closeSlide();
|
552 |
+
}
|
553 |
+
} );
|
554 |
+
},
|
555 |
+
|
556 |
+
/**
|
557 |
+
* Navigation events : go to next slide, go to prevous slide and close
|
558 |
+
*/
|
559 |
+
actions : function () {
|
560 |
+
var $this = this,
|
561 |
+
action = 'touchend click'; // Just detect for both event types to allow for multi-input
|
562 |
+
|
563 |
+
if ( elements.length < 2 ) {
|
564 |
+
|
565 |
+
$( '#swipebox-bottom-bar' ).hide();
|
566 |
+
|
567 |
+
if ( undefined === elements[ 1 ] ) {
|
568 |
+
$( '#swipebox-top-bar' ).hide();
|
569 |
+
}
|
570 |
+
|
571 |
+
} else {
|
572 |
+
$( '#swipebox-prev' ).bind( action, function( event ) {
|
573 |
+
event.preventDefault();
|
574 |
+
event.stopPropagation();
|
575 |
+
$this.getPrev();
|
576 |
+
$this.setTimeout();
|
577 |
+
} );
|
578 |
+
|
579 |
+
$( '#swipebox-next' ).bind( action, function( event ) {
|
580 |
+
event.preventDefault();
|
581 |
+
event.stopPropagation();
|
582 |
+
$this.getNext();
|
583 |
+
$this.setTimeout();
|
584 |
+
} );
|
585 |
+
}
|
586 |
+
|
587 |
+
$( '#swipebox-close' ).bind( action, function() {
|
588 |
+
$this.closeSlide();
|
589 |
+
} );
|
590 |
+
},
|
591 |
+
|
592 |
+
/**
|
593 |
+
* Set current slide
|
594 |
+
*/
|
595 |
+
setSlide : function ( index, isFirst ) {
|
596 |
+
|
597 |
+
isFirst = isFirst || false;
|
598 |
+
|
599 |
+
var slider = $( '#swipebox-slider' );
|
600 |
+
|
601 |
+
currentX = -index*100;
|
602 |
+
|
603 |
+
if ( this.doCssTrans() ) {
|
604 |
+
slider.css( {
|
605 |
+
'-webkit-transform' : 'translate3d(' + (-index*100)+'%, 0, 0)',
|
606 |
+
'transform' : 'translate3d(' + (-index*100)+'%, 0, 0)'
|
607 |
+
} );
|
608 |
+
} else {
|
609 |
+
slider.animate( { left : ( -index*100 )+'%' } );
|
610 |
+
}
|
611 |
+
|
612 |
+
$( '#swipebox-slider .slide' ).removeClass( 'current' );
|
613 |
+
$( '#swipebox-slider .slide' ).eq( index ).addClass( 'current' );
|
614 |
+
this.setTitle( index );
|
615 |
+
|
616 |
+
if ( isFirst ) {
|
617 |
+
slider.fadeIn();
|
618 |
+
}
|
619 |
+
|
620 |
+
$( '#swipebox-prev, #swipebox-next' ).removeClass( 'disabled' );
|
621 |
+
|
622 |
+
if ( index === 0 ) {
|
623 |
+
$( '#swipebox-prev' ).addClass( 'disabled' );
|
624 |
+
} else if ( index === elements.length - 1 && plugin.settings.loopAtEnd !== true ) {
|
625 |
+
$( '#swipebox-next' ).addClass( 'disabled' );
|
626 |
+
}
|
627 |
+
},
|
628 |
+
|
629 |
+
/**
|
630 |
+
* Open slide
|
631 |
+
*/
|
632 |
+
openSlide : function ( index ) {
|
633 |
+
$( 'html' ).addClass( 'swipebox-html' );
|
634 |
+
if ( isTouch ) {
|
635 |
+
$( 'html' ).addClass( 'swipebox-touch' );
|
636 |
+
|
637 |
+
if ( plugin.settings.hideCloseButtonOnMobile ) {
|
638 |
+
$( 'html' ).addClass( 'swipebox-no-close-button' );
|
639 |
+
}
|
640 |
+
} else {
|
641 |
+
$( 'html' ).addClass( 'swipebox-no-touch' );
|
642 |
+
}
|
643 |
+
$( window ).trigger( 'resize' ); // fix scroll bar visibility on desktop
|
644 |
+
this.setSlide( index, true );
|
645 |
+
},
|
646 |
+
|
647 |
+
/**
|
648 |
+
* Set a time out if the media is a video
|
649 |
+
*/
|
650 |
+
preloadMedia : function ( index ) {
|
651 |
+
var $this = this,
|
652 |
+
src = null;
|
653 |
+
|
654 |
+
if ( elements[ index ] !== undefined ) {
|
655 |
+
src = elements[ index ].href;
|
656 |
+
}
|
657 |
+
|
658 |
+
if ( ! $this.isVideo( src ) ) {
|
659 |
+
setTimeout( function() {
|
660 |
+
$this.openMedia( index );
|
661 |
+
}, 1000);
|
662 |
+
} else {
|
663 |
+
$this.openMedia( index );
|
664 |
+
}
|
665 |
+
},
|
666 |
+
|
667 |
+
/**
|
668 |
+
* Open
|
669 |
+
*/
|
670 |
+
openMedia : function ( index ) {
|
671 |
+
var $this = this,
|
672 |
+
src,
|
673 |
+
slide;
|
674 |
+
|
675 |
+
if ( elements[ index ] !== undefined ) {
|
676 |
+
src = elements[ index ].href;
|
677 |
+
}
|
678 |
+
|
679 |
+
if ( index < 0 || index >= elements.length ) {
|
680 |
+
return false;
|
681 |
+
}
|
682 |
+
|
683 |
+
slide = $( '#swipebox-slider .slide' ).eq( index );
|
684 |
+
|
685 |
+
if ( ! $this.isVideo( src ) ) {
|
686 |
+
slide.addClass( 'slide-loading' );
|
687 |
+
$this.loadMedia( src, function() {
|
688 |
+
slide.removeClass( 'slide-loading' );
|
689 |
+
slide.html( this );
|
690 |
+
|
691 |
+
if ( plugin.settings.afterMedia ) {
|
692 |
+
plugin.settings.afterMedia( index );
|
693 |
+
}
|
694 |
+
} );
|
695 |
+
} else {
|
696 |
+
slide.html( $this.getVideo( src ) );
|
697 |
+
|
698 |
+
if ( plugin.settings.afterMedia ) {
|
699 |
+
plugin.settings.afterMedia( index );
|
700 |
+
}
|
701 |
+
}
|
702 |
+
|
703 |
+
},
|
704 |
+
|
705 |
+
/**
|
706 |
+
* Set link title attribute as caption
|
707 |
+
*/
|
708 |
+
setTitle : function ( index ) {
|
709 |
+
var title = null;
|
710 |
+
|
711 |
+
$( '#swipebox-title' ).empty();
|
712 |
+
|
713 |
+
if ( elements[ index ] !== undefined ) {
|
714 |
+
title = elements[ index ].title;
|
715 |
+
}
|
716 |
+
|
717 |
+
if ( title ) {
|
718 |
+
$( '#swipebox-top-bar' ).show();
|
719 |
+
$( '#swipebox-title' ).append( title );
|
720 |
+
} else {
|
721 |
+
$( '#swipebox-top-bar' ).hide();
|
722 |
+
}
|
723 |
+
},
|
724 |
+
|
725 |
+
/**
|
726 |
+
* Check if the URL is a video
|
727 |
+
*/
|
728 |
+
isVideo : function ( src ) {
|
729 |
+
|
730 |
+
if ( src ) {
|
731 |
+
if ( src.match( /(youtube\.com|youtube-nocookie\.com)\/watch\?v=([a-zA-Z0-9\-_]+)/) || src.match( /vimeo\.com\/([0-9]*)/ ) || src.match( /youtu\.be\/([a-zA-Z0-9\-_]+)/ ) ) {
|
732 |
+
return true;
|
733 |
+
}
|
734 |
+
|
735 |
+
if ( src.toLowerCase().indexOf( 'swipeboxvideo=1' ) >= 0 ) {
|
736 |
+
|
737 |
+
return true;
|
738 |
+
}
|
739 |
+
}
|
740 |
+
|
741 |
+
},
|
742 |
+
|
743 |
+
/**
|
744 |
+
* Parse URI querystring and:
|
745 |
+
* - overrides value provided via dictionary
|
746 |
+
* - rebuild it again returning a string
|
747 |
+
*/
|
748 |
+
parseUri : function (uri, customData) {
|
749 |
+
var a = document.createElement('a'),
|
750 |
+
qs = {};
|
751 |
+
|
752 |
+
// Decode the URI
|
753 |
+
a.href = decodeURIComponent( uri );
|
754 |
+
|
755 |
+
// QueryString to Object
|
756 |
+
if ( a.search ) {
|
757 |
+
qs = JSON.parse( '{"' + a.search.toLowerCase().replace('?','').replace(/&/g,'","').replace(/=/g,'":"') + '"}' );
|
758 |
+
}
|
759 |
+
|
760 |
+
// Extend with custom data
|
761 |
+
if ( $.isPlainObject( customData ) ) {
|
762 |
+
qs = $.extend( qs, customData, plugin.settings.queryStringData ); // The dev has always the final word
|
763 |
+
}
|
764 |
+
|
765 |
+
// Return querystring as a string
|
766 |
+
return $
|
767 |
+
.map( qs, function (val, key) {
|
768 |
+
if ( val && val > '' ) {
|
769 |
+
return encodeURIComponent( key ) + '=' + encodeURIComponent( val );
|
770 |
+
}
|
771 |
+
})
|
772 |
+
.join('&');
|
773 |
+
},
|
774 |
+
|
775 |
+
/**
|
776 |
+
* Get video iframe code from URL
|
777 |
+
*/
|
778 |
+
getVideo : function( url ) {
|
779 |
+
var iframe = '',
|
780 |
+
youtubeUrl = url.match( /((?:www\.)?youtube\.com|(?:www\.)?youtube-nocookie\.com)\/watch\?v=([a-zA-Z0-9\-_]+)/ ),
|
781 |
+
youtubeShortUrl = url.match(/(?:www\.)?youtu\.be\/([a-zA-Z0-9\-_]+)/),
|
782 |
+
vimeoUrl = url.match( /(?:www\.)?vimeo\.com\/([0-9]*)/ ),
|
783 |
+
qs = '';
|
784 |
+
if ( youtubeUrl || youtubeShortUrl) {
|
785 |
+
if ( youtubeShortUrl ) {
|
786 |
+
youtubeUrl = youtubeShortUrl;
|
787 |
+
}
|
788 |
+
qs = ui.parseUri( url, {
|
789 |
+
'autoplay' : ( plugin.settings.autoplayVideos ? '1' : '0' ),
|
790 |
+
'v' : ''
|
791 |
+
});
|
792 |
+
iframe = '<iframe width="560" height="315" src="//' + youtubeUrl[1] + '/embed/' + youtubeUrl[2] + '?' + qs + '" frameborder="0" allowfullscreen></iframe>';
|
793 |
+
|
794 |
+
} else if ( vimeoUrl ) {
|
795 |
+
qs = ui.parseUri( url, {
|
796 |
+
'autoplay' : ( plugin.settings.autoplayVideos ? '1' : '0' ),
|
797 |
+
'byline' : '0',
|
798 |
+
'portrait' : '0',
|
799 |
+
'color': plugin.settings.vimeoColor
|
800 |
+
});
|
801 |
+
iframe = '<iframe width="560" height="315" src="//player.vimeo.com/video/' + vimeoUrl[1] + '?' + qs + '" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>';
|
802 |
+
|
803 |
+
} else {
|
804 |
+
iframe = '<iframe width="560" height="315" src="' + url + '" frameborder="0" allowfullscreen></iframe>';
|
805 |
+
}
|
806 |
+
|
807 |
+
return '<div class="swipebox-video-container" style="max-width:' + plugin.settings.videoMaxWidth + 'px"><div class="swipebox-video">' + iframe + '</div></div>';
|
808 |
+
},
|
809 |
+
|
810 |
+
/**
|
811 |
+
* Load image
|
812 |
+
*/
|
813 |
+
loadMedia : function ( src, callback ) {
|
814 |
+
// Inline content
|
815 |
+
if ( src.trim().indexOf('#') === 0 ) {
|
816 |
+
callback.call(
|
817 |
+
$('<div>', {
|
818 |
+
'class' : 'swipebox-inline-container'
|
819 |
+
})
|
820 |
+
.append(
|
821 |
+
$(src)
|
822 |
+
.clone()
|
823 |
+
.toggleClass( plugin.settings.toggleClassOnLoad )
|
824 |
+
)
|
825 |
+
);
|
826 |
+
}
|
827 |
+
// Everything else
|
828 |
+
else {
|
829 |
+
if ( ! this.isVideo( src ) ) {
|
830 |
+
var img = $( '<img>' ).on( 'load', function() {
|
831 |
+
callback.call( img );
|
832 |
+
} );
|
833 |
+
|
834 |
+
img.attr( 'src', src );
|
835 |
+
}
|
836 |
+
}
|
837 |
+
},
|
838 |
+
|
839 |
+
/**
|
840 |
+
* Get next slide
|
841 |
+
*/
|
842 |
+
getNext : function () {
|
843 |
+
var $this = this,
|
844 |
+
src,
|
845 |
+
index = $( '#swipebox-slider .slide' ).index( $( '#swipebox-slider .slide.current' ) );
|
846 |
+
if ( index + 1 < elements.length ) {
|
847 |
+
|
848 |
+
src = $( '#swipebox-slider .slide' ).eq( index ).contents().find( 'iframe' ).attr( 'src' );
|
849 |
+
$( '#swipebox-slider .slide' ).eq( index ).contents().find( 'iframe' ).attr( 'src', src );
|
850 |
+
index++;
|
851 |
+
$this.setSlide( index );
|
852 |
+
$this.preloadMedia( index+1 );
|
853 |
+
if ( plugin.settings.nextSlide ) {
|
854 |
+
plugin.settings.nextSlide(index);
|
855 |
+
}
|
856 |
+
} else {
|
857 |
+
|
858 |
+
if ( plugin.settings.loopAtEnd === true ) {
|
859 |
+
src = $( '#swipebox-slider .slide' ).eq( index ).contents().find( 'iframe' ).attr( 'src' );
|
860 |
+
$( '#swipebox-slider .slide' ).eq( index ).contents().find( 'iframe' ).attr( 'src', src );
|
861 |
+
index = 0;
|
862 |
+
$this.preloadMedia( index );
|
863 |
+
$this.setSlide( index );
|
864 |
+
$this.preloadMedia( index + 1 );
|
865 |
+
if ( plugin.settings.nextSlide ) {
|
866 |
+
plugin.settings.nextSlide(index);
|
867 |
+
}
|
868 |
+
} else {
|
869 |
+
$( '#swipebox-overlay' ).addClass( 'rightSpring' );
|
870 |
+
setTimeout( function() {
|
871 |
+
$( '#swipebox-overlay' ).removeClass( 'rightSpring' );
|
872 |
+
}, 500 );
|
873 |
+
}
|
874 |
+
}
|
875 |
+
},
|
876 |
+
|
877 |
+
/**
|
878 |
+
* Get previous slide
|
879 |
+
*/
|
880 |
+
getPrev : function () {
|
881 |
+
var index = $( '#swipebox-slider .slide' ).index( $( '#swipebox-slider .slide.current' ) ),
|
882 |
+
src;
|
883 |
+
if ( index > 0 ) {
|
884 |
+
src = $( '#swipebox-slider .slide' ).eq( index ).contents().find( 'iframe').attr( 'src' );
|
885 |
+
$( '#swipebox-slider .slide' ).eq( index ).contents().find( 'iframe' ).attr( 'src', src );
|
886 |
+
index--;
|
887 |
+
this.setSlide( index );
|
888 |
+
this.preloadMedia( index-1 );
|
889 |
+
if ( plugin.settings.prevSlide ) {
|
890 |
+
plugin.settings.prevSlide(index);
|
891 |
+
}
|
892 |
+
} else {
|
893 |
+
$( '#swipebox-overlay' ).addClass( 'leftSpring' );
|
894 |
+
setTimeout( function() {
|
895 |
+
$( '#swipebox-overlay' ).removeClass( 'leftSpring' );
|
896 |
+
}, 500 );
|
897 |
+
}
|
898 |
+
},
|
899 |
+
/* jshint unused:false */
|
900 |
+
nextSlide : function ( index ) {
|
901 |
+
// Callback for next slide
|
902 |
+
},
|
903 |
+
|
904 |
+
prevSlide : function ( index ) {
|
905 |
+
// Callback for prev slide
|
906 |
+
},
|
907 |
+
|
908 |
+
/**
|
909 |
+
* Close
|
910 |
+
*/
|
911 |
+
closeSlide : function () {
|
912 |
+
$( 'html' ).removeClass( 'swipebox-html' );
|
913 |
+
$( 'html' ).removeClass( 'swipebox-touch' );
|
914 |
+
$( window ).trigger( 'resize' );
|
915 |
+
this.destroy();
|
916 |
+
},
|
917 |
+
|
918 |
+
/**
|
919 |
+
* Destroy the whole thing
|
920 |
+
*/
|
921 |
+
destroy : function () {
|
922 |
+
$( window ).unbind( 'keyup' );
|
923 |
+
$( 'body' ).unbind( 'touchstart' );
|
924 |
+
$( 'body' ).unbind( 'touchmove' );
|
925 |
+
$( 'body' ).unbind( 'touchend' );
|
926 |
+
$( '#swipebox-slider' ).unbind();
|
927 |
+
$( '#swipebox-overlay' ).remove();
|
928 |
+
|
929 |
+
if ( ! $.isArray( elem ) ) {
|
930 |
+
elem.removeData( '_swipebox' );
|
931 |
+
}
|
932 |
+
|
933 |
+
if ( this.target ) {
|
934 |
+
this.target.trigger( 'swipebox-destroy' );
|
935 |
+
}
|
936 |
+
|
937 |
+
$.swipebox.isOpen = false;
|
938 |
+
|
939 |
+
if ( plugin.settings.afterClose ) {
|
940 |
+
plugin.settings.afterClose();
|
941 |
+
}
|
942 |
+
}
|
943 |
+
};
|
944 |
+
|
945 |
+
plugin.init();
|
946 |
+
};
|
947 |
+
|
948 |
+
$.fn.swipebox = function( options ) {
|
949 |
+
|
950 |
+
if ( ! $.data( this, '_swipebox' ) ) {
|
951 |
+
var swipebox = new $.swipebox( this, options );
|
952 |
+
this.data( '_swipebox', swipebox );
|
953 |
+
}
|
954 |
+
return this.data( '_swipebox' );
|
955 |
+
|
956 |
+
};
|
957 |
+
|
958 |
+
}( window, document, jQuery ) );
|
assets/swipebox/jquery.swipebox.min.js
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
/*! Swipebox v1.4.4 | Constantin Saguin csag.co | MIT License | github.com/brutaldesign/swipebox */
|
2 |
+
!function(a,b,c,d){c.swipebox=function(e,f){var g,h,i={useCSS:!0,useSVG:!0,initialIndexOnArray:0,removeBarsOnMobile:!0,hideCloseButtonOnMobile:!1,hideBarsDelay:3e3,videoMaxWidth:1140,vimeoColor:"cccccc",beforeOpen:null,afterOpen:null,afterClose:null,afterMedia:null,nextSlide:null,prevSlide:null,loopAtEnd:!1,autoplayVideos:!1,queryStringData:{},toggleClassOnLoad:""},j=this,k=[],l=e.selector,m=navigator.userAgent.match(/(iPad)|(iPhone)|(iPod)|(Android)|(PlayBook)|(BB10)|(BlackBerry)|(Opera Mini)|(IEMobile)|(webOS)|(MeeGo)/i),n=null!==m||b.createTouch!==d||"ontouchstart"in a||"onmsgesturechange"in a||navigator.msMaxTouchPoints,o=!!b.createElementNS&&!!b.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,p=a.innerWidth?a.innerWidth:c(a).width(),q=a.innerHeight?a.innerHeight:c(a).height(),r=0,s='<div id="swipebox-overlay"> <div id="swipebox-container"> <div id="swipebox-slider"></div> <div id="swipebox-top-bar"> <div id="swipebox-title"></div> </div> <div id="swipebox-bottom-bar"> <div id="swipebox-arrows"> <a id="swipebox-prev"></a> <a id="swipebox-next"></a> </div> </div> <a id="swipebox-close"></a> </div> </div>';j.settings={},c.swipebox.close=function(){g.closeSlide()},c.swipebox.extend=function(){return g},j.init=function(){j.settings=c.extend({},i,f),c.isArray(e)?(k=e,g.target=c(a),g.init(j.settings.initialIndexOnArray)):c(b).on("click",l,function(a){if("slide current"===a.target.parentNode.className)return!1;c.isArray(e)||(g.destroy(),h=c(l),g.actions()),k=[];var b,d,f;f||(d="data-rel",f=c(this).attr(d)),f||(d="rel",f=c(this).attr(d)),h=f&&""!==f&&"nofollow"!==f?c(l).filter("["+d+'="'+f+'"]'):c(l),h.each(function(){var a=null,b=null;c(this).attr("title")&&(a=c(this).attr("title")),c(this).attr("href")&&(b=c(this).attr("href")),k.push({href:b,title:a})}),b=h.index(c(this)),a.preventDefault(),a.stopPropagation(),g.target=c(a.target),g.init(b)})},g={init:function(a){j.settings.beforeOpen&&j.settings.beforeOpen(),this.target.trigger("swipebox-start"),c.swipebox.isOpen=!0,this.build(),this.openSlide(a),this.openMedia(a),this.preloadMedia(a+1),this.preloadMedia(a-1),j.settings.afterOpen&&j.settings.afterOpen(a)},build:function(){var a,b=this;c("body").append(s),o&&j.settings.useSVG===!0&&(a=c("#swipebox-close").css("background-image"),a=a.replace("png","svg"),c("#swipebox-prev, #swipebox-next, #swipebox-close").css({"background-image":a})),m&&j.settings.removeBarsOnMobile&&c("#swipebox-bottom-bar, #swipebox-top-bar").remove(),c.each(k,function(){c("#swipebox-slider").append('<div class="slide"></div>')}),b.setDim(),b.actions(),n&&b.gesture(),b.keyboard(),b.animBars(),b.resize()},setDim:function(){var b,d,e={};"onorientationchange"in a?a.addEventListener("orientationchange",function(){0===a.orientation?(b=p,d=q):(90===a.orientation||-90===a.orientation)&&(b=q,d=p)},!1):(b=a.innerWidth?a.innerWidth:c(a).width(),d=a.innerHeight?a.innerHeight:c(a).height()),e={width:b,height:d},c("#swipebox-overlay").css(e)},resize:function(){var b=this;c(a).resize(function(){b.setDim()}).resize()},supportTransition:function(){var a,c="transition WebkitTransition MozTransition OTransition msTransition KhtmlTransition".split(" ");for(a=0;a<c.length;a++)if(b.createElement("div").style[c[a]]!==d)return c[a];return!1},doCssTrans:function(){return j.settings.useCSS&&this.supportTransition()?!0:void 0},gesture:function(){var a,b,d,e,f,g,h=this,i=!1,j=!1,l=10,m=50,n={},o={},q=c("#swipebox-top-bar, #swipebox-bottom-bar"),s=c("#swipebox-slider");q.addClass("visible-bars"),h.setTimeout(),c("body").bind("touchstart",function(h){return c(this).addClass("touching"),a=c("#swipebox-slider .slide").index(c("#swipebox-slider .slide.current")),o=h.originalEvent.targetTouches[0],n.pageX=h.originalEvent.targetTouches[0].pageX,n.pageY=h.originalEvent.targetTouches[0].pageY,c("#swipebox-slider").css({"-webkit-transform":"translate3d("+r+"%, 0, 0)",transform:"translate3d("+r+"%, 0, 0)"}),c(".touching").bind("touchmove",function(h){if(h.preventDefault(),h.stopPropagation(),o=h.originalEvent.targetTouches[0],!j&&(f=d,d=o.pageY-n.pageY,Math.abs(d)>=m||i)){var q=.75-Math.abs(d)/s.height();s.css({top:d+"px"}),s.css({opacity:q}),i=!0}e=b,b=o.pageX-n.pageX,g=100*b/p,!j&&!i&&Math.abs(b)>=l&&(c("#swipebox-slider").css({"-webkit-transition":"",transition:""}),j=!0),j&&(b>0?0===a?c("#swipebox-overlay").addClass("leftSpringTouch"):(c("#swipebox-overlay").removeClass("leftSpringTouch").removeClass("rightSpringTouch"),c("#swipebox-slider").css({"-webkit-transform":"translate3d("+(r+g)+"%, 0, 0)",transform:"translate3d("+(r+g)+"%, 0, 0)"})):0>b&&(k.length===a+1?c("#swipebox-overlay").addClass("rightSpringTouch"):(c("#swipebox-overlay").removeClass("leftSpringTouch").removeClass("rightSpringTouch"),c("#swipebox-slider").css({"-webkit-transform":"translate3d("+(r+g)+"%, 0, 0)",transform:"translate3d("+(r+g)+"%, 0, 0)"}))))}),!1}).bind("touchend",function(a){if(a.preventDefault(),a.stopPropagation(),c("#swipebox-slider").css({"-webkit-transition":"-webkit-transform 0.4s ease",transition:"transform 0.4s ease"}),d=o.pageY-n.pageY,b=o.pageX-n.pageX,g=100*b/p,i)if(i=!1,Math.abs(d)>=2*m&&Math.abs(d)>Math.abs(f)){var k=d>0?s.height():-s.height();s.animate({top:k+"px",opacity:0},300,function(){h.closeSlide()})}else s.animate({top:0,opacity:1},300);else j?(j=!1,b>=l&&b>=e?h.getPrev():-l>=b&&e>=b&&h.getNext()):q.hasClass("visible-bars")?(h.clearTimeout(),h.hideBars()):(h.showBars(),h.setTimeout());c("#swipebox-slider").css({"-webkit-transform":"translate3d("+r+"%, 0, 0)",transform:"translate3d("+r+"%, 0, 0)"}),c("#swipebox-overlay").removeClass("leftSpringTouch").removeClass("rightSpringTouch"),c(".touching").off("touchmove").removeClass("touching")})},setTimeout:function(){if(j.settings.hideBarsDelay>0){var b=this;b.clearTimeout(),b.timeout=a.setTimeout(function(){b.hideBars()},j.settings.hideBarsDelay)}},clearTimeout:function(){a.clearTimeout(this.timeout),this.timeout=null},showBars:function(){var a=c("#swipebox-top-bar, #swipebox-bottom-bar");this.doCssTrans()?a.addClass("visible-bars"):(c("#swipebox-top-bar").animate({top:0},500),c("#swipebox-bottom-bar").animate({bottom:0},500),setTimeout(function(){a.addClass("visible-bars")},1e3))},hideBars:function(){var a=c("#swipebox-top-bar, #swipebox-bottom-bar");this.doCssTrans()?a.removeClass("visible-bars"):(c("#swipebox-top-bar").animate({top:"-50px"},500),c("#swipebox-bottom-bar").animate({bottom:"-50px"},500),setTimeout(function(){a.removeClass("visible-bars")},1e3))},animBars:function(){var a=this,b=c("#swipebox-top-bar, #swipebox-bottom-bar");b.addClass("visible-bars"),a.setTimeout(),c("#swipebox-slider").click(function(){b.hasClass("visible-bars")||(a.showBars(),a.setTimeout())}),c("#swipebox-bottom-bar").hover(function(){a.showBars(),b.addClass("visible-bars"),a.clearTimeout()},function(){j.settings.hideBarsDelay>0&&(b.removeClass("visible-bars"),a.setTimeout())})},keyboard:function(){var b=this;c(a).bind("keyup",function(a){a.preventDefault(),a.stopPropagation(),37===a.keyCode?b.getPrev():39===a.keyCode?b.getNext():27===a.keyCode&&b.closeSlide()})},actions:function(){var a=this,b="touchend click";k.length<2?(c("#swipebox-bottom-bar").hide(),d===k[1]&&c("#swipebox-top-bar").hide()):(c("#swipebox-prev").bind(b,function(b){b.preventDefault(),b.stopPropagation(),a.getPrev(),a.setTimeout()}),c("#swipebox-next").bind(b,function(b){b.preventDefault(),b.stopPropagation(),a.getNext(),a.setTimeout()})),c("#swipebox-close").bind(b,function(){a.closeSlide()})},setSlide:function(a,b){b=b||!1;var d=c("#swipebox-slider");r=100*-a,this.doCssTrans()?d.css({"-webkit-transform":"translate3d("+100*-a+"%, 0, 0)",transform:"translate3d("+100*-a+"%, 0, 0)"}):d.animate({left:100*-a+"%"}),c("#swipebox-slider .slide").removeClass("current"),c("#swipebox-slider .slide").eq(a).addClass("current"),this.setTitle(a),b&&d.fadeIn(),c("#swipebox-prev, #swipebox-next").removeClass("disabled"),0===a?c("#swipebox-prev").addClass("disabled"):a===k.length-1&&j.settings.loopAtEnd!==!0&&c("#swipebox-next").addClass("disabled")},openSlide:function(b){c("html").addClass("swipebox-html"),n?(c("html").addClass("swipebox-touch"),j.settings.hideCloseButtonOnMobile&&c("html").addClass("swipebox-no-close-button")):c("html").addClass("swipebox-no-touch"),c(a).trigger("resize"),this.setSlide(b,!0)},preloadMedia:function(a){var b=this,c=null;k[a]!==d&&(c=k[a].href),b.isVideo(c)?b.openMedia(a):setTimeout(function(){b.openMedia(a)},1e3)},openMedia:function(a){var b,e,f=this;return k[a]!==d&&(b=k[a].href),0>a||a>=k.length?!1:(e=c("#swipebox-slider .slide").eq(a),void(f.isVideo(b)?(e.html(f.getVideo(b)),j.settings.afterMedia&&j.settings.afterMedia(a)):(e.addClass("slide-loading"),f.loadMedia(b,function(){e.removeClass("slide-loading"),e.html(this),j.settings.afterMedia&&j.settings.afterMedia(a)}))))},setTitle:function(a){var b=null;c("#swipebox-title").empty(),k[a]!==d&&(b=k[a].title),b?(c("#swipebox-top-bar").show(),c("#swipebox-title").append(b)):c("#swipebox-top-bar").hide()},isVideo:function(a){if(a){if(a.match(/(youtube\.com|youtube-nocookie\.com)\/watch\?v=([a-zA-Z0-9\-_]+)/)||a.match(/vimeo\.com\/([0-9]*)/)||a.match(/youtu\.be\/([a-zA-Z0-9\-_]+)/))return!0;if(a.toLowerCase().indexOf("swipeboxvideo=1")>=0)return!0}},parseUri:function(a,d){var e=b.createElement("a"),f={};return e.href=decodeURIComponent(a),e.search&&(f=JSON.parse('{"'+e.search.toLowerCase().replace("?","").replace(/&/g,'","').replace(/=/g,'":"')+'"}')),c.isPlainObject(d)&&(f=c.extend(f,d,j.settings.queryStringData)),c.map(f,function(a,b){return a&&a>""?encodeURIComponent(b)+"="+encodeURIComponent(a):void 0}).join("&")},getVideo:function(a){var b="",c=a.match(/((?:www\.)?youtube\.com|(?:www\.)?youtube-nocookie\.com)\/watch\?v=([a-zA-Z0-9\-_]+)/),d=a.match(/(?:www\.)?youtu\.be\/([a-zA-Z0-9\-_]+)/),e=a.match(/(?:www\.)?vimeo\.com\/([0-9]*)/),f="";return c||d?(d&&(c=d),f=g.parseUri(a,{autoplay:j.settings.autoplayVideos?"1":"0",v:""}),b='<iframe width="560" height="315" src="//'+c[1]+"/embed/"+c[2]+"?"+f+'" frameborder="0" allowfullscreen></iframe>'):e?(f=g.parseUri(a,{autoplay:j.settings.autoplayVideos?"1":"0",byline:"0",portrait:"0",color:j.settings.vimeoColor}),b='<iframe width="560" height="315" src="//player.vimeo.com/video/'+e[1]+"?"+f+'" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>'):b='<iframe width="560" height="315" src="'+a+'" frameborder="0" allowfullscreen></iframe>','<div class="swipebox-video-container" style="max-width:'+j.settings.videoMaxWidth+'px"><div class="swipebox-video">'+b+"</div></div>"},loadMedia:function(a,b){if(0===a.trim().indexOf("#"))b.call(c("<div>",{"class":"swipebox-inline-container"}).append(c(a).clone().toggleClass(j.settings.toggleClassOnLoad)));else if(!this.isVideo(a)){var d=c("<img>").on("load",function(){b.call(d)});d.attr("src",a)}},getNext:function(){var a,b=this,d=c("#swipebox-slider .slide").index(c("#swipebox-slider .slide.current"));d+1<k.length?(a=c("#swipebox-slider .slide").eq(d).contents().find("iframe").attr("src"),c("#swipebox-slider .slide").eq(d).contents().find("iframe").attr("src",a),d++,b.setSlide(d),b.preloadMedia(d+1),j.settings.nextSlide&&j.settings.nextSlide(d)):j.settings.loopAtEnd===!0?(a=c("#swipebox-slider .slide").eq(d).contents().find("iframe").attr("src"),c("#swipebox-slider .slide").eq(d).contents().find("iframe").attr("src",a),d=0,b.preloadMedia(d),b.setSlide(d),b.preloadMedia(d+1),j.settings.nextSlide&&j.settings.nextSlide(d)):(c("#swipebox-overlay").addClass("rightSpring"),setTimeout(function(){c("#swipebox-overlay").removeClass("rightSpring")},500))},getPrev:function(){var a,b=c("#swipebox-slider .slide").index(c("#swipebox-slider .slide.current"));b>0?(a=c("#swipebox-slider .slide").eq(b).contents().find("iframe").attr("src"),c("#swipebox-slider .slide").eq(b).contents().find("iframe").attr("src",a),b--,this.setSlide(b),this.preloadMedia(b-1),j.settings.prevSlide&&j.settings.prevSlide(b)):(c("#swipebox-overlay").addClass("leftSpring"),setTimeout(function(){c("#swipebox-overlay").removeClass("leftSpring")},500))},nextSlide:function(a){},prevSlide:function(a){},closeSlide:function(){c("html").removeClass("swipebox-html"),c("html").removeClass("swipebox-touch"),c(a).trigger("resize"),this.destroy()},destroy:function(){c(a).unbind("keyup"),c("body").unbind("touchstart"),c("body").unbind("touchmove"),c("body").unbind("touchend"),c("#swipebox-slider").unbind(),c("#swipebox-overlay").remove(),c.isArray(e)||e.removeData("_swipebox"),this.target&&this.target.trigger("swipebox-destroy"),c.swipebox.isOpen=!1,j.settings.afterClose&&j.settings.afterClose()}},j.init()},c.fn.swipebox=function(a){if(!c.data(this,"_swipebox")){var b=new c.swipebox(this,a);this.data("_swipebox",b)}return this.data("_swipebox")}}(window,document,jQuery);
|
assets/swipebox/swipebox.css
ADDED
@@ -0,0 +1,295 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*! Swipebox v1.3.0 | Constantin Saguin csag.co | MIT License | github.com/brutaldesign/swipebox */
|
2 |
+
html.swipebox-html.swipebox-touch {
|
3 |
+
overflow: hidden !important;
|
4 |
+
}
|
5 |
+
|
6 |
+
#swipebox-overlay img {
|
7 |
+
border: none !important;
|
8 |
+
}
|
9 |
+
|
10 |
+
#swipebox-overlay {
|
11 |
+
width: 100%;
|
12 |
+
height: 100%;
|
13 |
+
position: fixed;
|
14 |
+
top: 0;
|
15 |
+
left: 0;
|
16 |
+
z-index: 99999 !important;
|
17 |
+
overflow: hidden;
|
18 |
+
-webkit-user-select: none;
|
19 |
+
-moz-user-select: none;
|
20 |
+
-ms-user-select: none;
|
21 |
+
user-select: none;
|
22 |
+
}
|
23 |
+
|
24 |
+
#swipebox-container {
|
25 |
+
position: relative;
|
26 |
+
width: 100%;
|
27 |
+
height: 100%;
|
28 |
+
}
|
29 |
+
|
30 |
+
#swipebox-slider {
|
31 |
+
-webkit-transition: -webkit-transform 0.4s ease;
|
32 |
+
transition: transform 0.4s ease;
|
33 |
+
height: 100%;
|
34 |
+
left: 0;
|
35 |
+
top: 0;
|
36 |
+
width: 100%;
|
37 |
+
white-space: nowrap;
|
38 |
+
position: absolute;
|
39 |
+
display: none;
|
40 |
+
cursor: pointer;
|
41 |
+
}
|
42 |
+
#swipebox-slider .slide {
|
43 |
+
height: 100%;
|
44 |
+
width: 100%;
|
45 |
+
line-height: 1px;
|
46 |
+
text-align: center;
|
47 |
+
display: inline-block;
|
48 |
+
}
|
49 |
+
#swipebox-slider .slide:before {
|
50 |
+
content: "";
|
51 |
+
display: inline-block;
|
52 |
+
height: 50%;
|
53 |
+
width: 1px;
|
54 |
+
margin-right: -1px;
|
55 |
+
}
|
56 |
+
#swipebox-slider .slide img,
|
57 |
+
#swipebox-slider .slide .swipebox-video-container,
|
58 |
+
#swipebox-slider .slide .swipebox-inline-container {
|
59 |
+
display: inline-block;
|
60 |
+
max-height: 100%;
|
61 |
+
max-width: 100%;
|
62 |
+
margin: 0;
|
63 |
+
padding: 0;
|
64 |
+
width: auto;
|
65 |
+
height: auto;
|
66 |
+
vertical-align: middle;
|
67 |
+
}
|
68 |
+
#swipebox-slider .slide .swipebox-video-container {
|
69 |
+
background: none;
|
70 |
+
max-width: 1140px;
|
71 |
+
max-height: 100%;
|
72 |
+
width: 100%;
|
73 |
+
padding: 5%;
|
74 |
+
-webkit-box-sizing: border-box;
|
75 |
+
box-sizing: border-box;
|
76 |
+
}
|
77 |
+
#swipebox-slider .slide .swipebox-video-container .swipebox-video {
|
78 |
+
width: 100%;
|
79 |
+
height: 0;
|
80 |
+
padding-bottom: 56.25%;
|
81 |
+
overflow: hidden;
|
82 |
+
position: relative;
|
83 |
+
}
|
84 |
+
#swipebox-slider .slide .swipebox-video-container .swipebox-video iframe {
|
85 |
+
width: 100% !important;
|
86 |
+
height: 100% !important;
|
87 |
+
position: absolute;
|
88 |
+
top: 0;
|
89 |
+
left: 0;
|
90 |
+
}
|
91 |
+
#swipebox-slider .slide-loading {
|
92 |
+
background: url(img/loader.gif) no-repeat center center;
|
93 |
+
}
|
94 |
+
|
95 |
+
#swipebox-bottom-bar,
|
96 |
+
#swipebox-top-bar {
|
97 |
+
-webkit-transition: 0.5s;
|
98 |
+
transition: 0.5s;
|
99 |
+
position: absolute;
|
100 |
+
left: 0;
|
101 |
+
z-index: 999;
|
102 |
+
height: 50px;
|
103 |
+
width: 100%;
|
104 |
+
}
|
105 |
+
|
106 |
+
#swipebox-bottom-bar {
|
107 |
+
bottom: -50px;
|
108 |
+
}
|
109 |
+
#swipebox-bottom-bar.visible-bars {
|
110 |
+
-webkit-transform: translate3d(0, -50px, 0);
|
111 |
+
transform: translate3d(0, -50px, 0);
|
112 |
+
}
|
113 |
+
|
114 |
+
#swipebox-top-bar {
|
115 |
+
top: -50px;
|
116 |
+
}
|
117 |
+
#swipebox-top-bar.visible-bars {
|
118 |
+
-webkit-transform: translate3d(0, 50px, 0);
|
119 |
+
transform: translate3d(0, 50px, 0);
|
120 |
+
}
|
121 |
+
|
122 |
+
#swipebox-title {
|
123 |
+
display: block;
|
124 |
+
width: 100%;
|
125 |
+
text-align: center;
|
126 |
+
}
|
127 |
+
|
128 |
+
#swipebox-prev,
|
129 |
+
#swipebox-next,
|
130 |
+
#swipebox-close {
|
131 |
+
background-image: url(img/icons.png);
|
132 |
+
background-repeat: no-repeat;
|
133 |
+
border: none !important;
|
134 |
+
text-decoration: none !important;
|
135 |
+
cursor: pointer;
|
136 |
+
width: 50px;
|
137 |
+
height: 50px;
|
138 |
+
top: 0;
|
139 |
+
}
|
140 |
+
|
141 |
+
#swipebox-arrows {
|
142 |
+
display: block;
|
143 |
+
margin: 0 auto;
|
144 |
+
width: 100%;
|
145 |
+
height: 50px;
|
146 |
+
}
|
147 |
+
|
148 |
+
#swipebox-prev {
|
149 |
+
background-position: -32px 13px;
|
150 |
+
float: left;
|
151 |
+
}
|
152 |
+
|
153 |
+
#swipebox-next {
|
154 |
+
background-position: -78px 13px;
|
155 |
+
float: right;
|
156 |
+
}
|
157 |
+
|
158 |
+
#swipebox-close {
|
159 |
+
top: 0;
|
160 |
+
right: 0;
|
161 |
+
position: absolute;
|
162 |
+
z-index: 9999;
|
163 |
+
background-position: 15px 12px;
|
164 |
+
}
|
165 |
+
|
166 |
+
.swipebox-no-close-button #swipebox-close {
|
167 |
+
display: none;
|
168 |
+
}
|
169 |
+
|
170 |
+
#swipebox-prev.disabled,
|
171 |
+
#swipebox-next.disabled {
|
172 |
+
opacity: 0.3;
|
173 |
+
}
|
174 |
+
|
175 |
+
.swipebox-no-touch #swipebox-overlay.rightSpring #swipebox-slider {
|
176 |
+
-webkit-animation: rightSpring 0.3s;
|
177 |
+
animation: rightSpring 0.3s;
|
178 |
+
}
|
179 |
+
.swipebox-no-touch #swipebox-overlay.leftSpring #swipebox-slider {
|
180 |
+
-webkit-animation: leftSpring 0.3s;
|
181 |
+
animation: leftSpring 0.3s;
|
182 |
+
}
|
183 |
+
|
184 |
+
.swipebox-touch #swipebox-container:before, .swipebox-touch #swipebox-container:after {
|
185 |
+
-webkit-backface-visibility: hidden;
|
186 |
+
backface-visibility: hidden;
|
187 |
+
-webkit-transition: all .3s ease;
|
188 |
+
transition: all .3s ease;
|
189 |
+
content: ' ';
|
190 |
+
position: absolute;
|
191 |
+
z-index: 999;
|
192 |
+
top: 0;
|
193 |
+
height: 100%;
|
194 |
+
width: 20px;
|
195 |
+
opacity: 0;
|
196 |
+
}
|
197 |
+
.swipebox-touch #swipebox-container:before {
|
198 |
+
left: 0;
|
199 |
+
-webkit-box-shadow: inset 10px 0px 10px -8px #656565;
|
200 |
+
box-shadow: inset 10px 0px 10px -8px #656565;
|
201 |
+
}
|
202 |
+
.swipebox-touch #swipebox-container:after {
|
203 |
+
right: 0;
|
204 |
+
-webkit-box-shadow: inset -10px 0px 10px -8px #656565;
|
205 |
+
box-shadow: inset -10px 0px 10px -8px #656565;
|
206 |
+
}
|
207 |
+
.swipebox-touch #swipebox-overlay.leftSpringTouch #swipebox-container:before {
|
208 |
+
opacity: 1;
|
209 |
+
}
|
210 |
+
.swipebox-touch #swipebox-overlay.rightSpringTouch #swipebox-container:after {
|
211 |
+
opacity: 1;
|
212 |
+
}
|
213 |
+
|
214 |
+
@-webkit-keyframes rightSpring {
|
215 |
+
0% {
|
216 |
+
left: 0;
|
217 |
+
}
|
218 |
+
|
219 |
+
50% {
|
220 |
+
left: -30px;
|
221 |
+
}
|
222 |
+
|
223 |
+
100% {
|
224 |
+
left: 0;
|
225 |
+
}
|
226 |
+
}
|
227 |
+
|
228 |
+
@keyframes rightSpring {
|
229 |
+
0% {
|
230 |
+
left: 0;
|
231 |
+
}
|
232 |
+
|
233 |
+
50% {
|
234 |
+
left: -30px;
|
235 |
+
}
|
236 |
+
|
237 |
+
100% {
|
238 |
+
left: 0;
|
239 |
+
}
|
240 |
+
}
|
241 |
+
@-webkit-keyframes leftSpring {
|
242 |
+
0% {
|
243 |
+
left: 0;
|
244 |
+
}
|
245 |
+
|
246 |
+
50% {
|
247 |
+
left: 30px;
|
248 |
+
}
|
249 |
+
|
250 |
+
100% {
|
251 |
+
left: 0;
|
252 |
+
}
|
253 |
+
}
|
254 |
+
@keyframes leftSpring {
|
255 |
+
0% {
|
256 |
+
left: 0;
|
257 |
+
}
|
258 |
+
|
259 |
+
50% {
|
260 |
+
left: 30px;
|
261 |
+
}
|
262 |
+
|
263 |
+
100% {
|
264 |
+
left: 0;
|
265 |
+
}
|
266 |
+
}
|
267 |
+
@media screen and (min-width: 800px) {
|
268 |
+
#swipebox-close {
|
269 |
+
right: 10px;
|
270 |
+
}
|
271 |
+
|
272 |
+
#swipebox-arrows {
|
273 |
+
width: 92%;
|
274 |
+
max-width: 800px;
|
275 |
+
}
|
276 |
+
}
|
277 |
+
/* Skin
|
278 |
+
--------------------------*/
|
279 |
+
#swipebox-overlay {
|
280 |
+
background: #0d0d0d;
|
281 |
+
}
|
282 |
+
|
283 |
+
#swipebox-bottom-bar,
|
284 |
+
#swipebox-top-bar {
|
285 |
+
text-shadow: 1px 1px 1px black;
|
286 |
+
background: #000;
|
287 |
+
opacity: 0.95;
|
288 |
+
}
|
289 |
+
|
290 |
+
#swipebox-top-bar {
|
291 |
+
color: white !important;
|
292 |
+
font-size: 15px;
|
293 |
+
line-height: 43px;
|
294 |
+
font-family: Helvetica, Arial, sans-serif;
|
295 |
+
}
|
assets/swipebox/swipebox.min.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
html.swipebox-html.swipebox-touch{overflow:hidden!important}#swipebox-overlay img{border:none!important}#swipebox-overlay{width:100%;height:100%;position:fixed;top:0;left:0;z-index:99999!important;overflow:hidden;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#swipebox-container{position:relative;width:100%;height:100%}#swipebox-slider{-webkit-transition:-webkit-transform 0.4s ease;transition:transform 0.4s ease;height:100%;left:0;top:0;width:100%;white-space:nowrap;position:absolute;display:none;cursor:pointer}#swipebox-slider .slide{height:100%;width:100%;line-height:1px;text-align:center;display:inline-block}#swipebox-slider .slide:before{content:"";display:inline-block;height:50%;width:1px;margin-right:-1px}#swipebox-slider .slide img,#swipebox-slider .slide .swipebox-video-container,#swipebox-slider .slide .swipebox-inline-container{display:inline-block;max-height:100%;max-width:100%;margin:0;padding:0;width:auto;height:auto;vertical-align:middle}#swipebox-slider .slide .swipebox-video-container{background:none;max-width:1140px;max-height:100%;width:100%;padding:5%;-webkit-box-sizing:border-box;box-sizing:border-box}#swipebox-slider .slide .swipebox-video-container .swipebox-video{width:100%;height:0;padding-bottom:56.25%;overflow:hidden;position:relative}#swipebox-slider .slide .swipebox-video-container .swipebox-video iframe{width:100%!important;height:100%!important;position:absolute;top:0;left:0}#swipebox-slider .slide-loading{background:url(img/loader.gif) no-repeat center center}#swipebox-bottom-bar,#swipebox-top-bar{-webkit-transition:0.5s;transition:0.5s;position:absolute;left:0;z-index:999;height:50px;width:100%}#swipebox-bottom-bar{bottom:-50px}#swipebox-bottom-bar.visible-bars{-webkit-transform:translate3d(0,-50px,0);transform:translate3d(0,-50px,0)}#swipebox-top-bar{top:-50px}#swipebox-top-bar.visible-bars{-webkit-transform:translate3d(0,50px,0);transform:translate3d(0,50px,0)}#swipebox-title{display:block;width:100%;text-align:center}#swipebox-prev,#swipebox-next,#swipebox-close{background-image:url(img/icons.png);background-repeat:no-repeat;border:none!important;text-decoration:none!important;cursor:pointer;width:50px;height:50px;top:0}#swipebox-arrows{display:block;margin:0 auto;width:100%;height:50px}#swipebox-prev{background-position:-32px 13px;float:left}#swipebox-next{background-position:-78px 13px;float:right}#swipebox-close{top:0;right:0;position:absolute;z-index:9999;background-position:15px 12px}.swipebox-no-close-button #swipebox-close{display:none}#swipebox-prev.disabled,#swipebox-next.disabled{opacity:.3}.swipebox-no-touch #swipebox-overlay.rightSpring #swipebox-slider{-webkit-animation:rightSpring 0.3s;animation:rightSpring 0.3s}.swipebox-no-touch #swipebox-overlay.leftSpring #swipebox-slider{-webkit-animation:leftSpring 0.3s;animation:leftSpring 0.3s}.swipebox-touch #swipebox-container:before,.swipebox-touch #swipebox-container:after{-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-transition:all .3s ease;transition:all .3s ease;content:' ';position:absolute;z-index:999;top:0;height:100%;width:20px;opacity:0}.swipebox-touch #swipebox-container:before{left:0;-webkit-box-shadow:inset 10px 0 10px -8px #656565;box-shadow:inset 10px 0 10px -8px #656565}.swipebox-touch #swipebox-container:after{right:0;-webkit-box-shadow:inset -10px 0 10px -8px #656565;box-shadow:inset -10px 0 10px -8px #656565}.swipebox-touch #swipebox-overlay.leftSpringTouch #swipebox-container:before{opacity:1}.swipebox-touch #swipebox-overlay.rightSpringTouch #swipebox-container:after{opacity:1}@-webkit-keyframes rightSpring{0%{left:0}50%{left:-30px}100%{left:0}}@keyframes rightSpring{0%{left:0}50%{left:-30px}100%{left:0}}@-webkit-keyframes leftSpring{0%{left:0}50%{left:30px}100%{left:0}}@keyframes leftSpring{0%{left:0}50%{left:30px}100%{left:0}}@media screen and (min-width:800px){#swipebox-close{right:10px}#swipebox-arrows{width:92%;max-width:800px}}#swipebox-overlay{background:#0d0d0d}#swipebox-bottom-bar,#swipebox-top-bar{text-shadow:1px 1px 1px black;background:#000;opacity:.95}#swipebox-top-bar{color:white!important;font-size:15px;line-height:43px;font-family:Helvetica,Arial,sans-serif}
|
assets/tosrus/css/jquery.tosrus.all.css
DELETED
@@ -1,605 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
jQuery Touch Optimized Sliders "R"Us
|
3 |
-
Core CSS
|
4 |
-
*/
|
5 |
-
.tos-noanimation {
|
6 |
-
-webkit-transition-property: none !important;
|
7 |
-
-moz-transition-property: none !important;
|
8 |
-
-ms-transition-property: none !important;
|
9 |
-
-o-transition-property: none !important;
|
10 |
-
transition-property: none !important; }
|
11 |
-
|
12 |
-
.tos-fastanimation {
|
13 |
-
-webkit-transition-duration: 0.2s !important;
|
14 |
-
-moz-transition-duration: 0.2s !important;
|
15 |
-
-ms-transition-duration: 0.2s !important;
|
16 |
-
-o-transition-duration: 0.2s !important;
|
17 |
-
transition-duration: 0.2s !important;
|
18 |
-
-webkit-transition-timing-function: ease-out !important;
|
19 |
-
-moz-transition-timing-function: ease-out !important;
|
20 |
-
-ms-transition-timing-function: ease-out !important;
|
21 |
-
-o-transition-timing-function: ease-out !important;
|
22 |
-
transition-timing-function: ease-out !important; }
|
23 |
-
|
24 |
-
.tos-wrapper {
|
25 |
-
opacity: 0;
|
26 |
-
-webkit-transition: opacity 0.4s ease;
|
27 |
-
-moz-transition: opacity 0.4s ease;
|
28 |
-
-ms-transition: opacity 0.4s ease;
|
29 |
-
-o-transition: opacity 0.4s ease;
|
30 |
-
transition: opacity 0.4s ease;
|
31 |
-
display: none;
|
32 |
-
width: 100%;
|
33 |
-
height: 100%;
|
34 |
-
padding: 0;
|
35 |
-
margin: 0;
|
36 |
-
overflow: hidden; }
|
37 |
-
.tos-wrapper.tos-opened {
|
38 |
-
display: block; }
|
39 |
-
.tos-wrapper.tos-opening {
|
40 |
-
opacity: 1; }
|
41 |
-
.tos-wrapper.tos-fixed {
|
42 |
-
background-color: black;
|
43 |
-
position: fixed;
|
44 |
-
top: 0;
|
45 |
-
left: 0;
|
46 |
-
z-index: 9000; }
|
47 |
-
.tos-wrapper.tos-inline {
|
48 |
-
position: relative; }
|
49 |
-
|
50 |
-
.tos-slider {
|
51 |
-
white-space: nowrap;
|
52 |
-
width: 100%;
|
53 |
-
height: 100%;
|
54 |
-
padding: 0;
|
55 |
-
margin: 0;
|
56 |
-
position: relative; }
|
57 |
-
|
58 |
-
.tos-wrapper.tos-fx-slide .tos-slider {
|
59 |
-
left: 0;
|
60 |
-
-webkit-transition: left 0.4s ease;
|
61 |
-
-moz-transition: left 0.4s ease;
|
62 |
-
-ms-transition: left 0.4s ease;
|
63 |
-
-o-transition: left 0.4s ease;
|
64 |
-
transition: left 0.4s ease; }
|
65 |
-
.tos-wrapper.tos-fx-slide.tos-fixed .tos-slider {
|
66 |
-
position: absolute; }
|
67 |
-
|
68 |
-
.tos-wrapper.tos-fx-fade .tos-slider {
|
69 |
-
opacity: 1;
|
70 |
-
-webkit-transition: opacity 0.4s ease;
|
71 |
-
-moz-transition: opacity 0.4s ease;
|
72 |
-
-ms-transition: opacity 0.4s ease;
|
73 |
-
-o-transition: opacity 0.4s ease;
|
74 |
-
transition: opacity 0.4s ease; }
|
75 |
-
|
76 |
-
.tos-uibg {
|
77 |
-
background-image: -webkit-linear-gradient(bottom, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0) 100%);
|
78 |
-
background-image: -moz-linear-gradient(bottom, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0) 100%);
|
79 |
-
background-image: -ms-linear-gradient(bottom, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0) 100%);
|
80 |
-
background-image: -o-linear-gradient(bottom, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0) 100%);
|
81 |
-
background-image: linear-gradient(bottom, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0) 100%);
|
82 |
-
-webkit-transition: opacity 0.4s ease;
|
83 |
-
-moz-transition: opacity 0.4s ease;
|
84 |
-
-ms-transition: opacity 0.4s ease;
|
85 |
-
-o-transition: opacity 0.4s ease;
|
86 |
-
transition: opacity 0.4s ease;
|
87 |
-
opacity: 0;
|
88 |
-
width: 100%;
|
89 |
-
position: absolute;
|
90 |
-
left: 0;
|
91 |
-
bottom: 0;
|
92 |
-
z-index: 1; }
|
93 |
-
|
94 |
-
.tos-desktop .tos-wrapper:hover .tos-uibg,
|
95 |
-
.tos-touch .tos-wrapper.tos-hover .tos-uibg {
|
96 |
-
opacity: 1; }
|
97 |
-
|
98 |
-
.tos-slide {
|
99 |
-
-webkit-overflow-scrolling: touch;
|
100 |
-
line-height: 1px;
|
101 |
-
text-align: center;
|
102 |
-
box-sizing: border-box;
|
103 |
-
display: inline-block;
|
104 |
-
width: 100%;
|
105 |
-
height: 100%;
|
106 |
-
overflow: hidden;
|
107 |
-
position: relative; }
|
108 |
-
.tos-slide:before {
|
109 |
-
content: "";
|
110 |
-
display: inline-block;
|
111 |
-
height: 50%;
|
112 |
-
width: 1px;
|
113 |
-
margin-right: -1px; }
|
114 |
-
.tos-slide.tos-loading > * {
|
115 |
-
opacity: 0; }
|
116 |
-
.tos-slide > * {
|
117 |
-
opacity: 1;
|
118 |
-
-webkit-transition: opacity 0.4s ease;
|
119 |
-
-moz-transition: opacity 0.4s ease;
|
120 |
-
-ms-transition: opacity 0.4s ease;
|
121 |
-
-o-transition: opacity 0.4s ease;
|
122 |
-
transition: opacity 0.4s ease; }
|
123 |
-
|
124 |
-
.tos-slide > * {
|
125 |
-
vertical-align: middle;
|
126 |
-
display: inline-block;
|
127 |
-
max-height: 100%;
|
128 |
-
max-width: 100%;
|
129 |
-
box-sizing: border-box; }
|
130 |
-
.tos-slide.tos-html > div {
|
131 |
-
-webkit-overflow-scrolling: touch;
|
132 |
-
white-space: normal;
|
133 |
-
text-align: left;
|
134 |
-
line-height: 1.5; }
|
135 |
-
.tos-slide.tos-html > div * {
|
136 |
-
-webkit-text-size-adjust: none;
|
137 |
-
-moz-text-size-adjust: none;
|
138 |
-
-ms-text-size-adjust: none;
|
139 |
-
-o-text-size-adjust: none;
|
140 |
-
text-size-adjust: none; }
|
141 |
-
|
142 |
-
.tos-wrapper.tos-fill .tos-slide.tos-image > img {
|
143 |
-
max-height: none;
|
144 |
-
max-width: none;
|
145 |
-
min-height: 100%;
|
146 |
-
min-width: 100%; }
|
147 |
-
.tos-wrapper.tos-fixed .tos-slide.tos-html > div {
|
148 |
-
background-color: white;
|
149 |
-
color: #333333;
|
150 |
-
box-sizing: border-box;
|
151 |
-
display: inline-block;
|
152 |
-
padding: 40px;
|
153 |
-
overflow: auto; }
|
154 |
-
|
155 |
-
.tos-desktop .tos-wrapper.tos-fixed {
|
156 |
-
background-color: rgba(0, 0, 0, 0.85); }
|
157 |
-
.tos-desktop .tos-wrapper.tos-fixed.tos-fit .tos-slide {
|
158 |
-
padding: 20px; }
|
159 |
-
|
160 |
-
/*
|
161 |
-
jQuery Touch Optimized Sliders "R"Us
|
162 |
-
Buttons addon
|
163 |
-
*/
|
164 |
-
.tos-prev,
|
165 |
-
.tos-next,
|
166 |
-
.tos-close {
|
167 |
-
background: black;
|
168 |
-
border-radius: 3px;
|
169 |
-
opacity: 0;
|
170 |
-
display: block;
|
171 |
-
width: 40px;
|
172 |
-
position: absolute;
|
173 |
-
z-index: 1;
|
174 |
-
-webkit-transition: opacity 0.4s ease;
|
175 |
-
-moz-transition: opacity 0.4s ease;
|
176 |
-
-ms-transition: opacity 0.4s ease;
|
177 |
-
-o-transition: opacity 0.4s ease;
|
178 |
-
transition: opacity 0.4s ease; }
|
179 |
-
|
180 |
-
.tos-prev,
|
181 |
-
.tos-next {
|
182 |
-
height: 80px;
|
183 |
-
margin-top: -40px;
|
184 |
-
top: 50%; }
|
185 |
-
.tos-prev.tos-disabled,
|
186 |
-
.tos-next.tos-disabled {
|
187 |
-
cursor: default; }
|
188 |
-
|
189 |
-
.tos-prev {
|
190 |
-
left: 20px; }
|
191 |
-
|
192 |
-
.tos-next {
|
193 |
-
right: 20px; }
|
194 |
-
|
195 |
-
.tos-close {
|
196 |
-
height: 40px;
|
197 |
-
top: 20px;
|
198 |
-
right: 20px; }
|
199 |
-
|
200 |
-
.tos-desktop .tos-wrapper:hover .tos-prev,
|
201 |
-
.tos-desktop .tos-wrapper:hover .tos-next,
|
202 |
-
.tos-desktop .tos-wrapper:hover .tos-close,
|
203 |
-
.tos-touch .tos-wrapper.tos-hover .tos-prev,
|
204 |
-
.tos-touch .tos-wrapper.tos-hover .tos-next,
|
205 |
-
.tos-touch .tos-wrapper.tos-hover .tos-close {
|
206 |
-
opacity: 0.5; }
|
207 |
-
.tos-desktop .tos-wrapper:hover .tos-prev:hover,
|
208 |
-
.tos-desktop .tos-wrapper:hover .tos-next:hover,
|
209 |
-
.tos-desktop .tos-wrapper:hover .tos-close:hover,
|
210 |
-
.tos-touch .tos-wrapper.tos-hover .tos-prev:hover,
|
211 |
-
.tos-touch .tos-wrapper.tos-hover .tos-next:hover,
|
212 |
-
.tos-touch .tos-wrapper.tos-hover .tos-close:hover {
|
213 |
-
opacity: 0.9; }
|
214 |
-
.tos-desktop .tos-wrapper:hover .tos-prev.tos-disabled,
|
215 |
-
.tos-desktop .tos-wrapper:hover .tos-next.tos-disabled,
|
216 |
-
.tos-desktop .tos-wrapper:hover .tos-close.tos-disabled,
|
217 |
-
.tos-touch .tos-wrapper.tos-hover .tos-prev.tos-disabled,
|
218 |
-
.tos-touch .tos-wrapper.tos-hover .tos-next.tos-disabled,
|
219 |
-
.tos-touch .tos-wrapper.tos-hover .tos-close.tos-disabled {
|
220 |
-
opacity: 0.2; }
|
221 |
-
|
222 |
-
.tos-prev span,
|
223 |
-
.tos-next span,
|
224 |
-
.tos-close span:before,
|
225 |
-
.tos-close span:after {
|
226 |
-
content: '';
|
227 |
-
display: block;
|
228 |
-
width: 12px;
|
229 |
-
height: 12px;
|
230 |
-
margin: -5px;
|
231 |
-
position: absolute;
|
232 |
-
top: 50%;
|
233 |
-
-webkit-transform: rotate(45deg);
|
234 |
-
-moz-transform: rotate(45deg);
|
235 |
-
-ms-transform: rotate(45deg);
|
236 |
-
-o-transform: rotate(45deg);
|
237 |
-
transform: rotate(45deg); }
|
238 |
-
|
239 |
-
.tos-close span:before,
|
240 |
-
.tos-close span:after {
|
241 |
-
width: 6px;
|
242 |
-
height: 6px;
|
243 |
-
margin-top: -4px;
|
244 |
-
margin-left: 0;
|
245 |
-
margin-right: 0; }
|
246 |
-
|
247 |
-
.tos-prev span,
|
248 |
-
.tos-close span:before {
|
249 |
-
border-bottom: 3px solid white;
|
250 |
-
border-left: 3px solid white;
|
251 |
-
left: 50%; }
|
252 |
-
|
253 |
-
.tos-next span,
|
254 |
-
.tos-close span:after {
|
255 |
-
border-top: 3px solid white;
|
256 |
-
border-right: 3px solid white;
|
257 |
-
right: 50%; }
|
258 |
-
|
259 |
-
.tos-desktop .tos-wrapper.tos-fixed.tos-fit.tos-has-prev .tos-slide, .tos-desktop .tos-wrapper.tos-fixed.tos-fit.tos-has-next .tos-slide, .tos-desktop .tos-wrapper.tos-fixed.tos-fit.tos-has-close .tos-slide {
|
260 |
-
padding-left: 80px;
|
261 |
-
padding-right: 80px; }
|
262 |
-
|
263 |
-
.tos-inline {
|
264 |
-
opacity: 0;
|
265 |
-
-webkit-transition: opacity 0.4s ease;
|
266 |
-
-moz-transition: opacity 0.4s ease;
|
267 |
-
-ms-transition: opacity 0.4s ease;
|
268 |
-
-o-transition: opacity 0.4s ease;
|
269 |
-
transition: opacity 0.4s ease;
|
270 |
-
display: inline-block;
|
271 |
-
margin: 0;
|
272 |
-
position: relative;
|
273 |
-
top: auto;
|
274 |
-
left: auto;
|
275 |
-
right: auto; }
|
276 |
-
.tos-inline.tos-prev {
|
277 |
-
margin-right: -60px; }
|
278 |
-
.tos-inline.tos-next {
|
279 |
-
margin-left: -60px; }
|
280 |
-
|
281 |
-
.tos-loading .tos-inline {
|
282 |
-
opacity: 0 !important; }
|
283 |
-
|
284 |
-
.tos-touch.tos-scale-2 .tos-wrapper.tos-fixed .tos-prev,
|
285 |
-
.tos-touch.tos-scale-2 .tos-wrapper.tos-fixed .tos-next,
|
286 |
-
.tos-touch.tos-scale-2 .tos-wrapper.tos-fixed .tos-close {
|
287 |
-
-webkit-transform: scale(2);
|
288 |
-
-moz-transform: scale(2);
|
289 |
-
-ms-transform: scale(2);
|
290 |
-
-o-transform: scale(2);
|
291 |
-
transform: scale(2); }
|
292 |
-
.tos-touch.tos-scale-3 .tos-wrapper.tos-fixed .tos-prev,
|
293 |
-
.tos-touch.tos-scale-3 .tos-wrapper.tos-fixed .tos-next,
|
294 |
-
.tos-touch.tos-scale-3 .tos-wrapper.tos-fixed .tos-close {
|
295 |
-
-webkit-transform: scale(3);
|
296 |
-
-moz-transform: scale(3);
|
297 |
-
-ms-transform: scale(3);
|
298 |
-
-o-transform: scale(3);
|
299 |
-
transform: scale(3); }
|
300 |
-
.tos-touch.tos-scale-2 .tos-wrapper.tos-fixed .tos-prev, .tos-touch.tos-scale-3 .tos-wrapper.tos-fixed .tos-prev {
|
301 |
-
-webkit-transform-origin: left center;
|
302 |
-
-moz-transform-origin: left center;
|
303 |
-
-ms-transform-origin: left center;
|
304 |
-
-o-transform-origin: left center;
|
305 |
-
transform-origin: left center; }
|
306 |
-
.tos-touch.tos-scale-2 .tos-wrapper.tos-fixed .tos-next, .tos-touch.tos-scale-3 .tos-wrapper.tos-fixed .tos-next {
|
307 |
-
-webkit-transform-origin: right center;
|
308 |
-
-moz-transform-origin: right center;
|
309 |
-
-ms-transform-origin: right center;
|
310 |
-
-o-transform-origin: right center;
|
311 |
-
transform-origin: right center; }
|
312 |
-
.tos-touch.tos-scale-2 .tos-wrapper.tos-fixed .tos-close, .tos-touch.tos-scale-3 .tos-wrapper.tos-fixed .tos-close {
|
313 |
-
-webkit-transform-origin: right top;
|
314 |
-
-moz-transform-origin: right top;
|
315 |
-
-ms-transform-origin: right top;
|
316 |
-
-o-transform-origin: right top;
|
317 |
-
transform-origin: right top; }
|
318 |
-
|
319 |
-
/*
|
320 |
-
jQuery Touch Optimized Sliders "R"Us
|
321 |
-
Caption addon
|
322 |
-
*/
|
323 |
-
.tos-caption {
|
324 |
-
color: white;
|
325 |
-
text-align: center;
|
326 |
-
opacity: 0;
|
327 |
-
-webkit-transition: opacity 0.4s ease;
|
328 |
-
-moz-transition: opacity 0.4s ease;
|
329 |
-
-ms-transition: opacity 0.4s ease;
|
330 |
-
-o-transition: opacity 0.4s ease;
|
331 |
-
transition: opacity 0.4s ease;
|
332 |
-
width: 100%;
|
333 |
-
position: absolute;
|
334 |
-
left: 0;
|
335 |
-
bottom: 0;
|
336 |
-
z-index: 1; }
|
337 |
-
.tos-caption:after {
|
338 |
-
content: '';
|
339 |
-
display: block;
|
340 |
-
clear: both; }
|
341 |
-
.tos-caption > div {
|
342 |
-
white-space: nowrap;
|
343 |
-
text-overflow: ellipsis;
|
344 |
-
overflow: hidden;
|
345 |
-
width: 100%;
|
346 |
-
box-sizing: border-box;
|
347 |
-
padding: 0 20px;
|
348 |
-
float: left; }
|
349 |
-
.tos-caption > div:last-child {
|
350 |
-
float: right;
|
351 |
-
margin-right: -2px; }
|
352 |
-
|
353 |
-
.tos-desktop .tos-wrapper:hover .tos-caption,
|
354 |
-
.tos-touch .tos-wrapper.tos-hover .tos-caption {
|
355 |
-
opacity: 1; }
|
356 |
-
|
357 |
-
.tos-wrapper .tos-caption {
|
358 |
-
line-height: 20px;
|
359 |
-
font-size: 15px;
|
360 |
-
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
|
361 |
-
height: 40px; }
|
362 |
-
.tos-wrapper.tos-has-caption .tos-uibg {
|
363 |
-
height: 100px; }
|
364 |
-
|
365 |
-
.tos-desktop .tos-wrapper.tos-fixed.tos-fit.tos-has-caption .tos-slide {
|
366 |
-
padding-bottom: 60px; }
|
367 |
-
|
368 |
-
.tos-touch.tos-scale-2 .tos-wrapper.tos-fixed .tos-caption {
|
369 |
-
line-height: 40px;
|
370 |
-
font-size: 30px;
|
371 |
-
text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
|
372 |
-
height: 80px; }
|
373 |
-
.tos-touch.tos-scale-2 .tos-wrapper.tos-fixed.tos-has-caption .tos-uibg {
|
374 |
-
height: 200px; }
|
375 |
-
.tos-touch.tos-scale-3 .tos-wrapper.tos-fixed .tos-caption {
|
376 |
-
line-height: 60px;
|
377 |
-
font-size: 45px;
|
378 |
-
text-shadow: 0 3px 6px rgba(0, 0, 0, 0.8);
|
379 |
-
height: 120px; }
|
380 |
-
.tos-touch.tos-scale-3 .tos-wrapper.tos-fixed.tos-has-caption .tos-uibg {
|
381 |
-
height: 300px; }
|
382 |
-
|
383 |
-
/*
|
384 |
-
jQuery Touch Optimized Sliders "R"Us
|
385 |
-
Drag addon
|
386 |
-
*/
|
387 |
-
.tos-wrapper.tos-fx-slide .tos-slider {
|
388 |
-
-webkit-transition-property: left, margin;
|
389 |
-
-moz-transition-property: left, margin;
|
390 |
-
-ms-transition-property: left, margin;
|
391 |
-
-o-transition-property: left, margin;
|
392 |
-
transition-property: left, margin; }
|
393 |
-
|
394 |
-
/*
|
395 |
-
jQuery Touch Optimized Sliders "R"Us
|
396 |
-
Pagination addon
|
397 |
-
*/
|
398 |
-
.tos-pagination {
|
399 |
-
text-align: center;
|
400 |
-
white-space: nowrap;
|
401 |
-
overflow-x: auto;
|
402 |
-
-webkit-overflow-scrolling: touch;
|
403 |
-
overflow-scrolling: touch;
|
404 |
-
opacity: 0;
|
405 |
-
-webkit-transition: opacity 0.4s ease;
|
406 |
-
-moz-transition: opacity 0.4s ease;
|
407 |
-
-ms-transition: opacity 0.4s ease;
|
408 |
-
-o-transition: opacity 0.4s ease;
|
409 |
-
transition: opacity 0.4s ease;
|
410 |
-
width: 100%;
|
411 |
-
position: absolute;
|
412 |
-
bottom: 0;
|
413 |
-
left: 0;
|
414 |
-
z-index: 1; }
|
415 |
-
.tos-pagination a {
|
416 |
-
display: inline-block; }
|
417 |
-
.tos-pagination.tos-bullets a {
|
418 |
-
background-color: rgba(255, 255, 255, 0.2); }
|
419 |
-
.tos-pagination.tos-bullets a:hover {
|
420 |
-
background-color: rgba(255, 255, 255, 0.5); }
|
421 |
-
.tos-pagination.tos-bullets a.tos-selected {
|
422 |
-
background-color: rgba(255, 255, 255, 0.9); }
|
423 |
-
|
424 |
-
.tos-desktop .tos-wrapper:hover .tos-pagination,
|
425 |
-
.tos-touch .tos-wrapper.tos-hover .tos-pagination {
|
426 |
-
opacity: 1; }
|
427 |
-
|
428 |
-
.tos-wrapper .tos-pagination:before, .tos-wrapper .tos-pagination:after {
|
429 |
-
content: '';
|
430 |
-
display: inline-block;
|
431 |
-
width: 20px;
|
432 |
-
height: 10px; }
|
433 |
-
.tos-wrapper.tos-has-bullets .tos-pagination {
|
434 |
-
height: 30px; }
|
435 |
-
.tos-wrapper.tos-has-bullets .tos-pagination a {
|
436 |
-
border-radius: 10px;
|
437 |
-
width: 10px;
|
438 |
-
height: 10px;
|
439 |
-
margin: 0 5px; }
|
440 |
-
.tos-wrapper.tos-has-bullets .tos-caption {
|
441 |
-
bottom: 30px; }
|
442 |
-
.tos-wrapper.tos-has-bullets .tos-uibg {
|
443 |
-
height: 90px; }
|
444 |
-
.tos-wrapper.tos-has-bullets.tos-has-caption .tos-uibg {
|
445 |
-
height: 130px; }
|
446 |
-
.tos-wrapper.tos-has-thumbnails .tos-pagination {
|
447 |
-
height: 70px; }
|
448 |
-
.tos-wrapper.tos-has-thumbnails .tos-pagination a {
|
449 |
-
background-position: center center;
|
450 |
-
background-size: cover;
|
451 |
-
width: 50px;
|
452 |
-
height: 50px;
|
453 |
-
margin: 0 5px; }
|
454 |
-
.tos-wrapper.tos-has-thumbnails .tos-caption {
|
455 |
-
bottom: 70px; }
|
456 |
-
.tos-wrapper.tos-has-thumbnails .tos-uibg {
|
457 |
-
height: 130px; }
|
458 |
-
.tos-wrapper.tos-has-thumbnails.tos-has-caption .tos-uibg {
|
459 |
-
height: 170px; }
|
460 |
-
|
461 |
-
.tos-desktop .tos-wrapper.tos-fixed.tos-fit.tos-has-bullets .tos-slide {
|
462 |
-
padding-bottom: 50px; }
|
463 |
-
.tos-desktop .tos-wrapper.tos-fixed.tos-fit.tos-has-bullets.tos-has-caption .tos-slide {
|
464 |
-
padding-bottom: 80px; }
|
465 |
-
.tos-desktop .tos-wrapper.tos-fixed.tos-fit.tos-has-thumbnails .tos-slide {
|
466 |
-
padding-bottom: 90px; }
|
467 |
-
.tos-desktop .tos-wrapper.tos-fixed.tos-fit.tos-has-thumbnails.tos-has-caption .tos-slide {
|
468 |
-
padding-bottom: 120px; }
|
469 |
-
|
470 |
-
.tos-touch.tos-scale-2 .tos-wrapper.tos-fixed .tos-pagination:before, .tos-touch.tos-scale-2 .tos-wrapper.tos-fixed .tos-pagination:after {
|
471 |
-
content: '';
|
472 |
-
display: inline-block;
|
473 |
-
width: 40px;
|
474 |
-
height: 20px; }
|
475 |
-
.tos-touch.tos-scale-2 .tos-wrapper.tos-fixed.tos-has-bullets .tos-pagination {
|
476 |
-
height: 60px; }
|
477 |
-
.tos-touch.tos-scale-2 .tos-wrapper.tos-fixed.tos-has-bullets .tos-pagination a {
|
478 |
-
border-radius: 20px;
|
479 |
-
width: 20px;
|
480 |
-
height: 20px;
|
481 |
-
margin: 0 10px; }
|
482 |
-
.tos-touch.tos-scale-2 .tos-wrapper.tos-fixed.tos-has-bullets .tos-caption {
|
483 |
-
bottom: 60px; }
|
484 |
-
.tos-touch.tos-scale-2 .tos-wrapper.tos-fixed.tos-has-bullets .tos-uibg {
|
485 |
-
height: 180px; }
|
486 |
-
.tos-touch.tos-scale-2 .tos-wrapper.tos-fixed.tos-has-bullets.tos-has-caption .tos-uibg {
|
487 |
-
height: 260px; }
|
488 |
-
.tos-touch.tos-scale-2 .tos-wrapper.tos-fixed.tos-has-thumbnails .tos-pagination {
|
489 |
-
height: 140px; }
|
490 |
-
.tos-touch.tos-scale-2 .tos-wrapper.tos-fixed.tos-has-thumbnails .tos-pagination a {
|
491 |
-
background-position: center center;
|
492 |
-
background-size: cover;
|
493 |
-
width: 100px;
|
494 |
-
height: 100px;
|
495 |
-
margin: 0 10px; }
|
496 |
-
.tos-touch.tos-scale-2 .tos-wrapper.tos-fixed.tos-has-thumbnails .tos-caption {
|
497 |
-
bottom: 140px; }
|
498 |
-
.tos-touch.tos-scale-2 .tos-wrapper.tos-fixed.tos-has-thumbnails .tos-uibg {
|
499 |
-
height: 260px; }
|
500 |
-
.tos-touch.tos-scale-2 .tos-wrapper.tos-fixed.tos-has-thumbnails.tos-has-caption .tos-uibg {
|
501 |
-
height: 340px; }
|
502 |
-
.tos-touch.tos-scale-3 .tos-wrapper.tos-fixed .tos-pagination:before, .tos-touch.tos-scale-3 .tos-wrapper.tos-fixed .tos-pagination:after {
|
503 |
-
content: '';
|
504 |
-
display: inline-block;
|
505 |
-
width: 60px;
|
506 |
-
height: 30px; }
|
507 |
-
.tos-touch.tos-scale-3 .tos-wrapper.tos-fixed.tos-has-bullets .tos-pagination {
|
508 |
-
height: 90px; }
|
509 |
-
.tos-touch.tos-scale-3 .tos-wrapper.tos-fixed.tos-has-bullets .tos-pagination a {
|
510 |
-
border-radius: 30px;
|
511 |
-
width: 30px;
|
512 |
-
height: 30px;
|
513 |
-
margin: 0 15px; }
|
514 |
-
.tos-touch.tos-scale-3 .tos-wrapper.tos-fixed.tos-has-bullets .tos-caption {
|
515 |
-
bottom: 90px; }
|
516 |
-
.tos-touch.tos-scale-3 .tos-wrapper.tos-fixed.tos-has-bullets .tos-uibg {
|
517 |
-
height: 270px; }
|
518 |
-
.tos-touch.tos-scale-3 .tos-wrapper.tos-fixed.tos-has-bullets.tos-has-caption .tos-uibg {
|
519 |
-
height: 390px; }
|
520 |
-
.tos-touch.tos-scale-3 .tos-wrapper.tos-fixed.tos-has-thumbnails .tos-pagination {
|
521 |
-
height: 210px; }
|
522 |
-
.tos-touch.tos-scale-3 .tos-wrapper.tos-fixed.tos-has-thumbnails .tos-pagination a {
|
523 |
-
background-position: center center;
|
524 |
-
background-size: cover;
|
525 |
-
width: 150px;
|
526 |
-
height: 150px;
|
527 |
-
margin: 0 15px; }
|
528 |
-
.tos-touch.tos-scale-3 .tos-wrapper.tos-fixed.tos-has-thumbnails .tos-caption {
|
529 |
-
bottom: 210px; }
|
530 |
-
.tos-touch.tos-scale-3 .tos-wrapper.tos-fixed.tos-has-thumbnails .tos-uibg {
|
531 |
-
height: 390px; }
|
532 |
-
.tos-touch.tos-scale-3 .tos-wrapper.tos-fixed.tos-has-thumbnails.tos-has-caption .tos-uibg {
|
533 |
-
height: 510px; }
|
534 |
-
|
535 |
-
/*
|
536 |
-
jQuery Touch Optimized Sliders "R"Us
|
537 |
-
Html media
|
538 |
-
*/
|
539 |
-
.tos-slide .tos-html {
|
540 |
-
-webkit-overflow-scrolling: touch; }
|
541 |
-
|
542 |
-
/*
|
543 |
-
jQuery Touch Optimized Sliders "R"Us
|
544 |
-
Youtube media
|
545 |
-
*/
|
546 |
-
.tos-play {
|
547 |
-
background: black;
|
548 |
-
opacity: 0;
|
549 |
-
display: block;
|
550 |
-
position: absolute;
|
551 |
-
top: 50%;
|
552 |
-
left: 50%;
|
553 |
-
-webkit-transition: opacity 0.4s ease;
|
554 |
-
-moz-transition: opacity 0.4s ease;
|
555 |
-
-ms-transition: opacity 0.4s ease;
|
556 |
-
-o-transition: opacity 0.4s ease;
|
557 |
-
transition: opacity 0.4s ease; }
|
558 |
-
.tos-play:after {
|
559 |
-
content: '';
|
560 |
-
display: block;
|
561 |
-
position: absolute;
|
562 |
-
top: 50%;
|
563 |
-
left: 50%; }
|
564 |
-
|
565 |
-
.tos-desktop .tos-wrapper:hover .tos-play,
|
566 |
-
.tos-touch .tos-wrapper.tos-hover .tos-play {
|
567 |
-
opacity: 0.5; }
|
568 |
-
.tos-desktop .tos-wrapper:hover .tos-play:hover,
|
569 |
-
.tos-touch .tos-wrapper.tos-hover .tos-play:hover {
|
570 |
-
opacity: 0.9; }
|
571 |
-
|
572 |
-
.tos-wrapper .tos-play {
|
573 |
-
border-radius: 80px;
|
574 |
-
width: 80px;
|
575 |
-
height: 80px;
|
576 |
-
margin: -40px; }
|
577 |
-
.tos-wrapper .tos-play:after {
|
578 |
-
border: 20px solid transparent;
|
579 |
-
border-left-color: white;
|
580 |
-
border-left-width: 30px;
|
581 |
-
margin-top: -20px;
|
582 |
-
margin-left: -10.5px; }
|
583 |
-
|
584 |
-
.tos-touch.tos-scale-2 .tos-wrapper.tos-fixed .tos-play {
|
585 |
-
border-radius: 160px;
|
586 |
-
width: 160px;
|
587 |
-
height: 160px;
|
588 |
-
margin: -80px; }
|
589 |
-
.tos-touch.tos-scale-2 .tos-wrapper.tos-fixed .tos-play:after {
|
590 |
-
border: 40px solid transparent;
|
591 |
-
border-left-color: white;
|
592 |
-
border-left-width: 60px;
|
593 |
-
margin-top: -40px;
|
594 |
-
margin-left: -21px; }
|
595 |
-
.tos-touch.tos-scale-3 .tos-wrapper.tos-fixed .tos-play {
|
596 |
-
border-radius: 240px;
|
597 |
-
width: 240px;
|
598 |
-
height: 240px;
|
599 |
-
margin: -120px; }
|
600 |
-
.tos-touch.tos-scale-3 .tos-wrapper.tos-fixed .tos-play:after {
|
601 |
-
border: 60px solid transparent;
|
602 |
-
border-left-color: white;
|
603 |
-
border-left-width: 90px;
|
604 |
-
margin-top: -60px;
|
605 |
-
margin-left: -31.5px; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/tosrus/css/jquery.tosrus.all.min.css
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
.tos-noanimation{-webkit-transition-property:none!important;-moz-transition-property:none!important;-ms-transition-property:none!important;-o-transition-property:none!important;transition-property:none!important}.tos-fastanimation{-webkit-transition-duration:.2s!important;-moz-transition-duration:.2s!important;-ms-transition-duration:.2s!important;-o-transition-duration:.2s!important;transition-duration:.2s!important;-webkit-transition-timing-function:ease-out!important;-moz-transition-timing-function:ease-out!important;-ms-transition-timing-function:ease-out!important;-o-transition-timing-function:ease-out!important;transition-timing-function:ease-out!important}.tos-wrapper{opacity:0;-webkit-transition:opacity .4s ease;-moz-transition:opacity .4s ease;-ms-transition:opacity .4s ease;-o-transition:opacity .4s ease;transition:opacity .4s ease;display:none;width:100%;height:100%;padding:0;margin:0;overflow:hidden}.tos-wrapper.tos-opened{display:block}.tos-wrapper.tos-opening{opacity:1}.tos-wrapper.tos-fixed{background-color:#000;position:fixed;top:0;left:0;z-index:9000}.tos-wrapper.tos-inline{position:relative}.tos-slider{white-space:nowrap;width:100%;height:100%;padding:0;margin:0;position:relative}.tos-wrapper.tos-fx-slide .tos-slider{left:0;-webkit-transition:left .4s ease;-moz-transition:left .4s ease;-ms-transition:left .4s ease;-o-transition:left .4s ease;transition:left .4s ease}.tos-wrapper.tos-fx-slide.tos-fixed .tos-slider{position:absolute}.tos-wrapper.tos-fx-fade .tos-slider{opacity:1;-webkit-transition:opacity .4s ease;-moz-transition:opacity .4s ease;-ms-transition:opacity .4s ease;-o-transition:opacity .4s ease;transition:opacity .4s ease}.tos-uibg{background-image:-webkit-linear-gradient(bottom,rgba(0,0,0,.5) 0,rgba(0,0,0,0) 100%);background-image:-moz-linear-gradient(bottom,rgba(0,0,0,.5) 0,rgba(0,0,0,0) 100%);background-image:-ms-linear-gradient(bottom,rgba(0,0,0,.5) 0,rgba(0,0,0,0) 100%);background-image:-o-linear-gradient(bottom,rgba(0,0,0,.5) 0,rgba(0,0,0,0) 100%);background-image:linear-gradient(bottom,rgba(0,0,0,.5) 0,rgba(0,0,0,0) 100%);-webkit-transition:opacity .4s ease;-moz-transition:opacity .4s ease;-ms-transition:opacity .4s ease;-o-transition:opacity .4s ease;transition:opacity .4s ease;opacity:0;width:100%;position:absolute;left:0;bottom:0;z-index:1}.tos-desktop .tos-wrapper:hover .tos-uibg,.tos-touch .tos-wrapper.tos-hover .tos-uibg{opacity:1}.tos-slide{-webkit-overflow-scrolling:touch;line-height:1px;text-align:center;box-sizing:border-box;display:inline-block;width:100%;height:100%;overflow:hidden;position:relative}.tos-slide:before{content:"";display:inline-block;height:50%;width:1px;margin-right:-1px}.tos-slide.tos-loading>*{opacity:0}.tos-slide>*{opacity:1;-webkit-transition:opacity .4s ease;-moz-transition:opacity .4s ease;-ms-transition:opacity .4s ease;-o-transition:opacity .4s ease;transition:opacity .4s ease;vertical-align:middle;display:inline-block;max-height:100%;max-width:100%;box-sizing:border-box}.tos-slide.tos-html>div{-webkit-overflow-scrolling:touch;white-space:normal;text-align:left;line-height:1.5}.tos-slide.tos-html>div *{-webkit-text-size-adjust:none;-moz-text-size-adjust:none;-ms-text-size-adjust:none;-o-text-size-adjust:none;text-size-adjust:none}.tos-wrapper.tos-fill .tos-slide.tos-image>img{max-height:none;max-width:none;min-height:100%;min-width:100%}.tos-wrapper.tos-fixed .tos-slide.tos-html>div{background-color:#fff;color:#333;box-sizing:border-box;display:inline-block;padding:40px;overflow:auto}.tos-desktop .tos-wrapper.tos-fixed{background-color:rgba(0,0,0,.85)}.tos-desktop .tos-wrapper.tos-fixed.tos-fit .tos-slide{padding:20px}.tos-close,.tos-next,.tos-prev{background:#000;border-radius:3px;opacity:0;display:block;width:40px;position:absolute;z-index:1;-webkit-transition:opacity .4s ease;-moz-transition:opacity .4s ease;-ms-transition:opacity .4s ease;-o-transition:opacity .4s ease;transition:opacity .4s ease}.tos-next,.tos-prev{height:80px;margin-top:-40px;top:50%}.tos-next.tos-disabled,.tos-prev.tos-disabled{cursor:default}.tos-prev{left:20px}.tos-next{right:20px}.tos-close{height:40px;top:20px;right:20px}.tos-desktop .tos-wrapper:hover .tos-close,.tos-desktop .tos-wrapper:hover .tos-next,.tos-desktop .tos-wrapper:hover .tos-prev,.tos-touch .tos-wrapper.tos-hover .tos-close,.tos-touch .tos-wrapper.tos-hover .tos-next,.tos-touch .tos-wrapper.tos-hover .tos-prev{opacity:.5}.tos-desktop .tos-wrapper:hover .tos-close:hover,.tos-desktop .tos-wrapper:hover .tos-next:hover,.tos-desktop .tos-wrapper:hover .tos-prev:hover,.tos-touch .tos-wrapper.tos-hover .tos-close:hover,.tos-touch .tos-wrapper.tos-hover .tos-next:hover,.tos-touch .tos-wrapper.tos-hover .tos-prev:hover{opacity:.9}.tos-desktop .tos-wrapper:hover .tos-close.tos-disabled,.tos-desktop .tos-wrapper:hover .tos-next.tos-disabled,.tos-desktop .tos-wrapper:hover .tos-prev.tos-disabled,.tos-touch .tos-wrapper.tos-hover .tos-close.tos-disabled,.tos-touch .tos-wrapper.tos-hover .tos-next.tos-disabled,.tos-touch .tos-wrapper.tos-hover .tos-prev.tos-disabled{opacity:.2}.tos-close span:after,.tos-close span:before,.tos-next span,.tos-prev span{content:'';display:block;width:12px;height:12px;margin:-5px;position:absolute;top:50%;-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);-o-transform:rotate(45deg);transform:rotate(45deg)}.tos-close span:after,.tos-close span:before{width:6px;height:6px;margin-top:-4px;margin-left:0;margin-right:0}.tos-close span:before,.tos-prev span{border-bottom:3px solid #fff;border-left:3px solid #fff;left:50%}.tos-close span:after,.tos-next span{border-top:3px solid #fff;border-right:3px solid #fff;right:50%}.tos-desktop .tos-wrapper.tos-fixed.tos-fit.tos-has-close .tos-slide,.tos-desktop .tos-wrapper.tos-fixed.tos-fit.tos-has-next .tos-slide,.tos-desktop .tos-wrapper.tos-fixed.tos-fit.tos-has-prev .tos-slide{padding-left:80px;padding-right:80px}.tos-inline{opacity:0;-webkit-transition:opacity .4s ease;-moz-transition:opacity .4s ease;-ms-transition:opacity .4s ease;-o-transition:opacity .4s ease;transition:opacity .4s ease;display:inline-block;margin:0;position:relative;top:auto;left:auto;right:auto}.tos-inline.tos-prev{margin-right:-60px}.tos-inline.tos-next{margin-left:-60px}.tos-loading .tos-inline{opacity:0!important}.tos-touch.tos-scale-2 .tos-wrapper.tos-fixed .tos-close,.tos-touch.tos-scale-2 .tos-wrapper.tos-fixed .tos-next,.tos-touch.tos-scale-2 .tos-wrapper.tos-fixed .tos-prev{-webkit-transform:scale(2);-moz-transform:scale(2);-ms-transform:scale(2);-o-transform:scale(2);transform:scale(2)}.tos-touch.tos-scale-3 .tos-wrapper.tos-fixed .tos-close,.tos-touch.tos-scale-3 .tos-wrapper.tos-fixed .tos-next,.tos-touch.tos-scale-3 .tos-wrapper.tos-fixed .tos-prev{-webkit-transform:scale(3);-moz-transform:scale(3);-ms-transform:scale(3);-o-transform:scale(3);transform:scale(3)}.tos-touch.tos-scale-2 .tos-wrapper.tos-fixed .tos-prev,.tos-touch.tos-scale-3 .tos-wrapper.tos-fixed .tos-prev{-webkit-transform-origin:left center;-moz-transform-origin:left center;-ms-transform-origin:left center;-o-transform-origin:left center;transform-origin:left center}.tos-touch.tos-scale-2 .tos-wrapper.tos-fixed .tos-next,.tos-touch.tos-scale-3 .tos-wrapper.tos-fixed .tos-next{-webkit-transform-origin:right center;-moz-transform-origin:right center;-ms-transform-origin:right center;-o-transform-origin:right center;transform-origin:right center}.tos-touch.tos-scale-2 .tos-wrapper.tos-fixed .tos-close,.tos-touch.tos-scale-3 .tos-wrapper.tos-fixed .tos-close{-webkit-transform-origin:right top;-moz-transform-origin:right top;-ms-transform-origin:right top;-o-transform-origin:right top;transform-origin:right top}.tos-caption{color:#fff;text-align:center;opacity:0;-webkit-transition:opacity .4s ease;-moz-transition:opacity .4s ease;-ms-transition:opacity .4s ease;-o-transition:opacity .4s ease;transition:opacity .4s ease;width:100%;position:absolute;left:0;bottom:0;z-index:1}.tos-caption:after{content:'';display:block;clear:both}.tos-caption>div{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;width:100%;box-sizing:border-box;padding:0 20px;float:left}.tos-caption>div:last-child{float:right;margin-right:-2px}.tos-desktop .tos-wrapper:hover .tos-caption,.tos-touch .tos-wrapper.tos-hover .tos-caption{opacity:1}.tos-wrapper .tos-caption{line-height:20px;font-size:15px;text-shadow:0 1px 2px rgba(0,0,0,.8);height:40px}.tos-wrapper.tos-has-caption .tos-uibg{height:100px}.tos-desktop .tos-wrapper.tos-fixed.tos-fit.tos-has-caption .tos-slide{padding-bottom:60px}.tos-touch.tos-scale-2 .tos-wrapper.tos-fixed .tos-caption{line-height:40px;font-size:30px;text-shadow:0 2px 4px rgba(0,0,0,.8);height:80px}.tos-touch.tos-scale-2 .tos-wrapper.tos-fixed.tos-has-caption .tos-uibg{height:200px}.tos-touch.tos-scale-3 .tos-wrapper.tos-fixed .tos-caption{line-height:60px;font-size:45px;text-shadow:0 3px 6px rgba(0,0,0,.8);height:120px}.tos-touch.tos-scale-3 .tos-wrapper.tos-fixed.tos-has-caption .tos-uibg{height:300px}.tos-wrapper.tos-fx-slide .tos-slider{-webkit-transition-property:left,margin;-moz-transition-property:left,margin;-ms-transition-property:left,margin;-o-transition-property:left,margin;transition-property:left,margin}.tos-pagination{text-align:center;white-space:nowrap;overflow-x:auto;-webkit-overflow-scrolling:touch;overflow-scrolling:touch;opacity:0;-webkit-transition:opacity .4s ease;-moz-transition:opacity .4s ease;-ms-transition:opacity .4s ease;-o-transition:opacity .4s ease;transition:opacity .4s ease;width:100%;position:absolute;bottom:0;left:0;z-index:1}.tos-pagination a{display:inline-block}.tos-pagination.tos-bullets a{background-color:rgba(255,255,255,.2)}.tos-pagination.tos-bullets a:hover{background-color:rgba(255,255,255,.5)}.tos-pagination.tos-bullets a.tos-selected{background-color:rgba(255,255,255,.9)}.tos-desktop .tos-wrapper:hover .tos-pagination,.tos-touch .tos-wrapper.tos-hover .tos-pagination{opacity:1}.tos-wrapper .tos-pagination:after,.tos-wrapper .tos-pagination:before{content:'';display:inline-block;width:20px;height:10px}.tos-wrapper.tos-has-bullets .tos-pagination{height:30px}.tos-wrapper.tos-has-bullets .tos-pagination a{border-radius:10px;width:10px;height:10px;margin:0 5px}.tos-wrapper.tos-has-bullets .tos-caption{bottom:30px}.tos-wrapper.tos-has-bullets .tos-uibg{height:90px}.tos-wrapper.tos-has-bullets.tos-has-caption .tos-uibg{height:130px}.tos-wrapper.tos-has-thumbnails .tos-pagination{height:70px}.tos-wrapper.tos-has-thumbnails .tos-pagination a{background-position:center center;background-size:cover;width:50px;height:50px;margin:0 5px}.tos-wrapper.tos-has-thumbnails .tos-caption{bottom:70px}.tos-wrapper.tos-has-thumbnails .tos-uibg{height:130px}.tos-wrapper.tos-has-thumbnails.tos-has-caption .tos-uibg{height:170px}.tos-desktop .tos-wrapper.tos-fixed.tos-fit.tos-has-bullets .tos-slide{padding-bottom:50px}.tos-desktop .tos-wrapper.tos-fixed.tos-fit.tos-has-bullets.tos-has-caption .tos-slide{padding-bottom:80px}.tos-desktop .tos-wrapper.tos-fixed.tos-fit.tos-has-thumbnails .tos-slide{padding-bottom:90px}.tos-desktop .tos-wrapper.tos-fixed.tos-fit.tos-has-thumbnails.tos-has-caption .tos-slide{padding-bottom:120px}.tos-touch.tos-scale-2 .tos-wrapper.tos-fixed .tos-pagination:after,.tos-touch.tos-scale-2 .tos-wrapper.tos-fixed .tos-pagination:before{content:'';display:inline-block;width:40px;height:20px}.tos-touch.tos-scale-2 .tos-wrapper.tos-fixed.tos-has-bullets .tos-pagination{height:60px}.tos-touch.tos-scale-2 .tos-wrapper.tos-fixed.tos-has-bullets .tos-pagination a{border-radius:20px;width:20px;height:20px;margin:0 10px}.tos-touch.tos-scale-2 .tos-wrapper.tos-fixed.tos-has-bullets .tos-caption{bottom:60px}.tos-touch.tos-scale-2 .tos-wrapper.tos-fixed.tos-has-bullets .tos-uibg{height:180px}.tos-touch.tos-scale-2 .tos-wrapper.tos-fixed.tos-has-bullets.tos-has-caption .tos-uibg{height:260px}.tos-touch.tos-scale-2 .tos-wrapper.tos-fixed.tos-has-thumbnails .tos-pagination{height:140px}.tos-touch.tos-scale-2 .tos-wrapper.tos-fixed.tos-has-thumbnails .tos-pagination a{background-position:center center;background-size:cover;width:100px;height:100px;margin:0 10px}.tos-touch.tos-scale-2 .tos-wrapper.tos-fixed.tos-has-thumbnails .tos-caption{bottom:140px}.tos-touch.tos-scale-2 .tos-wrapper.tos-fixed.tos-has-thumbnails .tos-uibg{height:260px}.tos-touch.tos-scale-2 .tos-wrapper.tos-fixed.tos-has-thumbnails.tos-has-caption .tos-uibg{height:340px}.tos-touch.tos-scale-3 .tos-wrapper.tos-fixed .tos-pagination:after,.tos-touch.tos-scale-3 .tos-wrapper.tos-fixed .tos-pagination:before{content:'';display:inline-block;width:60px;height:30px}.tos-touch.tos-scale-3 .tos-wrapper.tos-fixed.tos-has-bullets .tos-pagination{height:90px}.tos-touch.tos-scale-3 .tos-wrapper.tos-fixed.tos-has-bullets .tos-pagination a{border-radius:30px;width:30px;height:30px;margin:0 15px}.tos-touch.tos-scale-3 .tos-wrapper.tos-fixed.tos-has-bullets .tos-caption{bottom:90px}.tos-touch.tos-scale-3 .tos-wrapper.tos-fixed.tos-has-bullets .tos-uibg{height:270px}.tos-touch.tos-scale-3 .tos-wrapper.tos-fixed.tos-has-bullets.tos-has-caption .tos-uibg{height:390px}.tos-touch.tos-scale-3 .tos-wrapper.tos-fixed.tos-has-thumbnails .tos-pagination{height:210px}.tos-touch.tos-scale-3 .tos-wrapper.tos-fixed.tos-has-thumbnails .tos-pagination a{background-position:center center;background-size:cover;width:150px;height:150px;margin:0 15px}.tos-touch.tos-scale-3 .tos-wrapper.tos-fixed.tos-has-thumbnails .tos-caption{bottom:210px}.tos-touch.tos-scale-3 .tos-wrapper.tos-fixed.tos-has-thumbnails .tos-uibg{height:390px}.tos-touch.tos-scale-3 .tos-wrapper.tos-fixed.tos-has-thumbnails.tos-has-caption .tos-uibg{height:510px}.tos-slide .tos-html{-webkit-overflow-scrolling:touch}.tos-play{background:#000;opacity:0;display:block;position:absolute;top:50%;left:50%;-webkit-transition:opacity .4s ease;-moz-transition:opacity .4s ease;-ms-transition:opacity .4s ease;-o-transition:opacity .4s ease;transition:opacity .4s ease}.tos-play:after{content:'';display:block;position:absolute;top:50%;left:50%}.tos-desktop .tos-wrapper:hover .tos-play,.tos-touch .tos-wrapper.tos-hover .tos-play{opacity:.5}.tos-desktop .tos-wrapper:hover .tos-play:hover,.tos-touch .tos-wrapper.tos-hover .tos-play:hover{opacity:.9}.tos-wrapper .tos-play{border-radius:80px;width:80px;height:80px;margin:-40px}.tos-wrapper .tos-play:after{border:20px solid transparent;border-left-color:#fff;border-left-width:30px;margin-top:-20px;margin-left:-10.5px}.tos-touch.tos-scale-2 .tos-wrapper.tos-fixed .tos-play{border-radius:160px;width:160px;height:160px;margin:-80px}.tos-touch.tos-scale-2 .tos-wrapper.tos-fixed .tos-play:after{border:40px solid transparent;border-left-color:#fff;border-left-width:60px;margin-top:-40px;margin-left:-21px}.tos-touch.tos-scale-3 .tos-wrapper.tos-fixed .tos-play{border-radius:240px;width:240px;height:240px;margin:-120px}.tos-touch.tos-scale-3 .tos-wrapper.tos-fixed .tos-play:after{border:60px solid transparent;border-left-color:#fff;border-left-width:90px;margin-top:-60px;margin-left:-31.5px}
|
|
assets/tosrus/hammer.js
ADDED
@@ -0,0 +1,2643 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*! Hammer.JS - v2.0.8 - 2016-04-23
|
2 |
+
* http://hammerjs.github.io/
|
3 |
+
*
|
4 |
+
* Copyright (c) 2016 Jorik Tangelder;
|
5 |
+
* Licensed under the MIT license */
|
6 |
+
(function(window, document, exportName, undefined) {
|
7 |
+
'use strict';
|
8 |
+
|
9 |
+
var VENDOR_PREFIXES = ['', 'webkit', 'Moz', 'MS', 'ms', 'o'];
|
10 |
+
var TEST_ELEMENT = document.createElement('div');
|
11 |
+
|
12 |
+
var TYPE_FUNCTION = 'function';
|
13 |
+
|
14 |
+
var round = Math.round;
|
15 |
+
var abs = Math.abs;
|
16 |
+
var now = Date.now;
|
17 |
+
|
18 |
+
/**
|
19 |
+
* set a timeout with a given scope
|
20 |
+
* @param {Function} fn
|
21 |
+
* @param {Number} timeout
|
22 |
+
* @param {Object} context
|
23 |
+
* @returns {number}
|
24 |
+
*/
|
25 |
+
function setTimeoutContext(fn, timeout, context) {
|
26 |
+
return setTimeout(bindFn(fn, context), timeout);
|
27 |
+
}
|
28 |
+
|
29 |
+
/**
|
30 |
+
* if the argument is an array, we want to execute the fn on each entry
|
31 |
+
* if it aint an array we don't want to do a thing.
|
32 |
+
* this is used by all the methods that accept a single and array argument.
|
33 |
+
* @param {*|Array} arg
|
34 |
+
* @param {String} fn
|
35 |
+
* @param {Object} [context]
|
36 |
+
* @returns {Boolean}
|
37 |
+
*/
|
38 |
+
function invokeArrayArg(arg, fn, context) {
|
39 |
+
if (Array.isArray(arg)) {
|
40 |
+
each(arg, context[fn], context);
|
41 |
+
return true;
|
42 |
+
}
|
43 |
+
return false;
|
44 |
+
}
|
45 |
+
|
46 |
+
/**
|
47 |
+
* walk objects and arrays
|
48 |
+
* @param {Object} obj
|
49 |
+
* @param {Function} iterator
|
50 |
+
* @param {Object} context
|
51 |
+
*/
|
52 |
+
function each(obj, iterator, context) {
|
53 |
+
var i;
|
54 |
+
|
55 |
+
if (!obj) {
|
56 |
+
return;
|
57 |
+
}
|
58 |
+
|
59 |
+
if (obj.forEach) {
|
60 |
+
obj.forEach(iterator, context);
|
61 |
+
} else if (obj.length !== undefined) {
|
62 |
+
i = 0;
|
63 |
+
while (i < obj.length) {
|
64 |
+
iterator.call(context, obj[i], i, obj);
|
65 |
+
i++;
|
66 |
+
}
|
67 |
+
} else {
|
68 |
+
for (i in obj) {
|
69 |
+
obj.hasOwnProperty(i) && iterator.call(context, obj[i], i, obj);
|
70 |
+
}
|
71 |
+
}
|
72 |
+
}
|
73 |
+
|
74 |
+
/**
|
75 |
+
* wrap a method with a deprecation warning and stack trace
|
76 |
+
* @param {Function} method
|
77 |
+
* @param {String} name
|
78 |
+
* @param {String} message
|
79 |
+
* @returns {Function} A new function wrapping the supplied method.
|
80 |
+
*/
|
81 |
+
function deprecate(method, name, message) {
|
82 |
+
var deprecationMessage = 'DEPRECATED METHOD: ' + name + '\n' + message + ' AT \n';
|
83 |
+
return function() {
|
84 |
+
var e = new Error('get-stack-trace');
|
85 |
+
var stack = e && e.stack ? e.stack.replace(/^[^\(]+?[\n$]/gm, '')
|
86 |
+
.replace(/^\s+at\s+/gm, '')
|
87 |
+
.replace(/^Object.<anonymous>\s*\(/gm, '{anonymous}()@') : 'Unknown Stack Trace';
|
88 |
+
|
89 |
+
var log = window.console && (window.console.warn || window.console.log);
|
90 |
+
if (log) {
|
91 |
+
log.call(window.console, deprecationMessage, stack);
|
92 |
+
}
|
93 |
+
return method.apply(this, arguments);
|
94 |
+
};
|
95 |
+
}
|
96 |
+
|
97 |
+
/**
|
98 |
+
* extend object.
|
99 |
+
* means that properties in dest will be overwritten by the ones in src.
|
100 |
+
* @param {Object} target
|
101 |
+
* @param {...Object} objects_to_assign
|
102 |
+
* @returns {Object} target
|
103 |
+
*/
|
104 |
+
var assign;
|
105 |
+
if (typeof Object.assign !== 'function') {
|
106 |
+
assign = function assign(target) {
|
107 |
+
if (target === undefined || target === null) {
|
108 |
+
throw new TypeError('Cannot convert undefined or null to object');
|
109 |
+
}
|
110 |
+
|
111 |
+
var output = Object(target);
|
112 |
+
for (var index = 1; index < arguments.length; index++) {
|
113 |
+
var source = arguments[index];
|
114 |
+
if (source !== undefined && source !== null) {
|
115 |
+
for (var nextKey in source) {
|
116 |
+
if (source.hasOwnProperty(nextKey)) {
|
117 |
+
output[nextKey] = source[nextKey];
|
118 |
+
}
|
119 |
+
}
|
120 |
+
}
|
121 |
+
}
|
122 |
+
return output;
|
123 |
+
};
|
124 |
+
} else {
|
125 |
+
assign = Object.assign;
|
126 |
+
}
|
127 |
+
|
128 |
+
/**
|
129 |
+
* extend object.
|
130 |
+
* means that properties in dest will be overwritten by the ones in src.
|
131 |
+
* @param {Object} dest
|
132 |
+
* @param {Object} src
|
133 |
+
* @param {Boolean} [merge=false]
|
134 |
+
* @returns {Object} dest
|
135 |
+
*/
|
136 |
+
var extend = deprecate(function extend(dest, src, merge) {
|
137 |
+
var keys = Object.keys(src);
|
138 |
+
var i = 0;
|
139 |
+
while (i < keys.length) {
|
140 |
+
if (!merge || (merge && dest[keys[i]] === undefined)) {
|
141 |
+
dest[keys[i]] = src[keys[i]];
|
142 |
+
}
|
143 |
+
i++;
|
144 |
+
}
|
145 |
+
return dest;
|
146 |
+
}, 'extend', 'Use `assign`.');
|
147 |
+
|
148 |
+
/**
|
149 |
+
* merge the values from src in the dest.
|
150 |
+
* means that properties that exist in dest will not be overwritten by src
|
151 |
+
* @param {Object} dest
|
152 |
+
* @param {Object} src
|
153 |
+
* @returns {Object} dest
|
154 |
+
*/
|
155 |
+
var merge = deprecate(function merge(dest, src) {
|
156 |
+
return extend(dest, src, true);
|
157 |
+
}, 'merge', 'Use `assign`.');
|
158 |
+
|
159 |
+
/**
|
160 |
+
* simple class inheritance
|
161 |
+
* @param {Function} child
|
162 |
+
* @param {Function} base
|
163 |
+
* @param {Object} [properties]
|
164 |
+
*/
|
165 |
+
function inherit(child, base, properties) {
|
166 |
+
var baseP = base.prototype,
|
167 |
+
childP;
|
168 |
+
|
169 |
+
childP = child.prototype = Object.create(baseP);
|
170 |
+
childP.constructor = child;
|
171 |
+
childP._super = baseP;
|
172 |
+
|
173 |
+
if (properties) {
|
174 |
+
assign(childP, properties);
|
175 |
+
}
|
176 |
+
}
|
177 |
+
|
178 |
+
/**
|
179 |
+
* simple function bind
|
180 |
+
* @param {Function} fn
|
181 |
+
* @param {Object} context
|
182 |
+
* @returns {Function}
|
183 |
+
*/
|
184 |
+
function bindFn(fn, context) {
|
185 |
+
return function boundFn() {
|
186 |
+
return fn.apply(context, arguments);
|
187 |
+
};
|
188 |
+
}
|
189 |
+
|
190 |
+
/**
|
191 |
+
* let a boolean value also be a function that must return a boolean
|
192 |
+
* this first item in args will be used as the context
|
193 |
+
* @param {Boolean|Function} val
|
194 |
+
* @param {Array} [args]
|
195 |
+
* @returns {Boolean}
|
196 |
+
*/
|
197 |
+
function boolOrFn(val, args) {
|
198 |
+
if (typeof val == TYPE_FUNCTION) {
|
199 |
+
return val.apply(args ? args[0] || undefined : undefined, args);
|
200 |
+
}
|
201 |
+
return val;
|
202 |
+
}
|
203 |
+
|
204 |
+
/**
|
205 |
+
* use the val2 when val1 is undefined
|
206 |
+
* @param {*} val1
|
207 |
+
* @param {*} val2
|
208 |
+
* @returns {*}
|
209 |
+
*/
|
210 |
+
function ifUndefined(val1, val2) {
|
211 |
+
return (val1 === undefined) ? val2 : val1;
|
212 |
+
}
|
213 |
+
|
214 |
+
/**
|
215 |
+
* addEventListener with multiple events at once
|
216 |
+
* @param {EventTarget} target
|
217 |
+
* @param {String} types
|
218 |
+
* @param {Function} handler
|
219 |
+
*/
|
220 |
+
function addEventListeners(target, types, handler) {
|
221 |
+
each(splitStr(types), function(type) {
|
222 |
+
target.addEventListener(type, handler, false);
|
223 |
+
});
|
224 |
+
}
|
225 |
+
|
226 |
+
/**
|
227 |
+
* removeEventListener with multiple events at once
|
228 |
+
* @param {EventTarget} target
|
229 |
+
* @param {String} types
|
230 |
+
* @param {Function} handler
|
231 |
+
*/
|
232 |
+
function removeEventListeners(target, types, handler) {
|
233 |
+
each(splitStr(types), function(type) {
|
234 |
+
target.removeEventListener(type, handler, false);
|
235 |
+
});
|
236 |
+
}
|
237 |
+
|
238 |
+
/**
|
239 |
+
* find if a node is in the given parent
|
240 |
+
* @method hasParent
|
241 |
+
* @param {HTMLElement} node
|
242 |
+
* @param {HTMLElement} parent
|
243 |
+
* @return {Boolean} found
|
244 |
+
*/
|
245 |
+
function hasParent(node, parent) {
|
246 |
+
while (node) {
|
247 |
+
if (node == parent) {
|
248 |
+
return true;
|
249 |
+
}
|
250 |
+
node = node.parentNode;
|
251 |
+
}
|
252 |
+
return false;
|
253 |
+
}
|
254 |
+
|
255 |
+
/**
|
256 |
+
* small indexOf wrapper
|
257 |
+
* @param {String} str
|
258 |
+
* @param {String} find
|
259 |
+
* @returns {Boolean} found
|
260 |
+
*/
|
261 |
+
function inStr(str, find) {
|
262 |
+
return str.indexOf(find) > -1;
|
263 |
+
}
|
264 |
+
|
265 |
+
/**
|
266 |
+
* split string on whitespace
|
267 |
+
* @param {String} str
|
268 |
+
* @returns {Array} words
|
269 |
+
*/
|
270 |
+
function splitStr(str) {
|
271 |
+
return str.trim().split(/\s+/g);
|
272 |
+
}
|
273 |
+
|
274 |
+
/**
|
275 |
+
* find if a array contains the object using indexOf or a simple polyFill
|
276 |
+
* @param {Array} src
|
277 |
+
* @param {String} find
|
278 |
+
* @param {String} [findByKey]
|
279 |
+
* @return {Boolean|Number} false when not found, or the index
|
280 |
+
*/
|
281 |
+
function inArray(src, find, findByKey) {
|
282 |
+
if (src.indexOf && !findByKey) {
|
283 |
+
return src.indexOf(find);
|
284 |
+
} else {
|
285 |
+
var i = 0;
|
286 |
+
while (i < src.length) {
|
287 |
+
if ((findByKey && src[i][findByKey] == find) || (!findByKey && src[i] === find)) {
|
288 |
+
return i;
|
289 |
+
}
|
290 |
+
i++;
|
291 |
+
}
|
292 |
+
return -1;
|
293 |
+
}
|
294 |
+
}
|
295 |
+
|
296 |
+
/**
|
297 |
+
* convert array-like objects to real arrays
|
298 |
+
* @param {Object} obj
|
299 |
+
* @returns {Array}
|
300 |
+
*/
|
301 |
+
function toArray(obj) {
|
302 |
+
return Array.prototype.slice.call(obj, 0);
|
303 |
+
}
|
304 |
+
|
305 |
+
/**
|
306 |
+
* unique array with objects based on a key (like 'id') or just by the array's value
|
307 |
+
* @param {Array} src [{id:1},{id:2},{id:1}]
|
308 |
+
* @param {String} [key]
|
309 |
+
* @param {Boolean} [sort=False]
|
310 |
+
* @returns {Array} [{id:1},{id:2}]
|
311 |
+
*/
|
312 |
+
function uniqueArray(src, key, sort) {
|
313 |
+
var results = [];
|
314 |
+
var values = [];
|
315 |
+
var i = 0;
|
316 |
+
|
317 |
+
while (i < src.length) {
|
318 |
+
var val = key ? src[i][key] : src[i];
|
319 |
+
if (inArray(values, val) < 0) {
|
320 |
+
results.push(src[i]);
|
321 |
+
}
|
322 |
+
values[i] = val;
|
323 |
+
i++;
|
324 |
+
}
|
325 |
+
|
326 |
+
if (sort) {
|
327 |
+
if (!key) {
|
328 |
+
results = results.sort();
|
329 |
+
} else {
|
330 |
+
results = results.sort(function sortUniqueArray(a, b) {
|
331 |
+
return a[key] > b[key];
|
332 |
+
});
|
333 |
+
}
|
334 |
+
}
|
335 |
+
|
336 |
+
return results;
|
337 |
+
}
|
338 |
+
|
339 |
+
/**
|
340 |
+
* get the prefixed property
|
341 |
+
* @param {Object} obj
|
342 |
+
* @param {String} property
|
343 |
+
* @returns {String|Undefined} prefixed
|
344 |
+
*/
|
345 |
+
function prefixed(obj, property) {
|
346 |
+
var prefix, prop;
|
347 |
+
var camelProp = property[0].toUpperCase() + property.slice(1);
|
348 |
+
|
349 |
+
var i = 0;
|
350 |
+
while (i < VENDOR_PREFIXES.length) {
|
351 |
+
prefix = VENDOR_PREFIXES[i];
|
352 |
+
prop = (prefix) ? prefix + camelProp : property;
|
353 |
+
|
354 |
+
if (prop in obj) {
|
355 |
+
return prop;
|
356 |
+
}
|
357 |
+
i++;
|
358 |
+
}
|
359 |
+
return undefined;
|
360 |
+
}
|
361 |
+
|
362 |
+
/**
|
363 |
+
* get a unique id
|
364 |
+
* @returns {number} uniqueId
|
365 |
+
*/
|
366 |
+
var _uniqueId = 1;
|
367 |
+
function uniqueId() {
|
368 |
+
return _uniqueId++;
|
369 |
+
}
|
370 |
+
|
371 |
+
/**
|
372 |
+
* get the window object of an element
|
373 |
+
* @param {HTMLElement} element
|
374 |
+
* @returns {DocumentView|Window}
|
375 |
+
*/
|
376 |
+
function getWindowForElement(element) {
|
377 |
+
var doc = element.ownerDocument || element;
|
378 |
+
return (doc.defaultView || doc.parentWindow || window);
|
379 |
+
}
|
380 |
+
|
381 |
+
var MOBILE_REGEX = /mobile|tablet|ip(ad|hone|od)|android/i;
|
382 |
+
|
383 |
+
var SUPPORT_TOUCH = ('ontouchstart' in window);
|
384 |
+
var SUPPORT_POINTER_EVENTS = prefixed(window, 'PointerEvent') !== undefined;
|
385 |
+
var SUPPORT_ONLY_TOUCH = SUPPORT_TOUCH && MOBILE_REGEX.test(navigator.userAgent);
|
386 |
+
|
387 |
+
var INPUT_TYPE_TOUCH = 'touch';
|
388 |
+
var INPUT_TYPE_PEN = 'pen';
|
389 |
+
var INPUT_TYPE_MOUSE = 'mouse';
|
390 |
+
var INPUT_TYPE_KINECT = 'kinect';
|
391 |
+
|
392 |
+
var COMPUTE_INTERVAL = 25;
|
393 |
+
|
394 |
+
var INPUT_START = 1;
|
395 |
+
var INPUT_MOVE = 2;
|
396 |
+
var INPUT_END = 4;
|
397 |
+
var INPUT_CANCEL = 8;
|
398 |
+
|
399 |
+
var DIRECTION_NONE = 1;
|
400 |
+
var DIRECTION_LEFT = 2;
|
401 |
+
var DIRECTION_RIGHT = 4;
|
402 |
+
var DIRECTION_UP = 8;
|
403 |
+
var DIRECTION_DOWN = 16;
|
404 |
+
|
405 |
+
var DIRECTION_HORIZONTAL = DIRECTION_LEFT | DIRECTION_RIGHT;
|
406 |
+
var DIRECTION_VERTICAL = DIRECTION_UP | DIRECTION_DOWN;
|
407 |
+
var DIRECTION_ALL = DIRECTION_HORIZONTAL | DIRECTION_VERTICAL;
|
408 |
+
|
409 |
+
var PROPS_XY = ['x', 'y'];
|
410 |
+
var PROPS_CLIENT_XY = ['clientX', 'clientY'];
|
411 |
+
|
412 |
+
/**
|
413 |
+
* create new input type manager
|
414 |
+
* @param {Manager} manager
|
415 |
+
* @param {Function} callback
|
416 |
+
* @returns {Input}
|
417 |
+
* @constructor
|
418 |
+
*/
|
419 |
+
function Input(manager, callback) {
|
420 |
+
var self = this;
|
421 |
+
this.manager = manager;
|
422 |
+
this.callback = callback;
|
423 |
+
this.element = manager.element;
|
424 |
+
this.target = manager.options.inputTarget;
|
425 |
+
|
426 |
+
// smaller wrapper around the handler, for the scope and the enabled state of the manager,
|
427 |
+
// so when disabled the input events are completely bypassed.
|
428 |
+
this.domHandler = function(ev) {
|
429 |
+
if (boolOrFn(manager.options.enable, [manager])) {
|
430 |
+
self.handler(ev);
|
431 |
+
}
|
432 |
+
};
|
433 |
+
|
434 |
+
this.init();
|
435 |
+
|
436 |
+
}
|
437 |
+
|
438 |
+
Input.prototype = {
|
439 |
+
/**
|
440 |
+
* should handle the inputEvent data and trigger the callback
|
441 |
+
* @virtual
|
442 |
+
*/
|
443 |
+
handler: function() { },
|
444 |
+
|
445 |
+
/**
|
446 |
+
* bind the events
|
447 |
+
*/
|
448 |
+
init: function() {
|
449 |
+
this.evEl && addEventListeners(this.element, this.evEl, this.domHandler);
|
450 |
+
this.evTarget && addEventListeners(this.target, this.evTarget, this.domHandler);
|
451 |
+
this.evWin && addEventListeners(getWindowForElement(this.element), this.evWin, this.domHandler);
|
452 |
+
},
|
453 |
+
|
454 |
+
/**
|
455 |
+
* unbind the events
|
456 |
+
*/
|
457 |
+
destroy: function() {
|
458 |
+
this.evEl && removeEventListeners(this.element, this.evEl, this.domHandler);
|
459 |
+
this.evTarget && removeEventListeners(this.target, this.evTarget, this.domHandler);
|
460 |
+
this.evWin && removeEventListeners(getWindowForElement(this.element), this.evWin, this.domHandler);
|
461 |
+
}
|
462 |
+
};
|
463 |
+
|
464 |
+
/**
|
465 |
+
* create new input type manager
|
466 |
+
* called by the Manager constructor
|
467 |
+
* @param {Hammer} manager
|
468 |
+
* @returns {Input}
|
469 |
+
*/
|
470 |
+
function createInputInstance(manager) {
|
471 |
+
var Type;
|
472 |
+
var inputClass = manager.options.inputClass;
|
473 |
+
|
474 |
+
if (inputClass) {
|
475 |
+
Type = inputClass;
|
476 |
+
} else if (SUPPORT_POINTER_EVENTS) {
|
477 |
+
Type = PointerEventInput;
|
478 |
+
} else if (SUPPORT_ONLY_TOUCH) {
|
479 |
+
Type = TouchInput;
|
480 |
+
} else if (!SUPPORT_TOUCH) {
|
481 |
+
Type = MouseInput;
|
482 |
+
} else {
|
483 |
+
Type = TouchMouseInput;
|
484 |
+
}
|
485 |
+
return new (Type)(manager, inputHandler);
|
486 |
+
}
|
487 |
+
|
488 |
+
/**
|
489 |
+
* handle input events
|
490 |
+
* @param {Manager} manager
|
491 |
+
* @param {String} eventType
|
492 |
+
* @param {Object} input
|
493 |
+
*/
|
494 |
+
function inputHandler(manager, eventType, input) {
|
495 |
+
var pointersLen = input.pointers.length;
|
496 |
+
var changedPointersLen = input.changedPointers.length;
|
497 |
+
var isFirst = (eventType & INPUT_START && (pointersLen - changedPointersLen === 0));
|
498 |
+
var isFinal = (eventType & (INPUT_END | INPUT_CANCEL) && (pointersLen - changedPointersLen === 0));
|
499 |
+
|
500 |
+
input.isFirst = !!isFirst;
|
501 |
+
input.isFinal = !!isFinal;
|
502 |
+
|
503 |
+
if (isFirst) {
|
504 |
+
manager.session = {};
|
505 |
+
}
|
506 |
+
|
507 |
+
// source event is the normalized value of the domEvents
|
508 |
+
// like 'touchstart, mouseup, pointerdown'
|
509 |
+
input.eventType = eventType;
|
510 |
+
|
511 |
+
// compute scale, rotation etc
|
512 |
+
computeInputData(manager, input);
|
513 |
+
|
514 |
+
// emit secret event
|
515 |
+
manager.emit('hammer.input', input);
|
516 |
+
|
517 |
+
manager.recognize(input);
|
518 |
+
manager.session.prevInput = input;
|
519 |
+
}
|
520 |
+
|
521 |
+
/**
|
522 |
+
* extend the data with some usable properties like scale, rotate, velocity etc
|
523 |
+
* @param {Object} manager
|
524 |
+
* @param {Object} input
|
525 |
+
*/
|
526 |
+
function computeInputData(manager, input) {
|
527 |
+
var session = manager.session;
|
528 |
+
var pointers = input.pointers;
|
529 |
+
var pointersLength = pointers.length;
|
530 |
+
|
531 |
+
// store the first input to calculate the distance and direction
|
532 |
+
if (!session.firstInput) {
|
533 |
+
session.firstInput = simpleCloneInputData(input);
|
534 |
+
}
|
535 |
+
|
536 |
+
// to compute scale and rotation we need to store the multiple touches
|
537 |
+
if (pointersLength > 1 && !session.firstMultiple) {
|
538 |
+
session.firstMultiple = simpleCloneInputData(input);
|
539 |
+
} else if (pointersLength === 1) {
|
540 |
+
session.firstMultiple = false;
|
541 |
+
}
|
542 |
+
|
543 |
+
var firstInput = session.firstInput;
|
544 |
+
var firstMultiple = session.firstMultiple;
|
545 |
+
var offsetCenter = firstMultiple ? firstMultiple.center : firstInput.center;
|
546 |
+
|
547 |
+
var center = input.center = getCenter(pointers);
|
548 |
+
input.timeStamp = now();
|
549 |
+
input.deltaTime = input.timeStamp - firstInput.timeStamp;
|
550 |
+
|
551 |
+
input.angle = getAngle(offsetCenter, center);
|
552 |
+
input.distance = getDistance(offsetCenter, center);
|
553 |
+
|
554 |
+
computeDeltaXY(session, input);
|
555 |
+
input.offsetDirection = getDirection(input.deltaX, input.deltaY);
|
556 |
+
|
557 |
+
var overallVelocity = getVelocity(input.deltaTime, input.deltaX, input.deltaY);
|
558 |
+
input.overallVelocityX = overallVelocity.x;
|
559 |
+
input.overallVelocityY = overallVelocity.y;
|
560 |
+
input.overallVelocity = (abs(overallVelocity.x) > abs(overallVelocity.y)) ? overallVelocity.x : overallVelocity.y;
|
561 |
+
|
562 |
+
input.scale = firstMultiple ? getScale(firstMultiple.pointers, pointers) : 1;
|
563 |
+
input.rotation = firstMultiple ? getRotation(firstMultiple.pointers, pointers) : 0;
|
564 |
+
|
565 |
+
input.maxPointers = !session.prevInput ? input.pointers.length : ((input.pointers.length >
|
566 |
+
session.prevInput.maxPointers) ? input.pointers.length : session.prevInput.maxPointers);
|
567 |
+
|
568 |
+
computeIntervalInputData(session, input);
|
569 |
+
|
570 |
+
// find the correct target
|
571 |
+
var target = manager.element;
|
572 |
+
if (hasParent(input.srcEvent.target, target)) {
|
573 |
+
target = input.srcEvent.target;
|
574 |
+
}
|
575 |
+
input.target = target;
|
576 |
+
}
|
577 |
+
|
578 |
+
function computeDeltaXY(session, input) {
|
579 |
+
var center = input.center;
|
580 |
+
var offset = session.offsetDelta || {};
|
581 |
+
var prevDelta = session.prevDelta || {};
|
582 |
+
var prevInput = session.prevInput || {};
|
583 |
+
|
584 |
+
if (input.eventType === INPUT_START || prevInput.eventType === INPUT_END) {
|
585 |
+
prevDelta = session.prevDelta = {
|
586 |
+
x: prevInput.deltaX || 0,
|
587 |
+
y: prevInput.deltaY || 0
|
588 |
+
};
|
589 |
+
|
590 |
+
offset = session.offsetDelta = {
|
591 |
+
x: center.x,
|
592 |
+
y: center.y
|
593 |
+
};
|
594 |
+
}
|
595 |
+
|
596 |
+
input.deltaX = prevDelta.x + (center.x - offset.x);
|
597 |
+
input.deltaY = prevDelta.y + (center.y - offset.y);
|
598 |
+
}
|
599 |
+
|
600 |
+
/**
|
601 |
+
* velocity is calculated every x ms
|
602 |
+
* @param {Object} session
|
603 |
+
* @param {Object} input
|
604 |
+
*/
|
605 |
+
function computeIntervalInputData(session, input) {
|
606 |
+
var last = session.lastInterval || input,
|
607 |
+
deltaTime = input.timeStamp - last.timeStamp,
|
608 |
+
velocity, velocityX, velocityY, direction;
|
609 |
+
|
610 |
+
if (input.eventType != INPUT_CANCEL && (deltaTime > COMPUTE_INTERVAL || last.velocity === undefined)) {
|
611 |
+
var deltaX = input.deltaX - last.deltaX;
|
612 |
+
var deltaY = input.deltaY - last.deltaY;
|
613 |
+
|
614 |
+
var v = getVelocity(deltaTime, deltaX, deltaY);
|
615 |
+
velocityX = v.x;
|
616 |
+
velocityY = v.y;
|
617 |
+
velocity = (abs(v.x) > abs(v.y)) ? v.x : v.y;
|
618 |
+
direction = getDirection(deltaX, deltaY);
|
619 |
+
|
620 |
+
session.lastInterval = input;
|
621 |
+
} else {
|
622 |
+
// use latest velocity info if it doesn't overtake a minimum period
|
623 |
+
velocity = last.velocity;
|
624 |
+
velocityX = last.velocityX;
|
625 |
+
velocityY = last.velocityY;
|
626 |
+
direction = last.direction;
|
627 |
+
}
|
628 |
+
|
629 |
+
input.velocity = velocity;
|
630 |
+
input.velocityX = velocityX;
|
631 |
+
input.velocityY = velocityY;
|
632 |
+
input.direction = direction;
|
633 |
+
}
|
634 |
+
|
635 |
+
/**
|
636 |
+
* create a simple clone from the input used for storage of firstInput and firstMultiple
|
637 |
+
* @param {Object} input
|
638 |
+
* @returns {Object} clonedInputData
|
639 |
+
*/
|
640 |
+
function simpleCloneInputData(input) {
|
641 |
+
// make a simple copy of the pointers because we will get a reference if we don't
|
642 |
+
// we only need clientXY for the calculations
|
643 |
+
var pointers = [];
|
644 |
+
var i = 0;
|
645 |
+
while (i < input.pointers.length) {
|
646 |
+
pointers[i] = {
|
647 |
+
clientX: round(input.pointers[i].clientX),
|
648 |
+
clientY: round(input.pointers[i].clientY)
|
649 |
+
};
|
650 |
+
i++;
|
651 |
+
}
|
652 |
+
|
653 |
+
return {
|
654 |
+
timeStamp: now(),
|
655 |
+
pointers: pointers,
|
656 |
+
center: getCenter(pointers),
|
657 |
+
deltaX: input.deltaX,
|
658 |
+
deltaY: input.deltaY
|
659 |
+
};
|
660 |
+
}
|
661 |
+
|
662 |
+
/**
|
663 |
+
* get the center of all the pointers
|
664 |
+
* @param {Array} pointers
|
665 |
+
* @return {Object} center contains `x` and `y` properties
|
666 |
+
*/
|
667 |
+
function getCenter(pointers) {
|
668 |
+
var pointersLength = pointers.length;
|
669 |
+
|
670 |
+
// no need to loop when only one touch
|
671 |
+
if (pointersLength === 1) {
|
672 |
+
return {
|
673 |
+
x: round(pointers[0].clientX),
|
674 |
+
y: round(pointers[0].clientY)
|
675 |
+
};
|
676 |
+
}
|
677 |
+
|
678 |
+
var x = 0, y = 0, i = 0;
|
679 |
+
while (i < pointersLength) {
|
680 |
+
x += pointers[i].clientX;
|
681 |
+
y += pointers[i].clientY;
|
682 |
+
i++;
|
683 |
+
}
|
684 |
+
|
685 |
+
return {
|
686 |
+
x: round(x / pointersLength),
|
687 |
+
y: round(y / pointersLength)
|
688 |
+
};
|
689 |
+
}
|
690 |
+
|
691 |
+
/**
|
692 |
+
* calculate the velocity between two points. unit is in px per ms.
|
693 |
+
* @param {Number} deltaTime
|
694 |
+
* @param {Number} x
|
695 |
+
* @param {Number} y
|
696 |
+
* @return {Object} velocity `x` and `y`
|
697 |
+
*/
|
698 |
+
function getVelocity(deltaTime, x, y) {
|
699 |
+
return {
|
700 |
+
x: x / deltaTime || 0,
|
701 |
+
y: y / deltaTime || 0
|
702 |
+
};
|
703 |
+
}
|
704 |
+
|
705 |
+
/**
|
706 |
+
* get the direction between two points
|
707 |
+
* @param {Number} x
|
708 |
+
* @param {Number} y
|
709 |
+
* @return {Number} direction
|
710 |
+
*/
|
711 |
+
function getDirection(x, y) {
|
712 |
+
if (x === y) {
|
713 |
+
return DIRECTION_NONE;
|
714 |
+
}
|
715 |
+
|
716 |
+
if (abs(x) >= abs(y)) {
|
717 |
+
return x < 0 ? DIRECTION_LEFT : DIRECTION_RIGHT;
|
718 |
+
}
|
719 |
+
return y < 0 ? DIRECTION_UP : DIRECTION_DOWN;
|
720 |
+
}
|
721 |
+
|
722 |
+
/**
|
723 |
+
* calculate the absolute distance between two points
|
724 |
+
* @param {Object} p1 {x, y}
|
725 |
+
* @param {Object} p2 {x, y}
|
726 |
+
* @param {Array} [props] containing x and y keys
|
727 |
+
* @return {Number} distance
|
728 |
+
*/
|
729 |
+
function getDistance(p1, p2, props) {
|
730 |
+
if (!props) {
|
731 |
+
props = PROPS_XY;
|
732 |
+
}
|
733 |
+
var x = p2[props[0]] - p1[props[0]],
|
734 |
+
y = p2[props[1]] - p1[props[1]];
|
735 |
+
|
736 |
+
return Math.sqrt((x * x) + (y * y));
|
737 |
+
}
|
738 |
+
|
739 |
+
/**
|
740 |
+
* calculate the angle between two coordinates
|
741 |
+
* @param {Object} p1
|
742 |
+
* @param {Object} p2
|
743 |
+
* @param {Array} [props] containing x and y keys
|
744 |
+
* @return {Number} angle
|
745 |
+
*/
|
746 |
+
function getAngle(p1, p2, props) {
|
747 |
+
if (!props) {
|
748 |
+
props = PROPS_XY;
|
749 |
+
}
|
750 |
+
var x = p2[props[0]] - p1[props[0]],
|
751 |
+
y = p2[props[1]] - p1[props[1]];
|
752 |
+
return Math.atan2(y, x) * 180 / Math.PI;
|
753 |
+
}
|
754 |
+
|
755 |
+
/**
|
756 |
+
* calculate the rotation degrees between two pointersets
|
757 |
+
* @param {Array} start array of pointers
|
758 |
+
* @param {Array} end array of pointers
|
759 |
+
* @return {Number} rotation
|
760 |
+
*/
|
761 |
+
function getRotation(start, end) {
|
762 |
+
return getAngle(end[1], end[0], PROPS_CLIENT_XY) + getAngle(start[1], start[0], PROPS_CLIENT_XY);
|
763 |
+
}
|
764 |
+
|
765 |
+
/**
|
766 |
+
* calculate the scale factor between two pointersets
|
767 |
+
* no scale is 1, and goes down to 0 when pinched together, and bigger when pinched out
|
768 |
+
* @param {Array} start array of pointers
|
769 |
+
* @param {Array} end array of pointers
|
770 |
+
* @return {Number} scale
|
771 |
+
*/
|
772 |
+
function getScale(start, end) {
|
773 |
+
return getDistance(end[0], end[1], PROPS_CLIENT_XY) / getDistance(start[0], start[1], PROPS_CLIENT_XY);
|
774 |
+
}
|
775 |
+
|
776 |
+
var MOUSE_INPUT_MAP = {
|
777 |
+
mousedown: INPUT_START,
|
778 |
+
mousemove: INPUT_MOVE,
|
779 |
+
mouseup: INPUT_END
|
780 |
+
};
|
781 |
+
|
782 |
+
var MOUSE_ELEMENT_EVENTS = 'mousedown';
|
783 |
+
var MOUSE_WINDOW_EVENTS = 'mousemove mouseup';
|
784 |
+
|
785 |
+
/**
|
786 |
+
* Mouse events input
|
787 |
+
* @constructor
|
788 |
+
* @extends Input
|
789 |
+
*/
|
790 |
+
function MouseInput() {
|
791 |
+
this.evEl = MOUSE_ELEMENT_EVENTS;
|
792 |
+
this.evWin = MOUSE_WINDOW_EVENTS;
|
793 |
+
|
794 |
+
this.pressed = false; // mousedown state
|
795 |
+
|
796 |
+
Input.apply(this, arguments);
|
797 |
+
}
|
798 |
+
|
799 |
+
inherit(MouseInput, Input, {
|
800 |
+
/**
|
801 |
+
* handle mouse events
|
802 |
+
* @param {Object} ev
|
803 |
+
*/
|
804 |
+
handler: function MEhandler(ev) {
|
805 |
+
var eventType = MOUSE_INPUT_MAP[ev.type];
|
806 |
+
|
807 |
+
// on start we want to have the left mouse button down
|
808 |
+
if (eventType & INPUT_START && ev.button === 0) {
|
809 |
+
this.pressed = true;
|
810 |
+
}
|
811 |
+
|
812 |
+
if (eventType & INPUT_MOVE && ev.which !== 1) {
|
813 |
+
eventType = INPUT_END;
|
814 |
+
}
|
815 |
+
|
816 |
+
// mouse must be down
|
817 |
+
if (!this.pressed) {
|
818 |
+
return;
|
819 |
+
}
|
820 |
+
|
821 |
+
if (eventType & INPUT_END) {
|
822 |
+
this.pressed = false;
|
823 |
+
}
|
824 |
+
|
825 |
+
this.callback(this.manager, eventType, {
|
826 |
+
pointers: [ev],
|
827 |
+
changedPointers: [ev],
|
828 |
+
pointerType: INPUT_TYPE_MOUSE,
|
829 |
+
srcEvent: ev
|
830 |
+
});
|
831 |
+
}
|
832 |
+
});
|
833 |
+
|
834 |
+
var POINTER_INPUT_MAP = {
|
835 |
+
pointerdown: INPUT_START,
|
836 |
+
pointermove: INPUT_MOVE,
|
837 |
+
pointerup: INPUT_END,
|
838 |
+
pointercancel: INPUT_CANCEL,
|
839 |
+
pointerout: INPUT_CANCEL
|
840 |
+
};
|
841 |
+
|
842 |
+
// in IE10 the pointer types is defined as an enum
|
843 |
+
var IE10_POINTER_TYPE_ENUM = {
|
844 |
+
2: INPUT_TYPE_TOUCH,
|
845 |
+
3: INPUT_TYPE_PEN,
|
846 |
+
4: INPUT_TYPE_MOUSE,
|
847 |
+
5: INPUT_TYPE_KINECT // see https://twitter.com/jacobrossi/status/480596438489890816
|
848 |
+
};
|
849 |
+
|
850 |
+
var POINTER_ELEMENT_EVENTS = 'pointerdown';
|
851 |
+
var POINTER_WINDOW_EVENTS = 'pointermove pointerup pointercancel';
|
852 |
+
|
853 |
+
// IE10 has prefixed support, and case-sensitive
|
854 |
+
if (window.MSPointerEvent && !window.PointerEvent) {
|
855 |
+
POINTER_ELEMENT_EVENTS = 'MSPointerDown';
|
856 |
+
POINTER_WINDOW_EVENTS = 'MSPointerMove MSPointerUp MSPointerCancel';
|
857 |
+
}
|
858 |
+
|
859 |
+
/**
|
860 |
+
* Pointer events input
|
861 |
+
* @constructor
|
862 |
+
* @extends Input
|
863 |
+
*/
|
864 |
+
function PointerEventInput() {
|
865 |
+
this.evEl = POINTER_ELEMENT_EVENTS;
|
866 |
+
this.evWin = POINTER_WINDOW_EVENTS;
|
867 |
+
|
868 |
+
Input.apply(this, arguments);
|
869 |
+
|
870 |
+
this.store = (this.manager.session.pointerEvents = []);
|
871 |
+
}
|
872 |
+
|
873 |
+
inherit(PointerEventInput, Input, {
|
874 |
+
/**
|
875 |
+
* handle mouse events
|
876 |
+
* @param {Object} ev
|
877 |
+
*/
|
878 |
+
handler: function PEhandler(ev) {
|
879 |
+
var store = this.store;
|
880 |
+
var removePointer = false;
|
881 |
+
|
882 |
+
var eventTypeNormalized = ev.type.toLowerCase().replace('ms', '');
|
883 |
+
var eventType = POINTER_INPUT_MAP[eventTypeNormalized];
|
884 |
+
var pointerType = IE10_POINTER_TYPE_ENUM[ev.pointerType] || ev.pointerType;
|
885 |
+
|
886 |
+
var isTouch = (pointerType == INPUT_TYPE_TOUCH);
|
887 |
+
|
888 |
+
// get index of the event in the store
|
889 |
+
var storeIndex = inArray(store, ev.pointerId, 'pointerId');
|
890 |
+
|
891 |
+
// start and mouse must be down
|
892 |
+
if (eventType & INPUT_START && (ev.button === 0 || isTouch)) {
|
893 |
+
if (storeIndex < 0) {
|
894 |
+
store.push(ev);
|
895 |
+
storeIndex = store.length - 1;
|
896 |
+
}
|
897 |
+
} else if (eventType & (INPUT_END | INPUT_CANCEL)) {
|
898 |
+
removePointer = true;
|
899 |
+
}
|
900 |
+
|
901 |
+
// it not found, so the pointer hasn't been down (so it's probably a hover)
|
902 |
+
if (storeIndex < 0) {
|
903 |
+
return;
|
904 |
+
}
|
905 |
+
|
906 |
+
// update the event in the store
|
907 |
+
store[storeIndex] = ev;
|
908 |
+
|
909 |
+
this.callback(this.manager, eventType, {
|
910 |
+
pointers: store,
|
911 |
+
changedPointers: [ev],
|
912 |
+
pointerType: pointerType,
|
913 |
+
srcEvent: ev
|
914 |
+
});
|
915 |
+
|
916 |
+
if (removePointer) {
|
917 |
+
// remove from the store
|
918 |
+
store.splice(storeIndex, 1);
|
919 |
+
}
|
920 |
+
}
|
921 |
+
});
|
922 |
+
|
923 |
+
var SINGLE_TOUCH_INPUT_MAP = {
|
924 |
+
touchstart: INPUT_START,
|
925 |
+
touchmove: INPUT_MOVE,
|
926 |
+
touchend: INPUT_END,
|
927 |
+
touchcancel: INPUT_CANCEL
|
928 |
+
};
|
929 |
+
|
930 |
+
var SINGLE_TOUCH_TARGET_EVENTS = 'touchstart';
|
931 |
+
var SINGLE_TOUCH_WINDOW_EVENTS = 'touchstart touchmove touchend touchcancel';
|
932 |
+
|
933 |
+
/**
|
934 |
+
* Touch events input
|
935 |
+
* @constructor
|
936 |
+
* @extends Input
|
937 |
+
*/
|
938 |
+
function SingleTouchInput() {
|
939 |
+
this.evTarget = SINGLE_TOUCH_TARGET_EVENTS;
|
940 |
+
this.evWin = SINGLE_TOUCH_WINDOW_EVENTS;
|
941 |
+
this.started = false;
|
942 |
+
|
943 |
+
Input.apply(this, arguments);
|
944 |
+
}
|
945 |
+
|
946 |
+
inherit(SingleTouchInput, Input, {
|
947 |
+
handler: function TEhandler(ev) {
|
948 |
+
var type = SINGLE_TOUCH_INPUT_MAP[ev.type];
|
949 |
+
|
950 |
+
// should we handle the touch events?
|
951 |
+
if (type === INPUT_START) {
|
952 |
+
this.started = true;
|
953 |
+
}
|
954 |
+
|
955 |
+
if (!this.started) {
|
956 |
+
return;
|
957 |
+
}
|
958 |
+
|
959 |
+
var touches = normalizeSingleTouches.call(this, ev, type);
|
960 |
+
|
961 |
+
// when done, reset the started state
|
962 |
+
if (type & (INPUT_END | INPUT_CANCEL) && touches[0].length - touches[1].length === 0) {
|
963 |
+
this.started = false;
|
964 |
+
}
|
965 |
+
|
966 |
+
this.callback(this.manager, type, {
|
967 |
+
pointers: touches[0],
|
968 |
+
changedPointers: touches[1],
|
969 |
+
pointerType: INPUT_TYPE_TOUCH,
|
970 |
+
srcEvent: ev
|
971 |
+
});
|
972 |
+
}
|
973 |
+
});
|
974 |
+
|
975 |
+
/**
|
976 |
+
* @this {TouchInput}
|
977 |
+
* @param {Object} ev
|
978 |
+
* @param {Number} type flag
|
979 |
+
* @returns {undefined|Array} [all, changed]
|
980 |
+
*/
|
981 |
+
function normalizeSingleTouches(ev, type) {
|
982 |
+
var all = toArray(ev.touches);
|
983 |
+
var changed = toArray(ev.changedTouches);
|
984 |
+
|
985 |
+
if (type & (INPUT_END | INPUT_CANCEL)) {
|
986 |
+
all = uniqueArray(all.concat(changed), 'identifier', true);
|
987 |
+
}
|
988 |
+
|
989 |
+
return [all, changed];
|
990 |
+
}
|
991 |
+
|
992 |
+
var TOUCH_INPUT_MAP = {
|
993 |
+
touchstart: INPUT_START,
|
994 |
+
touchmove: INPUT_MOVE,
|
995 |
+
touchend: INPUT_END,
|
996 |
+
touchcancel: INPUT_CANCEL
|
997 |
+
};
|
998 |
+
|
999 |
+
var TOUCH_TARGET_EVENTS = 'touchstart touchmove touchend touchcancel';
|
1000 |
+
|
1001 |
+
/**
|
1002 |
+
* Multi-user touch events input
|
1003 |
+
* @constructor
|
1004 |
+
* @extends Input
|
1005 |
+
*/
|
1006 |
+
function TouchInput() {
|
1007 |
+
this.evTarget = TOUCH_TARGET_EVENTS;
|
1008 |
+
this.targetIds = {};
|
1009 |
+
|
1010 |
+
Input.apply(this, arguments);
|
1011 |
+
}
|
1012 |
+
|
1013 |
+
inherit(TouchInput, Input, {
|
1014 |
+
handler: function MTEhandler(ev) {
|
1015 |
+
var type = TOUCH_INPUT_MAP[ev.type];
|
1016 |
+
var touches = getTouches.call(this, ev, type);
|
1017 |
+
if (!touches) {
|
1018 |
+
return;
|
1019 |
+
}
|
1020 |
+
|
1021 |
+
this.callback(this.manager, type, {
|
1022 |
+
pointers: touches[0],
|
1023 |
+
changedPointers: touches[1],
|
1024 |
+
pointerType: INPUT_TYPE_TOUCH,
|
1025 |
+
srcEvent: ev
|
1026 |
+
});
|
1027 |
+
}
|
1028 |
+
});
|
1029 |
+
|
1030 |
+
/**
|
1031 |
+
* @this {TouchInput}
|
1032 |
+
* @param {Object} ev
|
1033 |
+
* @param {Number} type flag
|
1034 |
+
* @returns {undefined|Array} [all, changed]
|
1035 |
+
*/
|
1036 |
+
function getTouches(ev, type) {
|
1037 |
+
var allTouches = toArray(ev.touches);
|
1038 |
+
var targetIds = this.targetIds;
|
1039 |
+
|
1040 |
+
// when there is only one touch, the process can be simplified
|
1041 |
+
if (type & (INPUT_START | INPUT_MOVE) && allTouches.length === 1) {
|
1042 |
+
targetIds[allTouches[0].identifier] = true;
|
1043 |
+
return [allTouches, allTouches];
|
1044 |
+
}
|
1045 |
+
|
1046 |
+
var i,
|
1047 |
+
targetTouches,
|
1048 |
+
changedTouches = toArray(ev.changedTouches),
|
1049 |
+
changedTargetTouches = [],
|
1050 |
+
target = this.target;
|
1051 |
+
|
1052 |
+
// get target touches from touches
|
1053 |
+
targetTouches = allTouches.filter(function(touch) {
|
1054 |
+
return hasParent(touch.target, target);
|
1055 |
+
});
|
1056 |
+
|
1057 |
+
// collect touches
|
1058 |
+
if (type === INPUT_START) {
|
1059 |
+
i = 0;
|
1060 |
+
while (i < targetTouches.length) {
|
1061 |
+
targetIds[targetTouches[i].identifier] = true;
|
1062 |
+
i++;
|
1063 |
+
}
|
1064 |
+
}
|
1065 |
+
|
1066 |
+
// filter changed touches to only contain touches that exist in the collected target ids
|
1067 |
+
i = 0;
|
1068 |
+
while (i < changedTouches.length) {
|
1069 |
+
if (targetIds[changedTouches[i].identifier]) {
|
1070 |
+
changedTargetTouches.push(changedTouches[i]);
|
1071 |
+
}
|
1072 |
+
|
1073 |
+
// cleanup removed touches
|
1074 |
+
if (type & (INPUT_END | INPUT_CANCEL)) {
|
1075 |
+
delete targetIds[changedTouches[i].identifier];
|
1076 |
+
}
|
1077 |
+
i++;
|
1078 |
+
}
|
1079 |
+
|
1080 |
+
if (!changedTargetTouches.length) {
|
1081 |
+
return;
|
1082 |
+
}
|
1083 |
+
|
1084 |
+
return [
|
1085 |
+
// merge targetTouches with changedTargetTouches so it contains ALL touches, including 'end' and 'cancel'
|
1086 |
+
uniqueArray(targetTouches.concat(changedTargetTouches), 'identifier', true),
|
1087 |
+
changedTargetTouches
|
1088 |
+
];
|
1089 |
+
}
|
1090 |
+
|
1091 |
+
/**
|
1092 |
+
* Combined touch and mouse input
|
1093 |
+
*
|
1094 |
+
* Touch has a higher priority then mouse, and while touching no mouse events are allowed.
|
1095 |
+
* This because touch devices also emit mouse events while doing a touch.
|
1096 |
+
*
|
1097 |
+
* @constructor
|
1098 |
+
* @extends Input
|
1099 |
+
*/
|
1100 |
+
|
1101 |
+
var DEDUP_TIMEOUT = 2500;
|
1102 |
+
var DEDUP_DISTANCE = 25;
|
1103 |
+
|
1104 |
+
function TouchMouseInput() {
|
1105 |
+
Input.apply(this, arguments);
|
1106 |
+
|
1107 |
+
var handler = bindFn(this.handler, this);
|
1108 |
+
this.touch = new TouchInput(this.manager, handler);
|
1109 |
+
this.mouse = new MouseInput(this.manager, handler);
|
1110 |
+
|
1111 |
+
this.primaryTouch = null;
|
1112 |
+
this.lastTouches = [];
|
1113 |
+
}
|
1114 |
+
|
1115 |
+
inherit(TouchMouseInput, Input, {
|
1116 |
+
/**
|
1117 |
+
* handle mouse and touch events
|
1118 |
+
* @param {Hammer} manager
|
1119 |
+
* @param {String} inputEvent
|
1120 |
+
* @param {Object} inputData
|
1121 |
+
*/
|
1122 |
+
handler: function TMEhandler(manager, inputEvent, inputData) {
|
1123 |
+
var isTouch = (inputData.pointerType == INPUT_TYPE_TOUCH),
|
1124 |
+
isMouse = (inputData.pointerType == INPUT_TYPE_MOUSE);
|
1125 |
+
|
1126 |
+
if (isMouse && inputData.sourceCapabilities && inputData.sourceCapabilities.firesTouchEvents) {
|
1127 |
+
return;
|
1128 |
+
}
|
1129 |
+
|
1130 |
+
// when we're in a touch event, record touches to de-dupe synthetic mouse event
|
1131 |
+
if (isTouch) {
|
1132 |
+
recordTouches.call(this, inputEvent, inputData);
|
1133 |
+
} else if (isMouse && isSyntheticEvent.call(this, inputData)) {
|
1134 |
+
return;
|
1135 |
+
}
|
1136 |
+
|
1137 |
+
this.callback(manager, inputEvent, inputData);
|
1138 |
+
},
|
1139 |
+
|
1140 |
+
/**
|
1141 |
+
* remove the event listeners
|
1142 |
+
*/
|
1143 |
+
destroy: function destroy() {
|
1144 |
+
this.touch.destroy();
|
1145 |
+
this.mouse.destroy();
|
1146 |
+
}
|
1147 |
+
});
|
1148 |
+
|
1149 |
+
function recordTouches(eventType, eventData) {
|
1150 |
+
if (eventType & INPUT_START) {
|
1151 |
+
this.primaryTouch = eventData.changedPointers[0].identifier;
|
1152 |
+
setLastTouch.call(this, eventData);
|
1153 |
+
} else if (eventType & (INPUT_END | INPUT_CANCEL)) {
|
1154 |
+
setLastTouch.call(this, eventData);
|
1155 |
+
}
|
1156 |
+
}
|
1157 |
+
|
1158 |
+
function setLastTouch(eventData) {
|
1159 |
+
var touch = eventData.changedPointers[0];
|
1160 |
+
|
1161 |
+
if (touch.identifier === this.primaryTouch) {
|
1162 |
+
var lastTouch = {x: touch.clientX, y: touch.clientY};
|
1163 |
+
this.lastTouches.push(lastTouch);
|
1164 |
+
var lts = this.lastTouches;
|
1165 |
+
var removeLastTouch = function() {
|
1166 |
+
var i = lts.indexOf(lastTouch);
|
1167 |
+
if (i > -1) {
|
1168 |
+
lts.splice(i, 1);
|
1169 |
+
}
|
1170 |
+
};
|
1171 |
+
setTimeout(removeLastTouch, DEDUP_TIMEOUT);
|
1172 |
+
}
|
1173 |
+
}
|
1174 |
+
|
1175 |
+
function isSyntheticEvent(eventData) {
|
1176 |
+
var x = eventData.srcEvent.clientX, y = eventData.srcEvent.clientY;
|
1177 |
+
for (var i = 0; i < this.lastTouches.length; i++) {
|
1178 |
+
var t = this.lastTouches[i];
|
1179 |
+
var dx = Math.abs(x - t.x), dy = Math.abs(y - t.y);
|
1180 |
+
if (dx <= DEDUP_DISTANCE && dy <= DEDUP_DISTANCE) {
|
1181 |
+
return true;
|
1182 |
+
}
|
1183 |
+
}
|
1184 |
+
return false;
|
1185 |
+
}
|
1186 |
+
|
1187 |
+
var PREFIXED_TOUCH_ACTION = prefixed(TEST_ELEMENT.style, 'touchAction');
|
1188 |
+
var NATIVE_TOUCH_ACTION = PREFIXED_TOUCH_ACTION !== undefined;
|
1189 |
+
|
1190 |
+
// magical touchAction value
|
1191 |
+
var TOUCH_ACTION_COMPUTE = 'compute';
|
1192 |
+
var TOUCH_ACTION_AUTO = 'auto';
|
1193 |
+
var TOUCH_ACTION_MANIPULATION = 'manipulation'; // not implemented
|
1194 |
+
var TOUCH_ACTION_NONE = 'none';
|
1195 |
+
var TOUCH_ACTION_PAN_X = 'pan-x';
|
1196 |
+
var TOUCH_ACTION_PAN_Y = 'pan-y';
|
1197 |
+
var TOUCH_ACTION_MAP = getTouchActionProps();
|
1198 |
+
|
1199 |
+
/**
|
1200 |
+
* Touch Action
|
1201 |
+
* sets the touchAction property or uses the js alternative
|
1202 |
+
* @param {Manager} manager
|
1203 |
+
* @param {String} value
|
1204 |
+
* @constructor
|
1205 |
+
*/
|
1206 |
+
function TouchAction(manager, value) {
|
1207 |
+
this.manager = manager;
|
1208 |
+
this.set(value);
|
1209 |
+
}
|
1210 |
+
|
1211 |
+
TouchAction.prototype = {
|
1212 |
+
/**
|
1213 |
+
* set the touchAction value on the element or enable the polyfill
|
1214 |
+
* @param {String} value
|
1215 |
+
*/
|
1216 |
+
set: function(value) {
|
1217 |
+
// find out the touch-action by the event handlers
|
1218 |
+
if (value == TOUCH_ACTION_COMPUTE) {
|
1219 |
+
value = this.compute();
|
1220 |
+
}
|
1221 |
+
|
1222 |
+
if (NATIVE_TOUCH_ACTION && this.manager.element.style && TOUCH_ACTION_MAP[value]) {
|
1223 |
+
this.manager.element.style[PREFIXED_TOUCH_ACTION] = value;
|
1224 |
+
}
|
1225 |
+
this.actions = value.toLowerCase().trim();
|
1226 |
+
},
|
1227 |
+
|
1228 |
+
/**
|
1229 |
+
* just re-set the touchAction value
|
1230 |
+
*/
|
1231 |
+
update: function() {
|
1232 |
+
this.set(this.manager.options.touchAction);
|
1233 |
+
},
|
1234 |
+
|
1235 |
+
/**
|
1236 |
+
* compute the value for the touchAction property based on the recognizer's settings
|
1237 |
+
* @returns {String} value
|
1238 |
+
*/
|
1239 |
+
compute: function() {
|
1240 |
+
var actions = [];
|
1241 |
+
each(this.manager.recognizers, function(recognizer) {
|
1242 |
+
if (boolOrFn(recognizer.options.enable, [recognizer])) {
|
1243 |
+
actions = actions.concat(recognizer.getTouchAction());
|
1244 |
+
}
|
1245 |
+
});
|
1246 |
+
return cleanTouchActions(actions.join(' '));
|
1247 |
+
},
|
1248 |
+
|
1249 |
+
/**
|
1250 |
+
* this method is called on each input cycle and provides the preventing of the browser behavior
|
1251 |
+
* @param {Object} input
|
1252 |
+
*/
|
1253 |
+
preventDefaults: function(input) {
|
1254 |
+
var srcEvent = input.srcEvent;
|
1255 |
+
var direction = input.offsetDirection;
|
1256 |
+
|
1257 |
+
// if the touch action did prevented once this session
|
1258 |
+
if (this.manager.session.prevented) {
|
1259 |
+
srcEvent.preventDefault();
|
1260 |
+
return;
|
1261 |
+
}
|
1262 |
+
|
1263 |
+
var actions = this.actions;
|
1264 |
+
var hasNone = inStr(actions, TOUCH_ACTION_NONE) && !TOUCH_ACTION_MAP[TOUCH_ACTION_NONE];
|
1265 |
+
var hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y) && !TOUCH_ACTION_MAP[TOUCH_ACTION_PAN_Y];
|
1266 |
+
var hasPanX = inStr(actions, TOUCH_ACTION_PAN_X) && !TOUCH_ACTION_MAP[TOUCH_ACTION_PAN_X];
|
1267 |
+
|
1268 |
+
if (hasNone) {
|
1269 |
+
//do not prevent defaults if this is a tap gesture
|
1270 |
+
|
1271 |
+
var isTapPointer = input.pointers.length === 1;
|
1272 |
+
var isTapMovement = input.distance < 2;
|
1273 |
+
var isTapTouchTime = input.deltaTime < 250;
|
1274 |
+
|
1275 |
+
if (isTapPointer && isTapMovement && isTapTouchTime) {
|
1276 |
+
return;
|
1277 |
+
}
|
1278 |
+
}
|
1279 |
+
|
1280 |
+
if (hasPanX && hasPanY) {
|
1281 |
+
// `pan-x pan-y` means browser handles all scrolling/panning, do not prevent
|
1282 |
+
return;
|
1283 |
+
}
|
1284 |
+
|
1285 |
+
if (hasNone ||
|
1286 |
+
(hasPanY && direction & DIRECTION_HORIZONTAL) ||
|
1287 |
+
(hasPanX && direction & DIRECTION_VERTICAL)) {
|
1288 |
+
return this.preventSrc(srcEvent);
|
1289 |
+
}
|
1290 |
+
},
|
1291 |
+
|
1292 |
+
/**
|
1293 |
+
* call preventDefault to prevent the browser's default behavior (scrolling in most cases)
|
1294 |
+
* @param {Object} srcEvent
|
1295 |
+
*/
|
1296 |
+
preventSrc: function(srcEvent) {
|
1297 |
+
this.manager.session.prevented = true;
|
1298 |
+
srcEvent.preventDefault();
|
1299 |
+
}
|
1300 |
+
};
|
1301 |
+
|
1302 |
+
/**
|
1303 |
+
* when the touchActions are collected they are not a valid value, so we need to clean things up. *
|
1304 |
+
* @param {String} actions
|
1305 |
+
* @returns {*}
|
1306 |
+
*/
|
1307 |
+
function cleanTouchActions(actions) {
|
1308 |
+
// none
|
1309 |
+
if (inStr(actions, TOUCH_ACTION_NONE)) {
|
1310 |
+
return TOUCH_ACTION_NONE;
|
1311 |
+
}
|
1312 |
+
|
1313 |
+
var hasPanX = inStr(actions, TOUCH_ACTION_PAN_X);
|
1314 |
+
var hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y);
|
1315 |
+
|
1316 |
+
// if both pan-x and pan-y are set (different recognizers
|
1317 |
+
// for different directions, e.g. horizontal pan but vertical swipe?)
|
1318 |
+
// we need none (as otherwise with pan-x pan-y combined none of these
|
1319 |
+
// recognizers will work, since the browser would handle all panning
|
1320 |
+
if (hasPanX && hasPanY) {
|
1321 |
+
return TOUCH_ACTION_NONE;
|
1322 |
+
}
|
1323 |
+
|
1324 |
+
// pan-x OR pan-y
|
1325 |
+
if (hasPanX || hasPanY) {
|
1326 |
+
return hasPanX ? TOUCH_ACTION_PAN_X : TOUCH_ACTION_PAN_Y;
|
1327 |
+
}
|
1328 |
+
|
1329 |
+
// manipulation
|
1330 |
+
if (inStr(actions, TOUCH_ACTION_MANIPULATION)) {
|
1331 |
+
return TOUCH_ACTION_MANIPULATION;
|
1332 |
+
}
|
1333 |
+
|
1334 |
+
return TOUCH_ACTION_AUTO;
|
1335 |
+
}
|
1336 |
+
|
1337 |
+
function getTouchActionProps() {
|
1338 |
+
if (!NATIVE_TOUCH_ACTION) {
|
1339 |
+
return false;
|
1340 |
+
}
|
1341 |
+
var touchMap = {};
|
1342 |
+
var cssSupports = window.CSS && window.CSS.supports;
|
1343 |
+
['auto', 'manipulation', 'pan-y', 'pan-x', 'pan-x pan-y', 'none'].forEach(function(val) {
|
1344 |
+
|
1345 |
+
// If css.supports is not supported but there is native touch-action assume it supports
|
1346 |
+
// all values. This is the case for IE 10 and 11.
|
1347 |
+
touchMap[val] = cssSupports ? window.CSS.supports('touch-action', val) : true;
|
1348 |
+
});
|
1349 |
+
return touchMap;
|
1350 |
+
}
|
1351 |
+
|
1352 |
+
/**
|
1353 |
+
* Recognizer flow explained; *
|
1354 |
+
* All recognizers have the initial state of POSSIBLE when a input session starts.
|
1355 |
+
* The definition of a input session is from the first input until the last input, with all it's movement in it. *
|
1356 |
+
* Example session for mouse-input: mousedown -> mousemove -> mouseup
|
1357 |
+
*
|
1358 |
+
* On each recognizing cycle (see Manager.recognize) the .recognize() method is executed
|
1359 |
+
* which determines with state it should be.
|
1360 |
+
*
|
1361 |
+
* If the recognizer has the state FAILED, CANCELLED or RECOGNIZED (equals ENDED), it is reset to
|
1362 |
+
* POSSIBLE to give it another change on the next cycle.
|
1363 |
+
*
|
1364 |
+
* Possible
|
1365 |
+
* |
|
1366 |
+
* +-----+---------------+
|
1367 |
+
* | |
|
1368 |
+
* +-----+-----+ |
|
1369 |
+
* | | |
|
1370 |
+
* Failed Cancelled |
|
1371 |
+
* +-------+------+
|
1372 |
+
* | |
|
1373 |
+
* Recognized Began
|
1374 |
+
* |
|
1375 |
+
* Changed
|
1376 |
+
* |
|
1377 |
+
* Ended/Recognized
|
1378 |
+
*/
|
1379 |
+
var STATE_POSSIBLE = 1;
|
1380 |
+
var STATE_BEGAN = 2;
|
1381 |
+
var STATE_CHANGED = 4;
|
1382 |
+
var STATE_ENDED = 8;
|
1383 |
+
var STATE_RECOGNIZED = STATE_ENDED;
|
1384 |
+
var STATE_CANCELLED = 16;
|
1385 |
+
var STATE_FAILED = 32;
|
1386 |
+
|
1387 |
+
/**
|
1388 |
+
* Recognizer
|
1389 |
+
* Every recognizer needs to extend from this class.
|
1390 |
+
* @constructor
|
1391 |
+
* @param {Object} options
|
1392 |
+
*/
|
1393 |
+
function Recognizer(options) {
|
1394 |
+
this.options = assign({}, this.defaults, options || {});
|
1395 |
+
|
1396 |
+
this.id = uniqueId();
|
1397 |
+
|
1398 |
+
this.manager = null;
|
1399 |
+
|
1400 |
+
// default is enable true
|
1401 |
+
this.options.enable = ifUndefined(this.options.enable, true);
|
1402 |
+
|
1403 |
+
this.state = STATE_POSSIBLE;
|
1404 |
+
|
1405 |
+
this.simultaneous = {};
|
1406 |
+
this.requireFail = [];
|
1407 |
+
}
|
1408 |
+
|
1409 |
+
Recognizer.prototype = {
|
1410 |
+
/**
|
1411 |
+
* @virtual
|
1412 |
+
* @type {Object}
|
1413 |
+
*/
|
1414 |
+
defaults: {},
|
1415 |
+
|
1416 |
+
/**
|
1417 |
+
* set options
|
1418 |
+
* @param {Object} options
|
1419 |
+
* @return {Recognizer}
|
1420 |
+
*/
|
1421 |
+
set: function(options) {
|
1422 |
+
assign(this.options, options);
|
1423 |
+
|
1424 |
+
// also update the touchAction, in case something changed about the directions/enabled state
|
1425 |
+
this.manager && this.manager.touchAction.update();
|
1426 |
+
return this;
|
1427 |
+
},
|
1428 |
+
|
1429 |
+
/**
|
1430 |
+
* recognize simultaneous with an other recognizer.
|
1431 |
+
* @param {Recognizer} otherRecognizer
|
1432 |
+
* @returns {Recognizer} this
|
1433 |
+
*/
|
1434 |
+
recognizeWith: function(otherRecognizer) {
|
1435 |
+
if (invokeArrayArg(otherRecognizer, 'recognizeWith', this)) {
|
1436 |
+
return this;
|
1437 |
+
}
|
1438 |
+
|
1439 |
+
var simultaneous = this.simultaneous;
|
1440 |
+
otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);
|
1441 |
+
if (!simultaneous[otherRecognizer.id]) {
|
1442 |
+
simultaneous[otherRecognizer.id] = otherRecognizer;
|
1443 |
+
otherRecognizer.recognizeWith(this);
|
1444 |
+
}
|
1445 |
+
return this;
|
1446 |
+
},
|
1447 |
+
|
1448 |
+
/**
|
1449 |
+
* drop the simultaneous link. it doesnt remove the link on the other recognizer.
|
1450 |
+
* @param {Recognizer} otherRecognizer
|
1451 |
+
* @returns {Recognizer} this
|
1452 |
+
*/
|
1453 |
+
dropRecognizeWith: function(otherRecognizer) {
|
1454 |
+
if (invokeArrayArg(otherRecognizer, 'dropRecognizeWith', this)) {
|
1455 |
+
return this;
|
1456 |
+
}
|
1457 |
+
|
1458 |
+
otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);
|
1459 |
+
delete this.simultaneous[otherRecognizer.id];
|
1460 |
+
return this;
|
1461 |
+
},
|
1462 |
+
|
1463 |
+
/**
|
1464 |
+
* recognizer can only run when an other is failing
|
1465 |
+
* @param {Recognizer} otherRecognizer
|
1466 |
+
* @returns {Recognizer} this
|
1467 |
+
*/
|
1468 |
+
requireFailure: function(otherRecognizer) {
|
1469 |
+
if (invokeArrayArg(otherRecognizer, 'requireFailure', this)) {
|
1470 |
+
return this;
|
1471 |
+
}
|
1472 |
+
|
1473 |
+
var requireFail = this.requireFail;
|
1474 |
+
otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);
|
1475 |
+
if (inArray(requireFail, otherRecognizer) === -1) {
|
1476 |
+
requireFail.push(otherRecognizer);
|
1477 |
+
otherRecognizer.requireFailure(this);
|
1478 |
+
}
|
1479 |
+
return this;
|
1480 |
+
},
|
1481 |
+
|
1482 |
+
/**
|
1483 |
+
* drop the requireFailure link. it does not remove the link on the other recognizer.
|
1484 |
+
* @param {Recognizer} otherRecognizer
|
1485 |
+
* @returns {Recognizer} this
|
1486 |
+
*/
|
1487 |
+
dropRequireFailure: function(otherRecognizer) {
|
1488 |
+
if (invokeArrayArg(otherRecognizer, 'dropRequireFailure', this)) {
|
1489 |
+
return this;
|
1490 |
+
}
|
1491 |
+
|
1492 |
+
otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);
|
1493 |
+
var index = inArray(this.requireFail, otherRecognizer);
|
1494 |
+
if (index > -1) {
|
1495 |
+
this.requireFail.splice(index, 1);
|
1496 |
+
}
|
1497 |
+
return this;
|
1498 |
+
},
|
1499 |
+
|
1500 |
+
/**
|
1501 |
+
* has require failures boolean
|
1502 |
+
* @returns {boolean}
|
1503 |
+
*/
|
1504 |
+
hasRequireFailures: function() {
|
1505 |
+
return this.requireFail.length > 0;
|
1506 |
+
},
|
1507 |
+
|
1508 |
+
/**
|
1509 |
+
* if the recognizer can recognize simultaneous with an other recognizer
|
1510 |
+
* @param {Recognizer} otherRecognizer
|
1511 |
+
* @returns {Boolean}
|
1512 |
+
*/
|
1513 |
+
canRecognizeWith: function(otherRecognizer) {
|
1514 |
+
return !!this.simultaneous[otherRecognizer.id];
|
1515 |
+
},
|
1516 |
+
|
1517 |
+
/**
|
1518 |
+
* You should use `tryEmit` instead of `emit` directly to check
|
1519 |
+
* that all the needed recognizers has failed before emitting.
|
1520 |
+
* @param {Object} input
|
1521 |
+
*/
|
1522 |
+
emit: function(input) {
|
1523 |
+
var self = this;
|
1524 |
+
var state = this.state;
|
1525 |
+
|
1526 |
+
function emit(event) {
|
1527 |
+
self.manager.emit(event, input);
|
1528 |
+
}
|
1529 |
+
|
1530 |
+
// 'panstart' and 'panmove'
|
1531 |
+
if (state < STATE_ENDED) {
|
1532 |
+
emit(self.options.event + stateStr(state));
|
1533 |
+
}
|
1534 |
+
|
1535 |
+
emit(self.options.event); // simple 'eventName' events
|
1536 |
+
|
1537 |
+
if (input.additionalEvent) { // additional event(panleft, panright, pinchin, pinchout...)
|
1538 |
+
emit(input.additionalEvent);
|
1539 |
+
}
|
1540 |
+
|
1541 |
+
// panend and pancancel
|
1542 |
+
if (state >= STATE_ENDED) {
|
1543 |
+
emit(self.options.event + stateStr(state));
|
1544 |
+
}
|
1545 |
+
},
|
1546 |
+
|
1547 |
+
/**
|
1548 |
+
* Check that all the require failure recognizers has failed,
|
1549 |
+
* if true, it emits a gesture event,
|
1550 |
+
* otherwise, setup the state to FAILED.
|
1551 |
+
* @param {Object} input
|
1552 |
+
*/
|
1553 |
+
tryEmit: function(input) {
|
1554 |
+
if (this.canEmit()) {
|
1555 |
+
return this.emit(input);
|
1556 |
+
}
|
1557 |
+
// it's failing anyway
|
1558 |
+
this.state = STATE_FAILED;
|
1559 |
+
},
|
1560 |
+
|
1561 |
+
/**
|
1562 |
+
* can we emit?
|
1563 |
+
* @returns {boolean}
|
1564 |
+
*/
|
1565 |
+
canEmit: function() {
|
1566 |
+
var i = 0;
|
1567 |
+
while (i < this.requireFail.length) {
|
1568 |
+
if (!(this.requireFail[i].state & (STATE_FAILED | STATE_POSSIBLE))) {
|
1569 |
+
return false;
|
1570 |
+
}
|
1571 |
+
i++;
|
1572 |
+
}
|
1573 |
+
return true;
|
1574 |
+
},
|
1575 |
+
|
1576 |
+
/**
|
1577 |
+
* update the recognizer
|
1578 |
+
* @param {Object} inputData
|
1579 |
+
*/
|
1580 |
+
recognize: function(inputData) {
|
1581 |
+
// make a new copy of the inputData
|
1582 |
+
// so we can change the inputData without messing up the other recognizers
|
1583 |
+
var inputDataClone = assign({}, inputData);
|
1584 |
+
|
1585 |
+
// is is enabled and allow recognizing?
|
1586 |
+
if (!boolOrFn(this.options.enable, [this, inputDataClone])) {
|
1587 |
+
this.reset();
|
1588 |
+
this.state = STATE_FAILED;
|
1589 |
+
return;
|
1590 |
+
}
|
1591 |
+
|
1592 |
+
// reset when we've reached the end
|
1593 |
+
if (this.state & (STATE_RECOGNIZED | STATE_CANCELLED | STATE_FAILED)) {
|
1594 |
+
this.state = STATE_POSSIBLE;
|
1595 |
+
}
|
1596 |
+
|
1597 |
+
this.state = this.process(inputDataClone);
|
1598 |
+
|
1599 |
+
// the recognizer has recognized a gesture
|
1600 |
+
// so trigger an event
|
1601 |
+
if (this.state & (STATE_BEGAN | STATE_CHANGED | STATE_ENDED | STATE_CANCELLED)) {
|
1602 |
+
this.tryEmit(inputDataClone);
|
1603 |
+
}
|
1604 |
+
},
|
1605 |
+
|
1606 |
+
/**
|
1607 |
+
* return the state of the recognizer
|
1608 |
+
* the actual recognizing happens in this method
|
1609 |
+
* @virtual
|
1610 |
+
* @param {Object} inputData
|
1611 |
+
* @returns {Const} STATE
|
1612 |
+
*/
|
1613 |
+
process: function(inputData) { }, // jshint ignore:line
|
1614 |
+
|
1615 |
+
/**
|
1616 |
+
* return the preferred touch-action
|
1617 |
+
* @virtual
|
1618 |
+
* @returns {Array}
|
1619 |
+
*/
|
1620 |
+
getTouchAction: function() { },
|
1621 |
+
|
1622 |
+
/**
|
1623 |
+
* called when the gesture isn't allowed to recognize
|
1624 |
+
* like when another is being recognized or it is disabled
|
1625 |
+
* @virtual
|
1626 |
+
*/
|
1627 |
+
reset: function() { }
|
1628 |
+
};
|
1629 |
+
|
1630 |
+
/**
|
1631 |
+
* get a usable string, used as event postfix
|
1632 |
+
* @param {Const} state
|
1633 |
+
* @returns {String} state
|
1634 |
+
*/
|
1635 |
+
function stateStr(state) {
|
1636 |
+
if (state & STATE_CANCELLED) {
|
1637 |
+
return 'cancel';
|
1638 |
+
} else if (state & STATE_ENDED) {
|
1639 |
+
return 'end';
|
1640 |
+
} else if (state & STATE_CHANGED) {
|
1641 |
+
return 'move';
|
1642 |
+
} else if (state & STATE_BEGAN) {
|
1643 |
+
return 'start';
|
1644 |
+
}
|
1645 |
+
return '';
|
1646 |
+
}
|
1647 |
+
|
1648 |
+
/**
|
1649 |
+
* direction cons to string
|
1650 |
+
* @param {Const} direction
|
1651 |
+
* @returns {String}
|
1652 |
+
*/
|
1653 |
+
function directionStr(direction) {
|
1654 |
+
if (direction == DIRECTION_DOWN) {
|
1655 |
+
return 'down';
|
1656 |
+
} else if (direction == DIRECTION_UP) {
|
1657 |
+
return 'up';
|
1658 |
+
} else if (direction == DIRECTION_LEFT) {
|
1659 |
+
return 'left';
|
1660 |
+
} else if (direction == DIRECTION_RIGHT) {
|
1661 |
+
return 'right';
|
1662 |
+
}
|
1663 |
+
return '';
|
1664 |
+
}
|
1665 |
+
|
1666 |
+
/**
|
1667 |
+
* get a recognizer by name if it is bound to a manager
|
1668 |
+
* @param {Recognizer|String} otherRecognizer
|
1669 |
+
* @param {Recognizer} recognizer
|
1670 |
+
* @returns {Recognizer}
|
1671 |
+
*/
|
1672 |
+
function getRecognizerByNameIfManager(otherRecognizer, recognizer) {
|
1673 |
+
var manager = recognizer.manager;
|
1674 |
+
if (manager) {
|
1675 |
+
return manager.get(otherRecognizer);
|
1676 |
+
}
|
1677 |
+
return otherRecognizer;
|
1678 |
+
}
|
1679 |
+
|
1680 |
+
/**
|
1681 |
+
* This recognizer is just used as a base for the simple attribute recognizers.
|
1682 |
+
* @constructor
|
1683 |
+
* @extends Recognizer
|
1684 |
+
*/
|
1685 |
+
function AttrRecognizer() {
|
1686 |
+
Recognizer.apply(this, arguments);
|
1687 |
+
}
|
1688 |
+
|
1689 |
+
inherit(AttrRecognizer, Recognizer, {
|
1690 |
+
/**
|
1691 |
+
* @namespace
|
1692 |
+
* @memberof AttrRecognizer
|
1693 |
+
*/
|
1694 |
+
defaults: {
|
1695 |
+
/**
|
1696 |
+
* @type {Number}
|
1697 |
+
* @default 1
|
1698 |
+
*/
|
1699 |
+
pointers: 1
|
1700 |
+
},
|
1701 |
+
|
1702 |
+
/**
|
1703 |
+
* Used to check if it the recognizer receives valid input, like input.distance > 10.
|
1704 |
+
* @memberof AttrRecognizer
|
1705 |
+
* @param {Object} input
|
1706 |
+
* @returns {Boolean} recognized
|
1707 |
+
*/
|
1708 |
+
attrTest: function(input) {
|
1709 |
+
var optionPointers = this.options.pointers;
|
1710 |
+
return optionPointers === 0 || input.pointers.length === optionPointers;
|
1711 |
+
},
|
1712 |
+
|
1713 |
+
/**
|
1714 |
+
* Process the input and return the state for the recognizer
|
1715 |
+
* @memberof AttrRecognizer
|
1716 |
+
* @param {Object} input
|
1717 |
+
* @returns {*} State
|
1718 |
+
*/
|
1719 |
+
process: function(input) {
|
1720 |
+
var state = this.state;
|
1721 |
+
var eventType = input.eventType;
|
1722 |
+
|
1723 |
+
var isRecognized = state & (STATE_BEGAN | STATE_CHANGED);
|
1724 |
+
var isValid = this.attrTest(input);
|
1725 |
+
|
1726 |
+
// on cancel input and we've recognized before, return STATE_CANCELLED
|
1727 |
+
if (isRecognized && (eventType & INPUT_CANCEL || !isValid)) {
|
1728 |
+
return state | STATE_CANCELLED;
|
1729 |
+
} else if (isRecognized || isValid) {
|
1730 |
+
if (eventType & INPUT_END) {
|
1731 |
+
return state | STATE_ENDED;
|
1732 |
+
} else if (!(state & STATE_BEGAN)) {
|
1733 |
+
return STATE_BEGAN;
|
1734 |
+
}
|
1735 |
+
return state | STATE_CHANGED;
|
1736 |
+
}
|
1737 |
+
return STATE_FAILED;
|
1738 |
+
}
|
1739 |
+
});
|
1740 |
+
|
1741 |
+
/**
|
1742 |
+
* Pan
|
1743 |
+
* Recognized when the pointer is down and moved in the allowed direction.
|
1744 |
+
* @constructor
|
1745 |
+
* @extends AttrRecognizer
|
1746 |
+
*/
|
1747 |
+
function PanRecognizer() {
|
1748 |
+
AttrRecognizer.apply(this, arguments);
|
1749 |
+
|
1750 |
+
this.pX = null;
|
1751 |
+
this.pY = null;
|
1752 |
+
}
|
1753 |
+
|
1754 |
+
inherit(PanRecognizer, AttrRecognizer, {
|
1755 |
+
/**
|
1756 |
+
* @namespace
|
1757 |
+
* @memberof PanRecognizer
|
1758 |
+
*/
|
1759 |
+
defaults: {
|
1760 |
+
event: 'pan',
|
1761 |
+
threshold: 10,
|
1762 |
+
pointers: 1,
|
1763 |
+
direction: DIRECTION_ALL
|
1764 |
+
},
|
1765 |
+
|
1766 |
+
getTouchAction: function() {
|
1767 |
+
var direction = this.options.direction;
|
1768 |
+
var actions = [];
|
1769 |
+
if (direction & DIRECTION_HORIZONTAL) {
|
1770 |
+
actions.push(TOUCH_ACTION_PAN_Y);
|
1771 |
+
}
|
1772 |
+
if (direction & DIRECTION_VERTICAL) {
|
1773 |
+
actions.push(TOUCH_ACTION_PAN_X);
|
1774 |
+
}
|
1775 |
+
return actions;
|
1776 |
+
},
|
1777 |
+
|
1778 |
+
directionTest: function(input) {
|
1779 |
+
var options = this.options;
|
1780 |
+
var hasMoved = true;
|
1781 |
+
var distance = input.distance;
|
1782 |
+
var direction = input.direction;
|
1783 |
+
var x = input.deltaX;
|
1784 |
+
var y = input.deltaY;
|
1785 |
+
|
1786 |
+
// lock to axis?
|
1787 |
+
if (!(direction & options.direction)) {
|
1788 |
+
if (options.direction & DIRECTION_HORIZONTAL) {
|
1789 |
+
direction = (x === 0) ? DIRECTION_NONE : (x < 0) ? DIRECTION_LEFT : DIRECTION_RIGHT;
|
1790 |
+
hasMoved = x != this.pX;
|
1791 |
+
distance = Math.abs(input.deltaX);
|
1792 |
+
} else {
|
1793 |
+
direction = (y === 0) ? DIRECTION_NONE : (y < 0) ? DIRECTION_UP : DIRECTION_DOWN;
|
1794 |
+
hasMoved = y != this.pY;
|
1795 |
+
distance = Math.abs(input.deltaY);
|
1796 |
+
}
|
1797 |
+
}
|
1798 |
+
input.direction = direction;
|
1799 |
+
return hasMoved && distance > options.threshold && direction & options.direction;
|
1800 |
+
},
|
1801 |
+
|
1802 |
+
attrTest: function(input) {
|
1803 |
+
return AttrRecognizer.prototype.attrTest.call(this, input) &&
|
1804 |
+
(this.state & STATE_BEGAN || (!(this.state & STATE_BEGAN) && this.directionTest(input)));
|
1805 |
+
},
|
1806 |
+
|
1807 |
+
emit: function(input) {
|
1808 |
+
|
1809 |
+
this.pX = input.deltaX;
|
1810 |
+
this.pY = input.deltaY;
|
1811 |
+
|
1812 |
+
var direction = directionStr(input.direction);
|
1813 |
+
|
1814 |
+
if (direction) {
|
1815 |
+
input.additionalEvent = this.options.event + direction;
|
1816 |
+
}
|
1817 |
+
this._super.emit.call(this, input);
|
1818 |
+
}
|
1819 |
+
});
|
1820 |
+
|
1821 |
+
/**
|
1822 |
+
* Pinch
|
1823 |
+
* Recognized when two or more pointers are moving toward (zoom-in) or away from each other (zoom-out).
|
1824 |
+
* @constructor
|
1825 |
+
* @extends AttrRecognizer
|
1826 |
+
*/
|
1827 |
+
function PinchRecognizer() {
|
1828 |
+
AttrRecognizer.apply(this, arguments);
|
1829 |
+
}
|
1830 |
+
|
1831 |
+
inherit(PinchRecognizer, AttrRecognizer, {
|
1832 |
+
/**
|
1833 |
+
* @namespace
|
1834 |
+
* @memberof PinchRecognizer
|
1835 |
+
*/
|
1836 |
+
defaults: {
|
1837 |
+
event: 'pinch',
|
1838 |
+
threshold: 0,
|
1839 |
+
pointers: 2
|
1840 |
+
},
|
1841 |
+
|
1842 |
+
getTouchAction: function() {
|
1843 |
+
return [TOUCH_ACTION_NONE];
|
1844 |
+
},
|
1845 |
+
|
1846 |
+
attrTest: function(input) {
|
1847 |
+
return this._super.attrTest.call(this, input) &&
|
1848 |
+
(Math.abs(input.scale - 1) > this.options.threshold || this.state & STATE_BEGAN);
|
1849 |
+
},
|
1850 |
+
|
1851 |
+
emit: function(input) {
|
1852 |
+
if (input.scale !== 1) {
|
1853 |
+
var inOut = input.scale < 1 ? 'in' : 'out';
|
1854 |
+
input.additionalEvent = this.options.event + inOut;
|
1855 |
+
}
|
1856 |
+
this._super.emit.call(this, input);
|
1857 |
+
}
|
1858 |
+
});
|
1859 |
+
|
1860 |
+
/**
|
1861 |
+
* Press
|
1862 |
+
* Recognized when the pointer is down for x ms without any movement.
|
1863 |
+
* @constructor
|
1864 |
+
* @extends Recognizer
|
1865 |
+
*/
|
1866 |
+
function PressRecognizer() {
|
1867 |
+
Recognizer.apply(this, arguments);
|
1868 |
+
|
1869 |
+
this._timer = null;
|
1870 |
+
this._input = null;
|
1871 |
+
}
|
1872 |
+
|
1873 |
+
inherit(PressRecognizer, Recognizer, {
|
1874 |
+
/**
|
1875 |
+
* @namespace
|
1876 |
+
* @memberof PressRecognizer
|
1877 |
+
*/
|
1878 |
+
defaults: {
|
1879 |
+
event: 'press',
|
1880 |
+
pointers: 1,
|
1881 |
+
time: 251, // minimal time of the pointer to be pressed
|
1882 |
+
threshold: 9 // a minimal movement is ok, but keep it low
|
1883 |
+
},
|
1884 |
+
|
1885 |
+
getTouchAction: function() {
|
1886 |
+
return [TOUCH_ACTION_AUTO];
|
1887 |
+
},
|
1888 |
+
|
1889 |
+
process: function(input) {
|
1890 |
+
var options = this.options;
|
1891 |
+
var validPointers = input.pointers.length === options.pointers;
|
1892 |
+
var validMovement = input.distance < options.threshold;
|
1893 |
+
var validTime = input.deltaTime > options.time;
|
1894 |
+
|
1895 |
+
this._input = input;
|
1896 |
+
|
1897 |
+
// we only allow little movement
|
1898 |
+
// and we've reached an end event, so a tap is possible
|
1899 |
+
if (!validMovement || !validPointers || (input.eventType & (INPUT_END | INPUT_CANCEL) && !validTime)) {
|
1900 |
+
this.reset();
|
1901 |
+
} else if (input.eventType & INPUT_START) {
|
1902 |
+
this.reset();
|
1903 |
+
this._timer = setTimeoutContext(function() {
|
1904 |
+
this.state = STATE_RECOGNIZED;
|
1905 |
+
this.tryEmit();
|
1906 |
+
}, options.time, this);
|
1907 |
+
} else if (input.eventType & INPUT_END) {
|
1908 |
+
return STATE_RECOGNIZED;
|
1909 |
+
}
|
1910 |
+
return STATE_FAILED;
|
1911 |
+
},
|
1912 |
+
|
1913 |
+
reset: function() {
|
1914 |
+
clearTimeout(this._timer);
|
1915 |
+
},
|
1916 |
+
|
1917 |
+
emit: function(input) {
|
1918 |
+
if (this.state !== STATE_RECOGNIZED) {
|
1919 |
+
return;
|
1920 |
+
}
|
1921 |
+
|
1922 |
+
if (input && (input.eventType & INPUT_END)) {
|
1923 |
+
this.manager.emit(this.options.event + 'up', input);
|
1924 |
+
} else {
|
1925 |
+
this._input.timeStamp = now();
|
1926 |
+
this.manager.emit(this.options.event, this._input);
|
1927 |
+
}
|
1928 |
+
}
|
1929 |
+
});
|
1930 |
+
|
1931 |
+
/**
|
1932 |
+
* Rotate
|
1933 |
+
* Recognized when two or more pointer are moving in a circular motion.
|
1934 |
+
* @constructor
|
1935 |
+
* @extends AttrRecognizer
|
1936 |
+
*/
|
1937 |
+
function RotateRecognizer() {
|
1938 |
+
AttrRecognizer.apply(this, arguments);
|
1939 |
+
}
|
1940 |
+
|
1941 |
+
inherit(RotateRecognizer, AttrRecognizer, {
|
1942 |
+
/**
|
1943 |
+
* @namespace
|
1944 |
+
* @memberof RotateRecognizer
|
1945 |
+
*/
|
1946 |
+
defaults: {
|
1947 |
+
event: 'rotate',
|
1948 |
+
threshold: 0,
|
1949 |
+
pointers: 2
|
1950 |
+
},
|
1951 |
+
|
1952 |
+
getTouchAction: function() {
|
1953 |
+
return [TOUCH_ACTION_NONE];
|
1954 |
+
},
|
1955 |
+
|
1956 |
+
attrTest: function(input) {
|
1957 |
+
return this._super.attrTest.call(this, input) &&
|
1958 |
+
(Math.abs(input.rotation) > this.options.threshold || this.state & STATE_BEGAN);
|
1959 |
+
}
|
1960 |
+
});
|
1961 |
+
|
1962 |
+
/**
|
1963 |
+
* Swipe
|
1964 |
+
* Recognized when the pointer is moving fast (velocity), with enough distance in the allowed direction.
|
1965 |
+
* @constructor
|
1966 |
+
* @extends AttrRecognizer
|
1967 |
+
*/
|
1968 |
+
function SwipeRecognizer() {
|
1969 |
+
AttrRecognizer.apply(this, arguments);
|
1970 |
+
}
|
1971 |
+
|
1972 |
+
inherit(SwipeRecognizer, AttrRecognizer, {
|
1973 |
+
/**
|
1974 |
+
* @namespace
|
1975 |
+
* @memberof SwipeRecognizer
|
1976 |
+
*/
|
1977 |
+
defaults: {
|
1978 |
+
event: 'swipe',
|
1979 |
+
threshold: 10,
|
1980 |
+
velocity: 0.3,
|
1981 |
+
direction: DIRECTION_HORIZONTAL | DIRECTION_VERTICAL,
|
1982 |
+
pointers: 1
|
1983 |
+
},
|
1984 |
+
|
1985 |
+
getTouchAction: function() {
|
1986 |
+
return PanRecognizer.prototype.getTouchAction.call(this);
|
1987 |
+
},
|
1988 |
+
|
1989 |
+
attrTest: function(input) {
|
1990 |
+
var direction = this.options.direction;
|
1991 |
+
var velocity;
|
1992 |
+
|
1993 |
+
if (direction & (DIRECTION_HORIZONTAL | DIRECTION_VERTICAL)) {
|
1994 |
+
velocity = input.overallVelocity;
|
1995 |
+
} else if (direction & DIRECTION_HORIZONTAL) {
|
1996 |
+
velocity = input.overallVelocityX;
|
1997 |
+
} else if (direction & DIRECTION_VERTICAL) {
|
1998 |
+
velocity = input.overallVelocityY;
|
1999 |
+
}
|
2000 |
+
|
2001 |
+
return this._super.attrTest.call(this, input) &&
|
2002 |
+
direction & input.offsetDirection &&
|
2003 |
+
input.distance > this.options.threshold &&
|
2004 |
+
input.maxPointers == this.options.pointers &&
|
2005 |
+
abs(velocity) > this.options.velocity && input.eventType & INPUT_END;
|
2006 |
+
},
|
2007 |
+
|
2008 |
+
emit: function(input) {
|
2009 |
+
var direction = directionStr(input.offsetDirection);
|
2010 |
+
if (direction) {
|
2011 |
+
this.manager.emit(this.options.event + direction, input);
|
2012 |
+
}
|
2013 |
+
|
2014 |
+
this.manager.emit(this.options.event, input);
|
2015 |
+
}
|
2016 |
+
});
|
2017 |
+
|
2018 |
+
/**
|
2019 |
+
* A tap is ecognized when the pointer is doing a small tap/click. Multiple taps are recognized if they occur
|
2020 |
+
* between the given interval and position. The delay option can be used to recognize multi-taps without firing
|
2021 |
+
* a single tap.
|
2022 |
+
*
|
2023 |
+
* The eventData from the emitted event contains the property `tapCount`, which contains the amount of
|
2024 |
+
* multi-taps being recognized.
|
2025 |
+
* @constructor
|
2026 |
+
* @extends Recognizer
|
2027 |
+
*/
|
2028 |
+
function TapRecognizer() {
|
2029 |
+
Recognizer.apply(this, arguments);
|
2030 |
+
|
2031 |
+
// previous time and center,
|
2032 |
+
// used for tap counting
|
2033 |
+
this.pTime = false;
|
2034 |
+
this.pCenter = false;
|
2035 |
+
|
2036 |
+
this._timer = null;
|
2037 |
+
this._input = null;
|
2038 |
+
this.count = 0;
|
2039 |
+
}
|
2040 |
+
|
2041 |
+
inherit(TapRecognizer, Recognizer, {
|
2042 |
+
/**
|
2043 |
+
* @namespace
|
2044 |
+
* @memberof PinchRecognizer
|
2045 |
+
*/
|
2046 |
+
defaults: {
|
2047 |
+
event: 'tap',
|
2048 |
+
pointers: 1,
|
2049 |
+
taps: 1,
|
2050 |
+
interval: 300, // max time between the multi-tap taps
|
2051 |
+
time: 250, // max time of the pointer to be down (like finger on the screen)
|
2052 |
+
threshold: 9, // a minimal movement is ok, but keep it low
|
2053 |
+
posThreshold: 10 // a multi-tap can be a bit off the initial position
|
2054 |
+
},
|
2055 |
+
|
2056 |
+
getTouchAction: function() {
|
2057 |
+
return [TOUCH_ACTION_MANIPULATION];
|
2058 |
+
},
|
2059 |
+
|
2060 |
+
process: function(input) {
|
2061 |
+
var options = this.options;
|
2062 |
+
|
2063 |
+
var validPointers = input.pointers.length === options.pointers;
|
2064 |
+
var validMovement = input.distance < options.threshold;
|
2065 |
+
var validTouchTime = input.deltaTime < options.time;
|
2066 |
+
|
2067 |
+
this.reset();
|
2068 |
+
|
2069 |
+
if ((input.eventType & INPUT_START) && (this.count === 0)) {
|
2070 |
+
return this.failTimeout();
|
2071 |
+
}
|
2072 |
+
|
2073 |
+
// we only allow little movement
|
2074 |
+
// and we've reached an end event, so a tap is possible
|
2075 |
+
if (validMovement && validTouchTime && validPointers) {
|
2076 |
+
if (input.eventType != INPUT_END) {
|
2077 |
+
return this.failTimeout();
|
2078 |
+
}
|
2079 |
+
|
2080 |
+
var validInterval = this.pTime ? (input.timeStamp - this.pTime < options.interval) : true;
|
2081 |
+
var validMultiTap = !this.pCenter || getDistance(this.pCenter, input.center) < options.posThreshold;
|
2082 |
+
|
2083 |
+
this.pTime = input.timeStamp;
|
2084 |
+
this.pCenter = input.center;
|
2085 |
+
|
2086 |
+
if (!validMultiTap || !validInterval) {
|
2087 |
+
this.count = 1;
|
2088 |
+
} else {
|
2089 |
+
this.count += 1;
|
2090 |
+
}
|
2091 |
+
|
2092 |
+
this._input = input;
|
2093 |
+
|
2094 |
+
// if tap count matches we have recognized it,
|
2095 |
+
// else it has began recognizing...
|
2096 |
+
var tapCount = this.count % options.taps;
|
2097 |
+
if (tapCount === 0) {
|
2098 |
+
// no failing requirements, immediately trigger the tap event
|
2099 |
+
// or wait as long as the multitap interval to trigger
|
2100 |
+
if (!this.hasRequireFailures()) {
|
2101 |
+
return STATE_RECOGNIZED;
|
2102 |
+
} else {
|
2103 |
+
this._timer = setTimeoutContext(function() {
|
2104 |
+
this.state = STATE_RECOGNIZED;
|
2105 |
+
this.tryEmit();
|
2106 |
+
}, options.interval, this);
|
2107 |
+
return STATE_BEGAN;
|
2108 |
+
}
|
2109 |
+
}
|
2110 |
+
}
|
2111 |
+
return STATE_FAILED;
|
2112 |
+
},
|
2113 |
+
|
2114 |
+
failTimeout: function() {
|
2115 |
+
this._timer = setTimeoutContext(function() {
|
2116 |
+
this.state = STATE_FAILED;
|
2117 |
+
}, this.options.interval, this);
|
2118 |
+
return STATE_FAILED;
|
2119 |
+
},
|
2120 |
+
|
2121 |
+
reset: function() {
|
2122 |
+
clearTimeout(this._timer);
|
2123 |
+
},
|
2124 |
+
|
2125 |
+
emit: function() {
|
2126 |
+
if (this.state == STATE_RECOGNIZED) {
|
2127 |
+
this._input.tapCount = this.count;
|
2128 |
+
this.manager.emit(this.options.event, this._input);
|
2129 |
+
}
|
2130 |
+
}
|
2131 |
+
});
|
2132 |
+
|
2133 |
+
/**
|
2134 |
+
* Simple way to create a manager with a default set of recognizers.
|
2135 |
+
* @param {HTMLElement} element
|
2136 |
+
* @param {Object} [options]
|
2137 |
+
* @constructor
|
2138 |
+
*/
|
2139 |
+
function Hammer(element, options) {
|
2140 |
+
options = options || {};
|
2141 |
+
options.recognizers = ifUndefined(options.recognizers, Hammer.defaults.preset);
|
2142 |
+
return new Manager(element, options);
|
2143 |
+
}
|
2144 |
+
|
2145 |
+
/**
|
2146 |
+
* @const {string}
|
2147 |
+
*/
|
2148 |
+
Hammer.VERSION = '2.0.8';
|
2149 |
+
|
2150 |
+
/**
|
2151 |
+
* default settings
|
2152 |
+
* @namespace
|
2153 |
+
*/
|
2154 |
+
Hammer.defaults = {
|
2155 |
+
/**
|
2156 |
+
* set if DOM events are being triggered.
|
2157 |
+
* But this is slower and unused by simple implementations, so disabled by default.
|
2158 |
+
* @type {Boolean}
|
2159 |
+
* @default false
|
2160 |
+
*/
|
2161 |
+
domEvents: false,
|
2162 |
+
|
2163 |
+
/**
|
2164 |
+
* The value for the touchAction property/fallback.
|
2165 |
+
* When set to `compute` it will magically set the correct value based on the added recognizers.
|
2166 |
+
* @type {String}
|
2167 |
+
* @default compute
|
2168 |
+
*/
|
2169 |
+
touchAction: TOUCH_ACTION_COMPUTE,
|
2170 |
+
|
2171 |
+
/**
|
2172 |
+
* @type {Boolean}
|
2173 |
+
* @default true
|
2174 |
+
*/
|
2175 |
+
enable: true,
|
2176 |
+
|
2177 |
+
/**
|
2178 |
+
* EXPERIMENTAL FEATURE -- can be removed/changed
|
2179 |
+
* Change the parent input target element.
|
2180 |
+
* If Null, then it is being set the to main element.
|
2181 |
+
* @type {Null|EventTarget}
|
2182 |
+
* @default null
|
2183 |
+
*/
|
2184 |
+
inputTarget: null,
|
2185 |
+
|
2186 |
+
/**
|
2187 |
+
* force an input class
|
2188 |
+
* @type {Null|Function}
|
2189 |
+
* @default null
|
2190 |
+
*/
|
2191 |
+
inputClass: null,
|
2192 |
+
|
2193 |
+
/**
|
2194 |
+
* Default recognizer setup when calling `Hammer()`
|
2195 |
+
* When creating a new Manager these will be skipped.
|
2196 |
+
* @type {Array}
|
2197 |
+
*/
|
2198 |
+
preset: [
|
2199 |
+
// RecognizerClass, options, [recognizeWith, ...], [requireFailure, ...]
|
2200 |
+
[RotateRecognizer, {enable: false}],
|
2201 |
+
[PinchRecognizer, {enable: false}, ['rotate']],
|
2202 |
+
[SwipeRecognizer, {direction: DIRECTION_HORIZONTAL}],
|
2203 |
+
[PanRecognizer, {direction: DIRECTION_HORIZONTAL}, ['swipe']],
|
2204 |
+
[TapRecognizer],
|
2205 |
+
[TapRecognizer, {event: 'doubletap', taps: 2}, ['tap']],
|
2206 |
+
[PressRecognizer]
|
2207 |
+
],
|
2208 |
+
|
2209 |
+
/**
|
2210 |
+
* Some CSS properties can be used to improve the working of Hammer.
|
2211 |
+
* Add them to this method and they will be set when creating a new Manager.
|
2212 |
+
* @namespace
|
2213 |
+
*/
|
2214 |
+
cssProps: {
|
2215 |
+
/**
|
2216 |
+
* Disables text selection to improve the dragging gesture. Mainly for desktop browsers.
|
2217 |
+
* @type {String}
|
2218 |
+
* @default 'none'
|
2219 |
+
*/
|
2220 |
+
userSelect: 'none',
|
2221 |
+
|
2222 |
+
/**
|
2223 |
+
* Disable the Windows Phone grippers when pressing an element.
|
2224 |
+
* @type {String}
|
2225 |
+
* @default 'none'
|
2226 |
+
*/
|
2227 |
+
touchSelect: 'none',
|
2228 |
+
|
2229 |
+
/**
|
2230 |
+
* Disables the default callout shown when you touch and hold a touch target.
|
2231 |
+
* On iOS, when you touch and hold a touch target such as a link, Safari displays
|
2232 |
+
* a callout containing information about the link. This property allows you to disable that callout.
|
2233 |
+
* @type {String}
|
2234 |
+
* @default 'none'
|
2235 |
+
*/
|
2236 |
+
touchCallout: 'none',
|
2237 |
+
|
2238 |
+
/**
|
2239 |
+
* Specifies whether zooming is enabled. Used by IE10>
|
2240 |
+
* @type {String}
|
2241 |
+
* @default 'none'
|
2242 |
+
*/
|
2243 |
+
contentZooming: 'none',
|
2244 |
+
|
2245 |
+
/**
|
2246 |
+
* Specifies that an entire element should be draggable instead of its contents. Mainly for desktop browsers.
|
2247 |
+
* @type {String}
|
2248 |
+
* @default 'none'
|
2249 |
+
*/
|
2250 |
+
userDrag: 'none',
|
2251 |
+
|
2252 |
+
/**
|
2253 |
+
* Overrides the highlight color shown when the user taps a link or a JavaScript
|
2254 |
+
* clickable element in iOS. This property obeys the alpha value, if specified.
|
2255 |
+
* @type {String}
|
2256 |
+
* @default 'rgba(0,0,0,0)'
|
2257 |
+
*/
|
2258 |
+
tapHighlightColor: 'rgba(0,0,0,0)'
|
2259 |
+
}
|
2260 |
+
};
|
2261 |
+
|
2262 |
+
var STOP = 1;
|
2263 |
+
var FORCED_STOP = 2;
|
2264 |
+
|
2265 |
+
/**
|
2266 |
+
* Manager
|
2267 |
+
* @param {HTMLElement} element
|
2268 |
+
* @param {Object} [options]
|
2269 |
+
* @constructor
|
2270 |
+
*/
|
2271 |
+
function Manager(element, options) {
|
2272 |
+
this.options = assign({}, Hammer.defaults, options || {});
|
2273 |
+
|
2274 |
+
this.options.inputTarget = this.options.inputTarget || element;
|
2275 |
+
|
2276 |
+
this.handlers = {};
|
2277 |
+
this.session = {};
|
2278 |
+
this.recognizers = [];
|
2279 |
+
this.oldCssProps = {};
|
2280 |
+
|
2281 |
+
this.element = element;
|
2282 |
+
this.input = createInputInstance(this);
|
2283 |
+
this.touchAction = new TouchAction(this, this.options.touchAction);
|
2284 |
+
|
2285 |
+
toggleCssProps(this, true);
|
2286 |
+
|
2287 |
+
each(this.options.recognizers, function(item) {
|
2288 |
+
var recognizer = this.add(new (item[0])(item[1]));
|
2289 |
+
item[2] && recognizer.recognizeWith(item[2]);
|
2290 |
+
item[3] && recognizer.requireFailure(item[3]);
|
2291 |
+
}, this);
|
2292 |
+
}
|
2293 |
+
|
2294 |
+
Manager.prototype = {
|
2295 |
+
/**
|
2296 |
+
* set options
|
2297 |
+
* @param {Object} options
|
2298 |
+
* @returns {Manager}
|
2299 |
+
*/
|
2300 |
+
set: function(options) {
|
2301 |
+
assign(this.options, options);
|
2302 |
+
|
2303 |
+
// Options that need a little more setup
|
2304 |
+
if (options.touchAction) {
|
2305 |
+
this.touchAction.update();
|
2306 |
+
}
|
2307 |
+
if (options.inputTarget) {
|
2308 |
+
// Clean up existing event listeners and reinitialize
|
2309 |
+
this.input.destroy();
|
2310 |
+
this.input.target = options.inputTarget;
|
2311 |
+
this.input.init();
|
2312 |
+
}
|
2313 |
+
return this;
|
2314 |
+
},
|
2315 |
+
|
2316 |
+
/**
|
2317 |
+
* stop recognizing for this session.
|
2318 |
+
* This session will be discarded, when a new [input]start event is fired.
|
2319 |
+
* When forced, the recognizer cycle is stopped immediately.
|
2320 |
+
* @param {Boolean} [force]
|
2321 |
+
*/
|
2322 |
+
stop: function(force) {
|
2323 |
+
this.session.stopped = force ? FORCED_STOP : STOP;
|
2324 |
+
},
|
2325 |
+
|
2326 |
+
/**
|
2327 |
+
* run the recognizers!
|
2328 |
+
* called by the inputHandler function on every movement of the pointers (touches)
|
2329 |
+
* it walks through all the recognizers and tries to detect the gesture that is being made
|
2330 |
+
* @param {Object} inputData
|
2331 |
+
*/
|
2332 |
+
recognize: function(inputData) {
|
2333 |
+
var session = this.session;
|
2334 |
+
if (session.stopped) {
|
2335 |
+
return;
|
2336 |
+
}
|
2337 |
+
|
2338 |
+
// run the touch-action polyfill
|
2339 |
+
this.touchAction.preventDefaults(inputData);
|
2340 |
+
|
2341 |
+
var recognizer;
|
2342 |
+
var recognizers = this.recognizers;
|
2343 |
+
|
2344 |
+
// this holds the recognizer that is being recognized.
|
2345 |
+
// so the recognizer's state needs to be BEGAN, CHANGED, ENDED or RECOGNIZED
|
2346 |
+
// if no recognizer is detecting a thing, it is set to `null`
|
2347 |
+
var curRecognizer = session.curRecognizer;
|
2348 |
+
|
2349 |
+
// reset when the last recognizer is recognized
|
2350 |
+
// or when we're in a new session
|
2351 |
+
if (!curRecognizer || (curRecognizer && curRecognizer.state & STATE_RECOGNIZED)) {
|
2352 |
+
curRecognizer = session.curRecognizer = null;
|
2353 |
+
}
|
2354 |
+
|
2355 |
+
var i = 0;
|
2356 |
+
while (i < recognizers.length) {
|
2357 |
+
recognizer = recognizers[i];
|
2358 |
+
|
2359 |
+
// find out if we are allowed try to recognize the input for this one.
|
2360 |
+
// 1. allow if the session is NOT forced stopped (see the .stop() method)
|
2361 |
+
// 2. allow if we still haven't recognized a gesture in this session, or the this recognizer is the one
|
2362 |
+
// that is being recognized.
|
2363 |
+
// 3. allow if the recognizer is allowed to run simultaneous with the current recognized recognizer.
|
2364 |
+
// this can be setup with the `recognizeWith()` method on the recognizer.
|
2365 |
+
if (session.stopped !== FORCED_STOP && ( // 1
|
2366 |
+
!curRecognizer || recognizer == curRecognizer || // 2
|
2367 |
+
recognizer.canRecognizeWith(curRecognizer))) { // 3
|
2368 |
+
recognizer.recognize(inputData);
|
2369 |
+
} else {
|
2370 |
+
recognizer.reset();
|
2371 |
+
}
|
2372 |
+
|
2373 |
+
// if the recognizer has been recognizing the input as a valid gesture, we want to store this one as the
|
2374 |
+
// current active recognizer. but only if we don't already have an active recognizer
|
2375 |
+
if (!curRecognizer && recognizer.state & (STATE_BEGAN | STATE_CHANGED | STATE_ENDED)) {
|
2376 |
+
curRecognizer = session.curRecognizer = recognizer;
|
2377 |
+
}
|
2378 |
+
i++;
|
2379 |
+
}
|
2380 |
+
},
|
2381 |
+
|
2382 |
+
/**
|
2383 |
+
* get a recognizer by its event name.
|
2384 |
+
* @param {Recognizer|String} recognizer
|
2385 |
+
* @returns {Recognizer|Null}
|
2386 |
+
*/
|
2387 |
+
get: function(recognizer) {
|
2388 |
+
if (recognizer instanceof Recognizer) {
|
2389 |
+
return recognizer;
|
2390 |
+
}
|
2391 |
+
|
2392 |
+
var recognizers = this.recognizers;
|
2393 |
+
for (var i = 0; i < recognizers.length; i++) {
|
2394 |
+
if (recognizers[i].options.event == recognizer) {
|
2395 |
+
return recognizers[i];
|
2396 |
+
}
|
2397 |
+
}
|
2398 |
+
return null;
|
2399 |
+
},
|
2400 |
+
|
2401 |
+
/**
|
2402 |
+
* add a recognizer to the manager
|
2403 |
+
* existing recognizers with the same event name will be removed
|
2404 |
+
* @param {Recognizer} recognizer
|
2405 |
+
* @returns {Recognizer|Manager}
|
2406 |
+
*/
|
2407 |
+
add: function(recognizer) {
|
2408 |
+
if (invokeArrayArg(recognizer, 'add', this)) {
|
2409 |
+
return this;
|
2410 |
+
}
|
2411 |
+
|
2412 |
+
// remove existing
|
2413 |
+
var existing = this.get(recognizer.options.event);
|
2414 |
+
if (existing) {
|
2415 |
+
this.remove(existing);
|
2416 |
+
}
|
2417 |
+
|
2418 |
+
this.recognizers.push(recognizer);
|
2419 |
+
recognizer.manager = this;
|
2420 |
+
|
2421 |
+
this.touchAction.update();
|
2422 |
+
return recognizer;
|
2423 |
+
},
|
2424 |
+
|
2425 |
+
/**
|
2426 |
+
* remove a recognizer by name or instance
|
2427 |
+
* @param {Recognizer|String} recognizer
|
2428 |
+
* @returns {Manager}
|
2429 |
+
*/
|
2430 |
+
remove: function(recognizer) {
|
2431 |
+
if (invokeArrayArg(recognizer, 'remove', this)) {
|
2432 |
+
return this;
|
2433 |
+
}
|
2434 |
+
|
2435 |
+
recognizer = this.get(recognizer);
|
2436 |
+
|
2437 |
+
// let's make sure this recognizer exists
|
2438 |
+
if (recognizer) {
|
2439 |
+
var recognizers = this.recognizers;
|
2440 |
+
var index = inArray(recognizers, recognizer);
|
2441 |
+
|
2442 |
+
if (index !== -1) {
|
2443 |
+
recognizers.splice(index, 1);
|
2444 |
+
this.touchAction.update();
|
2445 |
+
}
|
2446 |
+
}
|
2447 |
+
|
2448 |
+
return this;
|
2449 |
+
},
|
2450 |
+
|
2451 |
+
/**
|
2452 |
+
* bind event
|
2453 |
+
* @param {String} events
|
2454 |
+
* @param {Function} handler
|
2455 |
+
* @returns {EventEmitter} this
|
2456 |
+
*/
|
2457 |
+
on: function(events, handler) {
|
2458 |
+
if (events === undefined) {
|
2459 |
+
return;
|
2460 |
+
}
|
2461 |
+
if (handler === undefined) {
|
2462 |
+
return;
|
2463 |
+
}
|
2464 |
+
|
2465 |
+
var handlers = this.handlers;
|
2466 |
+
each(splitStr(events), function(event) {
|
2467 |
+
handlers[event] = handlers[event] || [];
|
2468 |
+
handlers[event].push(handler);
|
2469 |
+
});
|
2470 |
+
return this;
|
2471 |
+
},
|
2472 |
+
|
2473 |
+
/**
|
2474 |
+
* unbind event, leave emit blank to remove all handlers
|
2475 |
+
* @param {String} events
|
2476 |
+
* @param {Function} [handler]
|
2477 |
+
* @returns {EventEmitter} this
|
2478 |
+
*/
|
2479 |
+
off: function(events, handler) {
|
2480 |
+
if (events === undefined) {
|
2481 |
+
return;
|
2482 |
+
}
|
2483 |
+
|
2484 |
+
var handlers = this.handlers;
|
2485 |
+
each(splitStr(events), function(event) {
|
2486 |
+
if (!handler) {
|
2487 |
+
delete handlers[event];
|
2488 |
+
} else {
|
2489 |
+
handlers[event] && handlers[event].splice(inArray(handlers[event], handler), 1);
|
2490 |
+
}
|
2491 |
+
});
|
2492 |
+
return this;
|
2493 |
+
},
|
2494 |
+
|
2495 |
+
/**
|
2496 |
+
* emit event to the listeners
|
2497 |
+
* @param {String} event
|
2498 |
+
* @param {Object} data
|
2499 |
+
*/
|
2500 |
+
emit: function(event, data) {
|
2501 |
+
// we also want to trigger dom events
|
2502 |
+
if (this.options.domEvents) {
|
2503 |
+
triggerDomEvent(event, data);
|
2504 |
+
}
|
2505 |
+
|
2506 |
+
// no handlers, so skip it all
|
2507 |
+
var handlers = this.handlers[event] && this.handlers[event].slice();
|
2508 |
+
if (!handlers || !handlers.length) {
|
2509 |
+
return;
|
2510 |
+
}
|
2511 |
+
|
2512 |
+
data.type = event;
|
2513 |
+
data.preventDefault = function() {
|
2514 |
+
data.srcEvent.preventDefault();
|
2515 |
+
};
|
2516 |
+
|
2517 |
+
var i = 0;
|
2518 |
+
while (i < handlers.length) {
|
2519 |
+
handlers[i](data);
|
2520 |
+
i++;
|
2521 |
+
}
|
2522 |
+
},
|
2523 |
+
|
2524 |
+
/**
|
2525 |
+
* destroy the manager and unbinds all events
|
2526 |
+
* it doesn't unbind dom events, that is the user own responsibility
|
2527 |
+
*/
|
2528 |
+
destroy: function() {
|
2529 |
+
this.element && toggleCssProps(this, false);
|
2530 |
+
|
2531 |
+
this.handlers = {};
|
2532 |
+
this.session = {};
|
2533 |
+
this.input.destroy();
|
2534 |
+
this.element = null;
|
2535 |
+
}
|
2536 |
+
};
|
2537 |
+
|
2538 |
+
/**
|
2539 |
+
* add/remove the css properties as defined in manager.options.cssProps
|
2540 |
+
* @param {Manager} manager
|
2541 |
+
* @param {Boolean} add
|
2542 |
+
*/
|
2543 |
+
function toggleCssProps(manager, add) {
|
2544 |
+
var element = manager.element;
|
2545 |
+
if (!element.style) {
|
2546 |
+
return;
|
2547 |
+
}
|
2548 |
+
var prop;
|
2549 |
+
each(manager.options.cssProps, function(value, name) {
|
2550 |
+
prop = prefixed(element.style, name);
|
2551 |
+
if (add) {
|
2552 |
+
manager.oldCssProps[prop] = element.style[prop];
|
2553 |
+
element.style[prop] = value;
|
2554 |
+
} else {
|
2555 |
+
element.style[prop] = manager.oldCssProps[prop] || '';
|
2556 |
+
}
|
2557 |
+
});
|
2558 |
+
if (!add) {
|
2559 |
+
manager.oldCssProps = {};
|
2560 |
+
}
|
2561 |
+
}
|
2562 |
+
|
2563 |
+
/**
|
2564 |
+
* trigger dom event
|
2565 |
+
* @param {String} event
|
2566 |
+
* @param {Object} data
|
2567 |
+
*/
|
2568 |
+
function triggerDomEvent(event, data) {
|
2569 |
+
var gestureEvent = document.createEvent('Event');
|
2570 |
+
gestureEvent.initEvent(event, true, true);
|
2571 |
+
gestureEvent.gesture = data;
|
2572 |
+
data.target.dispatchEvent(gestureEvent);
|
2573 |
+
}
|
2574 |
+
|
2575 |
+
assign(Hammer, {
|
2576 |
+
INPUT_START: INPUT_START,
|
2577 |
+
INPUT_MOVE: INPUT_MOVE,
|
2578 |
+
INPUT_END: INPUT_END,
|
2579 |
+
INPUT_CANCEL: INPUT_CANCEL,
|
2580 |
+
|
2581 |
+
STATE_POSSIBLE: STATE_POSSIBLE,
|
2582 |
+
STATE_BEGAN: STATE_BEGAN,
|
2583 |
+
STATE_CHANGED: STATE_CHANGED,
|
2584 |
+
STATE_ENDED: STATE_ENDED,
|
2585 |
+
STATE_RECOGNIZED: STATE_RECOGNIZED,
|
2586 |
+
STATE_CANCELLED: STATE_CANCELLED,
|
2587 |
+
STATE_FAILED: STATE_FAILED,
|
2588 |
+
|
2589 |
+
DIRECTION_NONE: DIRECTION_NONE,
|
2590 |
+
DIRECTION_LEFT: DIRECTION_LEFT,
|
2591 |
+
DIRECTION_RIGHT: DIRECTION_RIGHT,
|
2592 |
+
DIRECTION_UP: DIRECTION_UP,
|
2593 |
+
DIRECTION_DOWN: DIRECTION_DOWN,
|
2594 |
+
DIRECTION_HORIZONTAL: DIRECTION_HORIZONTAL,
|
2595 |
+
DIRECTION_VERTICAL: DIRECTION_VERTICAL,
|
2596 |
+
DIRECTION_ALL: DIRECTION_ALL,
|
2597 |
+
|
2598 |
+
Manager: Manager,
|
2599 |
+
Input: Input,
|
2600 |
+
TouchAction: TouchAction,
|
2601 |
+
|
2602 |
+
TouchInput: TouchInput,
|
2603 |
+
MouseInput: MouseInput,
|
2604 |
+
PointerEventInput: PointerEventInput,
|
2605 |
+
TouchMouseInput: TouchMouseInput,
|
2606 |
+
SingleTouchInput: SingleTouchInput,
|
2607 |
+
|
2608 |
+
Recognizer: Recognizer,
|
2609 |
+
AttrRecognizer: AttrRecognizer,
|
2610 |
+
Tap: TapRecognizer,
|
2611 |
+
Pan: PanRecognizer,
|
2612 |
+
Swipe: SwipeRecognizer,
|
2613 |
+
Pinch: PinchRecognizer,
|
2614 |
+
Rotate: RotateRecognizer,
|
2615 |
+
Press: PressRecognizer,
|
2616 |
+
|
2617 |
+
on: addEventListeners,
|
2618 |
+
off: removeEventListeners,
|
2619 |
+
each: each,
|
2620 |
+
merge: merge,
|
2621 |
+
extend: extend,
|
2622 |
+
assign: assign,
|
2623 |
+
inherit: inherit,
|
2624 |
+
bindFn: bindFn,
|
2625 |
+
prefixed: prefixed
|
2626 |
+
});
|
2627 |
+
|
2628 |
+
// this prevents errors when Hammer is loaded in the presence of an AMD
|
2629 |
+
// style loader but by script tag, not by the loader.
|
2630 |
+
var freeGlobal = (typeof window !== 'undefined' ? window : (typeof self !== 'undefined' ? self : {})); // jshint ignore:line
|
2631 |
+
freeGlobal.Hammer = Hammer;
|
2632 |
+
|
2633 |
+
if (typeof define === 'function' && define.amd) {
|
2634 |
+
define(function() {
|
2635 |
+
return Hammer;
|
2636 |
+
});
|
2637 |
+
} else if (typeof module != 'undefined' && module.exports) {
|
2638 |
+
module.exports = Hammer;
|
2639 |
+
} else {
|
2640 |
+
window[exportName] = Hammer;
|
2641 |
+
}
|
2642 |
+
|
2643 |
+
})(window, document, 'Hammer');
|
assets/tosrus/hammer.min.js
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*! Hammer.JS - v2.0.8 - 2016-04-23
|
2 |
+
* http://hammerjs.github.io/
|
3 |
+
*
|
4 |
+
* Copyright (c) 2016 Jorik Tangelder;
|
5 |
+
* Licensed under the MIT license */
|
6 |
+
!function(a,b,c,d){"use strict";function e(a,b,c){return setTimeout(j(a,c),b)}function f(a,b,c){return Array.isArray(a)?(g(a,c[b],c),!0):!1}function g(a,b,c){var e;if(a)if(a.forEach)a.forEach(b,c);else if(a.length!==d)for(e=0;e<a.length;)b.call(c,a[e],e,a),e++;else for(e in a)a.hasOwnProperty(e)&&b.call(c,a[e],e,a)}function h(b,c,d){var e="DEPRECATED METHOD: "+c+"\n"+d+" AT \n";return function(){var c=new Error("get-stack-trace"),d=c&&c.stack?c.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",f=a.console&&(a.console.warn||a.console.log);return f&&f.call(a.console,e,d),b.apply(this,arguments)}}function i(a,b,c){var d,e=b.prototype;d=a.prototype=Object.create(e),d.constructor=a,d._super=e,c&&la(d,c)}function j(a,b){return function(){return a.apply(b,arguments)}}function k(a,b){return typeof a==oa?a.apply(b?b[0]||d:d,b):a}function l(a,b){return a===d?b:a}function m(a,b,c){g(q(b),function(b){a.addEventListener(b,c,!1)})}function n(a,b,c){g(q(b),function(b){a.removeEventListener(b,c,!1)})}function o(a,b){for(;a;){if(a==b)return!0;a=a.parentNode}return!1}function p(a,b){return a.indexOf(b)>-1}function q(a){return a.trim().split(/\s+/g)}function r(a,b,c){if(a.indexOf&&!c)return a.indexOf(b);for(var d=0;d<a.length;){if(c&&a[d][c]==b||!c&&a[d]===b)return d;d++}return-1}function s(a){return Array.prototype.slice.call(a,0)}function t(a,b,c){for(var d=[],e=[],f=0;f<a.length;){var g=b?a[f][b]:a[f];r(e,g)<0&&d.push(a[f]),e[f]=g,f++}return c&&(d=b?d.sort(function(a,c){return a[b]>c[b]}):d.sort()),d}function u(a,b){for(var c,e,f=b[0].toUpperCase()+b.slice(1),g=0;g<ma.length;){if(c=ma[g],e=c?c+f:b,e in a)return e;g++}return d}function v(){return ua++}function w(b){var c=b.ownerDocument||b;return c.defaultView||c.parentWindow||a}function x(a,b){var c=this;this.manager=a,this.callback=b,this.element=a.element,this.target=a.options.inputTarget,this.domHandler=function(b){k(a.options.enable,[a])&&c.handler(b)},this.init()}function y(a){var b,c=a.options.inputClass;return new(b=c?c:xa?M:ya?P:wa?R:L)(a,z)}function z(a,b,c){var d=c.pointers.length,e=c.changedPointers.length,f=b&Ea&&d-e===0,g=b&(Ga|Ha)&&d-e===0;c.isFirst=!!f,c.isFinal=!!g,f&&(a.session={}),c.eventType=b,A(a,c),a.emit("hammer.input",c),a.recognize(c),a.session.prevInput=c}function A(a,b){var c=a.session,d=b.pointers,e=d.length;c.firstInput||(c.firstInput=D(b)),e>1&&!c.firstMultiple?c.firstMultiple=D(b):1===e&&(c.firstMultiple=!1);var f=c.firstInput,g=c.firstMultiple,h=g?g.center:f.center,i=b.center=E(d);b.timeStamp=ra(),b.deltaTime=b.timeStamp-f.timeStamp,b.angle=I(h,i),b.distance=H(h,i),B(c,b),b.offsetDirection=G(b.deltaX,b.deltaY);var j=F(b.deltaTime,b.deltaX,b.deltaY);b.overallVelocityX=j.x,b.overallVelocityY=j.y,b.overallVelocity=qa(j.x)>qa(j.y)?j.x:j.y,b.scale=g?K(g.pointers,d):1,b.rotation=g?J(g.pointers,d):0,b.maxPointers=c.prevInput?b.pointers.length>c.prevInput.maxPointers?b.pointers.length:c.prevInput.maxPointers:b.pointers.length,C(c,b);var k=a.element;o(b.srcEvent.target,k)&&(k=b.srcEvent.target),b.target=k}function B(a,b){var c=b.center,d=a.offsetDelta||{},e=a.prevDelta||{},f=a.prevInput||{};b.eventType!==Ea&&f.eventType!==Ga||(e=a.prevDelta={x:f.deltaX||0,y:f.deltaY||0},d=a.offsetDelta={x:c.x,y:c.y}),b.deltaX=e.x+(c.x-d.x),b.deltaY=e.y+(c.y-d.y)}function C(a,b){var c,e,f,g,h=a.lastInterval||b,i=b.timeStamp-h.timeStamp;if(b.eventType!=Ha&&(i>Da||h.velocity===d)){var j=b.deltaX-h.deltaX,k=b.deltaY-h.deltaY,l=F(i,j,k);e=l.x,f=l.y,c=qa(l.x)>qa(l.y)?l.x:l.y,g=G(j,k),a.lastInterval=b}else c=h.velocity,e=h.velocityX,f=h.velocityY,g=h.direction;b.velocity=c,b.velocityX=e,b.velocityY=f,b.direction=g}function D(a){for(var b=[],c=0;c<a.pointers.length;)b[c]={clientX:pa(a.pointers[c].clientX),clientY:pa(a.pointers[c].clientY)},c++;return{timeStamp:ra(),pointers:b,center:E(b),deltaX:a.deltaX,deltaY:a.deltaY}}function E(a){var b=a.length;if(1===b)return{x:pa(a[0].clientX),y:pa(a[0].clientY)};for(var c=0,d=0,e=0;b>e;)c+=a[e].clientX,d+=a[e].clientY,e++;return{x:pa(c/b),y:pa(d/b)}}function F(a,b,c){return{x:b/a||0,y:c/a||0}}function G(a,b){return a===b?Ia:qa(a)>=qa(b)?0>a?Ja:Ka:0>b?La:Ma}function H(a,b,c){c||(c=Qa);var d=b[c[0]]-a[c[0]],e=b[c[1]]-a[c[1]];return Math.sqrt(d*d+e*e)}function I(a,b,c){c||(c=Qa);var d=b[c[0]]-a[c[0]],e=b[c[1]]-a[c[1]];return 180*Math.atan2(e,d)/Math.PI}function J(a,b){return I(b[1],b[0],Ra)+I(a[1],a[0],Ra)}function K(a,b){return H(b[0],b[1],Ra)/H(a[0],a[1],Ra)}function L(){this.evEl=Ta,this.evWin=Ua,this.pressed=!1,x.apply(this,arguments)}function M(){this.evEl=Xa,this.evWin=Ya,x.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}function N(){this.evTarget=$a,this.evWin=_a,this.started=!1,x.apply(this,arguments)}function O(a,b){var c=s(a.touches),d=s(a.changedTouches);return b&(Ga|Ha)&&(c=t(c.concat(d),"identifier",!0)),[c,d]}function P(){this.evTarget=bb,this.targetIds={},x.apply(this,arguments)}function Q(a,b){var c=s(a.touches),d=this.targetIds;if(b&(Ea|Fa)&&1===c.length)return d[c[0].identifier]=!0,[c,c];var e,f,g=s(a.changedTouches),h=[],i=this.target;if(f=c.filter(function(a){return o(a.target,i)}),b===Ea)for(e=0;e<f.length;)d[f[e].identifier]=!0,e++;for(e=0;e<g.length;)d[g[e].identifier]&&h.push(g[e]),b&(Ga|Ha)&&delete d[g[e].identifier],e++;return h.length?[t(f.concat(h),"identifier",!0),h]:void 0}function R(){x.apply(this,arguments);var a=j(this.handler,this);this.touch=new P(this.manager,a),this.mouse=new L(this.manager,a),this.primaryTouch=null,this.lastTouches=[]}function S(a,b){a&Ea?(this.primaryTouch=b.changedPointers[0].identifier,T.call(this,b)):a&(Ga|Ha)&&T.call(this,b)}function T(a){var b=a.changedPointers[0];if(b.identifier===this.primaryTouch){var c={x:b.clientX,y:b.clientY};this.lastTouches.push(c);var d=this.lastTouches,e=function(){var a=d.indexOf(c);a>-1&&d.splice(a,1)};setTimeout(e,cb)}}function U(a){for(var b=a.srcEvent.clientX,c=a.srcEvent.clientY,d=0;d<this.lastTouches.length;d++){var e=this.lastTouches[d],f=Math.abs(b-e.x),g=Math.abs(c-e.y);if(db>=f&&db>=g)return!0}return!1}function V(a,b){this.manager=a,this.set(b)}function W(a){if(p(a,jb))return jb;var b=p(a,kb),c=p(a,lb);return b&&c?jb:b||c?b?kb:lb:p(a,ib)?ib:hb}function X(){if(!fb)return!1;var b={},c=a.CSS&&a.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(d){b[d]=c?a.CSS.supports("touch-action",d):!0}),b}function Y(a){this.options=la({},this.defaults,a||{}),this.id=v(),this.manager=null,this.options.enable=l(this.options.enable,!0),this.state=nb,this.simultaneous={},this.requireFail=[]}function Z(a){return a&sb?"cancel":a&qb?"end":a&pb?"move":a&ob?"start":""}function $(a){return a==Ma?"down":a==La?"up":a==Ja?"left":a==Ka?"right":""}function _(a,b){var c=b.manager;return c?c.get(a):a}function aa(){Y.apply(this,arguments)}function ba(){aa.apply(this,arguments),this.pX=null,this.pY=null}function ca(){aa.apply(this,arguments)}function da(){Y.apply(this,arguments),this._timer=null,this._input=null}function ea(){aa.apply(this,arguments)}function fa(){aa.apply(this,arguments)}function ga(){Y.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function ha(a,b){return b=b||{},b.recognizers=l(b.recognizers,ha.defaults.preset),new ia(a,b)}function ia(a,b){this.options=la({},ha.defaults,b||{}),this.options.inputTarget=this.options.inputTarget||a,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=a,this.input=y(this),this.touchAction=new V(this,this.options.touchAction),ja(this,!0),g(this.options.recognizers,function(a){var b=this.add(new a[0](a[1]));a[2]&&b.recognizeWith(a[2]),a[3]&&b.requireFailure(a[3])},this)}function ja(a,b){var c=a.element;if(c.style){var d;g(a.options.cssProps,function(e,f){d=u(c.style,f),b?(a.oldCssProps[d]=c.style[d],c.style[d]=e):c.style[d]=a.oldCssProps[d]||""}),b||(a.oldCssProps={})}}function ka(a,c){var d=b.createEvent("Event");d.initEvent(a,!0,!0),d.gesture=c,c.target.dispatchEvent(d)}var la,ma=["","webkit","Moz","MS","ms","o"],na=b.createElement("div"),oa="function",pa=Math.round,qa=Math.abs,ra=Date.now;la="function"!=typeof Object.assign?function(a){if(a===d||null===a)throw new TypeError("Cannot convert undefined or null to object");for(var b=Object(a),c=1;c<arguments.length;c++){var e=arguments[c];if(e!==d&&null!==e)for(var f in e)e.hasOwnProperty(f)&&(b[f]=e[f])}return b}:Object.assign;var sa=h(function(a,b,c){for(var e=Object.keys(b),f=0;f<e.length;)(!c||c&&a[e[f]]===d)&&(a[e[f]]=b[e[f]]),f++;return a},"extend","Use `assign`."),ta=h(function(a,b){return sa(a,b,!0)},"merge","Use `assign`."),ua=1,va=/mobile|tablet|ip(ad|hone|od)|android/i,wa="ontouchstart"in a,xa=u(a,"PointerEvent")!==d,ya=wa&&va.test(navigator.userAgent),za="touch",Aa="pen",Ba="mouse",Ca="kinect",Da=25,Ea=1,Fa=2,Ga=4,Ha=8,Ia=1,Ja=2,Ka=4,La=8,Ma=16,Na=Ja|Ka,Oa=La|Ma,Pa=Na|Oa,Qa=["x","y"],Ra=["clientX","clientY"];x.prototype={handler:function(){},init:function(){this.evEl&&m(this.element,this.evEl,this.domHandler),this.evTarget&&m(this.target,this.evTarget,this.domHandler),this.evWin&&m(w(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&n(this.element,this.evEl,this.domHandler),this.evTarget&&n(this.target,this.evTarget,this.domHandler),this.evWin&&n(w(this.element),this.evWin,this.domHandler)}};var Sa={mousedown:Ea,mousemove:Fa,mouseup:Ga},Ta="mousedown",Ua="mousemove mouseup";i(L,x,{handler:function(a){var b=Sa[a.type];b&Ea&&0===a.button&&(this.pressed=!0),b&Fa&&1!==a.which&&(b=Ga),this.pressed&&(b&Ga&&(this.pressed=!1),this.callback(this.manager,b,{pointers:[a],changedPointers:[a],pointerType:Ba,srcEvent:a}))}});var Va={pointerdown:Ea,pointermove:Fa,pointerup:Ga,pointercancel:Ha,pointerout:Ha},Wa={2:za,3:Aa,4:Ba,5:Ca},Xa="pointerdown",Ya="pointermove pointerup pointercancel";a.MSPointerEvent&&!a.PointerEvent&&(Xa="MSPointerDown",Ya="MSPointerMove MSPointerUp MSPointerCancel"),i(M,x,{handler:function(a){var b=this.store,c=!1,d=a.type.toLowerCase().replace("ms",""),e=Va[d],f=Wa[a.pointerType]||a.pointerType,g=f==za,h=r(b,a.pointerId,"pointerId");e&Ea&&(0===a.button||g)?0>h&&(b.push(a),h=b.length-1):e&(Ga|Ha)&&(c=!0),0>h||(b[h]=a,this.callback(this.manager,e,{pointers:b,changedPointers:[a],pointerType:f,srcEvent:a}),c&&b.splice(h,1))}});var Za={touchstart:Ea,touchmove:Fa,touchend:Ga,touchcancel:Ha},$a="touchstart",_a="touchstart touchmove touchend touchcancel";i(N,x,{handler:function(a){var b=Za[a.type];if(b===Ea&&(this.started=!0),this.started){var c=O.call(this,a,b);b&(Ga|Ha)&&c[0].length-c[1].length===0&&(this.started=!1),this.callback(this.manager,b,{pointers:c[0],changedPointers:c[1],pointerType:za,srcEvent:a})}}});var ab={touchstart:Ea,touchmove:Fa,touchend:Ga,touchcancel:Ha},bb="touchstart touchmove touchend touchcancel";i(P,x,{handler:function(a){var b=ab[a.type],c=Q.call(this,a,b);c&&this.callback(this.manager,b,{pointers:c[0],changedPointers:c[1],pointerType:za,srcEvent:a})}});var cb=2500,db=25;i(R,x,{handler:function(a,b,c){var d=c.pointerType==za,e=c.pointerType==Ba;if(!(e&&c.sourceCapabilities&&c.sourceCapabilities.firesTouchEvents)){if(d)S.call(this,b,c);else if(e&&U.call(this,c))return;this.callback(a,b,c)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var eb=u(na.style,"touchAction"),fb=eb!==d,gb="compute",hb="auto",ib="manipulation",jb="none",kb="pan-x",lb="pan-y",mb=X();V.prototype={set:function(a){a==gb&&(a=this.compute()),fb&&this.manager.element.style&&mb[a]&&(this.manager.element.style[eb]=a),this.actions=a.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var a=[];return g(this.manager.recognizers,function(b){k(b.options.enable,[b])&&(a=a.concat(b.getTouchAction()))}),W(a.join(" "))},preventDefaults:function(a){var b=a.srcEvent,c=a.offsetDirection;if(this.manager.session.prevented)return void b.preventDefault();var d=this.actions,e=p(d,jb)&&!mb[jb],f=p(d,lb)&&!mb[lb],g=p(d,kb)&&!mb[kb];if(e){var h=1===a.pointers.length,i=a.distance<2,j=a.deltaTime<250;if(h&&i&&j)return}return g&&f?void 0:e||f&&c&Na||g&&c&Oa?this.preventSrc(b):void 0},preventSrc:function(a){this.manager.session.prevented=!0,a.preventDefault()}};var nb=1,ob=2,pb=4,qb=8,rb=qb,sb=16,tb=32;Y.prototype={defaults:{},set:function(a){return la(this.options,a),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(a){if(f(a,"recognizeWith",this))return this;var b=this.simultaneous;return a=_(a,this),b[a.id]||(b[a.id]=a,a.recognizeWith(this)),this},dropRecognizeWith:function(a){return f(a,"dropRecognizeWith",this)?this:(a=_(a,this),delete this.simultaneous[a.id],this)},requireFailure:function(a){if(f(a,"requireFailure",this))return this;var b=this.requireFail;return a=_(a,this),-1===r(b,a)&&(b.push(a),a.requireFailure(this)),this},dropRequireFailure:function(a){if(f(a,"dropRequireFailure",this))return this;a=_(a,this);var b=r(this.requireFail,a);return b>-1&&this.requireFail.splice(b,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(a){return!!this.simultaneous[a.id]},emit:function(a){function b(b){c.manager.emit(b,a)}var c=this,d=this.state;qb>d&&b(c.options.event+Z(d)),b(c.options.event),a.additionalEvent&&b(a.additionalEvent),d>=qb&&b(c.options.event+Z(d))},tryEmit:function(a){return this.canEmit()?this.emit(a):void(this.state=tb)},canEmit:function(){for(var a=0;a<this.requireFail.length;){if(!(this.requireFail[a].state&(tb|nb)))return!1;a++}return!0},recognize:function(a){var b=la({},a);return k(this.options.enable,[this,b])?(this.state&(rb|sb|tb)&&(this.state=nb),this.state=this.process(b),void(this.state&(ob|pb|qb|sb)&&this.tryEmit(b))):(this.reset(),void(this.state=tb))},process:function(a){},getTouchAction:function(){},reset:function(){}},i(aa,Y,{defaults:{pointers:1},attrTest:function(a){var b=this.options.pointers;return 0===b||a.pointers.length===b},process:function(a){var b=this.state,c=a.eventType,d=b&(ob|pb),e=this.attrTest(a);return d&&(c&Ha||!e)?b|sb:d||e?c&Ga?b|qb:b&ob?b|pb:ob:tb}}),i(ba,aa,{defaults:{event:"pan",threshold:10,pointers:1,direction:Pa},getTouchAction:function(){var a=this.options.direction,b=[];return a&Na&&b.push(lb),a&Oa&&b.push(kb),b},directionTest:function(a){var b=this.options,c=!0,d=a.distance,e=a.direction,f=a.deltaX,g=a.deltaY;return e&b.direction||(b.direction&Na?(e=0===f?Ia:0>f?Ja:Ka,c=f!=this.pX,d=Math.abs(a.deltaX)):(e=0===g?Ia:0>g?La:Ma,c=g!=this.pY,d=Math.abs(a.deltaY))),a.direction=e,c&&d>b.threshold&&e&b.direction},attrTest:function(a){return aa.prototype.attrTest.call(this,a)&&(this.state&ob||!(this.state&ob)&&this.directionTest(a))},emit:function(a){this.pX=a.deltaX,this.pY=a.deltaY;var b=$(a.direction);b&&(a.additionalEvent=this.options.event+b),this._super.emit.call(this,a)}}),i(ca,aa,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[jb]},attrTest:function(a){return this._super.attrTest.call(this,a)&&(Math.abs(a.scale-1)>this.options.threshold||this.state&ob)},emit:function(a){if(1!==a.scale){var b=a.scale<1?"in":"out";a.additionalEvent=this.options.event+b}this._super.emit.call(this,a)}}),i(da,Y,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[hb]},process:function(a){var b=this.options,c=a.pointers.length===b.pointers,d=a.distance<b.threshold,f=a.deltaTime>b.time;if(this._input=a,!d||!c||a.eventType&(Ga|Ha)&&!f)this.reset();else if(a.eventType&Ea)this.reset(),this._timer=e(function(){this.state=rb,this.tryEmit()},b.time,this);else if(a.eventType&Ga)return rb;return tb},reset:function(){clearTimeout(this._timer)},emit:function(a){this.state===rb&&(a&&a.eventType&Ga?this.manager.emit(this.options.event+"up",a):(this._input.timeStamp=ra(),this.manager.emit(this.options.event,this._input)))}}),i(ea,aa,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[jb]},attrTest:function(a){return this._super.attrTest.call(this,a)&&(Math.abs(a.rotation)>this.options.threshold||this.state&ob)}}),i(fa,aa,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:Na|Oa,pointers:1},getTouchAction:function(){return ba.prototype.getTouchAction.call(this)},attrTest:function(a){var b,c=this.options.direction;return c&(Na|Oa)?b=a.overallVelocity:c&Na?b=a.overallVelocityX:c&Oa&&(b=a.overallVelocityY),this._super.attrTest.call(this,a)&&c&a.offsetDirection&&a.distance>this.options.threshold&&a.maxPointers==this.options.pointers&&qa(b)>this.options.velocity&&a.eventType&Ga},emit:function(a){var b=$(a.offsetDirection);b&&this.manager.emit(this.options.event+b,a),this.manager.emit(this.options.event,a)}}),i(ga,Y,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[ib]},process:function(a){var b=this.options,c=a.pointers.length===b.pointers,d=a.distance<b.threshold,f=a.deltaTime<b.time;if(this.reset(),a.eventType&Ea&&0===this.count)return this.failTimeout();if(d&&f&&c){if(a.eventType!=Ga)return this.failTimeout();var g=this.pTime?a.timeStamp-this.pTime<b.interval:!0,h=!this.pCenter||H(this.pCenter,a.center)<b.posThreshold;this.pTime=a.timeStamp,this.pCenter=a.center,h&&g?this.count+=1:this.count=1,this._input=a;var i=this.count%b.taps;if(0===i)return this.hasRequireFailures()?(this._timer=e(function(){this.state=rb,this.tryEmit()},b.interval,this),ob):rb}return tb},failTimeout:function(){return this._timer=e(function(){this.state=tb},this.options.interval,this),tb},reset:function(){clearTimeout(this._timer)},emit:function(){this.state==rb&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),ha.VERSION="2.0.8",ha.defaults={domEvents:!1,touchAction:gb,enable:!0,inputTarget:null,inputClass:null,preset:[[ea,{enable:!1}],[ca,{enable:!1},["rotate"]],[fa,{direction:Na}],[ba,{direction:Na},["swipe"]],[ga],[ga,{event:"doubletap",taps:2},["tap"]],[da]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};var ub=1,vb=2;ia.prototype={set:function(a){return la(this.options,a),a.touchAction&&this.touchAction.update(),a.inputTarget&&(this.input.destroy(),this.input.target=a.inputTarget,this.input.init()),this},stop:function(a){this.session.stopped=a?vb:ub},recognize:function(a){var b=this.session;if(!b.stopped){this.touchAction.preventDefaults(a);var c,d=this.recognizers,e=b.curRecognizer;(!e||e&&e.state&rb)&&(e=b.curRecognizer=null);for(var f=0;f<d.length;)c=d[f],b.stopped===vb||e&&c!=e&&!c.canRecognizeWith(e)?c.reset():c.recognize(a),!e&&c.state&(ob|pb|qb)&&(e=b.curRecognizer=c),f++}},get:function(a){if(a instanceof Y)return a;for(var b=this.recognizers,c=0;c<b.length;c++)if(b[c].options.event==a)return b[c];return null},add:function(a){if(f(a,"add",this))return this;var b=this.get(a.options.event);return b&&this.remove(b),this.recognizers.push(a),a.manager=this,this.touchAction.update(),a},remove:function(a){if(f(a,"remove",this))return this;if(a=this.get(a)){var b=this.recognizers,c=r(b,a);-1!==c&&(b.splice(c,1),this.touchAction.update())}return this},on:function(a,b){if(a!==d&&b!==d){var c=this.handlers;return g(q(a),function(a){c[a]=c[a]||[],c[a].push(b)}),this}},off:function(a,b){if(a!==d){var c=this.handlers;return g(q(a),function(a){b?c[a]&&c[a].splice(r(c[a],b),1):delete c[a]}),this}},emit:function(a,b){this.options.domEvents&&ka(a,b);var c=this.handlers[a]&&this.handlers[a].slice();if(c&&c.length){b.type=a,b.preventDefault=function(){b.srcEvent.preventDefault()};for(var d=0;d<c.length;)c[d](b),d++}},destroy:function(){this.element&&ja(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},la(ha,{INPUT_START:Ea,INPUT_MOVE:Fa,INPUT_END:Ga,INPUT_CANCEL:Ha,STATE_POSSIBLE:nb,STATE_BEGAN:ob,STATE_CHANGED:pb,STATE_ENDED:qb,STATE_RECOGNIZED:rb,STATE_CANCELLED:sb,STATE_FAILED:tb,DIRECTION_NONE:Ia,DIRECTION_LEFT:Ja,DIRECTION_RIGHT:Ka,DIRECTION_UP:La,DIRECTION_DOWN:Ma,DIRECTION_HORIZONTAL:Na,DIRECTION_VERTICAL:Oa,DIRECTION_ALL:Pa,Manager:ia,Input:x,TouchAction:V,TouchInput:P,MouseInput:L,PointerEventInput:M,TouchMouseInput:R,SingleTouchInput:N,Recognizer:Y,AttrRecognizer:aa,Tap:ga,Pan:ba,Swipe:fa,Pinch:ca,Rotate:ea,Press:da,on:m,off:n,each:g,merge:ta,extend:sa,assign:la,inherit:i,bindFn:j,prefixed:u});var wb="undefined"!=typeof a?a:"undefined"!=typeof self?self:{};wb.Hammer=ha,"function"==typeof define&&define.amd?define(function(){return ha}):"undefined"!=typeof module&&module.exports?module.exports=ha:a[c]=ha}(window,document,"Hammer");
|
7 |
+
//# sourceMappingURL=hammer.min.js.map
|
assets/tosrus/jquery.tosrus.css
ADDED
@@ -0,0 +1,600 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.tos-slide,
|
2 |
+
.tos-slider,
|
3 |
+
.tos-wrapper {
|
4 |
+
width: 100%;
|
5 |
+
height: 100%
|
6 |
+
}
|
7 |
+
.tos-noanimation {
|
8 |
+
-webkit-transition-property: none!important;
|
9 |
+
transition-property: none!important
|
10 |
+
}
|
11 |
+
.tos-fastanimation {
|
12 |
+
-webkit-transition-duration: .2s!important;
|
13 |
+
transition-duration: .2s!important;
|
14 |
+
-webkit-transition-timing-function: ease-out!important;
|
15 |
+
transition-timing-function: ease-out!important
|
16 |
+
}
|
17 |
+
.tos-wrapper {
|
18 |
+
opacity: 0;
|
19 |
+
-webkit-transition: opacity .4s ease;
|
20 |
+
transition: opacity .4s ease;
|
21 |
+
display: none;
|
22 |
+
padding: 0;
|
23 |
+
margin: 0;
|
24 |
+
overflow: hidden
|
25 |
+
}
|
26 |
+
.tos-wrapper.tos-opened {
|
27 |
+
display: block
|
28 |
+
}
|
29 |
+
.tos-slide,
|
30 |
+
.tos-slide:before,
|
31 |
+
.tos-slide>* {
|
32 |
+
display: inline-block
|
33 |
+
}
|
34 |
+
.tos-wrapper.tos-opening {
|
35 |
+
opacity: 1
|
36 |
+
}
|
37 |
+
.tos-wrapper.tos-fixed {
|
38 |
+
background-color: #000;
|
39 |
+
position: fixed;
|
40 |
+
top: 0;
|
41 |
+
left: 0;
|
42 |
+
z-index: 9000
|
43 |
+
}
|
44 |
+
.tos-slider,
|
45 |
+
.tos-wrapper.tos-inline {
|
46 |
+
position: relative
|
47 |
+
}
|
48 |
+
.tos-slider {
|
49 |
+
white-space: nowrap;
|
50 |
+
padding: 0;
|
51 |
+
margin: 0
|
52 |
+
}
|
53 |
+
.tos-uibg,
|
54 |
+
.tos-wrapper.tos-fx-slide.tos-fixed .tos-slider {
|
55 |
+
position: absolute
|
56 |
+
}
|
57 |
+
.tos-wrapper.tos-fx-slide .tos-slider {
|
58 |
+
left: 0;
|
59 |
+
-webkit-transition: left .4s ease;
|
60 |
+
transition: left .4s ease
|
61 |
+
}
|
62 |
+
.tos-wrapper.tos-fx-fade .tos-slider {
|
63 |
+
opacity: 1;
|
64 |
+
-webkit-transition: opacity .4s ease;
|
65 |
+
transition: opacity .4s ease
|
66 |
+
}
|
67 |
+
.tos-uibg {
|
68 |
+
opacity: 0;
|
69 |
+
-webkit-transition: opacity .4s ease;
|
70 |
+
transition: opacity .4s ease;
|
71 |
+
width: 100%;
|
72 |
+
left: 0;
|
73 |
+
bottom: 0;
|
74 |
+
z-index: 1
|
75 |
+
}
|
76 |
+
.tos-fill .tos-uibg {
|
77 |
+
background: -webkit-linear-gradient(bottom, rgba(0, 0, 0, .5), transparent);
|
78 |
+
background: linear-gradient(to top, rgba(0, 0, 0, .5), transparent)
|
79 |
+
}
|
80 |
+
.tos-desktop .tos-wrapper:hover .tos-uibg,
|
81 |
+
.tos-touch .tos-wrapper.tos-hover .tos-uibg {
|
82 |
+
opacity: 1
|
83 |
+
}
|
84 |
+
.tos-slide {
|
85 |
+
-webkit-overflow-scrolling: touch;
|
86 |
+
line-height: 1px;
|
87 |
+
text-align: center;
|
88 |
+
box-sizing: border-box;
|
89 |
+
overflow: hidden;
|
90 |
+
position: relative
|
91 |
+
}
|
92 |
+
.tos-slide:before {
|
93 |
+
content: "";
|
94 |
+
height: 50%;
|
95 |
+
width: 1px;
|
96 |
+
margin-right: -1px
|
97 |
+
}
|
98 |
+
.tos-slide.tos-loading>* {
|
99 |
+
opacity: 0
|
100 |
+
}
|
101 |
+
.tos-slide>* {
|
102 |
+
opacity: 1;
|
103 |
+
-webkit-transition: opacity .4s ease;
|
104 |
+
transition: opacity .4s ease;
|
105 |
+
vertical-align: middle;
|
106 |
+
max-height: 100%;
|
107 |
+
max-width: 100%;
|
108 |
+
box-sizing: border-box
|
109 |
+
}
|
110 |
+
.tos-slide.tos-html>div {
|
111 |
+
-webkit-overflow-scrolling: touch;
|
112 |
+
white-space: normal;
|
113 |
+
text-align: left;
|
114 |
+
line-height: 1.5
|
115 |
+
}
|
116 |
+
.tos-slide.tos-html>div * {
|
117 |
+
-webkit-text-size-adjust: none;
|
118 |
+
-ms-text-size-adjust: none;
|
119 |
+
text-size-adjust: none
|
120 |
+
}
|
121 |
+
.tos-wrapper.tos-fill .tos-slide.tos-image>img {
|
122 |
+
max-height: none;
|
123 |
+
max-width: none;
|
124 |
+
min-height: 100%;
|
125 |
+
min-width: 100%
|
126 |
+
}
|
127 |
+
.tos-wrapper.tos-fixed .tos-slide.tos-html>div {
|
128 |
+
background-color: #fff;
|
129 |
+
color: #333;
|
130 |
+
box-sizing: border-box;
|
131 |
+
display: inline-block;
|
132 |
+
padding: 40px;
|
133 |
+
overflow: auto
|
134 |
+
}
|
135 |
+
.tos-desktop .tos-wrapper.tos-fixed {
|
136 |
+
background-color: rgba(0, 0, 0, .85)
|
137 |
+
}
|
138 |
+
.tos-desktop .tos-wrapper.tos-fixed.tos-fit .tos-slide {
|
139 |
+
padding: 20px
|
140 |
+
}
|
141 |
+
.tos-close,
|
142 |
+
.tos-next {
|
143 |
+
right: 20px
|
144 |
+
}
|
145 |
+
.tos-close,
|
146 |
+
.tos-next,
|
147 |
+
.tos-prev {
|
148 |
+
background: #000;
|
149 |
+
border-radius: 3px;
|
150 |
+
opacity: 0;
|
151 |
+
display: block;
|
152 |
+
width: 40px;
|
153 |
+
position: absolute;
|
154 |
+
z-index: 1;
|
155 |
+
-webkit-transition: opacity .4s ease;
|
156 |
+
transition: opacity .4s ease
|
157 |
+
}
|
158 |
+
.tos-next,
|
159 |
+
.tos-prev {
|
160 |
+
height: 80px;
|
161 |
+
margin-top: -40px;
|
162 |
+
top: 50%
|
163 |
+
}
|
164 |
+
.tos-next.tos-disabled,
|
165 |
+
.tos-prev.tos-disabled {
|
166 |
+
cursor: default
|
167 |
+
}
|
168 |
+
.tos-prev {
|
169 |
+
left: 20px
|
170 |
+
}
|
171 |
+
.tos-close {
|
172 |
+
height: 40px;
|
173 |
+
top: 20px
|
174 |
+
}
|
175 |
+
.tos-desktop .tos-wrapper:hover .tos-close,
|
176 |
+
.tos-desktop .tos-wrapper:hover .tos-next,
|
177 |
+
.tos-desktop .tos-wrapper:hover .tos-prev,
|
178 |
+
.tos-touch .tos-wrapper.tos-hover .tos-close,
|
179 |
+
.tos-touch .tos-wrapper.tos-hover .tos-next,
|
180 |
+
.tos-touch .tos-wrapper.tos-hover .tos-prev {
|
181 |
+
opacity: .5
|
182 |
+
}
|
183 |
+
.tos-desktop .tos-wrapper:hover .tos-close:hover,
|
184 |
+
.tos-desktop .tos-wrapper:hover .tos-next:hover,
|
185 |
+
.tos-desktop .tos-wrapper:hover .tos-prev:hover,
|
186 |
+
.tos-touch .tos-wrapper.tos-hover .tos-close:hover,
|
187 |
+
.tos-touch .tos-wrapper.tos-hover .tos-next:hover,
|
188 |
+
.tos-touch .tos-wrapper.tos-hover .tos-prev:hover {
|
189 |
+
opacity: .9
|
190 |
+
}
|
191 |
+
.tos-desktop .tos-wrapper:hover .tos-close.tos-disabled,
|
192 |
+
.tos-desktop .tos-wrapper:hover .tos-next.tos-disabled,
|
193 |
+
.tos-desktop .tos-wrapper:hover .tos-prev.tos-disabled,
|
194 |
+
.tos-touch .tos-wrapper.tos-hover .tos-close.tos-disabled,
|
195 |
+
.tos-touch .tos-wrapper.tos-hover .tos-next.tos-disabled,
|
196 |
+
.tos-touch .tos-wrapper.tos-hover .tos-prev.tos-disabled {
|
197 |
+
opacity: .2
|
198 |
+
}
|
199 |
+
.tos-close span:after,
|
200 |
+
.tos-close span:before,
|
201 |
+
.tos-next span,
|
202 |
+
.tos-prev span {
|
203 |
+
content: '';
|
204 |
+
display: block;
|
205 |
+
width: 12px;
|
206 |
+
height: 12px;
|
207 |
+
margin: -5px;
|
208 |
+
position: absolute;
|
209 |
+
top: 50%;
|
210 |
+
-webkit-transform: rotate(45deg);
|
211 |
+
-ms-transform: rotate(45deg);
|
212 |
+
transform: rotate(45deg)
|
213 |
+
}
|
214 |
+
.tos-close span:after,
|
215 |
+
.tos-close span:before {
|
216 |
+
width: 6px;
|
217 |
+
height: 6px;
|
218 |
+
margin-top: -4px;
|
219 |
+
margin-left: 0;
|
220 |
+
margin-right: 0
|
221 |
+
}
|
222 |
+
.tos-close span:before,
|
223 |
+
.tos-prev span {
|
224 |
+
border-bottom: 3px solid #fff;
|
225 |
+
border-left: 3px solid #fff;
|
226 |
+
left: 50%
|
227 |
+
}
|
228 |
+
.tos-close span:after,
|
229 |
+
.tos-next span {
|
230 |
+
border-top: 3px solid #fff;
|
231 |
+
border-right: 3px solid #fff;
|
232 |
+
right: 50%
|
233 |
+
}
|
234 |
+
.tos-desktop .tos-wrapper.tos-fixed.tos-fit.tos-has-close .tos-slide,
|
235 |
+
.tos-desktop .tos-wrapper.tos-fixed.tos-fit.tos-has-next .tos-slide,
|
236 |
+
.tos-desktop .tos-wrapper.tos-fixed.tos-fit.tos-has-prev .tos-slide {
|
237 |
+
padding-left: 80px;
|
238 |
+
padding-right: 80px
|
239 |
+
}
|
240 |
+
.tos-inline {
|
241 |
+
opacity: 0;
|
242 |
+
-webkit-transition: opacity .4s ease;
|
243 |
+
transition: opacity .4s ease;
|
244 |
+
display: inline-block;
|
245 |
+
margin: 0;
|
246 |
+
position: relative;
|
247 |
+
top: auto;
|
248 |
+
left: auto;
|
249 |
+
right: auto
|
250 |
+
}
|
251 |
+
.tos-inline.tos-prev {
|
252 |
+
margin-right: -60px
|
253 |
+
}
|
254 |
+
.tos-inline.tos-next {
|
255 |
+
margin-left: -60px
|
256 |
+
}
|
257 |
+
.tos-loading .tos-inline {
|
258 |
+
opacity: 0!important
|
259 |
+
}
|
260 |
+
.tos-touch.tos-scale-2 .tos-wrapper.tos-fixed .tos-close,
|
261 |
+
.tos-touch.tos-scale-2 .tos-wrapper.tos-fixed .tos-next,
|
262 |
+
.tos-touch.tos-scale-2 .tos-wrapper.tos-fixed .tos-prev {
|
263 |
+
-webkit-transform: scale(2);
|
264 |
+
-ms-transform: scale(2);
|
265 |
+
transform: scale(2)
|
266 |
+
}
|
267 |
+
.tos-touch.tos-scale-3 .tos-wrapper.tos-fixed .tos-close,
|
268 |
+
.tos-touch.tos-scale-3 .tos-wrapper.tos-fixed .tos-next,
|
269 |
+
.tos-touch.tos-scale-3 .tos-wrapper.tos-fixed .tos-prev {
|
270 |
+
-webkit-transform: scale(3);
|
271 |
+
-ms-transform: scale(3);
|
272 |
+
transform: scale(3)
|
273 |
+
}
|
274 |
+
.tos-touch.tos-scale-2 .tos-wrapper.tos-fixed .tos-prev,
|
275 |
+
.tos-touch.tos-scale-3 .tos-wrapper.tos-fixed .tos-prev {
|
276 |
+
-webkit-transform-origin: left center;
|
277 |
+
-ms-transform-origin: left center;
|
278 |
+
transform-origin: left center
|
279 |
+
}
|
280 |
+
.tos-touch.tos-scale-2 .tos-wrapper.tos-fixed .tos-next,
|
281 |
+
.tos-touch.tos-scale-3 .tos-wrapper.tos-fixed .tos-next {
|
282 |
+
-webkit-transform-origin: right center;
|
283 |
+
-ms-transform-origin: right center;
|
284 |
+
transform-origin: right center
|
285 |
+
}
|
286 |
+
.tos-touch.tos-scale-2 .tos-wrapper.tos-fixed .tos-close,
|
287 |
+
.tos-touch.tos-scale-3 .tos-wrapper.tos-fixed .tos-close {
|
288 |
+
-webkit-transform-origin: right top;
|
289 |
+
-ms-transform-origin: right top;
|
290 |
+
transform-origin: right top
|
291 |
+
}
|
292 |
+
.tos-caption {
|
293 |
+
color: #fff;
|
294 |
+
text-align: center;
|
295 |
+
opacity: 0;
|
296 |
+
-webkit-transition: opacity .4s ease;
|
297 |
+
transition: opacity .4s ease;
|
298 |
+
width: 100%;
|
299 |
+
position: absolute;
|
300 |
+
left: 0;
|
301 |
+
bottom: 0;
|
302 |
+
z-index: 1
|
303 |
+
}
|
304 |
+
.tos-caption:after {
|
305 |
+
content: '';
|
306 |
+
display: block;
|
307 |
+
clear: both
|
308 |
+
}
|
309 |
+
.tos-caption>div {
|
310 |
+
white-space: nowrap;
|
311 |
+
text-overflow: ellipsis;
|
312 |
+
overflow: hidden;
|
313 |
+
width: 100%;
|
314 |
+
box-sizing: border-box;
|
315 |
+
padding: 0 20px;
|
316 |
+
float: left
|
317 |
+
}
|
318 |
+
.tos-caption>div:last-child {
|
319 |
+
float: right;
|
320 |
+
margin-right: -2px
|
321 |
+
}
|
322 |
+
.tos-desktop .tos-wrapper:hover .tos-caption,
|
323 |
+
.tos-touch .tos-wrapper.tos-hover .tos-caption {
|
324 |
+
opacity: 1
|
325 |
+
}
|
326 |
+
.tos-wrapper .tos-caption {
|
327 |
+
line-height: 20px;
|
328 |
+
font-size: 15px;
|
329 |
+
text-shadow: 0 1px 2px rgba(0, 0, 0, .8);
|
330 |
+
height: 40px
|
331 |
+
}
|
332 |
+
.tos-wrapper.tos-has-caption .tos-uibg {
|
333 |
+
height: 100px
|
334 |
+
}
|
335 |
+
.tos-desktop .tos-wrapper.tos-fixed.tos-fit.tos-has-caption .tos-slide {
|
336 |
+
padding-bottom: 60px
|
337 |
+
}
|
338 |
+
.tos-touch.tos-scale-2 .tos-wrapper.tos-fixed .tos-caption {
|
339 |
+
line-height: 40px;
|
340 |
+
font-size: 30px;
|
341 |
+
text-shadow: 0 2px 4px rgba(0, 0, 0, .8);
|
342 |
+
height: 80px
|
343 |
+
}
|
344 |
+
.tos-touch.tos-scale-2 .tos-wrapper.tos-fixed.tos-has-caption .tos-uibg {
|
345 |
+
height: 200px
|
346 |
+
}
|
347 |
+
.tos-touch.tos-scale-3 .tos-wrapper.tos-fixed .tos-caption {
|
348 |
+
line-height: 60px;
|
349 |
+
font-size: 45px;
|
350 |
+
text-shadow: 0 3px 6px rgba(0, 0, 0, .8);
|
351 |
+
height: 120px
|
352 |
+
}
|
353 |
+
.tos-touch.tos-scale-3 .tos-wrapper.tos-fixed.tos-has-caption .tos-uibg {
|
354 |
+
height: 300px
|
355 |
+
}
|
356 |
+
.tos-wrapper.tos-fx-slide .tos-slider {
|
357 |
+
-webkit-transition-property: left, margin;
|
358 |
+
transition-property: left, margin
|
359 |
+
}
|
360 |
+
.tos-pagination {
|
361 |
+
text-align: center;
|
362 |
+
white-space: nowrap;
|
363 |
+
overflow-x: auto;
|
364 |
+
-webkit-overflow-scrolling: touch;
|
365 |
+
overflow-scrolling: touch;
|
366 |
+
opacity: 0;
|
367 |
+
-webkit-transition: opacity .4s ease;
|
368 |
+
transition: opacity .4s ease;
|
369 |
+
width: 100%;
|
370 |
+
position: absolute;
|
371 |
+
bottom: 0;
|
372 |
+
left: 0;
|
373 |
+
z-index: 1
|
374 |
+
}
|
375 |
+
.tos-pagination a {
|
376 |
+
display: inline-block
|
377 |
+
}
|
378 |
+
.tos-pagination.tos-bullets a {
|
379 |
+
background-color: rgba(255, 255, 255, .2)
|
380 |
+
}
|
381 |
+
.tos-pagination.tos-bullets a:hover {
|
382 |
+
background-color: rgba(255, 255, 255, .5)
|
383 |
+
}
|
384 |
+
.tos-pagination.tos-bullets a.tos-selected {
|
385 |
+
background-color: rgba(255, 255, 255, .9)
|
386 |
+
}
|
387 |
+
.tos-desktop .tos-wrapper:hover .tos-pagination,
|
388 |
+
.tos-touch .tos-wrapper.tos-hover .tos-pagination {
|
389 |
+
opacity: 1
|
390 |
+
}
|
391 |
+
.tos-wrapper .tos-pagination:after,
|
392 |
+
.tos-wrapper .tos-pagination:before {
|
393 |
+
content: '';
|
394 |
+
display: inline-block;
|
395 |
+
width: 20px;
|
396 |
+
height: 10px
|
397 |
+
}
|
398 |
+
.tos-wrapper.tos-has-bullets .tos-pagination {
|
399 |
+
height: 30px
|
400 |
+
}
|
401 |
+
.tos-wrapper.tos-has-bullets .tos-pagination a {
|
402 |
+
border-radius: 10px;
|
403 |
+
width: 10px;
|
404 |
+
height: 10px;
|
405 |
+
margin: 0 5px
|
406 |
+
}
|
407 |
+
.tos-wrapper.tos-has-bullets .tos-caption {
|
408 |
+
bottom: 30px
|
409 |
+
}
|
410 |
+
.tos-wrapper.tos-has-bullets .tos-uibg {
|
411 |
+
height: 90px
|
412 |
+
}
|
413 |
+
.tos-wrapper.tos-has-bullets.tos-has-caption .tos-uibg {
|
414 |
+
height: 130px
|
415 |
+
}
|
416 |
+
.tos-wrapper.tos-has-thumbnails .tos-pagination {
|
417 |
+
height: 70px
|
418 |
+
}
|
419 |
+
.tos-wrapper.tos-has-thumbnails .tos-pagination a {
|
420 |
+
background-position: center center;
|
421 |
+
background-size: cover;
|
422 |
+
width: 50px;
|
423 |
+
height: 50px;
|
424 |
+
margin: 0 5px
|
425 |
+
}
|
426 |
+
.tos-wrapper.tos-has-thumbnails .tos-caption {
|
427 |
+
bottom: 70px
|
428 |
+
}
|
429 |
+
.tos-wrapper.tos-has-thumbnails .tos-uibg {
|
430 |
+
height: 130px
|
431 |
+
}
|
432 |
+
.tos-wrapper.tos-has-thumbnails.tos-has-caption .tos-uibg {
|
433 |
+
height: 170px
|
434 |
+
}
|
435 |
+
.tos-desktop .tos-wrapper.tos-fixed.tos-fit.tos-has-bullets .tos-slide {
|
436 |
+
padding-bottom: 50px
|
437 |
+
}
|
438 |
+
.tos-desktop .tos-wrapper.tos-fixed.tos-fit.tos-has-bullets.tos-has-caption .tos-slide {
|
439 |
+
padding-bottom: 80px
|
440 |
+
}
|
441 |
+
.tos-desktop .tos-wrapper.tos-fixed.tos-fit.tos-has-thumbnails .tos-slide {
|
442 |
+
padding-bottom: 90px
|
443 |
+
}
|
444 |
+
.tos-desktop .tos-wrapper.tos-fixed.tos-fit.tos-has-thumbnails.tos-has-caption .tos-slide {
|
445 |
+
padding-bottom: 120px
|
446 |
+
}
|
447 |
+
.tos-touch.tos-scale-2 .tos-wrapper.tos-fixed .tos-pagination:after,
|
448 |
+
.tos-touch.tos-scale-2 .tos-wrapper.tos-fixed .tos-pagination:before {
|
449 |
+
content: '';
|
450 |
+
display: inline-block;
|
451 |
+
width: 40px;
|
452 |
+
height: 20px
|
453 |
+
}
|
454 |
+
.tos-touch.tos-scale-2 .tos-wrapper.tos-fixed.tos-has-bullets .tos-pagination {
|
455 |
+
height: 60px
|
456 |
+
}
|
457 |
+
.tos-touch.tos-scale-2 .tos-wrapper.tos-fixed.tos-has-bullets .tos-pagination a {
|
458 |
+
border-radius: 20px;
|
459 |
+
width: 20px;
|
460 |
+
height: 20px;
|
461 |
+
margin: 0 10px
|
462 |
+
}
|
463 |
+
.tos-touch.tos-scale-2 .tos-wrapper.tos-fixed.tos-has-bullets .tos-caption {
|
464 |
+
bottom: 60px
|
465 |
+
}
|
466 |
+
.tos-touch.tos-scale-2 .tos-wrapper.tos-fixed.tos-has-bullets .tos-uibg {
|
467 |
+
height: 180px
|
468 |
+
}
|
469 |
+
.tos-touch.tos-scale-2 .tos-wrapper.tos-fixed.tos-has-bullets.tos-has-caption .tos-uibg {
|
470 |
+
height: 260px
|
471 |
+
}
|
472 |
+
.tos-touch.tos-scale-2 .tos-wrapper.tos-fixed.tos-has-thumbnails .tos-pagination {
|
473 |
+
height: 140px
|
474 |
+
}
|
475 |
+
.tos-touch.tos-scale-2 .tos-wrapper.tos-fixed.tos-has-thumbnails .tos-pagination a {
|
476 |
+
background-position: center center;
|
477 |
+
background-size: cover;
|
478 |
+
width: 100px;
|
479 |
+
height: 100px;
|
480 |
+
margin: 0 10px
|
481 |
+
}
|
482 |
+
.tos-touch.tos-scale-2 .tos-wrapper.tos-fixed.tos-has-thumbnails .tos-caption {
|
483 |
+
bottom: 140px
|
484 |
+
}
|
485 |
+
.tos-touch.tos-scale-2 .tos-wrapper.tos-fixed.tos-has-thumbnails .tos-uibg {
|
486 |
+
height: 260px
|
487 |
+
}
|
488 |
+
.tos-touch.tos-scale-2 .tos-wrapper.tos-fixed.tos-has-thumbnails.tos-has-caption .tos-uibg {
|
489 |
+
height: 340px
|
490 |
+
}
|
491 |
+
.tos-touch.tos-scale-3 .tos-wrapper.tos-fixed .tos-pagination:after,
|
492 |
+
.tos-touch.tos-scale-3 .tos-wrapper.tos-fixed .tos-pagination:before {
|
493 |
+
content: '';
|
494 |
+
display: inline-block;
|
495 |
+
width: 60px;
|
496 |
+
height: 30px
|
497 |
+
}
|
498 |
+
.tos-touch.tos-scale-3 .tos-wrapper.tos-fixed.tos-has-bullets .tos-pagination {
|
499 |
+
height: 90px
|
500 |
+
}
|
501 |
+
.tos-touch.tos-scale-3 .tos-wrapper.tos-fixed.tos-has-bullets .tos-pagination a {
|
502 |
+
border-radius: 30px;
|
503 |
+
width: 30px;
|
504 |
+
height: 30px;
|
505 |
+
margin: 0 15px
|
506 |
+
}
|
507 |
+
.tos-touch.tos-scale-3 .tos-wrapper.tos-fixed.tos-has-bullets .tos-caption {
|
508 |
+
bottom: 90px
|
509 |
+
}
|
510 |
+
.tos-touch.tos-scale-3 .tos-wrapper.tos-fixed.tos-has-bullets .tos-uibg {
|
511 |
+
height: 270px
|
512 |
+
}
|
513 |
+
.tos-touch.tos-scale-3 .tos-wrapper.tos-fixed.tos-has-bullets.tos-has-caption .tos-uibg {
|
514 |
+
height: 390px
|
515 |
+
}
|
516 |
+
.tos-touch.tos-scale-3 .tos-wrapper.tos-fixed.tos-has-thumbnails .tos-pagination {
|
517 |
+
height: 210px
|
518 |
+
}
|
519 |
+
.tos-touch.tos-scale-3 .tos-wrapper.tos-fixed.tos-has-thumbnails .tos-pagination a {
|
520 |
+
background-position: center center;
|
521 |
+
background-size: cover;
|
522 |
+
width: 150px;
|
523 |
+
height: 150px;
|
524 |
+
margin: 0 15px
|
525 |
+
}
|
526 |
+
.tos-touch.tos-scale-3 .tos-wrapper.tos-fixed.tos-has-thumbnails .tos-caption {
|
527 |
+
bottom: 210px
|
528 |
+
}
|
529 |
+
.tos-touch.tos-scale-3 .tos-wrapper.tos-fixed.tos-has-thumbnails .tos-uibg {
|
530 |
+
height: 390px
|
531 |
+
}
|
532 |
+
.tos-touch.tos-scale-3 .tos-wrapper.tos-fixed.tos-has-thumbnails.tos-has-caption .tos-uibg {
|
533 |
+
height: 510px
|
534 |
+
}
|
535 |
+
.tos-slide .tos-html {
|
536 |
+
-webkit-overflow-scrolling: touch
|
537 |
+
}
|
538 |
+
.tos-play,
|
539 |
+
.tos-play:after {
|
540 |
+
display: block;
|
541 |
+
position: absolute;
|
542 |
+
top: 50%;
|
543 |
+
left: 50%
|
544 |
+
}
|
545 |
+
.tos-play {
|
546 |
+
background: #000;
|
547 |
+
opacity: 0;
|
548 |
+
-webkit-transition: opacity .4s ease;
|
549 |
+
transition: opacity .4s ease
|
550 |
+
}
|
551 |
+
.tos-play:after {
|
552 |
+
content: ''
|
553 |
+
}
|
554 |
+
.tos-desktop .tos-wrapper:hover .tos-play,
|
555 |
+
.tos-touch .tos-wrapper.tos-hover .tos-play {
|
556 |
+
opacity: .5
|
557 |
+
}
|
558 |
+
.tos-desktop .tos-wrapper:hover .tos-play:hover,
|
559 |
+
.tos-touch .tos-wrapper.tos-hover .tos-play:hover {
|
560 |
+
opacity: .9
|
561 |
+
}
|
562 |
+
.tos-wrapper .tos-play {
|
563 |
+
border-radius: 80px;
|
564 |
+
width: 80px;
|
565 |
+
height: 80px;
|
566 |
+
margin: -40px
|
567 |
+
}
|
568 |
+
.tos-wrapper .tos-play:after {
|
569 |
+
border: 20px solid transparent;
|
570 |
+
border-left-color: #fff;
|
571 |
+
border-left-width: 30px;
|
572 |
+
margin-top: -20px;
|
573 |
+
margin-left: -10.5px
|
574 |
+
}
|
575 |
+
.tos-touch.tos-scale-2 .tos-wrapper.tos-fixed .tos-play {
|
576 |
+
border-radius: 160px;
|
577 |
+
width: 160px;
|
578 |
+
height: 160px;
|
579 |
+
margin: -80px
|
580 |
+
}
|
581 |
+
.tos-touch.tos-scale-2 .tos-wrapper.tos-fixed .tos-play:after {
|
582 |
+
border: 40px solid transparent;
|
583 |
+
border-left-color: #fff;
|
584 |
+
border-left-width: 60px;
|
585 |
+
margin-top: -40px;
|
586 |
+
margin-left: -21px
|
587 |
+
}
|
588 |
+
.tos-touch.tos-scale-3 .tos-wrapper.tos-fixed .tos-play {
|
589 |
+
border-radius: 240px;
|
590 |
+
width: 240px;
|
591 |
+
height: 240px;
|
592 |
+
margin: -120px
|
593 |
+
}
|
594 |
+
.tos-touch.tos-scale-3 .tos-wrapper.tos-fixed .tos-play:after {
|
595 |
+
border: 60px solid transparent;
|
596 |
+
border-left-color: #fff;
|
597 |
+
border-left-width: 90px;
|
598 |
+
margin-top: -60px;
|
599 |
+
margin-left: -31.5px
|
600 |
+
}
|
assets/tosrus/jquery.tosrus.js
ADDED
@@ -0,0 +1,619 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
! function(t) {
|
2 |
+
function i() {
|
3 |
+
n = function(t) {
|
4 |
+
return e + "-" + t
|
5 |
+
}, o = function(t) {
|
6 |
+
return e + "-" + t
|
7 |
+
}, a = function(t) {
|
8 |
+
return t + "." + e
|
9 |
+
}, t.each([n, o, a], function(t, i) {
|
10 |
+
i.add = function(t) {
|
11 |
+
t = t.split(" ");
|
12 |
+
for (var s in t) i[t[s]] = i(t[s])
|
13 |
+
}
|
14 |
+
}), n.add("touch desktop scale-1 scale-2 scale-3 wrapper opened opening fixed inline hover slider slide loading noanimation fastanimation"), o.add("slide anchor"), a.add("open opening close closing prev next slideTo sliding click pinch scroll resize orientationchange load loading loaded transitionend webkitTransitionEnd"), r = {
|
15 |
+
complObject: function(i, s) {
|
16 |
+
return t.isPlainObject(i) || (i = s), i
|
17 |
+
},
|
18 |
+
complBoolean: function(t, i) {
|
19 |
+
return "boolean" != typeof t && (t = i), t
|
20 |
+
},
|
21 |
+
complNumber: function(i, s) {
|
22 |
+
return t.isNumeric(i) || (i = s), i
|
23 |
+
},
|
24 |
+
complString: function(t, i) {
|
25 |
+
return "string" != typeof t && (t = i), t
|
26 |
+
},
|
27 |
+
isPercentage: function(t) {
|
28 |
+
return "string" == typeof t && "%" == t.slice(-1)
|
29 |
+
},
|
30 |
+
getPercentage: function(t) {
|
31 |
+
return parseInt(t.slice(0, -1))
|
32 |
+
},
|
33 |
+
resizeRatio: function(t, i, s, e, n) {
|
34 |
+
if (i.is(":visible")) {
|
35 |
+
var o = i.width(),
|
36 |
+
a = i.height();
|
37 |
+
s && o > s && (o = s), e && a > e && (a = e), n > o / a ? a = o / n : o = a * n, t.width(o).height(a)
|
38 |
+
}
|
39 |
+
},
|
40 |
+
transitionend: function(t, i, s) {
|
41 |
+
var e = !1,
|
42 |
+
n = function() {
|
43 |
+
e || i.call(t[0]), e = !0
|
44 |
+
};
|
45 |
+
t.one(a.transitionend, n), t.one(a.webkitTransitionEnd, n), setTimeout(n, 1.1 * s)
|
46 |
+
},
|
47 |
+
setViewportScale: function() {
|
48 |
+
if (d.viewportScale) {
|
49 |
+
var t = d.viewportScale.getScale();
|
50 |
+
void 0 !== t && (t = 1 / t, d.$body.removeClass(n["scale-1"]).removeClass(n["scale-2"]).removeClass(n["scale-3"]).addClass(n["scale-" + Math.max(Math.min(Math.round(t), 3), 1)]))
|
51 |
+
}
|
52 |
+
}
|
53 |
+
}, (d = {
|
54 |
+
$wndw: t(window),
|
55 |
+
$html: t("html"),
|
56 |
+
$body: t("body"),
|
57 |
+
scrollPosition: 0,
|
58 |
+
viewportScale: null,
|
59 |
+
viewportScaleInterval: null
|
60 |
+
}).$body.addClass(t[s].support.touch ? n.touch : n.desktop), d.$wndw.on(a.scroll, function(t) {
|
61 |
+
d.$body.hasClass(n.opened) && (window.scrollTo(0, d.scrollPosition), t.preventDefault(), t.stopPropagation(), t.stopImmediatePropagation())
|
62 |
+
}), !d.viewportScale && t[s].support.touch && "undefined" != typeof FlameViewportScale && (d.viewportScale = new FlameViewportScale, r.setViewportScale(), d.$wndw.on(a.orientationchange + " " + a.resize, function(t) {
|
63 |
+
d.viewportScaleInterval && (clearTimeout(d.viewportScaleInterval), d.viewportScaleInterval = null), d.viewportScaleInterval = setTimeout(function() {
|
64 |
+
r.setViewportScale()
|
65 |
+
}, 500)
|
66 |
+
})), t[s]._c = n, t[s]._d = o, t[s]._e = a, t[s]._f = r, t[s]._g = d
|
67 |
+
}
|
68 |
+
var s = "tosrus",
|
69 |
+
e = "tos";
|
70 |
+
if (!t[s]) {
|
71 |
+
var n = {},
|
72 |
+
o = {},
|
73 |
+
a = {},
|
74 |
+
r = {},
|
75 |
+
d = {};
|
76 |
+
t[s] = function(t, i, s) {
|
77 |
+
return this.$node = t, this.opts = i, this.conf = s, this.vars = {}, this.nodes = {}, this.slides = {}, this._init(), this
|
78 |
+
}, t[s].prototype = {
|
79 |
+
_init: function() {
|
80 |
+
var i = this;
|
81 |
+
this._complementOptions(), this.vars.fixed = "window" == this.opts.wrapper.target, this.nodes.$wrpr = t('<div class="' + n.wrapper + '" />'), this.nodes.$sldr = t('<div class="' + n.slider + '" />').appendTo(this.nodes.$wrpr), this.nodes.$wrpr.addClass(this.vars.fixed ? n.fixed : n.inline).addClass(n("fx-" + this.opts.effect)).addClass(n(this.opts.slides.scale)).addClass(this.opts.wrapper.classes), this.nodes.$wrpr.on(a.open + " " + a.close + " " + a.prev + " " + a.next + " " + a.slideTo, function(t) {
|
82 |
+
var s = (t = (arguments = Array.prototype.slice.call(arguments)).shift()).type;
|
83 |
+
t.stopPropagation(), "function" == typeof i[s] && i[s].apply(i, arguments)
|
84 |
+
}).on(a.opening + " " + a.closing + " " + a.sliding + " " + a.loading + " " + a.loaded, function(t) {
|
85 |
+
t.stopPropagation()
|
86 |
+
}).on(a.click, function(s) {
|
87 |
+
switch (s.stopPropagation(), i.opts.wrapper.onClick) {
|
88 |
+
case "toggleUI":
|
89 |
+
i.nodes.$wrpr.toggleClass(n.hover);
|
90 |
+
break;
|
91 |
+
case "close":
|
92 |
+
t(s.target).is("img") || i.close()
|
93 |
+
}
|
94 |
+
}), this.nodes.$anchors = this._initAnchors(), this.nodes.$slides = this._initSlides(), this.slides.total = this.nodes.$slides.length, this.slides.visible = this.opts.slides.visible, this.slides.index = 0, this.vars.opened = !0;
|
95 |
+
for (var e = 0; e < t[s].addons.length; e++) t.isFunction(this["_addon_" + t[s].addons[e]]) && this["_addon_" + t[s].addons[e]]();
|
96 |
+
for (var o = 0; o < t[s].ui.length; o++) this.nodes.$wrpr.find("." + n[t[s].ui[o]]).length && this.nodes.$wrpr.addClass(n("has-" + t[s].ui[o]));
|
97 |
+
"close" == this.opts.wrapper.onClick && (this.nodes.$uibg || t().add(this.nodes.$capt || t()).add(this.nodes.$pagr || t()).on(a.click, function(t) {
|
98 |
+
t.stopPropagation()
|
99 |
+
})), this.vars.fixed ? (this.nodes.$wrpr.appendTo(d.$body), this.close(!0)) : (this.nodes.$wrpr.appendTo(this.opts.wrapper.target), this.opts.show ? (this.vars.opened = !1, this.open(0, !0)) : this.close(!0))
|
100 |
+
},
|
101 |
+
open: function(i, s) {
|
102 |
+
var e = this;
|
103 |
+
this.vars.opened || (this.vars.fixed && (d.scrollPosition = d.$wndw.scrollTop(), d.$body.addClass(n.opened), r.setViewportScale()), s ? this.nodes.$wrpr.addClass(n.opening).trigger(a.opening, [i, s]) : setTimeout(function() {
|
104 |
+
e.nodes.$wrpr.addClass(n.opening).trigger(a.opening, [i, s])
|
105 |
+
}, 5), this.nodes.$wrpr.addClass(n.hover).addClass(n.opened)), this.vars.opened = !0, this._loadContents(), t.isNumeric(i) && (s = s || !this.vars.opened, this.slideTo(i, s))
|
106 |
+
},
|
107 |
+
close: function(i) {
|
108 |
+
this.vars.opened && (this.vars.fixed && d.$body.removeClass(n.opened), i ? this.nodes.$wrpr.removeClass(n.opened) : r.transitionend(this.nodes.$wrpr, function() {
|
109 |
+
t(this).removeClass(n.opened)
|
110 |
+
}, this.conf.transitionDuration), this.nodes.$wrpr.removeClass(n.hover).removeClass(n.opening).trigger(a.closing, [this.slides.index, i])), this.vars.opened = !1
|
111 |
+
},
|
112 |
+
prev: function(i, s) {
|
113 |
+
t.isNumeric(i) || (i = this.opts.slides.slide), this.slideTo(this.slides.index - i, s)
|
114 |
+
},
|
115 |
+
next: function(i, s) {
|
116 |
+
t.isNumeric(i) || (i = this.opts.slides.slide), this.slideTo(this.slides.index + i, s)
|
117 |
+
},
|
118 |
+
slideTo: function(i, e) {
|
119 |
+
if (!this.vars.opened) return !1;
|
120 |
+
if (!t.isNumeric(i)) return !1;
|
121 |
+
var o = !0;
|
122 |
+
if (0 > i) {
|
123 |
+
var d = 0 == this.slides.index;
|
124 |
+
this.opts.infinite ? i = d ? this.slides.total - this.slides.visible : 0 : (i = 0, d && (o = !1))
|
125 |
+
}
|
126 |
+
if (i + this.slides.visible > this.slides.total) {
|
127 |
+
var l = this.slides.index + this.slides.visible >= this.slides.total;
|
128 |
+
this.opts.infinite ? i = l ? 0 : this.slides.total - this.slides.visible : (i = this.slides.total - this.slides.visible, l && (o = !1))
|
129 |
+
}
|
130 |
+
if (this.slides.index = i, this._loadContents(), o) {
|
131 |
+
var p = 0 - this.slides.index * this.opts.slides.width + this.opts.slides.offset;
|
132 |
+
this.slides.widthPercentage && (p += "%"), e && (this.nodes.$sldr.addClass(n.noanimation), r.transitionend(this.nodes.$sldr, function() {
|
133 |
+
t(this).removeClass(n.noanimation)
|
134 |
+
}, 5));
|
135 |
+
for (var c in t[s].effects)
|
136 |
+
if (c == this.opts.effect) {
|
137 |
+
t[s].effects[c].call(this, p, e);
|
138 |
+
break
|
139 |
+
}
|
140 |
+
this.nodes.$wrpr.trigger(a.sliding, [i, e])
|
141 |
+
}
|
142 |
+
},
|
143 |
+
_initAnchors: function() {
|
144 |
+
var i = this,
|
145 |
+
e = t();
|
146 |
+
if (this.$node.is("a"))
|
147 |
+
for (var n in t[s].media) e = e.add(this.$node.filter(function() {
|
148 |
+
if (i.opts.media[n] && i.opts.media[n].filterAnchors) {
|
149 |
+
var e = i.opts.media[n].filterAnchors.call(i, t(this));
|
150 |
+
if ("boolean" == typeof e) return e
|
151 |
+
}
|
152 |
+
return t[s].media[n].filterAnchors.call(i, t(this))
|
153 |
+
}));
|
154 |
+
return e
|
155 |
+
},
|
156 |
+
_initSlides: function() {
|
157 |
+
return this[this.$node.is("a") ? "_initSlidesFromAnchors" : "_initSlidesFromContent"](), this.nodes.$sldr.children().css("width", this.opts.slides.width + (this.slides.widthPercentage ? "%" : "px"))
|
158 |
+
},
|
159 |
+
_initSlidesFromAnchors: function() {
|
160 |
+
var i = this;
|
161 |
+
this.nodes.$anchors.each(function(s) {
|
162 |
+
var e = t(this),
|
163 |
+
r = t('<div class="' + n.slide + " " + n.loading + '" />').data(o.anchor, e).appendTo(i.nodes.$sldr);
|
164 |
+
e.data(o.slide, r).on(a.click, function(t) {
|
165 |
+
t.preventDefault(), i.open(s)
|
166 |
+
})
|
167 |
+
})
|
168 |
+
},
|
169 |
+
_initSlidesFromContent: function() {
|
170 |
+
var i = this;
|
171 |
+
this.$node.children().each(function() {
|
172 |
+
var e = t(this);
|
173 |
+
t('<div class="' + n.slide + '" />').append(e).appendTo(i.nodes.$sldr);
|
174 |
+
for (var o in t[s].media) {
|
175 |
+
var a = null;
|
176 |
+
if (i.opts.media[o] && i.opts.media[o].filterSlides && (a = i.opts.media[o].filterSlides.call(i, e)), "boolean" != typeof a && (a = t[s].media[o].filterSlides.call(i, e)), a) {
|
177 |
+
t[s].media[o].initSlides.call(i, e), e.parent().addClass(n(o));
|
178 |
+
break
|
179 |
+
}
|
180 |
+
}
|
181 |
+
})
|
182 |
+
},
|
183 |
+
_loadContents: function() {
|
184 |
+
var t = this;
|
185 |
+
switch (this.opts.slides.load) {
|
186 |
+
case "all":
|
187 |
+
this._loadContent(0, this.slides.total);
|
188 |
+
break;
|
189 |
+
case "visible":
|
190 |
+
this._loadContent(this.slides.index, this.slides.index + this.slides.visible);
|
191 |
+
break;
|
192 |
+
case "near-visible":
|
193 |
+
default:
|
194 |
+
this._loadContent(this.slides.index, this.slides.index + this.slides.visible), setTimeout(function() {
|
195 |
+
t._loadContent(t.slides.index - t.slides.visible, t.slides.index), t._loadContent(t.slides.index + t.slides.visible, t.slides.index + 2 * t.slides.visible)
|
196 |
+
}, this.conf.transitionDuration)
|
197 |
+
}
|
198 |
+
},
|
199 |
+
_loadContent: function(i, e) {
|
200 |
+
var r = this;
|
201 |
+
this.nodes.$slides.slice(i, e).each(function() {
|
202 |
+
var i = t(this);
|
203 |
+
if (0 == i.children().length) {
|
204 |
+
var e = i.data(o.anchor),
|
205 |
+
d = e.attr("href");
|
206 |
+
for (var l in t[s].media) {
|
207 |
+
var p = null;
|
208 |
+
if (r.opts.media[l] && r.opts.media[l].filterAnchors && (p = r.opts.media[l].filterAnchors.call(r, e)), "boolean" != typeof p && (p = t[s].media[l].filterAnchors.call(r, e)), p) {
|
209 |
+
t[s].media[l].initAnchors.call(r, i, d), i.addClass(n(l));
|
210 |
+
break
|
211 |
+
}
|
212 |
+
}
|
213 |
+
i.trigger(a.loading, [i.data(o.anchor)])
|
214 |
+
}
|
215 |
+
})
|
216 |
+
},
|
217 |
+
_complementOptions: function() {
|
218 |
+
if (void 0 === this.opts.wrapper.target && (this.opts.wrapper.target = this.$node.is("a") ? "window" : this.$node), "window" != this.opts.wrapper.target && "string" == typeof this.opts.wrapper.target && (this.opts.wrapper.target = t(this.opts.wrapper.target)), this.opts.show = r.complBoolean(this.opts.show, "window" != this.opts.wrapper.target), t.isNumeric(this.opts.slides.width)) this.slides.widthPercentage = !1, this.opts.slides.visible = r.complNumber(this.opts.slides.visible, 1);
|
219 |
+
else {
|
220 |
+
var i = !!r.isPercentage(this.opts.slides.width) && r.getPercentage(this.opts.slides.width);
|
221 |
+
this.slides.widthPercentage = !0, this.opts.slides.visible = r.complNumber(this.opts.slides.visible, i ? Math.floor(100 / i) : 1), this.opts.slides.width = i || Math.ceil(1e4 / this.opts.slides.visible) / 100
|
222 |
+
}
|
223 |
+
this.opts.slides.slide = r.complNumber(this.opts.slides.slide, this.opts.slides.visible), this.opts.slides.offset = r.isPercentage(this.opts.slides.offset) ? r.getPercentage(this.opts.slides.offset) : r.complNumber(this.opts.slides.offset, 0)
|
224 |
+
},
|
225 |
+
_uniqueID: function() {
|
226 |
+
return this.__uniqueID || (this.__uniqueID = 0), this.__uniqueID++, n("uid-" + this.__uniqueID)
|
227 |
+
}
|
228 |
+
}, t.fn[s] = function(e, n, o, a) {
|
229 |
+
d.$wndw || i(), e = t.extend(!0, {}, t[s].defaults, e), e = t.extend(!0, {}, e, t[s].support.touch ? o : n), a = t.extend(!0, {}, t[s].configuration, a);
|
230 |
+
var r = new t[s](this, e, a);
|
231 |
+
return this.data(s, r), r.nodes.$wrpr
|
232 |
+
}, t[s].support = {
|
233 |
+
touch: "ontouchstart" in window.document || navigator.msMaxTouchPoints
|
234 |
+
}, t[s].defaults = {
|
235 |
+
infinite: !1,
|
236 |
+
effect: "slide",
|
237 |
+
wrapper: {
|
238 |
+
classes: "",
|
239 |
+
onClick: "toggleUI"
|
240 |
+
},
|
241 |
+
slides: {
|
242 |
+
offset: 0,
|
243 |
+
scale: "fit",
|
244 |
+
load: "near-visible",
|
245 |
+
visible: 1
|
246 |
+
},
|
247 |
+
media: {}
|
248 |
+
}, t[s].configuration = {
|
249 |
+
transitionDuration: 400
|
250 |
+
}, t[s].constants = {}, t[s].debug = function(t) {}, t[s].deprecated = function(t, i) {
|
251 |
+
"undefined" != typeof console && void 0 !== console.warn && console.warn(s + ": " + t + " is deprecated, use " + i + " instead.")
|
252 |
+
}, t[s].effects = {
|
253 |
+
slide: function(t) {
|
254 |
+
this.nodes.$sldr.css("left", t)
|
255 |
+
},
|
256 |
+
fade: function(i) {
|
257 |
+
r.transitionend(this.nodes.$sldr, function() {
|
258 |
+
t(this).css("left", i).css("opacity", 1)
|
259 |
+
}, this.conf.transitionDuration), this.nodes.$sldr.css("opacity", 0)
|
260 |
+
}
|
261 |
+
}, t[s].version = "2.5.0", t[s].media = {}, t[s].addons = [], t[s].ui = []
|
262 |
+
}
|
263 |
+
}(jQuery),
|
264 |
+
function(t) {
|
265 |
+
var i, s, e, n, o, a = "tosrus",
|
266 |
+
r = "autoplay",
|
267 |
+
d = !1;
|
268 |
+
t[a].prototype["_addon_" + r] = function() {
|
269 |
+
d || (i = t[a]._c, s = t[a]._d, e = t[a]._e, n = t[a]._f, o = t[a]._g, e.add("mouseover mouseout"), d = !0);
|
270 |
+
var l = this,
|
271 |
+
p = this.opts[r];
|
272 |
+
p.play && (this.opts.infinite = !0, this.nodes.$wrpr.on(e.sliding, function(t) {
|
273 |
+
l.autoplay()
|
274 |
+
}), p.pauseOnHover && this.nodes.$wrpr.on(e.mouseover, function(t) {
|
275 |
+
l.autostop()
|
276 |
+
}).on(e.mouseout, function(t) {
|
277 |
+
l.autoplay()
|
278 |
+
}), this.autoplay())
|
279 |
+
}, t[a].prototype.autoplay = function() {
|
280 |
+
var t = this;
|
281 |
+
this.autostop(), this.vars.autoplay = setTimeout(function() {
|
282 |
+
t.next()
|
283 |
+
}, this.opts[r].timeout)
|
284 |
+
}, t[a].prototype.autostop = function() {
|
285 |
+
this.vars.autoplay && clearTimeout(this.vars.autoplay)
|
286 |
+
}, t[a].defaults[r] = {
|
287 |
+
play: !1,
|
288 |
+
timeout: 4e3,
|
289 |
+
pauseOnHover: !1
|
290 |
+
}, t[a].addons.push(r)
|
291 |
+
}(jQuery),
|
292 |
+
function(t) {
|
293 |
+
function i(i, s) {
|
294 |
+
return t('<a class="' + e[i] + s + '" href="#"><span></span></a>')
|
295 |
+
}
|
296 |
+
|
297 |
+
function s(t, i, s, e) {
|
298 |
+
i.on(o.click, function(i) {
|
299 |
+
i.preventDefault(), i.stopPropagation(), t.trigger(o[s], [e])
|
300 |
+
})
|
301 |
+
}
|
302 |
+
var e, n, o, a, r, d = "tosrus",
|
303 |
+
l = "buttons",
|
304 |
+
p = !1;
|
305 |
+
t[d].prototype["_addon_" + l] = function() {
|
306 |
+
p || (e = t[d]._c, n = t[d]._d, o = t[d]._e, a = t[d]._f, r = t[d]._g, e.add("prev next close disabled"), p = !0);
|
307 |
+
var c = this,
|
308 |
+
h = this.opts[l];
|
309 |
+
this.nodes.$prev = null, this.nodes.$next = null, this.nodes.$clse = null, ("boolean" == typeof h || "string" == typeof h && "inline" == h) && (h = {
|
310 |
+
prev: h,
|
311 |
+
next: h
|
312 |
+
}), void 0 === h.close && (h.close = this.vars.fixed), this.nodes.$slides.length < 2 && (h.prev = !1, h.next = !1), t.each({
|
313 |
+
prev: "prev",
|
314 |
+
next: "next",
|
315 |
+
close: "clse"
|
316 |
+
}, function(n, a) {
|
317 |
+
h[n] && ("string" == typeof h[n] && "inline" == h[n] ? c.vars.fixed && "close" != n && c.nodes.$slides.on(o.loading, function(o, a) {
|
318 |
+
var r = i(n, " " + e.inline)["prev" == n ? "prependTo" : "appendTo"](this);
|
319 |
+
s(c.nodes.$wrpr, r, n, 1), c.opts.infinite || ("prev" == n && t(this).is(":first-child") || "next" == n && t(this).is(":last-child")) && r.addClass(e.disabled)
|
320 |
+
}) : ("string" == typeof h[n] && (h[n] = t(h[n])), c.nodes["$" + a] = h[n] instanceof t ? h[n] : i(n, "").appendTo(c.nodes.$wrpr), s(c.nodes.$wrpr, c.nodes["$" + a], n, null)))
|
321 |
+
}), this.opts.infinite || (this.updateButtons(), this.nodes.$wrpr.on(o.sliding, function(t, i, s) {
|
322 |
+
c.updateButtons()
|
323 |
+
}))
|
324 |
+
}, t[d].prototype.updateButtons = function() {
|
325 |
+
this.nodes.$prev && this.nodes.$prev[(this.slides.index < 1 ? "add" : "remove") + "Class"](e.disabled), this.nodes.$next && this.nodes.$next[(this.slides.index >= this.slides.total - this.slides.visible ? "add" : "remove") + "Class"](e.disabled)
|
326 |
+
}, t[d].defaults[l] = {
|
327 |
+
prev: !t[d].support.touch,
|
328 |
+
next: !t[d].support.touch
|
329 |
+
}, t[d].addons.push(l), t[d].ui.push("prev"), t[d].ui.push("next"), t[d].ui.push("close")
|
330 |
+
}(jQuery),
|
331 |
+
function(t) {
|
332 |
+
var i, s, e, n, o, a = "tosrus",
|
333 |
+
r = "caption",
|
334 |
+
d = !1;
|
335 |
+
t[a].prototype["_addon_" + r] = function() {
|
336 |
+
d || (i = t[a]._c, s = t[a]._d, e = t[a]._e, n = t[a]._f, o = t[a]._g, i.add("caption uibg"), s.add("caption"), d = !0);
|
337 |
+
var l = this,
|
338 |
+
p = this.opts[r];
|
339 |
+
if (p.add) {
|
340 |
+
p.attributes = p.attributes || [], "string" == typeof p.target && (p.target = t(p.target)), p.target instanceof t ? this.nodes.$capt = p.target : (this.nodes.$capt = t('<div class="' + i.caption + '" />').appendTo(this.nodes.$wrpr), this.nodes.$uibg || (this.nodes.$uibg = t('<div class="' + i.uibg + '" />').prependTo(this.nodes.$wrpr)));
|
341 |
+
for (var c = 0, h = this.slides.visible; h > c; c++) t('<div class="' + i.caption + "-" + c + '" />').css("width", this.opts.slides.width + (this.slides.widthPercentage ? "%" : "px")).appendTo(this.nodes.$capt);
|
342 |
+
this.nodes.$slides.each(function(i) {
|
343 |
+
var e = t(this),
|
344 |
+
n = l.vars.fixed ? e.data(s.anchor) : e.children();
|
345 |
+
e.data(s.caption, "");
|
346 |
+
for (var o = 0, a = p.attributes.length; a > o; o++) {
|
347 |
+
var r = n.attr(p.attributes[o]);
|
348 |
+
if (r && r.length) {
|
349 |
+
e.data(s.caption, r);
|
350 |
+
break
|
351 |
+
}
|
352 |
+
}
|
353 |
+
}), this.nodes.$wrpr.on(e.sliding, function(t, i, e) {
|
354 |
+
for (var n = 0, o = l.slides.visible; o > n; n++) l.nodes.$capt.children().eq(n).html(l.nodes.$sldr.children().eq(l.slides.index + n).data(s.caption) || "")
|
355 |
+
})
|
356 |
+
}
|
357 |
+
}, t[a].defaults[r] = {
|
358 |
+
add: !1,
|
359 |
+
target: null,
|
360 |
+
attributes: ["title", "alt", "rel"]
|
361 |
+
}, t[a].addons.push(r), t[a].ui.push("caption")
|
362 |
+
}(jQuery),
|
363 |
+
function(t) {
|
364 |
+
if ("function" == typeof Hammer) {
|
365 |
+
var i, s, e, n, o, a = "tosrus",
|
366 |
+
r = "drag",
|
367 |
+
d = !1;
|
368 |
+
t[a].prototype["_addon_" + r] = function() {
|
369 |
+
d || (i = t[a]._c, s = t[a]._d, e = t[a]._e, n = t[a]._f, o = t[a]._g, d = !0);
|
370 |
+
var l = this;
|
371 |
+
if (this.opts[r] && "slide" == this.opts.effect) {
|
372 |
+
if (Hammer.VERSION < 2) return void t[a].deprecated("Older version of the Hammer library", "version 2 or newer");
|
373 |
+
if (this.nodes.$slides.length > 1) {
|
374 |
+
var p = 0,
|
375 |
+
c = !1,
|
376 |
+
h = !1;
|
377 |
+
new Hammer(this.nodes.$wrpr[0]).on("panstart panleft panright panend swipeleft swiperight", function(t) {
|
378 |
+
t.preventDefault()
|
379 |
+
}).on("panstart", function(t) {
|
380 |
+
l.nodes.$sldr.addClass(i.noanimation)
|
381 |
+
}).on("panleft panright", function(t) {
|
382 |
+
switch (p = t.deltaX, h = !1, t.direction) {
|
383 |
+
case 2:
|
384 |
+
c = "left";
|
385 |
+
break;
|
386 |
+
case 4:
|
387 |
+
c = "right";
|
388 |
+
break;
|
389 |
+
default:
|
390 |
+
c = !1
|
391 |
+
}("left" == c && l.slides.index + l.slides.visible >= l.slides.total || "right" == c && 0 == l.slides.index) && (p /= 2.5), l.nodes.$sldr.css("margin-left", Math.round(p))
|
392 |
+
}).on("swipeleft swiperight", function(t) {
|
393 |
+
h = !0
|
394 |
+
}).on("panend", function(t) {
|
395 |
+
if (l.nodes.$sldr.removeClass(i.noanimation).addClass(i.fastanimation), n.transitionend(l.nodes.$sldr, function() {
|
396 |
+
l.nodes.$sldr.removeClass(i.fastanimation)
|
397 |
+
}, l.conf.transitionDuration / 2), l.nodes.$sldr.css("margin-left", 0), "left" == c || "right" == c) {
|
398 |
+
if (h) o = l.slides.visible;
|
399 |
+
else var s = l.nodes.$slides.first().width(),
|
400 |
+
o = Math.floor((Math.abs(p) + s / 2) / s);
|
401 |
+
o > 0 && l.nodes.$wrpr.trigger(e["left" == c ? "next" : "prev"], [o])
|
402 |
+
}
|
403 |
+
c = !1
|
404 |
+
})
|
405 |
+
}
|
406 |
+
}
|
407 |
+
}, t[a].defaults[r] = t[a].support.touch, t[a].addons.push(r)
|
408 |
+
}
|
409 |
+
}(jQuery),
|
410 |
+
function(t) {
|
411 |
+
var i, s, e, n, o, a = "tosrus",
|
412 |
+
r = "keys",
|
413 |
+
d = !1;
|
414 |
+
t[a].prototype["_addon_" + r] = function() {
|
415 |
+
d || (i = t[a]._c, s = t[a]._d, e = t[a]._e, n = t[a]._f, o = t[a]._g, e.add("keyup"), d = !0);
|
416 |
+
var l = this,
|
417 |
+
p = this.opts[r];
|
418 |
+
if ("boolean" == typeof p && p && (p = {
|
419 |
+
prev: !0,
|
420 |
+
next: !0,
|
421 |
+
close: !0
|
422 |
+
}), t.isPlainObject(p)) {
|
423 |
+
for (var c in t[a].constants[r]) "boolean" == typeof p[c] && p[c] && (p[c] = t[a].constants[r][c]);
|
424 |
+
this.nodes.$slides.length < 2 && (p.prev = !1, p.next = !1), t(document).on(e.keyup, function(t) {
|
425 |
+
if (l.vars.opened) {
|
426 |
+
var i = !1;
|
427 |
+
switch (t.keyCode) {
|
428 |
+
case p.prev:
|
429 |
+
i = e.prev;
|
430 |
+
break;
|
431 |
+
case p.next:
|
432 |
+
i = e.next;
|
433 |
+
break;
|
434 |
+
case p.close:
|
435 |
+
i = e.close
|
436 |
+
}
|
437 |
+
i && (t.preventDefault(), t.stopPropagation(), l.nodes.$wrpr.trigger(i))
|
438 |
+
}
|
439 |
+
})
|
440 |
+
}
|
441 |
+
}, t[a].defaults[r] = !1, t[a].constants[r] = {
|
442 |
+
prev: 37,
|
443 |
+
next: 39,
|
444 |
+
close: 27
|
445 |
+
}, t[a].addons.push(r)
|
446 |
+
}(jQuery),
|
447 |
+
function(t) {
|
448 |
+
var i, s, e, n, o, a = "tosrus",
|
449 |
+
r = "pagination",
|
450 |
+
d = !1;
|
451 |
+
t[a].prototype["_addon_" + r] = function() {
|
452 |
+
d || (i = t[a]._c, s = t[a]._d, e = t[a]._e, n = t[a]._f, o = t[a]._g, i.add("pagination selected uibg bullets thumbnails"), d = !0);
|
453 |
+
var l = this,
|
454 |
+
p = this.opts[r];
|
455 |
+
if (this.nodes.$slides.length < 2 && (p.add = !1), p.add) {
|
456 |
+
if ("string" == typeof p.target && (p.target = t(p.target)), p.target instanceof t ? this.nodes.$pagr = p.target : (this.nodes.$pagr = t('<div class="' + i.pagination + " " + i[p.type] + '" />').appendTo(this.nodes.$wrpr), this.nodes.$uibg || (this.nodes.$uibg = t('<div class="' + i.uibg + '" />').prependTo(this.nodes.$wrpr))), "function" != typeof p.anchorBuilder) switch (p.type) {
|
457 |
+
case "thumbnails":
|
458 |
+
var c = '<a href="#" style="background-image: url(\'',
|
459 |
+
h = "');\"></a>";
|
460 |
+
this.vars.fixed ? p.anchorBuilder = function(i) {
|
461 |
+
return c + t(this).data(s.anchor).attr("href") + h
|
462 |
+
} : p.anchorBuilder = function(i) {
|
463 |
+
return c + t(this).find("img").attr("src") + h
|
464 |
+
};
|
465 |
+
break;
|
466 |
+
case "bullets":
|
467 |
+
default:
|
468 |
+
p.anchorBuilder = function(t) {
|
469 |
+
return '<a href="#"></a>'
|
470 |
+
}
|
471 |
+
}
|
472 |
+
this.nodes.$slides.each(function(i) {
|
473 |
+
t(p.anchorBuilder.call(this, i + 1)).appendTo(l.nodes.$pagr).on(e.click, function(t) {
|
474 |
+
t.preventDefault(), t.stopPropagation(), l.nodes.$wrpr.trigger(e.slideTo, [i])
|
475 |
+
})
|
476 |
+
}), this.updatePagination(), this.nodes.$wrpr.on(e.sliding, function(t, i, s) {
|
477 |
+
l.updatePagination()
|
478 |
+
})
|
479 |
+
}
|
480 |
+
}, t[a].prototype.updatePagination = function() {
|
481 |
+
this.nodes.$pagr && this.nodes.$pagr.children().removeClass(i.selected).eq(this.slides.index).addClass(i.selected)
|
482 |
+
}, t[a].defaults[r] = {
|
483 |
+
add: !1,
|
484 |
+
type: "bullets",
|
485 |
+
target: null,
|
486 |
+
anchorBuilder: null
|
487 |
+
}, t[a].addons.push(r), t[a].ui.push("pagination"), t[a].ui.push("bullets"), t[a].ui.push("thumbnails")
|
488 |
+
}(jQuery),
|
489 |
+
function(t) {
|
490 |
+
var i = "tosrus",
|
491 |
+
s = "html";
|
492 |
+
t[i].media[s] = {
|
493 |
+
filterAnchors: function(i) {
|
494 |
+
var s = i.attr("href");
|
495 |
+
return "#" == s.slice(0, 1) && t(s).is("div")
|
496 |
+
},
|
497 |
+
initAnchors: function(s, e) {
|
498 |
+
t('<div class="' + t[i]._c("html") + '" />').append(t(e)).appendTo(s), s.removeClass(t[i]._c.loading).trigger(t[i]._e.loaded)
|
499 |
+
},
|
500 |
+
filterSlides: function(t) {
|
501 |
+
return t.is("div")
|
502 |
+
},
|
503 |
+
initSlides: function(t) {}
|
504 |
+
}, t[i].defaults.media[s] = {}
|
505 |
+
}(jQuery),
|
506 |
+
function(t) {
|
507 |
+
var i = "tosrus",
|
508 |
+
s = "image";
|
509 |
+
t[i].media[s] = {
|
510 |
+
filterAnchors: function(i) {
|
511 |
+
return t.inArray(i.attr("href").toLowerCase().split(".").pop().split("?")[0], ["jpg", "jpe", "jpeg", "gif", "png"]) > -1
|
512 |
+
},
|
513 |
+
initAnchors: function(s, e) {
|
514 |
+
t('<img border="0" />').on(t[i]._e.load, function(e) {
|
515 |
+
e.stopPropagation(), s.removeClass(t[i]._c.loading).trigger(t[i]._e.loaded)
|
516 |
+
}).appendTo(s).attr("src", e)
|
517 |
+
},
|
518 |
+
filterSlides: function(t) {
|
519 |
+
return t.is("img")
|
520 |
+
},
|
521 |
+
initSlides: function(t) {}
|
522 |
+
}, t[i].defaults.media[s] = {}
|
523 |
+
}(jQuery),
|
524 |
+
function(t) {
|
525 |
+
function i(i) {
|
526 |
+
function p() {
|
527 |
+
c.length && (c.attr("src", ""), c.attr("src", u))
|
528 |
+
}
|
529 |
+
l || (s = t[r]._c, e = t[r]._d, n = t[r]._e, o = t[r]._f, a = t[r]._g, e.add("ratio maxWidth maxHeight"), l = !0);
|
530 |
+
var c = i.children(),
|
531 |
+
h = i.data(t[r]._d.anchor) || t(),
|
532 |
+
u = c.attr("src"),
|
533 |
+
f = h.data(e.ratio) || this.opts[d].ratio,
|
534 |
+
v = h.data(e.maxWidth) || this.opts[d].maxWidth,
|
535 |
+
g = h.data(e.maxHeight) || this.opts[d].maxHeight;
|
536 |
+
i.removeClass(s.loading).trigger(n.loaded).on(n.loading, function(t) {
|
537 |
+
o.resizeRatio(c, i, v, g, f)
|
538 |
+
}), this.nodes.$wrpr.on(n.sliding, function(t) {
|
539 |
+
p()
|
540 |
+
}).on(n.opening, function(t) {
|
541 |
+
o.resizeRatio(c, i, v, g, f)
|
542 |
+
}).on(n.closing, function(t) {
|
543 |
+
p()
|
544 |
+
}), a.$wndw.on(n.resize, function(t) {
|
545 |
+
o.resizeRatio(c, i, v, g, f)
|
546 |
+
})
|
547 |
+
}
|
548 |
+
var s, e, n, o, a, r = "tosrus",
|
549 |
+
d = "vimeo",
|
550 |
+
l = !1;
|
551 |
+
t[r].media[d] = {
|
552 |
+
filterAnchors: function(t) {
|
553 |
+
return t.attr("href").toLowerCase().indexOf("vimeo.com/") > -1
|
554 |
+
},
|
555 |
+
initAnchors: function(s, e) {
|
556 |
+
var n = this._uniqueID();
|
557 |
+
e = e.split("vimeo.com/")[1].split("?")[0] + "?api=1&player_id=" + n, t('<iframe id="' + n + '" src="http://player.vimeo.com/video/' + e + '" frameborder="0" allowfullscreen />').appendTo(s), i.call(this, s)
|
558 |
+
},
|
559 |
+
filterSlides: function(t) {
|
560 |
+
return !(!t.is("iframe") || !t.attr("src")) && t.attr("src").toLowerCase().indexOf("vimeo.com/video/") > -1
|
561 |
+
},
|
562 |
+
initSlides: function(t) {
|
563 |
+
i.call(this, t)
|
564 |
+
}
|
565 |
+
}, t[r].defaults.media[d] = {}, t[r].defaults[d] = {
|
566 |
+
ratio: 16 / 9,
|
567 |
+
maxWidth: !1,
|
568 |
+
maxHeight: !1
|
569 |
+
}
|
570 |
+
}(jQuery),
|
571 |
+
function(t) {
|
572 |
+
function i(i) {
|
573 |
+
function p(t) {
|
574 |
+
c.length && c[0].contentWindow.postMessage('{ "event": "command", "func": "' + t + 'Video" }', "*")
|
575 |
+
}
|
576 |
+
l || (s = t[r]._c, e = t[r]._d, n = t[r]._e, o = t[r]._f, a = t[r]._g, e.add("ratio maxWidth maxHeight"), l = !0);
|
577 |
+
var c = i.children(),
|
578 |
+
h = i.data(t[r]._d.anchor) || t(),
|
579 |
+
u = h.data(e.ratio) || this.opts[d].ratio,
|
580 |
+
f = h.data(e.maxWidth) || this.opts[d].maxWidth,
|
581 |
+
v = h.data(e.maxHeight) || this.opts[d].maxHeight;
|
582 |
+
i.removeClass(s.loading).trigger(n.loaded).on(n.loading, function(t) {
|
583 |
+
o.resizeRatio(c, i, f, v, u)
|
584 |
+
}), this.nodes.$wrpr.on(n.sliding, function(t) {
|
585 |
+
p("pause")
|
586 |
+
}).on(n.opening, function(t) {
|
587 |
+
o.resizeRatio(c, i, f, v, u)
|
588 |
+
}).on(n.closing, function(t) {
|
589 |
+
p("stop")
|
590 |
+
}), a.$wndw.on(n.resize, function(t) {
|
591 |
+
o.resizeRatio(c, i, f, v, u)
|
592 |
+
})
|
593 |
+
}
|
594 |
+
var s, e, n, o, a, r = "tosrus",
|
595 |
+
d = "youtube",
|
596 |
+
l = !1;
|
597 |
+
t[r].media[d] = {
|
598 |
+
filterAnchors: function(t) {
|
599 |
+
return t.attr("href").toLowerCase().indexOf("youtube.com/watch?v=") > -1
|
600 |
+
},
|
601 |
+
initAnchors: function(s, e) {
|
602 |
+
var n = e;
|
603 |
+
e = e.split("?v=")[1].split("&")[0], this.opts[d].imageLink ? (e = "http://img.youtube.com/vi/" + e + "/0.jpg", t('<a href="' + n + '" class="' + t[r]._c("play") + '" target="_blank" />').appendTo(s), t('<img border="0" />').on(t[r]._e.load, function(i) {
|
604 |
+
i.stopPropagation(), s.removeClass(t[r]._c.loading).trigger(t[r]._e.loaded)
|
605 |
+
}).appendTo(s).attr("src", e)) : (t('<iframe src="http://www.youtube.com/embed/' + e + '?enablejsapi=1" frameborder="0" allowfullscreen />').appendTo(s), i.call(this, s))
|
606 |
+
},
|
607 |
+
filterSlides: function(t) {
|
608 |
+
return !(!t.is("iframe") || !t.attr("src")) && t.attr("src").toLowerCase().indexOf("youtube.com/embed/") > -1
|
609 |
+
},
|
610 |
+
initSlides: function(t) {
|
611 |
+
i.call(this, t)
|
612 |
+
}
|
613 |
+
}, t[r].defaults.media[d] = {}, t[r].defaults[d] = {
|
614 |
+
ratio: 16 / 9,
|
615 |
+
maxWidth: !1,
|
616 |
+
maxHeight: !1,
|
617 |
+
imageLink: t[r].support.touch
|
618 |
+
}
|
619 |
+
}(jQuery);
|
assets/tosrus/jquery.tosrus.min.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
.tos-caption>div,.tos-slide,.tos-slide>*{box-sizing:border-box}.tos-slide,.tos-slider,.tos-wrapper{width:100%;height:100%}.tos-noanimation{-webkit-transition-property:none!important;transition-property:none!important}.tos-fastanimation{-webkit-transition-duration:.2s!important;transition-duration:.2s!important;-webkit-transition-timing-function:ease-out!important;transition-timing-function:ease-out!important}.tos-wrapper{opacity:0;-webkit-transition:opacity .4s ease;transition:opacity .4s ease;display:none;padding:0;margin:0;overflow:hidden}.tos-wrapper.tos-opened{display:block}.tos-slide,.tos-slide:before,.tos-slide>*{display:inline-block}.tos-wrapper.tos-opening{opacity:1}.tos-wrapper.tos-fixed{background-color:#000;position:fixed;top:0;left:0;z-index:9000}.tos-slider,.tos-wrapper.tos-inline{position:relative}.tos-slider{white-space:nowrap;padding:0;margin:0}.tos-uibg,.tos-wrapper.tos-fx-slide.tos-fixed .tos-slider{position:absolute}.tos-wrapper.tos-fx-slide .tos-slider{left:0;-webkit-transition:left .4s ease;transition:left .4s ease}.tos-wrapper.tos-fx-fade .tos-slider{opacity:1;-webkit-transition:opacity .4s ease;transition:opacity .4s ease}.tos-uibg{opacity:0;-webkit-transition:opacity .4s ease;transition:opacity .4s ease;width:100%;left:0;bottom:0;z-index:1}.tos-fill .tos-uibg{background:-webkit-linear-gradient(bottom,rgba(0,0,0,.5),transparent);background:linear-gradient(to top,rgba(0,0,0,.5),transparent)}.tos-desktop .tos-wrapper:hover .tos-uibg,.tos-touch .tos-wrapper.tos-hover .tos-uibg{opacity:1}.tos-slide{-webkit-overflow-scrolling:touch;line-height:1px;text-align:center;overflow:hidden;position:relative}.tos-slide:before{content:"";height:50%;width:1px;margin-right:-1px}.tos-slide.tos-loading>*{opacity:0}.tos-slide>*{opacity:1;-webkit-transition:opacity .4s ease;transition:opacity .4s ease;vertical-align:middle;max-height:100%;max-width:100%}.tos-slide.tos-html>div{-webkit-overflow-scrolling:touch;white-space:normal;text-align:left;line-height:1.5}.tos-slide.tos-html>div *{-webkit-text-size-adjust:none;-ms-text-size-adjust:none;text-size-adjust:none}.tos-wrapper.tos-fill .tos-slide.tos-image>img{max-height:none;max-width:none;min-height:100%;min-width:100%}.tos-wrapper.tos-fixed .tos-slide.tos-html>div{background-color:#fff;color:#333;box-sizing:border-box;display:inline-block;padding:40px;overflow:auto}.tos-desktop .tos-wrapper.tos-fixed{background-color:rgba(0,0,0,.85)}.tos-desktop .tos-wrapper.tos-fixed.tos-fit .tos-slide{padding:20px}.tos-close,.tos-next{right:20px}.tos-close,.tos-next,.tos-prev{background:#000;border-radius:3px;opacity:0;display:block;width:40px;position:absolute;z-index:1;-webkit-transition:opacity .4s ease;transition:opacity .4s ease}.tos-next,.tos-prev{height:80px;margin-top:-40px;top:50%}.tos-next.tos-disabled,.tos-prev.tos-disabled{cursor:default}.tos-prev{left:20px}.tos-close{height:40px;top:20px}.tos-desktop .tos-wrapper:hover .tos-close,.tos-desktop .tos-wrapper:hover .tos-next,.tos-desktop .tos-wrapper:hover .tos-prev,.tos-touch .tos-wrapper.tos-hover .tos-close,.tos-touch .tos-wrapper.tos-hover .tos-next,.tos-touch .tos-wrapper.tos-hover .tos-prev{opacity:.5}.tos-desktop .tos-wrapper:hover .tos-close:hover,.tos-desktop .tos-wrapper:hover .tos-next:hover,.tos-desktop .tos-wrapper:hover .tos-prev:hover,.tos-touch .tos-wrapper.tos-hover .tos-close:hover,.tos-touch .tos-wrapper.tos-hover .tos-next:hover,.tos-touch .tos-wrapper.tos-hover .tos-prev:hover{opacity:.9}.tos-desktop .tos-wrapper:hover .tos-close.tos-disabled,.tos-desktop .tos-wrapper:hover .tos-next.tos-disabled,.tos-desktop .tos-wrapper:hover .tos-prev.tos-disabled,.tos-touch .tos-wrapper.tos-hover .tos-close.tos-disabled,.tos-touch .tos-wrapper.tos-hover .tos-next.tos-disabled,.tos-touch .tos-wrapper.tos-hover .tos-prev.tos-disabled{opacity:.2}.tos-close span:after,.tos-close span:before,.tos-next span,.tos-prev span{content:'';display:block;width:12px;height:12px;margin:-5px;position:absolute;top:50%;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.tos-close span:after,.tos-close span:before{width:6px;height:6px;margin-top:-4px;margin-left:0;margin-right:0}.tos-close span:before,.tos-prev span{border-bottom:3px solid #fff;border-left:3px solid #fff;left:50%}.tos-close span:after,.tos-next span{border-top:3px solid #fff;border-right:3px solid #fff;right:50%}.tos-desktop .tos-wrapper.tos-fixed.tos-fit.tos-has-close .tos-slide,.tos-desktop .tos-wrapper.tos-fixed.tos-fit.tos-has-next .tos-slide,.tos-desktop .tos-wrapper.tos-fixed.tos-fit.tos-has-prev .tos-slide{padding-left:80px;padding-right:80px}.tos-inline{opacity:0;-webkit-transition:opacity .4s ease;transition:opacity .4s ease;display:inline-block;margin:0;position:relative;top:auto;left:auto;right:auto}.tos-caption,.tos-pagination{text-align:center;-webkit-transition:opacity .4s ease;width:100%;bottom:0;left:0;z-index:1;position:absolute}.tos-inline.tos-prev{margin-right:-60px}.tos-inline.tos-next{margin-left:-60px}.tos-loading .tos-inline{opacity:0!important}.tos-touch.tos-scale-2 .tos-wrapper.tos-fixed .tos-close,.tos-touch.tos-scale-2 .tos-wrapper.tos-fixed .tos-next,.tos-touch.tos-scale-2 .tos-wrapper.tos-fixed .tos-prev{-webkit-transform:scale(2);-ms-transform:scale(2);transform:scale(2)}.tos-touch.tos-scale-3 .tos-wrapper.tos-fixed .tos-close,.tos-touch.tos-scale-3 .tos-wrapper.tos-fixed .tos-next,.tos-touch.tos-scale-3 .tos-wrapper.tos-fixed .tos-prev{-webkit-transform:scale(3);-ms-transform:scale(3);transform:scale(3)}.tos-touch.tos-scale-2 .tos-wrapper.tos-fixed .tos-prev,.tos-touch.tos-scale-3 .tos-wrapper.tos-fixed .tos-prev{-webkit-transform-origin:left center;-ms-transform-origin:left center;transform-origin:left center}.tos-touch.tos-scale-2 .tos-wrapper.tos-fixed .tos-next,.tos-touch.tos-scale-3 .tos-wrapper.tos-fixed .tos-next{-webkit-transform-origin:right center;-ms-transform-origin:right center;transform-origin:right center}.tos-touch.tos-scale-2 .tos-wrapper.tos-fixed .tos-close,.tos-touch.tos-scale-3 .tos-wrapper.tos-fixed .tos-close{-webkit-transform-origin:right top;-ms-transform-origin:right top;transform-origin:right top}.tos-caption{color:#fff;opacity:0;transition:opacity .4s ease}.tos-caption:after{content:'';display:block;clear:both}.tos-caption>div{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;width:100%;padding:0 20px;float:left}.tos-caption>div:last-child{float:right;margin-right:-2px}.tos-desktop .tos-wrapper:hover .tos-caption,.tos-touch .tos-wrapper.tos-hover .tos-caption{opacity:1}.tos-wrapper .tos-caption{line-height:20px;font-size:15px;text-shadow:0 1px 2px rgba(0,0,0,.8);height:40px}.tos-wrapper.tos-has-caption .tos-uibg{height:100px}.tos-desktop .tos-wrapper.tos-fixed.tos-fit.tos-has-caption .tos-slide{padding-bottom:60px}.tos-touch.tos-scale-2 .tos-wrapper.tos-fixed .tos-caption{line-height:40px;font-size:30px;text-shadow:0 2px 4px rgba(0,0,0,.8);height:80px}.tos-touch.tos-scale-2 .tos-wrapper.tos-fixed.tos-has-caption .tos-uibg{height:200px}.tos-touch.tos-scale-3 .tos-wrapper.tos-fixed .tos-caption{line-height:60px;font-size:45px;text-shadow:0 3px 6px rgba(0,0,0,.8);height:120px}.tos-touch.tos-scale-3 .tos-wrapper.tos-fixed.tos-has-caption .tos-uibg{height:300px}.tos-wrapper.tos-fx-slide .tos-slider{-webkit-transition-property:left,margin;transition-property:left,margin}.tos-pagination{white-space:nowrap;overflow-x:auto;-webkit-overflow-scrolling:touch;overflow-scrolling:touch;opacity:0;transition:opacity .4s ease}.tos-pagination a{display:inline-block}.tos-pagination.tos-bullets a{background-color:rgba(255,255,255,.2)}.tos-pagination.tos-bullets a:hover{background-color:rgba(255,255,255,.5)}.tos-pagination.tos-bullets a.tos-selected{background-color:rgba(255,255,255,.9)}.tos-desktop .tos-wrapper:hover .tos-pagination,.tos-touch .tos-wrapper.tos-hover .tos-pagination{opacity:1}.tos-wrapper .tos-pagination:after,.tos-wrapper .tos-pagination:before{content:'';display:inline-block;width:20px;height:10px}.tos-wrapper.tos-has-bullets .tos-pagination{height:30px}.tos-wrapper.tos-has-bullets .tos-pagination a{border-radius:10px;width:10px;height:10px;margin:0 5px}.tos-wrapper.tos-has-bullets .tos-caption{bottom:30px}.tos-wrapper.tos-has-bullets .tos-uibg{height:90px}.tos-wrapper.tos-has-bullets.tos-has-caption .tos-uibg{height:130px}.tos-wrapper.tos-has-thumbnails .tos-pagination{height:70px}.tos-wrapper.tos-has-thumbnails .tos-pagination a{background-position:center center;background-size:cover;width:50px;height:50px;margin:0 5px}.tos-wrapper.tos-has-thumbnails .tos-caption{bottom:70px}.tos-wrapper.tos-has-thumbnails .tos-uibg{height:130px}.tos-wrapper.tos-has-thumbnails.tos-has-caption .tos-uibg{height:170px}.tos-desktop .tos-wrapper.tos-fixed.tos-fit.tos-has-bullets .tos-slide{padding-bottom:50px}.tos-desktop .tos-wrapper.tos-fixed.tos-fit.tos-has-bullets.tos-has-caption .tos-slide{padding-bottom:80px}.tos-desktop .tos-wrapper.tos-fixed.tos-fit.tos-has-thumbnails .tos-slide{padding-bottom:90px}.tos-desktop .tos-wrapper.tos-fixed.tos-fit.tos-has-thumbnails.tos-has-caption .tos-slide{padding-bottom:120px}.tos-touch.tos-scale-2 .tos-wrapper.tos-fixed .tos-pagination:after,.tos-touch.tos-scale-2 .tos-wrapper.tos-fixed .tos-pagination:before{content:'';display:inline-block;width:40px;height:20px}.tos-touch.tos-scale-2 .tos-wrapper.tos-fixed.tos-has-bullets .tos-pagination{height:60px}.tos-touch.tos-scale-2 .tos-wrapper.tos-fixed.tos-has-bullets .tos-pagination a{border-radius:20px;width:20px;height:20px;margin:0 10px}.tos-touch.tos-scale-2 .tos-wrapper.tos-fixed.tos-has-bullets .tos-caption{bottom:60px}.tos-touch.tos-scale-2 .tos-wrapper.tos-fixed.tos-has-bullets .tos-uibg{height:180px}.tos-touch.tos-scale-2 .tos-wrapper.tos-fixed.tos-has-bullets.tos-has-caption .tos-uibg{height:260px}.tos-touch.tos-scale-2 .tos-wrapper.tos-fixed.tos-has-thumbnails .tos-pagination{height:140px}.tos-touch.tos-scale-2 .tos-wrapper.tos-fixed.tos-has-thumbnails .tos-pagination a{background-position:center center;background-size:cover;width:100px;height:100px;margin:0 10px}.tos-touch.tos-scale-2 .tos-wrapper.tos-fixed.tos-has-thumbnails .tos-caption{bottom:140px}.tos-touch.tos-scale-2 .tos-wrapper.tos-fixed.tos-has-thumbnails .tos-uibg{height:260px}.tos-touch.tos-scale-2 .tos-wrapper.tos-fixed.tos-has-thumbnails.tos-has-caption .tos-uibg{height:340px}.tos-touch.tos-scale-3 .tos-wrapper.tos-fixed .tos-pagination:after,.tos-touch.tos-scale-3 .tos-wrapper.tos-fixed .tos-pagination:before{content:'';display:inline-block;width:60px;height:30px}.tos-touch.tos-scale-3 .tos-wrapper.tos-fixed.tos-has-bullets .tos-pagination{height:90px}.tos-touch.tos-scale-3 .tos-wrapper.tos-fixed.tos-has-bullets .tos-pagination a{border-radius:30px;width:30px;height:30px;margin:0 15px}.tos-touch.tos-scale-3 .tos-wrapper.tos-fixed.tos-has-bullets .tos-caption{bottom:90px}.tos-touch.tos-scale-3 .tos-wrapper.tos-fixed.tos-has-bullets .tos-uibg{height:270px}.tos-touch.tos-scale-3 .tos-wrapper.tos-fixed.tos-has-bullets.tos-has-caption .tos-uibg{height:390px}.tos-touch.tos-scale-3 .tos-wrapper.tos-fixed.tos-has-thumbnails .tos-pagination{height:210px}.tos-touch.tos-scale-3 .tos-wrapper.tos-fixed.tos-has-thumbnails .tos-pagination a{background-position:center center;background-size:cover;width:150px;height:150px;margin:0 15px}.tos-touch.tos-scale-3 .tos-wrapper.tos-fixed.tos-has-thumbnails .tos-caption{bottom:210px}.tos-touch.tos-scale-3 .tos-wrapper.tos-fixed.tos-has-thumbnails .tos-uibg{height:390px}.tos-touch.tos-scale-3 .tos-wrapper.tos-fixed.tos-has-thumbnails.tos-has-caption .tos-uibg{height:510px}.tos-slide .tos-html{-webkit-overflow-scrolling:touch}.tos-play,.tos-play:after{display:block;position:absolute;top:50%;left:50%}.tos-play{background:#000;opacity:0;-webkit-transition:opacity .4s ease;transition:opacity .4s ease}.tos-play:after{content:''}.tos-desktop .tos-wrapper:hover .tos-play,.tos-touch .tos-wrapper.tos-hover .tos-play{opacity:.5}.tos-desktop .tos-wrapper:hover .tos-play:hover,.tos-touch .tos-wrapper.tos-hover .tos-play:hover{opacity:.9}.tos-wrapper .tos-play{border-radius:80px;width:80px;height:80px;margin:-40px}.tos-wrapper .tos-play:after{border:20px solid transparent;border-left-color:#fff;border-left-width:30px;margin-top:-20px;margin-left:-10.5px}.tos-touch.tos-scale-2 .tos-wrapper.tos-fixed .tos-play{border-radius:160px;width:160px;height:160px;margin:-80px}.tos-touch.tos-scale-2 .tos-wrapper.tos-fixed .tos-play:after{border:40px solid transparent;border-left-color:#fff;border-left-width:60px;margin-top:-40px;margin-left:-21px}.tos-touch.tos-scale-3 .tos-wrapper.tos-fixed .tos-play{border-radius:240px;width:240px;height:240px;margin:-120px}.tos-touch.tos-scale-3 .tos-wrapper.tos-fixed .tos-play:after{border:60px solid transparent;border-left-color:#fff;border-left-width:90px;margin-top:-60px;margin-left:-31.5px}
|
assets/tosrus/jquery.tosrus.min.js
ADDED
@@ -0,0 +1,83 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
* jQuery Touch Optimized Sliders "R"Us 2.5.0
|
3 |
+
*
|
4 |
+
* Copyright (c) Fred Heusschen
|
5 |
+
* www.frebsite.nl
|
6 |
+
*
|
7 |
+
* Plugin website:
|
8 |
+
* tosrus.frebsite.nl
|
9 |
+
*
|
10 |
+
* Licensed under the MIT license.
|
11 |
+
* http://en.wikipedia.org/wiki/MIT_License
|
12 |
+
*/
|
13 |
+
!function(t){function i(){o=function(t){return s+"-"+t},a=function(t){return s+"-"+t},r=function(t){return t+"."+s},t.each([o,a,r],function(t,i){i.add=function(t){t=t.split(" ");for(var e in t)i[t[e]]=i(t[e])}}),o.add("touch desktop scale-1 scale-2 scale-3 wrapper opened opening fixed inline hover slider slide loading noanimation fastanimation"),a.add("slide anchor"),r.add("open opening close closing prev next slideTo sliding click pinch scroll resize orientationchange load loading loaded transitionend webkitTransitionEnd"),d={complObject:function(i,e){return t.isPlainObject(i)||(i=e),i},complBoolean:function(t,i){return"boolean"!=typeof t&&(t=i),t},complNumber:function(i,e){return t.isNumeric(i)||(i=e),i},complString:function(t,i){return"string"!=typeof t&&(t=i),t},isPercentage:function(t){return"string"==typeof t&&"%"==t.slice(-1)},getPercentage:function(t){return parseInt(t.slice(0,-1))},resizeRatio:function(t,i,e,s,n){if(i.is(":visible")){var o=i.width(),a=i.height();e&&o>e&&(o=e),s&&a>s&&(a=s),n>o/a?a=o/n:o=a*n,t.width(o).height(a)}},transitionend:function(t,i,e){var s=!1,n=function(){s||i.call(t[0]),s=!0};t.one(r.transitionend,n),t.one(r.webkitTransitionEnd,n),setTimeout(n,1.1*e)},setViewportScale:function(){if(l.viewportScale){var t=l.viewportScale.getScale();"undefined"!=typeof t&&(t=1/t,l.$body.removeClass(o["scale-1"]).removeClass(o["scale-2"]).removeClass(o["scale-3"]).addClass(o["scale-"+Math.max(Math.min(Math.round(t),3),1)]))}}},l={$wndw:t(window),$html:t("html"),$body:t("body"),scrollPosition:0,viewportScale:null,viewportScaleInterval:null},l.$body.addClass(t[e].support.touch?o.touch:o.desktop),l.$wndw.on(r.scroll,function(t){l.$body.hasClass(o.opened)&&(window.scrollTo(0,l.scrollPosition),t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation())}),!l.viewportScale&&t[e].support.touch&&"undefined"!=typeof FlameViewportScale&&(l.viewportScale=new FlameViewportScale,d.setViewportScale(),l.$wndw.on(r.orientationchange+" "+r.resize,function(t){l.viewportScaleInterval&&(clearTimeout(l.viewportScaleInterval),l.viewportScaleInterval=null),l.viewportScaleInterval=setTimeout(function(){d.setViewportScale()},500)})),t[e]._c=o,t[e]._d=a,t[e]._e=r,t[e]._f=d,t[e]._g=l}var e="tosrus",s="tos",n="2.5.0";if(!t[e]){var o={},a={},r={},d={},l={};t[e]=function(t,i,e){return this.$node=t,this.opts=i,this.conf=e,this.vars={},this.nodes={},this.slides={},this._init(),this},t[e].prototype={_init:function(){var i=this;this._complementOptions(),this.vars.fixed="window"==this.opts.wrapper.target,this.nodes.$wrpr=t('<div class="'+o.wrapper+'" />'),this.nodes.$sldr=t('<div class="'+o.slider+'" />').appendTo(this.nodes.$wrpr),this.nodes.$wrpr.addClass(this.vars.fixed?o.fixed:o.inline).addClass(o("fx-"+this.opts.effect)).addClass(o(this.opts.slides.scale)).addClass(this.opts.wrapper.classes),this.nodes.$wrpr.on(r.open+" "+r.close+" "+r.prev+" "+r.next+" "+r.slideTo,function(t){arguments=Array.prototype.slice.call(arguments);var t=arguments.shift(),e=t.type;t.stopPropagation(),"function"==typeof i[e]&&i[e].apply(i,arguments)}).on(r.opening+" "+r.closing+" "+r.sliding+" "+r.loading+" "+r.loaded,function(t){t.stopPropagation()}).on(r.click,function(e){switch(e.stopPropagation(),i.opts.wrapper.onClick){case"toggleUI":i.nodes.$wrpr.toggleClass(o.hover);break;case"close":t(e.target).is("img")||i.close()}}),this.nodes.$anchors=this._initAnchors(),this.nodes.$slides=this._initSlides(),this.slides.total=this.nodes.$slides.length,this.slides.visible=this.opts.slides.visible,this.slides.index=0,this.vars.opened=!0;for(var s=0;s<t[e].addons.length;s++)t.isFunction(this["_addon_"+t[e].addons[s]])&&this["_addon_"+t[e].addons[s]]();for(var n=0;n<t[e].ui.length;n++)this.nodes.$wrpr.find("."+o[t[e].ui[n]]).length&&this.nodes.$wrpr.addClass(o("has-"+t[e].ui[n]));"close"==this.opts.wrapper.onClick&&(this.nodes.$uibg||t().add(this.nodes.$capt||t()).add(this.nodes.$pagr||t()).on(r.click,function(t){t.stopPropagation()})),this.vars.fixed?(this.nodes.$wrpr.appendTo(l.$body),this.close(!0)):(this.nodes.$wrpr.appendTo(this.opts.wrapper.target),this.opts.show?(this.vars.opened=!1,this.open(0,!0)):this.close(!0))},open:function(i,e){var s=this;this.vars.opened||(this.vars.fixed&&(l.scrollPosition=l.$wndw.scrollTop(),l.$body.addClass(o.opened),d.setViewportScale()),e?this.nodes.$wrpr.addClass(o.opening).trigger(r.opening,[i,e]):setTimeout(function(){s.nodes.$wrpr.addClass(o.opening).trigger(r.opening,[i,e])},5),this.nodes.$wrpr.addClass(o.hover).addClass(o.opened)),this.vars.opened=!0,this._loadContents(),t.isNumeric(i)&&(e=e||!this.vars.opened,this.slideTo(i,e))},close:function(i){this.vars.opened&&(this.vars.fixed&&l.$body.removeClass(o.opened),i?this.nodes.$wrpr.removeClass(o.opened):d.transitionend(this.nodes.$wrpr,function(){t(this).removeClass(o.opened)},this.conf.transitionDuration),this.nodes.$wrpr.removeClass(o.hover).removeClass(o.opening).trigger(r.closing,[this.slides.index,i])),this.vars.opened=!1},prev:function(i,e){t.isNumeric(i)||(i=this.opts.slides.slide),this.slideTo(this.slides.index-i,e)},next:function(i,e){t.isNumeric(i)||(i=this.opts.slides.slide),this.slideTo(this.slides.index+i,e)},slideTo:function(i,s){if(!this.vars.opened)return!1;if(!t.isNumeric(i))return!1;var n=!0;if(0>i){var a=0==this.slides.index;this.opts.infinite?i=a?this.slides.total-this.slides.visible:0:(i=0,a&&(n=!1))}if(i+this.slides.visible>this.slides.total){var l=this.slides.index+this.slides.visible>=this.slides.total;this.opts.infinite?i=l?0:this.slides.total-this.slides.visible:(i=this.slides.total-this.slides.visible,l&&(n=!1))}if(this.slides.index=i,this._loadContents(),n){var p=0-this.slides.index*this.opts.slides.width+this.opts.slides.offset;this.slides.widthPercentage&&(p+="%"),s&&(this.nodes.$sldr.addClass(o.noanimation),d.transitionend(this.nodes.$sldr,function(){t(this).removeClass(o.noanimation)},5));for(var c in t[e].effects)if(c==this.opts.effect){t[e].effects[c].call(this,p,s);break}this.nodes.$wrpr.trigger(r.sliding,[i,s])}},_initAnchors:function(){var i=this,s=t();if(this.$node.is("a"))for(var n in t[e].media)s=s.add(this.$node.filter(function(){if(i.opts.media[n]&&i.opts.media[n].filterAnchors){var s=i.opts.media[n].filterAnchors.call(i,t(this));if("boolean"==typeof s)return s}return t[e].media[n].filterAnchors.call(i,t(this))}));return s},_initSlides:function(){return this[this.$node.is("a")?"_initSlidesFromAnchors":"_initSlidesFromContent"](),this.nodes.$sldr.children().css("width",this.opts.slides.width+(this.slides.widthPercentage?"%":"px"))},_initSlidesFromAnchors:function(){var i=this;this.nodes.$anchors.each(function(e){var s=t(this),n=t('<div class="'+o.slide+" "+o.loading+'" />').data(a.anchor,s).appendTo(i.nodes.$sldr);s.data(a.slide,n).on(r.click,function(t){t.preventDefault(),i.open(e)})})},_initSlidesFromContent:function(){var i=this;this.$node.children().each(function(){var s=t(this);t('<div class="'+o.slide+'" />').append(s).appendTo(i.nodes.$sldr);for(var n in t[e].media){var a=null;if(i.opts.media[n]&&i.opts.media[n].filterSlides&&(a=i.opts.media[n].filterSlides.call(i,s)),"boolean"!=typeof a&&(a=t[e].media[n].filterSlides.call(i,s)),a){t[e].media[n].initSlides.call(i,s),s.parent().addClass(o(n));break}}})},_loadContents:function(){var t=this;switch(this.opts.slides.load){case"all":this._loadContent(0,this.slides.total);break;case"visible":this._loadContent(this.slides.index,this.slides.index+this.slides.visible);break;case"near-visible":default:this._loadContent(this.slides.index,this.slides.index+this.slides.visible),setTimeout(function(){t._loadContent(t.slides.index-t.slides.visible,t.slides.index),t._loadContent(t.slides.index+t.slides.visible,t.slides.index+2*t.slides.visible)},this.conf.transitionDuration)}},_loadContent:function(i,s){var n=this;this.nodes.$slides.slice(i,s).each(function(){var i=t(this);if(0==i.children().length){var s=i.data(a.anchor),d=s.attr("href");for(var l in t[e].media){var p=null;if(n.opts.media[l]&&n.opts.media[l].filterAnchors&&(p=n.opts.media[l].filterAnchors.call(n,s)),"boolean"!=typeof p&&(p=t[e].media[l].filterAnchors.call(n,s)),p){t[e].media[l].initAnchors.call(n,i,d),i.addClass(o(l));break}}i.trigger(r.loading,[i.data(a.anchor)])}})},_complementOptions:function(){if("undefined"==typeof this.opts.wrapper.target&&(this.opts.wrapper.target=this.$node.is("a")?"window":this.$node),"window"!=this.opts.wrapper.target&&"string"==typeof this.opts.wrapper.target&&(this.opts.wrapper.target=t(this.opts.wrapper.target)),this.opts.show=d.complBoolean(this.opts.show,"window"!=this.opts.wrapper.target),t.isNumeric(this.opts.slides.width))this.slides.widthPercentage=!1,this.opts.slides.visible=d.complNumber(this.opts.slides.visible,1);else{var i=d.isPercentage(this.opts.slides.width)?d.getPercentage(this.opts.slides.width):!1;this.slides.widthPercentage=!0,this.opts.slides.visible=d.complNumber(this.opts.slides.visible,i?Math.floor(100/i):1),this.opts.slides.width=i?i:Math.ceil(1e4/this.opts.slides.visible)/100}this.opts.slides.slide=d.complNumber(this.opts.slides.slide,this.opts.slides.visible),this.opts.slides.offset=d.isPercentage(this.opts.slides.offset)?d.getPercentage(this.opts.slides.offset):d.complNumber(this.opts.slides.offset,0)},_uniqueID:function(){return this.__uniqueID||(this.__uniqueID=0),this.__uniqueID++,o("uid-"+this.__uniqueID)}},t.fn[e]=function(s,n,o,a){l.$wndw||i(),s=t.extend(!0,{},t[e].defaults,s),s=t.extend(!0,{},s,t[e].support.touch?o:n),a=t.extend(!0,{},t[e].configuration,a);var r=new t[e](this,s,a);return this.data(e,r),r.nodes.$wrpr},t[e].support={touch:"ontouchstart"in window.document||navigator.msMaxTouchPoints},t[e].defaults={infinite:!1,effect:"slide",wrapper:{classes:"",onClick:"toggleUI"},slides:{offset:0,scale:"fit",load:"near-visible",visible:1},media:{}},t[e].configuration={transitionDuration:400},t[e].constants={},t[e].debug=function(t){},t[e].deprecated=function(t,i){"undefined"!=typeof console&&"undefined"!=typeof console.warn&&console.warn(e+": "+t+" is deprecated, use "+i+" instead.")},t[e].effects={slide:function(t){this.nodes.$sldr.css("left",t)},fade:function(i){d.transitionend(this.nodes.$sldr,function(){t(this).css("left",i).css("opacity",1)},this.conf.transitionDuration),this.nodes.$sldr.css("opacity",0)}},t[e].version=n,t[e].media={},t[e].addons=[],t[e].ui=[]}}(jQuery),/*
|
14 |
+
* jQuery Touch Optimized Sliders "R"Us
|
15 |
+
* Autoplay addon
|
16 |
+
*
|
17 |
+
* Copyright (c) Fred Heusschen
|
18 |
+
* www.frebsite.nl
|
19 |
+
*/
|
20 |
+
function(t){var i,e,s,n,o,a="tosrus",r="autoplay",d=!1;t[a].prototype["_addon_"+r]=function(){d||(i=t[a]._c,e=t[a]._d,s=t[a]._e,n=t[a]._f,o=t[a]._g,s.add("mouseover mouseout"),d=!0);var l=this,p=this.opts[r];p.play&&(this.opts.infinite=!0,this.nodes.$wrpr.on(s.sliding,function(t){l.autoplay()}),p.pauseOnHover&&this.nodes.$wrpr.on(s.mouseover,function(t){l.autostop()}).on(s.mouseout,function(t){l.autoplay()}),this.autoplay())},t[a].prototype.autoplay=function(){var t=this;this.autostop(),this.vars.autoplay=setTimeout(function(){t.next()},this.opts[r].timeout)},t[a].prototype.autostop=function(){this.vars.autoplay&&clearTimeout(this.vars.autoplay)},t[a].defaults[r]={play:!1,timeout:4e3,pauseOnHover:!1},t[a].addons.push(r)}(jQuery),/*
|
21 |
+
* jQuery Touch Optimized Sliders "R"Us
|
22 |
+
* Buttons addon
|
23 |
+
*
|
24 |
+
* Copyright (c) Fred Heusschen
|
25 |
+
* www.frebsite.nl
|
26 |
+
*/
|
27 |
+
function(t){function i(i,e){return t('<a class="'+s[i]+e+'" href="#"><span></span></a>')}function e(t,i,e,s){i.on(o.click,function(i){i.preventDefault(),i.stopPropagation(),t.trigger(o[e],[s])})}var s,n,o,a,r,d="tosrus",l="buttons",p=!1;t[d].prototype["_addon_"+l]=function(){p||(s=t[d]._c,n=t[d]._d,o=t[d]._e,a=t[d]._f,r=t[d]._g,s.add("prev next close disabled"),p=!0);var c=this,h=this.opts[l];this.nodes.$prev=null,this.nodes.$next=null,this.nodes.$clse=null,("boolean"==typeof h||"string"==typeof h&&"inline"==h)&&(h={prev:h,next:h}),"undefined"==typeof h.close&&(h.close=this.vars.fixed),this.nodes.$slides.length<2&&(h.prev=!1,h.next=!1),t.each({prev:"prev",next:"next",close:"clse"},function(n,a){h[n]&&("string"==typeof h[n]&&"inline"==h[n]?c.vars.fixed&&"close"!=n&&c.nodes.$slides.on(o.loading,function(o,a){var r=i(n," "+s.inline)["prev"==n?"prependTo":"appendTo"](this);e(c.nodes.$wrpr,r,n,1),c.opts.infinite||("prev"==n&&t(this).is(":first-child")||"next"==n&&t(this).is(":last-child"))&&r.addClass(s.disabled)}):("string"==typeof h[n]&&(h[n]=t(h[n])),c.nodes["$"+a]=h[n]instanceof t?h[n]:i(n,"").appendTo(c.nodes.$wrpr),e(c.nodes.$wrpr,c.nodes["$"+a],n,null)))}),this.opts.infinite||(this.updateButtons(),this.nodes.$wrpr.on(o.sliding,function(t,i,e){c.updateButtons()}))},t[d].prototype.updateButtons=function(){this.nodes.$prev&&this.nodes.$prev[(this.slides.index<1?"add":"remove")+"Class"](s.disabled),this.nodes.$next&&this.nodes.$next[(this.slides.index>=this.slides.total-this.slides.visible?"add":"remove")+"Class"](s.disabled)},t[d].defaults[l]={prev:!t[d].support.touch,next:!t[d].support.touch},t[d].addons.push(l),t[d].ui.push("prev"),t[d].ui.push("next"),t[d].ui.push("close")}(jQuery),/*
|
28 |
+
* jQuery Touch Optimized Sliders "R"Us
|
29 |
+
* Caption addon
|
30 |
+
*
|
31 |
+
* Copyright (c) Fred Heusschen
|
32 |
+
* www.frebsite.nl
|
33 |
+
*/
|
34 |
+
function(t){var i,e,s,n,o,a="tosrus",r="caption",d=!1;t[a].prototype["_addon_"+r]=function(){d||(i=t[a]._c,e=t[a]._d,s=t[a]._e,n=t[a]._f,o=t[a]._g,i.add("caption uibg"),e.add("caption"),d=!0);var l=this,p=this.opts[r];if(p.add){p.attributes=p.attributes||[],"string"==typeof p.target&&(p.target=t(p.target)),p.target instanceof t?this.nodes.$capt=p.target:(this.nodes.$capt=t('<div class="'+i.caption+'" />').appendTo(this.nodes.$wrpr),this.nodes.$uibg||(this.nodes.$uibg=t('<div class="'+i.uibg+'" />').prependTo(this.nodes.$wrpr)));for(var c=0,h=this.slides.visible;h>c;c++)t('<div class="'+i.caption+"-"+c+'" />').css("width",this.opts.slides.width+(this.slides.widthPercentage?"%":"px")).appendTo(this.nodes.$capt);this.nodes.$slides.each(function(i){var s=t(this),n=l.vars.fixed?s.data(e.anchor):s.children();s.data(e.caption,"");for(var o=0,a=p.attributes.length;a>o;o++){var r=n.attr(p.attributes[o]);if(r&&r.length){s.data(e.caption,r);break}}}),this.nodes.$wrpr.on(s.sliding,function(t,i,s){for(var n=0,o=l.slides.visible;o>n;n++)l.nodes.$capt.children().eq(n).html(l.nodes.$sld
|