Version Description
- Fix: Missing class-multilang.php file
Download this release
Release Info
Developer | dfactory |
Plugin | Responsive Lightbox & Gallery |
Version | 2.2.3.1 |
Comparing to | |
See all releases |
Code changes from version 2.2.3 to 2.2.3.1
- assets/select2/i18n/af.js +2 -2
- assets/select2/i18n/ar.js +2 -2
- assets/select2/i18n/az.js +2 -2
- assets/select2/i18n/bg.js +2 -2
- assets/select2/i18n/bn.js +3 -0
- assets/select2/i18n/bs.js +2 -2
- assets/select2/i18n/ca.js +2 -2
- assets/select2/i18n/cs.js +2 -2
- assets/select2/i18n/da.js +2 -2
- assets/select2/i18n/de.js +2 -2
- assets/select2/i18n/dsb.js +2 -2
- assets/select2/i18n/el.js +2 -2
- assets/select2/i18n/en.js +2 -2
- assets/select2/i18n/es.js +2 -2
- assets/select2/i18n/et.js +2 -2
- assets/select2/i18n/eu.js +2 -2
- assets/select2/i18n/fa.js +2 -2
- assets/select2/i18n/fi.js +2 -2
- assets/select2/i18n/fr.js +2 -2
- assets/select2/i18n/gl.js +2 -2
- assets/select2/i18n/he.js +2 -2
- assets/select2/i18n/hi.js +2 -2
- assets/select2/i18n/hr.js +2 -2
- assets/select2/i18n/hsb.js +2 -2
- assets/select2/i18n/hu.js +2 -2
- assets/select2/i18n/hy.js +2 -2
- assets/select2/i18n/id.js +2 -2
- assets/select2/i18n/is.js +2 -2
- assets/select2/i18n/it.js +2 -2
- assets/select2/i18n/ja.js +2 -2
- assets/select2/i18n/ka.js +3 -0
- assets/select2/i18n/km.js +2 -2
- assets/select2/i18n/ko.js +2 -2
- assets/select2/i18n/lt.js +2 -2
- assets/select2/i18n/lv.js +2 -2
- assets/select2/i18n/mk.js +2 -2
- assets/select2/i18n/ms.js +2 -2
- assets/select2/i18n/nb.js +2 -2
- assets/select2/i18n/ne.js +3 -0
- assets/select2/i18n/nl.js +2 -2
- assets/select2/i18n/pl.js +2 -2
- assets/select2/i18n/ps.js +2 -2
- assets/select2/i18n/pt-BR.js +2 -2
- assets/select2/i18n/pt.js +2 -2
- assets/select2/i18n/ro.js +2 -2
- assets/select2/i18n/ru.js +2 -2
- assets/select2/i18n/sk.js +2 -2
- assets/select2/i18n/sl.js +2 -2
- assets/select2/i18n/sq.js +3 -0
- assets/select2/i18n/sr-Cyrl.js +2 -2
- assets/select2/i18n/sr.js +2 -2
- assets/select2/i18n/sv.js +2 -2
- assets/select2/i18n/th.js +2 -2
- assets/select2/i18n/tk.js +2 -2
- assets/select2/i18n/tr.js +2 -2
- assets/select2/i18n/uk.js +2 -2
- assets/select2/i18n/vi.js +2 -2
- assets/select2/i18n/zh-CN.js +2 -2
- assets/select2/i18n/zh-TW.js +2 -2
- assets/select2/select2.css +3 -6
- assets/select2/select2.full.js +439 -178
- assets/select2/select2.full.min.js +2 -1
- assets/select2/select2.min.css +1 -1
- includes/class-folders.php +276 -187
- includes/class-galleries.php +116 -41
- includes/class-multilang.php +315 -0
- includes/class-settings.php +0 -2
- js/admin-folders.js +57 -72
- js/admin-media.js +3 -0
- js/gutenberg.min.js +1 -1
- readme.txt +5 -2
- responsive-lightbox.php +14 -6
assets/select2/i18n/af.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.
|
2 |
|
3 |
-
|
1 |
+
/*! Select2 4.0.13 | 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;e.define("select2/i18n/af",[],function(){return{errorLoading:function(){return"Die resultate kon nie gelaai word nie."},inputTooLong:function(e){var n=e.input.length-e.maximum,r="Verwyders asseblief "+n+" character";return 1!=n&&(r+="s"),r},inputTooShort:function(e){return"Voer asseblief "+(e.minimum-e.input.length)+" of meer karakters"},loadingMore:function(){return"Meer resultate word gelaai…"},maximumSelected:function(e){var n="Kies asseblief net "+e.maximum+" item";return 1!=e.maximum&&(n+="s"),n},noResults:function(){return"Geen resultate gevind"},searching:function(){return"Besig…"},removeAllItems:function(){return"Verwyder alle items"}}}),e.define,e.require}();
|
assets/select2/i18n/ar.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.
|
2 |
|
3 |
-
|
1 |
+
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
|
3 |
+
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/ar",[],function(){return{errorLoading:function(){return"لا يمكن تحميل النتائج"},inputTooLong:function(n){return"الرجاء حذف "+(n.input.length-n.maximum)+" عناصر"},inputTooShort:function(n){return"الرجاء إضافة "+(n.minimum-n.input.length)+" عناصر"},loadingMore:function(){return"جاري تحميل نتائج إضافية..."},maximumSelected:function(n){return"تستطيع إختيار "+n.maximum+" بنود فقط"},noResults:function(){return"لم يتم العثور على أي نتائج"},searching:function(){return"جاري البحث…"},removeAllItems:function(){return"قم بإزالة كل العناصر"}}}),n.define,n.require}();
|
assets/select2/i18n/az.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.
|
2 |
|
3 |
-
|
1 |
+
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
|
3 |
+
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/az",[],function(){return{inputTooLong:function(n){return n.input.length-n.maximum+" simvol silin"},inputTooShort:function(n){return n.minimum-n.input.length+" simvol daxil edin"},loadingMore:function(){return"Daha çox nəticə yüklənir…"},maximumSelected:function(n){return"Sadəcə "+n.maximum+" element seçə bilərsiniz"},noResults:function(){return"Nəticə tapılmadı"},searching:function(){return"Axtarılır…"},removeAllItems:function(){return"Bütün elementləri sil"}}}),n.define,n.require}();
|
assets/select2/i18n/bg.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.
|
2 |
|
3 |
-
|
1 |
+
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
|
3 |
+
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/bg",[],function(){return{inputTooLong:function(n){var e=n.input.length-n.maximum,u="Моля въведете с "+e+" по-малко символ";return e>1&&(u+="a"),u},inputTooShort:function(n){var e=n.minimum-n.input.length,u="Моля въведете още "+e+" символ";return e>1&&(u+="a"),u},loadingMore:function(){return"Зареждат се още…"},maximumSelected:function(n){var e="Можете да направите до "+n.maximum+" ";return n.maximum>1?e+="избора":e+="избор",e},noResults:function(){return"Няма намерени съвпадения"},searching:function(){return"Търсене…"},removeAllItems:function(){return"Премахнете всички елементи"}}}),n.define,n.require}();
|
assets/select2/i18n/bn.js
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
1 |
+
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
+
|
3 |
+
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/bn",[],function(){return{errorLoading:function(){return"ফলাফলগুলি লোড করা যায়নি।"},inputTooLong:function(n){var e=n.input.length-n.maximum,u="অনুগ্রহ করে "+e+" টি অক্ষর মুছে দিন।";return 1!=e&&(u="অনুগ্রহ করে "+e+" টি অক্ষর মুছে দিন।"),u},inputTooShort:function(n){return n.minimum-n.input.length+" টি অক্ষর অথবা অধিক অক্ষর লিখুন।"},loadingMore:function(){return"আরো ফলাফল লোড হচ্ছে ..."},maximumSelected:function(n){var e=n.maximum+" টি আইটেম নির্বাচন করতে পারবেন।";return 1!=n.maximum&&(e=n.maximum+" টি আইটেম নির্বাচন করতে পারবেন।"),e},noResults:function(){return"কোন ফলাফল পাওয়া যায়নি।"},searching:function(){return"অনুসন্ধান করা হচ্ছে ..."}}}),n.define,n.require}();
|
assets/select2/i18n/bs.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.
|
2 |
|
3 |
-
|
1 |
+
/*! Select2 4.0.13 | 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;e.define("select2/i18n/bs",[],function(){function e(e,n,r,t){return e%10==1&&e%100!=11?n:e%10>=2&&e%10<=4&&(e%100<12||e%100>14)?r:t}return{errorLoading:function(){return"Preuzimanje nije uspijelo."},inputTooLong:function(n){var r=n.input.length-n.maximum,t="Obrišite "+r+" simbol";return t+=e(r,"","a","a")},inputTooShort:function(n){var r=n.minimum-n.input.length,t="Ukucajte bar još "+r+" simbol";return t+=e(r,"","a","a")},loadingMore:function(){return"Preuzimanje još rezultata…"},maximumSelected:function(n){var r="Možete izabrati samo "+n.maximum+" stavk";return r+=e(n.maximum,"u","e","i")},noResults:function(){return"Ništa nije pronađeno"},searching:function(){return"Pretraga…"},removeAllItems:function(){return"Uklonite sve stavke"}}}),e.define,e.require}();
|
assets/select2/i18n/ca.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.
|
2 |
|
3 |
-
|
1 |
+
/*! Select2 4.0.13 | 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;e.define("select2/i18n/ca",[],function(){return{errorLoading:function(){return"La càrrega ha fallat"},inputTooLong:function(e){var n=e.input.length-e.maximum,r="Si us plau, elimina "+n+" car";return r+=1==n?"àcter":"àcters"},inputTooShort:function(e){var n=e.minimum-e.input.length,r="Si us plau, introdueix "+n+" car";return r+=1==n?"àcter":"àcters"},loadingMore:function(){return"Carregant més resultats…"},maximumSelected:function(e){var n="Només es pot seleccionar "+e.maximum+" element";return 1!=e.maximum&&(n+="s"),n},noResults:function(){return"No s'han trobat resultats"},searching:function(){return"Cercant…"},removeAllItems:function(){return"Treu tots els elements"}}}),e.define,e.require}();
|
assets/select2/i18n/cs.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.
|
2 |
|
3 |
-
|
1 |
+
/*! Select2 4.0.13 | 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;e.define("select2/i18n/cs",[],function(){function e(e,n){switch(e){case 2:return n?"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(n){var t=n.input.length-n.maximum;return 1==t?"Prosím, zadejte o jeden znak méně.":t<=4?"Prosím, zadejte o "+e(t,!0)+" znaky méně.":"Prosím, zadejte o "+t+" znaků méně."},inputTooShort:function(n){var t=n.minimum-n.input.length;return 1==t?"Prosím, zadejte ještě jeden znak.":t<=4?"Prosím, zadejte ještě další "+e(t,!0)+" znaky.":"Prosím, zadejte ještě dalších "+t+" znaků."},loadingMore:function(){return"Načítají se další výsledky…"},maximumSelected:function(n){var t=n.maximum;return 1==t?"Můžete zvolit jen jednu položku.":t<=4?"Můžete zvolit maximálně "+e(t,!1)+" položky.":"Můžete zvolit maximálně "+t+" položek."},noResults:function(){return"Nenalezeny žádné položky."},searching:function(){return"Vyhledávání…"},removeAllItems:function(){return"Odstraňte všechny položky"}}}),e.define,e.require}();
|
assets/select2/i18n/da.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.
|
2 |
|
3 |
-
|
1 |
+
/*! Select2 4.0.13 | 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;e.define("select2/i18n/da",[],function(){return{errorLoading:function(){return"Resultaterne kunne ikke indlæses."},inputTooLong:function(e){return"Angiv venligst "+(e.input.length-e.maximum)+" tegn mindre"},inputTooShort:function(e){return"Angiv venligst "+(e.minimum-e.input.length)+" tegn mere"},loadingMore:function(){return"Indlæser flere resultater…"},maximumSelected:function(e){var n="Du kan kun vælge "+e.maximum+" emne";return 1!=e.maximum&&(n+="r"),n},noResults:function(){return"Ingen resultater fundet"},searching:function(){return"Søger…"},removeAllItems:function(){return"Fjern alle elementer"}}}),e.define,e.require}();
|
assets/select2/i18n/de.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.
|
2 |
|
3 |
-
|
1 |
+
/*! Select2 4.0.13 | 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;e.define("select2/i18n/de",[],function(){return{errorLoading:function(){return"Die Ergebnisse konnten nicht geladen werden."},inputTooLong:function(e){return"Bitte "+(e.input.length-e.maximum)+" Zeichen weniger eingeben"},inputTooShort:function(e){return"Bitte "+(e.minimum-e.input.length)+" Zeichen mehr eingeben"},loadingMore:function(){return"Lade mehr Ergebnisse…"},maximumSelected:function(e){var n="Sie können nur "+e.maximum+" Element";return 1!=e.maximum&&(n+="e"),n+=" auswählen"},noResults:function(){return"Keine Übereinstimmungen gefunden"},searching:function(){return"Suche…"},removeAllItems:function(){return"Entferne alle Elemente"}}}),e.define,e.require}();
|
assets/select2/i18n/dsb.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.
|
2 |
|
3 |
-
|
1 |
+
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
|
3 |
+
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/dsb",[],function(){var n=["znamuško","znamušce","znamuška","znamuškow"],e=["zapisk","zapiska","zapiski","zapiskow"],u=function(n,e){return 1===n?e[0]:2===n?e[1]:n>2&&n<=4?e[2]:n>=5?e[3]:void 0};return{errorLoading:function(){return"Wuslědki njejsu se dali zacytaś."},inputTooLong:function(e){var a=e.input.length-e.maximum;return"Pšosym lašuj "+a+" "+u(a,n)},inputTooShort:function(e){var a=e.minimum-e.input.length;return"Pšosym zapódaj nanejmjenjej "+a+" "+u(a,n)},loadingMore:function(){return"Dalšne wuslědki se zacytaju…"},maximumSelected:function(n){return"Móžoš jano "+n.maximum+" "+u(n.maximum,e)+"wubraś."},noResults:function(){return"Žedne wuslědki namakane"},searching:function(){return"Pyta se…"},removeAllItems:function(){return"Remove all items"}}}),n.define,n.require}();
|
assets/select2/i18n/el.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.
|
2 |
|
3 |
-
|
1 |
+
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
|
3 |
+
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/el",[],function(){return{errorLoading:function(){return"Τα αποτελέσματα δεν μπόρεσαν να φορτώσουν."},inputTooLong:function(n){var e=n.input.length-n.maximum,u="Παρακαλώ διαγράψτε "+e+" χαρακτήρ";return 1==e&&(u+="α"),1!=e&&(u+="ες"),u},inputTooShort:function(n){return"Παρακαλώ συμπληρώστε "+(n.minimum-n.input.length)+" ή περισσότερους χαρακτήρες"},loadingMore:function(){return"Φόρτωση περισσότερων αποτελεσμάτων…"},maximumSelected:function(n){var e="Μπορείτε να επιλέξετε μόνο "+n.maximum+" επιλογ";return 1==n.maximum&&(e+="ή"),1!=n.maximum&&(e+="ές"),e},noResults:function(){return"Δεν βρέθηκαν αποτελέσματα"},searching:function(){return"Αναζήτηση…"},removeAllItems:function(){return"Καταργήστε όλα τα στοιχεία"}}}),n.define,n.require}();
|
assets/select2/i18n/en.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.
|
2 |
|
3 |
-
|
1 |
+
/*! Select2 4.0.13 | 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;e.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(e){var n=e.input.length-e.maximum,r="Please delete "+n+" character";return 1!=n&&(r+="s"),r},inputTooShort:function(e){return"Please enter "+(e.minimum-e.input.length)+" or more characters"},loadingMore:function(){return"Loading more results…"},maximumSelected:function(e){var n="You can only select "+e.maximum+" item";return 1!=e.maximum&&(n+="s"),n},noResults:function(){return"No results found"},searching:function(){return"Searching…"},removeAllItems:function(){return"Remove all items"}}}),e.define,e.require}();
|
assets/select2/i18n/es.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.
|
2 |
|
3 |
-
|
1 |
+
/*! Select2 4.0.13 | 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;e.define("select2/i18n/es",[],function(){return{errorLoading:function(){return"No se pudieron cargar los resultados"},inputTooLong:function(e){var n=e.input.length-e.maximum,r="Por favor, elimine "+n+" car";return r+=1==n?"ácter":"acteres"},inputTooShort:function(e){var n=e.minimum-e.input.length,r="Por favor, introduzca "+n+" car";return r+=1==n?"ácter":"acteres"},loadingMore:function(){return"Cargando más resultados…"},maximumSelected:function(e){var n="Sólo puede seleccionar "+e.maximum+" elemento";return 1!=e.maximum&&(n+="s"),n},noResults:function(){return"No se encontraron resultados"},searching:function(){return"Buscando…"},removeAllItems:function(){return"Eliminar todos los elementos"}}}),e.define,e.require}();
|
assets/select2/i18n/et.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.
|
2 |
|
3 |
-
|
1 |
+
/*! Select2 4.0.13 | 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;e.define("select2/i18n/et",[],function(){return{inputTooLong:function(e){var n=e.input.length-e.maximum,t="Sisesta "+n+" täht";return 1!=n&&(t+="e"),t+=" vähem"},inputTooShort:function(e){var n=e.minimum-e.input.length,t="Sisesta "+n+" täht";return 1!=n&&(t+="e"),t+=" rohkem"},loadingMore:function(){return"Laen tulemusi…"},maximumSelected:function(e){var n="Saad vaid "+e.maximum+" tulemus";return 1==e.maximum?n+="e":n+="t",n+=" valida"},noResults:function(){return"Tulemused puuduvad"},searching:function(){return"Otsin…"},removeAllItems:function(){return"Eemalda kõik esemed"}}}),e.define,e.require}();
|
assets/select2/i18n/eu.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.
|
2 |
|
3 |
-
|
1 |
+
/*! Select2 4.0.13 | 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;e.define("select2/i18n/eu",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Idatzi ";return n+=1==t?"karaktere bat":t+" karaktere",n+=" gutxiago"},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Idatzi ";return n+=1==t?"karaktere bat":t+" karaktere",n+=" gehiago"},loadingMore:function(){return"Emaitza gehiago kargatzen…"},maximumSelected:function(e){return 1===e.maximum?"Elementu bakarra hauta dezakezu":e.maximum+" elementu hauta ditzakezu soilik"},noResults:function(){return"Ez da bat datorrenik aurkitu"},searching:function(){return"Bilatzen…"},removeAllItems:function(){return"Kendu elementu guztiak"}}}),e.define,e.require}();
|
assets/select2/i18n/fa.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.
|
2 |
|
3 |
-
|
1 |
+
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
|
3 |
+
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/fa",[],function(){return{errorLoading:function(){return"امکان بارگذاری نتایج وجود ندارد."},inputTooLong:function(n){return"لطفاً "+(n.input.length-n.maximum)+" کاراکتر را حذف نمایید"},inputTooShort:function(n){return"لطفاً تعداد "+(n.minimum-n.input.length)+" کاراکتر یا بیشتر وارد نمایید"},loadingMore:function(){return"در حال بارگذاری نتایج بیشتر..."},maximumSelected:function(n){return"شما تنها میتوانید "+n.maximum+" آیتم را انتخاب نمایید"},noResults:function(){return"هیچ نتیجهای یافت نشد"},searching:function(){return"در حال جستجو..."},removeAllItems:function(){return"همه موارد را حذف کنید"}}}),n.define,n.require}();
|
assets/select2/i18n/fi.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.
|
2 |
|
3 |
-
|
1 |
+
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
|
3 |
+
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/fi",[],function(){return{errorLoading:function(){return"Tuloksia ei saatu ladattua."},inputTooLong:function(n){return"Ole hyvä ja anna "+(n.input.length-n.maximum)+" merkkiä vähemmän"},inputTooShort:function(n){return"Ole hyvä ja anna "+(n.minimum-n.input.length)+" merkkiä lisää"},loadingMore:function(){return"Ladataan lisää tuloksia…"},maximumSelected:function(n){return"Voit valita ainoastaan "+n.maximum+" kpl"},noResults:function(){return"Ei tuloksia"},searching:function(){return"Haetaan…"},removeAllItems:function(){return"Poista kaikki kohteet"}}}),n.define,n.require}();
|
assets/select2/i18n/fr.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.
|
2 |
|
3 |
-
|
1 |
+
/*! Select2 4.0.13 | 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;e.define("select2/i18n/fr",[],function(){return{errorLoading:function(){return"Les résultats ne peuvent pas être chargés."},inputTooLong:function(e){var n=e.input.length-e.maximum;return"Supprimez "+n+" caractère"+(n>1?"s":"")},inputTooShort:function(e){var n=e.minimum-e.input.length;return"Saisissez au moins "+n+" caractère"+(n>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…"},removeAllItems:function(){return"Supprimer tous les éléments"}}}),e.define,e.require}();
|
assets/select2/i18n/gl.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.
|
2 |
|
3 |
-
|
1 |
+
/*! Select2 4.0.13 | 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;e.define("select2/i18n/gl",[],function(){return{errorLoading:function(){return"Non foi posíbel cargar os resultados."},inputTooLong:function(e){var n=e.input.length-e.maximum;return 1===n?"Elimine un carácter":"Elimine "+n+" caracteres"},inputTooShort:function(e){var n=e.minimum-e.input.length;return 1===n?"Engada un carácter":"Engada "+n+" caracteres"},loadingMore:function(){return"Cargando máis resultados…"},maximumSelected:function(e){return 1===e.maximum?"Só pode seleccionar un elemento":"Só pode seleccionar "+e.maximum+" elementos"},noResults:function(){return"Non se atoparon resultados"},searching:function(){return"Buscando…"},removeAllItems:function(){return"Elimina todos os elementos"}}}),e.define,e.require}();
|
assets/select2/i18n/he.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.
|
2 |
|
3 |
-
|
1 |
+
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
|
3 |
+
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/he",[],function(){return{errorLoading:function(){return"שגיאה בטעינת התוצאות"},inputTooLong:function(n){var e=n.input.length-n.maximum,r="נא למחוק ";return r+=1===e?"תו אחד":e+" תווים"},inputTooShort:function(n){var e=n.minimum-n.input.length,r="נא להכניס ";return r+=1===e?"תו אחד":e+" תווים",r+=" או יותר"},loadingMore:function(){return"טוען תוצאות נוספות…"},maximumSelected:function(n){var e="באפשרותך לבחור עד ";return 1===n.maximum?e+="פריט אחד":e+=n.maximum+" פריטים",e},noResults:function(){return"לא נמצאו תוצאות"},searching:function(){return"מחפש…"},removeAllItems:function(){return"הסר את כל הפריטים"}}}),n.define,n.require}();
|
assets/select2/i18n/hi.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.
|
2 |
|
3 |
-
|
1 |
+
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
|
3 |
+
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/hi",[],function(){return{errorLoading:function(){return"परिणामों को लोड नहीं किया जा सका।"},inputTooLong:function(n){var e=n.input.length-n.maximum,r=e+" अक्षर को हटा दें";return e>1&&(r=e+" अक्षरों को हटा दें "),r},inputTooShort:function(n){return"कृपया "+(n.minimum-n.input.length)+" या अधिक अक्षर दर्ज करें"},loadingMore:function(){return"अधिक परिणाम लोड हो रहे है..."},maximumSelected:function(n){return"आप केवल "+n.maximum+" आइटम का चयन कर सकते हैं"},noResults:function(){return"कोई परिणाम नहीं मिला"},searching:function(){return"खोज रहा है..."},removeAllItems:function(){return"सभी वस्तुओं को हटा दें"}}}),n.define,n.require}();
|
assets/select2/i18n/hr.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.
|
2 |
|
3 |
-
|
1 |
+
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
|
3 |
+
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/hr",[],function(){function n(n){var e=" "+n+" znak";return n%10<5&&n%10>0&&(n%100<5||n%100>19)?n%10>1&&(e+="a"):e+="ova",e}return{errorLoading:function(){return"Preuzimanje nije uspjelo."},inputTooLong:function(e){return"Unesite "+n(e.input.length-e.maximum)},inputTooShort:function(e){return"Unesite još "+n(e.minimum-e.input.length)},loadingMore:function(){return"Učitavanje rezultata…"},maximumSelected:function(n){return"Maksimalan broj odabranih stavki je "+n.maximum},noResults:function(){return"Nema rezultata"},searching:function(){return"Pretraga…"},removeAllItems:function(){return"Ukloni sve stavke"}}}),n.define,n.require}();
|
assets/select2/i18n/hsb.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.
|
2 |
|
3 |
-
|
1 |
+
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
|
3 |
+
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/hsb",[],function(){var n=["znamješko","znamješce","znamješka","znamješkow"],e=["zapisk","zapiskaj","zapiski","zapiskow"],u=function(n,e){return 1===n?e[0]:2===n?e[1]:n>2&&n<=4?e[2]:n>=5?e[3]:void 0};return{errorLoading:function(){return"Wuslědki njedachu so začitać."},inputTooLong:function(e){var a=e.input.length-e.maximum;return"Prošu zhašej "+a+" "+u(a,n)},inputTooShort:function(e){var a=e.minimum-e.input.length;return"Prošu zapodaj znajmjeńša "+a+" "+u(a,n)},loadingMore:function(){return"Dalše wuslědki so začitaja…"},maximumSelected:function(n){return"Móžeš jenož "+n.maximum+" "+u(n.maximum,e)+"wubrać"},noResults:function(){return"Žane wuslědki namakane"},searching:function(){return"Pyta so…"},removeAllItems:function(){return"Remove all items"}}}),n.define,n.require}();
|
assets/select2/i18n/hu.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.
|
2 |
|
3 |
-
|
1 |
+
/*! Select2 4.0.13 | 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;e.define("select2/i18n/hu",[],function(){return{errorLoading:function(){return"Az eredmények betöltése nem sikerült."},inputTooLong:function(e){return"Túl hosszú. "+(e.input.length-e.maximum)+" karakterrel több, mint kellene."},inputTooShort:function(e){return"Túl rövid. Még "+(e.minimum-e.input.length)+" 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…"},removeAllItems:function(){return"Távolítson el minden elemet"}}}),e.define,e.require}();
|
assets/select2/i18n/hy.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.
|
2 |
|
3 |
-
|
1 |
+
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
|
3 |
+
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/hy",[],function(){return{errorLoading:function(){return"Արդյունքները հնարավոր չէ բեռնել։"},inputTooLong:function(n){return"Խնդրում ենք հեռացնել "+(n.input.length-n.maximum)+" նշան"},inputTooShort:function(n){return"Խնդրում ենք մուտքագրել "+(n.minimum-n.input.length)+" կամ ավել նշաններ"},loadingMore:function(){return"Բեռնվում են նոր արդյունքներ․․․"},maximumSelected:function(n){return"Դուք կարող եք ընտրել առավելագույնը "+n.maximum+" կետ"},noResults:function(){return"Արդյունքներ չեն գտնվել"},searching:function(){return"Որոնում․․․"},removeAllItems:function(){return"Հեռացնել բոլոր տարրերը"}}}),n.define,n.require}();
|
assets/select2/i18n/id.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.
|
2 |
|
3 |
-
|
1 |
+
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
|
3 |
+
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/id",[],function(){return{errorLoading:function(){return"Data tidak boleh diambil."},inputTooLong:function(n){return"Hapuskan "+(n.input.length-n.maximum)+" huruf"},inputTooShort:function(n){return"Masukkan "+(n.minimum-n.input.length)+" huruf lagi"},loadingMore:function(){return"Mengambil data…"},maximumSelected:function(n){return"Anda hanya dapat memilih "+n.maximum+" pilihan"},noResults:function(){return"Tidak ada data yang sesuai"},searching:function(){return"Mencari…"},removeAllItems:function(){return"Hapus semua item"}}}),n.define,n.require}();
|
assets/select2/i18n/is.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.
|
2 |
|
3 |
-
|
1 |
+
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
|
3 |
+
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/is",[],function(){return{inputTooLong:function(n){var t=n.input.length-n.maximum,e="Vinsamlegast styttið texta um "+t+" staf";return t<=1?e:e+"i"},inputTooShort:function(n){var t=n.minimum-n.input.length,e="Vinsamlegast skrifið "+t+" staf";return t>1&&(e+="i"),e+=" í viðbót"},loadingMore:function(){return"Sæki fleiri niðurstöður…"},maximumSelected:function(n){return"Þú getur aðeins valið "+n.maximum+" atriði"},noResults:function(){return"Ekkert fannst"},searching:function(){return"Leita…"},removeAllItems:function(){return"Fjarlægðu öll atriði"}}}),n.define,n.require}();
|
assets/select2/i18n/it.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.
|
2 |
|
3 |
-
|
1 |
+
/*! Select2 4.0.13 | 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;e.define("select2/i18n/it",[],function(){return{errorLoading:function(){return"I risultati non possono essere caricati."},inputTooLong:function(e){var n=e.input.length-e.maximum,t="Per favore cancella "+n+" caratter";return t+=1!==n?"i":"e"},inputTooShort:function(e){return"Per favore inserisci "+(e.minimum-e.input.length)+" o più caratteri"},loadingMore:function(){return"Caricando più risultati…"},maximumSelected:function(e){var n="Puoi selezionare solo "+e.maximum+" element";return 1!==e.maximum?n+="i":n+="o",n},noResults:function(){return"Nessun risultato trovato"},searching:function(){return"Sto cercando…"},removeAllItems:function(){return"Rimuovi tutti gli oggetti"}}}),e.define,e.require}();
|
assets/select2/i18n/ja.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.
|
2 |
|
3 |
-
|
1 |
+
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
|
3 |
+
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/ja",[],function(){return{errorLoading:function(){return"結果が読み込まれませんでした"},inputTooLong:function(n){return n.input.length-n.maximum+" 文字を削除してください"},inputTooShort:function(n){return"少なくとも "+(n.minimum-n.input.length)+" 文字を入力してください"},loadingMore:function(){return"読み込み中…"},maximumSelected:function(n){return n.maximum+" 件しか選択できません"},noResults:function(){return"対象が見つかりません"},searching:function(){return"検索しています…"},removeAllItems:function(){return"すべてのアイテムを削除"}}}),n.define,n.require}();
|
assets/select2/i18n/ka.js
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
1 |
+
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
+
|
3 |
+
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/ka",[],function(){return{errorLoading:function(){return"მონაცემების ჩატვირთვა შეუძლებელია."},inputTooLong:function(n){return"გთხოვთ აკრიფეთ "+(n.input.length-n.maximum)+" სიმბოლოთი ნაკლები"},inputTooShort:function(n){return"გთხოვთ აკრიფეთ "+(n.minimum-n.input.length)+" სიმბოლო ან მეტი"},loadingMore:function(){return"მონაცემების ჩატვირთვა…"},maximumSelected:function(n){return"თქვენ შეგიძლიათ აირჩიოთ არაუმეტეს "+n.maximum+" ელემენტი"},noResults:function(){return"რეზულტატი არ მოიძებნა"},searching:function(){return"ძიება…"},removeAllItems:function(){return"ამოიღე ყველა ელემენტი"}}}),n.define,n.require}();
|
assets/select2/i18n/km.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.
|
2 |
|
3 |
-
|
1 |
+
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
|
3 |
+
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/km",[],function(){return{errorLoading:function(){return"មិនអាចទាញយកទិន្នន័យ"},inputTooLong:function(n){return"សូមលុបចេញ "+(n.input.length-n.maximum)+" អក្សរ"},inputTooShort:function(n){return"សូមបញ្ចូល"+(n.minimum-n.input.length)+" អក្សរ រឺ ច្រើនជាងនេះ"},loadingMore:function(){return"កំពុងទាញយកទិន្នន័យបន្ថែម..."},maximumSelected:function(n){return"អ្នកអាចជ្រើសរើសបានតែ "+n.maximum+" ជម្រើសប៉ុណ្ណោះ"},noResults:function(){return"មិនមានលទ្ធផល"},searching:function(){return"កំពុងស្វែងរក..."},removeAllItems:function(){return"លុបធាតុទាំងអស់"}}}),n.define,n.require}();
|
assets/select2/i18n/ko.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.
|
2 |
|
3 |
-
|
1 |
+
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
|
3 |
+
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/ko",[],function(){return{errorLoading:function(){return"결과를 불러올 수 없습니다."},inputTooLong:function(n){return"너무 깁니다. "+(n.input.length-n.maximum)+" 글자 지워주세요."},inputTooShort:function(n){return"너무 짧습니다. "+(n.minimum-n.input.length)+" 글자 더 입력해주세요."},loadingMore:function(){return"불러오는 중…"},maximumSelected:function(n){return"최대 "+n.maximum+"개까지만 선택 가능합니다."},noResults:function(){return"결과가 없습니다."},searching:function(){return"검색 중…"},removeAllItems:function(){return"모든 항목 삭제"}}}),n.define,n.require}();
|
assets/select2/i18n/lt.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.
|
2 |
|
3 |
-
|
1 |
+
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
|
3 |
+
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/lt",[],function(){function n(n,e,i,t){return n%10==1&&(n%100<11||n%100>19)?e:n%10>=2&&n%10<=9&&(n%100<11||n%100>19)?i:t}return{inputTooLong:function(e){var i=e.input.length-e.maximum,t="Pašalinkite "+i+" simbol";return t+=n(i,"į","ius","ių")},inputTooShort:function(e){var i=e.minimum-e.input.length,t="Įrašykite dar "+i+" simbol";return t+=n(i,"į","ius","ių")},loadingMore:function(){return"Kraunama daugiau rezultatų…"},maximumSelected:function(e){var i="Jūs galite pasirinkti tik "+e.maximum+" element";return i+=n(e.maximum,"ą","us","ų")},noResults:function(){return"Atitikmenų nerasta"},searching:function(){return"Ieškoma…"},removeAllItems:function(){return"Pašalinti visus elementus"}}}),n.define,n.require}();
|
assets/select2/i18n/lv.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.
|
2 |
|
3 |
-
|
1 |
+
/*! Select2 4.0.13 | 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;e.define("select2/i18n/lv",[],function(){function e(e,n,u,i){return 11===e?n:e%10==1?u:i}return{inputTooLong:function(n){var u=n.input.length-n.maximum,i="Lūdzu ievadiet par "+u;return(i+=" simbol"+e(u,"iem","u","iem"))+" mazāk"},inputTooShort:function(n){var u=n.minimum-n.input.length,i="Lūdzu ievadiet vēl "+u;return i+=" simbol"+e(u,"us","u","us")},loadingMore:function(){return"Datu ielāde…"},maximumSelected:function(n){var u="Jūs varat izvēlēties ne vairāk kā "+n.maximum;return u+=" element"+e(n.maximum,"us","u","us")},noResults:function(){return"Sakritību nav"},searching:function(){return"Meklēšana…"},removeAllItems:function(){return"Noņemt visus vienumus"}}}),e.define,e.require}();
|
assets/select2/i18n/mk.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.
|
2 |
|
3 |
-
|
1 |
+
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
|
3 |
+
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/mk",[],function(){return{inputTooLong:function(n){var e=(n.input.length,n.maximum,"Ве молиме внесете "+n.maximum+" помалку карактер");return 1!==n.maximum&&(e+="и"),e},inputTooShort:function(n){var e=(n.minimum,n.input.length,"Ве молиме внесете уште "+n.maximum+" карактер");return 1!==n.maximum&&(e+="и"),e},loadingMore:function(){return"Вчитување резултати…"},maximumSelected:function(n){var e="Можете да изберете само "+n.maximum+" ставк";return 1===n.maximum?e+="а":e+="и",e},noResults:function(){return"Нема пронајдено совпаѓања"},searching:function(){return"Пребарување…"},removeAllItems:function(){return"Отстрани ги сите предмети"}}}),n.define,n.require}();
|
assets/select2/i18n/ms.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.
|
2 |
|
3 |
-
|
1 |
+
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
|
3 |
+
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/ms",[],function(){return{errorLoading:function(){return"Keputusan tidak berjaya dimuatkan."},inputTooLong:function(n){return"Sila hapuskan "+(n.input.length-n.maximum)+" aksara"},inputTooShort:function(n){return"Sila masukkan "+(n.minimum-n.input.length)+" atau lebih aksara"},loadingMore:function(){return"Sedang memuatkan keputusan…"},maximumSelected:function(n){return"Anda hanya boleh memilih "+n.maximum+" pilihan"},noResults:function(){return"Tiada padanan yang ditemui"},searching:function(){return"Mencari…"},removeAllItems:function(){return"Keluarkan semua item"}}}),n.define,n.require}();
|
assets/select2/i18n/nb.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.
|
2 |
|
3 |
-
|
1 |
+
/*! Select2 4.0.13 | 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;e.define("select2/i18n/nb",[],function(){return{errorLoading:function(){return"Kunne ikke hente resultater."},inputTooLong:function(e){return"Vennligst fjern "+(e.input.length-e.maximum)+" tegn"},inputTooShort:function(e){return"Vennligst skriv inn "+(e.minimum-e.input.length)+" 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…"},removeAllItems:function(){return"Fjern alle elementer"}}}),e.define,e.require}();
|
assets/select2/i18n/ne.js
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
1 |
+
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
+
|
3 |
+
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/ne",[],function(){return{errorLoading:function(){return"नतिजाहरु देखाउन सकिएन।"},inputTooLong:function(n){var e=n.input.length-n.maximum,u="कृपया "+e+" अक्षर मेटाउनुहोस्।";return 1!=e&&(u+="कृपया "+e+" अक्षरहरु मेटाउनुहोस्।"),u},inputTooShort:function(n){return"कृपया बाँकी रहेका "+(n.minimum-n.input.length)+" वा अरु धेरै अक्षरहरु भर्नुहोस्।"},loadingMore:function(){return"अरु नतिजाहरु भरिँदैछन् …"},maximumSelected:function(n){var e="तँपाई "+n.maximum+" वस्तु मात्र छान्न पाउँनुहुन्छ।";return 1!=n.maximum&&(e="तँपाई "+n.maximum+" वस्तुहरु मात्र छान्न पाउँनुहुन्छ।"),e},noResults:function(){return"कुनै पनि नतिजा भेटिएन।"},searching:function(){return"खोजि हुँदैछ…"}}}),n.define,n.require}();
|
assets/select2/i18n/nl.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.
|
2 |
|
3 |
-
|
1 |
+
/*! Select2 4.0.13 | 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;e.define("select2/i18n/nl",[],function(){return{errorLoading:function(){return"De resultaten konden niet worden geladen."},inputTooLong:function(e){return"Gelieve "+(e.input.length-e.maximum)+" karakters te verwijderen"},inputTooShort:function(e){return"Gelieve "+(e.minimum-e.input.length)+" of meer karakters in te voeren"},loadingMore:function(){return"Meer resultaten laden…"},maximumSelected:function(e){var n=1==e.maximum?"kan":"kunnen",r="Er "+n+" maar "+e.maximum+" item";return 1!=e.maximum&&(r+="s"),r+=" worden geselecteerd"},noResults:function(){return"Geen resultaten gevonden…"},searching:function(){return"Zoeken…"},removeAllItems:function(){return"Verwijder alle items"}}}),e.define,e.require}();
|
assets/select2/i18n/pl.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.
|
2 |
|
3 |
-
|
1 |
+
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
|
3 |
+
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/pl",[],function(){var n=["znak","znaki","znaków"],e=["element","elementy","elementów"],r=function(n,e){return 1===n?e[0]:n>1&&n<=4?e[1]:n>=5?e[2]:void 0};return{errorLoading:function(){return"Nie można załadować wyników."},inputTooLong:function(e){var t=e.input.length-e.maximum;return"Usuń "+t+" "+r(t,n)},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Podaj przynajmniej "+t+" "+r(t,n)},loadingMore:function(){return"Trwa ładowanie…"},maximumSelected:function(n){return"Możesz zaznaczyć tylko "+n.maximum+" "+r(n.maximum,e)},noResults:function(){return"Brak wyników"},searching:function(){return"Trwa wyszukiwanie…"},removeAllItems:function(){return"Usuń wszystkie przedmioty"}}}),n.define,n.require}();
|
assets/select2/i18n/ps.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.
|
2 |
|
3 |
-
|
1 |
+
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
|
3 |
+
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/ps",[],function(){return{errorLoading:function(){return"پايلي نه سي ترلاسه کېدای"},inputTooLong:function(n){var e=n.input.length-n.maximum,r="د مهربانۍ لمخي "+e+" توری ړنګ کړئ";return 1!=e&&(r=r.replace("توری","توري")),r},inputTooShort:function(n){return"لږ تر لږه "+(n.minimum-n.input.length)+" يا ډېر توري وليکئ"},loadingMore:function(){return"نوري پايلي ترلاسه کيږي..."},maximumSelected:function(n){var e="تاسو يوازي "+n.maximum+" قلم په نښه کولای سی";return 1!=n.maximum&&(e=e.replace("قلم","قلمونه")),e},noResults:function(){return"پايلي و نه موندل سوې"},searching:function(){return"لټول کيږي..."},removeAllItems:function(){return"ټول توکي لرې کړئ"}}}),n.define,n.require}();
|
assets/select2/i18n/pt-BR.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.
|
2 |
|
3 |
-
|
1 |
+
/*! Select2 4.0.13 | 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;e.define("select2/i18n/pt-BR",[],function(){return{errorLoading:function(){return"Os resultados não puderam ser carregados."},inputTooLong:function(e){var n=e.input.length-e.maximum,r="Apague "+n+" caracter";return 1!=n&&(r+="es"),r},inputTooShort:function(e){return"Digite "+(e.minimum-e.input.length)+" ou mais caracteres"},loadingMore:function(){return"Carregando mais resultados…"},maximumSelected:function(e){var n="Você só pode selecionar "+e.maximum+" ite";return 1==e.maximum?n+="m":n+="ns",n},noResults:function(){return"Nenhum resultado encontrado"},searching:function(){return"Buscando…"},removeAllItems:function(){return"Remover todos os itens"}}}),e.define,e.require}();
|
assets/select2/i18n/pt.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.
|
2 |
|
3 |
-
|
1 |
+
/*! Select2 4.0.13 | 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;e.define("select2/i18n/pt",[],function(){return{errorLoading:function(){return"Os resultados não puderam ser carregados."},inputTooLong:function(e){var r=e.input.length-e.maximum,n="Por favor apague "+r+" ";return n+=1!=r?"caracteres":"caractere"},inputTooShort:function(e){return"Introduza "+(e.minimum-e.input.length)+" ou mais caracteres"},loadingMore:function(){return"A carregar mais resultados…"},maximumSelected:function(e){var r="Apenas pode seleccionar "+e.maximum+" ";return r+=1!=e.maximum?"itens":"item"},noResults:function(){return"Sem resultados"},searching:function(){return"A procurar…"},removeAllItems:function(){return"Remover todos os itens"}}}),e.define,e.require}();
|
assets/select2/i18n/ro.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.
|
2 |
|
3 |
-
|
1 |
+
/*! Select2 4.0.13 | 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;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 1!==t&&(n+="e"),n},inputTooShort:function(e){return"Vă rugăm să introduceți "+(e.minimum-e.input.length)+" sau mai multe caractere"},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",1!==e.maximum&&(t+="e"),t},noResults:function(){return"Nu au fost găsite rezultate"},searching:function(){return"Căutare…"},removeAllItems:function(){return"Eliminați toate elementele"}}}),e.define,e.require}();
|
assets/select2/i18n/ru.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.
|
2 |
|
3 |
-
|
1 |
+
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
|
3 |
+
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/ru",[],function(){function n(n,e,r,u){return n%10<5&&n%10>0&&n%100<5||n%100>20?n%10>1?r:e:u}return{errorLoading:function(){return"Невозможно загрузить результаты"},inputTooLong:function(e){var r=e.input.length-e.maximum,u="Пожалуйста, введите на "+r+" символ";return u+=n(r,"","a","ов"),u+=" меньше"},inputTooShort:function(e){var r=e.minimum-e.input.length,u="Пожалуйста, введите ещё хотя бы "+r+" символ";return u+=n(r,"","a","ов")},loadingMore:function(){return"Загрузка данных…"},maximumSelected:function(e){var r="Вы можете выбрать не более "+e.maximum+" элемент";return r+=n(e.maximum,"","a","ов")},noResults:function(){return"Совпадений не найдено"},searching:function(){return"Поиск…"},removeAllItems:function(){return"Удалить все элементы"}}}),n.define,n.require}();
|
assets/select2/i18n/sk.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.
|
2 |
|
3 |
-
|
1 |
+
/*! Select2 4.0.13 | 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;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(n){var t=n.input.length-n.maximum;return 1==t?"Prosím, zadajte o jeden znak menej":t>=2&&t<=4?"Prosím, zadajte o "+e[t](!0)+" znaky menej":"Prosím, zadajte o "+t+" znakov menej"},inputTooShort:function(n){var t=n.minimum-n.input.length;return 1==t?"Prosím, zadajte ešte jeden znak":t<=4?"Prosím, zadajte ešte ďalšie "+e[t](!0)+" znaky":"Prosím, zadajte ešte ďalších "+t+" znakov"},loadingMore:function(){return"Načítanie ďalších výsledkov…"},maximumSelected:function(n){return 1==n.maximum?"Môžete zvoliť len jednu položku":n.maximum>=2&&n.maximum<=4?"Môžete zvoliť najviac "+e[n.maximum](!1)+" položky":"Môžete zvoliť najviac "+n.maximum+" položiek"},noResults:function(){return"Nenašli sa žiadne položky"},searching:function(){return"Vyhľadávanie…"},removeAllItems:function(){return"Odstráňte všetky položky"}}}),e.define,e.require}();
|
assets/select2/i18n/sl.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.
|
2 |
|
3 |
-
|
1 |
+
/*! Select2 4.0.13 | 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;e.define("select2/i18n/sl",[],function(){return{errorLoading:function(){return"Zadetkov iskanja ni bilo mogoče naložiti."},inputTooLong:function(e){var n=e.input.length-e.maximum,t="Prosim zbrišite "+n+" znak";return 2==n?t+="a":1!=n&&(t+="e"),t},inputTooShort:function(e){var n=e.minimum-e.input.length,t="Prosim vpišite še "+n+" znak";return 2==n?t+="a":1!=n&&(t+="e"),t},loadingMore:function(){return"Nalagam več zadetkov…"},maximumSelected:function(e){var n="Označite lahko največ "+e.maximum+" predmet";return 2==e.maximum?n+="a":1!=e.maximum&&(n+="e"),n},noResults:function(){return"Ni zadetkov."},searching:function(){return"Iščem…"},removeAllItems:function(){return"Odstranite vse elemente"}}}),e.define,e.require}();
|
assets/select2/i18n/sq.js
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
1 |
+
/*! Select2 4.0.13 | 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;e.define("select2/i18n/sq",[],function(){return{errorLoading:function(){return"Rezultatet nuk mund të ngarkoheshin."},inputTooLong:function(e){var n=e.input.length-e.maximum,t="Të lutem fshi "+n+" karakter";return 1!=n&&(t+="e"),t},inputTooShort:function(e){return"Të lutem shkruaj "+(e.minimum-e.input.length)+" ose më shumë karaktere"},loadingMore:function(){return"Duke ngarkuar më shumë rezultate…"},maximumSelected:function(e){var n="Mund të zgjedhësh vetëm "+e.maximum+" element";return 1!=e.maximum&&(n+="e"),n},noResults:function(){return"Nuk u gjet asnjë rezultat"},searching:function(){return"Duke kërkuar…"},removeAllItems:function(){return"Hiq të gjitha sendet"}}}),e.define,e.require}();
|
assets/select2/i18n/sr-Cyrl.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.
|
2 |
|
3 |
-
|
1 |
+
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
|
3 |
+
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/sr-Cyrl",[],function(){function n(n,e,r,u){return n%10==1&&n%100!=11?e:n%10>=2&&n%10<=4&&(n%100<12||n%100>14)?r:u}return{errorLoading:function(){return"Преузимање није успело."},inputTooLong:function(e){var r=e.input.length-e.maximum,u="Обришите "+r+" симбол";return u+=n(r,"","а","а")},inputTooShort:function(e){var r=e.minimum-e.input.length,u="Укуцајте бар још "+r+" симбол";return u+=n(r,"","а","а")},loadingMore:function(){return"Преузимање још резултата…"},maximumSelected:function(e){var r="Можете изабрати само "+e.maximum+" ставк";return r+=n(e.maximum,"у","е","и")},noResults:function(){return"Ништа није пронађено"},searching:function(){return"Претрага…"},removeAllItems:function(){return"Уклоните све ставке"}}}),n.define,n.require}();
|
assets/select2/i18n/sr.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.
|
2 |
|
3 |
-
|
1 |
+
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
|
3 |
+
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/sr",[],function(){function n(n,e,r,t){return n%10==1&&n%100!=11?e:n%10>=2&&n%10<=4&&(n%100<12||n%100>14)?r:t}return{errorLoading:function(){return"Preuzimanje nije uspelo."},inputTooLong:function(e){var r=e.input.length-e.maximum,t="Obrišite "+r+" simbol";return t+=n(r,"","a","a")},inputTooShort:function(e){var r=e.minimum-e.input.length,t="Ukucajte bar još "+r+" simbol";return t+=n(r,"","a","a")},loadingMore:function(){return"Preuzimanje još rezultata…"},maximumSelected:function(e){var r="Možete izabrati samo "+e.maximum+" stavk";return r+=n(e.maximum,"u","e","i")},noResults:function(){return"Ništa nije pronađeno"},searching:function(){return"Pretraga…"},removeAllItems:function(){return"Уклоните све ставке"}}}),n.define,n.require}();
|
assets/select2/i18n/sv.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.
|
2 |
|
3 |
-
|
1 |
+
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
|
3 |
+
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/sv",[],function(){return{errorLoading:function(){return"Resultat kunde inte laddas."},inputTooLong:function(n){return"Vänligen sudda ut "+(n.input.length-n.maximum)+" tecken"},inputTooShort:function(n){return"Vänligen skriv in "+(n.minimum-n.input.length)+" eller fler tecken"},loadingMore:function(){return"Laddar fler resultat…"},maximumSelected:function(n){return"Du kan max välja "+n.maximum+" element"},noResults:function(){return"Inga träffar"},searching:function(){return"Söker…"},removeAllItems:function(){return"Ta bort alla objekt"}}}),n.define,n.require}();
|
assets/select2/i18n/th.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.
|
2 |
|
3 |
-
|
1 |
+
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
|
3 |
+
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/th",[],function(){return{errorLoading:function(){return"ไม่สามารถค้นข้อมูลได้"},inputTooLong:function(n){return"โปรดลบออก "+(n.input.length-n.maximum)+" ตัวอักษร"},inputTooShort:function(n){return"โปรดพิมพ์เพิ่มอีก "+(n.minimum-n.input.length)+" ตัวอักษร"},loadingMore:function(){return"กำลังค้นข้อมูลเพิ่ม…"},maximumSelected:function(n){return"คุณสามารถเลือกได้ไม่เกิน "+n.maximum+" รายการ"},noResults:function(){return"ไม่พบข้อมูล"},searching:function(){return"กำลังค้นข้อมูล…"},removeAllItems:function(){return"ลบรายการทั้งหมด"}}}),n.define,n.require}();
|
assets/select2/i18n/tk.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.
|
2 |
|
3 |
-
|
1 |
+
/*! Select2 4.0.13 | 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;e.define("select2/i18n/tk",[],function(){return{errorLoading:function(){return"Netije ýüklenmedi."},inputTooLong:function(e){return e.input.length-e.maximum+" harp bozuň."},inputTooShort:function(e){return"Ýene-de iň az "+(e.minimum-e.input.length)+" harp ýazyň."},loadingMore:function(){return"Köpräk netije görkezilýär…"},maximumSelected:function(e){return"Diňe "+e.maximum+" sanysyny saýlaň."},noResults:function(){return"Netije tapylmady."},searching:function(){return"Gözlenýär…"},removeAllItems:function(){return"Remove all items"}}}),e.define,e.require}();
|
assets/select2/i18n/tr.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.
|
2 |
|
3 |
-
|
1 |
+
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
|
3 |
+
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/tr",[],function(){return{errorLoading:function(){return"Sonuç yüklenemedi"},inputTooLong:function(n){return n.input.length-n.maximum+" karakter daha girmelisiniz"},inputTooShort:function(n){return"En az "+(n.minimum-n.input.length)+" karakter daha girmelisiniz"},loadingMore:function(){return"Daha fazla…"},maximumSelected:function(n){return"Sadece "+n.maximum+" seçim yapabilirsiniz"},noResults:function(){return"Sonuç bulunamadı"},searching:function(){return"Aranıyor…"},removeAllItems:function(){return"Tüm öğeleri kaldır"}}}),n.define,n.require}();
|
assets/select2/i18n/uk.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.
|
2 |
|
3 |
-
|
1 |
+
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
|
3 |
+
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/uk",[],function(){function n(n,e,u,r){return n%100>10&&n%100<15?r:n%10==1?e:n%10>1&&n%10<5?u:r}return{errorLoading:function(){return"Неможливо завантажити результати"},inputTooLong:function(e){return"Будь ласка, видаліть "+(e.input.length-e.maximum)+" "+n(e.maximum,"літеру","літери","літер")},inputTooShort:function(n){return"Будь ласка, введіть "+(n.minimum-n.input.length)+" або більше літер"},loadingMore:function(){return"Завантаження інших результатів…"},maximumSelected:function(e){return"Ви можете вибрати лише "+e.maximum+" "+n(e.maximum,"пункт","пункти","пунктів")},noResults:function(){return"Нічого не знайдено"},searching:function(){return"Пошук…"},removeAllItems:function(){return"Видалити всі елементи"}}}),n.define,n.require}();
|
assets/select2/i18n/vi.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.
|
2 |
|
3 |
-
|
1 |
+
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
|
3 |
+
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/vi",[],function(){return{inputTooLong:function(n){return"Vui lòng xóa bớt "+(n.input.length-n.maximum)+" ký tự"},inputTooShort:function(n){return"Vui lòng nhập thêm từ "+(n.minimum-n.input.length)+" ký tự trở lên"},loadingMore:function(){return"Đang lấy thêm kết quả…"},maximumSelected:function(n){return"Chỉ có thể chọn được "+n.maximum+" lựa chọn"},noResults:function(){return"Không tìm thấy kết quả"},searching:function(){return"Đang tìm…"},removeAllItems:function(){return"Xóa tất cả các mục"}}}),n.define,n.require}();
|
assets/select2/i18n/zh-CN.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.
|
2 |
|
3 |
-
|
1 |
+
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
|
3 |
+
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/zh-CN",[],function(){return{errorLoading:function(){return"无法载入结果。"},inputTooLong:function(n){return"请删除"+(n.input.length-n.maximum)+"个字符"},inputTooShort:function(n){return"请再输入至少"+(n.minimum-n.input.length)+"个字符"},loadingMore:function(){return"载入更多结果…"},maximumSelected:function(n){return"最多只能选择"+n.maximum+"个项目"},noResults:function(){return"未找到结果"},searching:function(){return"搜索中…"},removeAllItems:function(){return"删除所有项目"}}}),n.define,n.require}();
|
assets/select2/i18n/zh-TW.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.
|
2 |
|
3 |
-
|
1 |
+
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
|
3 |
+
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/zh-TW",[],function(){return{inputTooLong:function(n){return"請刪掉"+(n.input.length-n.maximum)+"個字元"},inputTooShort:function(n){return"請再輸入"+(n.minimum-n.input.length)+"個字元"},loadingMore:function(){return"載入中…"},maximumSelected:function(n){return"你只能選擇最多"+n.maximum+"項"},noResults:function(){return"沒有找到相符的項目"},searching:function(){return"搜尋中…"},removeAllItems:function(){return"刪除所有項目"}}}),n.define,n.require}();
|
assets/select2/select2.css
CHANGED
@@ -188,16 +188,13 @@
|
|
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;
|
@@ -216,7 +213,7 @@
|
|
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-
|
220 |
float: right; }
|
221 |
|
222 |
.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
|
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__clear {
|
192 |
cursor: pointer;
|
193 |
float: right;
|
194 |
font-weight: bold;
|
195 |
margin-top: 5px;
|
196 |
+
margin-right: 10px;
|
197 |
+
padding: 1px; }
|
198 |
.select2-container--default .select2-selection--multiple .select2-selection__choice {
|
199 |
background-color: #e4e4e4;
|
200 |
border: 1px solid #aaa;
|
213 |
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
|
214 |
color: #333; }
|
215 |
|
216 |
+
.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice, .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-search--inline {
|
217 |
float: right; }
|
218 |
|
219 |
.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
|
assets/select2/select2.full.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
/*!
|
2 |
-
* Select2 4.0.
|
3 |
* https://select2.github.io
|
4 |
*
|
5 |
* Released under the MIT license
|
@@ -777,9 +777,9 @@ S2.define('select2/utils',[
|
|
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');
|
@@ -798,7 +798,7 @@ S2.define('select2/utils',[
|
|
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] = {};
|
@@ -809,19 +809,20 @@ S2.define('select2/utils',[
|
|
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 |
-
|
819 |
-
|
820 |
-
|
|
|
821 |
}
|
822 |
return $(element).data(name); // Fallback to HTML5 data attribs.
|
823 |
} else {
|
824 |
-
return Utils.__cache[id];
|
825 |
}
|
826 |
};
|
827 |
|
@@ -831,6 +832,8 @@ S2.define('select2/utils',[
|
|
831 |
if (Utils.__cache[id] != null) {
|
832 |
delete Utils.__cache[id];
|
833 |
}
|
|
|
|
|
834 |
};
|
835 |
|
836 |
return Utils;
|
@@ -852,7 +855,7 @@ S2.define('select2/results',[
|
|
852 |
|
853 |
Results.prototype.render = function () {
|
854 |
var $results = $(
|
855 |
-
'<ul class="select2-results__options" role="
|
856 |
);
|
857 |
|
858 |
if (this.options.get('multiple')) {
|
@@ -875,7 +878,7 @@ S2.define('select2/results',[
|
|
875 |
this.hideLoading();
|
876 |
|
877 |
var $message = $(
|
878 |
-
'<li role="
|
879 |
' class="select2-results__option"></li>'
|
880 |
);
|
881 |
|
@@ -1009,11 +1012,16 @@ S2.define('select2/results',[
|
|
1009 |
option.className = 'select2-results__option';
|
1010 |
|
1011 |
var attrs = {
|
1012 |
-
'role': '
|
1013 |
'aria-selected': 'false'
|
1014 |
};
|
1015 |
|
1016 |
-
|
|
|
|
|
|
|
|
|
|
|
1017 |
delete attrs['aria-selected'];
|
1018 |
attrs['aria-disabled'] = 'true';
|
1019 |
}
|
@@ -1114,7 +1122,10 @@ S2.define('select2/results',[
|
|
1114 |
}
|
1115 |
|
1116 |
self.setClasses();
|
1117 |
-
|
|
|
|
|
|
|
1118 |
});
|
1119 |
|
1120 |
container.on('unselect', function () {
|
@@ -1123,7 +1134,10 @@ S2.define('select2/results',[
|
|
1123 |
}
|
1124 |
|
1125 |
self.setClasses();
|
1126 |
-
|
|
|
|
|
|
|
1127 |
});
|
1128 |
|
1129 |
container.on('open', function () {
|
@@ -1177,7 +1191,7 @@ S2.define('select2/results',[
|
|
1177 |
|
1178 |
var currentIndex = $options.index($highlighted);
|
1179 |
|
1180 |
-
// If we are already at
|
1181 |
// If no options, currentIndex will be -1
|
1182 |
if (currentIndex <= 0) {
|
1183 |
return;
|
@@ -1418,6 +1432,7 @@ S2.define('select2/selection/base',[
|
|
1418 |
|
1419 |
$selection.attr('title', this.$element.attr('title'));
|
1420 |
$selection.attr('tabindex', this._tabindex);
|
|
|
1421 |
|
1422 |
this.$selection = $selection;
|
1423 |
|
@@ -1427,7 +1442,6 @@ S2.define('select2/selection/base',[
|
|
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;
|
@@ -1470,20 +1484,19 @@ S2.define('select2/selection/base',[
|
|
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 |
|
@@ -1506,7 +1519,6 @@ S2.define('select2/selection/base',[
|
|
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);
|
@@ -1516,8 +1528,6 @@ S2.define('select2/selection/base',[
|
|
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 |
}
|
@@ -1546,6 +1556,27 @@ S2.define('select2/selection/base',[
|
|
1546 |
throw new Error('The `update` method must be defined in child classes.');
|
1547 |
};
|
1548 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1549 |
return BaseSelection;
|
1550 |
});
|
1551 |
|
@@ -1610,7 +1641,7 @@ S2.define('select2/selection/single',[
|
|
1610 |
|
1611 |
container.on('focus', function (evt) {
|
1612 |
if (!container.isOpen()) {
|
1613 |
-
self.$selection.focus
|
1614 |
}
|
1615 |
});
|
1616 |
};
|
@@ -1644,7 +1675,14 @@ S2.define('select2/selection/single',[
|
|
1644 |
var formatted = this.display(selection, $rendered);
|
1645 |
|
1646 |
$rendered.empty().append(formatted);
|
1647 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1648 |
};
|
1649 |
|
1650 |
return SingleSelection;
|
@@ -1689,7 +1727,7 @@ S2.define('select2/selection/multiple',[
|
|
1689 |
'.select2-selection__choice__remove',
|
1690 |
function (evt) {
|
1691 |
// Ignore the event if it is disabled
|
1692 |
-
if (self.
|
1693 |
return;
|
1694 |
}
|
1695 |
|
@@ -1747,7 +1785,12 @@ S2.define('select2/selection/multiple',[
|
|
1747 |
var formatted = this.display(selection, $selection);
|
1748 |
|
1749 |
$selection.append(formatted);
|
1750 |
-
|
|
|
|
|
|
|
|
|
|
|
1751 |
|
1752 |
Utils.StoreData($selection[0], 'data', selection);
|
1753 |
|
@@ -1845,7 +1888,7 @@ S2.define('select2/selection/allowClear',[
|
|
1845 |
|
1846 |
AllowClear.prototype._handleClear = function (_, evt) {
|
1847 |
// Ignore the event if it is disabled
|
1848 |
-
if (this.
|
1849 |
return;
|
1850 |
}
|
1851 |
|
@@ -1888,7 +1931,7 @@ S2.define('select2/selection/allowClear',[
|
|
1888 |
}
|
1889 |
}
|
1890 |
|
1891 |
-
this.$element.trigger('change');
|
1892 |
|
1893 |
this.trigger('toggle', {});
|
1894 |
};
|
@@ -1911,8 +1954,10 @@ S2.define('select2/selection/allowClear',[
|
|
1911 |
return;
|
1912 |
}
|
1913 |
|
|
|
|
|
1914 |
var $remove = $(
|
1915 |
-
'<span class="select2-selection__clear">' +
|
1916 |
'×' +
|
1917 |
'</span>'
|
1918 |
);
|
@@ -1938,7 +1983,7 @@ S2.define('select2/selection/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="
|
1942 |
'</li>'
|
1943 |
);
|
1944 |
|
@@ -1955,14 +2000,18 @@ S2.define('select2/selection/search',[
|
|
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 |
});
|
@@ -1982,7 +2031,11 @@ S2.define('select2/selection/search',[
|
|
1982 |
});
|
1983 |
|
1984 |
container.on('results:focus', function (params) {
|
1985 |
-
|
|
|
|
|
|
|
|
|
1986 |
});
|
1987 |
|
1988 |
this.$selection.on('focusin', '.select2-search--inline', function (evt) {
|
@@ -2016,6 +2069,12 @@ S2.define('select2/selection/search',[
|
|
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.
|
@@ -2101,13 +2160,7 @@ S2.define('select2/selection/search',[
|
|
2101 |
|
2102 |
this.resizeSearch();
|
2103 |
if (searchHadFocus) {
|
2104 |
-
|
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 |
|
@@ -2140,7 +2193,7 @@ S2.define('select2/selection/search',[
|
|
2140 |
var width = '';
|
2141 |
|
2142 |
if (this.$search.attr('placeholder') !== '') {
|
2143 |
-
width = this.$selection.find('.select2-selection__rendered').
|
2144 |
} else {
|
2145 |
var minimumWidth = this.$search.val().length + 1;
|
2146 |
|
@@ -2503,6 +2556,7 @@ S2.define('select2/diacritics',[
|
|
2503 |
'\u019F': 'O',
|
2504 |
'\uA74A': 'O',
|
2505 |
'\uA74C': 'O',
|
|
|
2506 |
'\u01A2': 'OI',
|
2507 |
'\uA74E': 'OO',
|
2508 |
'\u0222': 'OU',
|
@@ -2912,6 +2966,7 @@ S2.define('select2/diacritics',[
|
|
2912 |
'\uA74B': 'o',
|
2913 |
'\uA74D': 'o',
|
2914 |
'\u0275': 'o',
|
|
|
2915 |
'\u01A3': 'oi',
|
2916 |
'\u0223': 'ou',
|
2917 |
'\uA74F': 'oo',
|
@@ -3080,8 +3135,9 @@ S2.define('select2/diacritics',[
|
|
3080 |
'\u03CD': '\u03C5',
|
3081 |
'\u03CB': '\u03C5',
|
3082 |
'\u03B0': '\u03C5',
|
3083 |
-
'\
|
3084 |
-
'\u03C2': '\u03C3'
|
|
|
3085 |
};
|
3086 |
|
3087 |
return diacritics;
|
@@ -3166,7 +3222,7 @@ S2.define('select2/data/select',[
|
|
3166 |
if ($(data.element).is('option')) {
|
3167 |
data.element.selected = true;
|
3168 |
|
3169 |
-
this.$element.trigger('change');
|
3170 |
|
3171 |
return;
|
3172 |
}
|
@@ -3187,13 +3243,13 @@ S2.define('select2/data/select',[
|
|
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 |
|
@@ -3209,7 +3265,7 @@ S2.define('select2/data/select',[
|
|
3209 |
if ($(data.element).is('option')) {
|
3210 |
data.element.selected = false;
|
3211 |
|
3212 |
-
this.$element.trigger('change');
|
3213 |
|
3214 |
return;
|
3215 |
}
|
@@ -3227,7 +3283,7 @@ S2.define('select2/data/select',[
|
|
3227 |
|
3228 |
self.$element.val(val);
|
3229 |
|
3230 |
-
self.$element.trigger('change');
|
3231 |
});
|
3232 |
};
|
3233 |
|
@@ -3420,15 +3476,19 @@ S2.define('select2/data/array',[
|
|
3420 |
'jquery'
|
3421 |
], function (SelectAdapter, Utils, $) {
|
3422 |
function ArrayAdapter ($element, options) {
|
3423 |
-
|
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();
|
@@ -3718,8 +3778,6 @@ S2.define('select2/data/tags',[
|
|
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 () {
|
@@ -3794,7 +3852,7 @@ S2.define('select2/data/tokenizer',[
|
|
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;
|
@@ -3923,10 +3981,30 @@ S2.define('select2/data/maximumSelectionLength',[
|
|
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 &&
|
@@ -3939,7 +4017,10 @@ S2.define('select2/data/maximumSelectionLength',[
|
|
3939 |
});
|
3940 |
return;
|
3941 |
}
|
3942 |
-
|
|
|
|
|
|
|
3943 |
});
|
3944 |
};
|
3945 |
|
@@ -3978,7 +4059,7 @@ S2.define('select2/dropdown',[
|
|
3978 |
};
|
3979 |
|
3980 |
Dropdown.prototype.position = function ($dropdown, $container) {
|
3981 |
-
// Should be
|
3982 |
};
|
3983 |
|
3984 |
Dropdown.prototype.destroy = function () {
|
@@ -4002,7 +4083,7 @@ S2.define('select2/dropdown/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="
|
4006 |
'</span>'
|
4007 |
);
|
4008 |
|
@@ -4017,6 +4098,8 @@ S2.define('select2/dropdown/search',[
|
|
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) {
|
@@ -4039,24 +4122,27 @@ S2.define('select2/dropdown/search',[
|
|
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 |
|
@@ -4071,6 +4157,14 @@ S2.define('select2/dropdown/search',[
|
|
4071 |
}
|
4072 |
}
|
4073 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4074 |
};
|
4075 |
|
4076 |
Search.prototype.handleSearch = function (evt) {
|
@@ -4155,6 +4249,7 @@ S2.define('select2/dropdown/infiniteScroll',[
|
|
4155 |
|
4156 |
if (this.showLoadingMore(data)) {
|
4157 |
this.$results.append(this.$loadingMore);
|
|
|
4158 |
}
|
4159 |
};
|
4160 |
|
@@ -4173,25 +4268,27 @@ S2.define('select2/dropdown/infiniteScroll',[
|
|
4173 |
self.loading = true;
|
4174 |
});
|
4175 |
|
4176 |
-
this.$results.on('scroll',
|
4177 |
-
|
4178 |
-
document.documentElement,
|
4179 |
-
self.$loadingMore[0]
|
4180 |
-
);
|
4181 |
|
4182 |
-
|
4183 |
-
|
4184 |
-
|
|
|
|
|
4185 |
|
4186 |
-
|
4187 |
-
|
4188 |
-
|
4189 |
-
self.$loadingMore.outerHeight(false);
|
4190 |
|
4191 |
-
|
4192 |
-
|
4193 |
-
|
4194 |
-
|
|
|
|
|
|
|
|
|
4195 |
};
|
4196 |
|
4197 |
InfiniteScroll.prototype.loadMore = function () {
|
@@ -4212,7 +4309,7 @@ S2.define('select2/dropdown/infiniteScroll',[
|
|
4212 |
var $option = $(
|
4213 |
'<li ' +
|
4214 |
'class="select2-results__option select2-results__option--load-more"' +
|
4215 |
-
'role="
|
4216 |
);
|
4217 |
|
4218 |
var message = this.options.get('translations').get('loadingMore');
|
@@ -4230,7 +4327,7 @@ S2.define('select2/dropdown/attachBody',[
|
|
4230 |
'../utils'
|
4231 |
], function ($, Utils) {
|
4232 |
function AttachBody (decorated, $element, options) {
|
4233 |
-
this.$dropdownParent = options.get('dropdownParent') ||
|
4234 |
|
4235 |
decorated.call(this, $element, options);
|
4236 |
}
|
@@ -4238,27 +4335,14 @@ S2.define('select2/dropdown/attachBody',[
|
|
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 |
-
|
4250 |
-
|
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 () {
|
@@ -4307,6 +4391,44 @@ S2.define('select2/dropdown/attachBody',[
|
|
4307 |
this.$dropdownContainer.detach();
|
4308 |
};
|
4309 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4310 |
AttachBody.prototype._attachPositioningHandler =
|
4311 |
function (decorated, container) {
|
4312 |
var self = this;
|
@@ -4383,16 +4505,26 @@ S2.define('select2/dropdown/attachBody',[
|
|
4383 |
top: container.bottom
|
4384 |
};
|
4385 |
|
4386 |
-
// Determine what the parent element is to use for
|
4387 |
var $offsetParent = this.$dropdownParent;
|
4388 |
|
4389 |
-
// For statically
|
4390 |
// that is determining the offset
|
4391 |
if ($offsetParent.css('position') === 'static') {
|
4392 |
$offsetParent = $offsetParent.offsetParent();
|
4393 |
}
|
4394 |
|
4395 |
-
var parentOffset =
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4396 |
|
4397 |
css.top -= parentOffset.top;
|
4398 |
css.left -= parentOffset.left;
|
@@ -4562,7 +4694,7 @@ S2.define('select2/dropdown/closeOnSelect',[
|
|
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 |
|
@@ -4616,6 +4748,9 @@ S2.define('select2/i18n/en',[],function () {
|
|
4616 |
},
|
4617 |
searching: function () {
|
4618 |
return 'Searching…';
|
|
|
|
|
|
|
4619 |
}
|
4620 |
};
|
4621 |
});
|
@@ -4854,66 +4989,29 @@ S2.define('select2/defaults',[
|
|
4854 |
);
|
4855 |
}
|
4856 |
|
4857 |
-
|
4858 |
-
|
4859 |
-
|
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 |
-
|
4871 |
-
|
4872 |
-
options.language.push('en');
|
4873 |
|
4874 |
-
|
4875 |
|
4876 |
-
|
4877 |
-
|
4878 |
-
var language = {};
|
4879 |
|
4880 |
-
|
4881 |
-
|
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 |
-
|
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 |
-
|
4916 |
-
|
|
|
|
|
4917 |
|
4918 |
return options;
|
4919 |
};
|
@@ -4980,13 +5078,14 @@ S2.define('select2/defaults',[
|
|
4980 |
debug: false,
|
4981 |
dropdownAutoWidth: false,
|
4982 |
escapeMarkup: Utils.escapeMarkup,
|
4983 |
-
language:
|
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 |
},
|
@@ -5001,6 +5100,103 @@ S2.define('select2/defaults',[
|
|
5001 |
};
|
5002 |
};
|
5003 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5004 |
Defaults.prototype.set = function (key, value) {
|
5005 |
var camelKey = $.camelCase(key);
|
5006 |
|
@@ -5030,6 +5226,10 @@ S2.define('select2/options',[
|
|
5030 |
this.fromElement($element);
|
5031 |
}
|
5032 |
|
|
|
|
|
|
|
|
|
5033 |
this.options = Defaults.apply(this.options);
|
5034 |
|
5035 |
if ($element && $element.is('input')) {
|
@@ -5053,14 +5253,6 @@ S2.define('select2/options',[
|
|
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');
|
@@ -5098,20 +5290,43 @@ S2.define('select2/options',[
|
|
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,
|
5110 |
-
} else {
|
5111 |
-
dataset = Utils.GetData($e[0]);
|
5112 |
}
|
5113 |
|
5114 |
-
|
|
|
5115 |
|
5116 |
data = Utils._convertData(data);
|
5117 |
|
@@ -5305,6 +5520,12 @@ S2.define('select2/core',[
|
|
5305 |
return null;
|
5306 |
}
|
5307 |
|
|
|
|
|
|
|
|
|
|
|
|
|
5308 |
return method;
|
5309 |
};
|
5310 |
|
@@ -5345,8 +5566,8 @@ S2.define('select2/core',[
|
|
5345 |
|
5346 |
if (observer != null) {
|
5347 |
this._observer = new observer(function (mutations) {
|
5348 |
-
|
5349 |
-
|
5350 |
});
|
5351 |
this._observer.observe(this.$element[0], {
|
5352 |
attributes: true,
|
@@ -5468,7 +5689,7 @@ S2.define('select2/core',[
|
|
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) {
|
@@ -5502,7 +5723,7 @@ S2.define('select2/core',[
|
|
5502 |
Select2.prototype._syncAttributes = function () {
|
5503 |
this.options.set('disabled', this.$element.prop('disabled'));
|
5504 |
|
5505 |
-
if (this.
|
5506 |
if (this.isOpen()) {
|
5507 |
this.close();
|
5508 |
}
|
@@ -5513,7 +5734,7 @@ S2.define('select2/core',[
|
|
5513 |
}
|
5514 |
};
|
5515 |
|
5516 |
-
Select2.prototype.
|
5517 |
var changed = false;
|
5518 |
var self = this;
|
5519 |
|
@@ -5541,7 +5762,22 @@ S2.define('select2/core',[
|
|
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) {
|
@@ -5592,7 +5828,7 @@ S2.define('select2/core',[
|
|
5592 |
};
|
5593 |
|
5594 |
Select2.prototype.toggleDropdown = function () {
|
5595 |
-
if (this.
|
5596 |
return;
|
5597 |
}
|
5598 |
|
@@ -5608,15 +5844,40 @@ S2.define('select2/core',[
|
|
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 () {
|
@@ -5693,7 +5954,7 @@ S2.define('select2/core',[
|
|
5693 |
});
|
5694 |
}
|
5695 |
|
5696 |
-
this.$element.val(newVal).trigger('change');
|
5697 |
};
|
5698 |
|
5699 |
Select2.prototype.destroy = function () {
|
@@ -6028,13 +6289,13 @@ S2.define('select2/compat/inputData',[
|
|
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 |
|
@@ -6057,7 +6318,7 @@ S2.define('select2/compat/inputData',[
|
|
6057 |
}
|
6058 |
|
6059 |
self.$element.val(values.join(self._valueSeparator));
|
6060 |
-
self.$element.trigger('change');
|
6061 |
});
|
6062 |
};
|
6063 |
|
1 |
/*!
|
2 |
+
* Select2 4.0.13
|
3 |
* https://select2.github.io
|
4 |
*
|
5 |
* Released under the MIT license
|
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');
|
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] = {};
|
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 |
+
if (Utils.__cache[id][name] != null) {
|
819 |
+
return Utils.__cache[id][name];
|
820 |
+
}
|
821 |
+
return $(element).data(name); // Fallback to HTML5 data attribs.
|
822 |
}
|
823 |
return $(element).data(name); // Fallback to HTML5 data attribs.
|
824 |
} else {
|
825 |
+
return Utils.__cache[id];
|
826 |
}
|
827 |
};
|
828 |
|
832 |
if (Utils.__cache[id] != null) {
|
833 |
delete Utils.__cache[id];
|
834 |
}
|
835 |
+
|
836 |
+
element.removeAttribute('data-select2-id');
|
837 |
};
|
838 |
|
839 |
return Utils;
|
855 |
|
856 |
Results.prototype.render = function () {
|
857 |
var $results = $(
|
858 |
+
'<ul class="select2-results__options" role="listbox"></ul>'
|
859 |
);
|
860 |
|
861 |
if (this.options.get('multiple')) {
|
878 |
this.hideLoading();
|
879 |
|
880 |
var $message = $(
|
881 |
+
'<li role="alert" aria-live="assertive"' +
|
882 |
' class="select2-results__option"></li>'
|
883 |
);
|
884 |
|
1012 |
option.className = 'select2-results__option';
|
1013 |
|
1014 |
var attrs = {
|
1015 |
+
'role': 'option',
|
1016 |
'aria-selected': 'false'
|
1017 |
};
|
1018 |
|
1019 |
+
var matches = window.Element.prototype.matches ||
|
1020 |
+
window.Element.prototype.msMatchesSelector ||
|
1021 |
+
window.Element.prototype.webkitMatchesSelector;
|
1022 |
+
|
1023 |
+
if ((data.element != null && matches.call(data.element, ':disabled')) ||
|
1024 |
+
(data.element == null && data.disabled)) {
|
1025 |
delete attrs['aria-selected'];
|
1026 |
attrs['aria-disabled'] = 'true';
|
1027 |
}
|
1122 |
}
|
1123 |
|
1124 |
self.setClasses();
|
1125 |
+
|
1126 |
+
if (self.options.get('scrollAfterSelect')) {
|
1127 |
+
self.highlightFirstItem();
|
1128 |
+
}
|
1129 |
});
|
1130 |
|
1131 |
container.on('unselect', function () {
|
1134 |
}
|
1135 |
|
1136 |
self.setClasses();
|
1137 |
+
|
1138 |
+
if (self.options.get('scrollAfterSelect')) {
|
1139 |
+
self.highlightFirstItem();
|
1140 |
+
}
|
1141 |
});
|
1142 |
|
1143 |
container.on('open', function () {
|
1191 |
|
1192 |
var currentIndex = $options.index($highlighted);
|
1193 |
|
1194 |
+
// If we are already at the top, don't move further
|
1195 |
// If no options, currentIndex will be -1
|
1196 |
if (currentIndex <= 0) {
|
1197 |
return;
|
1432 |
|
1433 |
$selection.attr('title', this.$element.attr('title'));
|
1434 |
$selection.attr('tabindex', this._tabindex);
|
1435 |
+
$selection.attr('aria-disabled', 'false');
|
1436 |
|
1437 |
this.$selection = $selection;
|
1438 |
|
1442 |
BaseSelection.prototype.bind = function (container, $container) {
|
1443 |
var self = this;
|
1444 |
|
|
|
1445 |
var resultsId = container.id + '-results';
|
1446 |
|
1447 |
this.container = container;
|
1484 |
self.$selection.removeAttr('aria-activedescendant');
|
1485 |
self.$selection.removeAttr('aria-owns');
|
1486 |
|
1487 |
+
self.$selection.trigger('focus');
|
|
|
|
|
|
|
1488 |
|
1489 |
self._detachCloseHandler(container);
|
1490 |
});
|
1491 |
|
1492 |
container.on('enable', function () {
|
1493 |
self.$selection.attr('tabindex', self._tabindex);
|
1494 |
+
self.$selection.attr('aria-disabled', 'false');
|
1495 |
});
|
1496 |
|
1497 |
container.on('disable', function () {
|
1498 |
self.$selection.attr('tabindex', '-1');
|
1499 |
+
self.$selection.attr('aria-disabled', 'true');
|
1500 |
});
|
1501 |
};
|
1502 |
|
1519 |
};
|
1520 |
|
1521 |
BaseSelection.prototype._attachCloseHandler = function (container) {
|
|
|
1522 |
|
1523 |
$(document.body).on('mousedown.select2.' + container.id, function (e) {
|
1524 |
var $target = $(e.target);
|
1528 |
var $all = $('.select2.select2-container--open');
|
1529 |
|
1530 |
$all.each(function () {
|
|
|
|
|
1531 |
if (this == $select[0]) {
|
1532 |
return;
|
1533 |
}
|
1556 |
throw new Error('The `update` method must be defined in child classes.');
|
1557 |
};
|
1558 |
|
1559 |
+
/**
|
1560 |
+
* Helper method to abstract the "enabled" (not "disabled") state of this
|
1561 |
+
* object.
|
1562 |
+
*
|
1563 |
+
* @return {true} if the instance is not disabled.
|
1564 |
+
* @return {false} if the instance is disabled.
|
1565 |
+
*/
|
1566 |
+
BaseSelection.prototype.isEnabled = function () {
|
1567 |
+
return !this.isDisabled();
|
1568 |
+
};
|
1569 |
+
|
1570 |
+
/**
|
1571 |
+
* Helper method to abstract the "disabled" state of this object.
|
1572 |
+
*
|
1573 |
+
* @return {true} if the disabled option is true.
|
1574 |
+
* @return {false} if the disabled option is false.
|
1575 |
+
*/
|
1576 |
+
BaseSelection.prototype.isDisabled = function () {
|
1577 |
+
return this.options.get('disabled');
|
1578 |
+
};
|
1579 |
+
|
1580 |
return BaseSelection;
|
1581 |
});
|
1582 |
|
1641 |
|
1642 |
container.on('focus', function (evt) {
|
1643 |
if (!container.isOpen()) {
|
1644 |
+
self.$selection.trigger('focus');
|
1645 |
}
|
1646 |
});
|
1647 |
};
|
1675 |
var formatted = this.display(selection, $rendered);
|
1676 |
|
1677 |
$rendered.empty().append(formatted);
|
1678 |
+
|
1679 |
+
var title = selection.title || selection.text;
|
1680 |
+
|
1681 |
+
if (title) {
|
1682 |
+
$rendered.attr('title', title);
|
1683 |
+
} else {
|
1684 |
+
$rendered.removeAttr('title');
|
1685 |
+
}
|
1686 |
};
|
1687 |
|
1688 |
return SingleSelection;
|
1727 |
'.select2-selection__choice__remove',
|
1728 |
function (evt) {
|
1729 |
// Ignore the event if it is disabled
|
1730 |
+
if (self.isDisabled()) {
|
1731 |
return;
|
1732 |
}
|
1733 |
|
1785 |
var formatted = this.display(selection, $selection);
|
1786 |
|
1787 |
$selection.append(formatted);
|
1788 |
+
|
1789 |
+
var title = selection.title || selection.text;
|
1790 |
+
|
1791 |
+
if (title) {
|
1792 |
+
$selection.attr('title', title);
|
1793 |
+
}
|
1794 |
|
1795 |
Utils.StoreData($selection[0], 'data', selection);
|
1796 |
|
1888 |
|
1889 |
AllowClear.prototype._handleClear = function (_, evt) {
|
1890 |
// Ignore the event if it is disabled
|
1891 |
+
if (this.isDisabled()) {
|
1892 |
return;
|
1893 |
}
|
1894 |
|
1931 |
}
|
1932 |
}
|
1933 |
|
1934 |
+
this.$element.trigger('input').trigger('change');
|
1935 |
|
1936 |
this.trigger('toggle', {});
|
1937 |
};
|
1954 |
return;
|
1955 |
}
|
1956 |
|
1957 |
+
var removeAll = this.options.get('translations').get('removeAllItems');
|
1958 |
+
|
1959 |
var $remove = $(
|
1960 |
+
'<span class="select2-selection__clear" title="' + removeAll() +'">' +
|
1961 |
'×' +
|
1962 |
'</span>'
|
1963 |
);
|
1983 |
'<li class="select2-search select2-search--inline">' +
|
1984 |
'<input class="select2-search__field" type="search" tabindex="-1"' +
|
1985 |
' autocomplete="off" autocorrect="off" autocapitalize="none"' +
|
1986 |
+
' spellcheck="false" role="searchbox" aria-autocomplete="list" />' +
|
1987 |
'</li>'
|
1988 |
);
|
1989 |
|
2000 |
Search.prototype.bind = function (decorated, container, $container) {
|
2001 |
var self = this;
|
2002 |
|
2003 |
+
var resultsId = container.id + '-results';
|
2004 |
+
|
2005 |
decorated.call(this, container, $container);
|
2006 |
|
2007 |
container.on('open', function () {
|
2008 |
+
self.$search.attr('aria-controls', resultsId);
|
2009 |
self.$search.trigger('focus');
|
2010 |
});
|
2011 |
|
2012 |
container.on('close', function () {
|
2013 |
self.$search.val('');
|
2014 |
+
self.$search.removeAttr('aria-controls');
|
2015 |
self.$search.removeAttr('aria-activedescendant');
|
2016 |
self.$search.trigger('focus');
|
2017 |
});
|
2031 |
});
|
2032 |
|
2033 |
container.on('results:focus', function (params) {
|
2034 |
+
if (params.data._resultId) {
|
2035 |
+
self.$search.attr('aria-activedescendant', params.data._resultId);
|
2036 |
+
} else {
|
2037 |
+
self.$search.removeAttr('aria-activedescendant');
|
2038 |
+
}
|
2039 |
});
|
2040 |
|
2041 |
this.$selection.on('focusin', '.select2-search--inline', function (evt) {
|
2069 |
}
|
2070 |
});
|
2071 |
|
2072 |
+
this.$selection.on('click', '.select2-search--inline', function (evt) {
|
2073 |
+
if (self.$search.val()) {
|
2074 |
+
evt.stopPropagation();
|
2075 |
+
}
|
2076 |
+
});
|
2077 |
+
|
2078 |
// Try to detect the IE version should the `documentMode` property that
|
2079 |
// is stored on the document. This is only implemented in IE and is
|
2080 |
// slightly cleaner than doing a user agent check.
|
2160 |
|
2161 |
this.resizeSearch();
|
2162 |
if (searchHadFocus) {
|
2163 |
+
this.$search.trigger('focus');
|
|
|
|
|
|
|
|
|
|
|
|
|
2164 |
}
|
2165 |
};
|
2166 |
|
2193 |
var width = '';
|
2194 |
|
2195 |
if (this.$search.attr('placeholder') !== '') {
|
2196 |
+
width = this.$selection.find('.select2-selection__rendered').width();
|
2197 |
} else {
|
2198 |
var minimumWidth = this.$search.val().length + 1;
|
2199 |
|
2556 |
'\u019F': 'O',
|
2557 |
'\uA74A': 'O',
|
2558 |
'\uA74C': 'O',
|
2559 |
+
'\u0152': 'OE',
|
2560 |
'\u01A2': 'OI',
|
2561 |
'\uA74E': 'OO',
|
2562 |
'\u0222': 'OU',
|
2966 |
'\uA74B': 'o',
|
2967 |
'\uA74D': 'o',
|
2968 |
'\u0275': 'o',
|
2969 |
+
'\u0153': 'oe',
|
2970 |
'\u01A3': 'oi',
|
2971 |
'\u0223': 'ou',
|
2972 |
'\uA74F': 'oo',
|
3135 |
'\u03CD': '\u03C5',
|
3136 |
'\u03CB': '\u03C5',
|
3137 |
'\u03B0': '\u03C5',
|
3138 |
+
'\u03CE': '\u03C9',
|
3139 |
+
'\u03C2': '\u03C3',
|
3140 |
+
'\u2019': '\''
|
3141 |
};
|
3142 |
|
3143 |
return diacritics;
|
3222 |
if ($(data.element).is('option')) {
|
3223 |
data.element.selected = true;
|
3224 |
|
3225 |
+
this.$element.trigger('input').trigger('change');
|
3226 |
|
3227 |
return;
|
3228 |
}
|
3243 |
}
|
3244 |
|
3245 |
self.$element.val(val);
|
3246 |
+
self.$element.trigger('input').trigger('change');
|
3247 |
});
|
3248 |
} else {
|
3249 |
var val = data.id;
|
3250 |
|
3251 |
this.$element.val(val);
|
3252 |
+
this.$element.trigger('input').trigger('change');
|
3253 |
}
|
3254 |
};
|
3255 |
|
3265 |
if ($(data.element).is('option')) {
|
3266 |
data.element.selected = false;
|
3267 |
|
3268 |
+
this.$element.trigger('input').trigger('change');
|
3269 |
|
3270 |
return;
|
3271 |
}
|
3283 |
|
3284 |
self.$element.val(val);
|
3285 |
|
3286 |
+
self.$element.trigger('input').trigger('change');
|
3287 |
});
|
3288 |
};
|
3289 |
|
3476 |
'jquery'
|
3477 |
], function (SelectAdapter, Utils, $) {
|
3478 |
function ArrayAdapter ($element, options) {
|
3479 |
+
this._dataToConvert = options.get('data') || [];
|
3480 |
|
3481 |
ArrayAdapter.__super__.constructor.call(this, $element, options);
|
|
|
|
|
3482 |
}
|
3483 |
|
3484 |
Utils.Extend(ArrayAdapter, SelectAdapter);
|
3485 |
|
3486 |
+
ArrayAdapter.prototype.bind = function (container, $container) {
|
3487 |
+
ArrayAdapter.__super__.bind.call(this, container, $container);
|
3488 |
+
|
3489 |
+
this.addOptions(this.convertToOptions(this._dataToConvert));
|
3490 |
+
};
|
3491 |
+
|
3492 |
ArrayAdapter.prototype.select = function (data) {
|
3493 |
var $option = this.$element.find('option').filter(function (i, elm) {
|
3494 |
return elm.value == data.id.toString();
|
3778 |
};
|
3779 |
|
3780 |
Tags.prototype._removeOldTags = function (_) {
|
|
|
|
|
3781 |
var $options = this.$element.find('option[data-select2-tag]');
|
3782 |
|
3783 |
$options.each(function () {
|
3852 |
// Replace the search term if we have the search box
|
3853 |
if (this.$search.length) {
|
3854 |
this.$search.val(tokenData.term);
|
3855 |
+
this.$search.trigger('focus');
|
3856 |
}
|
3857 |
|
3858 |
params.term = tokenData.term;
|
3981 |
decorated.call(this, $e, options);
|
3982 |
}
|
3983 |
|
3984 |
+
MaximumSelectionLength.prototype.bind =
|
3985 |
+
function (decorated, container, $container) {
|
3986 |
+
var self = this;
|
3987 |
+
|
3988 |
+
decorated.call(this, container, $container);
|
3989 |
+
|
3990 |
+
container.on('select', function () {
|
3991 |
+
self._checkIfMaximumSelected();
|
3992 |
+
});
|
3993 |
+
};
|
3994 |
+
|
3995 |
MaximumSelectionLength.prototype.query =
|
3996 |
function (decorated, params, callback) {
|
3997 |
var self = this;
|
3998 |
|
3999 |
+
this._checkIfMaximumSelected(function () {
|
4000 |
+
decorated.call(self, params, callback);
|
4001 |
+
});
|
4002 |
+
};
|
4003 |
+
|
4004 |
+
MaximumSelectionLength.prototype._checkIfMaximumSelected =
|
4005 |
+
function (_, successCallback) {
|
4006 |
+
var self = this;
|
4007 |
+
|
4008 |
this.current(function (currentData) {
|
4009 |
var count = currentData != null ? currentData.length : 0;
|
4010 |
if (self.maximumSelectionLength > 0 &&
|
4017 |
});
|
4018 |
return;
|
4019 |
}
|
4020 |
+
|
4021 |
+
if (successCallback) {
|
4022 |
+
successCallback();
|
4023 |
+
}
|
4024 |
});
|
4025 |
};
|
4026 |
|
4059 |
};
|
4060 |
|
4061 |
Dropdown.prototype.position = function ($dropdown, $container) {
|
4062 |
+
// Should be implemented in subclasses
|
4063 |
};
|
4064 |
|
4065 |
Dropdown.prototype.destroy = function () {
|
4083 |
'<span class="select2-search select2-search--dropdown">' +
|
4084 |
'<input class="select2-search__field" type="search" tabindex="-1"' +
|
4085 |
' autocomplete="off" autocorrect="off" autocapitalize="none"' +
|
4086 |
+
' spellcheck="false" role="searchbox" aria-autocomplete="list" />' +
|
4087 |
'</span>'
|
4088 |
);
|
4089 |
|
4098 |
Search.prototype.bind = function (decorated, container, $container) {
|
4099 |
var self = this;
|
4100 |
|
4101 |
+
var resultsId = container.id + '-results';
|
4102 |
+
|
4103 |
decorated.call(this, container, $container);
|
4104 |
|
4105 |
this.$search.on('keydown', function (evt) {
|
4122 |
|
4123 |
container.on('open', function () {
|
4124 |
self.$search.attr('tabindex', 0);
|
4125 |
+
self.$search.attr('aria-controls', resultsId);
|
4126 |
|
4127 |
+
self.$search.trigger('focus');
|
4128 |
|
4129 |
window.setTimeout(function () {
|
4130 |
+
self.$search.trigger('focus');
|
4131 |
}, 0);
|
4132 |
});
|
4133 |
|
4134 |
container.on('close', function () {
|
4135 |
self.$search.attr('tabindex', -1);
|
4136 |
+
self.$search.removeAttr('aria-controls');
|
4137 |
+
self.$search.removeAttr('aria-activedescendant');
|
4138 |
|
4139 |
self.$search.val('');
|
4140 |
+
self.$search.trigger('blur');
|
4141 |
});
|
4142 |
|
4143 |
container.on('focus', function () {
|
4144 |
if (!container.isOpen()) {
|
4145 |
+
self.$search.trigger('focus');
|
4146 |
}
|
4147 |
});
|
4148 |
|
4157 |
}
|
4158 |
}
|
4159 |
});
|
4160 |
+
|
4161 |
+
container.on('results:focus', function (params) {
|
4162 |
+
if (params.data._resultId) {
|
4163 |
+
self.$search.attr('aria-activedescendant', params.data._resultId);
|
4164 |
+
} else {
|
4165 |
+
self.$search.removeAttr('aria-activedescendant');
|
4166 |
+
}
|
4167 |
+
});
|
4168 |
};
|
4169 |
|
4170 |
Search.prototype.handleSearch = function (evt) {
|
4249 |
|
4250 |
if (this.showLoadingMore(data)) {
|
4251 |
this.$results.append(this.$loadingMore);
|
4252 |
+
this.loadMoreIfNeeded();
|
4253 |
}
|
4254 |
};
|
4255 |
|
4268 |
self.loading = true;
|
4269 |
});
|
4270 |
|
4271 |
+
this.$results.on('scroll', this.loadMoreIfNeeded.bind(this));
|
4272 |
+
};
|
|
|
|
|
|
|
4273 |
|
4274 |
+
InfiniteScroll.prototype.loadMoreIfNeeded = function () {
|
4275 |
+
var isLoadMoreVisible = $.contains(
|
4276 |
+
document.documentElement,
|
4277 |
+
this.$loadingMore[0]
|
4278 |
+
);
|
4279 |
|
4280 |
+
if (this.loading || !isLoadMoreVisible) {
|
4281 |
+
return;
|
4282 |
+
}
|
|
|
4283 |
|
4284 |
+
var currentOffset = this.$results.offset().top +
|
4285 |
+
this.$results.outerHeight(false);
|
4286 |
+
var loadingMoreOffset = this.$loadingMore.offset().top +
|
4287 |
+
this.$loadingMore.outerHeight(false);
|
4288 |
+
|
4289 |
+
if (currentOffset + 50 >= loadingMoreOffset) {
|
4290 |
+
this.loadMore();
|
4291 |
+
}
|
4292 |
};
|
4293 |
|
4294 |
InfiniteScroll.prototype.loadMore = function () {
|
4309 |
var $option = $(
|
4310 |
'<li ' +
|
4311 |
'class="select2-results__option select2-results__option--load-more"' +
|
4312 |
+
'role="option" aria-disabled="true"></li>'
|
4313 |
);
|
4314 |
|
4315 |
var message = this.options.get('translations').get('loadingMore');
|
4327 |
'../utils'
|
4328 |
], function ($, Utils) {
|
4329 |
function AttachBody (decorated, $element, options) {
|
4330 |
+
this.$dropdownParent = $(options.get('dropdownParent') || document.body);
|
4331 |
|
4332 |
decorated.call(this, $element, options);
|
4333 |
}
|
4335 |
AttachBody.prototype.bind = function (decorated, container, $container) {
|
4336 |
var self = this;
|
4337 |
|
|
|
|
|
4338 |
decorated.call(this, container, $container);
|
4339 |
|
4340 |
container.on('open', function () {
|
4341 |
self._showDropdown();
|
4342 |
self._attachPositioningHandler(container);
|
4343 |
|
4344 |
+
// Must bind after the results handlers to ensure correct sizing
|
4345 |
+
self._bindContainerResultHandlers(container);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4346 |
});
|
4347 |
|
4348 |
container.on('close', function () {
|
4391 |
this.$dropdownContainer.detach();
|
4392 |
};
|
4393 |
|
4394 |
+
AttachBody.prototype._bindContainerResultHandlers =
|
4395 |
+
function (decorated, container) {
|
4396 |
+
|
4397 |
+
// These should only be bound once
|
4398 |
+
if (this._containerResultsHandlersBound) {
|
4399 |
+
return;
|
4400 |
+
}
|
4401 |
+
|
4402 |
+
var self = this;
|
4403 |
+
|
4404 |
+
container.on('results:all', function () {
|
4405 |
+
self._positionDropdown();
|
4406 |
+
self._resizeDropdown();
|
4407 |
+
});
|
4408 |
+
|
4409 |
+
container.on('results:append', function () {
|
4410 |
+
self._positionDropdown();
|
4411 |
+
self._resizeDropdown();
|
4412 |
+
});
|
4413 |
+
|
4414 |
+
container.on('results:message', function () {
|
4415 |
+
self._positionDropdown();
|
4416 |
+
self._resizeDropdown();
|
4417 |
+
});
|
4418 |
+
|
4419 |
+
container.on('select', function () {
|
4420 |
+
self._positionDropdown();
|
4421 |
+
self._resizeDropdown();
|
4422 |
+
});
|
4423 |
+
|
4424 |
+
container.on('unselect', function () {
|
4425 |
+
self._positionDropdown();
|
4426 |
+
self._resizeDropdown();
|
4427 |
+
});
|
4428 |
+
|
4429 |
+
this._containerResultsHandlersBound = true;
|
4430 |
+
};
|
4431 |
+
|
4432 |
AttachBody.prototype._attachPositioningHandler =
|
4433 |
function (decorated, container) {
|
4434 |
var self = this;
|
4505 |
top: container.bottom
|
4506 |
};
|
4507 |
|
4508 |
+
// Determine what the parent element is to use for calculating the offset
|
4509 |
var $offsetParent = this.$dropdownParent;
|
4510 |
|
4511 |
+
// For statically positioned elements, we need to get the element
|
4512 |
// that is determining the offset
|
4513 |
if ($offsetParent.css('position') === 'static') {
|
4514 |
$offsetParent = $offsetParent.offsetParent();
|
4515 |
}
|
4516 |
|
4517 |
+
var parentOffset = {
|
4518 |
+
top: 0,
|
4519 |
+
left: 0
|
4520 |
+
};
|
4521 |
+
|
4522 |
+
if (
|
4523 |
+
$.contains(document.body, $offsetParent[0]) ||
|
4524 |
+
$offsetParent[0].isConnected
|
4525 |
+
) {
|
4526 |
+
parentOffset = $offsetParent.offset();
|
4527 |
+
}
|
4528 |
|
4529 |
css.top -= parentOffset.top;
|
4530 |
css.left -= parentOffset.left;
|
4694 |
var originalEvent = evt.originalEvent;
|
4695 |
|
4696 |
// Don't close if the control key is being held
|
4697 |
+
if (originalEvent && (originalEvent.ctrlKey || originalEvent.metaKey)) {
|
4698 |
return;
|
4699 |
}
|
4700 |
|
4748 |
},
|
4749 |
searching: function () {
|
4750 |
return 'Searching…';
|
4751 |
+
},
|
4752 |
+
removeAllItems: function () {
|
4753 |
+
return 'Remove all items';
|
4754 |
}
|
4755 |
};
|
4756 |
});
|
4989 |
);
|
4990 |
}
|
4991 |
|
4992 |
+
// If the defaults were not previously applied from an element, it is
|
4993 |
+
// possible for the language option to have not been resolved
|
4994 |
+
options.language = this._resolveLanguage(options.language);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4995 |
|
4996 |
+
// Always fall back to English since it will always be complete
|
4997 |
+
options.language.push('en');
|
|
|
4998 |
|
4999 |
+
var uniqueLanguages = [];
|
5000 |
|
5001 |
+
for (var l = 0; l < options.language.length; l++) {
|
5002 |
+
var language = options.language[l];
|
|
|
5003 |
|
5004 |
+
if (uniqueLanguages.indexOf(language) === -1) {
|
5005 |
+
uniqueLanguages.push(language);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5006 |
}
|
5007 |
+
}
|
5008 |
|
5009 |
+
options.language = uniqueLanguages;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5010 |
|
5011 |
+
options.translations = this._processTranslations(
|
5012 |
+
options.language,
|
5013 |
+
options.debug
|
5014 |
+
);
|
5015 |
|
5016 |
return options;
|
5017 |
};
|
5078 |
debug: false,
|
5079 |
dropdownAutoWidth: false,
|
5080 |
escapeMarkup: Utils.escapeMarkup,
|
5081 |
+
language: {},
|
5082 |
matcher: matcher,
|
5083 |
minimumInputLength: 0,
|
5084 |
maximumInputLength: 0,
|
5085 |
maximumSelectionLength: 0,
|
5086 |
minimumResultsForSearch: 0,
|
5087 |
selectOnClose: false,
|
5088 |
+
scrollAfterSelect: false,
|
5089 |
sorter: function (data) {
|
5090 |
return data;
|
5091 |
},
|
5100 |
};
|
5101 |
};
|
5102 |
|
5103 |
+
Defaults.prototype.applyFromElement = function (options, $element) {
|
5104 |
+
var optionLanguage = options.language;
|
5105 |
+
var defaultLanguage = this.defaults.language;
|
5106 |
+
var elementLanguage = $element.prop('lang');
|
5107 |
+
var parentLanguage = $element.closest('[lang]').prop('lang');
|
5108 |
+
|
5109 |
+
var languages = Array.prototype.concat.call(
|
5110 |
+
this._resolveLanguage(elementLanguage),
|
5111 |
+
this._resolveLanguage(optionLanguage),
|
5112 |
+
this._resolveLanguage(defaultLanguage),
|
5113 |
+
this._resolveLanguage(parentLanguage)
|
5114 |
+
);
|
5115 |
+
|
5116 |
+
options.language = languages;
|
5117 |
+
|
5118 |
+
return options;
|
5119 |
+
};
|
5120 |
+
|
5121 |
+
Defaults.prototype._resolveLanguage = function (language) {
|
5122 |
+
if (!language) {
|
5123 |
+
return [];
|
5124 |
+
}
|
5125 |
+
|
5126 |
+
if ($.isEmptyObject(language)) {
|
5127 |
+
return [];
|
5128 |
+
}
|
5129 |
+
|
5130 |
+
if ($.isPlainObject(language)) {
|
5131 |
+
return [language];
|
5132 |
+
}
|
5133 |
+
|
5134 |
+
var languages;
|
5135 |
+
|
5136 |
+
if (!$.isArray(language)) {
|
5137 |
+
languages = [language];
|
5138 |
+
} else {
|
5139 |
+
languages = language;
|
5140 |
+
}
|
5141 |
+
|
5142 |
+
var resolvedLanguages = [];
|
5143 |
+
|
5144 |
+
for (var l = 0; l < languages.length; l++) {
|
5145 |
+
resolvedLanguages.push(languages[l]);
|
5146 |
+
|
5147 |
+
if (typeof languages[l] === 'string' && languages[l].indexOf('-') > 0) {
|
5148 |
+
// Extract the region information if it is included
|
5149 |
+
var languageParts = languages[l].split('-');
|
5150 |
+
var baseLanguage = languageParts[0];
|
5151 |
+
|
5152 |
+
resolvedLanguages.push(baseLanguage);
|
5153 |
+
}
|
5154 |
+
}
|
5155 |
+
|
5156 |
+
return resolvedLanguages;
|
5157 |
+
};
|
5158 |
+
|
5159 |
+
Defaults.prototype._processTranslations = function (languages, debug) {
|
5160 |
+
var translations = new Translation();
|
5161 |
+
|
5162 |
+
for (var l = 0; l < languages.length; l++) {
|
5163 |
+
var languageData = new Translation();
|
5164 |
+
|
5165 |
+
var language = languages[l];
|
5166 |
+
|
5167 |
+
if (typeof language === 'string') {
|
5168 |
+
try {
|
5169 |
+
// Try to load it with the original name
|
5170 |
+
languageData = Translation.loadPath(language);
|
5171 |
+
} catch (e) {
|
5172 |
+
try {
|
5173 |
+
// If we couldn't load it, check if it wasn't the full path
|
5174 |
+
language = this.defaults.amdLanguageBase + language;
|
5175 |
+
languageData = Translation.loadPath(language);
|
5176 |
+
} catch (ex) {
|
5177 |
+
// The translation could not be loaded at all. Sometimes this is
|
5178 |
+
// because of a configuration problem, other times this can be
|
5179 |
+
// because of how Select2 helps load all possible translation files
|
5180 |
+
if (debug && window.console && console.warn) {
|
5181 |
+
console.warn(
|
5182 |
+
'Select2: The language file for "' + language + '" could ' +
|
5183 |
+
'not be automatically loaded. A fallback will be used instead.'
|
5184 |
+
);
|
5185 |
+
}
|
5186 |
+
}
|
5187 |
+
}
|
5188 |
+
} else if ($.isPlainObject(language)) {
|
5189 |
+
languageData = new Translation(language);
|
5190 |
+
} else {
|
5191 |
+
languageData = language;
|
5192 |
+
}
|
5193 |
+
|
5194 |
+
translations.extend(languageData);
|
5195 |
+
}
|
5196 |
+
|
5197 |
+
return translations;
|
5198 |
+
};
|
5199 |
+
|
5200 |
Defaults.prototype.set = function (key, value) {
|
5201 |
var camelKey = $.camelCase(key);
|
5202 |
|
5226 |
this.fromElement($element);
|
5227 |
}
|
5228 |
|
5229 |
+
if ($element != null) {
|
5230 |
+
this.options = Defaults.applyFromElement(this.options, $element);
|
5231 |
+
}
|
5232 |
+
|
5233 |
this.options = Defaults.apply(this.options);
|
5234 |
|
5235 |
if ($element && $element.is('input')) {
|
5253 |
this.options.disabled = $e.prop('disabled');
|
5254 |
}
|
5255 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5256 |
if (this.options.dir == null) {
|
5257 |
if ($e.prop('dir')) {
|
5258 |
this.options.dir = $e.prop('dir');
|
5290 |
|
5291 |
$e.attr('ajax--url', Utils.GetData($e[0], 'ajaxUrl'));
|
5292 |
Utils.StoreData($e[0], 'ajax-Url', Utils.GetData($e[0], 'ajaxUrl'));
|
|
|
5293 |
}
|
5294 |
|
5295 |
var dataset = {};
|
5296 |
|
5297 |
+
function upperCaseLetter(_, letter) {
|
5298 |
+
return letter.toUpperCase();
|
5299 |
+
}
|
5300 |
+
|
5301 |
+
// Pre-load all of the attributes which are prefixed with `data-`
|
5302 |
+
for (var attr = 0; attr < $e[0].attributes.length; attr++) {
|
5303 |
+
var attributeName = $e[0].attributes[attr].name;
|
5304 |
+
var prefix = 'data-';
|
5305 |
+
|
5306 |
+
if (attributeName.substr(0, prefix.length) == prefix) {
|
5307 |
+
// Get the contents of the attribute after `data-`
|
5308 |
+
var dataName = attributeName.substring(prefix.length);
|
5309 |
+
|
5310 |
+
// Get the data contents from the consistent source
|
5311 |
+
// This is more than likely the jQuery data helper
|
5312 |
+
var dataValue = Utils.GetData($e[0], dataName);
|
5313 |
+
|
5314 |
+
// camelCase the attribute name to match the spec
|
5315 |
+
var camelDataName = dataName.replace(/-([a-z])/g, upperCaseLetter);
|
5316 |
+
|
5317 |
+
// Store the data attribute contents into the dataset since
|
5318 |
+
dataset[camelDataName] = dataValue;
|
5319 |
+
}
|
5320 |
+
}
|
5321 |
+
|
5322 |
// Prefer the element's `dataset` attribute if it exists
|
5323 |
// jQuery 1.x does not correctly handle data attributes with multiple dashes
|
5324 |
if ($.fn.jquery && $.fn.jquery.substr(0, 2) == '1.' && $e[0].dataset) {
|
5325 |
+
dataset = $.extend(true, {}, $e[0].dataset, dataset);
|
|
|
|
|
5326 |
}
|
5327 |
|
5328 |
+
// Prefer our internal data cache if it exists
|
5329 |
+
var data = $.extend(true, {}, Utils.GetData($e[0]), dataset);
|
5330 |
|
5331 |
data = Utils._convertData(data);
|
5332 |
|
5520 |
return null;
|
5521 |
}
|
5522 |
|
5523 |
+
if (method == 'computedstyle') {
|
5524 |
+
var computedStyle = window.getComputedStyle($element[0]);
|
5525 |
+
|
5526 |
+
return computedStyle.width;
|
5527 |
+
}
|
5528 |
+
|
5529 |
return method;
|
5530 |
};
|
5531 |
|
5566 |
|
5567 |
if (observer != null) {
|
5568 |
this._observer = new observer(function (mutations) {
|
5569 |
+
self._syncA();
|
5570 |
+
self._syncS(null, mutations);
|
5571 |
});
|
5572 |
this._observer.observe(this.$element[0], {
|
5573 |
attributes: true,
|
5689 |
if (self.isOpen()) {
|
5690 |
if (key === KEYS.ESC || key === KEYS.TAB ||
|
5691 |
(key === KEYS.UP && evt.altKey)) {
|
5692 |
+
self.close(evt);
|
5693 |
|
5694 |
evt.preventDefault();
|
5695 |
} else if (key === KEYS.ENTER) {
|
5723 |
Select2.prototype._syncAttributes = function () {
|
5724 |
this.options.set('disabled', this.$element.prop('disabled'));
|
5725 |
|
5726 |
+
if (this.isDisabled()) {
|
5727 |
if (this.isOpen()) {
|
5728 |
this.close();
|
5729 |
}
|
5734 |
}
|
5735 |
};
|
5736 |
|
5737 |
+
Select2.prototype._isChangeMutation = function (evt, mutations) {
|
5738 |
var changed = false;
|
5739 |
var self = this;
|
5740 |
|
5762 |
}
|
5763 |
} else if (mutations.removedNodes && mutations.removedNodes.length > 0) {
|
5764 |
changed = true;
|
5765 |
+
} else if ($.isArray(mutations)) {
|
5766 |
+
$.each(mutations, function(evt, mutation) {
|
5767 |
+
if (self._isChangeMutation(evt, mutation)) {
|
5768 |
+
// We've found a change mutation.
|
5769 |
+
// Let's escape from the loop and continue
|
5770 |
+
changed = true;
|
5771 |
+
return false;
|
5772 |
+
}
|
5773 |
+
});
|
5774 |
}
|
5775 |
+
return changed;
|
5776 |
+
};
|
5777 |
+
|
5778 |
+
Select2.prototype._syncSubtree = function (evt, mutations) {
|
5779 |
+
var changed = this._isChangeMutation(evt, mutations);
|
5780 |
+
var self = this;
|
5781 |
|
5782 |
// Only re-pull the data if we think there is a change
|
5783 |
if (changed) {
|
5828 |
};
|
5829 |
|
5830 |
Select2.prototype.toggleDropdown = function () {
|
5831 |
+
if (this.isDisabled()) {
|
5832 |
return;
|
5833 |
}
|
5834 |
|
5844 |
return;
|
5845 |
}
|
5846 |
|
5847 |
+
if (this.isDisabled()) {
|
5848 |
+
return;
|
5849 |
+
}
|
5850 |
+
|
5851 |
this.trigger('query', {});
|
5852 |
};
|
5853 |
|
5854 |
+
Select2.prototype.close = function (evt) {
|
5855 |
if (!this.isOpen()) {
|
5856 |
return;
|
5857 |
}
|
5858 |
|
5859 |
+
this.trigger('close', { originalEvent : evt });
|
5860 |
+
};
|
5861 |
+
|
5862 |
+
/**
|
5863 |
+
* Helper method to abstract the "enabled" (not "disabled") state of this
|
5864 |
+
* object.
|
5865 |
+
*
|
5866 |
+
* @return {true} if the instance is not disabled.
|
5867 |
+
* @return {false} if the instance is disabled.
|
5868 |
+
*/
|
5869 |
+
Select2.prototype.isEnabled = function () {
|
5870 |
+
return !this.isDisabled();
|
5871 |
+
};
|
5872 |
+
|
5873 |
+
/**
|
5874 |
+
* Helper method to abstract the "disabled" state of this object.
|
5875 |
+
*
|
5876 |
+
* @return {true} if the disabled option is true.
|
5877 |
+
* @return {false} if the disabled option is false.
|
5878 |
+
*/
|
5879 |
+
Select2.prototype.isDisabled = function () {
|
5880 |
+
return this.options.get('disabled');
|
5881 |
};
|
5882 |
|
5883 |
Select2.prototype.isOpen = function () {
|
5954 |
});
|
5955 |
}
|
5956 |
|
5957 |
+
this.$element.val(newVal).trigger('input').trigger('change');
|
5958 |
};
|
5959 |
|
5960 |
Select2.prototype.destroy = function () {
|
6289 |
});
|
6290 |
|
6291 |
this.$element.val(data.id);
|
6292 |
+
this.$element.trigger('input').trigger('change');
|
6293 |
} else {
|
6294 |
var value = this.$element.val();
|
6295 |
value += this._valueSeparator + data.id;
|
6296 |
|
6297 |
this.$element.val(value);
|
6298 |
+
this.$element.trigger('input').trigger('change');
|
6299 |
}
|
6300 |
};
|
6301 |
|
6318 |
}
|
6319 |
|
6320 |
self.$element.val(values.join(self._valueSeparator));
|
6321 |
+
self.$element.trigger('input').trigger('change');
|
6322 |
});
|
6323 |
};
|
6324 |
|
assets/select2/select2.full.min.js
CHANGED
@@ -1 +1,2 @@
|
|
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});
|
|
1 |
+
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
+
!function(n){"function"==typeof define&&define.amd?define(["jquery"],n):"object"==typeof module&&module.exports?module.exports=function(e,t){return void 0===t&&(t="undefined"!=typeof window?require("jquery"):require("jquery")(e)),n(t),t}:n(jQuery)}(function(d){var e=function(){if(d&&d.fn&&d.fn.select2&&d.fn.select2.amd)var e=d.fn.select2.amd;var t,n,i,h,o,s,f,g,m,v,y,_,r,a,w,l;function b(e,t){return r.call(e,t)}function c(e,t){var n,i,r,o,s,a,l,c,u,d,p,h=t&&t.split("/"),f=y.map,g=f&&f["*"]||{};if(e){for(s=(e=e.split("/")).length-1,y.nodeIdCompat&&w.test(e[s])&&(e[s]=e[s].replace(w,"")),"."===e[0].charAt(0)&&h&&(e=h.slice(0,h.length-1).concat(e)),u=0;u<e.length;u++)if("."===(p=e[u]))e.splice(u,1),u-=1;else if(".."===p){if(0===u||1===u&&".."===e[2]||".."===e[u-1])continue;0<u&&(e.splice(u-1,2),u-=2)}e=e.join("/")}if((h||g)&&f){for(u=(n=e.split("/")).length;0<u;u-=1){if(i=n.slice(0,u).join("/"),h)for(d=h.length;0<d;d-=1)if(r=(r=f[h.slice(0,d).join("/")])&&r[i]){o=r,a=u;break}if(o)break;!l&&g&&g[i]&&(l=g[i],c=u)}!o&&l&&(o=l,a=c),o&&(n.splice(0,a,o),e=n.join("/"))}return e}function A(t,n){return function(){var e=a.call(arguments,0);return"string"!=typeof e[0]&&1===e.length&&e.push(null),s.apply(h,e.concat([t,n]))}}function x(t){return function(e){m[t]=e}}function D(e){if(b(v,e)){var t=v[e];delete v[e],_[e]=!0,o.apply(h,t)}if(!b(m,e)&&!b(_,e))throw new Error("No "+e);return m[e]}function u(e){var t,n=e?e.indexOf("!"):-1;return-1<n&&(t=e.substring(0,n),e=e.substring(n+1,e.length)),[t,e]}function S(e){return e?u(e):[]}return e&&e.requirejs||(e?n=e:e={},m={},v={},y={},_={},r=Object.prototype.hasOwnProperty,a=[].slice,w=/\.js$/,f=function(e,t){var n,i=u(e),r=i[0],o=t[1];return e=i[1],r&&(n=D(r=c(r,o))),r?e=n&&n.normalize?n.normalize(e,function(t){return function(e){return c(e,t)}}(o)):c(e,o):(r=(i=u(e=c(e,o)))[0],e=i[1],r&&(n=D(r))),{f:r?r+"!"+e:e,n:e,pr:r,p:n}},g={require:function(e){return A(e)},exports:function(e){var t=m[e];return void 0!==t?t:m[e]={}},module:function(e){return{id:e,uri:"",exports:m[e],config:function(e){return function(){return y&&y.config&&y.config[e]||{}}}(e)}}},o=function(e,t,n,i){var r,o,s,a,l,c,u,d=[],p=typeof n;if(c=S(i=i||e),"undefined"==p||"function"==p){for(t=!t.length&&n.length?["require","exports","module"]:t,l=0;l<t.length;l+=1)if("require"===(o=(a=f(t[l],c)).f))d[l]=g.require(e);else if("exports"===o)d[l]=g.exports(e),u=!0;else if("module"===o)r=d[l]=g.module(e);else if(b(m,o)||b(v,o)||b(_,o))d[l]=D(o);else{if(!a.p)throw new Error(e+" missing "+o);a.p.load(a.n,A(i,!0),x(o),{}),d[l]=m[o]}s=n?n.apply(m[e],d):void 0,e&&(r&&r.exports!==h&&r.exports!==m[e]?m[e]=r.exports:s===h&&u||(m[e]=s))}else e&&(m[e]=n)},t=n=s=function(e,t,n,i,r){if("string"==typeof e)return g[e]?g[e](t):D(f(e,S(t)).f);if(!e.splice){if((y=e).deps&&s(y.deps,y.callback),!t)return;t.splice?(e=t,t=n,n=null):e=h}return t=t||function(){},"function"==typeof n&&(n=i,i=r),i?o(h,e,t,n):setTimeout(function(){o(h,e,t,n)},4),s},s.config=function(e){return s(e)},t._defined=m,(i=function(e,t,n){if("string"!=typeof e)throw new Error("See almond README: incorrect module build, no module name");t.splice||(n=t,t=[]),b(m,e)||b(v,e)||(v[e]=[e,t,n])}).amd={jQuery:!0},e.requirejs=t,e.require=n,e.define=i),e.define("almond",function(){}),e.define("jquery",[],function(){var e=d||$;return null==e&&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."),e}),e.define("select2/utils",["jquery"],function(o){var r={};function u(e){var t=e.prototype,n=[];for(var i in t){"function"==typeof t[i]&&"constructor"!==i&&n.push(i)}return n}r.Extend=function(e,t){var n={}.hasOwnProperty;function i(){this.constructor=e}for(var r in t)n.call(t,r)&&(e[r]=t[r]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},r.Decorate=function(i,r){var e=u(r),t=u(i);function o(){var e=Array.prototype.unshift,t=r.prototype.constructor.length,n=i.prototype.constructor;0<t&&(e.call(arguments,i.prototype.constructor),n=r.prototype.constructor),n.apply(this,arguments)}r.displayName=i.displayName,o.prototype=new function(){this.constructor=o};for(var n=0;n<t.length;n++){var s=t[n];o.prototype[s]=i.prototype[s]}function a(e){var t=function(){};e in o.prototype&&(t=o.prototype[e]);var n=r.prototype[e];return function(){return Array.prototype.unshift.call(arguments,t),n.apply(this,arguments)}}for(var l=0;l<e.length;l++){var c=e[l];o.prototype[c]=a(c)}return o};function e(){this.listeners={}}e.prototype.on=function(e,t){this.listeners=this.listeners||{},e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t]},e.prototype.trigger=function(e){var t=Array.prototype.slice,n=t.call(arguments,1);this.listeners=this.listeners||{},null==n&&(n=[]),0===n.length&&n.push({}),(n[0]._type=e)in this.listeners&&this.invoke(this.listeners[e],t.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},e.prototype.invoke=function(e,t){for(var n=0,i=e.length;n<i;n++)e[n].apply(this,t)},r.Observable=e,r.generateChars=function(e){for(var t="",n=0;n<e;n++){t+=Math.floor(36*Math.random()).toString(36)}return t},r.bind=function(e,t){return function(){e.apply(t,arguments)}},r._convertData=function(e){for(var t in e){var n=t.split("-"),i=e;if(1!==n.length){for(var r=0;r<n.length;r++){var o=n[r];(o=o.substring(0,1).toLowerCase()+o.substring(1))in i||(i[o]={}),r==n.length-1&&(i[o]=e[t]),i=i[o]}delete e[t]}}return e},r.hasScroll=function(e,t){var n=o(t),i=t.style.overflowX,r=t.style.overflowY;return(i!==r||"hidden"!==r&&"visible"!==r)&&("scroll"===i||"scroll"===r||(n.innerHeight()<t.scrollHeight||n.innerWidth()<t.scrollWidth))},r.escapeMarkup=function(e){var t={"\\":"\","&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};return"string"!=typeof e?e:String(e).replace(/[&<>"'\/\\]/g,function(e){return t[e]})},r.appendMany=function(e,t){if("1.7"===o.fn.jquery.substr(0,3)){var n=o();o.map(t,function(e){n=n.add(e)}),t=n}e.append(t)},r.__cache={};var n=0;return r.GetUniqueElementId=function(e){var t=e.getAttribute("data-select2-id");return null==t&&(e.id?(t=e.id,e.setAttribute("data-select2-id",t)):(e.setAttribute("data-select2-id",++n),t=n.toString())),t},r.StoreData=function(e,t,n){var i=r.GetUniqueElementId(e);r.__cache[i]||(r.__cache[i]={}),r.__cache[i][t]=n},r.GetData=function(e,t){var n=r.GetUniqueElementId(e);return t?r.__cache[n]&&null!=r.__cache[n][t]?r.__cache[n][t]:o(e).data(t):r.__cache[n]},r.RemoveData=function(e){var t=r.GetUniqueElementId(e);null!=r.__cache[t]&&delete r.__cache[t],e.removeAttribute("data-select2-id")},r}),e.define("select2/results",["jquery","./utils"],function(h,f){function i(e,t,n){this.$element=e,this.data=n,this.options=t,i.__super__.constructor.call(this)}return f.Extend(i,f.Observable),i.prototype.render=function(){var e=h('<ul class="select2-results__options" role="listbox"></ul>');return this.options.get("multiple")&&e.attr("aria-multiselectable","true"),this.$results=e},i.prototype.clear=function(){this.$results.empty()},i.prototype.displayMessage=function(e){var t=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var n=h('<li role="alert" aria-live="assertive" class="select2-results__option"></li>'),i=this.options.get("translations").get(e.message);n.append(t(i(e.args))),n[0].className+=" select2-results__message",this.$results.append(n)},i.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},i.prototype.append=function(e){this.hideLoading();var t=[];if(null!=e.results&&0!==e.results.length){e.results=this.sort(e.results);for(var n=0;n<e.results.length;n++){var i=e.results[n],r=this.option(i);t.push(r)}this.$results.append(t)}else 0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"})},i.prototype.position=function(e,t){t.find(".select2-results").append(e)},i.prototype.sort=function(e){return this.options.get("sorter")(e)},i.prototype.highlightFirstItem=function(){var e=this.$results.find(".select2-results__option[aria-selected]"),t=e.filter("[aria-selected=true]");0<t.length?t.first().trigger("mouseenter"):e.first().trigger("mouseenter"),this.ensureHighlightVisible()},i.prototype.setClasses=function(){var t=this;this.data.current(function(e){var i=h.map(e,function(e){return e.id.toString()});t.$results.find(".select2-results__option[aria-selected]").each(function(){var e=h(this),t=f.GetData(this,"data"),n=""+t.id;null!=t.element&&t.element.selected||null==t.element&&-1<h.inArray(n,i)?e.attr("aria-selected","true"):e.attr("aria-selected","false")})})},i.prototype.showLoading=function(e){this.hideLoading();var t={disabled:!0,loading:!0,text:this.options.get("translations").get("searching")(e)},n=this.option(t);n.className+=" loading-results",this.$results.prepend(n)},i.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},i.prototype.option=function(e){var t=document.createElement("li");t.className="select2-results__option";var n={role:"option","aria-selected":"false"},i=window.Element.prototype.matches||window.Element.prototype.msMatchesSelector||window.Element.prototype.webkitMatchesSelector;for(var r in(null!=e.element&&i.call(e.element,":disabled")||null==e.element&&e.disabled)&&(delete n["aria-selected"],n["aria-disabled"]="true"),null==e.id&&delete n["aria-selected"],null!=e._resultId&&(t.id=e._resultId),e.title&&(t.title=e.title),e.children&&(n.role="group",n["aria-label"]=e.text,delete n["aria-selected"]),n){var o=n[r];t.setAttribute(r,o)}if(e.children){var s=h(t),a=document.createElement("strong");a.className="select2-results__group";h(a);this.template(e,a);for(var l=[],c=0;c<e.children.length;c++){var u=e.children[c],d=this.option(u);l.push(d)}var p=h("<ul></ul>",{class:"select2-results__options select2-results__options--nested"});p.append(l),s.append(a),s.append(p)}else this.template(e,t);return f.StoreData(t,"data",e),t},i.prototype.bind=function(t,e){var l=this,n=t.id+"-results";this.$results.attr("id",n),t.on("results:all",function(e){l.clear(),l.append(e.data),t.isOpen()&&(l.setClasses(),l.highlightFirstItem())}),t.on("results:append",function(e){l.append(e.data),t.isOpen()&&l.setClasses()}),t.on("query",function(e){l.hideMessages(),l.showLoading(e)}),t.on("select",function(){t.isOpen()&&(l.setClasses(),l.options.get("scrollAfterSelect")&&l.highlightFirstItem())}),t.on("unselect",function(){t.isOpen()&&(l.setClasses(),l.options.get("scrollAfterSelect")&&l.highlightFirstItem())}),t.on("open",function(){l.$results.attr("aria-expanded","true"),l.$results.attr("aria-hidden","false"),l.setClasses(),l.ensureHighlightVisible()}),t.on("close",function(){l.$results.attr("aria-expanded","false"),l.$results.attr("aria-hidden","true"),l.$results.removeAttr("aria-activedescendant")}),t.on("results:toggle",function(){var e=l.getHighlightedResults();0!==e.length&&e.trigger("mouseup")}),t.on("results:select",function(){var e=l.getHighlightedResults();if(0!==e.length){var t=f.GetData(e[0],"data");"true"==e.attr("aria-selected")?l.trigger("close",{}):l.trigger("select",{data:t})}}),t.on("results:previous",function(){var e=l.getHighlightedResults(),t=l.$results.find("[aria-selected]"),n=t.index(e);if(!(n<=0)){var i=n-1;0===e.length&&(i=0);var r=t.eq(i);r.trigger("mouseenter");var o=l.$results.offset().top,s=r.offset().top,a=l.$results.scrollTop()+(s-o);0===i?l.$results.scrollTop(0):s-o<0&&l.$results.scrollTop(a)}}),t.on("results:next",function(){var e=l.getHighlightedResults(),t=l.$results.find("[aria-selected]"),n=t.index(e)+1;if(!(n>=t.length)){var i=t.eq(n);i.trigger("mouseenter");var r=l.$results.offset().top+l.$results.outerHeight(!1),o=i.offset().top+i.outerHeight(!1),s=l.$results.scrollTop()+o-r;0===n?l.$results.scrollTop(0):r<o&&l.$results.scrollTop(s)}}),t.on("results:focus",function(e){e.element.addClass("select2-results__option--highlighted")}),t.on("results:message",function(e){l.displayMessage(e)}),h.fn.mousewheel&&this.$results.on("mousewheel",function(e){var t=l.$results.scrollTop(),n=l.$results.get(0).scrollHeight-t+e.deltaY,i=0<e.deltaY&&t-e.deltaY<=0,r=e.deltaY<0&&n<=l.$results.height();i?(l.$results.scrollTop(0),e.preventDefault(),e.stopPropagation()):r&&(l.$results.scrollTop(l.$results.get(0).scrollHeight-l.$results.height()),e.preventDefault(),e.stopPropagation())}),this.$results.on("mouseup",".select2-results__option[aria-selected]",function(e){var t=h(this),n=f.GetData(this,"data");"true"!==t.attr("aria-selected")?l.trigger("select",{originalEvent:e,data:n}):l.options.get("multiple")?l.trigger("unselect",{originalEvent:e,data:n}):l.trigger("close",{})}),this.$results.on("mouseenter",".select2-results__option[aria-selected]",function(e){var t=f.GetData(this,"data");l.getHighlightedResults().removeClass("select2-results__option--highlighted"),l.trigger("results:focus",{data:t,element:h(this)})})},i.prototype.getHighlightedResults=function(){return this.$results.find(".select2-results__option--highlighted")},i.prototype.destroy=function(){this.$results.remove()},i.prototype.ensureHighlightVisible=function(){var e=this.getHighlightedResults();if(0!==e.length){var t=this.$results.find("[aria-selected]").index(e),n=this.$results.offset().top,i=e.offset().top,r=this.$results.scrollTop()+(i-n),o=i-n;r-=2*e.outerHeight(!1),t<=2?this.$results.scrollTop(0):(o>this.$results.outerHeight()||o<0)&&this.$results.scrollTop(r)}},i.prototype.template=function(e,t){var n=this.options.get("templateResult"),i=this.options.get("escapeMarkup"),r=n(e,t);null==r?t.style.display="none":"string"==typeof r?t.innerHTML=i(r):h(t).append(r)},i}),e.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}}),e.define("select2/selection/base",["jquery","../utils","../keys"],function(n,i,r){function o(e,t){this.$element=e,this.options=t,o.__super__.constructor.call(this)}return i.Extend(o,i.Observable),o.prototype.render=function(){var e=n('<span class="select2-selection" role="combobox" aria-haspopup="true" aria-expanded="false"></span>');return this._tabindex=0,null!=i.GetData(this.$element[0],"old-tabindex")?this._tabindex=i.GetData(this.$element[0],"old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),e.attr("title",this.$element.attr("title")),e.attr("tabindex",this._tabindex),e.attr("aria-disabled","false"),this.$selection=e},o.prototype.bind=function(e,t){var n=this,i=e.id+"-results";this.container=e,this.$selection.on("focus",function(e){n.trigger("focus",e)}),this.$selection.on("blur",function(e){n._handleBlur(e)}),this.$selection.on("keydown",function(e){n.trigger("keypress",e),e.which===r.SPACE&&e.preventDefault()}),e.on("results:focus",function(e){n.$selection.attr("aria-activedescendant",e.data._resultId)}),e.on("selection:update",function(e){n.update(e.data)}),e.on("open",function(){n.$selection.attr("aria-expanded","true"),n.$selection.attr("aria-owns",i),n._attachCloseHandler(e)}),e.on("close",function(){n.$selection.attr("aria-expanded","false"),n.$selection.removeAttr("aria-activedescendant"),n.$selection.removeAttr("aria-owns"),n.$selection.trigger("focus"),n._detachCloseHandler(e)}),e.on("enable",function(){n.$selection.attr("tabindex",n._tabindex),n.$selection.attr("aria-disabled","false")}),e.on("disable",function(){n.$selection.attr("tabindex","-1"),n.$selection.attr("aria-disabled","true")})},o.prototype._handleBlur=function(e){var t=this;window.setTimeout(function(){document.activeElement==t.$selection[0]||n.contains(t.$selection[0],document.activeElement)||t.trigger("blur",e)},1)},o.prototype._attachCloseHandler=function(e){n(document.body).on("mousedown.select2."+e.id,function(e){var t=n(e.target).closest(".select2");n(".select2.select2-container--open").each(function(){this!=t[0]&&i.GetData(this,"element").select2("close")})})},o.prototype._detachCloseHandler=function(e){n(document.body).off("mousedown.select2."+e.id)},o.prototype.position=function(e,t){t.find(".selection").append(e)},o.prototype.destroy=function(){this._detachCloseHandler(this.container)},o.prototype.update=function(e){throw new Error("The `update` method must be defined in child classes.")},o.prototype.isEnabled=function(){return!this.isDisabled()},o.prototype.isDisabled=function(){return this.options.get("disabled")},o}),e.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(e,t,n,i){function r(){r.__super__.constructor.apply(this,arguments)}return n.Extend(r,t),r.prototype.render=function(){var e=r.__super__.render.call(this);return e.addClass("select2-selection--single"),e.html('<span class="select2-selection__rendered"></span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span>'),e},r.prototype.bind=function(t,e){var n=this;r.__super__.bind.apply(this,arguments);var i=t.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",i).attr("role","textbox").attr("aria-readonly","true"),this.$selection.attr("aria-labelledby",i),this.$selection.on("mousedown",function(e){1===e.which&&n.trigger("toggle",{originalEvent:e})}),this.$selection.on("focus",function(e){}),this.$selection.on("blur",function(e){}),t.on("focus",function(e){t.isOpen()||n.$selection.trigger("focus")})},r.prototype.clear=function(){var e=this.$selection.find(".select2-selection__rendered");e.empty(),e.removeAttr("title")},r.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},r.prototype.selectionContainer=function(){return e("<span></span>")},r.prototype.update=function(e){if(0!==e.length){var t=e[0],n=this.$selection.find(".select2-selection__rendered"),i=this.display(t,n);n.empty().append(i);var r=t.title||t.text;r?n.attr("title",r):n.removeAttr("title")}else this.clear()},r}),e.define("select2/selection/multiple",["jquery","./base","../utils"],function(r,e,l){function n(e,t){n.__super__.constructor.apply(this,arguments)}return l.Extend(n,e),n.prototype.render=function(){var e=n.__super__.render.call(this);return e.addClass("select2-selection--multiple"),e.html('<ul class="select2-selection__rendered"></ul>'),e},n.prototype.bind=function(e,t){var i=this;n.__super__.bind.apply(this,arguments),this.$selection.on("click",function(e){i.trigger("toggle",{originalEvent:e})}),this.$selection.on("click",".select2-selection__choice__remove",function(e){if(!i.isDisabled()){var t=r(this).parent(),n=l.GetData(t[0],"data");i.trigger("unselect",{originalEvent:e,data:n})}})},n.prototype.clear=function(){var e=this.$selection.find(".select2-selection__rendered");e.empty(),e.removeAttr("title")},n.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},n.prototype.selectionContainer=function(){return r('<li class="select2-selection__choice"><span class="select2-selection__choice__remove" role="presentation">×</span></li>')},n.prototype.update=function(e){if(this.clear(),0!==e.length){for(var t=[],n=0;n<e.length;n++){var i=e[n],r=this.selectionContainer(),o=this.display(i,r);r.append(o);var s=i.title||i.text;s&&r.attr("title",s),l.StoreData(r[0],"data",i),t.push(r)}var a=this.$selection.find(".select2-selection__rendered");l.appendMany(a,t)}},n}),e.define("select2/selection/placeholder",["../utils"],function(e){function t(e,t,n){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n)}return t.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},t.prototype.createPlaceholder=function(e,t){var n=this.selectionContainer();return n.html(this.display(t)),n.addClass("select2-selection__placeholder").removeClass("select2-selection__choice"),n},t.prototype.update=function(e,t){var n=1==t.length&&t[0].id!=this.placeholder.id;if(1<t.length||n)return e.call(this,t);this.clear();var i=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(i)},t}),e.define("select2/selection/allowClear",["jquery","../keys","../utils"],function(r,i,a){function e(){}return e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),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(e){i._handleClear(e)}),t.on("keypress",function(e){i._handleKeyboardClear(e,t)})},e.prototype._handleClear=function(e,t){if(!this.isDisabled()){var n=this.$selection.find(".select2-selection__clear");if(0!==n.length){t.stopPropagation();var i=a.GetData(n[0],"data"),r=this.$element.val();this.$element.val(this.placeholder.id);var o={data:i};if(this.trigger("clear",o),o.prevented)this.$element.val(r);else{for(var s=0;s<i.length;s++)if(o={data:i[s]},this.trigger("unselect",o),o.prevented)return void this.$element.val(r);this.$element.trigger("input").trigger("change"),this.trigger("toggle",{})}}}},e.prototype._handleKeyboardClear=function(e,t,n){n.isOpen()||t.which!=i.DELETE&&t.which!=i.BACKSPACE||this._handleClear(t)},e.prototype.update=function(e,t){if(e.call(this,t),!(0<this.$selection.find(".select2-selection__placeholder").length||0===t.length)){var n=this.options.get("translations").get("removeAllItems"),i=r('<span class="select2-selection__clear" title="'+n()+'">×</span>');a.StoreData(i[0],"data",t),this.$selection.find(".select2-selection__rendered").prepend(i)}},e}),e.define("select2/selection/search",["jquery","../utils","../keys"],function(i,a,l){function e(e,t,n){e.call(this,t,n)}return e.prototype.render=function(e){var t=i('<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="searchbox" aria-autocomplete="list" /></li>');this.$searchContainer=t,this.$search=t.find("input");var n=e.call(this);return this._transferTabIndex(),n},e.prototype.bind=function(e,t,n){var i=this,r=t.id+"-results";e.call(this,t,n),t.on("open",function(){i.$search.attr("aria-controls",r),i.$search.trigger("focus")}),t.on("close",function(){i.$search.val(""),i.$search.removeAttr("aria-controls"),i.$search.removeAttr("aria-activedescendant"),i.$search.trigger("focus")}),t.on("enable",function(){i.$search.prop("disabled",!1),i._transferTabIndex()}),t.on("disable",function(){i.$search.prop("disabled",!0)}),t.on("focus",function(e){i.$search.trigger("focus")}),t.on("results:focus",function(e){e.data._resultId?i.$search.attr("aria-activedescendant",e.data._resultId):i.$search.removeAttr("aria-activedescendant")}),this.$selection.on("focusin",".select2-search--inline",function(e){i.trigger("focus",e)}),this.$selection.on("focusout",".select2-search--inline",function(e){i._handleBlur(e)}),this.$selection.on("keydown",".select2-search--inline",function(e){if(e.stopPropagation(),i.trigger("keypress",e),i._keyUpPrevented=e.isDefaultPrevented(),e.which===l.BACKSPACE&&""===i.$search.val()){var t=i.$searchContainer.prev(".select2-selection__choice");if(0<t.length){var n=a.GetData(t[0],"data");i.searchRemoveChoice(n),e.preventDefault()}}}),this.$selection.on("click",".select2-search--inline",function(e){i.$search.val()&&e.stopPropagation()});var o=document.documentMode,s=o&&o<=11;this.$selection.on("input.searchcheck",".select2-search--inline",function(e){s?i.$selection.off("input.search input.searchcheck"):i.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".select2-search--inline",function(e){if(s&&"input"===e.type)i.$selection.off("input.search input.searchcheck");else{var t=e.which;t!=l.SHIFT&&t!=l.CTRL&&t!=l.ALT&&t!=l.TAB&&i.handleSearch(e)}})},e.prototype._transferTabIndex=function(e){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},e.prototype.createPlaceholder=function(e,t){this.$search.attr("placeholder",t.text)},e.prototype.update=function(e,t){var n=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),e.call(this,t),this.$selection.find(".select2-selection__rendered").append(this.$searchContainer),this.resizeSearch(),n&&this.$search.trigger("focus")},e.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var e=this.$search.val();this.trigger("query",{term:e})}this._keyUpPrevented=!1},e.prototype.searchRemoveChoice=function(e,t){this.trigger("unselect",{data:t}),this.$search.val(t.text),this.handleSearch()},e.prototype.resizeSearch=function(){this.$search.css("width","25px");var e="";""!==this.$search.attr("placeholder")?e=this.$selection.find(".select2-selection__rendered").width():e=.75*(this.$search.val().length+1)+"em";this.$search.css("width",e)},e}),e.define("select2/selection/eventRelay",["jquery"],function(s){function e(){}return e.prototype.bind=function(e,t,n){var i=this,r=["open","opening","close","closing","select","selecting","unselect","unselecting","clear","clearing"],o=["opening","closing","selecting","unselecting","clearing"];e.call(this,t,n),t.on("*",function(e,t){if(-1!==s.inArray(e,r)){t=t||{};var n=s.Event("select2:"+e,{params:t});i.$element.trigger(n),-1!==s.inArray(e,o)&&(t.prevented=n.isDefaultPrevented())}})},e}),e.define("select2/translation",["jquery","require"],function(t,n){function i(e){this.dict=e||{}}return i.prototype.all=function(){return this.dict},i.prototype.get=function(e){return this.dict[e]},i.prototype.extend=function(e){this.dict=t.extend({},e.all(),this.dict)},i._cache={},i.loadPath=function(e){if(!(e in i._cache)){var t=n(e);i._cache[e]=t}return new i(i._cache[e])},i}),e.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","Œ":"OE","Ƣ":"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","œ":"oe","ƣ":"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","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ώ":"ω","ς":"σ","’":"'"}}),e.define("select2/data/base",["../utils"],function(i){function n(e,t){n.__super__.constructor.call(this)}return i.Extend(n,i.Observable),n.prototype.current=function(e){throw new Error("The `current` method must be defined in child classes.")},n.prototype.query=function(e,t){throw new Error("The `query` method must be defined in child classes.")},n.prototype.bind=function(e,t){},n.prototype.destroy=function(){},n.prototype.generateResultId=function(e,t){var n=e.id+"-result-";return n+=i.generateChars(4),null!=t.id?n+="-"+t.id.toString():n+="-"+i.generateChars(4),n},n}),e.define("select2/data/select",["./base","../utils","jquery"],function(e,a,l){function n(e,t){this.$element=e,this.options=t,n.__super__.constructor.call(this)}return a.Extend(n,e),n.prototype.current=function(e){var n=[],i=this;this.$element.find(":selected").each(function(){var e=l(this),t=i.item(e);n.push(t)}),e(n)},n.prototype.select=function(r){var o=this;if(r.selected=!0,l(r.element).is("option"))return r.element.selected=!0,void this.$element.trigger("input").trigger("change");if(this.$element.prop("multiple"))this.current(function(e){var t=[];(r=[r]).push.apply(r,e);for(var n=0;n<r.length;n++){var i=r[n].id;-1===l.inArray(i,t)&&t.push(i)}o.$element.val(t),o.$element.trigger("input").trigger("change")});else{var e=r.id;this.$element.val(e),this.$element.trigger("input").trigger("change")}},n.prototype.unselect=function(r){var o=this;if(this.$element.prop("multiple")){if(r.selected=!1,l(r.element).is("option"))return r.element.selected=!1,void this.$element.trigger("input").trigger("change");this.current(function(e){for(var t=[],n=0;n<e.length;n++){var i=e[n].id;i!==r.id&&-1===l.inArray(i,t)&&t.push(i)}o.$element.val(t),o.$element.trigger("input").trigger("change")})}},n.prototype.bind=function(e,t){var n=this;(this.container=e).on("select",function(e){n.select(e.data)}),e.on("unselect",function(e){n.unselect(e.data)})},n.prototype.destroy=function(){this.$element.find("*").each(function(){a.RemoveData(this)})},n.prototype.query=function(i,e){var r=[],o=this;this.$element.children().each(function(){var e=l(this);if(e.is("option")||e.is("optgroup")){var t=o.item(e),n=o.matches(i,t);null!==n&&r.push(n)}}),e({results:r})},n.prototype.addOptions=function(e){a.appendMany(this.$element,e)},n.prototype.option=function(e){var t;e.children?(t=document.createElement("optgroup")).label=e.text:void 0!==(t=document.createElement("option")).textContent?t.textContent=e.text:t.innerText=e.text,void 0!==e.id&&(t.value=e.id),e.disabled&&(t.disabled=!0),e.selected&&(t.selected=!0),e.title&&(t.title=e.title);var n=l(t),i=this._normalizeItem(e);return i.element=t,a.StoreData(t,"data",i),n},n.prototype.item=function(e){var t={};if(null!=(t=a.GetData(e[0],"data")))return t;if(e.is("option"))t={id:e.val(),text:e.text(),disabled:e.prop("disabled"),selected:e.prop("selected"),title:e.prop("title")};else if(e.is("optgroup")){t={text:e.prop("label"),children:[],title:e.prop("title")};for(var n=e.children("option"),i=[],r=0;r<n.length;r++){var o=l(n[r]),s=this.item(o);i.push(s)}t.children=i}return(t=this._normalizeItem(t)).element=e[0],a.StoreData(e[0],"data",t),t},n.prototype._normalizeItem=function(e){e!==Object(e)&&(e={id:e,text:e});return null!=(e=l.extend({},{text:""},e)).id&&(e.id=e.id.toString()),null!=e.text&&(e.text=e.text.toString()),null==e._resultId&&e.id&&null!=this.container&&(e._resultId=this.generateResultId(this.container,e)),l.extend({},{selected:!1,disabled:!1},e)},n.prototype.matches=function(e,t){return this.options.get("matcher")(e,t)},n}),e.define("select2/data/array",["./select","../utils","jquery"],function(e,f,g){function i(e,t){this._dataToConvert=t.get("data")||[],i.__super__.constructor.call(this,e,t)}return f.Extend(i,e),i.prototype.bind=function(e,t){i.__super__.bind.call(this,e,t),this.addOptions(this.convertToOptions(this._dataToConvert))},i.prototype.select=function(n){var e=this.$element.find("option").filter(function(e,t){return t.value==n.id.toString()});0===e.length&&(e=this.option(n),this.addOptions(e)),i.__super__.select.call(this,n)},i.prototype.convertToOptions=function(e){var t=this,n=this.$element.find("option"),i=n.map(function(){return t.item(g(this)).id}).get(),r=[];function o(e){return function(){return g(this).val()==e.id}}for(var s=0;s<e.length;s++){var a=this._normalizeItem(e[s]);if(0<=g.inArray(a.id,i)){var l=n.filter(o(a)),c=this.item(l),u=g.extend(!0,{},a,c),d=this.option(u);l.replaceWith(d)}else{var p=this.option(a);if(a.children){var h=this.convertToOptions(a.children);f.appendMany(p,h)}r.push(p)}}return r},i}),e.define("select2/data/ajax",["./array","../utils","jquery"],function(e,t,o){function n(e,t){this.ajaxOptions=this._applyDefaults(t.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),n.__super__.constructor.call(this,e,t)}return t.Extend(n,e),n.prototype._applyDefaults=function(e){var t={data:function(e){return o.extend({},e,{q:e.term})},transport:function(e,t,n){var i=o.ajax(e);return i.then(t),i.fail(n),i}};return o.extend({},t,e,!0)},n.prototype.processResults=function(e){return e},n.prototype.query=function(n,i){var r=this;null!=this._request&&(o.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var t=o.extend({type:"GET"},this.ajaxOptions);function e(){var e=t.transport(t,function(e){var t=r.processResults(e,n);r.options.get("debug")&&window.console&&console.error&&(t&&t.results&&o.isArray(t.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),i(t)},function(){"status"in e&&(0===e.status||"0"===e.status)||r.trigger("results:message",{message:"errorLoading"})});r._request=e}"function"==typeof t.url&&(t.url=t.url.call(this.$element,n)),"function"==typeof t.data&&(t.data=t.data.call(this.$element,n)),this.ajaxOptions.delay&&null!=n.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(e,this.ajaxOptions.delay)):e()},n}),e.define("select2/data/tags",["jquery"],function(u){function e(e,t,n){var i=n.get("tags"),r=n.get("createTag");void 0!==r&&(this.createTag=r);var o=n.get("insertTag");if(void 0!==o&&(this.insertTag=o),e.call(this,t,n),u.isArray(i))for(var s=0;s<i.length;s++){var a=i[s],l=this._normalizeItem(a),c=this.option(l);this.$element.append(c)}}return e.prototype.query=function(e,c,u){var d=this;this._removeOldTags(),null!=c.term&&null==c.page?e.call(this,c,function e(t,n){for(var i=t.results,r=0;r<i.length;r++){var o=i[r],s=null!=o.children&&!e({results:o.children},!0);if((o.text||"").toUpperCase()===(c.term||"").toUpperCase()||s)return!n&&(t.data=i,void u(t))}if(n)return!0;var a=d.createTag(c);if(null!=a){var l=d.option(a);l.attr("data-select2-tag",!0),d.addOptions([l]),d.insertTag(i,a)}t.results=i,u(t)}):e.call(this,c,u)},e.prototype.createTag=function(e,t){var n=u.trim(t.term);return""===n?null:{id:n,text:n}},e.prototype.insertTag=function(e,t,n){t.unshift(n)},e.prototype._removeOldTags=function(e){this.$element.find("option[data-select2-tag]").each(function(){this.selected||u(this).remove()})},e}),e.define("select2/data/tokenizer",["jquery"],function(d){function e(e,t,n){var i=n.get("tokenizer");void 0!==i&&(this.tokenizer=i),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){e.call(this,t,n),this.$search=t.dropdown.$search||t.selection.$search||n.find(".select2-search__field")},e.prototype.query=function(e,t,n){var i=this;t.term=t.term||"";var r=this.tokenizer(t,this.options,function(e){var t=i._normalizeItem(e);if(!i.$element.find("option").filter(function(){return d(this).val()===t.id}).length){var n=i.option(t);n.attr("data-select2-tag",!0),i._removeOldTags(),i.addOptions([n])}!function(e){i.trigger("select",{data:e})}(t)});r.term!==t.term&&(this.$search.length&&(this.$search.val(r.term),this.$search.trigger("focus")),t.term=r.term),e.call(this,t,n)},e.prototype.tokenizer=function(e,t,n,i){for(var r=n.get("tokenSeparators")||[],o=t.term,s=0,a=this.createTag||function(e){return{id:e.term,text:e.term}};s<o.length;){var l=o[s];if(-1!==d.inArray(l,r)){var c=o.substr(0,s),u=a(d.extend({},t,{term:c}));null!=u?(i(u),o=o.substr(s+1)||"",s=0):s++}else s++}return{term:o}},e}),e.define("select2/data/minimumInputLength",[],function(){function e(e,t,n){this.minimumInputLength=n.get("minimumInputLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){t.term=t.term||"",t.term.length<this.minimumInputLength?this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:t.term,params:t}}):e.call(this,t,n)},e}),e.define("select2/data/maximumInputLength",[],function(){function e(e,t,n){this.maximumInputLength=n.get("maximumInputLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){t.term=t.term||"",0<this.maximumInputLength&&t.term.length>this.maximumInputLength?this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:t.term,params:t}}):e.call(this,t,n)},e}),e.define("select2/data/maximumSelectionLength",[],function(){function e(e,t,n){this.maximumSelectionLength=n.get("maximumSelectionLength"),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("select",function(){i._checkIfMaximumSelected()})},e.prototype.query=function(e,t,n){var i=this;this._checkIfMaximumSelected(function(){e.call(i,t,n)})},e.prototype._checkIfMaximumSelected=function(e,n){var i=this;this.current(function(e){var t=null!=e?e.length:0;0<i.maximumSelectionLength&&t>=i.maximumSelectionLength?i.trigger("results:message",{message:"maximumSelected",args:{maximum:i.maximumSelectionLength}}):n&&n()})},e}),e.define("select2/dropdown",["jquery","./utils"],function(t,e){function n(e,t){this.$element=e,this.options=t,n.__super__.constructor.call(this)}return e.Extend(n,e.Observable),n.prototype.render=function(){var e=t('<span class="select2-dropdown"><span class="select2-results"></span></span>');return e.attr("dir",this.options.get("dir")),this.$dropdown=e},n.prototype.bind=function(){},n.prototype.position=function(e,t){},n.prototype.destroy=function(){this.$dropdown.remove()},n}),e.define("select2/dropdown/search",["jquery","../utils"],function(o,e){function t(){}return t.prototype.render=function(e){var t=e.call(this),n=o('<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="searchbox" aria-autocomplete="list" /></span>');return this.$searchContainer=n,this.$search=n.find("input"),t.prepend(n),t},t.prototype.bind=function(e,t,n){var i=this,r=t.id+"-results";e.call(this,t,n),this.$search.on("keydown",function(e){i.trigger("keypress",e),i._keyUpPrevented=e.isDefaultPrevented()}),this.$search.on("input",function(e){o(this).off("keyup")}),this.$search.on("keyup input",function(e){i.handleSearch(e)}),t.on("open",function(){i.$search.attr("tabindex",0),i.$search.attr("aria-controls",r),i.$search.trigger("focus"),window.setTimeout(function(){i.$search.trigger("focus")},0)}),t.on("close",function(){i.$search.attr("tabindex",-1),i.$search.removeAttr("aria-controls"),i.$search.removeAttr("aria-activedescendant"),i.$search.val(""),i.$search.trigger("blur")}),t.on("focus",function(){t.isOpen()||i.$search.trigger("focus")}),t.on("results:all",function(e){null!=e.query.term&&""!==e.query.term||(i.showSearch(e)?i.$searchContainer.removeClass("select2-search--hide"):i.$searchContainer.addClass("select2-search--hide"))}),t.on("results:focus",function(e){e.data._resultId?i.$search.attr("aria-activedescendant",e.data._resultId):i.$search.removeAttr("aria-activedescendant")})},t.prototype.handleSearch=function(e){if(!this._keyUpPrevented){var t=this.$search.val();this.trigger("query",{term:t})}this._keyUpPrevented=!1},t.prototype.showSearch=function(e,t){return!0},t}),e.define("select2/dropdown/hidePlaceholder",[],function(){function e(e,t,n,i){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n,i)}return e.prototype.append=function(e,t){t.results=this.removePlaceholder(t.results),e.call(this,t)},e.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},e.prototype.removePlaceholder=function(e,t){for(var n=t.slice(0),i=t.length-1;0<=i;i--){var r=t[i];this.placeholder.id===r.id&&n.splice(i,1)}return n},e}),e.define("select2/dropdown/infiniteScroll",["jquery"],function(n){function e(e,t,n,i){this.lastParams={},e.call(this,t,n,i),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return e.prototype.append=function(e,t){this.$loadingMore.remove(),this.loading=!1,e.call(this,t),this.showLoadingMore(t)&&(this.$results.append(this.$loadingMore),this.loadMoreIfNeeded())},e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("query",function(e){i.lastParams=e,i.loading=!0}),t.on("query:append",function(e){i.lastParams=e,i.loading=!0}),this.$results.on("scroll",this.loadMoreIfNeeded.bind(this))},e.prototype.loadMoreIfNeeded=function(){var e=n.contains(document.documentElement,this.$loadingMore[0]);if(!this.loading&&e){var t=this.$results.offset().top+this.$results.outerHeight(!1);this.$loadingMore.offset().top+this.$loadingMore.outerHeight(!1)<=t+50&&this.loadMore()}},e.prototype.loadMore=function(){this.loading=!0;var e=n.extend({},{page:1},this.lastParams);e.page++,this.trigger("query:append",e)},e.prototype.showLoadingMore=function(e,t){return t.pagination&&t.pagination.more},e.prototype.createLoadingMore=function(){var e=n('<li class="select2-results__option select2-results__option--load-more"role="option" aria-disabled="true"></li>'),t=this.options.get("translations").get("loadingMore");return e.html(t(this.lastParams)),e},e}),e.define("select2/dropdown/attachBody",["jquery","../utils"],function(f,a){function e(e,t,n){this.$dropdownParent=f(n.get("dropdownParent")||document.body),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("open",function(){i._showDropdown(),i._attachPositioningHandler(t),i._bindContainerResultHandlers(t)}),t.on("close",function(){i._hideDropdown(),i._detachPositioningHandler(t)}),this.$dropdownContainer.on("mousedown",function(e){e.stopPropagation()})},e.prototype.destroy=function(e){e.call(this),this.$dropdownContainer.remove()},e.prototype.position=function(e,t,n){t.attr("class",n.attr("class")),t.removeClass("select2"),t.addClass("select2-container--open"),t.css({position:"absolute",top:-999999}),this.$container=n},e.prototype.render=function(e){var t=f("<span></span>"),n=e.call(this);return t.append(n),this.$dropdownContainer=t},e.prototype._hideDropdown=function(e){this.$dropdownContainer.detach()},e.prototype._bindContainerResultHandlers=function(e,t){if(!this._containerResultsHandlersBound){var n=this;t.on("results:all",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("results:append",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("results:message",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("select",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("unselect",function(){n._positionDropdown(),n._resizeDropdown()}),this._containerResultsHandlersBound=!0}},e.prototype._attachPositioningHandler=function(e,t){var n=this,i="scroll.select2."+t.id,r="resize.select2."+t.id,o="orientationchange.select2."+t.id,s=this.$container.parents().filter(a.hasScroll);s.each(function(){a.StoreData(this,"select2-scroll-position",{x:f(this).scrollLeft(),y:f(this).scrollTop()})}),s.on(i,function(e){var t=a.GetData(this,"select2-scroll-position");f(this).scrollTop(t.y)}),f(window).on(i+" "+r+" "+o,function(e){n._positionDropdown(),n._resizeDropdown()})},e.prototype._detachPositioningHandler=function(e,t){var n="scroll.select2."+t.id,i="resize.select2."+t.id,r="orientationchange.select2."+t.id;this.$container.parents().filter(a.hasScroll).off(n),f(window).off(n+" "+i+" "+r)},e.prototype._positionDropdown=function(){var e=f(window),t=this.$dropdown.hasClass("select2-dropdown--above"),n=this.$dropdown.hasClass("select2-dropdown--below"),i=null,r=this.$container.offset();r.bottom=r.top+this.$container.outerHeight(!1);var o={height:this.$container.outerHeight(!1)};o.top=r.top,o.bottom=r.top+o.height;var s=this.$dropdown.outerHeight(!1),a=e.scrollTop(),l=e.scrollTop()+e.height(),c=a<r.top-s,u=l>r.bottom+s,d={left:r.left,top:o.bottom},p=this.$dropdownParent;"static"===p.css("position")&&(p=p.offsetParent());var h={top:0,left:0};(f.contains(document.body,p[0])||p[0].isConnected)&&(h=p.offset()),d.top-=h.top,d.left-=h.left,t||n||(i="below"),u||!c||t?!c&&u&&t&&(i="below"):i="above",("above"==i||t&&"below"!==i)&&(d.top=o.top-h.top-s),null!=i&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+i),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+i)),this.$dropdownContainer.css(d)},e.prototype._resizeDropdown=function(){var e={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(e.minWidth=e.width,e.position="relative",e.width="auto"),this.$dropdown.css(e)},e.prototype._showDropdown=function(e){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},e}),e.define("select2/dropdown/minimumResultsForSearch",[],function(){function e(e,t,n,i){this.minimumResultsForSearch=n.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),e.call(this,t,n,i)}return e.prototype.showSearch=function(e,t){return!(function e(t){for(var n=0,i=0;i<t.length;i++){var r=t[i];r.children?n+=e(r.children):n++}return n}(t.data.results)<this.minimumResultsForSearch)&&e.call(this,t)},e}),e.define("select2/dropdown/selectOnClose",["../utils"],function(o){function e(){}return e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("close",function(e){i._handleSelectOnClose(e)})},e.prototype._handleSelectOnClose=function(e,t){if(t&&null!=t.originalSelect2Event){var n=t.originalSelect2Event;if("select"===n._type||"unselect"===n._type)return}var i=this.getHighlightedResults();if(!(i.length<1)){var r=o.GetData(i[0],"data");null!=r.element&&r.element.selected||null==r.element&&r.selected||this.trigger("select",{data:r})}},e}),e.define("select2/dropdown/closeOnSelect",[],function(){function e(){}return e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("select",function(e){i._selectTriggered(e)}),t.on("unselect",function(e){i._selectTriggered(e)})},e.prototype._selectTriggered=function(e,t){var n=t.originalEvent;n&&(n.ctrlKey||n.metaKey)||this.trigger("close",{originalEvent:n,originalSelect2Event:t})},e}),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 1!=t&&(n+="s"),n},inputTooShort:function(e){return"Please enter "+(e.minimum-e.input.length)+" or more characters"},loadingMore:function(){return"Loading more results…"},maximumSelected:function(e){var t="You can only select "+e.maximum+" item";return 1!=e.maximum&&(t+="s"),t},noResults:function(){return"No results found"},searching:function(){return"Searching…"},removeAllItems:function(){return"Remove all items"}}}),e.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(c,u,d,p,h,f,g,m,v,y,s,t,_,w,$,b,A,x,D,S,C,E,O,T,q,j,L,I,e){function n(){this.reset()}return n.prototype.apply=function(e){if(null==(e=c.extend(!0,{},this.defaults,e)).dataAdapter){if(null!=e.ajax?e.dataAdapter=$:null!=e.data?e.dataAdapter=w:e.dataAdapter=_,0<e.minimumInputLength&&(e.dataAdapter=y.Decorate(e.dataAdapter,x)),0<e.maximumInputLength&&(e.dataAdapter=y.Decorate(e.dataAdapter,D)),0<e.maximumSelectionLength&&(e.dataAdapter=y.Decorate(e.dataAdapter,S)),e.tags&&(e.dataAdapter=y.Decorate(e.dataAdapter,b)),null==e.tokenSeparators&&null==e.tokenizer||(e.dataAdapter=y.Decorate(e.dataAdapter,A)),null!=e.query){var t=u(e.amdBase+"compat/query");e.dataAdapter=y.Decorate(e.dataAdapter,t)}if(null!=e.initSelection){var n=u(e.amdBase+"compat/initSelection");e.dataAdapter=y.Decorate(e.dataAdapter,n)}}if(null==e.resultsAdapter&&(e.resultsAdapter=d,null!=e.ajax&&(e.resultsAdapter=y.Decorate(e.resultsAdapter,T)),null!=e.placeholder&&(e.resultsAdapter=y.Decorate(e.resultsAdapter,O)),e.selectOnClose&&(e.resultsAdapter=y.Decorate(e.resultsAdapter,L))),null==e.dropdownAdapter){if(e.multiple)e.dropdownAdapter=C;else{var i=y.Decorate(C,E);e.dropdownAdapter=i}if(0!==e.minimumResultsForSearch&&(e.dropdownAdapter=y.Decorate(e.dropdownAdapter,j)),e.closeOnSelect&&(e.dropdownAdapter=y.Decorate(e.dropdownAdapter,I)),null!=e.dropdownCssClass||null!=e.dropdownCss||null!=e.adaptDropdownCssClass){var r=u(e.amdBase+"compat/dropdownCss");e.dropdownAdapter=y.Decorate(e.dropdownAdapter,r)}e.dropdownAdapter=y.Decorate(e.dropdownAdapter,q)}if(null==e.selectionAdapter){if(e.multiple?e.selectionAdapter=h:e.selectionAdapter=p,null!=e.placeholder&&(e.selectionAdapter=y.Decorate(e.selectionAdapter,f)),e.allowClear&&(e.selectionAdapter=y.Decorate(e.selectionAdapter,g)),e.multiple&&(e.selectionAdapter=y.Decorate(e.selectionAdapter,m)),null!=e.containerCssClass||null!=e.containerCss||null!=e.adaptContainerCssClass){var o=u(e.amdBase+"compat/containerCss");e.selectionAdapter=y.Decorate(e.selectionAdapter,o)}e.selectionAdapter=y.Decorate(e.selectionAdapter,v)}e.language=this._resolveLanguage(e.language),e.language.push("en");for(var s=[],a=0;a<e.language.length;a++){var l=e.language[a];-1===s.indexOf(l)&&s.push(l)}return e.language=s,e.translations=this._processTranslations(e.language,e.debug),e},n.prototype.reset=function(){function a(e){return e.replace(/[^\u0000-\u007E]/g,function(e){return t[e]||e})}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:y.escapeMarkup,language:{},matcher:function e(t,n){if(""===c.trim(t.term))return n;if(n.children&&0<n.children.length){for(var i=c.extend(!0,{},n),r=n.children.length-1;0<=r;r--)null==e(t,n.children[r])&&i.children.splice(r,1);return 0<i.children.length?i:e(t,i)}var o=a(n.text).toUpperCase(),s=a(t.term).toUpperCase();return-1<o.indexOf(s)?n:null},minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,scrollAfterSelect:!1,sorter:function(e){return e},templateResult:function(e){return e.text},templateSelection:function(e){return e.text},theme:"default",width:"resolve"}},n.prototype.applyFromElement=function(e,t){var n=e.language,i=this.defaults.language,r=t.prop("lang"),o=t.closest("[lang]").prop("lang"),s=Array.prototype.concat.call(this._resolveLanguage(r),this._resolveLanguage(n),this._resolveLanguage(i),this._resolveLanguage(o));return e.language=s,e},n.prototype._resolveLanguage=function(e){if(!e)return[];if(c.isEmptyObject(e))return[];if(c.isPlainObject(e))return[e];var t;t=c.isArray(e)?e:[e];for(var n=[],i=0;i<t.length;i++)if(n.push(t[i]),"string"==typeof t[i]&&0<t[i].indexOf("-")){var r=t[i].split("-")[0];n.push(r)}return n},n.prototype._processTranslations=function(e,t){for(var n=new s,i=0;i<e.length;i++){var r=new s,o=e[i];if("string"==typeof o)try{r=s.loadPath(o)}catch(e){try{o=this.defaults.amdLanguageBase+o,r=s.loadPath(o)}catch(e){t&&window.console&&console.warn&&console.warn('Select2: The language file for "'+o+'" could not be automatically loaded. A fallback will be used instead.')}}else r=c.isPlainObject(o)?new s(o):o;n.extend(r)}return n},n.prototype.set=function(e,t){var n={};n[c.camelCase(e)]=t;var i=y._convertData(n);c.extend(!0,this.defaults,i)},new n}),e.define("select2/options",["require","jquery","./defaults","./utils"],function(i,d,r,p){function e(e,t){if(this.options=e,null!=t&&this.fromElement(t),null!=t&&(this.options=r.applyFromElement(this.options,t)),this.options=r.apply(this.options),t&&t.is("input")){var n=i(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=p.Decorate(this.options.dataAdapter,n)}}return e.prototype.fromElement=function(e){var t=["select2"];null==this.options.multiple&&(this.options.multiple=e.prop("multiple")),null==this.options.disabled&&(this.options.disabled=e.prop("disabled")),null==this.options.dir&&(e.prop("dir")?this.options.dir=e.prop("dir"):e.closest("[dir]").prop("dir")?this.options.dir=e.closest("[dir]").prop("dir"):this.options.dir="ltr"),e.prop("disabled",this.options.disabled),e.prop("multiple",this.options.multiple),p.GetData(e[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.'),p.StoreData(e[0],"data",p.GetData(e[0],"select2Tags")),p.StoreData(e[0],"tags",!0)),p.GetData(e[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."),e.attr("ajax--url",p.GetData(e[0],"ajaxUrl")),p.StoreData(e[0],"ajax-Url",p.GetData(e[0],"ajaxUrl")));var n={};function i(e,t){return t.toUpperCase()}for(var r=0;r<e[0].attributes.length;r++){var o=e[0].attributes[r].name,s="data-";if(o.substr(0,s.length)==s){var a=o.substring(s.length),l=p.GetData(e[0],a);n[a.replace(/-([a-z])/g,i)]=l}}d.fn.jquery&&"1."==d.fn.jquery.substr(0,2)&&e[0].dataset&&(n=d.extend(!0,{},e[0].dataset,n));var c=d.extend(!0,{},p.GetData(e[0]),n);for(var u in c=p._convertData(c))-1<d.inArray(u,t)||(d.isPlainObject(this.options[u])?d.extend(this.options[u],c[u]):this.options[u]=c[u]);return this},e.prototype.get=function(e){return this.options[e]},e.prototype.set=function(e,t){this.options[e]=t},e}),e.define("select2/core",["jquery","./options","./utils","./keys"],function(o,c,u,i){var d=function(e,t){null!=u.GetData(e[0],"select2")&&u.GetData(e[0],"select2").destroy(),this.$element=e,this.id=this._generateId(e),t=t||{},this.options=new c(t,e),d.__super__.constructor.call(this);var n=e.attr("tabindex")||0;u.StoreData(e[0],"old-tabindex",n),e.attr("tabindex","-1");var i=this.options.get("dataAdapter");this.dataAdapter=new i(e,this.options);var r=this.render();this._placeContainer(r);var o=this.options.get("selectionAdapter");this.selection=new o(e,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,r);var s=this.options.get("dropdownAdapter");this.dropdown=new s(e,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,r);var a=this.options.get("resultsAdapter");this.results=new a(e,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(e){l.trigger("selection:update",{data:e})}),e.addClass("select2-hidden-accessible"),e.attr("aria-hidden","true"),this._syncAttributes(),u.StoreData(e[0],"select2",this),e.data("select2",this)};return u.Extend(d,u.Observable),d.prototype._generateId=function(e){return"select2-"+(null!=e.attr("id")?e.attr("id"):null!=e.attr("name")?e.attr("name")+"-"+u.generateChars(2):u.generateChars(4)).replace(/(:|\.|\[|\]|,)/g,"")},d.prototype._placeContainer=function(e){e.insertAfter(this.$element);var t=this._resolveWidth(this.$element,this.options.get("width"));null!=t&&e.css("width",t)},d.prototype._resolveWidth=function(e,t){var n=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==t){var i=this._resolveWidth(e,"style");return null!=i?i:this._resolveWidth(e,"element")}if("element"==t){var r=e.outerWidth(!1);return r<=0?"auto":r+"px"}if("style"!=t)return"computedstyle"!=t?t:window.getComputedStyle(e[0]).width;var o=e.attr("style");if("string"!=typeof o)return null;for(var s=o.split(";"),a=0,l=s.length;a<l;a+=1){var c=s[a].replace(/\s/g,"").match(n);if(null!==c&&1<=c.length)return c[1]}return null},d.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)},d.prototype._registerDomEvents=function(){var t=this;this.$element.on("change.select2",function(){t.dataAdapter.current(function(e){t.trigger("selection:update",{data:e})})}),this.$element.on("focus.select2",function(e){t.trigger("focus",e)}),this._syncA=u.bind(this._syncAttributes,this),this._syncS=u.bind(this._syncSubtree,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._syncA);var e=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=e?(this._observer=new e(function(e){t._syncA(),t._syncS(null,e)}),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})):this.$element[0].addEventListener&&(this.$element[0].addEventListener("DOMAttrModified",t._syncA,!1),this.$element[0].addEventListener("DOMNodeInserted",t._syncS,!1),this.$element[0].addEventListener("DOMNodeRemoved",t._syncS,!1))},d.prototype._registerDataEvents=function(){var n=this;this.dataAdapter.on("*",function(e,t){n.trigger(e,t)})},d.prototype._registerSelectionEvents=function(){var n=this,i=["toggle","focus"];this.selection.on("toggle",function(){n.toggleDropdown()}),this.selection.on("focus",function(e){n.focus(e)}),this.selection.on("*",function(e,t){-1===o.inArray(e,i)&&n.trigger(e,t)})},d.prototype._registerDropdownEvents=function(){var n=this;this.dropdown.on("*",function(e,t){n.trigger(e,t)})},d.prototype._registerResultsEvents=function(){var n=this;this.results.on("*",function(e,t){n.trigger(e,t)})},d.prototype._registerEvents=function(){var n=this;this.on("open",function(){n.$container.addClass("select2-container--open")}),this.on("close",function(){n.$container.removeClass("select2-container--open")}),this.on("enable",function(){n.$container.removeClass("select2-container--disabled")}),this.on("disable",function(){n.$container.addClass("select2-container--disabled")}),this.on("blur",function(){n.$container.removeClass("select2-container--focus")}),this.on("query",function(t){n.isOpen()||n.trigger("open",{}),this.dataAdapter.query(t,function(e){n.trigger("results:all",{data:e,query:t})})}),this.on("query:append",function(t){this.dataAdapter.query(t,function(e){n.trigger("results:append",{data:e,query:t})})}),this.on("keypress",function(e){var t=e.which;n.isOpen()?t===i.ESC||t===i.TAB||t===i.UP&&e.altKey?(n.close(e),e.preventDefault()):t===i.ENTER?(n.trigger("results:select",{}),e.preventDefault()):t===i.SPACE&&e.ctrlKey?(n.trigger("results:toggle",{}),e.preventDefault()):t===i.UP?(n.trigger("results:previous",{}),e.preventDefault()):t===i.DOWN&&(n.trigger("results:next",{}),e.preventDefault()):(t===i.ENTER||t===i.SPACE||t===i.DOWN&&e.altKey)&&(n.open(),e.preventDefault())})},d.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.isDisabled()?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},d.prototype._isChangeMutation=function(e,t){var n=!1,i=this;if(!e||!e.target||"OPTION"===e.target.nodeName||"OPTGROUP"===e.target.nodeName){if(t)if(t.addedNodes&&0<t.addedNodes.length)for(var r=0;r<t.addedNodes.length;r++){t.addedNodes[r].selected&&(n=!0)}else t.removedNodes&&0<t.removedNodes.length?n=!0:o.isArray(t)&&o.each(t,function(e,t){if(i._isChangeMutation(e,t))return!(n=!0)});else n=!0;return n}},d.prototype._syncSubtree=function(e,t){var n=this._isChangeMutation(e,t),i=this;n&&this.dataAdapter.current(function(e){i.trigger("selection:update",{data:e})})},d.prototype.trigger=function(e,t){var n=d.__super__.trigger,i={open:"opening",close:"closing",select:"selecting",unselect:"unselecting",clear:"clearing"};if(void 0===t&&(t={}),e in i){var r=i[e],o={prevented:!1,name:e,args:t};if(n.call(this,r,o),o.prevented)return void(t.prevented=!0)}n.call(this,e,t)},d.prototype.toggleDropdown=function(){this.isDisabled()||(this.isOpen()?this.close():this.open())},d.prototype.open=function(){this.isOpen()||this.isDisabled()||this.trigger("query",{})},d.prototype.close=function(e){this.isOpen()&&this.trigger("close",{originalEvent:e})},d.prototype.isEnabled=function(){return!this.isDisabled()},d.prototype.isDisabled=function(){return this.options.get("disabled")},d.prototype.isOpen=function(){return this.$container.hasClass("select2-container--open")},d.prototype.hasFocus=function(){return this.$container.hasClass("select2-container--focus")},d.prototype.focus=function(e){this.hasFocus()||(this.$container.addClass("select2-container--focus"),this.trigger("focus",{}))},d.prototype.enable=function(e){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!=e&&0!==e.length||(e=[!0]);var t=!e[0];this.$element.prop("disabled",t)},d.prototype.data=function(){this.options.get("debug")&&0<arguments.length&&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 t=[];return this.dataAdapter.current(function(e){t=e}),t},d.prototype.val=function(e){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==e||0===e.length)return this.$element.val();var t=e[0];o.isArray(t)&&(t=o.map(t,function(e){return e.toString()})),this.$element.val(t).trigger("input").trigger("change")},d.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",u.GetData(this.$element[0],"old-tabindex")),this.$element.removeClass("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),u.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},d.prototype.render=function(){var e=o('<span class="select2 select2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');return e.attr("dir",this.options.get("dir")),this.$container=e,this.$container.addClass("select2-container--"+this.options.get("theme")),u.StoreData(e[0],"element",this.$element),e},d}),e.define("select2/compat/utils",["jquery"],function(s){return{syncCssClasses:function(e,t,n){var i,r,o=[];(i=s.trim(e.attr("class")))&&s((i=""+i).split(/\s+/)).each(function(){0===this.indexOf("select2-")&&o.push(this)}),(i=s.trim(t.attr("class")))&&s((i=""+i).split(/\s+/)).each(function(){0!==this.indexOf("select2-")&&null!=(r=n(this))&&o.push(r)}),e.attr("class",o.join(" "))}}}),e.define("select2/compat/containerCss",["jquery","./utils"],function(s,a){function l(e){return null}function e(){}return e.prototype.render=function(e){var t=e.call(this),n=this.options.get("containerCssClass")||"";s.isFunction(n)&&(n=n(this.$element));var i=this.options.get("adaptContainerCssClass");if(i=i||l,-1!==n.indexOf(":all:")){n=n.replace(":all:","");var r=i;i=function(e){var t=r(e);return null!=t?t+" "+e:e}}var o=this.options.get("containerCss")||{};return s.isFunction(o)&&(o=o(this.$element)),a.syncCssClasses(t,this.$element,i),t.css(o),t.addClass(n),t},e}),e.define("select2/compat/dropdownCss",["jquery","./utils"],function(s,a){function l(e){return null}function e(){}return e.prototype.render=function(e){var t=e.call(this),n=this.options.get("dropdownCssClass")||"";s.isFunction(n)&&(n=n(this.$element));var i=this.options.get("adaptDropdownCssClass");if(i=i||l,-1!==n.indexOf(":all:")){n=n.replace(":all:","");var r=i;i=function(e){var t=r(e);return null!=t?t+" "+e:e}}var o=this.options.get("dropdownCss")||{};return s.isFunction(o)&&(o=o(this.$element)),a.syncCssClasses(t,this.$element,i),t.css(o),t.addClass(n),t},e}),e.define("select2/compat/initSelection",["jquery"],function(i){function e(e,t,n){n.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=n.get("initSelection"),this._isInitialized=!1,e.call(this,t,n)}return e.prototype.current=function(e,t){var n=this;this._isInitialized?e.call(this,t):this.initSelection.call(null,this.$element,function(e){n._isInitialized=!0,i.isArray(e)||(e=[e]),t(e)})},e}),e.define("select2/compat/inputData",["jquery","../utils"],function(s,i){function e(e,t,n){this._currentData=[],this._valueSeparator=n.get("valueSeparator")||",","hidden"===t.prop("type")&&n.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."),e.call(this,t,n)}return e.prototype.current=function(e,t){function i(e,t){var n=[];return e.selected||-1!==s.inArray(e.id,t)?(e.selected=!0,n.push(e)):e.selected=!1,e.children&&n.push.apply(n,i(e.children,t)),n}for(var n=[],r=0;r<this._currentData.length;r++){var o=this._currentData[r];n.push.apply(n,i(o,this.$element.val().split(this._valueSeparator)))}t(n)},e.prototype.select=function(e,t){if(this.options.get("multiple")){var n=this.$element.val();n+=this._valueSeparator+t.id,this.$element.val(n),this.$element.trigger("input").trigger("change")}else this.current(function(e){s.map(e,function(e){e.selected=!1})}),this.$element.val(t.id),this.$element.trigger("input").trigger("change")},e.prototype.unselect=function(e,r){var o=this;r.selected=!1,this.current(function(e){for(var t=[],n=0;n<e.length;n++){var i=e[n];r.id!=i.id&&t.push(i.id)}o.$element.val(t.join(o._valueSeparator)),o.$element.trigger("input").trigger("change")})},e.prototype.query=function(e,t,n){for(var i=[],r=0;r<this._currentData.length;r++){var o=this._currentData[r],s=this.matches(t,o);null!==s&&i.push(s)}n({results:i})},e.prototype.addOptions=function(e,t){var n=s.map(t,function(e){return i.GetData(e[0],"data")});this._currentData.push.apply(this._currentData,n)},e}),e.define("select2/compat/matcher",["jquery"],function(s){return function(o){return function(e,t){var n=s.extend(!0,{},t);if(null==e.term||""===s.trim(e.term))return n;if(t.children){for(var i=t.children.length-1;0<=i;i--){var r=t.children[i];o(e.term,r.text,r)||n.children.splice(i,1)}if(0<n.children.length)return n}return o(e.term,t.text,t)?n:null}}}),e.define("select2/compat/query",[],function(){function e(e,t,n){n.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."),e.call(this,t,n)}return e.prototype.query=function(e,t,n){t.callback=n,this.options.get("query").call(null,t)},e}),e.define("select2/dropdown/attachContainer",[],function(){function e(e,t,n){e.call(this,t,n)}return e.prototype.position=function(e,t,n){n.find(".dropdown-wrapper").append(t),t.addClass("select2-dropdown--below"),n.addClass("select2-container--below")},e}),e.define("select2/dropdown/stopPropagation",[],function(){function e(){}return e.prototype.bind=function(e,t,n){e.call(this,t,n);this.$dropdown.on(["blur","change","click","dblclick","focus","focusin","focusout","input","keydown","keyup","keypress","mousedown","mouseenter","mouseleave","mousemove","mouseover","mouseup","search","touchend","touchstart"].join(" "),function(e){e.stopPropagation()})},e}),e.define("select2/selection/stopPropagation",[],function(){function e(){}return e.prototype.bind=function(e,t,n){e.call(this,t,n);this.$selection.on(["blur","change","click","dblclick","focus","focusin","focusout","input","keydown","keyup","keypress","mousedown","mouseenter","mouseleave","mousemove","mouseover","mouseup","search","touchend","touchstart"].join(" "),function(e){e.stopPropagation()})},e}),l=function(p){var h,f,e=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],t="onwheel"in document||9<=document.documentMode?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],g=Array.prototype.slice;if(p.event.fixHooks)for(var n=e.length;n;)p.event.fixHooks[e[--n]]=p.event.mouseHooks;var m=p.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var e=t.length;e;)this.addEventListener(t[--e],i,!1);else this.onmousewheel=i;p.data(this,"mousewheel-line-height",m.getLineHeight(this)),p.data(this,"mousewheel-page-height",m.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var e=t.length;e;)this.removeEventListener(t[--e],i,!1);else this.onmousewheel=null;p.removeData(this,"mousewheel-line-height"),p.removeData(this,"mousewheel-page-height")},getLineHeight:function(e){var t=p(e),n=t["offsetParent"in p.fn?"offsetParent":"parent"]();return n.length||(n=p("body")),parseInt(n.css("fontSize"),10)||parseInt(t.css("fontSize"),10)||16},getPageHeight:function(e){return p(e).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};function i(e){var t,n=e||window.event,i=g.call(arguments,1),r=0,o=0,s=0,a=0,l=0;if((e=p.event.fix(n)).type="mousewheel","detail"in n&&(s=-1*n.detail),"wheelDelta"in n&&(s=n.wheelDelta),"wheelDeltaY"in n&&(s=n.wheelDeltaY),"wheelDeltaX"in n&&(o=-1*n.wheelDeltaX),"axis"in n&&n.axis===n.HORIZONTAL_AXIS&&(o=-1*s,s=0),r=0===s?o:s,"deltaY"in n&&(r=s=-1*n.deltaY),"deltaX"in n&&(o=n.deltaX,0===s&&(r=-1*o)),0!==s||0!==o){if(1===n.deltaMode){var c=p.data(this,"mousewheel-line-height");r*=c,s*=c,o*=c}else if(2===n.deltaMode){var u=p.data(this,"mousewheel-page-height");r*=u,s*=u,o*=u}if(t=Math.max(Math.abs(s),Math.abs(o)),(!f||t<f)&&y(n,f=t)&&(f/=40),y(n,t)&&(r/=40,o/=40,s/=40),r=Math[1<=r?"floor":"ceil"](r/f),o=Math[1<=o?"floor":"ceil"](o/f),s=Math[1<=s?"floor":"ceil"](s/f),m.settings.normalizeOffset&&this.getBoundingClientRect){var d=this.getBoundingClientRect();a=e.clientX-d.left,l=e.clientY-d.top}return e.deltaX=o,e.deltaY=s,e.deltaFactor=f,e.offsetX=a,e.offsetY=l,e.deltaMode=0,i.unshift(e,r,o,s),h&&clearTimeout(h),h=setTimeout(v,200),(p.event.dispatch||p.event.handle).apply(this,i)}}function v(){f=null}function y(e,t){return m.settings.adjustOldDeltas&&"mousewheel"===e.type&&t%120==0}p.fn.extend({mousewheel:function(e){return e?this.bind("mousewheel",e):this.trigger("mousewheel")},unmousewheel:function(e){return this.unbind("mousewheel",e)}})},"function"==typeof e.define&&e.define.amd?e.define("jquery-mousewheel",["jquery"],l):"object"==typeof exports?module.exports=l:l(d),e.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults","./select2/utils"],function(r,e,o,t,s){if(null==r.fn.select2){var a=["open","close","destroy"];r.fn.select2=function(t){if("object"==typeof(t=t||{}))return this.each(function(){var e=r.extend(!0,{},t);new o(r(this),e)}),this;if("string"!=typeof t)throw new Error("Invalid arguments for Select2: "+t);var n,i=Array.prototype.slice.call(arguments,1);return this.each(function(){var e=s.GetData(this,"select2");null==e&&window.console&&console.error&&console.error("The select2('"+t+"') method was called on an element that is not using Select2."),n=e[t].apply(e,i)}),-1<r.inArray(t,a)?this:n}}return null==r.fn.select2.defaults&&(r.fn.select2.defaults=t),o}),{define:e.define,require:e.require}}(),t=e.require("jquery.select2");return d.fn.select2.amd=e,t});
|
assets/select2/select2.min.css
CHANGED
@@ -1 +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}
|
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__clear{cursor:pointer;float:right;font-weight:bold;margin-top:5px;margin-right:10px;padding:1px}.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-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}
|
includes/class-folders.php
CHANGED
@@ -34,6 +34,7 @@ class Responsive_Lightbox_Folders {
|
|
34 |
add_action( 'restrict_manage_posts', array( $this, 'restrict_manage_posts' ) );
|
35 |
add_action( 'wp_enqueue_media', array( $this, 'add_library_scripts' ) );
|
36 |
add_action( 'admin_enqueue_scripts', array( $this, 'add_library_scripts' ) );
|
|
|
37 |
add_action( 'post-upload-ui', array( $this, 'post_upload_ui' ) );
|
38 |
add_action( 'add_attachment', array( $this, 'add_attachment' ) );
|
39 |
add_action( 'wp_ajax_save-attachment-compat', array( $this, 'ajax_save_attachment_compat' ), 0 );
|
@@ -49,6 +50,7 @@ class Responsive_Lightbox_Folders {
|
|
49 |
add_filter( 'parse_query', array( $this, 'parse_query' ) );
|
50 |
add_filter( 'ajax_query_attachments_args', array( $this, 'ajax_query_attachments_args' ) );
|
51 |
add_filter( 'attachment_fields_to_edit', array( $this, 'attachment_fields_to_edit' ), 10, 2 );
|
|
|
52 |
}
|
53 |
|
54 |
/**
|
@@ -194,6 +196,27 @@ class Responsive_Lightbox_Folders {
|
|
194 |
return wp_dropdown_categories( $args );
|
195 |
}
|
196 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
197 |
/**
|
198 |
* Display dropdown at media upload UI screen.
|
199 |
*
|
@@ -254,6 +277,7 @@ class Responsive_Lightbox_Folders {
|
|
254 |
// get taxonomy
|
255 |
$taxonomy = Responsive_Lightbox()->options['folders']['media_taxonomy'];
|
256 |
|
|
|
257 |
if ( is_array( term_exists( $term_id, $taxonomy ) ) )
|
258 |
wp_set_object_terms( $post_id, $term_id, $taxonomy, false );
|
259 |
}
|
@@ -773,25 +797,34 @@ class Responsive_Lightbox_Folders {
|
|
773 |
// get taxonomy
|
774 |
$taxonomy = Responsive_Lightbox()->options['folders']['media_taxonomy'];
|
775 |
|
|
|
|
|
|
|
|
|
|
|
776 |
if ( ! empty( $matches[1] ) ) {
|
777 |
$params = parse_url( html_entity_decode( urldecode( $matches[1] ) ) );
|
778 |
|
779 |
if ( isset( $params['query'] ) ) {
|
|
|
780 |
parse_str( $params['query'], $atts );
|
781 |
|
782 |
if ( isset( $atts['term'] ) ) {
|
|
|
783 |
$term = get_term_by( 'slug', $atts['term'], $taxonomy );
|
784 |
|
|
|
785 |
if ( $term !== false ) {
|
786 |
$this->term_counters['keys'][] = $term->term_id;
|
787 |
|
788 |
-
|
|
|
789 |
}
|
790 |
}
|
791 |
}
|
792 |
}
|
793 |
|
794 |
-
return 'href="' .
|
795 |
}
|
796 |
|
797 |
/**
|
@@ -860,239 +893,284 @@ class Responsive_Lightbox_Folders {
|
|
860 |
// get main instance
|
861 |
$rl = Responsive_Lightbox();
|
862 |
|
863 |
-
// include styles
|
864 |
wp_enqueue_style( 'responsive-lightbox-admin-select2', RESPONSIVE_LIGHTBOX_URL . '/assets/select2/select2' . ( ! ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '.min' : '' ) . '.css', array(), $rl->defaults['version'] );
|
865 |
-
wp_enqueue_style( 'responsive-lightbox-folders-admin-css', RESPONSIVE_LIGHTBOX_URL . '/css/admin-folders.css' );
|
866 |
-
wp_enqueue_style( 'responsive-lightbox-folders-perfect-scrollbar', RESPONSIVE_LIGHTBOX_URL . '/assets/perfect-scrollbar/perfect-scrollbar' . ( ! ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '.min' : '' ) . '.css' );
|
867 |
-
// wp_enqueue_style( 'responsive-lightbox-folders-jstree', RESPONSIVE_LIGHTBOX_URL . '/assets/jstree/themes/' . $rl->options['folders']['jstree_style'] . '/style' . ( ! ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '.min' : '' ) . '.css' );
|
868 |
-
wp_enqueue_style( 'responsive-lightbox-folders-jstree', RESPONSIVE_LIGHTBOX_URL . '/assets/jstree/themes/default/style' . ( ! ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '.min' : '' ) . '.css' );
|
869 |
|
870 |
-
//
|
871 |
-
|
872 |
|
873 |
-
//
|
874 |
-
$
|
875 |
|
876 |
-
|
877 |
-
|
878 |
-
$current_color_scheme = get_user_option( 'admin_color' );
|
879 |
|
880 |
-
|
881 |
-
|
|
|
|
|
882 |
|
883 |
-
|
884 |
-
|
885 |
-
|
|
|
|
|
886 |
|
887 |
-
|
888 |
-
|
889 |
-
'#rl-folders-tree-container .jstree .rl-folders-state-active.rl-folders-state-hover {
|
890 |
-
background: #fff !important;
|
891 |
-
}
|
892 |
-
#rl-folders-tree-container .jstree-container-ul .jstree-wholerow-clicked,
|
893 |
-
#rl-folders-tree-container .jstree-container-ul:not(.jstree-wholerow-ul) .jstree-clicked {
|
894 |
-
background: rgba(' . $color . ', 0.15);
|
895 |
-
}
|
896 |
-
#rl-folders-tree-container .jstree-container-ul .jstree-wholerow-hovered,
|
897 |
-
#rl-folders-tree-container .jstree-container-ul:not(.jstree-wholerow-ul) .jstree-hovered {
|
898 |
-
background: rgba(' . $color . ', 0.05);
|
899 |
-
}'
|
900 |
-
);
|
901 |
|
902 |
-
|
903 |
-
|
904 |
-
$childless = false;
|
905 |
|
906 |
-
|
907 |
-
|
|
|
908 |
|
909 |
-
|
910 |
-
|
911 |
-
'orderby' => 'name',
|
912 |
-
'order' => 'asc',
|
913 |
-
'show_count' => true,
|
914 |
-
'show_option_all' => '',
|
915 |
-
'show_option_none' => '',
|
916 |
-
'use_desc_for_title' => false,
|
917 |
-
'title_li' => '',
|
918 |
-
'hide_empty' => false,
|
919 |
-
'hierarchical' => true,
|
920 |
-
'taxonomy' => $taxonomy->name,
|
921 |
-
'hide_title_if_empty' => true,
|
922 |
-
'echo' => false
|
923 |
-
);
|
924 |
|
925 |
-
|
926 |
-
|
|
|
927 |
|
928 |
-
|
929 |
-
|
930 |
-
|
931 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
932 |
|
933 |
-
|
934 |
-
|
935 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
936 |
|
937 |
-
//
|
938 |
-
|
939 |
|
940 |
-
//
|
941 |
-
|
|
|
|
|
942 |
|
943 |
-
|
|
|
|
|
944 |
|
945 |
-
|
|
|
946 |
|
947 |
-
|
948 |
-
|
949 |
|
950 |
-
|
951 |
-
ob_end_clean();
|
952 |
|
953 |
-
|
954 |
-
if ( $term_id > 0 ) {
|
955 |
-
$children = get_term_children( $term_id, $taxonomy->name );
|
956 |
|
957 |
-
//
|
958 |
-
$
|
959 |
-
}
|
960 |
-
}
|
961 |
|
962 |
-
|
963 |
-
|
964 |
-
$categories['current_category'] = $term_id;
|
965 |
|
966 |
-
|
967 |
-
|
968 |
-
|
969 |
-
'responsive-lightbox-folders-admin-css',
|
970 |
-
'#media-attachment-rl-folders-filters { display: none; }
|
971 |
-
.media-modal-content .media-frame select.attachment-filters {
|
972 |
-
max-width: 100%;
|
973 |
-
min-width: auto;
|
974 |
-
}'
|
975 |
-
);
|
976 |
-
}
|
977 |
|
978 |
-
|
979 |
-
|
|
|
|
|
980 |
|
981 |
-
|
982 |
-
|
983 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
984 |
|
985 |
-
//
|
986 |
-
$html =
|
987 |
|
988 |
-
|
989 |
-
|
990 |
-
$html = preg_replace_callback( '/
|
991 |
|
992 |
-
|
993 |
-
|
994 |
|
995 |
-
|
996 |
-
|
|
|
997 |
|
998 |
-
|
999 |
-
|
1000 |
-
|
1001 |
-
|
1002 |
-
|
1003 |
-
|
1004 |
-
|
1005 |
-
|
1006 |
-
'no_found_rows' => true,
|
1007 |
-
'tax_query' => array(
|
1008 |
array(
|
1009 |
-
'
|
1010 |
-
|
1011 |
-
|
1012 |
-
|
1013 |
-
|
1014 |
-
|
1015 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1016 |
)
|
1017 |
)
|
1018 |
)
|
1019 |
-
)
|
1020 |
-
|
|
|
|
|
|
|
|
|
|
|
1021 |
|
1022 |
-
$counters[-1] = (int) $count->inherit;
|
1023 |
-
$counters[0] = (int) $root_query->post_count;
|
1024 |
|
1025 |
-
|
1026 |
<ul>
|
1027 |
<li class="cat-item cat-item-all"' . ( $term_id === 0 ? ' data-jstree=\'{ "selected": true }\'' : '' ) . '>
|
1028 |
-
|
1029 |
</li>
|
1030 |
<li class="cat-item cat-item-0" data-jstree=\'{ "opened": true' . ( $term_id === -1 ? ', "selected": true ' : '' ) . ' }\'>
|
1031 |
-
|
1032 |
<ul>' . $html . '</ul>
|
1033 |
</li>
|
1034 |
</ul>';
|
1035 |
|
1036 |
-
|
1037 |
-
|
1038 |
-
|
1039 |
-
wp_register_script( 'responsive-lightbox-folders-perfect-scrollbar', RESPONSIVE_LIGHTBOX_URL . '/assets/perfect-scrollbar/perfect-scrollbar' . ( ! ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '.min' : '' ) . '.js', array(), $rl->defaults['version'], false );
|
1040 |
|
1041 |
-
|
|
|
|
|
1042 |
|
1043 |
-
|
1044 |
-
|
1045 |
-
|
1046 |
-
|
1047 |
-
|
1048 |
-
|
1049 |
-
|
1050 |
-
'
|
1051 |
-
|
1052 |
-
|
1053 |
-
|
1054 |
-
|
1055 |
-
|
1056 |
-
|
1057 |
-
|
1058 |
-
|
1059 |
-
|
1060 |
-
|
1061 |
-
|
1062 |
-
|
1063 |
-
|
1064 |
-
|
1065 |
-
|
1066 |
-
|
1067 |
-
|
1068 |
-
|
1069 |
-
'selected' => ( isset( $_GET[$taxonomy->name] ) ? (int) $_GET[$taxonomy->name] : 0 ),
|
1070 |
-
'name' => $taxonomy->name,
|
1071 |
-
'taxonomy' => $taxonomy->name,
|
1072 |
-
'hide_if_empty' => true,
|
1073 |
-
'echo' => false
|
1074 |
)
|
1075 |
-
)
|
1076 |
-
|
1077 |
-
|
1078 |
-
|
1079 |
-
|
1080 |
-
|
1081 |
-
|
1082 |
-
|
1083 |
-
|
1084 |
-
|
1085 |
-
|
1086 |
-
|
1087 |
-
|
1088 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1089 |
</div>
|
1090 |
-
|
1091 |
-
|
1092 |
-
|
1093 |
-
|
1094 |
-
|
1095 |
-
);
|
1096 |
|
1097 |
add_action( 'admin_print_styles', array( $this, 'admin_print_media_styles' ) );
|
1098 |
}
|
@@ -1107,6 +1185,17 @@ class Responsive_Lightbox_Folders {
|
|
1107 |
}
|
1108 |
|
1109 |
/**
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1110 |
* Get all previously used media taxonomies.
|
1111 |
*
|
1112 |
* @global object $wpdb Database handler
|
34 |
add_action( 'restrict_manage_posts', array( $this, 'restrict_manage_posts' ) );
|
35 |
add_action( 'wp_enqueue_media', array( $this, 'add_library_scripts' ) );
|
36 |
add_action( 'admin_enqueue_scripts', array( $this, 'add_library_scripts' ) );
|
37 |
+
add_action( 'pre-upload-ui', array( $this, 'pre_upload_ui' ) );
|
38 |
add_action( 'post-upload-ui', array( $this, 'post_upload_ui' ) );
|
39 |
add_action( 'add_attachment', array( $this, 'add_attachment' ) );
|
40 |
add_action( 'wp_ajax_save-attachment-compat', array( $this, 'ajax_save_attachment_compat' ), 0 );
|
50 |
add_filter( 'parse_query', array( $this, 'parse_query' ) );
|
51 |
add_filter( 'ajax_query_attachments_args', array( $this, 'ajax_query_attachments_args' ) );
|
52 |
add_filter( 'attachment_fields_to_edit', array( $this, 'attachment_fields_to_edit' ), 10, 2 );
|
53 |
+
add_filter( 'rl_count_attachments', array( $this, 'count_attachments' ), 10 );
|
54 |
}
|
55 |
|
56 |
/**
|
196 |
return wp_dropdown_categories( $args );
|
197 |
}
|
198 |
|
199 |
+
/**
|
200 |
+
* Add filter to add media folder id to the uploader
|
201 |
+
*
|
202 |
+
* @return void
|
203 |
+
*/
|
204 |
+
public function pre_upload_ui() {
|
205 |
+
add_filter( 'upload_post_params', array( $this, 'upload_post_params' ) );
|
206 |
+
}
|
207 |
+
|
208 |
+
/**
|
209 |
+
* Add media folder id param to the uploader
|
210 |
+
*
|
211 |
+
* @param array $params Plupload parameters
|
212 |
+
* @return array
|
213 |
+
*/
|
214 |
+
public function upload_post_params( $params ) {
|
215 |
+
$params['rl_folders_upload_files_term_id'] = 0;
|
216 |
+
|
217 |
+
return $params;
|
218 |
+
}
|
219 |
+
|
220 |
/**
|
221 |
* Display dropdown at media upload UI screen.
|
222 |
*
|
277 |
// get taxonomy
|
278 |
$taxonomy = Responsive_Lightbox()->options['folders']['media_taxonomy'];
|
279 |
|
280 |
+
// valid term?
|
281 |
if ( is_array( term_exists( $term_id, $taxonomy ) ) )
|
282 |
wp_set_object_terms( $post_id, $term_id, $taxonomy, false );
|
283 |
}
|
797 |
// get taxonomy
|
798 |
$taxonomy = Responsive_Lightbox()->options['folders']['media_taxonomy'];
|
799 |
|
800 |
+
// set 'all files' folder
|
801 |
+
$term_id = -1;
|
802 |
+
$url_term_id = 0;
|
803 |
+
|
804 |
+
// any matches?
|
805 |
if ( ! empty( $matches[1] ) ) {
|
806 |
$params = parse_url( html_entity_decode( urldecode( $matches[1] ) ) );
|
807 |
|
808 |
if ( isset( $params['query'] ) ) {
|
809 |
+
// parse query string
|
810 |
parse_str( $params['query'], $atts );
|
811 |
|
812 |
if ( isset( $atts['term'] ) ) {
|
813 |
+
// get term
|
814 |
$term = get_term_by( 'slug', $atts['term'], $taxonomy );
|
815 |
|
816 |
+
// valid term?
|
817 |
if ( $term !== false ) {
|
818 |
$this->term_counters['keys'][] = $term->term_id;
|
819 |
|
820 |
+
// set term ID
|
821 |
+
$url_term_id = $term_id = $term->term_id;
|
822 |
}
|
823 |
}
|
824 |
}
|
825 |
}
|
826 |
|
827 |
+
return 'href="' . esc_url( apply_filters( 'rl_folders_media_folder_url', add_query_arg( array( 'mode' => $this->mode, $taxonomy => $url_term_id ) ), $matches, $this->mode, $url_term_id ) ) . '" data-term_id="' . $term_id . '"';
|
828 |
}
|
829 |
|
830 |
/**
|
893 |
// get main instance
|
894 |
$rl = Responsive_Lightbox();
|
895 |
|
896 |
+
// include select2 styles
|
897 |
wp_enqueue_style( 'responsive-lightbox-admin-select2', RESPONSIVE_LIGHTBOX_URL . '/assets/select2/select2' . ( ! ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '.min' : '' ) . '.css', array(), $rl->defaults['version'] );
|
|
|
|
|
|
|
|
|
898 |
|
899 |
+
// filterable media folders taxonomy
|
900 |
+
$taxonomy = get_taxonomy( $rl->options['folders']['media_taxonomy'] );
|
901 |
|
902 |
+
// main script dependencies
|
903 |
+
$dependencies = array( 'jquery', 'underscore', 'jquery-ui-draggable', 'jquery-ui-droppable', 'media-models', 'tags-suggest' );
|
904 |
|
905 |
+
// create folder counters
|
906 |
+
$counters = array();
|
|
|
907 |
|
908 |
+
if ( $page !== 'media' ) {
|
909 |
+
// prepare variables
|
910 |
+
$no_items = '';
|
911 |
+
$childless = false;
|
912 |
|
913 |
+
// include styles
|
914 |
+
wp_enqueue_style( 'responsive-lightbox-folders-admin-css', RESPONSIVE_LIGHTBOX_URL . '/css/admin-folders.css' );
|
915 |
+
wp_enqueue_style( 'responsive-lightbox-folders-perfect-scrollbar', RESPONSIVE_LIGHTBOX_URL . '/assets/perfect-scrollbar/perfect-scrollbar' . ( ! ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '.min' : '' ) . '.css' );
|
916 |
+
// wp_enqueue_style( 'responsive-lightbox-folders-jstree', RESPONSIVE_LIGHTBOX_URL . '/assets/jstree/themes/' . $rl->options['folders']['jstree_style'] . '/style' . ( ! ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '.min' : '' ) . '.css' );
|
917 |
+
wp_enqueue_style( 'responsive-lightbox-folders-jstree', RESPONSIVE_LIGHTBOX_URL . '/assets/jstree/themes/default/style' . ( ! ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '.min' : '' ) . '.css' );
|
918 |
|
919 |
+
// get color scheme global
|
920 |
+
global $_wp_admin_css_colors;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
921 |
|
922 |
+
// set default color;
|
923 |
+
$color = '0,160,210';
|
|
|
924 |
|
925 |
+
if ( ! empty( $_wp_admin_css_colors ) ) {
|
926 |
+
// get current admin color scheme name
|
927 |
+
$current_color_scheme = get_user_option( 'admin_color' );
|
928 |
|
929 |
+
if ( empty( $current_color_scheme ) )
|
930 |
+
$current_color_scheme = 'fresh';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
931 |
|
932 |
+
if ( isset( $_wp_admin_css_colors[$current_color_scheme] ) )
|
933 |
+
$color = implode( ',', $rl->hex2rgb( $_wp_admin_css_colors[$current_color_scheme]->colors[3] ) );
|
934 |
+
}
|
935 |
|
936 |
+
wp_add_inline_style(
|
937 |
+
'responsive-lightbox-folders-jstree',
|
938 |
+
'#rl-folders-tree-container .jstree .rl-folders-state-active.rl-folders-state-hover {
|
939 |
+
background: #fff !important;
|
940 |
+
}
|
941 |
+
#rl-folders-tree-container .jstree-container-ul .jstree-wholerow-clicked,
|
942 |
+
#rl-folders-tree-container .jstree-container-ul:not(.jstree-wholerow-ul) .jstree-clicked {
|
943 |
+
background: rgba(' . $color . ', 0.15);
|
944 |
+
}
|
945 |
+
#rl-folders-tree-container .jstree-container-ul .jstree-wholerow-hovered,
|
946 |
+
#rl-folders-tree-container .jstree-container-ul:not(.jstree-wholerow-ul) .jstree-hovered {
|
947 |
+
background: rgba(' . $color . ', 0.05);
|
948 |
+
}'
|
949 |
+
);
|
950 |
|
951 |
+
// list categories parameters
|
952 |
+
$categories = array(
|
953 |
+
'orderby' => 'name',
|
954 |
+
'order' => 'asc',
|
955 |
+
'show_count' => true,
|
956 |
+
'show_option_all' => '',
|
957 |
+
'show_option_none' => '',
|
958 |
+
'use_desc_for_title' => false,
|
959 |
+
'title_li' => '',
|
960 |
+
'hide_empty' => false,
|
961 |
+
'hierarchical' => true,
|
962 |
+
'taxonomy' => $taxonomy->name,
|
963 |
+
'hide_title_if_empty' => true,
|
964 |
+
'echo' => false
|
965 |
+
);
|
966 |
|
967 |
+
// get current term id
|
968 |
+
$term_id = isset( $_GET[$taxonomy->name] ) ? (int) $_GET[$taxonomy->name] : 0;
|
969 |
|
970 |
+
// list mode?
|
971 |
+
if ( $this->mode === 'list' ) {
|
972 |
+
// get global wp list table instance
|
973 |
+
global $wp_list_table;
|
974 |
|
975 |
+
// empty instance?
|
976 |
+
if ( is_null( $wp_list_table ) )
|
977 |
+
$wp_list_table = _get_list_table( 'WP_Media_List_Table' );
|
978 |
|
979 |
+
// start buffering
|
980 |
+
ob_start();
|
981 |
|
982 |
+
// display "no media" table row
|
983 |
+
echo '<tr class="no-items"><td class="colspanchange" colspan="' . $wp_list_table->get_column_count() . '">';
|
984 |
|
985 |
+
$wp_list_table->no_items();
|
|
|
986 |
|
987 |
+
echo '</td></tr>';
|
|
|
|
|
988 |
|
989 |
+
// save "no media" table row
|
990 |
+
$no_items = ob_get_contents();
|
|
|
|
|
991 |
|
992 |
+
// clear the buffer
|
993 |
+
ob_end_clean();
|
|
|
994 |
|
995 |
+
// valid term?
|
996 |
+
if ( $term_id > 0 ) {
|
997 |
+
$children = get_term_children( $term_id, $taxonomy->name );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
998 |
|
999 |
+
// found any children?
|
1000 |
+
$childless = ! ( ! empty( $children ) && ! is_wp_error( $children ) );
|
1001 |
+
}
|
1002 |
+
}
|
1003 |
|
1004 |
+
// set current term id
|
1005 |
+
if ( $term_id > 0 )
|
1006 |
+
$categories['current_category'] = $term_id;
|
1007 |
+
|
1008 |
+
// hide filter for grid
|
1009 |
+
if ( $this->mode !== 'list' ) {
|
1010 |
+
wp_add_inline_style(
|
1011 |
+
'responsive-lightbox-folders-admin-css',
|
1012 |
+
'#media-attachment-rl-folders-filters { display: none; }
|
1013 |
+
.media-modal-content .media-frame select.attachment-filters {
|
1014 |
+
max-width: 100%;
|
1015 |
+
min-width: auto;
|
1016 |
+
}'
|
1017 |
+
);
|
1018 |
+
}
|
1019 |
|
1020 |
+
// get taxonomy html output
|
1021 |
+
$html = wp_list_categories( $categories );
|
1022 |
|
1023 |
+
if ( $html !== '' ) {
|
1024 |
+
// fix for urls
|
1025 |
+
$html = preg_replace_callback( '/href=(?:\'|")(.*?)(?:\'|")/', array( $this, 'replace_folders_href' ), $html );
|
1026 |
|
1027 |
+
// fix for counters
|
1028 |
+
$html = preg_replace_callback( '/<\/a> \(((?:\d+| )+)\)/', array( $this, 'replace_folders_count' ), $html );
|
1029 |
|
1030 |
+
// open all needed folders at start
|
1031 |
+
if ( $term_id > 0 )
|
1032 |
+
$html = preg_replace_callback( '/class="cat-item cat-item-(\d+)(?:[a-z\s0-9-]+)?"/', array( $this, 'open_folders' ), $html );
|
1033 |
|
1034 |
+
// update folder counters
|
1035 |
+
$counters = array_combine( $this->term_counters['keys'], $this->term_counters['values'] );
|
1036 |
+
}
|
1037 |
+
|
1038 |
+
// root folder query
|
1039 |
+
$root_query = new WP_Query(
|
1040 |
+
apply_filters(
|
1041 |
+
'rl_root_folder_query_args',
|
|
|
|
|
1042 |
array(
|
1043 |
+
'rl_folders_root' => true,
|
1044 |
+
'posts_per_page' => -1,
|
1045 |
+
'post_type' => 'attachment',
|
1046 |
+
'post_status' => 'inherit,private',
|
1047 |
+
'fields' => 'ids',
|
1048 |
+
'no_found_rows' => false,
|
1049 |
+
'tax_query' => array(
|
1050 |
+
array(
|
1051 |
+
'relation' => 'AND',
|
1052 |
+
array(
|
1053 |
+
'taxonomy' => $taxonomy->name,
|
1054 |
+
'field' => 'id',
|
1055 |
+
'terms' => 0,
|
1056 |
+
'include_children' => false,
|
1057 |
+
'operator' => 'NOT EXISTS'
|
1058 |
+
)
|
1059 |
+
)
|
1060 |
)
|
1061 |
)
|
1062 |
)
|
1063 |
+
);
|
1064 |
+
|
1065 |
+
// set number of all attachments
|
1066 |
+
$counters[-1] = (int) apply_filters( 'rl_count_attachments', 0 );
|
1067 |
+
|
1068 |
+
// set number of root attachments (not categorized)
|
1069 |
+
$counters[0] = (int) $root_query->post_count;
|
1070 |
|
|
|
|
|
1071 |
|
1072 |
+
$html = '
|
1073 |
<ul>
|
1074 |
<li class="cat-item cat-item-all"' . ( $term_id === 0 ? ' data-jstree=\'{ "selected": true }\'' : '' ) . '>
|
1075 |
+
<a href="' . apply_filters( 'rl_folders_media_folder_url', add_query_arg( array( 'mode' => $this->mode, $taxonomy->name => 0 ) ), null, $this->mode, 0 ) . '" data-term_id="all">' . __( 'All Files', 'responsive-lightbox' ) . ' (' . $counters[-1] . ')</a>
|
1076 |
</li>
|
1077 |
<li class="cat-item cat-item-0" data-jstree=\'{ "opened": true' . ( $term_id === -1 ? ', "selected": true ' : '' ) . ' }\'>
|
1078 |
+
<a href="' . apply_filters( 'rl_folders_media_folder_url', add_query_arg( array( 'mode' => $this->mode, $taxonomy->name => -1 ) ), null, $this->mode, -1 ) . '" data-term_id="0">' . __( 'Root Folder', 'responsive-lightbox' ) . ' (' . $counters[0] . ')</a>
|
1079 |
<ul>' . $html . '</ul>
|
1080 |
</li>
|
1081 |
</ul>';
|
1082 |
|
1083 |
+
// register scripts
|
1084 |
+
wp_register_script( 'responsive-lightbox-folders-jstree', RESPONSIVE_LIGHTBOX_URL . '/assets/jstree/jstree' . ( ! ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '.min' : '' ) . '.js', array(), $rl->defaults['version'], false );
|
1085 |
+
wp_register_script( 'responsive-lightbox-folders-perfect-scrollbar', RESPONSIVE_LIGHTBOX_URL . '/assets/perfect-scrollbar/perfect-scrollbar' . ( ! ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '.min' : '' ) . '.js', array(), $rl->defaults['version'], false );
|
|
|
1086 |
|
1087 |
+
$dependencies[] = 'responsive-lightbox-folders-jstree';
|
1088 |
+
$dependencies[] = 'responsive-lightbox-folders-perfect-scrollbar';
|
1089 |
+
}
|
1090 |
|
1091 |
+
wp_enqueue_script( 'responsive-lightbox-admin-select2', RESPONSIVE_LIGHTBOX_URL . '/assets/select2/select2.full' . ( ! ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '.min' : '' ) . '.js', array( 'jquery' ), $rl->defaults['version'], false );
|
1092 |
+
|
1093 |
+
wp_enqueue_script( 'responsive-lightbox-folders-admin', RESPONSIVE_LIGHTBOX_URL . '/js/admin-folders.js', $dependencies, $rl->defaults['version'], false );
|
1094 |
+
|
1095 |
+
if ( $page === 'media' ) {
|
1096 |
+
wp_localize_script(
|
1097 |
+
'responsive-lightbox-folders-admin',
|
1098 |
+
'rlFoldersArgs',
|
1099 |
+
array(
|
1100 |
+
'taxonomy' => $taxonomy->name,
|
1101 |
+
'page' => $page,
|
1102 |
+
'root' => __( 'Root Folder', 'responsive-lightbox' ),
|
1103 |
+
'terms' => wp_dropdown_categories(
|
1104 |
+
array(
|
1105 |
+
'orderby' => 'name',
|
1106 |
+
'order' => 'asc',
|
1107 |
+
'show_option_all' => __( 'All Files', 'responsive-lightbox' ),
|
1108 |
+
'show_count' => false,
|
1109 |
+
'hide_empty' => false,
|
1110 |
+
'hierarchical' => true,
|
1111 |
+
'selected' => ( isset( $_GET[$taxonomy->name] ) ? (int) $_GET[$taxonomy->name] : 0 ),
|
1112 |
+
'name' => $taxonomy->name,
|
1113 |
+
'taxonomy' => $taxonomy->name,
|
1114 |
+
'hide_if_empty' => true,
|
1115 |
+
'echo' => false
|
1116 |
+
)
|
|
|
|
|
|
|
|
|
|
|
1117 |
)
|
1118 |
+
)
|
1119 |
+
);
|
1120 |
+
} else {
|
1121 |
+
wp_localize_script(
|
1122 |
+
'responsive-lightbox-folders-admin',
|
1123 |
+
'rlFoldersArgs',
|
1124 |
+
array(
|
1125 |
+
'remove_children' => (int) $rl->options['folders']['folders_removal'],
|
1126 |
+
'wholerow' => (int) $rl->options['folders']['jstree_wholerow'],
|
1127 |
+
// 'theme' => $rl->options['folders']['jstree_style'],
|
1128 |
+
'theme' => 'default',
|
1129 |
+
'counters' => $counters,
|
1130 |
+
'no_media_items' => $no_items,
|
1131 |
+
'taxonomy' => $taxonomy->name,
|
1132 |
+
'page' => $page,
|
1133 |
+
'root' => __( 'Root Folder', 'responsive-lightbox' ),
|
1134 |
+
'all_terms' => __( 'All Files', 'responsive-lightbox' ),
|
1135 |
+
'new_folder' => __( 'New Folder', 'responsive-lightbox' ),
|
1136 |
+
'delete_term' => __( 'Are you sure you want to delete this folder?', 'responsive-lightbox' ),
|
1137 |
+
'delete_terms' => __( 'Are you sure you want to delete this folder with all subfolders?', 'responsive-lightbox' ),
|
1138 |
+
'nonce' => wp_create_nonce( 'rl-folders-ajax-library-nonce' ),
|
1139 |
+
'terms' => wp_dropdown_categories(
|
1140 |
+
array(
|
1141 |
+
'orderby' => 'name',
|
1142 |
+
'order' => 'asc',
|
1143 |
+
'show_option_all' => __( 'All Files', 'responsive-lightbox' ),
|
1144 |
+
'show_count' => false,
|
1145 |
+
'hide_empty' => false,
|
1146 |
+
'hierarchical' => true,
|
1147 |
+
'selected' => ( isset( $_GET[$taxonomy->name] ) ? (int) $_GET[$taxonomy->name] : 0 ),
|
1148 |
+
'name' => $taxonomy->name,
|
1149 |
+
'taxonomy' => $taxonomy->name,
|
1150 |
+
'hide_if_empty' => true,
|
1151 |
+
'echo' => false
|
1152 |
+
)
|
1153 |
+
),
|
1154 |
+
'template' => '
|
1155 |
+
<div id="rl-folders-tree-container">
|
1156 |
+
<div class="media-toolbar wp-filter">
|
1157 |
+
<div class="view-switch rl-folders-action-links">
|
1158 |
+
<a href="#" title="' . $taxonomy->labels->add_new_item . '" class="dashicons dashicons-plus rl-folders-add-new-folder' . ( $this->mode === 'list' && ( $term_id === -1 || $term_id > 0 ) ? '' : ' disabled-link' ) . '"></a>
|
1159 |
+
<a href="#" title="' . sprintf( __( 'Save new %s', 'responsive-lightbox' ), $taxonomy->labels->singular_name ) . '" class="dashicons dashicons-yes rl-folders-save-new-folder" style="display: none;"></a>
|
1160 |
+
<a href="#" title="' . sprintf( __( 'Cancel adding new %s', 'responsive-lightbox' ), $taxonomy->labels->singular_name ) . '" class="dashicons dashicons-no rl-folders-cancel-new-folder" style="display: none;"></a>
|
1161 |
+
<a href="#" title="' . $taxonomy->labels->edit_item . '" class="dashicons dashicons-edit rl-folders-rename-folder' . ( $this->mode === 'list' && $term_id > 0 ? '' : ' disabled-link' ) . '"></a>
|
1162 |
+
<a href="#" title="' . sprintf( __( 'Save %s', 'responsive-lightbox' ), $taxonomy->labels->singular_name ) . '" class="dashicons dashicons-yes rl-folders-save-folder" style="display: none;"></a>
|
1163 |
+
<a href="#" title="' . sprintf( __( 'Cancel renaming %s', 'responsive-lightbox' ), $taxonomy->labels->singular_name ) . '" class="dashicons dashicons-no rl-folders-cancel-folder" style="display: none;"></a>
|
1164 |
+
<a href="#" title="' . sprintf( __( 'Delete %s', 'responsive-lightbox' ), $taxonomy->labels->singular_name ) . '" class="dashicons dashicons-trash rl-folders-delete-folder' . ( $this->mode === 'list' && $term_id > 0 ? '' : ' disabled-link' ) . '"></a>
|
1165 |
+
<a href="#" title="' . sprintf( __( 'Expand %s', 'responsive-lightbox' ), $taxonomy->labels->singular_name ) . '" class="dashicons dashicons-arrow-down-alt2 rl-folders-expand-folder' . ( $this->mode === 'list' && ! $childless && ( $term_id === -1 || $term_id > 0 ) ? '' : ' disabled-link' ) . '"></a>
|
1166 |
+
<a href="#" title="' . sprintf( __( 'Collapse %s', 'responsive-lightbox' ), $taxonomy->labels->singular_name ) . '" class="dashicons dashicons-arrow-up-alt2 rl-folders-collapse-folder' . ( $this->mode === 'list' && ! $childless && ( $term_id === -1 || $term_id > 0 ) ? '' : ' disabled-link' ) . '"></a>
|
1167 |
+
</div>
|
1168 |
</div>
|
1169 |
+
<div id="rl-folders-tree">' . esc_html( $html ) . '</div>
|
1170 |
+
</div>'
|
1171 |
+
)
|
1172 |
+
);
|
1173 |
+
}
|
|
|
1174 |
|
1175 |
add_action( 'admin_print_styles', array( $this, 'admin_print_media_styles' ) );
|
1176 |
}
|
1185 |
}
|
1186 |
|
1187 |
/**
|
1188 |
+
* Count attachments.
|
1189 |
+
*
|
1190 |
+
* @return int
|
1191 |
+
*/
|
1192 |
+
public function count_attachments() {
|
1193 |
+
$count = wp_count_posts( 'attachment' );
|
1194 |
+
|
1195 |
+
return (int) $count->inherit;
|
1196 |
+
}
|
1197 |
+
|
1198 |
+
/**
|
1199 |
* Get all previously used media taxonomies.
|
1200 |
*
|
1201 |
* @global object $wpdb Database handler
|
includes/class-galleries.php
CHANGED
@@ -36,7 +36,7 @@ class Responsive_Lightbox_Galleries {
|
|
36 |
add_action( 'admin_init', array( $this, 'init_admin' ) );
|
37 |
add_action( 'edit_form_after_title', array( $this, 'after_title_nav_menu' ) );
|
38 |
add_action( 'admin_footer', array( $this, 'modal_gallery_template' ) );
|
39 |
-
add_action( 'media_buttons', array( $this, 'add_gallery_button') );
|
40 |
add_action( 'add_meta_boxes_rl_gallery', array( $this, 'add_meta_boxes' ) );
|
41 |
add_action( 'save_post_rl_gallery', array( $this, 'save_post' ), 10, 3 );
|
42 |
add_action( 'manage_rl_gallery_posts_custom_column', array( $this, 'gallery_columns_content' ), 10, 2 );
|
@@ -95,9 +95,6 @@ class Responsive_Lightbox_Galleries {
|
|
95 |
* @return void
|
96 |
*/
|
97 |
public function init() {
|
98 |
-
if ( ! is_admin() )
|
99 |
-
add_filter( 'get_post_metadata', array( $this, 'filter_preview_metadata' ), 10, 4 );
|
100 |
-
|
101 |
// register shortcode
|
102 |
add_shortcode( 'rl_gallery', array( $this, 'gallery_shortcode' ) );
|
103 |
|
@@ -107,6 +104,7 @@ class Responsive_Lightbox_Galleries {
|
|
107 |
$config_menu_items = apply_filters( 'rl_gallery_types', $rl->gallery_types );
|
108 |
$config_menu_items['default'] = __( 'Global', 'responsive-lightbox' );
|
109 |
|
|
|
110 |
$this->tabs = apply_filters(
|
111 |
'rl_gallery_tabs',
|
112 |
array(
|
@@ -143,12 +141,10 @@ class Responsive_Lightbox_Galleries {
|
|
143 |
);
|
144 |
|
145 |
// add folders if active
|
146 |
-
|
147 |
-
$this->tabs['images']['menu_items']['folders'] = __( 'Media Folders', 'responsive-lightbox' );
|
148 |
|
149 |
// add remote library if active
|
150 |
-
|
151 |
-
$this->tabs['images']['menu_items']['remote_library'] = __( 'Remote Library', 'responsive-lightbox' );
|
152 |
|
153 |
// use sizes as keys and values
|
154 |
$this->sizes = $this->get_image_sizes();
|
@@ -169,6 +165,7 @@ class Responsive_Lightbox_Galleries {
|
|
169 |
// merge titles
|
170 |
$merged_titles = array( 'global' => __( 'Global', 'responsive-lightbox' ) ) + $rl->settings->image_titles;
|
171 |
|
|
|
172 |
$this->fields = apply_filters(
|
173 |
'rl_gallery_tab_fields',
|
174 |
array(
|
@@ -803,6 +800,10 @@ class Responsive_Lightbox_Galleries {
|
|
803 |
* @return string Generated gallery shortcode
|
804 |
*/
|
805 |
public function gallery_shortcode( $args ) {
|
|
|
|
|
|
|
|
|
806 |
// prepare defaults
|
807 |
$defaults = array(
|
808 |
'id' => 0
|
@@ -817,13 +818,13 @@ class Responsive_Lightbox_Galleries {
|
|
817 |
// is it gallery?
|
818 |
if ( get_post_type( $args['id'] ) !== 'rl_gallery' )
|
819 |
return '';
|
820 |
-
|
821 |
// get images
|
822 |
$images = $this->get_gallery_images( $args['id'], array( 'exclude' => true ) );
|
823 |
|
824 |
if ( ! $images )
|
825 |
return '';
|
826 |
-
|
827 |
$attachments = array();
|
828 |
|
829 |
// build config
|
@@ -831,7 +832,7 @@ class Responsive_Lightbox_Galleries {
|
|
831 |
if ( ! empty( $image['id'] ) )
|
832 |
$attachments[] = $image['id'];
|
833 |
}
|
834 |
-
|
835 |
// get config data
|
836 |
$config = get_post_meta( $args['id'], '_rl_config', true );
|
837 |
|
@@ -944,6 +945,15 @@ class Responsive_Lightbox_Galleries {
|
|
944 |
* @return void
|
945 |
*/
|
946 |
public function enqueue_gallery_scripts_styles() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
947 |
// assign main instance
|
948 |
$rl = Responsive_Lightbox();
|
949 |
|
@@ -2123,6 +2133,9 @@ class Responsive_Lightbox_Galleries {
|
|
2123 |
// get attachment ids
|
2124 |
$attachments = ! empty( $data[$menu_item]['attachments']['ids'] ) ? array_map( 'absint', $data[$menu_item]['attachments']['ids'] ) : array();
|
2125 |
|
|
|
|
|
|
|
2126 |
if ( $attachments ) {
|
2127 |
if ( $args['exclude'] )
|
2128 |
$excluded = ! empty( $data[$menu_item]['attachments']['exclude'] ) ? $data[$menu_item]['attachments']['exclude'] : array();
|
@@ -2140,6 +2153,12 @@ class Responsive_Lightbox_Galleries {
|
|
2140 |
break;
|
2141 |
|
2142 |
case 'featured':
|
|
|
|
|
|
|
|
|
|
|
|
|
2143 |
// copy arguments
|
2144 |
$query_args = $args;
|
2145 |
|
@@ -2161,6 +2180,9 @@ class Responsive_Lightbox_Galleries {
|
|
2161 |
// get attachment ids
|
2162 |
$attachments = $this->gallery_query( array_merge( $data[$menu_item], $query_args ) );
|
2163 |
|
|
|
|
|
|
|
2164 |
if ( $attachments ) {
|
2165 |
if ( $args['exclude'] )
|
2166 |
$excluded = ! empty( $data[$menu_item]['attachments']['exclude'] ) ? $data[$menu_item]['attachments']['exclude'] : array();
|
@@ -2229,20 +2251,22 @@ class Responsive_Lightbox_Galleries {
|
|
2229 |
);
|
2230 |
|
2231 |
$tax_query = array(
|
2232 |
-
'relation' => 'OR',
|
2233 |
-
array(
|
2234 |
-
'taxonomy' => $args['taxonomy'],
|
2235 |
-
'field' => 'term_id',
|
2236 |
-
'terms' => ( ! is_wp_error( $all_folders ) ) ? $all_folders : $folder_id,
|
2237 |
-
'include_children' => $include_children,
|
2238 |
-
'operator' => 'IN'
|
2239 |
-
),
|
2240 |
array(
|
2241 |
-
'
|
2242 |
-
|
2243 |
-
|
2244 |
-
|
2245 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2246 |
)
|
2247 |
);
|
2248 |
} else {
|
@@ -2287,7 +2311,7 @@ class Responsive_Lightbox_Galleries {
|
|
2287 |
}
|
2288 |
|
2289 |
// run query
|
2290 |
-
$query = new WP_Query( $wp_query_args );
|
2291 |
|
2292 |
// get attachment IDs
|
2293 |
$attachments = $query->get_posts();
|
@@ -2300,6 +2324,9 @@ class Responsive_Lightbox_Galleries {
|
|
2300 |
// make sure to skip duplicates
|
2301 |
$attachments = array_unique( $attachments );
|
2302 |
|
|
|
|
|
|
|
2303 |
if ( $args['exclude'] )
|
2304 |
$excluded = ! empty( $data[$menu_item]['attachments']['exclude'] ) ? $data[$menu_item]['attachments']['exclude'] : array();
|
2305 |
|
@@ -3046,7 +3073,7 @@ class Responsive_Lightbox_Galleries {
|
|
3046 |
$args['post_type'][] = $post_type;
|
3047 |
}
|
3048 |
} else
|
3049 |
-
$args['post_type'] =
|
3050 |
|
3051 |
// post status
|
3052 |
if ( ! empty( $args['post_status'] ) ) {
|
@@ -3145,8 +3172,17 @@ class Responsive_Lightbox_Galleries {
|
|
3145 |
|
3146 |
// post term
|
3147 |
if ( ! empty( $args['post_term'] ) ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3148 |
foreach ( $args['post_term'] as $post_term ) {
|
3149 |
-
if (
|
3150 |
$term = get_term( $post_term );
|
3151 |
|
3152 |
$tax_queries['post_term'][] = array(
|
@@ -3290,11 +3326,8 @@ class Responsive_Lightbox_Galleries {
|
|
3290 |
global $pagenow;
|
3291 |
|
3292 |
// prepare query arguments if needed
|
3293 |
-
if ( ( $pagenow === 'post.php' && ( ( isset( $_GET['post'] ) && get_post_type( $_GET['post'] ) === 'rl_gallery' ) || ( isset( $_POST['post_ID'] ) && get_post_type( $_POST['post_ID'] ) === 'rl_gallery' ) ) ) || ( in_array( $pagenow, array( 'edit.php', 'post-new.php'), true ) && isset( $_GET['post_type'] ) && $_GET['post_type'] === 'rl_gallery' ) || ( $pagenow === 'admin-ajax.php' && isset( $_POST['action'] ) && in_array( $_POST['action'], array( 'rl-get-preview-content', 'rl-post-gallery-preview', 'rl-get-menu-content' ), true ) ) )
|
3294 |
-
|
3295 |
-
$this->fields['images']['featured'][$option]['options'] = $this->prepare_query_args( $option );
|
3296 |
-
}
|
3297 |
-
}
|
3298 |
|
3299 |
// add default thumbnail image if needed
|
3300 |
if ( Responsive_Lightbox()->options['builder']['gallery_builder'] && $pagenow === 'edit.php' && isset( $_GET['post_type'] ) && $_GET['post_type'] === 'rl_gallery' )
|
@@ -3409,6 +3442,20 @@ class Responsive_Lightbox_Galleries {
|
|
3409 |
return $data;
|
3410 |
}
|
3411 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3412 |
/**
|
3413 |
* Prepare values option list.
|
3414 |
*
|
@@ -3516,9 +3563,11 @@ class Responsive_Lightbox_Galleries {
|
|
3516 |
/**
|
3517 |
* Get public post types.
|
3518 |
*
|
|
|
|
|
3519 |
* @return array Post types
|
3520 |
*/
|
3521 |
-
public function get_post_types() {
|
3522 |
$post_types = get_post_types(
|
3523 |
array(
|
3524 |
'public' => true
|
@@ -3531,15 +3580,19 @@ class Responsive_Lightbox_Galleries {
|
|
3531 |
|
3532 |
if ( ! empty( $post_types ) ) {
|
3533 |
foreach ( $post_types as $post_type => $cpt ) {
|
3534 |
-
// skip
|
3535 |
-
if ( $post_type
|
3536 |
continue;
|
3537 |
|
3538 |
-
|
|
|
|
|
|
|
3539 |
}
|
3540 |
}
|
3541 |
|
3542 |
-
|
|
|
3543 |
|
3544 |
return $data;
|
3545 |
}
|
@@ -3603,6 +3656,30 @@ class Responsive_Lightbox_Galleries {
|
|
3603 |
if ( array_key_exists( 'post_format', $taxonomies ) )
|
3604 |
unset( $taxonomies['post_format'] );
|
3605 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3606 |
$data = array();
|
3607 |
|
3608 |
if ( ! empty( $taxonomies ) ) {
|
@@ -3611,6 +3688,7 @@ class Responsive_Lightbox_Galleries {
|
|
3611 |
}
|
3612 |
}
|
3613 |
|
|
|
3614 |
asort( $data );
|
3615 |
|
3616 |
return $data;
|
@@ -3650,11 +3728,8 @@ class Responsive_Lightbox_Galleries {
|
|
3650 |
$data = array();
|
3651 |
$page_templates = wp_get_theme()->get_page_templates();
|
3652 |
|
3653 |
-
if ( ! empty( $page_templates ) )
|
3654 |
-
$page_templates = array_flip( $page_templates );
|
3655 |
-
|
3656 |
asort( $page_templates );
|
3657 |
-
}
|
3658 |
|
3659 |
$data = array_merge( array( 'default' => apply_filters( 'default_page_template_title', __( 'Default Template' ) ) ), $page_templates );
|
3660 |
|
36 |
add_action( 'admin_init', array( $this, 'init_admin' ) );
|
37 |
add_action( 'edit_form_after_title', array( $this, 'after_title_nav_menu' ) );
|
38 |
add_action( 'admin_footer', array( $this, 'modal_gallery_template' ) );
|
39 |
+
add_action( 'media_buttons', array( $this, 'add_gallery_button' ) );
|
40 |
add_action( 'add_meta_boxes_rl_gallery', array( $this, 'add_meta_boxes' ) );
|
41 |
add_action( 'save_post_rl_gallery', array( $this, 'save_post' ), 10, 3 );
|
42 |
add_action( 'manage_rl_gallery_posts_custom_column', array( $this, 'gallery_columns_content' ), 10, 2 );
|
95 |
* @return void
|
96 |
*/
|
97 |
public function init() {
|
|
|
|
|
|
|
98 |
// register shortcode
|
99 |
add_shortcode( 'rl_gallery', array( $this, 'gallery_shortcode' ) );
|
100 |
|
104 |
$config_menu_items = apply_filters( 'rl_gallery_types', $rl->gallery_types );
|
105 |
$config_menu_items['default'] = __( 'Global', 'responsive-lightbox' );
|
106 |
|
107 |
+
// set tabs
|
108 |
$this->tabs = apply_filters(
|
109 |
'rl_gallery_tabs',
|
110 |
array(
|
141 |
);
|
142 |
|
143 |
// add folders if active
|
144 |
+
$this->tabs['images']['menu_items']['folders'] = __( 'Media Folders', 'responsive-lightbox' );
|
|
|
145 |
|
146 |
// add remote library if active
|
147 |
+
$this->tabs['images']['menu_items']['remote_library'] = __( 'Remote Library', 'responsive-lightbox' );
|
|
|
148 |
|
149 |
// use sizes as keys and values
|
150 |
$this->sizes = $this->get_image_sizes();
|
165 |
// merge titles
|
166 |
$merged_titles = array( 'global' => __( 'Global', 'responsive-lightbox' ) ) + $rl->settings->image_titles;
|
167 |
|
168 |
+
// set fields
|
169 |
$this->fields = apply_filters(
|
170 |
'rl_gallery_tab_fields',
|
171 |
array(
|
800 |
* @return string Generated gallery shortcode
|
801 |
*/
|
802 |
public function gallery_shortcode( $args ) {
|
803 |
+
// enable only for frontend previews
|
804 |
+
if ( ! is_admin() && is_preview() )
|
805 |
+
add_filter( 'get_post_metadata', array( $this, 'filter_preview_metadata' ), 10, 4 );
|
806 |
+
|
807 |
// prepare defaults
|
808 |
$defaults = array(
|
809 |
'id' => 0
|
818 |
// is it gallery?
|
819 |
if ( get_post_type( $args['id'] ) !== 'rl_gallery' )
|
820 |
return '';
|
821 |
+
|
822 |
// get images
|
823 |
$images = $this->get_gallery_images( $args['id'], array( 'exclude' => true ) );
|
824 |
|
825 |
if ( ! $images )
|
826 |
return '';
|
827 |
+
|
828 |
$attachments = array();
|
829 |
|
830 |
// build config
|
832 |
if ( ! empty( $image['id'] ) )
|
833 |
$attachments[] = $image['id'];
|
834 |
}
|
835 |
+
|
836 |
// get config data
|
837 |
$config = get_post_meta( $args['id'], '_rl_config', true );
|
838 |
|
945 |
* @return void
|
946 |
*/
|
947 |
public function enqueue_gallery_scripts_styles() {
|
948 |
+
// count how many times function was executed
|
949 |
+
static $run = 0;
|
950 |
+
|
951 |
+
// allow this only once
|
952 |
+
if ( $run > 0 )
|
953 |
+
return;
|
954 |
+
|
955 |
+
$run++;
|
956 |
+
|
957 |
// assign main instance
|
958 |
$rl = Responsive_Lightbox();
|
959 |
|
2133 |
// get attachment ids
|
2134 |
$attachments = ! empty( $data[$menu_item]['attachments']['ids'] ) ? array_map( 'absint', $data[$menu_item]['attachments']['ids'] ) : array();
|
2135 |
|
2136 |
+
// filter attachments
|
2137 |
+
$attachments = apply_filters( 'rl_get_gallery_images_attachments', $attachments );
|
2138 |
+
|
2139 |
if ( $attachments ) {
|
2140 |
if ( $args['exclude'] )
|
2141 |
$excluded = ! empty( $data[$menu_item]['attachments']['exclude'] ) ? $data[$menu_item]['attachments']['exclude'] : array();
|
2153 |
break;
|
2154 |
|
2155 |
case 'featured':
|
2156 |
+
// only for featured frontend galleries
|
2157 |
+
if ( ! is_admin() ) {
|
2158 |
+
// prepare featured fields
|
2159 |
+
$this->fields['images']['featured'] = $this->prepare_featured_fields( $this->fields['images']['featured'] );
|
2160 |
+
}
|
2161 |
+
|
2162 |
// copy arguments
|
2163 |
$query_args = $args;
|
2164 |
|
2180 |
// get attachment ids
|
2181 |
$attachments = $this->gallery_query( array_merge( $data[$menu_item], $query_args ) );
|
2182 |
|
2183 |
+
// filter attachments
|
2184 |
+
$attachments = apply_filters( 'rl_get_gallery_images_attachments', $attachments );
|
2185 |
+
|
2186 |
if ( $attachments ) {
|
2187 |
if ( $args['exclude'] )
|
2188 |
$excluded = ! empty( $data[$menu_item]['attachments']['exclude'] ) ? $data[$menu_item]['attachments']['exclude'] : array();
|
2251 |
);
|
2252 |
|
2253 |
$tax_query = array(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2254 |
array(
|
2255 |
+
'relation' => 'OR',
|
2256 |
+
array(
|
2257 |
+
'taxonomy' => $args['taxonomy'],
|
2258 |
+
'field' => 'term_id',
|
2259 |
+
'terms' => ( ! is_wp_error( $all_folders ) ) ? $all_folders : $folder_id,
|
2260 |
+
'include_children' => $include_children,
|
2261 |
+
'operator' => 'IN'
|
2262 |
+
),
|
2263 |
+
array(
|
2264 |
+
'taxonomy' => $args['taxonomy'],
|
2265 |
+
'field' => 'term_id',
|
2266 |
+
'terms' => $folder_id,
|
2267 |
+
'include_children' => $include_children,
|
2268 |
+
'operator' => 'NOT EXISTS'
|
2269 |
+
)
|
2270 |
)
|
2271 |
);
|
2272 |
} else {
|
2311 |
}
|
2312 |
|
2313 |
// run query
|
2314 |
+
$query = new WP_Query( apply_filters( 'rl_folders_query_args', $wp_query_args ) );
|
2315 |
|
2316 |
// get attachment IDs
|
2317 |
$attachments = $query->get_posts();
|
2324 |
// make sure to skip duplicates
|
2325 |
$attachments = array_unique( $attachments );
|
2326 |
|
2327 |
+
// filter attachments
|
2328 |
+
$attachments = apply_filters( 'rl_get_gallery_images_attachments', $attachments );
|
2329 |
+
|
2330 |
if ( $args['exclude'] )
|
2331 |
$excluded = ! empty( $data[$menu_item]['attachments']['exclude'] ) ? $data[$menu_item]['attachments']['exclude'] : array();
|
2332 |
|
3073 |
$args['post_type'][] = $post_type;
|
3074 |
}
|
3075 |
} else
|
3076 |
+
$args['post_type'] = $this->get_post_types( true );
|
3077 |
|
3078 |
// post status
|
3079 |
if ( ! empty( $args['post_status'] ) ) {
|
3172 |
|
3173 |
// post term
|
3174 |
if ( ! empty( $args['post_term'] ) ) {
|
3175 |
+
$terms = array();
|
3176 |
+
|
3177 |
+
// get all terms
|
3178 |
+
if ( ! empty( $fields['post_term']['options'] ) ) {
|
3179 |
+
foreach ( $fields['post_term']['options'] as $tax => $data ) {
|
3180 |
+
$terms = array_merge( $terms, array_map( 'intval', array_keys( $data['terms'] ) ) );
|
3181 |
+
}
|
3182 |
+
}
|
3183 |
+
|
3184 |
foreach ( $args['post_term'] as $post_term ) {
|
3185 |
+
if ( in_array( $post_term, $terms ) ) {
|
3186 |
$term = get_term( $post_term );
|
3187 |
|
3188 |
$tax_queries['post_term'][] = array(
|
3326 |
global $pagenow;
|
3327 |
|
3328 |
// prepare query arguments if needed
|
3329 |
+
if ( ( $pagenow === 'post.php' && ( ( isset( $_GET['post'] ) && get_post_type( $_GET['post'] ) === 'rl_gallery' ) || ( isset( $_POST['post_ID'] ) && get_post_type( $_POST['post_ID'] ) === 'rl_gallery' ) ) ) || ( in_array( $pagenow, array( 'edit.php', 'post-new.php'), true ) && isset( $_GET['post_type'] ) && $_GET['post_type'] === 'rl_gallery' ) || ( $pagenow === 'admin-ajax.php' && isset( $_POST['action'] ) && in_array( $_POST['action'], array( 'rl-get-preview-content', 'rl-post-gallery-preview', 'rl-get-menu-content' ), true ) ) )
|
3330 |
+
$this->fields['images']['featured'] = $this->prepare_featured_fields( $this->fields['images']['featured'] );
|
|
|
|
|
|
|
3331 |
|
3332 |
// add default thumbnail image if needed
|
3333 |
if ( Responsive_Lightbox()->options['builder']['gallery_builder'] && $pagenow === 'edit.php' && isset( $_GET['post_type'] ) && $_GET['post_type'] === 'rl_gallery' )
|
3442 |
return $data;
|
3443 |
}
|
3444 |
|
3445 |
+
/**
|
3446 |
+
* Prepare featured content fields.
|
3447 |
+
*
|
3448 |
+
* @param array $fields
|
3449 |
+
* @return array
|
3450 |
+
*/
|
3451 |
+
public function prepare_featured_fields( $fields ) {
|
3452 |
+
foreach ( array( 'post_type', 'post_status', 'post_format', 'post_term', 'post_author', 'page_parent', 'page_template' ) as $option ) {
|
3453 |
+
$fields[$option]['options'] = $this->prepare_query_args( $option );
|
3454 |
+
}
|
3455 |
+
|
3456 |
+
return $fields;
|
3457 |
+
}
|
3458 |
+
|
3459 |
/**
|
3460 |
* Prepare values option list.
|
3461 |
*
|
3563 |
/**
|
3564 |
* Get public post types.
|
3565 |
*
|
3566 |
+
* @param bool $simple Which data should be returned
|
3567 |
+
* @param bool $skip Which post types should be skipped
|
3568 |
* @return array Post types
|
3569 |
*/
|
3570 |
+
public function get_post_types( $simple = false, $skip = array( 'attachment', 'rl_gallery' ) ) {
|
3571 |
$post_types = get_post_types(
|
3572 |
array(
|
3573 |
'public' => true
|
3580 |
|
3581 |
if ( ! empty( $post_types ) ) {
|
3582 |
foreach ( $post_types as $post_type => $cpt ) {
|
3583 |
+
// skip unwanted post types
|
3584 |
+
if ( in_array( $post_type, $skip, true ) )
|
3585 |
continue;
|
3586 |
|
3587 |
+
if ( $simple )
|
3588 |
+
$data[] = $post_type;
|
3589 |
+
else
|
3590 |
+
$data[$post_type] = $cpt->labels->singular_name;
|
3591 |
}
|
3592 |
}
|
3593 |
|
3594 |
+
if ( ! $simple )
|
3595 |
+
asort( $data );
|
3596 |
|
3597 |
return $data;
|
3598 |
}
|
3656 |
if ( array_key_exists( 'post_format', $taxonomies ) )
|
3657 |
unset( $taxonomies['post_format'] );
|
3658 |
|
3659 |
+
// get main instance
|
3660 |
+
$rl = Responsive_Lightbox();
|
3661 |
+
|
3662 |
+
// remove gallery categories
|
3663 |
+
if ( $rl->options['builder']['categories'] && array_key_exists( 'rl_category', $taxonomies ) )
|
3664 |
+
unset( $taxonomies['rl_category'] );
|
3665 |
+
|
3666 |
+
// remove gallery tags
|
3667 |
+
if ( $rl->options['builder']['tags'] && array_key_exists( 'rl_tag', $taxonomies ) )
|
3668 |
+
unset( $taxonomies['rl_tag'] );
|
3669 |
+
|
3670 |
+
if ( $rl->options['folders']['active'] ) {
|
3671 |
+
// remove media folders categories
|
3672 |
+
unset( $taxonomies['rl_media_folder'] );
|
3673 |
+
|
3674 |
+
// remove custom media folders categories
|
3675 |
+
if ( $rl->options['folders']['media_taxonomy'] !== 'rl_media_folder' )
|
3676 |
+
unset( $taxonomies[$rl->options['folders']['media_taxonomy']] );
|
3677 |
+
|
3678 |
+
// remove media folders tags
|
3679 |
+
if ( $rl->options['folders']['media_tags'] )
|
3680 |
+
unset( $taxonomies['rl_media_tag'] );
|
3681 |
+
}
|
3682 |
+
|
3683 |
$data = array();
|
3684 |
|
3685 |
if ( ! empty( $taxonomies ) ) {
|
3688 |
}
|
3689 |
}
|
3690 |
|
3691 |
+
// sort taxonomies
|
3692 |
asort( $data );
|
3693 |
|
3694 |
return $data;
|
3728 |
$data = array();
|
3729 |
$page_templates = wp_get_theme()->get_page_templates();
|
3730 |
|
3731 |
+
if ( ! empty( $page_templates ) )
|
|
|
|
|
3732 |
asort( $page_templates );
|
|
|
3733 |
|
3734 |
$data = array_merge( array( 'default' => apply_filters( 'default_page_template_title', __( 'Default Template' ) ) ), $page_templates );
|
3735 |
|
includes/class-multilang.php
ADDED
@@ -0,0 +1,315 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if ( ! defined( 'ABSPATH' ) )
|
3 |
+
exit;
|
4 |
+
|
5 |
+
new Responsive_Lightbox_Multilang();
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Responsive Lightbox Multilang class.
|
9 |
+
*
|
10 |
+
* @class Responsive_Lightbox_Multilang
|
11 |
+
*/
|
12 |
+
class Responsive_Lightbox_Multilang {
|
13 |
+
public $multilang = false;
|
14 |
+
public $languages = array();
|
15 |
+
public $default_lang = '';
|
16 |
+
public $current_lang = '';
|
17 |
+
public $active_plugin = '';
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Constructor.
|
21 |
+
*
|
22 |
+
* @return void
|
23 |
+
*/
|
24 |
+
public function __construct() {
|
25 |
+
// set instance
|
26 |
+
Responsive_Lightbox()->multilang = $this;
|
27 |
+
|
28 |
+
// check if WPML or Polylang is active
|
29 |
+
include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
|
30 |
+
|
31 |
+
// Polylang support
|
32 |
+
if ( ( is_plugin_active( 'polylang/polylang.php' ) || is_plugin_active( 'polylang-pro/polylang.php' ) ) && function_exists( 'PLL' ) ) {
|
33 |
+
$this->multilang = true;
|
34 |
+
$this->active_plugin = 'polylang';
|
35 |
+
|
36 |
+
// get registered languages
|
37 |
+
$registered_languages = PLL()->model->get_languages_list();
|
38 |
+
|
39 |
+
if ( ! empty( $registered_languages ) ) {
|
40 |
+
foreach ( $registered_languages as $language )
|
41 |
+
$this->languages[$language->slug] = $language->name;
|
42 |
+
}
|
43 |
+
|
44 |
+
// get default language
|
45 |
+
$this->default_lang = pll_default_language();
|
46 |
+
|
47 |
+
// filters
|
48 |
+
add_filter( 'rl_count_attachments', array( $this, 'count_attachments' ), 9 );
|
49 |
+
// WPML support
|
50 |
+
} elseif ( is_plugin_active( 'sitepress-multilingual-cms/sitepress.php' ) && class_exists( 'SitePress' ) ) {
|
51 |
+
$this->multilang = true;
|
52 |
+
$this->active_plugin = 'wpml';
|
53 |
+
|
54 |
+
global $sitepress;
|
55 |
+
|
56 |
+
// get registered languages
|
57 |
+
$registered_languages = icl_get_languages();
|
58 |
+
|
59 |
+
if ( ! empty( $registered_languages ) ) {
|
60 |
+
foreach ( $registered_languages as $language )
|
61 |
+
$this->languages[$language['code']] = $language['display_name'];
|
62 |
+
}
|
63 |
+
|
64 |
+
// get default language
|
65 |
+
$this->default_lang = $sitepress->get_default_language();
|
66 |
+
|
67 |
+
// actions
|
68 |
+
add_action( 'admin_init', array( $this, 'hide_thumbnail' ) );
|
69 |
+
}
|
70 |
+
|
71 |
+
// multilang?
|
72 |
+
if ( $this->multilang ) {
|
73 |
+
// ations
|
74 |
+
add_action( 'admin_init', array( $this, 'media_url_redirect' ) );
|
75 |
+
|
76 |
+
// filters
|
77 |
+
add_filter( 'setup_theme', array( $this, 'get_current_admin_language' ), 11 );
|
78 |
+
add_filter( 'rl_root_folder_query_args', array( $this, 'root_folder_query_args' ) );
|
79 |
+
add_filter( 'rl_gallery_query_args', array( $this, 'gallery_featured_query_args' ) );
|
80 |
+
add_filter( 'rl_folders_query_args', array( $this, 'gallery_folders_query_args' ) );
|
81 |
+
add_filter( 'rl_get_gallery_images_attachments', array( $this, 'update_gallery_images_attachments' ) );
|
82 |
+
add_filter( 'rl_folders_media_folder_url', array( $this, 'media_folder_url' ) );
|
83 |
+
}
|
84 |
+
}
|
85 |
+
|
86 |
+
/**
|
87 |
+
* Avoid duplicating hidden internal thumbnail.
|
88 |
+
*
|
89 |
+
* @return void
|
90 |
+
*/
|
91 |
+
public function hide_thumbnail() {
|
92 |
+
// get thumbnail
|
93 |
+
$thumbnail_id = Responsive_Lightbox()->galleries->maybe_generate_thumbnail();
|
94 |
+
|
95 |
+
add_post_meta( $thumbnail_id, 'wpml_media_processed', 1, true );
|
96 |
+
}
|
97 |
+
|
98 |
+
/**
|
99 |
+
* Get current admin language.
|
100 |
+
*
|
101 |
+
* @return void
|
102 |
+
*/
|
103 |
+
public function get_current_admin_language() {
|
104 |
+
if ( $this->active_plugin === 'polylang' )
|
105 |
+
$this->current_lang = (string) pll_current_language( 'slug' );
|
106 |
+
else
|
107 |
+
$this->current_lang = ICL_LANGUAGE_CODE === 'all' ? '' : ICL_LANGUAGE_CODE;
|
108 |
+
}
|
109 |
+
|
110 |
+
/**
|
111 |
+
* Update gallery attachments.
|
112 |
+
*
|
113 |
+
* @param array $attachments Attachment IDs
|
114 |
+
* @return array
|
115 |
+
*/
|
116 |
+
public function update_gallery_images_attachments( $attachments ) {
|
117 |
+
$new_attachments = array();
|
118 |
+
|
119 |
+
foreach ( $attachments as $attachment_id ) {
|
120 |
+
if ( $this->active_plugin === 'polylang' )
|
121 |
+
$new_attachments[] = pll_get_post( $attachment_id, $this->current_lang );
|
122 |
+
else
|
123 |
+
$new_attachments[] = (int) apply_filters( 'wpml_object_id', $attachment_id, 'attachment', true, $this->current_lang );
|
124 |
+
}
|
125 |
+
|
126 |
+
return $attachments;
|
127 |
+
}
|
128 |
+
|
129 |
+
/**
|
130 |
+
* Root folder WP Query arguments.
|
131 |
+
*
|
132 |
+
* @return void
|
133 |
+
*/
|
134 |
+
public function root_folder_query_args( $args ) {
|
135 |
+
$args['lang'] = $this->current_lang;
|
136 |
+
|
137 |
+
return $args;
|
138 |
+
}
|
139 |
+
|
140 |
+
/**
|
141 |
+
* Get the number of attachments per language.
|
142 |
+
* Based on count_posts function from Polylang plugin (/include/model.php)
|
143 |
+
*
|
144 |
+
* @param string $lang 2-char language
|
145 |
+
* @param array $args Arguments (accepted: m, year, monthnum, day, author, author_name, post_format)
|
146 |
+
* @return int
|
147 |
+
*/
|
148 |
+
public function count_attachments() {
|
149 |
+
// active language?
|
150 |
+
if ( $this->current_lang !== '' ) {
|
151 |
+
// remove internal WP counter to avoid unwanted query
|
152 |
+
remove_filter( 'rl_count_attachments', array( Responsive_Lightbox()->folders, 'count_attachments' ), 10 );
|
153 |
+
// if not let internal WP counter do the job
|
154 |
+
} else
|
155 |
+
return;
|
156 |
+
|
157 |
+
// get taxonomies
|
158 |
+
$taxonomies = PLL()->model->get_filtered_taxonomies_query_vars();
|
159 |
+
|
160 |
+
// prepare defaults
|
161 |
+
$defaults = array(
|
162 |
+
'author' => '',
|
163 |
+
'author_name' => '',
|
164 |
+
'monthnum' => '',
|
165 |
+
'day' => '',
|
166 |
+
'year' => '',
|
167 |
+
'm' => ''
|
168 |
+
);
|
169 |
+
|
170 |
+
// add additional taxonomies
|
171 |
+
foreach ( $taxonomies as $tax ) {
|
172 |
+
$defaults[$tax] = '';
|
173 |
+
}
|
174 |
+
|
175 |
+
// prepare data
|
176 |
+
$args = array_intersect_key( array_merge( $defaults, wp_unslash( $_REQUEST ) ), $defaults );
|
177 |
+
|
178 |
+
global $wpdb;
|
179 |
+
|
180 |
+
$select = "SELECT pll_tr.term_taxonomy_id, COUNT( * ) AS count FROM " . $wpdb->posts;
|
181 |
+
$join = PLL()->model->post->join_clause();
|
182 |
+
$where = " WHERE post_status = 'inherit'";
|
183 |
+
$where .= " AND " . $wpdb->posts . ".post_type = 'attachment'";
|
184 |
+
$where .= PLL()->model->post->where_clause( $this->current_lang );
|
185 |
+
$groupby = ' GROUP BY pll_tr.term_taxonomy_id';
|
186 |
+
|
187 |
+
if ( ! empty( $args['m'] ) ) {
|
188 |
+
$args['m'] = '' . preg_replace( '|[^0-9]|', '', $args['m'] );
|
189 |
+
$where .= $wpdb->prepare( " AND YEAR( " . $wpdb->posts . ".post_date ) = %d", substr( $args['m'], 0, 4 ) );
|
190 |
+
|
191 |
+
if ( strlen( $args['m'] ) > 5 )
|
192 |
+
$where .= $wpdb->prepare( " AND MONTH( " . $wpdb->posts . ".post_date ) = %d", substr( $args['m'], 4, 2 ) );
|
193 |
+
|
194 |
+
if ( strlen( $args['m'] ) > 7 )
|
195 |
+
$where .= $wpdb->prepare( " AND DAYOFMONTH( " . $wpdb->posts . ".post_date ) = %d", substr( $args['m'], 6, 2 ) );
|
196 |
+
}
|
197 |
+
|
198 |
+
if ( ! empty( $args['year'] ) )
|
199 |
+
$where .= $wpdb->prepare( " AND YEAR( " . $wpdb->posts . ".post_date ) = %d", $args['year'] );
|
200 |
+
|
201 |
+
if ( ! empty( $args['monthnum'] ) )
|
202 |
+
$where .= $wpdb->prepare( " AND MONTH( " . $wpdb->posts . ".post_date ) = %d", $args['monthnum'] );
|
203 |
+
|
204 |
+
if ( ! empty( $args['day'] ) )
|
205 |
+
$where .= $wpdb->prepare( " AND DAYOFMONTH( " . $wpdb->posts . ".post_date ) = %d", $args['day'] );
|
206 |
+
|
207 |
+
if ( ! empty( $args['author_name'] ) ) {
|
208 |
+
$author = get_user_by( 'slug', sanitize_title_for_query( $args['author_name'] ) );
|
209 |
+
|
210 |
+
if ( $author )
|
211 |
+
$args['author'] = $author->ID;
|
212 |
+
}
|
213 |
+
|
214 |
+
if ( ! empty( $args['author'] ) )
|
215 |
+
$where .= $wpdb->prepare( " AND " . $wpdb->posts . ".post_author = %d", $args['author'] );
|
216 |
+
|
217 |
+
// filtered taxonomies ( post_format )
|
218 |
+
foreach ( $taxonomies as $tax_qv ) {
|
219 |
+
if ( ! empty( $args[ $tax_qv ] ) ) {
|
220 |
+
$join .= " INNER JOIN " . $wpdb->term_relationships . " AS tr ON tr.object_id = " . $wpdb->posts . ".ID";
|
221 |
+
$join .= " INNER JOIN " . $wpdb->term_taxonomy . " AS tt ON tt.term_taxonomy_id = tr.term_taxonomy_id";
|
222 |
+
$join .= " INNER JOIN " . $wpdb->terms . " AS t ON t.term_id = tt.term_id";
|
223 |
+
$where .= $wpdb->prepare( ' AND t.slug = %s', $args[ $tax_qv ] );
|
224 |
+
}
|
225 |
+
}
|
226 |
+
|
227 |
+
// get result
|
228 |
+
$result = $wpdb->get_row( $select . $join . $where . $groupby, ARRAY_A );
|
229 |
+
|
230 |
+
return empty( $result['count'] ) ? 0 : (int) $result['count'];
|
231 |
+
}
|
232 |
+
|
233 |
+
/**
|
234 |
+
* Featured gallery query arguments.
|
235 |
+
*
|
236 |
+
* @param array $args
|
237 |
+
* @return array
|
238 |
+
*/
|
239 |
+
public function gallery_featured_query_args( $args ) {
|
240 |
+
// set active language
|
241 |
+
$args['lang'] = $this->current_lang;
|
242 |
+
|
243 |
+
return $args;
|
244 |
+
}
|
245 |
+
|
246 |
+
/**
|
247 |
+
* Folders gallery query arguments.
|
248 |
+
*
|
249 |
+
* @param array $args
|
250 |
+
* @return array
|
251 |
+
*/
|
252 |
+
public function gallery_folders_query_args( $args ) {
|
253 |
+
// set active language
|
254 |
+
$args['lang'] = $this->current_lang;
|
255 |
+
|
256 |
+
return $args;
|
257 |
+
}
|
258 |
+
|
259 |
+
/**
|
260 |
+
* Update media folders URLs.
|
261 |
+
*
|
262 |
+
* @param string $url
|
263 |
+
* @return string
|
264 |
+
*/
|
265 |
+
public function media_folder_url( $url ) {
|
266 |
+
// active language?
|
267 |
+
if ( $this->current_lang !== '' )
|
268 |
+
$url = add_query_arg( 'lang', $this->current_lang, $url );
|
269 |
+
|
270 |
+
return $url;
|
271 |
+
}
|
272 |
+
|
273 |
+
/**
|
274 |
+
* Redirect to equivalent media folder in specified language.
|
275 |
+
*
|
276 |
+
* @return void
|
277 |
+
*/
|
278 |
+
public function media_url_redirect() {
|
279 |
+
global $pagenow;
|
280 |
+
|
281 |
+
// get main instance
|
282 |
+
$rl = Responsive_Lightbox();
|
283 |
+
|
284 |
+
// only for media with selected language
|
285 |
+
if ( $pagenow === 'upload.php' && $this->current_lang !== '' && $rl->options['folders']['active'] ) {
|
286 |
+
// get taxonomy
|
287 |
+
$taxonomy = $rl->options['folders']['media_taxonomy'];
|
288 |
+
|
289 |
+
// parse URL
|
290 |
+
$params = parse_url( html_entity_decode( urldecode( add_query_arg() ) ) );
|
291 |
+
|
292 |
+
if ( isset( $params['query'] ) ) {
|
293 |
+
// parse query string
|
294 |
+
parse_str( $params['query'], $args );
|
295 |
+
|
296 |
+
if ( isset( $args['lang'], $args[$taxonomy] ) ) {
|
297 |
+
// cast term ID
|
298 |
+
$term_id = (int) $args[$taxonomy];
|
299 |
+
|
300 |
+
if ( $this->active_plugin === 'polylang' )
|
301 |
+
$new_term_id = pll_get_term( $term_id, $args['lang'] );
|
302 |
+
else
|
303 |
+
$new_term_id = apply_filters( 'wpml_object_id', $term_id, $taxonomy, true, $args['lang'] );
|
304 |
+
|
305 |
+
// different ID?
|
306 |
+
if ( $term_id !== $new_term_id ) {
|
307 |
+
wp_safe_redirect( add_query_arg( $taxonomy, $new_term_id ) );
|
308 |
+
|
309 |
+
exit;
|
310 |
+
}
|
311 |
+
}
|
312 |
+
}
|
313 |
+
}
|
314 |
+
}
|
315 |
+
}
|
includes/class-settings.php
CHANGED
@@ -1880,8 +1880,6 @@ class Responsive_Lightbox_Settings {
|
|
1880 |
if ( ! empty( $this->tabs[$tab_key]['callback'] ) )
|
1881 |
call_user_func( $this->tabs[$tab_key]['callback'] );
|
1882 |
else {
|
1883 |
-
wp_nonce_field( 'update-options' );
|
1884 |
-
|
1885 |
settings_fields( $this->tabs[$tab_key]['key'] );
|
1886 |
do_settings_sections( $this->tabs[$tab_key]['key'] );
|
1887 |
|
1880 |
if ( ! empty( $this->tabs[$tab_key]['callback'] ) )
|
1881 |
call_user_func( $this->tabs[$tab_key]['callback'] );
|
1882 |
else {
|
|
|
|
|
1883 |
settings_fields( $this->tabs[$tab_key]['key'] );
|
1884 |
do_settings_sections( $this->tabs[$tab_key]['key'] );
|
1885 |
|
js/admin-folders.js
CHANGED
@@ -11,17 +11,6 @@
|
|
11 |
event_data = {},
|
12 |
allow_modal_media_tag_saving = false;
|
13 |
|
14 |
-
if ( typeof wp.Uploader !== 'undefined' ) {
|
15 |
-
// extend uploader to apply dynamic folder ID
|
16 |
-
$.extend( wp.Uploader.prototype, {
|
17 |
-
init: function() {
|
18 |
-
this.uploader.bind( 'BeforeUpload', function( file ) {
|
19 |
-
file.settings.multipart_params.rl_folders_upload_files_term_id = rl_folder_id;
|
20 |
-
} );
|
21 |
-
}
|
22 |
-
} );
|
23 |
-
}
|
24 |
-
|
25 |
function initFolders() {
|
26 |
var RLWPMediaViewMediaFramePost = wp.media.view.MediaFrame.Post;
|
27 |
|
@@ -85,7 +74,6 @@
|
|
85 |
|
86 |
$( $.parseHTML( rlFoldersArgs.terms ) ).find( 'option' ).each( function( i, option ) {
|
87 |
term_id = parseInt( $( option ).val() );
|
88 |
-
console.log( term_id );
|
89 |
term_id = ( term_id === 0 ? 'all' : term_id );
|
90 |
last_priority = i + 2;
|
91 |
|
@@ -199,6 +187,32 @@
|
|
199 |
|
200 |
// are we ready?
|
201 |
$( document ).ready( function() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
202 |
// do nothing for wp_enqueue_media
|
203 |
if ( rlFoldersArgs.page === 'media' ) {
|
204 |
initFolders();
|
@@ -632,9 +646,6 @@
|
|
632 |
// store grid frame
|
633 |
grid_frame = wp.media.frame.content.get();
|
634 |
|
635 |
-
// bind edit attachment event to initialize select2 on rl media tag
|
636 |
-
grid_frame.controller.on( 'edit:attachment', init_select2 );
|
637 |
-
|
638 |
// set root as main folder for uploads
|
639 |
rl_folder_id = 0;
|
640 |
}
|
@@ -643,9 +654,8 @@
|
|
643 |
|
644 |
// folder change
|
645 |
$( document ).on( 'change', '#media-attachment-rl-folders-filters', function() {
|
646 |
-
if ( active_mode === 'list' )
|
647 |
return;
|
648 |
-
}
|
649 |
|
650 |
var node_id = $( '#rl-folders-tree' ).jstree().get_selected().toString();
|
651 |
|
@@ -725,39 +735,24 @@
|
|
725 |
rl_folder_id = 0;
|
726 |
} );
|
727 |
|
728 |
-
|
729 |
-
|
730 |
-
|
731 |
-
|
732 |
-
|
733 |
-
// click modal compat attachment left and right arrows
|
734 |
-
$( document ).on( 'click', '.left, .right', function() {
|
735 |
-
init_select2();
|
736 |
-
} );
|
737 |
-
|
738 |
-
// press modal compat attachment left, right or escape key
|
739 |
-
$( document ).on( 'keydown', function( e ) {
|
740 |
-
if ( ( 'INPUT' === e.target.nodeName || 'TEXTAREA' === e.target.nodeName ) && ! ( e.target.readOnly || e.target.disabled ) )
|
741 |
-
return;
|
742 |
-
|
743 |
-
// escape key
|
744 |
-
if ( e.keyCode === 27 )
|
745 |
-
$( '.media-modal-close' ).click();
|
746 |
-
|
747 |
-
// right arrow key
|
748 |
-
if ( e.keyCode === 39 )
|
749 |
-
$( '.edit-media-header .right' ).click();
|
750 |
|
751 |
-
|
752 |
-
|
753 |
-
|
754 |
-
|
|
|
755 |
} );
|
756 |
|
757 |
// initialize select2 and it's events
|
758 |
-
function
|
759 |
var select = $( '.rl-media-tag-select2' );
|
760 |
|
|
|
761 |
if ( select.length === 0 || select.hasClass( 'select2-hidden-accessible' ) )
|
762 |
return;
|
763 |
|
@@ -828,26 +823,24 @@
|
|
828 |
|
829 |
if ( mode === 'list' ) {
|
830 |
// 'all' on grid is 0 on list
|
831 |
-
if ( term === 'all' )
|
832 |
term = 0;
|
833 |
// -1 on list is 0 on grid
|
834 |
-
|
835 |
term = -1;
|
836 |
-
}
|
837 |
}
|
838 |
|
839 |
// no 'taxonomy=term_id' in query?
|
840 |
-
if ( string === '' )
|
841 |
selector.prop( 'href', link + '&' + rlFoldersArgs.taxonomy + '=' + term );
|
842 |
// found pair so replace term_id with new one just in case it's invalid
|
843 |
-
|
844 |
selector.prop( 'href', link.replace( new RegExp( rlFoldersArgs.taxonomy + '=' + '(-?[0-9]+|all)', 'g' ), rlFoldersArgs.taxonomy + '=' + term ) );
|
845 |
-
}
|
846 |
}
|
847 |
|
848 |
// refresh perfect scrollbar
|
849 |
function refresh_scrollbars() {
|
850 |
-
|
851 |
rl_ps.update();
|
852 |
}, 200 );
|
853 |
}
|
@@ -862,9 +855,8 @@
|
|
862 |
var wholerow = $( 'div.jstree-wholerow.jstree-wholerow-clicked' );
|
863 |
|
864 |
// destroy only selected droppable node first if needed
|
865 |
-
if ( typeof wholerow.droppable( 'instance' ) !== 'undefined' )
|
866 |
wholerow.droppable( 'destroy' );
|
867 |
-
}
|
868 |
|
869 |
// droppable nodes selector, skip 'all files' and current folder
|
870 |
selector = $( '#rl-folders-tree .jstree-wholerow:not(:eq(0))' ).not( '#' + node_id + ' .jstree-wholerow-clicked' );
|
@@ -872,9 +864,8 @@
|
|
872 |
var anchor = $( '#' + node_id + '_anchor' );
|
873 |
|
874 |
// destroy only selected droppable node first if needed
|
875 |
-
if ( typeof anchor.droppable( 'instance' ) !== 'undefined' )
|
876 |
anchor.droppable( 'destroy' );
|
877 |
-
}
|
878 |
|
879 |
// droppable nodes selector, skip 'all files' and current folder
|
880 |
selector = $( '#rl-folders-tree li a.jstree-anchor:not(:eq(0),#' + node_id + '_anchor)' );
|
@@ -929,9 +920,8 @@
|
|
929 |
$( this ).remove();
|
930 |
|
931 |
// display 'no media' text
|
932 |
-
if ( $( '#the-list tr' ).length === 0 )
|
933 |
$( '#the-list' ).append( rlFoldersArgs.no_media_items );
|
934 |
-
}
|
935 |
} );
|
936 |
}
|
937 |
|
@@ -970,10 +960,10 @@
|
|
970 |
toggle_spinner( true );
|
971 |
|
972 |
// single attachment
|
973 |
-
if ( $( '.media-frame' ).hasClass( 'mode-edit' ) )
|
974 |
attachments.push( parseInt( ui.draggable.data( 'id' ) ) );
|
975 |
// selection of attachments
|
976 |
-
|
977 |
$( 'ul.attachments > li.selected' ).each( function( i, item ) {
|
978 |
attachments.push( parseInt( $( item ).data( 'id' ) ) );
|
979 |
} );
|
@@ -1071,9 +1061,8 @@
|
|
1071 |
var attachments = $( '#the-list .check-column input[type="checkbox"]:checked' ).length;
|
1072 |
|
1073 |
// dragging unchecked single attachment?
|
1074 |
-
if ( attachments === 0 )
|
1075 |
attachments = 1;
|
1076 |
-
}
|
1077 |
|
1078 |
return '<div class="rl-folders-dragged-item"><div class="dashicons dashicons-media-default"></div><span>' + attachments + '</span></div>';
|
1079 |
},
|
@@ -1099,17 +1088,15 @@
|
|
1099 |
// toggle spinner
|
1100 |
function toggle_spinner( show ) {
|
1101 |
if ( show ) {
|
1102 |
-
if ( active_mode === 'list' )
|
1103 |
$( '.filter-items .actions' ).find( '.spinner' ).addClass( 'is-active' );
|
1104 |
-
|
1105 |
$( '.media-toolbar-secondary' ).find( '.spinner' ).addClass( 'is-active' );
|
1106 |
-
}
|
1107 |
} else {
|
1108 |
-
if ( active_mode === 'list' )
|
1109 |
$( '.filter-items .actions' ).find( '.spinner' ).removeClass( 'is-active' );
|
1110 |
-
|
1111 |
$( '.media-toolbar-secondary' ).find( '.spinner' ).removeClass( 'is-active' );
|
1112 |
-
}
|
1113 |
}
|
1114 |
}
|
1115 |
|
@@ -1143,18 +1130,16 @@
|
|
1143 |
// delete node
|
1144 |
$( '#rl-folders-tree' ).jstree( 'delete_node', node_id );
|
1145 |
|
1146 |
-
|
1147 |
-
|
1148 |
disable_redirect = true;
|
1149 |
-
}
|
1150 |
|
1151 |
// select parent node
|
1152 |
$( '#rl-folders-tree' ).jstree( 'select_node', parent );
|
1153 |
} else {
|
1154 |
// enable icons for non-empty nodes
|
1155 |
-
if ( ! $( '#rl-folders-tree' ).jstree( 'is_leaf', node_id ) )
|
1156 |
$( '.rl-folders-expand-folder, .rl-folders-collapse-folder' ).removeClass( 'disabled-link' );
|
1157 |
-
}
|
1158 |
|
1159 |
// restore folder
|
1160 |
$( node_id + '_span' ).remove();
|
11 |
event_data = {},
|
12 |
allow_modal_media_tag_saving = false;
|
13 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
function initFolders() {
|
15 |
var RLWPMediaViewMediaFramePost = wp.media.view.MediaFrame.Post;
|
16 |
|
74 |
|
75 |
$( $.parseHTML( rlFoldersArgs.terms ) ).find( 'option' ).each( function( i, option ) {
|
76 |
term_id = parseInt( $( option ).val() );
|
|
|
77 |
term_id = ( term_id === 0 ? 'all' : term_id );
|
78 |
last_priority = i + 2;
|
79 |
|
187 |
|
188 |
// are we ready?
|
189 |
$( document ).ready( function() {
|
190 |
+
// wpuploader
|
191 |
+
if ( typeof wp.Uploader !== 'undefined' ) {
|
192 |
+
// extend uploader to apply dynamic folder ID
|
193 |
+
$.extend( wp.Uploader.prototype, {
|
194 |
+
init: function() {
|
195 |
+
this.uploader.bind( 'BeforeUpload', function( file ) {
|
196 |
+
file.settings.multipart_params.rl_folders_upload_files_term_id = rl_folder_id;
|
197 |
+
} );
|
198 |
+
}
|
199 |
+
} );
|
200 |
+
// plupload
|
201 |
+
} else if ( typeof uploader !== 'undefined' ) {
|
202 |
+
uploader.bind( 'BeforeUpload', function( file ) {
|
203 |
+
uploader.settings.multipart_params.rl_folders_upload_files_term_id = rl_folder_id;
|
204 |
+
} );
|
205 |
+
}
|
206 |
+
|
207 |
+
// wp.media.view.Attachment exists?
|
208 |
+
if ( 'Attachment' in wp.media.view ) {
|
209 |
+
// handle attachments details
|
210 |
+
wp.media.view.Attachment.Details.prototype.on( 'ready', function( ) {
|
211 |
+
// initialize select2
|
212 |
+
setTimeout( initSelect2, 5 );
|
213 |
+
} );
|
214 |
+
}
|
215 |
+
|
216 |
// do nothing for wp_enqueue_media
|
217 |
if ( rlFoldersArgs.page === 'media' ) {
|
218 |
initFolders();
|
646 |
// store grid frame
|
647 |
grid_frame = wp.media.frame.content.get();
|
648 |
|
|
|
|
|
|
|
649 |
// set root as main folder for uploads
|
650 |
rl_folder_id = 0;
|
651 |
}
|
654 |
|
655 |
// folder change
|
656 |
$( document ).on( 'change', '#media-attachment-rl-folders-filters', function() {
|
657 |
+
if ( active_mode === 'list' )
|
658 |
return;
|
|
|
659 |
|
660 |
var node_id = $( '#rl-folders-tree' ).jstree().get_selected().toString();
|
661 |
|
735 |
rl_folder_id = 0;
|
736 |
} );
|
737 |
|
738 |
+
if ( rlFoldersArgs.page !== 'media' ) {
|
739 |
+
// press modal compat attachment left, right or escape key
|
740 |
+
$( document ).on( 'keydown', function( e ) {
|
741 |
+
if ( ( 'INPUT' === e.target.nodeName || 'TEXTAREA' === e.target.nodeName ) && ! ( e.target.readOnly || e.target.disabled ) )
|
742 |
+
return;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
743 |
|
744 |
+
// escape key
|
745 |
+
if ( e.keyCode === 27 )
|
746 |
+
$( '.media-modal-close' ).click();
|
747 |
+
} );
|
748 |
+
}
|
749 |
} );
|
750 |
|
751 |
// initialize select2 and it's events
|
752 |
+
function initSelect2() {
|
753 |
var select = $( '.rl-media-tag-select2' );
|
754 |
|
755 |
+
// skip initialization of select2
|
756 |
if ( select.length === 0 || select.hasClass( 'select2-hidden-accessible' ) )
|
757 |
return;
|
758 |
|
823 |
|
824 |
if ( mode === 'list' ) {
|
825 |
// 'all' on grid is 0 on list
|
826 |
+
if ( term === 'all' )
|
827 |
term = 0;
|
828 |
// -1 on list is 0 on grid
|
829 |
+
else if ( term === 0 )
|
830 |
term = -1;
|
|
|
831 |
}
|
832 |
|
833 |
// no 'taxonomy=term_id' in query?
|
834 |
+
if ( string === '' )
|
835 |
selector.prop( 'href', link + '&' + rlFoldersArgs.taxonomy + '=' + term );
|
836 |
// found pair so replace term_id with new one just in case it's invalid
|
837 |
+
else
|
838 |
selector.prop( 'href', link.replace( new RegExp( rlFoldersArgs.taxonomy + '=' + '(-?[0-9]+|all)', 'g' ), rlFoldersArgs.taxonomy + '=' + term ) );
|
|
|
839 |
}
|
840 |
|
841 |
// refresh perfect scrollbar
|
842 |
function refresh_scrollbars() {
|
843 |
+
setTimeout( function() {
|
844 |
rl_ps.update();
|
845 |
}, 200 );
|
846 |
}
|
855 |
var wholerow = $( 'div.jstree-wholerow.jstree-wholerow-clicked' );
|
856 |
|
857 |
// destroy only selected droppable node first if needed
|
858 |
+
if ( typeof wholerow.droppable( 'instance' ) !== 'undefined' )
|
859 |
wholerow.droppable( 'destroy' );
|
|
|
860 |
|
861 |
// droppable nodes selector, skip 'all files' and current folder
|
862 |
selector = $( '#rl-folders-tree .jstree-wholerow:not(:eq(0))' ).not( '#' + node_id + ' .jstree-wholerow-clicked' );
|
864 |
var anchor = $( '#' + node_id + '_anchor' );
|
865 |
|
866 |
// destroy only selected droppable node first if needed
|
867 |
+
if ( typeof anchor.droppable( 'instance' ) !== 'undefined' )
|
868 |
anchor.droppable( 'destroy' );
|
|
|
869 |
|
870 |
// droppable nodes selector, skip 'all files' and current folder
|
871 |
selector = $( '#rl-folders-tree li a.jstree-anchor:not(:eq(0),#' + node_id + '_anchor)' );
|
920 |
$( this ).remove();
|
921 |
|
922 |
// display 'no media' text
|
923 |
+
if ( $( '#the-list tr' ).length === 0 )
|
924 |
$( '#the-list' ).append( rlFoldersArgs.no_media_items );
|
|
|
925 |
} );
|
926 |
}
|
927 |
|
960 |
toggle_spinner( true );
|
961 |
|
962 |
// single attachment
|
963 |
+
if ( $( '.media-frame' ).hasClass( 'mode-edit' ) )
|
964 |
attachments.push( parseInt( ui.draggable.data( 'id' ) ) );
|
965 |
// selection of attachments
|
966 |
+
else {
|
967 |
$( 'ul.attachments > li.selected' ).each( function( i, item ) {
|
968 |
attachments.push( parseInt( $( item ).data( 'id' ) ) );
|
969 |
} );
|
1061 |
var attachments = $( '#the-list .check-column input[type="checkbox"]:checked' ).length;
|
1062 |
|
1063 |
// dragging unchecked single attachment?
|
1064 |
+
if ( attachments === 0 )
|
1065 |
attachments = 1;
|
|
|
1066 |
|
1067 |
return '<div class="rl-folders-dragged-item"><div class="dashicons dashicons-media-default"></div><span>' + attachments + '</span></div>';
|
1068 |
},
|
1088 |
// toggle spinner
|
1089 |
function toggle_spinner( show ) {
|
1090 |
if ( show ) {
|
1091 |
+
if ( active_mode === 'list' )
|
1092 |
$( '.filter-items .actions' ).find( '.spinner' ).addClass( 'is-active' );
|
1093 |
+
else
|
1094 |
$( '.media-toolbar-secondary' ).find( '.spinner' ).addClass( 'is-active' );
|
|
|
1095 |
} else {
|
1096 |
+
if ( active_mode === 'list' )
|
1097 |
$( '.filter-items .actions' ).find( '.spinner' ).removeClass( 'is-active' );
|
1098 |
+
else
|
1099 |
$( '.media-toolbar-secondary' ).find( '.spinner' ).removeClass( 'is-active' );
|
|
|
1100 |
}
|
1101 |
}
|
1102 |
|
1130 |
// delete node
|
1131 |
$( '#rl-folders-tree' ).jstree( 'delete_node', node_id );
|
1132 |
|
1133 |
+
// disable redirect in select_node
|
1134 |
+
if ( active_mode === 'list' )
|
1135 |
disable_redirect = true;
|
|
|
1136 |
|
1137 |
// select parent node
|
1138 |
$( '#rl-folders-tree' ).jstree( 'select_node', parent );
|
1139 |
} else {
|
1140 |
// enable icons for non-empty nodes
|
1141 |
+
if ( ! $( '#rl-folders-tree' ).jstree( 'is_leaf', node_id ) )
|
1142 |
$( '.rl-folders-expand-folder, .rl-folders-collapse-folder' ).removeClass( 'disabled-link' );
|
|
|
1143 |
|
1144 |
// restore folder
|
1145 |
$( node_id + '_span' ).remove();
|
js/admin-media.js
CHANGED
@@ -1,6 +1,9 @@
|
|
1 |
( function ( $ ) {
|
2 |
|
3 |
$( document ).on( 'ready', function() {
|
|
|
|
|
|
|
4 |
var gutenberg_active = typeof rlBlockEditor !== 'undefined';
|
5 |
|
6 |
if ( gutenberg_active ) {
|
1 |
( function ( $ ) {
|
2 |
|
3 |
$( document ).on( 'ready', function() {
|
4 |
+
if ( $.isEmptyObject( wp.media.view ) )
|
5 |
+
return;
|
6 |
+
|
7 |
var gutenberg_active = typeof rlBlockEditor !== 'undefined';
|
8 |
|
9 |
if ( gutenberg_active ) {
|
js/gutenberg.min.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
!function(l){var r={};function a(e){if(r[e])return r[e].exports;var t=r[e]={i:e,l:!1,exports:{}};return l[e].call(t.exports,t,t.exports,a),t.l=!0,t.exports}a.m=l,a.c=r,a.d=function(e,t,l){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:l})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(t,e){if(1&e&&(t=a(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var l=Object.create(null);if(a.r(l),Object.defineProperty(l,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)a.d(l,r,function(e){return t[e]}.bind(null,r));return l},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="",a(a.s=0)}([function(e,t,l){var o=l(1),r=wp.editor,i=r.MediaUpload,s=r.BlockControls,a=wp.components,
|
2 |
/*!
|
3 |
Copyright (c) 2017 Jed Watson.
|
4 |
Licensed under the MIT License (MIT), see
|
1 |
+
!function(l){var r={};function a(e){if(r[e])return r[e].exports;var t=r[e]={i:e,l:!1,exports:{}};return l[e].call(t.exports,t,t.exports,a),t.l=!0,t.exports}a.m=l,a.c=r,a.d=function(e,t,l){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:l})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(t,e){if(1&e&&(t=a(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var l=Object.create(null);if(a.r(l),Object.defineProperty(l,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)a.d(l,r,function(e){return t[e]}.bind(null,r));return l},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="",a(a.s=0)}([function(e,t,l){var o=l(1),r=wp.editor,i=r.MediaUpload,s=r.BlockControls,a=wp.components,m=a.Button,c=a.Toolbar,p=a.Dashicon,u=a.IconButton,n=wp.blocks.registerBlockType,d=wp.i18n.__;n("responsive-lightbox/remote-library-image",{title:d("Remote Library Image"),description:d("Remote Library images"),icon:"format-image",category:"responsive-lightbox",keywords:[d("image"),d("photo")],attributes:{imageURL:{type:"string",default:""},imageID:{type:"string",default:""}},edit:function(e){var t=e.setAttributes,l=e.attributes,r=""!==l.imageID,a=o("components-placeholder",e.className,r?"rl-image-selected":"");function n(e){t({imageURL:e.sizes.full.url,imageID:e.id})}return wp.element.createElement("div",null,wp.element.createElement(s,null,r&&wp.element.createElement(c,null,wp.element.createElement(i,{title:d("Remote Library Images"),addToGallery:!0,gallery:!0,multiple:!1,onSelect:n,allowedTypes:["image"],value:l.imageID,render:function(e){var t=e.open;return wp.element.createElement(u,{className:["components-toolbar__control","rl-remote-library-media-button"],label:d("Edit image"),icon:"edit",onClick:t})}}))),wp.element.createElement("div",{className:a},wp.element.createElement("div",{className:"components-placeholder__label"},wp.element.createElement(p,{icon:"format-image"}),d("Responsive Lightbox | Remote Library Image")),wp.element.createElement("div",{className:"components-placeholder__instructions"},d("Select a file from your remote libraries.")),wp.element.createElement("div",{className:"components-placeholder__fieldset"},wp.element.createElement(i,{title:d("Remote Library Images"),addToGallery:!0,gallery:!0,multiple:!1,onSelect:n,allowedTypes:["image"],value:l.imageID,render:function(e){var t=e.open;return wp.element.createElement(m,{isLarge:!0,className:["editor-media-placeholder__button","editor-media-placeholder__media-library-button","rl-remote-library-media-button"],onClick:function(e){e.stopPropagation(),t()}},d("Select image"))}})),wp.element.createElement("img",{className:"rl-block-image-preview",src:l.imageURL})))},save:function(e){var t=e.attributes;return wp.element.createElement("figure",{className:"rl-image wp-block-image"},wp.element.createElement("img",{src:t.imageURL}))}}),n("responsive-lightbox/gallery",{title:d("Gallery"),description:d("Galleries"),icon:"format-gallery",category:"responsive-lightbox",keywords:[d("images"),d("photos"),d("gallery")],attributes:{imageURL:{type:"string",default:""},galleryID:{type:"integer",default:0}},edit:function(e){var t=e.setAttributes,l=e.attributes,r=0!==l.galleryID,a=o("components-placeholder",e.className,r?"rl-gallery-selected":"");function n(){t({imageURL:ResponsiveLightboxGallery.lastGalleryImage,galleryID:parseInt(ResponsiveLightboxGallery.lastGalleryID)}),this.removeEventListener("click",n)}return wp.element.createElement("div",null,wp.element.createElement(s,null,r&&wp.element.createElement(c,null,wp.element.createElement(u,{className:["components-toolbar__control","rl-gallery-media-button"],label:d("Edit gallery"),icon:"edit",onClick:function(e){e.stopPropagation(),ResponsiveLightboxGallery.resetFilters=!0,ResponsiveLightboxGallery.open(l.galleryID),ResponsiveLightboxGallery.getModalButton().addEventListener("click",n)}}))),wp.element.createElement("div",{className:a},wp.element.createElement("div",{className:"components-placeholder__label"},wp.element.createElement(p,{icon:"format-image"}),d("Responsive Lightbox | Gallery")),wp.element.createElement("div",{className:"components-placeholder__instructions"},d("Select a gallery.")),wp.element.createElement("div",{className:"components-placeholder__fieldset"},wp.element.createElement(m,{isLarge:!0,className:["editor-media-placeholder__button","editor-media-placeholder__media-library-button","rl-gallery-media-button"],onClick:function(e){e.stopPropagation(),ResponsiveLightboxGallery.resetFilters=!0,ResponsiveLightboxGallery.open(),ResponsiveLightboxGallery.getModalButton().addEventListener("click",n)}},d("Select gallery"))),wp.element.createElement("img",{className:"rl-block-image-preview",src:l.imageURL})))},save:function(e){var t=e.attributes;return wp.element.createElement("div",null,'[rl_gallery id="',t.galleryID,'"]')}})},function(e,t,l){var r;
|
2 |
/*!
|
3 |
Copyright (c) 2017 Jed Watson.
|
4 |
Licensed under the MIT License (MIT), see
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: dfactory
|
|
3 |
Donate link: http://www.dfactory.eu/
|
4 |
Tags: gallery, galleries, image, images, responsive, lightbox, photo, photography, masonry, video, builder
|
5 |
Requires at least: 4.0
|
6 |
-
Tested up to: 5.
|
7 |
-
Stable tag: 2.2.
|
8 |
Requires PHP: 5.2.4
|
9 |
License: MIT License
|
10 |
License URI: http://opensource.org/licenses/MIT
|
@@ -139,6 +139,9 @@ Responsive Lightbox and Gallery plugin comes with many styles and effects alread
|
|
139 |
|
140 |
== Changelog ==
|
141 |
|
|
|
|
|
|
|
142 |
= 2.2.3 =
|
143 |
* Fix: Media Folders js and CSS issues in Media Library
|
144 |
* Fix: Empty src attribute in Remote Library inserted images
|
3 |
Donate link: http://www.dfactory.eu/
|
4 |
Tags: gallery, galleries, image, images, responsive, lightbox, photo, photography, masonry, video, builder
|
5 |
Requires at least: 4.0
|
6 |
+
Tested up to: 5.4.1
|
7 |
+
Stable tag: 2.2.3.1
|
8 |
Requires PHP: 5.2.4
|
9 |
License: MIT License
|
10 |
License URI: http://opensource.org/licenses/MIT
|
139 |
|
140 |
== Changelog ==
|
141 |
|
142 |
+
= 2.2.3.1 =
|
143 |
+
* Fix: Missing class-multilang.php file
|
144 |
+
|
145 |
= 2.2.3 =
|
146 |
* Fix: Media Folders js and CSS issues in Media Library
|
147 |
* Fix: Empty src attribute in Remote Library inserted images
|
responsive-lightbox.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/*
|
3 |
Plugin Name: Responsive Lightbox & Gallery
|
4 |
Description: Responsive Lightbox & Gallery allows users to create galleries and view larger versions of images, galleries and videos in a lightbox (overlay) effect optimized for mobile devices.
|
5 |
-
Version: 2.2.3
|
6 |
Author: dFactory
|
7 |
Author URI: http://www.dfactory.eu/
|
8 |
Plugin URI: http://www.dfactory.eu/plugins/responsive-lightbox/
|
@@ -12,7 +12,7 @@ Text Domain: responsive-lightbox
|
|
12 |
Domain Path: /languages
|
13 |
|
14 |
Responsive Lightbox & Gallery
|
15 |
-
Copyright (C) 2013-
|
16 |
|
17 |
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
18 |
|
@@ -334,7 +334,7 @@ class Responsive_Lightbox {
|
|
334 |
$this->options['basicmasonry_gallery'] = array_merge( $this->defaults['basicmasonry_gallery'], ( ( $array = get_option( 'responsive_lightbox_basicmasonry_gallery', $this->defaults['basicmasonry_gallery'] ) ) == false ? array() : $array ) );
|
335 |
|
336 |
// actions
|
337 |
-
add_action( 'plugins_loaded', array( $this, '
|
338 |
add_action( 'after_setup_theme', array( $this, 'init_remote_libraries' ), 11 );
|
339 |
add_action( 'init', array( $this, 'init_galleries' ) );
|
340 |
add_action( 'init', array( $this, 'init_folders' ) );
|
@@ -461,20 +461,23 @@ class Responsive_Lightbox {
|
|
461 |
}
|
462 |
|
463 |
/**
|
464 |
-
*
|
465 |
*
|
466 |
* @return void
|
467 |
*/
|
468 |
-
public function
|
|
|
469 |
load_plugin_textdomain( 'responsive-lightbox', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
|
470 |
|
471 |
-
// gallery types
|
472 |
$this->gallery_types = array(
|
473 |
'default' => __( 'Default', 'responsive-lightbox' ),
|
474 |
'basicgrid' => __( 'Basic Grid', 'responsive-lightbox' ),
|
475 |
'basicslider' => __( 'Basic Slider', 'responsive-lightbox' ),
|
476 |
'basicmasonry' => __( 'Basic Masonry', 'responsive-lightbox' )
|
477 |
);
|
|
|
|
|
478 |
}
|
479 |
|
480 |
/**
|
@@ -1090,8 +1093,10 @@ class Responsive_Lightbox {
|
|
1090 |
* @return void
|
1091 |
*/
|
1092 |
public function init_gutenberg() {
|
|
|
1093 |
add_action( 'enqueue_block_editor_assets', array( $this, 'gutenberg_enqueue_scripts' ) );
|
1094 |
|
|
|
1095 |
add_filter( 'block_categories', array( $this, 'block_category' ) );
|
1096 |
}
|
1097 |
|
@@ -1120,6 +1125,9 @@ class Responsive_Lightbox {
|
|
1120 |
public function gutenberg_enqueue_scripts() {
|
1121 |
$rl = Responsive_Lightbox();
|
1122 |
|
|
|
|
|
|
|
1123 |
// enqueue script
|
1124 |
wp_enqueue_script( 'responsive-lightbox-block-editor-script', RESPONSIVE_LIGHTBOX_URL . '/js/gutenberg.min.js', array( 'wp-blocks', 'wp-i18n', 'wp-element', 'wp-editor', 'wp-components' ), $rl->defaults['version'] );
|
1125 |
|
2 |
/*
|
3 |
Plugin Name: Responsive Lightbox & Gallery
|
4 |
Description: Responsive Lightbox & Gallery allows users to create galleries and view larger versions of images, galleries and videos in a lightbox (overlay) effect optimized for mobile devices.
|
5 |
+
Version: 2.2.3.1
|
6 |
Author: dFactory
|
7 |
Author URI: http://www.dfactory.eu/
|
8 |
Plugin URI: http://www.dfactory.eu/plugins/responsive-lightbox/
|
12 |
Domain Path: /languages
|
13 |
|
14 |
Responsive Lightbox & Gallery
|
15 |
+
Copyright (C) 2013-2020, Digital Factory - info@digitalfactory.pl
|
16 |
|
17 |
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
18 |
|
334 |
$this->options['basicmasonry_gallery'] = array_merge( $this->defaults['basicmasonry_gallery'], ( ( $array = get_option( 'responsive_lightbox_basicmasonry_gallery', $this->defaults['basicmasonry_gallery'] ) ) == false ? array() : $array ) );
|
335 |
|
336 |
// actions
|
337 |
+
add_action( 'plugins_loaded', array( $this, 'plugins_loaded_init' ) );
|
338 |
add_action( 'after_setup_theme', array( $this, 'init_remote_libraries' ), 11 );
|
339 |
add_action( 'init', array( $this, 'init_galleries' ) );
|
340 |
add_action( 'init', array( $this, 'init_folders' ) );
|
461 |
}
|
462 |
|
463 |
/**
|
464 |
+
* Early initialization.
|
465 |
*
|
466 |
* @return void
|
467 |
*/
|
468 |
+
public function plugins_loaded_init() {
|
469 |
+
// load textdomain
|
470 |
load_plugin_textdomain( 'responsive-lightbox', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
|
471 |
|
472 |
+
// set gallery types
|
473 |
$this->gallery_types = array(
|
474 |
'default' => __( 'Default', 'responsive-lightbox' ),
|
475 |
'basicgrid' => __( 'Basic Grid', 'responsive-lightbox' ),
|
476 |
'basicslider' => __( 'Basic Slider', 'responsive-lightbox' ),
|
477 |
'basicmasonry' => __( 'Basic Masonry', 'responsive-lightbox' )
|
478 |
);
|
479 |
+
|
480 |
+
include_once( RESPONSIVE_LIGHTBOX_PATH . 'includes' . DIRECTORY_SEPARATOR . 'class-multilang.php' );
|
481 |
}
|
482 |
|
483 |
/**
|
1093 |
* @return void
|
1094 |
*/
|
1095 |
public function init_gutenberg() {
|
1096 |
+
// actions
|
1097 |
add_action( 'enqueue_block_editor_assets', array( $this, 'gutenberg_enqueue_scripts' ) );
|
1098 |
|
1099 |
+
// filters
|
1100 |
add_filter( 'block_categories', array( $this, 'block_category' ) );
|
1101 |
}
|
1102 |
|
1125 |
public function gutenberg_enqueue_scripts() {
|
1126 |
$rl = Responsive_Lightbox();
|
1127 |
|
1128 |
+
// enqueue gallery
|
1129 |
+
$rl->galleries->enqueue_gallery_scripts_styles();
|
1130 |
+
|
1131 |
// enqueue script
|
1132 |
wp_enqueue_script( 'responsive-lightbox-block-editor-script', RESPONSIVE_LIGHTBOX_URL . '/js/gutenberg.min.js', array( 'wp-blocks', 'wp-i18n', 'wp-element', 'wp-editor', 'wp-components' ), $rl->defaults['version'] );
|
1133 |
|