diff --git a/package-lock.json b/package-lock.json index 766e848f1..dd9aea04f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -69,6 +69,11 @@ "resolved": "https://registry.npmjs.org/@ionic-native/globalization/-/globalization-4.3.2.tgz", "integrity": "sha512-sDyriA3/xspu6RM8arEOlhOkSxvRwLDNdvbBoZ59i+Dn5i6bjoE4hMMEFvUlnzvOZKn5GusurrWPz5cmfA9aPw==" }, + "@ionic-native/in-app-browser": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@ionic-native/in-app-browser/-/in-app-browser-4.3.3.tgz", + "integrity": "sha512-mvHelgEVvTwFBCzcWAM0uN2JMhhPjY/k6UGhJzpn8LHMQ7FG2C7ofgZ8v2dy6WHaxGNBfHL+OEQqh5Ds28tkBg==" + }, "@ionic-native/keyboard": { "version": "4.3.2", "resolved": "https://registry.npmjs.org/@ionic-native/keyboard/-/keyboard-4.3.2.tgz", diff --git a/package.json b/package.json index f2d5797f3..a82a1d411 100644 --- a/package.json +++ b/package.json @@ -37,6 +37,7 @@ "@ionic-native/clipboard": "^4.3.2", "@ionic-native/core": "4.3.0", "@ionic-native/globalization": "^4.3.2", + "@ionic-native/in-app-browser": "^4.3.3", "@ionic-native/keyboard": "^4.3.2", "@ionic-native/network": "^4.3.2", "@ionic-native/splash-screen": "4.3.0", diff --git a/src/app/app.module.ts b/src/app/app.module.ts index ece90d825..0a428fa01 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -17,6 +17,12 @@ import { CoreAppProvider } from '../providers/app'; import { CoreConfigProvider } from '../providers/config'; import { CoreEmulatorModule } from '../core/emulator/emulator.module'; import { CoreLangProvider } from '../providers/lang'; +import { CoreTextUtilsProvider } from '../providers/utils/text'; +import { CoreDomUtilsProvider } from '../providers/utils/dom'; +import { CoreTimeUtilsProvider } from '../providers/utils/time'; +import { CoreUrlUtilsProvider } from '../providers/utils/url'; +import { CoreUtilsProvider } from '../providers/utils/utils'; +import { CoreMimetypeUtilsProvider } from '../providers/utils/mimetype'; // For translate loader. AoT requires an exported function for factories. export function createTranslateLoader(http: HttpClient) { @@ -54,7 +60,13 @@ export function createTranslateLoader(http: HttpClient) { CoreDbProvider, CoreAppProvider, CoreConfigProvider, - CoreLangProvider + CoreLangProvider, + CoreTextUtilsProvider, + CoreDomUtilsProvider, + CoreTimeUtilsProvider, + CoreUrlUtilsProvider, + CoreUtilsProvider, + CoreMimetypeUtilsProvider ] }) export class AppModule {} diff --git a/src/assets/countries/ar.json b/src/assets/countries/ar.json new file mode 100644 index 000000000..572481a4e --- /dev/null +++ b/src/assets/countries/ar.json @@ -0,0 +1,248 @@ +{ + "AW": "آروبا", + "AZ": "أذربيجان", + "AM": "أرمينيا", + "ES": "أسبانيا", + "AU": "أستراليا", + "AF": "أفغانستان", + "AL": "ألبانيا", + "DE": "ألمانيا", + "AG": "أنتيجوا وبربودا", + "AO": "أنجولا", + "AI": "أنجويلا", + "AD": "أندورا", + "UY": "أورجواي", + "UZ": "أوزبكستان", + "UG": "أوغندا", + "UA": "أوكرانيا", + "IE": "أيرلندا", + "IS": "أيسلندا", + "ET": "اثيوبيا", + "ER": "اريتريا", + "EE": "استونيا", + "IL": "اسرائيل", + "AR": "الأرجنتين", + "JO": "الأردن", + "EC": "الاكوادور", + "AE": "الامارات العربية المتحدة", + "BS": "الباهاما", + "BH": "البحرين", + "BR": "البرازيل", + "PT": "البرتغال", + "BA": "البوسنة والهرسك", + "GA": "الجابون", + "ME": "الجبل الأسود", + "DZ": "الجزائر", + "DK": "الدانمرك", + "CV": "الرأس الأخضر", + "SV": "السلفادور", + "SN": "السنغال", + "SD": "السودان", + "SE": "السويد", + "EH": "الصحراء الغربية", + "SO": "الصومال", + "CN": "الصين", + "IQ": "العراق", + "VA": "الفاتيكان", + "PH": "الفيلبين", + "AQ": "القطب الجنوبي", + "CM": "الكاميرون", + "CG": "الكونغو - برازافيل", + "KW": "الكويت", + "HU": "المجر", + "IO": "المحيط الهندي البريطاني", + "MA": "المغرب", + "TF": "المقاطعات الجنوبية الفرنسية", + "MX": "المكسيك", + "SA": "المملكة العربية السعودية", + "GB": "المملكة المتحدة", + "NO": "النرويج", + "AT": "النمسا", + "NE": "النيجر", + "IN": "الهند", + "US": "الولايات المتحدة الأمريكية", + "JP": "اليابان", + "YE": "اليمن", + "GR": "اليونان", + "ID": "اندونيسيا", + "IR": "ايران", + "IT": "ايطاليا", + "PG": "بابوا غينيا الجديدة", + "PY": "باراجواي", + "PK": "باكستان", + "PW": "بالاو", + "BW": "بتسوانا", + "PN": "بتكايرن", + "BB": "بربادوس", + "BM": "برمودا", + "BN": "بروناي", + "BE": "بلجيكا", + "BG": "بلغاريا", + "BZ": "بليز", + "BD": "بنجلاديش", + "PA": "بنما", + "BJ": "بنين", + "BT": "بوتان", + "PR": "بورتوريكو", + "BF": "بوركينا فاسو", + "BI": "بوروندي", + "PL": "بولندا", + "BO": "بوليفيا", + "PF": "بولينيزيا الفرنسية", + "PE": "بيرو", + "TZ": "تانزانيا", + "TH": "تايلند", + "TW": "تايوان", + "TM": "تركمانستان", + "TR": "تركيا", + "TT": "ترينيداد وتوباغو", + "TD": "تشاد", + "TG": "توجو", + "TV": "توفالو", + "TK": "توكيلو", + "TO": "تونجا", + "TN": "تونس", + "TL": "تيمور الشرقية", + "JM": "جامايكا", + "GI": "جبل طارق", + "GD": "جرينادا", + "GL": "جرينلاند", + "AX": "جزر أولان", + "AN": "جزر الأنتيل الهولندية", + "TC": "جزر الترك وجايكوس", + "KM": "جزر القمر", + "KY": "جزر الكايمن", + "MH": "جزر المارشال", + "MV": "جزر الملديف", + "UM": "جزر الولايات المتحدة البعيدة الصغيرة", + "SB": "جزر سليمان", + "FO": "جزر فارو", + "VI": "جزر فرجين الأمريكية", + "VG": "جزر فرجين البريطانية", + "FK": "جزر فوكلاند", + "CK": "جزر كوك", + "CC": "جزر كوكوس", + "MP": "جزر ماريانا الشمالية", + "WF": "جزر والس وفوتونا", + "CX": "جزيرة الكريسماس", + "BV": "جزيرة بوفيه", + "IM": "جزيرة مان", + "NF": "جزيرة نورفوك", + "HM": "جزيرة هيرد وماكدونالد", + "CF": "جمهورية افريقيا الوسطى", + "CZ": "جمهورية التشيك", + "DO": "جمهورية الدومينيك", + "CD": "جمهورية الكونغو الديمقراطية", + "ZA": "جمهورية جنوب افريقيا", + "GT": "جواتيمالا", + "GP": "جوادلوب", + "GU": "جوام", + "GE": "جورجيا", + "GS": "جورجيا الجنوبية وجزر ساندويتش الجنوبية", + "DJ": "جيبوتي", + "JE": "جيرسي", + "DM": "دومينيكا", + "RW": "رواندا", + "RU": "روسيا", + "BY": "روسيا البيضاء", + "RO": "رومانيا", + "RE": "روينيون", + "ZM": "زامبيا", + "ZW": "زيمبابوي", + "CI": "ساحل العاج", + "WS": "ساموا", + "AS": "ساموا الأمريكية", + "SM": "سان مارينو", + "PM": "سانت بيير وميكولون", + "VC": "سانت فنسنت وغرنادين", + "KN": "سانت كيتس ونيفيس", + "LC": "سانت لوسيا", + "MF": "سانت مارتين", + "SH": "سانت هيلنا", + "ST": "ساو تومي وبرينسيبي", + "LK": "سريلانكا", + "SJ": "سفالبارد وجان مايان", + "SK": "سلوفاكيا", + "SI": "سلوفينيا", + "SG": "سنغافورة", + "SZ": "سوازيلاند", + "SY": "سوريا", + "SR": "سورينام", + "CH": "سويسرا", + "SL": "سيراليون", + "SC": "سيشل", + "CL": "شيلي", + "RS": "صربيا", + "CS": "صربيا والجبل الأسود", + "TJ": "طاجكستان", + "OM": "عمان", + "GM": "غامبيا", + "GH": "غانا", + "GF": "غويانا", + "GY": "غيانا", + "GN": "غينيا", + "GQ": "غينيا الاستوائية", + "GW": "غينيا بيساو", + "VU": "فانواتو", + "FR": "فرنسا", + "PS": "فلسطين", + "VE": "فنزويلا", + "FI": "فنلندا", + "VN": "فيتنام", + "FJ": "فيجي", + "CY": "قبرص", + "KG": "قرغيزستان", + "QA": "قطر", + "KZ": "كازاخستان", + "NC": "كاليدونيا الجديدة", + "HR": "كرواتيا", + "KH": "كمبوديا", + "CA": "كندا", + "CU": "كوبا", + "KR": "كوريا الجنوبية", + "KP": "كوريا الشمالية", + "CR": "كوستاريكا", + "CO": "كولومبيا", + "KI": "كيريباتي", + "KE": "كينيا", + "LV": "لاتفيا", + "LA": "لاوس", + "LB": "لبنان", + "LU": "لوكسمبورج", + "LY": "ليبيا", + "LR": "ليبيريا", + "LT": "ليتوانيا", + "LI": "ليختنشتاين", + "LS": "ليسوتو", + "MQ": "مارتينيك", + "MO": "ماكاو الصينية", + "MT": "مالطا", + "ML": "مالي", + "MY": "ماليزيا", + "YT": "مايوت", + "MG": "مدغشقر", + "EG": "مصر", + "MK": "مقدونيا", + "MW": "ملاوي", + "ZZ": "منطقة غير معرفة", + "MN": "منغوليا", + "MR": "موريتانيا", + "MU": "موريشيوس", + "MZ": "موزمبيق", + "MD": "مولدافيا", + "MC": "موناكو", + "MS": "مونتسرات", + "MM": "ميانمار", + "FM": "ميكرونيزيا", + "NA": "ناميبيا", + "NR": "نورو", + "NP": "نيبال", + "NG": "نيجيريا", + "NI": "نيكاراجوا", + "NZ": "نيوزيلاندا", + "NU": "نيوي", + "HT": "هايتي", + "HN": "هندوراس", + "NL": "هولندا", + "HK": "هونج كونج الصينية" +} \ No newline at end of file diff --git a/src/assets/countries/bg.json b/src/assets/countries/bg.json new file mode 100644 index 000000000..acf244733 --- /dev/null +++ b/src/assets/countries/bg.json @@ -0,0 +1,250 @@ +{ + "AU": "Австралия", + "AT": "Австрия", + "AZ": "Азербайджан", + "AX": "Аландски о-ви", + "AL": "Албания", + "DZ": "Алжир", + "AS": "Американско Самоа", + "AO": "Ангола", + "AI": "Ангуила", + "AD": "Андора", + "AQ": "Антарктика", + "AG": "Антигуа и Барбуда", + "AR": "Аржентина", + "AM": "Армения", + "AW": "Аруба", + "AF": "Афганистан", + "BD": "Бангладеш", + "BB": "Барбадос", + "BS": "Бахами", + "BH": "Бахрейн", + "BY": "Беларус", + "BE": "Белгия", + "BZ": "Белиз", + "BJ": "Бенин", + "BM": "Бермуда", + "BO": "Боливия", + "BA": "Босна и Херцеговина", + "BW": "Ботсуана", + "BR": "Бразилия", + "VG": "Британски Вирджински острони", + "IO": "Британски територии в Индийския океан", + "BN": "Бруней Дарусалам", + "CI": "Бряг на слоновата кост", + "BF": "Буркина Фасо", + "BI": "Бурунди", + "BT": "Бутан", + "BG": "България", + "VU": "Вануату", + "VE": "Венецуела", + "VN": "Виетнам", + "GA": "Габон", + "GM": "Гамбия", + "GH": "Гана", + "GP": "Гваделупа", + "GT": "Гватемала", + "GY": "Гвиана", + "GN": "Гвинея", + "GW": "Гвинея-Бисау", + "DE": "Германия", + "GI": "Гибралтар", + "GD": "Гренада", + "GL": "Гренландия", + "GE": "Грузия", + "GU": "Гуам", + "GR": "Гърция", + "DK": "Дания", + "CD": "Демократична република Конго", + "DJ": "Джибути", + "DM": "Доминика", + "DO": "Доминиканска република", + "EG": "Египет", + "EC": "Еквадор", + "GQ": "Екваториална Гвинея", + "SV": "Ел Салвадор", + "ER": "Еритрея", + "EE": "Естония", + "ET": "Етиопия", + "ZM": "Замбия", + "EH": "Западна Сахара", + "ZW": "Зимбабве", + "IL": "Израел", + "TL": "Източен Тимор", + "IN": "Индия", + "ID": "Индонезия", + "IQ": "Ирак", + "IR": "Иран, Ислямска република", + "IE": "Ирландия", + "IS": "Исландия", + "ES": "Испания", + "IT": "Италия", + "YE": "Йемен", + "JO": "Йордания", + "CV": "Кабо Верде", + "KZ": "Казахстан", + "KY": "Кайманови острови", + "KH": "Камбоджа", + "CM": "Камерун", + "CA": "Канада", + "QA": "Катар", + "KE": "Кения", + "CY": "Кипър", + "KG": "Киргизстан", + "KI": "Кирибати", + "CN": "Китай", + "CC": "Кокосови (Кийлинг) острови", + "CO": "Колумбия", + "KM": "Комори", + "CG": "Конго", + "KP": "Корея, Северна", + "KR": "Корея, Южна", + "CR": "Коста Рика", + "CU": "Куба", + "KW": "Кувейт", + "LV": "Латвия", + "LS": "Лесото", + "LR": "Либерия", + "LY": "Либийска арабска джамахирия", + "LB": "Ливан", + "LT": "Литва", + "LI": "Лихтенщайн", + "LU": "Люксембург", + "MR": "Мавритания", + "MU": "Мавриций", + "MG": "Мадагаскар", + "MO": "Макао О.А.Р. на Китай", + "MK": "Македония, Република", + "MW": "Малави", + "MY": "Малайзия", + "MV": "Малдиви", + "ML": "Мали", + "MT": "Малта", + "MA": "Мароко", + "MQ": "Мартиника", + "MH": "Маршалови острови", + "YT": "Мейот", + "MX": "Мексико", + "MM": "Мианмар", + "FM": "Микронезия, Обединени Щати", + "MZ": "Мозамбик", + "MD": "Молдова, Република", + "MC": "Монако", + "MN": "Монголия", + "MS": "Монсерат", + "NA": "Намибия", + "LA": "Народна демократична република Лаос", + "NR": "Науру", + "NP": "Непал", + "ZZ": "Непозната или несъществуваща област", + "NE": "Нигер", + "NG": "Нигерия", + "NI": "Никарагуа", + "NU": "Ниуе", + "NZ": "Нова Зеландия", + "NC": "Нова Каледония", + "NO": "Норвегия", + "AE": "Обединени арабски емирства", + "GB": "Обединено кралство", + "OM": "Оман", + "BV": "Остров Буве", + "CX": "Остров Кристмас", + "NF": "Остров Норфолк", + "HM": "Остров Хърд и Острови Макдоналд", + "CK": "Острови Кук", + "IM": "Острови Ман", + "TC": "Острови Туркс и Кайкос", + "PK": "Пакистан", + "PW": "Палау", + "PS": "Палестински територии", + "PA": "Панама", + "PG": "Папуа Нова Гвинея", + "PY": "Парагвай", + "PE": "Перу", + "PN": "Питкайрн", + "PL": "Полша", + "PT": "Португалия", + "PR": "Пуерто Рико", + "RE": "Реюниън", + "RW": "Руанда", + "RO": "Румъния", + "RU": "Руска федерация", + "US": "САЩ", + "UM": "САЩ - външни острови", + "VI": "САЩ, Вирджински острови", + "WS": "Самоа", + "SM": "Сан Марино", + "ST": "Сао Томе и Принципе", + "SA": "Саудитска Арабия", + "SJ": "Свалбард и Ян Майен", + "SH": "Света Елена", + "VA": "Свещено море (Ватиканска държава)", + "MP": "Северни Мариански Острови", + "BL": "Сейнт Бартоломей", + "VC": "Сейнт Винсънт и Гренадини", + "KN": "Сейнт Китс и Невис", + "LC": "Сейнт Лусия", + "MF": "Сейнт Мартин", + "SC": "Сейшели", + "PM": "Сен Пиер и Мигелон", + "SN": "Сенегал", + "SL": "Сиера Леоне", + "SG": "Сингапур", + "SY": "Сирийска арабска република", + "SK": "Словакия", + "SI": "Словения", + "SB": "Соломонови острови", + "SO": "Сомалия", + "SZ": "Суазиленд", + "SD": "Судан", + "SR": "Суринам", + "RS": "Сърбия", + "CS": "Сърбия и Черна гора", + "TJ": "Таджикистан", + "TW": "Тайван", + "TH": "Тайланд", + "TZ": "Танзания", + "TG": "Того", + "TK": "Токелау", + "TO": "Тонга", + "TT": "Тринидад и Тобаго", + "TV": "Тувалу", + "TN": "Тунис", + "TM": "Туркменистан", + "TR": "Турция", + "UG": "Уганда", + "UZ": "Узбекистан", + "UA": "Украйна", + "HU": "Унгария", + "WF": "Уолис и Футуна", + "UY": "Уругвай", + "FO": "Фарьорски острови", + "FJ": "Фиджи", + "PH": "Филипини", + "FI": "Финландия", + "FK": "Фолклендски острови", + "FR": "Франция", + "GF": "Френска Гвиана", + "PF": "Френска Полинезия", + "TF": "Френски южни територии", + "HT": "Хаити", + "NL": "Холандия", + "AN": "Холандски Антили", + "HK": "Хонг-Конг О.А.Р. на Китай", + "HN": "Хондурас", + "HR": "Хърватска", + "CF": "Централноафриканска Република", + "TD": "Чад", + "ME": "Черна гора", + "CZ": "Чешка република", + "CL": "Чили", + "CH": "Швейцария", + "SE": "Швеция", + "LK": "Шри Ланка", + "ZA": "Южна Африка", + "GS": "Южна Джорджия и Южни Сандвичеви Острови", + "JM": "Ямайка", + "JP": "Япония", + "GG": "о. Гърнзи", + "JE": "о. Джързи" +} \ No newline at end of file diff --git a/src/assets/countries/ca.json b/src/assets/countries/ca.json new file mode 100644 index 000000000..ac49521dc --- /dev/null +++ b/src/assets/countries/ca.json @@ -0,0 +1,250 @@ +{ + "AF": "Afganistan", + "AL": "Albània", + "DE": "Alemanya", + "DZ": "Algèria", + "AD": "Andorra", + "AO": "Angola", + "AI": "Anguilla", + "AG": "Antigua i Barbuda", + "AN": "Antilles Neerlandeses", + "AQ": "Antàrtida", + "AR": "Argentina", + "AM": "Armènia", + "AW": "Aruba", + "SA": "Aràbia Saudita", + "AU": "Austràlia", + "AZ": "Azerbaidjan", + "BS": "Bahames", + "BH": "Bahrain", + "BD": "Bangla Desh", + "BB": "Barbados", + "BZ": "Belize", + "BJ": "Benín", + "BM": "Bermudes", + "BT": "Bhutan", + "BY": "Bielorússia", + "BO": "Bolívia", + "BW": "Botswana", + "BR": "Brasil", + "BN": "Brunei", + "BG": "Bulgària", + "BF": "Burkina Faso", + "BI": "Burundi", + "BE": "Bèlgica", + "BA": "Bòsnia i Hercegovina", + "KH": "Cambodja", + "CM": "Camerun", + "CA": "Canadà", + "CV": "Cap Verd", + "CO": "Colòmbia", + "KM": "Comores", + "CG": "Congo", + "KP": "Corea del Nord", + "KR": "Corea del Sud", + "CR": "Costa Rica", + "CI": "Costa d’Ivori", + "HR": "Croàcia", + "CU": "Cuba", + "DK": "Dinamarca", + "DJ": "Djibouti", + "DM": "Dominica", + "EG": "Egipte", + "SV": "El Salvador", + "EC": "Equador", + "ER": "Eritrea", + "SK": "Eslovàquia", + "SI": "Eslovènia", + "ES": "Espanya", + "US": "Estats Units", + "EE": "Estònia", + "ET": "Etiòpia", + "FJ": "Fiji", + "PH": "Filipines", + "FI": "Finlàndia", + "FR": "França", + "GA": "Gabon", + "GE": "Geòrgia", + "GH": "Ghana", + "GI": "Gibraltar", + "GD": "Grenada", + "GL": "Grenlàndia", + "GR": "Grècia", + "GP": "Guadeloupe", + "GF": "Guaiana Francesa", + "GU": "Guam", + "GT": "Guatemala", + "GG": "Guernsey", + "GN": "Guinea", + "GW": "Guinea Bissau", + "GQ": "Guinea Equatorial", + "GY": "Guyana", + "GM": "Gàmbia", + "HT": "Haití", + "HN": "Hondures", + "HU": "Hongria", + "YE": "Iemen", + "BV": "Illa Bouvet", + "CX": "Illa Christmas", + "HM": "Illa Heard i Illes McDonald", + "NF": "Illa Norfolk", + "IM": "Illa de Man", + "RE": "Illa de la Reunió", + "KY": "Illes Caiman", + "CC": "Illes Cocos", + "CK": "Illes Cook", + "FO": "Illes Fèroe", + "GS": "Illes Geòrgia del Sud i Sandwich del Sud", + "FK": "Illes Malvines", + "MP": "Illes Mariannes del Nord", + "MH": "Illes Marshall", + "UM": "Illes Perifèriques Menors dels EUA", + "PN": "Illes Pitcairn", + "SB": "Illes Salomó", + "TC": "Illes Turks i Caicos", + "VG": "Illes Verges Britàniques", + "VI": "Illes Verges Nord-americanes", + "AX": "Illes Åland", + "ID": "Indonèsia", + "IR": "Iran", + "IQ": "Iraq", + "IE": "Irlanda", + "IS": "Islàndia", + "IL": "Israel", + "IT": "Itàlia", + "JM": "Jamaica", + "JP": "Japó", + "JE": "Jersey", + "JO": "Jordània", + "KZ": "Kazakhstan", + "KE": "Kenya", + "KG": "Kirguizistan", + "KI": "Kiribati", + "KW": "Kuwait", + "LA": "Laos", + "LS": "Lesotho", + "LV": "Letònia", + "LR": "Libèria", + "LI": "Liechtenstein", + "LT": "Lituània", + "LU": "Luxemburg", + "LB": "Líban", + "LY": "Líbia", + "MK": "Macedònia", + "MG": "Madagascar", + "MW": "Malawi", + "MV": "Maldives", + "ML": "Mali", + "MT": "Malta", + "MY": "Malàisia", + "MA": "Marroc", + "MQ": "Martinica", + "MU": "Maurici", + "MR": "Mauritània", + "YT": "Mayotte", + "FM": "Micronèsia", + "MD": "Moldàvia", + "MN": "Mongòlia", + "ME": "Montenegro", + "MS": "Montserrat", + "MZ": "Moçambic", + "MM": "Myanmar", + "MX": "Mèxic", + "MC": "Mònaco", + "NA": "Namíbia", + "NR": "Nauru", + "NP": "Nepal", + "NI": "Nicaragua", + "NG": "Nigèria", + "NU": "Niue", + "NO": "Noruega", + "NC": "Nova Caledònia", + "NZ": "Nova Zelanda", + "NE": "Níger", + "OM": "Oman", + "PK": "Pakistan", + "PW": "Palau", + "PS": "Palestina", + "PA": "Panamà", + "PG": "Papua Nova Guinea", + "PY": "Paraguai", + "NL": "Països Baixos", + "PE": "Perú", + "PF": "Polinèsia Francesa", + "PL": "Polònia", + "PT": "Portugal", + "PR": "Puerto Rico", + "QA": "Qatar", + "HK": "Regió administrativa especial xinesa de Hong Kong", + "MO": "Regió administrativa especial xinesa de Macau", + "ZZ": "Regió desconeguda o no vàlida", + "GB": "Regne Unit", + "CF": "República Centreafricana", + "CD": "República Democràtica del Congo", + "DO": "República Dominicana", + "CZ": "República Txeca", + "ZA": "República de Sud-àfrica", + "RO": "Romania", + "RW": "Rwanda", + "RU": "Rússia", + "BL": "Saint Barthélemy", + "KN": "Saint Christopher i Nevis", + "SH": "Saint Helena", + "LC": "Saint Lucia", + "MF": "Saint Martin", + "PM": "Saint Pierre i Miquelon", + "VC": "Saint Vincent i les Grenadines", + "WS": "Samoa", + "AS": "Samoa Americana", + "SM": "San Marino", + "SN": "Senegal", + "SC": "Seychelles", + "SL": "Sierra Leone", + "SG": "Singapur", + "SO": "Somàlia", + "LK": "Sri Lanka", + "SD": "Sudan", + "SR": "Surinam", + "SE": "Suècia", + "CH": "Suïssa", + "SJ": "Svalbard i Jan Mayen", + "SZ": "Swazilàndia", + "EH": "Sàhara Occidental", + "ST": "São Tomé i Príncipe", + "RS": "Sèrbia", + "CS": "Sèrbia i Montenegro", + "SY": "Síria", + "TJ": "Tadjikistan", + "TH": "Tailàndia", + "TW": "Taiwan", + "TZ": "Tanzània", + "IO": "Territori Britànic de l'Oceà Índic", + "TF": "Territoris Francesos del Sud", + "TL": "Timor Oriental", + "TG": "Togo", + "TK": "Tokelau", + "TO": "Tonga", + "TT": "Trinitat i Tobago", + "TN": "Tunísia", + "TM": "Turkmenistan", + "TR": "Turquia", + "TV": "Tuvalu", + "TD": "Txad", + "UA": "Ucraïna", + "UG": "Uganda", + "AE": "Unió dels Emirats Àrabs", + "UY": "Uruguai", + "UZ": "Uzbekistan", + "VU": "Vanuatu", + "VA": "Vaticà", + "VE": "Veneçuela", + "VN": "Vietnam", + "WF": "Wallis i Futuna", + "CL": "Xile", + "CN": "Xina", + "CY": "Xipre", + "ZW": "Zimbabwe", + "ZM": "Zàmbia", + "AT": "Àustria", + "IN": "Índia" +} \ No newline at end of file diff --git a/src/assets/countries/cs.json b/src/assets/countries/cs.json new file mode 100644 index 000000000..b14750b73 --- /dev/null +++ b/src/assets/countries/cs.json @@ -0,0 +1,250 @@ +{ + "AF": "Afghánistán", + "AX": "Alandy", + "AL": "Albánie", + "DZ": "Alžírsko", + "AS": "Americká Samoa", + "VI": "Americké Panenské ostrovy", + "AD": "Andorra", + "AO": "Angola", + "AI": "Anguila", + "AQ": "Antarktida", + "AG": "Antigua a Barbuda", + "AR": "Argentina", + "AM": "Arménie", + "AW": "Aruba", + "AU": "Austrálie", + "BS": "Bahamy", + "BH": "Bahrajn", + "BD": "Bangladéš", + "BB": "Barbados", + "BE": "Belgie", + "BZ": "Belize", + "BJ": "Benin", + "BM": "Bermudy", + "BT": "Bhútán", + "BO": "Bolívie", + "BA": "Bosna a Hercegovina", + "BW": "Botswana", + "BR": "Brazílie", + "VG": "Britské Panenské ostrovy", + "IO": "Britské území v Indickém oceánu", + "BN": "Brunej Darussalam", + "BG": "Bulharsko", + "BF": "Burkina Faso", + "BI": "Burundi", + "BY": "Bělorusko", + "CL": "Chile", + "HR": "Chorvatsko", + "CK": "Cookovy ostrovy", + "CD": "Demokratická republika Kongo", + "DM": "Dominika", + "DO": "Dominikánská republika", + "DK": "Dánsko", + "DJ": "Džibuti", + "EG": "Egypt", + "EC": "Ekvádor", + "SV": "El Salvador", + "ER": "Eritrea", + "EE": "Estonsko", + "ET": "Etiopie", + "FO": "Faerské ostrovy", + "FK": "Falklandské ostrovy", + "FJ": "Fidži", + "PH": "Filipíny", + "FI": "Finsko", + "FR": "Francie", + "GF": "Francouzská Guyana", + "PF": "Francouzská Polynésie", + "TF": "Francouzská jižní teritoria", + "GA": "Gabon", + "GM": "Gambie", + "GH": "Ghana", + "GI": "Gibraltar", + "GD": "Grenada", + "GE": "Gruzie", + "GL": "Grónsko", + "GP": "Guadeloupe", + "GU": "Guam", + "GT": "Guatemala", + "GG": "Guernsey", + "GN": "Guinea", + "GW": "Guinea-Bissau", + "GY": "Guyana", + "HT": "Haiti", + "HN": "Honduras", + "HK": "Hongkong, zvláštní administrativní oblast Číny", + "IN": "Indie", + "ID": "Indonésie", + "IE": "Irsko", + "IQ": "Irák", + "IS": "Island", + "IT": "Itálie", + "IL": "Izrael", + "JM": "Jamajka", + "JP": "Japonsko", + "YE": "Jemen", + "JE": "Jersey", + "ZA": "Jihoafrická republika", + "GS": "Jižní Georgie a Jižní Sandwichovy ostrovy", + "KR": "Jižní Korea", + "JO": "Jordánsko", + "KY": "Kajmanské ostrovy", + "KH": "Kambodža", + "CM": "Kamerun", + "CA": "Kanada", + "CV": "Kapverdy", + "QA": "Katar", + "KZ": "Kazachstán", + "KE": "Keňa", + "KI": "Kiribati", + "CC": "Kokosové ostrovy", + "CO": "Kolumbie", + "KM": "Komory", + "CG": "Kongo", + "CR": "Kostarika", + "CU": "Kuba", + "KW": "Kuvajt", + "CY": "Kypr", + "KG": "Kyrgyzstán", + "LS": "Lesotho", + "LB": "Libanon", + "LY": "Libye", + "LR": "Libérie", + "LI": "Lichtenštejnsko", + "LA": "Lidově demokratická republika Laos", + "LT": "Litva", + "LV": "Lotyšsko", + "LU": "Lucembursko", + "MK": "Macedonia", + "MG": "Madagaskar", + "MV": "Maladivy", + "MY": "Malajsie", + "MW": "Malawi", + "ML": "Mali", + "MT": "Malta", + "MA": "Maroko", + "MH": "Marshallovy ostrovy", + "MQ": "Martinik", + "MU": "Mauricius", + "MR": "Mauritánie", + "YT": "Mayotte", + "HU": "Maďarsko", + "UM": "Menší odlehlé ostrovy USA", + "MX": "Mexiko", + "FM": "Mikronézie", + "MD": "Moldavsko, republika", + "MC": "Monako", + "MN": "Mongolsko", + "MS": "Montserrat", + "MZ": "Mosambik", + "MM": "Myanmar", + "NA": "Namibie", + "NR": "Nauru", + "NP": "Nepál", + "ZZ": "Neznámá nebo neplatná oblast", + "NE": "Niger", + "NG": "Nigérie", + "NI": "Nikaragua", + "NU": "Niue", + "NL": "Nizozemsko", + "AN": "Nizozemské Antily", + "NF": "Norfolk", + "NO": "Norsko", + "NC": "Nová Kaledonie", + "NZ": "Nový Zéland", + "DE": "Německo", + "OM": "Omán", + "BV": "Ostrov Bouvet", + "IM": "Ostrov Man", + "TC": "Ostrovy Caicos a Turks", + "HM": "Ostrovy Heard a McDonald", + "PW": "Palau", + "PS": "Palestinian Territory", + "PA": "Panama", + "PG": "Papua-Nová Guinea", + "PY": "Paraguay", + "PE": "Peru", + "PN": "Pitcairn", + "CI": "Pobřeží slonoviny", + "PL": "Polsko", + "PR": "Portoriko", + "PT": "Portugalsko", + "PK": "Pákistán", + "AT": "Rakousko", + "GQ": "Rovníková Guinea", + "RO": "Rumunsko", + "RU": "Rusko", + "RW": "Rwanda", + "RE": "Réunion", + "WS": "Samoa", + "SM": "San Marino", + "SA": "Saúdská Arábie", + "SN": "Senegal", + "KP": "Severní Korea", + "MP": "Severní Mariany", + "SC": "Seychely", + "SL": "Sierra Leone", + "SG": "Singapur", + "SK": "Slovensko", + "SI": "Slovinsko", + "SO": "Somálsko", + "AE": "Spojené arabské emiráty", + "US": "Spojené státy", + "RS": "Srbsko", + "CS": "Srbsko a Černá Hora", + "LK": "Srí Lanka", + "CF": "Středoafrická republika", + "SR": "Surinam", + "SJ": "Svalbard a Jan Mayen", + "SH": "Svatá Helena", + "LC": "Svatá Lucie", + "BL": "Svatý Bartoloměj", + "KN": "Svatý Kitts a Nevis", + "MF": "Svatý Martin", + "PM": "Svatý Pierre a Miquelon", + "ST": "Svatý Tomáš", + "VC": "Svatý Vincent a Grenadiny", + "VA": "Svatý stolec", + "SZ": "Svazijsko", + "SD": "Súdán", + "SY": "Sýrie", + "TZ": "Tanzanie", + "TW": "Tchaj-wan", + "TH": "Thajsko", + "TG": "Togo", + "TK": "Tokelau", + "TO": "Tonga", + "TT": "Trinidad a Tobago", + "TN": "Tunisko", + "TR": "Turecko", + "TM": "Turkmenistán", + "TV": "Tuvalu", + "TJ": "Tádžikistán", + "UG": "Uganda", + "UA": "Ukrajina", + "UY": "Uruguay", + "UZ": "Uzbekistán", + "VU": "Vanuatu", + "GB": "Velká Británie", + "VE": "Venezuela", + "VN": "Vietnam", + "CX": "Vánoční ostrovy", + "TL": "Východní Timor", + "WF": "Wallis a Futuna", + "ZM": "Zambie", + "ZW": "Zimbabwe", + "MO": "Zvláštní administrativní oblast Číny Macao", + "EH": "Západní Sahara", + "AZ": "Ázerbájdžán", + "IR": "Írán", + "TD": "Čad", + "ME": "Černá Hora", + "CZ": "Česká republika", + "CN": "Čína", + "GR": "Řecko", + "SB": "Šalamounovy ostrovy", + "ES": "Španělsko", + "SE": "Švédsko", + "CH": "Švýcarsko" +} \ No newline at end of file diff --git a/src/assets/countries/de.json b/src/assets/countries/de.json new file mode 100644 index 000000000..d321db177 --- /dev/null +++ b/src/assets/countries/de.json @@ -0,0 +1,250 @@ +{ + "AF": "Afghanistan", + "AX": "Alandinseln", + "AL": "Albanien", + "DZ": "Algerien", + "UM": "Amerikanisch-Ozeanien", + "AS": "Amerikanisch-Samoa", + "VI": "Amerikanische Jungferninseln", + "AD": "Andorra", + "AO": "Angola", + "AI": "Anguilla", + "AQ": "Antarktis", + "AG": "Antigua und Barbuda", + "AR": "Argentinien", + "AM": "Armenien", + "AW": "Aruba", + "AZ": "Aserbaidschan", + "AU": "Australien", + "BS": "Bahamas", + "BH": "Bahrain", + "BD": "Bangladesch", + "BB": "Barbados", + "BY": "Belarus", + "BE": "Belgien", + "BZ": "Belize", + "BJ": "Benin", + "BM": "Bermuda", + "BT": "Bhutan", + "BO": "Bolivien", + "BA": "Bosnien und Herzegowina", + "BW": "Botsuana", + "BV": "Bouvetinsel", + "BR": "Brasilien", + "VG": "Britische Jungferninseln", + "IO": "Britisches Territorium im Indischen Ozean", + "BN": "Brunei Darussalam", + "BG": "Bulgarien", + "BF": "Burkina Faso", + "BI": "Burundi", + "CL": "Chile", + "CN": "China", + "CK": "Cookinseln", + "CR": "Costa Rica", + "CI": "Côte d’Ivoire", + "CD": "Demokratische Republik Kongo", + "KP": "Demokratische Volksrepublik Korea", + "DE": "Deutschland", + "DM": "Dominica", + "DO": "Dominikanische Republik", + "DJ": "Dschibuti", + "DK": "Dänemark", + "EC": "Ecuador", + "SV": "El Salvador", + "ER": "Eritrea", + "EE": "Estland", + "FK": "Falklandinseln", + "FJ": "Fidschi", + "FI": "Finnland", + "FR": "Frankreich", + "GF": "Französisch-Guayana", + "PF": "Französisch-Polynesien", + "TF": "Französische Süd- und Antarktisgebiete", + "FO": "Färöer", + "GA": "Gabun", + "GM": "Gambia", + "GE": "Georgien", + "GH": "Ghana", + "GI": "Gibraltar", + "GD": "Grenada", + "GR": "Griechenland", + "GL": "Grönland", + "GP": "Guadeloupe", + "GU": "Guam", + "GT": "Guatemala", + "GG": "Guernsey", + "GN": "Guinea", + "GW": "Guinea-Bissau", + "GY": "Guyana", + "HT": "Haiti", + "HM": "Heard- und McDonald-Inseln", + "HN": "Honduras", + "IN": "Indien", + "ID": "Indonesien", + "IQ": "Irak", + "IR": "Iran", + "IE": "Irland", + "IS": "Island", + "IM": "Isle of Man", + "IL": "Israel", + "IT": "Italien", + "JM": "Jamaika", + "JP": "Japan", + "YE": "Jemen", + "JE": "Jersey", + "JO": "Jordanien", + "KY": "Kaimaninseln", + "KH": "Kambodscha", + "CM": "Kamerun", + "CA": "Kanada", + "CV": "Kap Verde", + "KZ": "Kasachstan", + "QA": "Katar", + "KE": "Kenia", + "KG": "Kirgisistan", + "KI": "Kiribati", + "CC": "Kokosinseln", + "CO": "Kolumbien", + "KM": "Komoren", + "CG": "Kongo", + "HR": "Kroatien", + "CU": "Kuba", + "KW": "Kuwait", + "LA": "Laos", + "LS": "Lesotho", + "LV": "Lettland", + "LB": "Libanon", + "LR": "Liberia", + "LY": "Libyen", + "LI": "Liechtenstein", + "LT": "Litauen", + "LU": "Luxemburg", + "MG": "Madagaskar", + "MW": "Malawi", + "MY": "Malaysia", + "MV": "Malediven", + "ML": "Mali", + "MT": "Malta", + "MA": "Marokko", + "MH": "Marshallinseln", + "MQ": "Martinique", + "MR": "Mauretanien", + "MU": "Mauritius", + "YT": "Mayotte", + "MK": "Mazedonien", + "MX": "Mexiko", + "FM": "Mikronesien", + "MC": "Monaco", + "MN": "Mongolei", + "ME": "Montenegro", + "MS": "Montserrat", + "MZ": "Mosambik", + "MM": "Myanmar", + "NA": "Namibia", + "NR": "Nauru", + "NP": "Nepal", + "NC": "Neukaledonien", + "NZ": "Neuseeland", + "NI": "Nicaragua", + "NL": "Niederlande", + "AN": "Niederländische Antillen", + "NE": "Niger", + "NG": "Nigeria", + "NU": "Niue", + "NF": "Norfolkinsel", + "NO": "Norwegen", + "MP": "Nördliche Marianen", + "OM": "Oman", + "TL": "Osttimor", + "PK": "Pakistan", + "PW": "Palau", + "PS": "Palästinensische Gebiete", + "PA": "Panama", + "PG": "Papua-Neuguinea", + "PY": "Paraguay", + "PE": "Peru", + "PH": "Philippinen", + "PN": "Pitcairn", + "PL": "Polen", + "PT": "Portugal", + "PR": "Puerto Rico", + "KR": "Republik Korea", + "MD": "Republik Moldau", + "RW": "Ruanda", + "RO": "Rumänien", + "RU": "Russische Föderation", + "RE": "Réunion", + "SB": "Salomonen", + "ZM": "Sambia", + "WS": "Samoa", + "SM": "San Marino", + "SA": "Saudi-Arabien", + "SE": "Schweden", + "CH": "Schweiz", + "SN": "Senegal", + "RS": "Serbien", + "CS": "Serbien und Montenegro", + "SC": "Seychellen", + "SL": "Sierra Leone", + "ZW": "Simbabwe", + "SG": "Singapur", + "SK": "Slowakei", + "SI": "Slowenien", + "SO": "Somalia", + "HK": "Sonderverwaltungszone Hongkong", + "MO": "Sonderverwaltungszone Macao", + "ES": "Spanien", + "LK": "Sri Lanka", + "BL": "St. Barthélemy", + "SH": "St. Helena", + "KN": "St. Kitts und Nevis", + "LC": "St. Lucia", + "MF": "St. Martin", + "PM": "St. Pierre und Miquelon", + "VC": "St. Vincent und die Grenadinen", + "SD": "Sudan", + "SR": "Suriname", + "SJ": "Svalbard und Jan Mayen", + "SZ": "Swasiland", + "SY": "Syrien", + "ST": "São Tomé und Príncipe", + "ZA": "Südafrika", + "GS": "Südgeorgien und die Südlichen Sandwichinseln", + "TJ": "Tadschikistan", + "TW": "Taiwan", + "TZ": "Tansania", + "TH": "Thailand", + "TG": "Togo", + "TK": "Tokelau", + "TO": "Tonga", + "TT": "Trinidad und Tobago", + "TD": "Tschad", + "CZ": "Tschechische Republik", + "TN": "Tunesien", + "TM": "Turkmenistan", + "TC": "Turks- und Caicosinseln", + "TV": "Tuvalu", + "TR": "Türkei", + "UG": "Uganda", + "UA": "Ukraine", + "ZZ": "Unbekannte oder ungültige Region", + "HU": "Ungarn", + "UY": "Uruguay", + "UZ": "Usbekistan", + "VU": "Vanuatu", + "VA": "Vatikanstadt", + "VE": "Venezuela", + "AE": "Vereinigte Arabische Emirate", + "US": "Vereinigte Staaten", + "GB": "Vereinigtes Königreich", + "VN": "Vietnam", + "WF": "Wallis und Futuna", + "CX": "Weihnachtsinsel", + "EH": "Westsahara", + "CF": "Zentralafrikanische Republik", + "CY": "Zypern", + "EG": "Ägypten", + "GQ": "Äquatorialguinea", + "ET": "Äthiopien", + "AT": "Österreich" +} \ No newline at end of file diff --git a/src/assets/countries/en.json b/src/assets/countries/en.json new file mode 100644 index 000000000..386df19d4 --- /dev/null +++ b/src/assets/countries/en.json @@ -0,0 +1,251 @@ +{ + "AF": "Afghanistan", + "AX": "Åland Islands", + "AL": "Albania", + "DZ": "Algeria", + "AS": "American Samoa", + "AD": "Andorra", + "AO": "Angola", + "AI": "Anguilla", + "AQ": "Antarctica", + "AG": "Antigua And Barbuda", + "AR": "Argentina", + "AM": "Armenia", + "AW": "Aruba", + "AU": "Australia", + "AT": "Austria", + "AZ": "Azerbaijan", + "BS": "Bahamas", + "BH": "Bahrain", + "BD": "Bangladesh", + "BB": "Barbados", + "BY": "Belarus", + "BE": "Belgium", + "BZ": "Belize", + "BJ": "Benin", + "BM": "Bermuda", + "BT": "Bhutan", + "BO": "Bolivia, Plurinational State Of", + "BQ": "Bonaire, Sint Eustatius And Saba", + "BA": "Bosnia And Herzegovina", + "BW": "Botswana", + "BV": "Bouvet Island", + "BR": "Brazil", + "IO": "British Indian Ocean Territory", + "BN": "Brunei Darussalam", + "BG": "Bulgaria", + "BF": "Burkina Faso", + "BI": "Burundi", + "CV": "Cabo Verde", + "KH": "Cambodia", + "CM": "Cameroon", + "CA": "Canada", + "KY": "Cayman Islands", + "CF": "Central African Republic", + "TD": "Chad", + "CL": "Chile", + "CN": "China", + "CX": "Christmas Island", + "CC": "Cocos (Keeling) Islands", + "CO": "Colombia", + "KM": "Comoros", + "CG": "Congo", + "CD": "Congo, The Democratic Republic Of The", + "CK": "Cook Islands", + "CR": "Costa Rica", + "CI": "Côte d'Ivoire", + "HR": "Croatia", + "CU": "Cuba", + "CW": "Curaçao", + "CY": "Cyprus", + "CZ": "Czechia", + "DK": "Denmark", + "DJ": "Djibouti", + "DM": "Dominica", + "DO": "Dominican Republic", + "EC": "Ecuador", + "EG": "Egypt", + "SV": "El Salvador", + "GQ": "Equatorial Guinea", + "ER": "Eritrea", + "EE": "Estonia", + "ET": "Ethiopia", + "FK": "Falkland Islands (Malvinas)", + "FO": "Faroe Islands", + "FJ": "Fiji", + "FI": "Finland", + "FR": "France", + "GF": "French Guiana", + "PF": "French Polynesia", + "TF": "French Southern Territories", + "GA": "Gabon", + "GM": "Gambia", + "GE": "Georgia", + "DE": "Germany", + "GH": "Ghana", + "GI": "Gibraltar", + "GR": "Greece", + "GL": "Greenland", + "GD": "Grenada", + "GP": "Guadeloupe", + "GU": "Guam", + "GT": "Guatemala", + "GG": "Guernsey", + "GN": "Guinea", + "GW": "Guinea-Bissau", + "GY": "Guyana", + "HT": "Haiti", + "HM": "Heard Island And Mcdonald Islands", + "VA": "Holy See (Vatican City State)", + "HN": "Honduras", + "HK": "Hong Kong", + "HU": "Hungary", + "IS": "Iceland", + "IN": "India", + "ID": "Indonesia", + "IR": "Iran, Islamic Republic Of", + "IQ": "Iraq", + "IE": "Ireland", + "IM": "Isle Of Man", + "IL": "Israel", + "IT": "Italy", + "JM": "Jamaica", + "JP": "Japan", + "JE": "Jersey", + "JO": "Jordan", + "KZ": "Kazakhstan", + "KE": "Kenya", + "KI": "Kiribati", + "KP": "Korea, Democratic People's Republic Of", + "KR": "Korea, Republic Of", + "KW": "Kuwait", + "KG": "Kyrgyzstan", + "LA": "Lao People's Democratic Republic", + "LV": "Latvia", + "LB": "Lebanon", + "LS": "Lesotho", + "LR": "Liberia", + "LY": "Libya", + "LI": "Liechtenstein", + "LT": "Lithuania", + "LU": "Luxembourg", + "MO": "Macao", + "MK": "Macedonia, The Former Yugoslav Republic Of", + "MG": "Madagascar", + "MW": "Malawi", + "MY": "Malaysia", + "MV": "Maldives", + "ML": "Mali", + "MT": "Malta", + "MH": "Marshall Islands", + "MQ": "Martinique", + "MR": "Mauritania", + "MU": "Mauritius", + "YT": "Mayotte", + "MX": "Mexico", + "FM": "Micronesia, Federated States Of", + "MD": "Moldova, Republic Of", + "MC": "Monaco", + "MN": "Mongolia", + "ME": "Montenegro", + "MS": "Montserrat", + "MA": "Morocco", + "MZ": "Mozambique", + "MM": "Myanmar", + "NA": "Namibia", + "NR": "Nauru", + "NP": "Nepal", + "NL": "Netherlands", + "NC": "New Caledonia", + "NZ": "New Zealand", + "NI": "Nicaragua", + "NE": "Niger", + "NG": "Nigeria", + "NU": "Niue", + "NF": "Norfolk Island", + "MP": "Northern Mariana Islands", + "NO": "Norway", + "OM": "Oman", + "PK": "Pakistan", + "PW": "Palau", + "PS": "Palestine, State Of", + "PA": "Panama", + "PG": "Papua New Guinea", + "PY": "Paraguay", + "PE": "Peru", + "PH": "Philippines", + "PN": "Pitcairn", + "PL": "Poland", + "PT": "Portugal", + "PR": "Puerto Rico", + "QA": "Qatar", + "RE": "Réunion", + "RO": "Romania", + "RU": "Russian Federation", + "RW": "Rwanda", + "BL": "Saint Barthélemy", + "SH": "Saint Helena, Ascension And Tristan Da Cunha", + "KN": "Saint Kitts And Nevis", + "LC": "Saint Lucia", + "MF": "Saint Martin (French Part)", + "PM": "Saint Pierre And Miquelon", + "VC": "Saint Vincent And The Grenadines", + "WS": "Samoa", + "SM": "San Marino", + "ST": "Sao Tome And Principe", + "SA": "Saudi Arabia", + "SN": "Senegal", + "RS": "Serbia", + "SC": "Seychelles", + "SL": "Sierra Leone", + "SG": "Singapore", + "SX": "Sint Maarten (Dutch Part)", + "SK": "Slovakia", + "SI": "Slovenia", + "SB": "Solomon Islands", + "SO": "Somalia", + "ZA": "South Africa", + "GS": "South Georgia And The South Sandwich Islands", + "SS": "South Sudan", + "ES": "Spain", + "LK": "Sri Lanka", + "SD": "Sudan", + "SR": "Suriname", + "SJ": "Svalbard And Jan Mayen", + "SZ": "Swaziland", + "SE": "Sweden", + "CH": "Switzerland", + "SY": "Syrian Arab Republic", + "TW": "Taiwan", + "TJ": "Tajikistan", + "TZ": "Tanzania, United Republic Of", + "TH": "Thailand", + "TL": "Timor-Leste", + "TG": "Togo", + "TK": "Tokelau", + "TO": "Tonga", + "TT": "Trinidad And Tobago", + "TN": "Tunisia", + "TR": "Turkey", + "TM": "Turkmenistan", + "TC": "Turks And Caicos Islands", + "TV": "Tuvalu", + "UG": "Uganda", + "UA": "Ukraine", + "AE": "United Arab Emirates", + "GB": "United Kingdom", + "US": "United States", + "UM": "United States Minor Outlying Islands", + "UY": "Uruguay", + "UZ": "Uzbekistan", + "VU": "Vanuatu", + "VE": "Venezuela, Bolivarian Republic Of", + "VN": "Viet Nam", + "VG": "Virgin Islands, British", + "VI": "Virgin Islands, U.S.", + "WF": "Wallis And Futuna", + "EH": "Western Sahara", + "YE": "Yemen", + "ZM": "Zambia", + "ZW": "Zimbabwe" +} \ No newline at end of file diff --git a/src/assets/countries/es-mx.json b/src/assets/countries/es-mx.json new file mode 100644 index 000000000..366e19373 --- /dev/null +++ b/src/assets/countries/es-mx.json @@ -0,0 +1,250 @@ +{ + "AF": "Afganistán", + "AL": "Albania", + "DE": "Alemania", + "AD": "Andorra", + "AO": "Angola", + "AI": "Anguila", + "AG": "Antigua y Barbuda", + "AN": "Antillas Neerlandesas", + "AQ": "Antártida", + "SA": "Arabia Saudí", + "DZ": "Argelia", + "AR": "Argentina", + "AM": "Armenia", + "AW": "Aruba", + "AU": "Australia", + "AT": "Austria", + "AZ": "Azerbaiyán", + "BS": "Bahamas", + "BH": "Bahréin", + "BD": "Bangladesh", + "BB": "Barbados", + "BZ": "Belice", + "BJ": "Benín", + "BM": "Bermudas", + "BY": "Bielorrusia", + "BO": "Bolivia", + "BA": "Bosnia-Herzegovina", + "BW": "Botsuana", + "BR": "Brasil", + "BN": "Brunéi", + "BG": "Bulgaria", + "BF": "Burkina Faso", + "BI": "Burundi", + "BT": "Bután", + "BE": "Bélgica", + "CV": "Cabo Verde", + "KH": "Camboya", + "CM": "Camerún", + "CA": "Canadá", + "TD": "Chad", + "CL": "Chile", + "CN": "China", + "CY": "Chipre", + "VA": "Ciudad del Vaticano", + "CO": "Colombia", + "KM": "Comoras", + "CG": "Congo", + "KP": "Corea del Norte", + "KR": "Corea del Sur", + "CR": "Costa Rica", + "CI": "Costa de Marfil", + "HR": "Croacia", + "CU": "Cuba", + "DK": "Dinamarca", + "DM": "Dominica", + "EC": "Ecuador", + "EG": "Egipto", + "SV": "El Salvador", + "AE": "Emiratos Árabes Unidos", + "ER": "Eritrea", + "SK": "Eslovaquia", + "SI": "Eslovenia", + "ES": "España", + "US": "Estados Unidos", + "EE": "Estonia", + "ET": "Etiopía", + "PH": "Filipinas", + "FI": "Finlandia", + "FJ": "Fiyi", + "FR": "Francia", + "GA": "Gabón", + "GM": "Gambia", + "GE": "Georgia", + "GH": "Ghana", + "GI": "Gibraltar", + "GD": "Granada", + "GR": "Grecia", + "GL": "Groenlandia", + "GP": "Guadalupe", + "GU": "Guam", + "GT": "Guatemala", + "GF": "Guayana Francesa", + "GG": "Guernsey", + "GN": "Guinea", + "GQ": "Guinea Ecuatorial", + "GW": "Guinea-Bissau", + "GY": "Guyana", + "HT": "Haití", + "HN": "Honduras", + "HU": "Hungría", + "IN": "India", + "ID": "Indonesia", + "IQ": "Iraq", + "IE": "Irlanda", + "IR": "Irán", + "BV": "Isla Bouvet", + "CX": "Isla Christmas", + "NU": "Isla Niue", + "NF": "Isla Norfolk", + "IM": "Isla de Man", + "IS": "Islandia", + "KY": "Islas Caimán", + "CC": "Islas Cocos", + "CK": "Islas Cook", + "FO": "Islas Feroe", + "GS": "Islas Georgia del Sur y Sandwich del Sur", + "HM": "Islas Heard y McDonald", + "FK": "Islas Malvinas", + "MP": "Islas Marianas del Norte", + "MH": "Islas Marshall", + "SB": "Islas Salomón", + "TC": "Islas Turcas y Caicos", + "VG": "Islas Vírgenes Británicas", + "VI": "Islas Vírgenes de los Estados Unidos", + "UM": "Islas menores alejadas de los Estados Unidos", + "AX": "Islas Åland", + "IL": "Israel", + "IT": "Italia", + "JM": "Jamaica", + "JP": "Japón", + "JE": "Jersey", + "JO": "Jordania", + "KZ": "Kazajistán", + "KE": "Kenia", + "KG": "Kirguistán", + "KI": "Kiribati", + "KW": "Kuwait", + "LA": "Laos", + "LS": "Lesoto", + "LV": "Letonia", + "LR": "Liberia", + "LY": "Libia", + "LI": "Liechtenstein", + "LT": "Lituania", + "LU": "Luxemburgo", + "LB": "Líbano", + "MK": "Macedonia", + "MG": "Madagascar", + "MY": "Malasia", + "MW": "Malaui", + "MV": "Maldivas", + "ML": "Mali", + "MT": "Malta", + "MA": "Marruecos", + "MQ": "Martinica", + "MU": "Mauricio", + "MR": "Mauritania", + "YT": "Mayotte", + "FM": "Micronesia", + "MD": "Moldavia", + "MN": "Mongolia", + "ME": "Montenegro", + "MS": "Montserrat", + "MZ": "Mozambique", + "MM": "Myanmar", + "MX": "México", + "MC": "Mónaco", + "NA": "Namibia", + "NR": "Nauru", + "NP": "Nepal", + "NI": "Nicaragua", + "NG": "Nigeria", + "NO": "Noruega", + "NC": "Nueva Caledonia", + "NZ": "Nueva Zelanda", + "NE": "Níger", + "OM": "Omán", + "PK": "Pakistán", + "PW": "Palau", + "PS": "Palestina", + "PA": "Panamá", + "PG": "Papúa Nueva Guinea", + "PY": "Paraguay", + "NL": "Países Bajos", + "PE": "Perú", + "PN": "Pitcairn", + "PF": "Polinesia Francesa", + "PL": "Polonia", + "PT": "Portugal", + "PR": "Puerto Rico", + "QA": "Qatar", + "HK": "Región Administrativa Especial de Hong Kong de la República Popular China", + "MO": "Región Administrativa Especial de Macao de la República Popular China", + "ZZ": "Región desconocida o no válida", + "GB": "Reino Unido", + "CF": "República Centroafricana", + "CZ": "República Checa", + "CD": "República Democrática del Congo", + "DO": "República Dominicana", + "RE": "Reunión", + "RW": "Ruanda", + "RO": "Rumanía", + "RU": "Rusia", + "WS": "Samoa", + "AS": "Samoa Americana", + "BL": "San Bartolomé", + "KN": "San Cristóbal y Nieves", + "SM": "San Marino", + "MF": "San Martín", + "PM": "San Pedro y Miquelón", + "VC": "San Vicente y las Granadinas", + "SH": "Santa Elena", + "LC": "Santa Lucía", + "ST": "Santo Tomé y Príncipe", + "SN": "Senegal", + "RS": "Serbia", + "CS": "Serbia y Montenegro", + "SC": "Seychelles", + "SL": "Sierra Leona", + "SG": "Singapur", + "SY": "Siria", + "SO": "Somalia", + "LK": "Sri Lanka", + "SZ": "Suazilandia", + "ZA": "Sudáfrica", + "SD": "Sudán", + "SE": "Suecia", + "CH": "Suiza", + "SR": "Surinam", + "SJ": "Svalbard y Jan Mayen", + "EH": "Sáhara Occidental", + "TH": "Tailandia", + "TW": "Taiwán", + "TZ": "Tanzania", + "TJ": "Tayikistán", + "IO": "Territorio Británico del Océano Índico", + "TF": "Territorios Australes Franceses", + "TL": "Timor Oriental", + "TG": "Togo", + "TK": "Tokelau", + "TO": "Tonga", + "TT": "Trinidad y Tobago", + "TM": "Turkmenistán", + "TR": "Turquía", + "TV": "Tuvalu", + "TN": "Túnez", + "UA": "Ucrania", + "UG": "Uganda", + "UY": "Uruguay", + "UZ": "Uzbekistán", + "VU": "Vanuatu", + "VE": "Venezuela", + "VN": "Vietnam", + "WF": "Wallis y Futuna", + "YE": "Yemen", + "DJ": "Yibuti", + "ZM": "Zambia", + "ZW": "Zimbabue" +} \ No newline at end of file diff --git a/src/assets/countries/es.json b/src/assets/countries/es.json new file mode 100644 index 000000000..366e19373 --- /dev/null +++ b/src/assets/countries/es.json @@ -0,0 +1,250 @@ +{ + "AF": "Afganistán", + "AL": "Albania", + "DE": "Alemania", + "AD": "Andorra", + "AO": "Angola", + "AI": "Anguila", + "AG": "Antigua y Barbuda", + "AN": "Antillas Neerlandesas", + "AQ": "Antártida", + "SA": "Arabia Saudí", + "DZ": "Argelia", + "AR": "Argentina", + "AM": "Armenia", + "AW": "Aruba", + "AU": "Australia", + "AT": "Austria", + "AZ": "Azerbaiyán", + "BS": "Bahamas", + "BH": "Bahréin", + "BD": "Bangladesh", + "BB": "Barbados", + "BZ": "Belice", + "BJ": "Benín", + "BM": "Bermudas", + "BY": "Bielorrusia", + "BO": "Bolivia", + "BA": "Bosnia-Herzegovina", + "BW": "Botsuana", + "BR": "Brasil", + "BN": "Brunéi", + "BG": "Bulgaria", + "BF": "Burkina Faso", + "BI": "Burundi", + "BT": "Bután", + "BE": "Bélgica", + "CV": "Cabo Verde", + "KH": "Camboya", + "CM": "Camerún", + "CA": "Canadá", + "TD": "Chad", + "CL": "Chile", + "CN": "China", + "CY": "Chipre", + "VA": "Ciudad del Vaticano", + "CO": "Colombia", + "KM": "Comoras", + "CG": "Congo", + "KP": "Corea del Norte", + "KR": "Corea del Sur", + "CR": "Costa Rica", + "CI": "Costa de Marfil", + "HR": "Croacia", + "CU": "Cuba", + "DK": "Dinamarca", + "DM": "Dominica", + "EC": "Ecuador", + "EG": "Egipto", + "SV": "El Salvador", + "AE": "Emiratos Árabes Unidos", + "ER": "Eritrea", + "SK": "Eslovaquia", + "SI": "Eslovenia", + "ES": "España", + "US": "Estados Unidos", + "EE": "Estonia", + "ET": "Etiopía", + "PH": "Filipinas", + "FI": "Finlandia", + "FJ": "Fiyi", + "FR": "Francia", + "GA": "Gabón", + "GM": "Gambia", + "GE": "Georgia", + "GH": "Ghana", + "GI": "Gibraltar", + "GD": "Granada", + "GR": "Grecia", + "GL": "Groenlandia", + "GP": "Guadalupe", + "GU": "Guam", + "GT": "Guatemala", + "GF": "Guayana Francesa", + "GG": "Guernsey", + "GN": "Guinea", + "GQ": "Guinea Ecuatorial", + "GW": "Guinea-Bissau", + "GY": "Guyana", + "HT": "Haití", + "HN": "Honduras", + "HU": "Hungría", + "IN": "India", + "ID": "Indonesia", + "IQ": "Iraq", + "IE": "Irlanda", + "IR": "Irán", + "BV": "Isla Bouvet", + "CX": "Isla Christmas", + "NU": "Isla Niue", + "NF": "Isla Norfolk", + "IM": "Isla de Man", + "IS": "Islandia", + "KY": "Islas Caimán", + "CC": "Islas Cocos", + "CK": "Islas Cook", + "FO": "Islas Feroe", + "GS": "Islas Georgia del Sur y Sandwich del Sur", + "HM": "Islas Heard y McDonald", + "FK": "Islas Malvinas", + "MP": "Islas Marianas del Norte", + "MH": "Islas Marshall", + "SB": "Islas Salomón", + "TC": "Islas Turcas y Caicos", + "VG": "Islas Vírgenes Británicas", + "VI": "Islas Vírgenes de los Estados Unidos", + "UM": "Islas menores alejadas de los Estados Unidos", + "AX": "Islas Åland", + "IL": "Israel", + "IT": "Italia", + "JM": "Jamaica", + "JP": "Japón", + "JE": "Jersey", + "JO": "Jordania", + "KZ": "Kazajistán", + "KE": "Kenia", + "KG": "Kirguistán", + "KI": "Kiribati", + "KW": "Kuwait", + "LA": "Laos", + "LS": "Lesoto", + "LV": "Letonia", + "LR": "Liberia", + "LY": "Libia", + "LI": "Liechtenstein", + "LT": "Lituania", + "LU": "Luxemburgo", + "LB": "Líbano", + "MK": "Macedonia", + "MG": "Madagascar", + "MY": "Malasia", + "MW": "Malaui", + "MV": "Maldivas", + "ML": "Mali", + "MT": "Malta", + "MA": "Marruecos", + "MQ": "Martinica", + "MU": "Mauricio", + "MR": "Mauritania", + "YT": "Mayotte", + "FM": "Micronesia", + "MD": "Moldavia", + "MN": "Mongolia", + "ME": "Montenegro", + "MS": "Montserrat", + "MZ": "Mozambique", + "MM": "Myanmar", + "MX": "México", + "MC": "Mónaco", + "NA": "Namibia", + "NR": "Nauru", + "NP": "Nepal", + "NI": "Nicaragua", + "NG": "Nigeria", + "NO": "Noruega", + "NC": "Nueva Caledonia", + "NZ": "Nueva Zelanda", + "NE": "Níger", + "OM": "Omán", + "PK": "Pakistán", + "PW": "Palau", + "PS": "Palestina", + "PA": "Panamá", + "PG": "Papúa Nueva Guinea", + "PY": "Paraguay", + "NL": "Países Bajos", + "PE": "Perú", + "PN": "Pitcairn", + "PF": "Polinesia Francesa", + "PL": "Polonia", + "PT": "Portugal", + "PR": "Puerto Rico", + "QA": "Qatar", + "HK": "Región Administrativa Especial de Hong Kong de la República Popular China", + "MO": "Región Administrativa Especial de Macao de la República Popular China", + "ZZ": "Región desconocida o no válida", + "GB": "Reino Unido", + "CF": "República Centroafricana", + "CZ": "República Checa", + "CD": "República Democrática del Congo", + "DO": "República Dominicana", + "RE": "Reunión", + "RW": "Ruanda", + "RO": "Rumanía", + "RU": "Rusia", + "WS": "Samoa", + "AS": "Samoa Americana", + "BL": "San Bartolomé", + "KN": "San Cristóbal y Nieves", + "SM": "San Marino", + "MF": "San Martín", + "PM": "San Pedro y Miquelón", + "VC": "San Vicente y las Granadinas", + "SH": "Santa Elena", + "LC": "Santa Lucía", + "ST": "Santo Tomé y Príncipe", + "SN": "Senegal", + "RS": "Serbia", + "CS": "Serbia y Montenegro", + "SC": "Seychelles", + "SL": "Sierra Leona", + "SG": "Singapur", + "SY": "Siria", + "SO": "Somalia", + "LK": "Sri Lanka", + "SZ": "Suazilandia", + "ZA": "Sudáfrica", + "SD": "Sudán", + "SE": "Suecia", + "CH": "Suiza", + "SR": "Surinam", + "SJ": "Svalbard y Jan Mayen", + "EH": "Sáhara Occidental", + "TH": "Tailandia", + "TW": "Taiwán", + "TZ": "Tanzania", + "TJ": "Tayikistán", + "IO": "Territorio Británico del Océano Índico", + "TF": "Territorios Australes Franceses", + "TL": "Timor Oriental", + "TG": "Togo", + "TK": "Tokelau", + "TO": "Tonga", + "TT": "Trinidad y Tobago", + "TM": "Turkmenistán", + "TR": "Turquía", + "TV": "Tuvalu", + "TN": "Túnez", + "UA": "Ucrania", + "UG": "Uganda", + "UY": "Uruguay", + "UZ": "Uzbekistán", + "VU": "Vanuatu", + "VE": "Venezuela", + "VN": "Vietnam", + "WF": "Wallis y Futuna", + "YE": "Yemen", + "DJ": "Yibuti", + "ZM": "Zambia", + "ZW": "Zimbabue" +} \ No newline at end of file diff --git a/src/assets/countries/eu.json b/src/assets/countries/eu.json new file mode 100644 index 000000000..0ee8ec24e --- /dev/null +++ b/src/assets/countries/eu.json @@ -0,0 +1,217 @@ +{ + "AF": "Afganistan", + "CF": "Afrika Erdiko Errepublika", + "AX": "Aland Uharteak", + "AL": "Albania", + "DE": "Alemania", + "DZ": "Aljeria", + "AS": "Amerikar Samoa", + "US": "Ameriketako Estatu Batuak", + "AO": "Angola", + "AQ": "Antartika", + "AG": "Antigua eta Barbuda", + "AE": "Arabiar Emirrerri Batuak", + "AR": "Argentina", + "AM": "Armenia", + "AU": "Australia", + "AT": "Austria", + "AZ": "Azerbaijan", + "BS": "Bahamak", + "BD": "Bangladesh", + "BE": "Belgika", + "BJ": "Benin", + "BT": "Bhutan", + "BY": "Bielorrusia", + "VI": "Birjina uharte amerikarrak", + "VG": "Birjina uharte britainiarrak", + "MM": "Birmania", + "CI": "Boli Kosta", + "BO": "Bolibia", + "BA": "Bosnia-Herzegovina", + "BW": "Botswana", + "BV": "Bouvet Uhartea", + "BR": "Brasil", + "BG": "Bulgaria", + "BF": "Burkina Faso", + "BI": "Burundi", + "CV": "Cabo Verde", + "CX": "Christmas uhartea", + "CC": "Cocos uharteak", + "CK": "Cook uharteak", + "DK": "Danimarka", + "DJ": "Djibuti", + "DM": "Dominika", + "DO": "Dominikar Errepublika", + "EG": "Egipto", + "TL": "Ekialdeko Timor", + "EC": "Ekuador", + "GQ": "Ekuatore Ginea", + "ER": "Eritrea", + "GB": "Erresuma Batua", + "RO": "Errumania", + "RU": "Errusia", + "SK": "Eslovakia", + "SI": "Eslovenia", + "ES": "Espainia", + "UM": "Estatu Batuetatik urruti dauden uharte txikiak", + "EE": "Estonia", + "ET": "Etiopia", + "FO": "Faroe Uharteak", + "PH": "Filipinak", + "FI": "Finlandia", + "FR": "Frantzia", + "TF": "Frantziaren Lurralde Australak", + "GA": "Gabon", + "GM": "Gambia", + "GE": "Georgia", + "GH": "Ghana", + "GN": "Ginea", + "GW": "Ginea-Bissau", + "GR": "Grezia", + "GL": "Groenlandia", + "GG": "Guernsey", + "GF": "Guyana Frantsesa", + "HT": "Haiti", + "HM": "Heard eta McDonald Uharteak", + "KR": "Hego Korea", + "ZA": "Hegoafrika", + "GS": "Hegoaldeko Georgia eta Hegoaldeko Sandwich uharteak", + "NL": "Herbehereak", + "AN": "Holandarren Antillak", + "HN": "Honduras", + "HU": "Hungaria", + "IN": "India", + "IO": "Indiako Ozeanoko Britainiar Lurraldea", + "ID": "Indonesia", + "KP": "Ipar Korea", + "MP": "Iparraldeko Mariana uharteak", + "IQ": "Irak", + "IR": "Iran", + "IE": "Irlanda", + "IS": "Islandia", + "IL": "Israel", + "IT": "Italia", + "JM": "Jamaika", + "JP": "Japonia", + "JE": "Jersey", + "JO": "Jordania", + "KY": "Kaiman Uharteak", + "NC": "Kaledonia Berria", + "CM": "Kamerun", + "CA": "Kanada", + "KH": "Kanbodia", + "QA": "Katar", + "KZ": "Kazakhstan", + "KE": "Kenia", + "KG": "Kirgizistan", + "KI": "Kiribati", + "CO": "Kolonbia", + "KM": "Komoreak", + "CG": "Kongo", + "CD": "Kongoko Errepublika Demokratikoa", + "HR": "Kroazia", + "CU": "Kuba", + "LA": "Laos", + "LS": "Lesotho", + "LV": "Letonia", + "LB": "Libano", + "LR": "Liberia", + "LY": "Libia", + "LI": "Liechtenstein", + "LT": "Lituania", + "LU": "Luxenburgo", + "MG": "Madagaskar", + "MO": "Makau", + "MY": "Malasia", + "MW": "Malawi", + "MV": "Maldivak", + "ML": "Mali", + "FK": "Malvinak", + "IM": "Man uhartea", + "MA": "Maroko", + "MH": "Marshall uharteak", + "MR": "Mauritania", + "MU": "Maurizio", + "MK": "Mazedonia", + "EH": "Mendebaldeko Sahara", + "MX": "Mexiko", + "FM": "Mikronesia", + "MD": "Moldavia", + "MC": "Monako", + "MN": "Mongolia", + "ME": "Montenegro", + "MZ": "Mozambike", + "NA": "Namibia", + "NP": "Nepal", + "NE": "Niger", + "NG": "Nigeria", + "NI": "Nikaragua", + "NF": "Norfolk uhartea", + "NO": "Norvegia", + "OM": "Oman", + "PK": "Pakistan", + "PS": "Palestina", + "PG": "Papua Ginea Berria", + "PY": "Paraguai", + "PE": "Peru", + "PF": "Polinesia Frantsesa", + "PL": "Polonia", + "PT": "Portugal", + "RW": "Ruanda", + "SH": "Saint Helena", + "KN": "Saint Kitts eta Nevis", + "VC": "Saint Vincent eta Grenadinak", + "PM": "Saint-Pierre eta Mikelune", + "SB": "Salomon uharteak", + "WS": "Samoa", + "SM": "San Marino", + "LC": "Santa Luzia", + "ST": "Sao Tomé eta Principe", + "SA": "Saudi Arabia", + "SN": "Senegal", + "RS": "Serbia", + "CS": "Serbia eta Montenegro", + "SC": "Seychelleak", + "SL": "Sierra Leona", + "SG": "Singapur", + "SY": "Siria", + "SO": "Somalia", + "LK": "Sri Lanka", + "SD": "Sudan", + "SE": "Suedia", + "CH": "Suitza", + "SR": "Surinam", + "SJ": "Svalbard eta Jan Mayen uharteak", + "SZ": "Swazilandia", + "TJ": "Tadjikistan", + "TH": "Tailandia", + "TW": "Taiwan", + "TZ": "Tanzania", + "TG": "Togo", + "TK": "Tokelau", + "TO": "Tonga", + "TT": "Trinidad eta Tobago", + "TN": "Tunisia", + "TC": "Turk eta Caico uharteak", + "TR": "Turkia", + "TM": "Turkmenistan", + "TV": "Tuvalu", + "TD": "Txad", + "CZ": "Txekiar errepublika", + "CL": "Txile", + "CN": "Txina", + "UG": "Uganda", + "UA": "Ukraina", + "UY": "Uruguai", + "UZ": "Uzbekistan", + "VU": "Vanuatu", + "VA": "Vatikano", + "VE": "Venezuela", + "VN": "Vietnam", + "WF": "Wallis eta Futuna", + "YE": "Yemen", + "ZM": "Zambia", + "NZ": "Zeelanda Berria", + "ZW": "Zimbabwe", + "CY": "Zipre" +} \ No newline at end of file diff --git a/src/assets/countries/fa.json b/src/assets/countries/fa.json new file mode 100644 index 000000000..24dbffc95 --- /dev/null +++ b/src/assets/countries/fa.json @@ -0,0 +1,250 @@ +{ + "AW": "آروبا", + "AR": "آرژانتین", + "AL": "آلبانی", + "DE": "آلمان", + "AN": "آنتیل هلند", + "AG": "آنتیگوا و باربودا", + "AD": "آندورا", + "AO": "آنگولا", + "AI": "آنگیل", + "AT": "اتریش", + "ET": "اتیوپی", + "JO": "اردن", + "AM": "ارمنستان", + "ER": "اریتره", + "UZ": "ازبکستان", + "AU": "استرالیا", + "EE": "استونی", + "IL": "اسرائیل", + "SK": "اسلواکی", + "SI": "اسلوونی", + "SJ": "اسوالبارد و جان ماین", + "ES": "اسپانیا", + "ZA": "افریقای جنوبی", + "AF": "افغانستان", + "DZ": "الجزایر", + "SV": "السالوادور", + "AE": "امارات متحدهٔ عربی", + "ID": "اندونزی", + "UY": "اوروگوئه", + "UA": "اوکراین", + "UG": "اوگاندا", + "EC": "اکوادر", + "US": "ایالات متحدهٔ امریکا", + "IT": "ایتالیا", + "IR": "ایران", + "IE": "ایرلند", + "IS": "ایسلند", + "BB": "باربادوس", + "BS": "باهاما", + "BH": "بحرین", + "BR": "برزیل", + "BM": "برمودا", + "BN": "برونئی", + "GB": "بریتانیا", + "BG": "بلغارستان", + "BE": "بلژیک", + "BZ": "بلیز", + "BD": "بنگلادش", + "BJ": "بنین", + "BT": "بوتان", + "BW": "بوتسوانا", + "BI": "بوروندی", + "BF": "بورکینافاسو", + "BA": "بوسنی و هرزگوین", + "BO": "بولیوی", + "BY": "بیلوروسی", + "TJ": "تاجیکستان", + "TZ": "تانزانیا", + "TH": "تایلند", + "TW": "تایوان", + "TM": "ترکمنستان", + "TR": "ترکیه", + "TT": "ترینیداد و توباگو", + "TN": "تونس", + "TO": "تونگا", + "TV": "تووالو", + "TK": "توکلائو", + "TG": "توگو", + "TL": "تیمور شرقی", + "JM": "جامائیکا", + "GI": "جبل‌الطارق", + "JE": "جرسی", + "AX": "جزایر آلاند", + "TC": "جزایر ترک و کایکوس", + "SB": "جزایر سلیمان", + "FO": "جزایر فارو", + "FK": "جزایر فالکلند", + "MH": "جزایر مارشال", + "MP": "جزایر ماریانای شمالی", + "VI": "جزایر ویرجین ایالات متحده", + "VG": "جزایر ویرجین بریتانیا", + "UM": "جزایر کوچک دورافتادهٔ ایالات متحده", + "CK": "جزایر کوک", + "CC": "جزایر کوکوس", + "KY": "جزایر کِیمن", + "BV": "جزیرهٔ بووت", + "IM": "جزیرهٔ مان", + "NF": "جزیرهٔ نورفولک", + "HM": "جزیرهٔ هرد و جزایر مک‌دونالد", + "CX": "جزیرهٔ کریسمس", + "AZ": "جمهوری آذربایجان", + "CF": "جمهوری افریقای مرکزی", + "DO": "جمهوری دومینیکن", + "CZ": "جمهوری چک", + "AQ": "جنوبگان", + "GS": "جورجیای جنوبی و جزایر ساندویچ جنوبی", + "DJ": "جیبوتی", + "DK": "دانمارک", + "DM": "دومینیک", + "RW": "رواندا", + "RU": "روسیه", + "RO": "رومانی", + "RE": "ریونیون", + "ZM": "زامبیا", + "NZ": "زلاند نو", + "ZW": "زیمبابوه", + "ST": "سائو تومه و پرینسیپه", + "CI": "ساحل عاج", + "WS": "ساموا", + "AS": "ساموای امریکا", + "SM": "سان مارینو", + "LK": "سری‌لانکا", + "BL": "سنت بارتلیمی", + "LC": "سنت لوسیا", + "MF": "سنت مارتین", + "SH": "سنت هلن", + "VC": "سنت وینسنت و گرنادین", + "PM": "سنت پیر و میکلون", + "KN": "سنت کیتس و نویس", + "SN": "سنگال", + "SG": "سنگاپور", + "SE": "سوئد", + "CH": "سوئیس", + "SZ": "سوازیلند", + "SD": "سودان", + "SR": "سورینام", + "SY": "سوریه", + "SO": "سومالی", + "SL": "سیرالئون", + "SC": "سیشل", + "CL": "شیلی", + "EH": "صحرای غربی", + "RS": "صربستان", + "CS": "صربستان و مونته‌نگرو", + "IQ": "عراق", + "SA": "عربستان سعودی", + "OM": "عمان", + "GH": "غنا", + "FR": "فرانسه", + "PS": "فلسطین", + "FI": "فنلاند", + "FJ": "فیجی", + "PH": "فیلیپین", + "CY": "قبرس", + "KG": "قرقیزستان", + "KZ": "قزاقستان", + "QA": "قطر", + "LA": "لائوس", + "LB": "لبنان", + "LV": "لتونی", + "LS": "لسوتو", + "PL": "لهستان", + "LU": "لوکزامبورگ", + "LR": "لیبریا", + "LY": "لیبی", + "LT": "لیتوانی", + "LI": "لیختن‌اشتاین", + "MG": "ماداگاسکار", + "MQ": "مارتینیک", + "MW": "مالاوی", + "MT": "مالت", + "MV": "مالدیو", + "MY": "مالزی", + "ML": "مالی", + "MO": "ماکائو، ناحیهٔ ویژهٔ حکومتی چین", + "YT": "مایوت", + "HU": "مجارستان", + "MA": "مراکش", + "IO": "مستعمره‌های بریتانیا در اقیانوس هند", + "TF": "مستعمره‌های جنوبی فرانسه", + "EG": "مصر", + "MN": "مغولستان", + "MK": "مقدونیه", + "MR": "موریتانی", + "MU": "موریس", + "MZ": "موزامبیک", + "MD": "مولداوی", + "MC": "موناکو", + "ME": "مونته‌نگرو", + "MS": "مونت‌سرات", + "MX": "مکزیک", + "MM": "میانمار", + "FM": "میکرونزی", + "NR": "نائورو", + "ZZ": "ناحیهٔ نامشخص یا نامعتبر", + "NA": "نامیبیا", + "NO": "نروژ", + "NP": "نپال", + "NE": "نیجر", + "NG": "نیجریه", + "NU": "نیوئه", + "NI": "نیکاراگوئه", + "HT": "هاییتی", + "NL": "هلند", + "IN": "هند", + "HN": "هندوراس", + "HK": "هنگ‌کنگ، ناحیهٔ ویژهٔ حکومتی چین", + "VA": "واتیکان", + "WF": "والیس و فیوتونا", + "VU": "وانواتو", + "VE": "ونزوئلا", + "VN": "ویتنام", + "PY": "پاراگوئه", + "PW": "پالائو", + "PA": "پاناما", + "PG": "پاپوا گینهٔ نو", + "PK": "پاکستان", + "PT": "پرتغال", + "PE": "پرو", + "PF": "پلی‌نزی فرانسه", + "PR": "پورتو ریکو", + "PN": "پیتکایرن", + "TD": "چاد", + "CN": "چین", + "JP": "ژاپن", + "CR": "کاستاریکا", + "NC": "کالدونیای جدید", + "KH": "کامبوج", + "CM": "کامرون", + "CA": "کانادا", + "KR": "کرهٔ جنوبی", + "KP": "کرهٔ شمالی", + "HR": "کرواسی", + "CO": "کلمبیا", + "CG": "کنگو برازویل", + "CD": "کنگو کینشاسا", + "KE": "کنیا", + "CU": "کوبا", + "KM": "کومورو", + "KW": "کویت", + "KI": "کیریباتی", + "CV": "کیپ ورد", + "GA": "گابون", + "GM": "گامبیا", + "GD": "گرانادا", + "GE": "گرجستان", + "GG": "گرنزی", + "GL": "گروئنلند", + "GT": "گواتمالا", + "GP": "گوادلوپ", + "GU": "گوام", + "GY": "گویان", + "GF": "گویان فرانسه", + "GN": "گینه", + "GQ": "گینهٔ استوایی", + "GW": "گینهٔ بیسائو", + "YE": "یمن", + "GR": "یونان" +} \ No newline at end of file diff --git a/src/assets/countries/fr.json b/src/assets/countries/fr.json new file mode 100644 index 000000000..43be1505c --- /dev/null +++ b/src/assets/countries/fr.json @@ -0,0 +1,250 @@ +{ + "AF": "Afghanistan", + "ZA": "Afrique du Sud", + "AL": "Albanie", + "DZ": "Algérie", + "DE": "Allemagne", + "AD": "Andorre", + "AO": "Angola", + "AI": "Anguilla", + "AQ": "Antarctique", + "AG": "Antigua-et-Barbuda", + "AN": "Antilles néerlandaises", + "SA": "Arabie saoudite", + "AR": "Argentine", + "AM": "Arménie", + "AW": "Aruba", + "AU": "Australie", + "AT": "Autriche", + "AZ": "Azerbaïdjan", + "BS": "Bahamas", + "BH": "Bahreïn", + "BD": "Bangladesh", + "BB": "Barbade", + "BE": "Belgique", + "BZ": "Belize", + "BM": "Bermudes", + "BT": "Bhoutan", + "BO": "Bolivie", + "BA": "Bosnie-Herzégovine", + "BW": "Botswana", + "BN": "Brunéi Darussalam", + "BR": "Brésil", + "BG": "Bulgarie", + "BF": "Burkina Faso", + "BI": "Burundi", + "BY": "Bélarus", + "BJ": "Bénin", + "KH": "Cambodge", + "CM": "Cameroun", + "CA": "Canada", + "CV": "Cap-Vert", + "CL": "Chili", + "CN": "Chine", + "CY": "Chypre", + "CO": "Colombie", + "KM": "Comores", + "CG": "Congo", + "KP": "Corée du Nord", + "KR": "Corée du Sud", + "CR": "Costa Rica", + "HR": "Croatie", + "CU": "Cuba", + "CI": "Côte d’Ivoire", + "DK": "Danemark", + "DJ": "Djibouti", + "DM": "Dominique", + "SV": "El Salvador", + "ES": "Espagne", + "EE": "Estonie", + "FJ": "Fidji", + "FI": "Finlande", + "FR": "France", + "GA": "Gabon", + "GM": "Gambie", + "GH": "Ghana", + "GI": "Gibraltar", + "GD": "Grenade", + "GL": "Groenland", + "GR": "Grèce", + "GP": "Guadeloupe", + "GU": "Guam", + "GT": "Guatemala", + "GG": "Guernesey", + "GN": "Guinée", + "GQ": "Guinée équatoriale", + "GW": "Guinée-Bissau", + "GY": "Guyana", + "GF": "Guyane française", + "GE": "Géorgie", + "GS": "Géorgie du Sud et les îles Sandwich du Sud", + "HT": "Haïti", + "HN": "Honduras", + "HU": "Hongrie", + "IN": "Inde", + "ID": "Indonésie", + "IQ": "Irak", + "IR": "Iran", + "IE": "Irlande", + "IS": "Islande", + "IL": "Israël", + "IT": "Italie", + "JM": "Jamaïque", + "JP": "Japon", + "JE": "Jersey", + "JO": "Jordanie", + "KZ": "Kazakhstan", + "KE": "Kenya", + "KG": "Kirghizistan", + "KI": "Kiribati", + "KW": "Koweït", + "LA": "Laos", + "LS": "Lesotho", + "LV": "Lettonie", + "LB": "Liban", + "LY": "Libye", + "LR": "Libéria", + "LI": "Liechtenstein", + "LT": "Lituanie", + "LU": "Luxembourg", + "MK": "Macédoine", + "MG": "Madagascar", + "MY": "Malaisie", + "MW": "Malawi", + "MV": "Maldives", + "ML": "Mali", + "MT": "Malte", + "MA": "Maroc", + "MQ": "Martinique", + "MU": "Maurice", + "MR": "Mauritanie", + "YT": "Mayotte", + "MX": "Mexique", + "MD": "Moldavie", + "MC": "Monaco", + "MN": "Mongolie", + "MS": "Montserrat", + "ME": "Monténégro", + "MZ": "Mozambique", + "MM": "Myanmar", + "NA": "Namibie", + "NR": "Nauru", + "NI": "Nicaragua", + "NE": "Niger", + "NG": "Nigéria", + "NU": "Niue", + "NO": "Norvège", + "NC": "Nouvelle-Calédonie", + "NZ": "Nouvelle-Zélande", + "NP": "Népal", + "OM": "Oman", + "UG": "Ouganda", + "UZ": "Ouzbékistan", + "PK": "Pakistan", + "PW": "Palaos", + "PA": "Panama", + "PG": "Papouasie-Nouvelle-Guinée", + "PY": "Paraguay", + "NL": "Pays-Bas", + "PH": "Philippines", + "PN": "Pitcairn", + "PL": "Pologne", + "PF": "Polynésie française", + "PR": "Porto Rico", + "PT": "Portugal", + "PE": "Pérou", + "QA": "Qatar", + "HK": "R.A.S. chinoise de Hong Kong", + "MO": "R.A.S. chinoise de Macao", + "RO": "Roumanie", + "GB": "Royaume-Uni", + "RU": "Russie", + "RW": "Rwanda", + "CF": "République centrafricaine", + "DO": "République dominicaine", + "CD": "République démocratique du Congo", + "CZ": "République tchèque", + "RE": "Réunion", + "EH": "Sahara occidental", + "BL": "Saint-Barthélémy", + "KN": "Saint-Kitts-et-Nevis", + "SM": "Saint-Marin", + "MF": "Saint-Martin", + "PM": "Saint-Pierre-et-Miquelon", + "VC": "Saint-Vincent-et-les Grenadines", + "SH": "Sainte-Hélène", + "LC": "Sainte-Lucie", + "WS": "Samoa", + "AS": "Samoa américaines", + "ST": "Sao Tomé-et-Principe", + "RS": "Serbie", + "CS": "Serbie-et-Monténégro", + "SC": "Seychelles", + "SL": "Sierra Leone", + "SG": "Singapour", + "SK": "Slovaquie", + "SI": "Slovénie", + "SO": "Somalie", + "SD": "Soudan", + "LK": "Sri Lanka", + "CH": "Suisse", + "SR": "Suriname", + "SE": "Suède", + "SJ": "Svalbard et Île Jan Mayen", + "SZ": "Swaziland", + "SY": "Syrie", + "SN": "Sénégal", + "TJ": "Tadjikistan", + "TZ": "Tanzanie", + "TW": "Taïwan", + "TD": "Tchad", + "TF": "Terres australes françaises", + "IO": "Territoire britannique de l'océan Indien", + "PS": "Territoire palestinien", + "TH": "Thaïlande", + "TL": "Timor oriental", + "TG": "Togo", + "TK": "Tokelau", + "TO": "Tonga", + "TT": "Trinité-et-Tobago", + "TN": "Tunisie", + "TM": "Turkménistan", + "TR": "Turquie", + "TV": "Tuvalu", + "UA": "Ukraine", + "UY": "Uruguay", + "VU": "Vanuatu", + "VE": "Venezuela", + "VN": "Viêt Nam", + "WF": "Wallis-et-Futuna", + "YE": "Yémen", + "ZM": "Zambie", + "ZW": "Zimbabwe", + "ZZ": "région indéterminée", + "EG": "Égypte", + "AE": "Émirats arabes unis", + "EC": "Équateur", + "ER": "Érythrée", + "VA": "État de la Cité du Vatican", + "FM": "États fédérés de Micronésie", + "US": "États-Unis", + "ET": "Éthiopie", + "BV": "Île Bouvet", + "CX": "Île Christmas", + "NF": "Île Norfolk", + "IM": "Île de Man", + "KY": "Îles Caïmans", + "CC": "Îles Cocos - Keeling", + "CK": "Îles Cook", + "FO": "Îles Féroé", + "HM": "Îles Heard et MacDonald", + "FK": "Îles Malouines", + "MP": "Îles Mariannes du Nord", + "MH": "Îles Marshall", + "UM": "Îles Mineures Éloignées des États-Unis", + "SB": "Îles Salomon", + "TC": "Îles Turks et Caïques", + "VG": "Îles Vierges britanniques", + "VI": "Îles Vierges des États-Unis", + "AX": "Îles Åland" +} \ No newline at end of file diff --git a/src/assets/countries/he.json b/src/assets/countries/he.json new file mode 100644 index 000000000..55a526ad5 --- /dev/null +++ b/src/assets/countries/he.json @@ -0,0 +1,250 @@ +{ + "UG": "אוגנדה", + "UZ": "אוזבקיסטן", + "AT": "אוסטריה", + "AU": "אוסטרליה", + "UA": "אוקראינה", + "UY": "אורוגוואי", + "ZZ": "אזור לא ידוע או לא תקין", + "AZ": "אזרביג'ן", + "AE": "איחוד האמירויות הערביות", + "IT": "איטליה", + "AX": "איי אלנד", + "BS": "איי בהאמה", + "BV": "איי בובה", + "VI": "איי הבתולה האמריקניים", + "VG": "איי הבתולה הבריטיים", + "HM": "איי הרד ואיי מקדונלנד", + "WF": "איי ווליס ופוטונה", + "TC": "איי טורקס וקאיקוס", + "CX": "איי כריסטמס", + "MP": "איי מריאנה הצפוניים", + "MH": "איי מרשל", + "NF": "איי נורפוק", + "SC": "איי סיישל", + "FO": "איי פארו", + "FK": "איי פוקלנד", + "CK": "איי קוק", + "CC": "איי קוקוס", + "KY": "איי קיימן", + "SB": "איי שלמה", + "UM": "איים קטנים שלחוף ארצות הברית", + "ID": "אינדונזיה", + "IS": "איסלנד", + "IR": "איראן", + "IE": "אירלנד", + "SV": "אל סלבדור", + "AL": "אלבניה", + "DZ": "אלג׳יריה", + "AO": "אנגולה", + "AI": "אנגילה", + "AD": "אנדורה", + "AQ": "אנטארקטיקה", + "AG": "אנטיגואה וברבודה", + "AN": "אנטילים הולנדיים", + "EE": "אסטוניה", + "AF": "אפגניסטן", + "EC": "אקוודור", + "AR": "ארגנטינה", + "AW": "ארובה", + "ER": "אריתראה", + "AM": "ארמניה", + "US": "ארצות הברית", + "ET": "אתיופיה", + "BT": "בהוטן", + "BW": "בוטסוואנה", + "BG": "בולגריה", + "BO": "בוליביה", + "BA": "בוסניה והרצגובינה", + "BI": "בורונדי", + "BF": "בורקינה פאסו", + "BH": "בחריין", + "BY": "בלארוס", + "BE": "בלגיה", + "BZ": "בליז", + "BD": "בנגלדש", + "BJ": "בנין", + "BB": "ברבדוס", + "BN": "ברוניי", + "BR": "ברזיל", + "GB": "בריטניה", + "BM": "ברמודה", + "JE": "ג'רסי", + "GA": "גאבון", + "GE": "גאורגיה", + "GH": "גאנה", + "GT": "גואטמלה", + "GU": "גואם", + "GP": "גוואדלופ", + "GY": "גיאנה", + "GF": "גיאנה הצרפתית", + "GI": "גיברלטר", + "GN": "גיניאה", + "GQ": "גיניאה המשוונית", + "GW": "גיניאה-ביסאו", + "GM": "גמביה", + "GL": "גרינלנד", + "DE": "גרמניה", + "GD": "גרנדה", + "GG": "גרנסי", + "GS": "ג׳ורג׳יה הדרומית ואיי סנדוויץ׳ הדרומיים", + "DJ": "ג׳יבוטי", + "JM": "ג׳מייקה", + "DM": "דומיניקה", + "DK": "דנמרק", + "ZA": "דרום אפריקה", + "KR": "דרום קוריאה", + "IM": "האי מאן", + "HT": "האיטי", + "IN": "הודו", + "VA": "הוותיקן", + "NL": "הולנד", + "HK": "הונג קונג (מחוז מנהלי מיוחד של סין)", + "HU": "הונגריה", + "HN": "הונדורס", + "DO": "הרפובליקה הדומיניקנית", + "CF": "הרפובליקה של מרכז אפריקה", + "PS": "הרשות הפלסטינית", + "VN": "וייטנאם", + "VU": "ונואטו", + "VE": "ונצואלה", + "ZW": "זימבאבווה", + "ZM": "זמביה", + "CI": "חוף השנהב", + "TJ": "טג׳יקיסטן", + "TV": "טובלו", + "TG": "טוגו", + "TO": "טונגה", + "TK": "טוקלאו", + "TR": "טורקיה", + "TM": "טורקמניסטן", + "TW": "טייוואן", + "TZ": "טנזניה", + "IO": "טריטוריה בריטית באוקיאנוס ההודי", + "TF": "טריטוריות דרומיות של צרפת", + "TT": "טרינידד וטובגו", + "GR": "יוון", + "JP": "יפן", + "JO": "ירדן", + "IL": "ישראל", + "KW": "כווית", + "CV": "כף ורדה", + "LA": "לאוס", + "LB": "לבנון", + "LY": "לוב", + "LU": "לוקסמבורג", + "LV": "לטביה", + "LR": "ליבריה", + "LT": "ליטא", + "LI": "ליכטנשטיין", + "LS": "לסוטו", + "MR": "מאוריטניה", + "MU": "מאוריציוס", + "YT": "מאיוט", + "ML": "מאלי", + "MG": "מדגסקר", + "MZ": "מוזמביק", + "MD": "מולדובה", + "MN": "מונגוליה", + "ME": "מונטנגרו", + "MS": "מונסראט", + "MC": "מונקו", + "TL": "מזרח טימור", + "MM": "מייאנמאר", + "FM": "מיקרונזיה", + "MW": "מלאווי", + "MV": "מלדיבים", + "MY": "מלזיה", + "MT": "מלטה", + "EG": "מצרים", + "MO": "מקאו (מחוז מנהלי מיוחד של סין)", + "MK": "מקדוניה", + "MX": "מקסיקו", + "MA": "מרוקו", + "MQ": "מרטיניק", + "NR": "נאורו", + "NO": "נורווגיה", + "NG": "ניגריה", + "NZ": "ניו זילנד", + "NU": "ניווה", + "NE": "ניז׳ר", + "NI": "ניקרגואה", + "NA": "נמיביה", + "NP": "נפאל", + "ST": "סאו טומה ופרינסיפה", + "EH": "סהרה המערבית", + "SD": "סודן", + "SZ": "סווזילנד", + "SJ": "סוולבארד וז׳אן מאיין", + "SO": "סומליה", + "SY": "סוריה", + "SR": "סורינם", + "SL": "סיירה לאונה", + "CN": "סין", + "SG": "סינגפור", + "SI": "סלובניה", + "SK": "סלובקיה", + "WS": "סמואה", + "AS": "סמואה האמריקנית", + "SM": "סן מרינו", + "SN": "סנגל", + "BL": "סנט ברתולומיאו", + "SH": "סנט הלנה", + "VC": "סנט וינסנט והגרנדינים", + "LC": "סנט לוסיה", + "MF": "סנט מרטין", + "PM": "סנט פייר ומיקלון", + "KN": "סנט קיטס ונוויס", + "ES": "ספרד", + "RS": "סרביה", + "CS": "סרביה ומונטנגרו", + "LK": "סרי לנקה", + "OM": "עומאן", + "IQ": "עיראק", + "SA": "ערב הסעודית", + "PW": "פאלאו", + "PL": "פולין", + "PF": "פולינזיה הצרפתית", + "PR": "פורטו ריקו", + "PT": "פורטוגל", + "FJ": "פיג׳י", + "PN": "פיטקרן", + "PH": "פיליפינים", + "FI": "פינלנד", + "PA": "פנמה", + "PG": "פפואה גיניאה החדשה", + "PK": "פקיסטן", + "PY": "פרגוואי", + "PE": "פרו", + "KP": "צפון קוריאה", + "FR": "צרפת", + "TD": "צ׳אד", + "CL": "צ׳ילה", + "CZ": "צ׳כיה", + "CU": "קובה", + "CO": "קולומביה", + "KM": "קומורוס", + "CG": "קונגו - ברזאויל", + "CD": "קונגו - קינשאסה", + "CR": "קוסטה ריקה", + "KZ": "קזחסטן", + "QA": "קטאר", + "KG": "קירגיזסטן", + "KI": "קיריבאטי", + "NC": "קלדוניה החדשה", + "KH": "קמבודיה", + "CM": "קמרון", + "CA": "קנדה", + "KE": "קניה", + "CY": "קפריסין", + "HR": "קרואטיה", + "RE": "ראוניון", + "RW": "רואנדה", + "RO": "רומניה", + "RU": "רוסיה", + "SE": "שוודיה", + "CH": "שווייץ", + "TH": "תאילנד", + "TN": "תוניסיה", + "YE": "תימן" +} \ No newline at end of file diff --git a/src/assets/countries/hu.json b/src/assets/countries/hu.json new file mode 100644 index 000000000..52657583f --- /dev/null +++ b/src/assets/countries/hu.json @@ -0,0 +1,250 @@ +{ + "AF": "Afganisztán", + "AX": "Aland-szigetek", + "AL": "Albánia", + "DZ": "Algéria", + "UM": "Amerikai Csendes-óceáni Szigetek", + "AS": "Amerikai Szamoa", + "VI": "Amerikai Virgin-szigetek", + "AD": "Andorra", + "AO": "Angola", + "AI": "Anguilla", + "AQ": "Antarktisz", + "AG": "Antigua és Barbuda", + "AR": "Argentína", + "AW": "Aruba", + "AT": "Ausztria", + "AU": "Ausztrália", + "AZ": "Azerbajdzsán", + "BS": "Bahamák", + "BH": "Bahrein", + "BD": "Banglades", + "BB": "Barbados", + "BE": "Belgium", + "BZ": "Belize", + "BJ": "Benin", + "BM": "Bermuda", + "BT": "Bhután", + "BO": "Bolívia", + "BA": "Bosznia-Hercegovina", + "BW": "Botswana", + "BV": "Bouvet-sziget", + "BR": "Brazília", + "IO": "Brit Indiai Oceán", + "VG": "Brit Virgin-szigetek", + "BN": "Brunei", + "BG": "Bulgária", + "BF": "Burkina Faso", + "BI": "Burundi", + "CL": "Chile", + "CY": "Ciprus", + "KM": "Comore-szigetek", + "CK": "Cook-szigetek", + "CR": "Costa Rica", + "CZ": "Csehország", + "TD": "Csád", + "DM": "Dominika", + "DO": "Dominikai Köztársaság", + "DJ": "Dzsibuti", + "DK": "Dánia", + "GS": "Dél Grúzia és a Déli Szendvics-szigetek", + "ZA": "Dél-Afrika", + "KR": "Dél-Korea", + "EC": "Ecuador", + "GQ": "Egyenlítői-Guinea", + "AE": "Egyesült Arab Emirátus", + "GB": "Egyesült Királyság", + "US": "Egyesült Államok", + "EG": "Egyiptom", + "CI": "Elefántcsontpart", + "ER": "Eritrea", + "ET": "Etiópia", + "FK": "Falkland-szigetek", + "BY": "Fehéroroszország", + "FO": "Feröer-szigetek", + "FJ": "Fidzsi", + "FI": "Finnország", + "TF": "Francia Déli Területek", + "GF": "Francia Guyana", + "PF": "Francia Polinézia", + "FR": "Franciaország", + "PH": "Fülöp-szigetek", + "GA": "Gabon", + "GM": "Gambia", + "GH": "Ghána", + "GI": "Gibraltár", + "GD": "Grenada", + "GL": "Grönland", + "GE": "Grúzia", + "GP": "Guadeloupe", + "GU": "Guam", + "GT": "Guatemala", + "GG": "Guernsey", + "GN": "Guinea", + "GW": "Guinea-Bissau", + "GY": "Guyana", + "GR": "Görögország", + "HT": "Haiti", + "HM": "Heard és McDonald Szigetek", + "AN": "Holland Antillák", + "NL": "Hollandia", + "HN": "Honduras", + "HK": "Hongkong S.A.R, Kína", + "HR": "Horvátország", + "IN": "India", + "ID": "Indonézia", + "IQ": "Irak", + "IR": "Irán", + "ZZ": "Ismeretlen vagy érvénytelen körzet", + "IS": "Izland", + "IL": "Izrael", + "JM": "Jamaica", + "JP": "Japán", + "YE": "Jemen", + "JE": "Jersey", + "JO": "Jordánia", + "KY": "Kajmán-szigetek", + "KH": "Kambodzsa", + "CM": "Kamerun", + "CA": "Kanada", + "CX": "Karácsony-szigetek", + "QA": "Katar", + "KZ": "Kazahsztán", + "TL": "Kelet-Timor", + "KE": "Kenya", + "KG": "Kirgizisztán", + "KI": "Kiribati", + "CO": "Kolumbia", + "CG": "Kongó", + "CD": "Kongó - Kinshasa", + "CU": "Kuba", + "KW": "Kuvait", + "CN": "Kína", + "CC": "Kókusz-szigetek", + "CF": "Közép-afrikai Köztársaság", + "LA": "Laosz", + "PL": "Lengyelország", + "LS": "Lesotho", + "LV": "Lettország", + "LB": "Libanon", + "LR": "Libéria", + "LI": "Liechtenstein", + "LT": "Litvánia", + "LU": "Luxemburg", + "LY": "Líbia", + "MK": "Macedónia", + "MG": "Madagaszkár", + "HU": "Magyarország", + "MO": "Makaó SAR Kína", + "MY": "Malajzia", + "MW": "Malawi", + "MV": "Maldív-szigetek", + "ML": "Mali", + "IM": "Man-sziget", + "MA": "Marokkó", + "MH": "Marshall-szigetek", + "MQ": "Martinique", + "MU": "Mauritius", + "MR": "Mauritánia", + "YT": "Mayotte", + "MX": "Mexikó", + "MM": "Mianmar", + "FM": "Mikronézia", + "MD": "Moldova", + "MC": "Monaco", + "MN": "Mongólia", + "ME": "Montenegró", + "MS": "Montserrat", + "MZ": "Mozambik", + "MT": "Málta", + "NA": "Namíbia", + "NR": "Nauru", + "NP": "Nepál", + "NI": "Nicaragua", + "NE": "Niger", + "NG": "Nigéria", + "NU": "Niue", + "NF": "Norfolk-sziget", + "NO": "Norvégia", + "EH": "Nyugat-Szahara", + "DE": "Németország", + "IT": "Olaszország", + "OM": "Omán", + "RU": "Oroszország", + "PK": "Pakisztán", + "PW": "Palau", + "PS": "Palesztin Terület", + "PA": "Panama", + "PY": "Paraguay", + "PE": "Peru", + "PN": "Pitcairn-sziget", + "PT": "Portugália", + "PR": "Puerto Rico", + "PG": "Pápua Új-Guinea", + "RE": "Reunion", + "RO": "Románia", + "RW": "Ruanda", + "BL": "Saint Barthélemy", + "KN": "Saint Kitts és Nevis", + "MF": "Saint Martin", + "PM": "Saint Pierre és Miquelon", + "VC": "Saint Vincent és Grenadines", + "SB": "Salamon-szigetek", + "SV": "Salvador", + "SM": "San Marino", + "LC": "Santa Lucia", + "ST": "Sao Tomé és Príncipe", + "SC": "Seychelle-szigetek", + "SL": "Sierra Leone", + "ES": "Spanyolország", + "LK": "Srí Lanka", + "SR": "Suriname", + "SJ": "Svalbard és Jan Mayen", + "CH": "Svájc", + "SE": "Svédország", + "WS": "Szamoa", + "SA": "Szaúd-Arábia", + "SN": "Szenegál", + "SH": "Szent Helena", + "RS": "Szerbia", + "CS": "Szerbia és Montenegró", + "SG": "Szingapúr", + "SK": "Szlovákia", + "SI": "Szlovénia", + "SO": "Szomália", + "SD": "Szudán", + "SZ": "Szváziföld", + "SY": "Szíria", + "TJ": "Tadzsikisztán", + "TW": "Tajvan", + "TZ": "Tanzánia", + "TH": "Thaiföld", + "TG": "Togo", + "TK": "Tokelau", + "TO": "Tonga", + "TT": "Trinidad és Tobago", + "TN": "Tunézia", + "TC": "Turks- és Caicos-szigetek", + "TV": "Tuvalu", + "TR": "Törökország", + "TM": "Türkmenisztán", + "UG": "Uganda", + "UA": "Ukrajna", + "UY": "Uruguay", + "VU": "Vanuatu", + "VA": "Vatikán", + "VE": "Venezuela", + "VN": "Vietnam", + "WF": "Wallis és Futuna", + "ZM": "Zambia", + "ZW": "Zimbabwe", + "CV": "Zöld-foki Köztársaság", + "KP": "Észak-Korea", + "MP": "Északi Mariana-szigetek", + "EE": "Észtország", + "IE": "Írország", + "AM": "Örményország", + "NC": "Új-Kaledónia", + "NZ": "Új-Zéland", + "UZ": "Üzbegisztán" +} \ No newline at end of file diff --git a/src/assets/countries/it.json b/src/assets/countries/it.json new file mode 100644 index 000000000..1df372795 --- /dev/null +++ b/src/assets/countries/it.json @@ -0,0 +1,249 @@ +{ + "AF": "Afghanistan", + "AL": "Albania", + "DZ": "Algeria", + "AD": "Andorra", + "AO": "Angola", + "AI": "Anguilla", + "AQ": "Antartide", + "AG": "Antigua e Barbuda", + "AN": "Antille Olandesi", + "SA": "Arabia Saudita", + "AR": "Argentina", + "AM": "Armenia", + "AW": "Aruba", + "AU": "Australia", + "AT": "Austria", + "AZ": "Azerbaigian", + "BS": "Bahamas", + "BH": "Bahrein", + "BD": "Bangladesh", + "BB": "Barbados", + "BE": "Belgio", + "BZ": "Belize", + "BJ": "Benin", + "BM": "Bermuda", + "BT": "Bhutan", + "BY": "Bielorussia", + "BO": "Bolivia", + "BA": "Bosnia Erzegovina", + "BW": "Botswana", + "BR": "Brasile", + "BN": "Brunei", + "BG": "Bulgaria", + "BF": "Burkina Faso", + "BI": "Burundi", + "KH": "Cambogia", + "CM": "Camerun", + "CA": "Canada", + "CV": "Capo Verde", + "TD": "Ciad", + "CL": "Cile", + "CN": "Cina", + "CY": "Cipro", + "CO": "Colombia", + "KM": "Comore", + "CG": "Congo", + "KP": "Corea del Nord", + "KR": "Corea del Sud", + "CR": "Costa Rica", + "CI": "Costa d’Avorio", + "HR": "Croazia", + "CU": "Cuba", + "DK": "Danimarca", + "DM": "Dominica", + "EC": "Ecuador", + "EG": "Egitto", + "SV": "El Salvador", + "AE": "Emirati Arabi Uniti", + "ER": "Eritrea", + "EE": "Estonia", + "ET": "Etiopia", + "RU": "Federazione Russa", + "FJ": "Figi", + "PH": "Filippine", + "FI": "Finlandia", + "FR": "Francia", + "GA": "Gabon", + "GM": "Gambia", + "GE": "Georgia", + "GS": "Georgia del Sud e Isole Sandwich del Sud", + "DE": "Germania", + "GH": "Ghana", + "JM": "Giamaica", + "JP": "Giappone", + "GI": "Gibilterra", + "DJ": "Gibuti", + "JO": "Giordania", + "GR": "Grecia", + "GD": "Grenada", + "GL": "Groenlandia", + "GP": "Guadalupa", + "GU": "Guam", + "GT": "Guatemala", + "GG": "Guernsey", + "GF": "Guiana Francese", + "GN": "Guinea", + "GQ": "Guinea Equatoriale", + "GW": "Guinea-Bissau", + "GY": "Guyana", + "HT": "Haiti", + "HN": "Honduras", + "IN": "India", + "ID": "Indonesia", + "IR": "Iran", + "IQ": "Iraq", + "IE": "Irlanda", + "IS": "Islanda", + "BV": "Isola Bouvet", + "NF": "Isola Norfolk", + "CX": "Isola di Christmas", + "IM": "Isola di Man", + "AX": "Isole Aland", + "KY": "Isole Cayman", + "CC": "Isole Cocos", + "CK": "Isole Cook", + "FK": "Isole Falkland", + "FO": "Isole Faroe", + "HM": "Isole Heard ed Isole McDonald", + "MP": "Isole Marianne Settentrionali", + "MH": "Isole Marshall", + "UM": "Isole Minori lontane dagli Stati Uniti", + "SB": "Isole Solomon", + "TC": "Isole Turks e Caicos", + "VI": "Isole Vergini Americane", + "VG": "Isole Vergini Britanniche", + "IL": "Israele", + "IT": "Italia", + "JE": "Jersey", + "KZ": "Kazakistan", + "KE": "Kenya", + "KG": "Kirghizistan", + "KI": "Kiribati", + "KW": "Kuwait", + "LA": "Laos", + "LS": "Lesotho", + "LV": "Lettonia", + "LB": "Libano", + "LR": "Liberia", + "LY": "Libia", + "LI": "Liechtenstein", + "LT": "Lituania", + "LU": "Lussemburgo", + "MG": "Madagascar", + "MW": "Malawi", + "MV": "Maldive", + "MY": "Malesia", + "ML": "Mali", + "MT": "Malta", + "MA": "Marocco", + "MQ": "Martinica", + "MR": "Mauritania", + "MU": "Mauritius", + "YT": "Mayotte", + "MX": "Messico", + "FM": "Micronesia", + "MD": "Moldavia", + "MC": "Monaco", + "MN": "Mongolia", + "ME": "Montenegro", + "MS": "Montserrat", + "MZ": "Mozambico", + "MM": "Myanmar", + "NA": "Namibia", + "NR": "Nauru", + "NP": "Nepal", + "NI": "Nicaragua", + "NE": "Niger", + "NG": "Nigeria", + "NU": "Niue", + "NO": "Norvegia", + "NC": "Nuova Caledonia", + "NZ": "Nuova Zelanda", + "OM": "Oman", + "NL": "Paesi Bassi", + "PK": "Pakistan", + "PW": "Palau", + "PS": "Palestina", + "PA": "Panama", + "PG": "Papua Nuova Guinea", + "PY": "Paraguay", + "PE": "Perù", + "PN": "Pitcairn", + "PF": "Polinesia Francese", + "PL": "Polonia", + "PT": "Portogallo", + "PR": "Portorico", + "QA": "Qatar", + "HK": "Regione Amministrativa Speciale di Hong Kong della Repubblica Popolare Cinese", + "MO": "Regione Amministrativa Speciale di Macao della Repubblica Popolare Cinese", + "GB": "Regno Unito", + "CZ": "Repubblica Ceca", + "CF": "Repubblica Centrafricana", + "CD": "Repubblica Democratica del Congo", + "DO": "Repubblica Dominicana", + "MK": "Repubblica di Macedonia", + "RO": "Romania", + "RW": "Ruanda", + "RE": "Réunion", + "EH": "Sahara Occidentale", + "KN": "Saint Kitts e Nevis", + "LC": "Saint Lucia", + "PM": "Saint Pierre e Miquelon", + "VC": "Saint Vincent e Grenadines", + "WS": "Samoa", + "AS": "Samoa Americane", + "BL": "San Bartolomeo", + "SM": "San Marino", + "SH": "Sant’Elena", + "ST": "Sao Tomé e Príncipe", + "SN": "Senegal", + "RS": "Serbia", + "CS": "Serbia e Montenegro", + "SC": "Seychelles", + "SL": "Sierra Leone", + "SG": "Singapore", + "SY": "Siria", + "SK": "Slovacchia", + "SI": "Slovenia", + "SO": "Somalia", + "ES": "Spagna", + "LK": "Sri Lanka", + "US": "Stati Uniti", + "ZA": "Sudafrica", + "SD": "Sudan", + "SR": "Suriname", + "SJ": "Svalbard e Jan Mayen", + "SE": "Svezia", + "CH": "Svizzera", + "SZ": "Swaziland", + "TJ": "Tagikistan", + "TH": "Tailandia", + "TW": "Taiwan", + "TZ": "Tanzania", + "TF": "Territori australi francesi", + "IO": "Territorio Britannico dell’Oceano Indiano", + "TL": "Timor Est", + "TG": "Togo", + "TK": "Tokelau", + "TO": "Tonga", + "TT": "Trinidad e Tobago", + "TN": "Tunisia", + "TR": "Turchia", + "TM": "Turkmenistan", + "TV": "Tuvalu", + "UA": "Ucraina", + "UG": "Uganda", + "HU": "Ungheria", + "UY": "Uruguay", + "UZ": "Uzbekistan", + "VU": "Vanuatu", + "VA": "Vaticano", + "VE": "Venezuela", + "VN": "Vietnam", + "WF": "Wallis e Futuna", + "YE": "Yemen", + "ZM": "Zambia", + "ZW": "Zimbabwe", + "ZZ": "regione non valida o sconosciuta" +} \ No newline at end of file diff --git a/src/assets/countries/ja.json b/src/assets/countries/ja.json new file mode 100644 index 000000000..8d147d0b6 --- /dev/null +++ b/src/assets/countries/ja.json @@ -0,0 +1,250 @@ +{ + "IS": "アイスランド", + "IE": "アイルランド", + "AZ": "アゼルバイジャン", + "AF": "アフガニスタン", + "US": "アメリカ合衆国", + "VI": "アメリカ領ヴァージン諸島", + "AE": "アラブ首長国連邦", + "DZ": "アルジェリア", + "AR": "アルゼンチン", + "AL": "アルバニア", + "AW": "アルバ島", + "AM": "アルメニア", + "AI": "アンギラ", + "AO": "アンゴラ", + "AG": "アンティグア・バーブーダ", + "AD": "アンドラ", + "YE": "イエメン", + "GB": "イギリス", + "VG": "イギリス領ヴァージン諸島", + "IL": "イスラエル", + "IT": "イタリア", + "IQ": "イラク", + "IR": "イラン", + "IN": "インド", + "ID": "インドネシア", + "WF": "ウォリス・フツナ", + "UG": "ウガンダ", + "UA": "ウクライナ", + "UZ": "ウズベキスタン", + "UY": "ウルグアイ", + "EC": "エクアドル", + "EG": "エジプト", + "EE": "エストニア", + "ET": "エチオピア", + "ER": "エリトリア", + "SV": "エルサルバドル", + "OM": "オマーン", + "NL": "オランダ", + "AN": "オランダ領アンティル諸島", + "AU": "オーストラリア", + "AT": "オーストリア", + "AX": "オーランド諸島", + "KZ": "カザフスタン", + "QA": "カタール", + "CA": "カナダ", + "CM": "カメルーン", + "KH": "カンボジア", + "CV": "カーボベルデ", + "GY": "ガイアナ", + "GA": "ガボン", + "GM": "ガンビア", + "GH": "ガーナ", + "GG": "ガーンジー", + "CY": "キプロス", + "CU": "キューバ", + "KI": "キリバス", + "KG": "キルギスタン", + "GN": "ギニア", + "GW": "ギニアビサウ", + "GR": "ギリシャ", + "KW": "クウェート", + "CK": "クック諸島", + "CX": "クリスマス島", + "HR": "クロアチア", + "GT": "グアテマラ", + "GP": "グアドループ", + "GU": "グアム", + "GL": "グリーンランド", + "GE": "グルジア", + "GD": "グレナダ", + "KY": "ケイマン諸島", + "KE": "ケニア", + "CC": "ココス (キーリング) 諸島", + "CR": "コスタリカ", + "KM": "コモロ", + "CO": "コロンビア", + "CG": "コンゴ共和国 (ブラザビル)", + "CD": "コンゴ民主共和国 (キンシャサ)", + "CI": "コートジボワール", + "SA": "サウジアラビア", + "WS": "サモア", + "ST": "サントメ・プリンシペ", + "PM": "サンピエール島・ミクロン島", + "SM": "サンマリノ", + "BL": "サン・バルテルミー", + "ZM": "ザンビア", + "SL": "シエラレオネ", + "SY": "シリア", + "SG": "シンガポール", + "DJ": "ジブチ", + "GI": "ジブラルタル", + "JM": "ジャマイカ", + "JE": "ジャージー", + "ZW": "ジンバブエ", + "CH": "スイス", + "SE": "スウェーデン", + "SJ": "スバールバル諸島・ヤンマイエン島", + "ES": "スペイン", + "SR": "スリナム", + "LK": "スリランカ", + "SK": "スロバキア", + "SI": "スロベニア", + "SZ": "スワジランド", + "SD": "スーダン", + "SN": "セネガル", + "RS": "セルビア", + "CS": "セルビア・モンテネグロ", + "KN": "セントクリストファー・ネイビス", + "VC": "セントビンセント・グレナディーン諸島", + "SH": "セントヘレナ", + "LC": "セントルシア", + "MF": "セント・マーチン", + "SC": "セーシェル", + "SO": "ソマリア", + "SB": "ソロモン諸島", + "TH": "タイ", + "TJ": "タジキスタン", + "TZ": "タンザニア", + "TC": "タークス諸島・カイコス諸島", + "CZ": "チェコ共和国", + "TD": "チャド", + "TN": "チュニジア", + "CL": "チリ", + "TV": "ツバル", + "DK": "デンマーク", + "TK": "トケラウ諸島", + "TT": "トリニダード・トバゴ", + "TM": "トルクメニスタン", + "TR": "トルコ", + "TO": "トンガ", + "TG": "トーゴ", + "DE": "ドイツ", + "DO": "ドミニカ共和国", + "DM": "ドミニカ国", + "NG": "ナイジェリア", + "NR": "ナウル", + "NA": "ナミビア", + "NU": "ニウエ島", + "NI": "ニカラグア", + "NE": "ニジェール", + "NC": "ニューカレドニア", + "NZ": "ニュージーランド", + "NP": "ネパール", + "NO": "ノルウェー", + "NF": "ノーフォーク島", + "HT": "ハイチ", + "HU": "ハンガリー", + "HM": "ハード島・マクドナルド諸島", + "VA": "バチカン市国", + "VU": "バヌアツ", + "BS": "バハマ", + "BM": "バミューダ", + "BB": "バルバドス", + "BD": "バングラデシュ", + "BH": "バーレーン", + "PK": "パキスタン", + "PA": "パナマ", + "PG": "パプアニューギニア", + "PW": "パラオ", + "PY": "パラグアイ", + "PS": "パレスチナ領土", + "PN": "ピトケアン島", + "FJ": "フィジー", + "PH": "フィリピン", + "FI": "フィンランド", + "FO": "フェロー諸島", + "FK": "フォークランド諸島", + "FR": "フランス", + "TF": "フランス領極南諸島", + "BR": "ブラジル", + "BG": "ブルガリア", + "BF": "ブルキナファソ", + "BN": "ブルネイ", + "BI": "ブルンジ", + "BT": "ブータン", + "BV": "ブーベ島", + "PR": "プエルトリコ", + "VN": "ベトナム", + "BJ": "ベニン", + "VE": "ベネズエラ", + "BY": "ベラルーシ", + "BZ": "ベリーズ", + "BE": "ベルギー", + "PE": "ペルー", + "HN": "ホンジュラス", + "BA": "ボスニア・ヘルツェゴビナ", + "BW": "ボツワナ", + "BO": "ボリビア", + "PT": "ポルトガル", + "PL": "ポーランド", + "MK": "マケドニア", + "MG": "マダガスカル", + "YT": "マヨット島", + "MW": "マラウィ", + "ML": "マリ", + "MT": "マルタ", + "MQ": "マルティニーク島", + "MY": "マレーシア", + "IM": "マン島", + "MH": "マーシャル諸島共和国", + "FM": "ミクロネシア", + "MM": "ミャンマー", + "MX": "メキシコ", + "MZ": "モザンビーク", + "MC": "モナコ", + "MV": "モルジブ", + "MD": "モルドバ", + "MA": "モロッコ", + "MN": "モンゴル", + "ME": "モンテネグロ", + "MS": "モントセラト島", + "MU": "モーリシャス", + "MR": "モーリタニア", + "JO": "ヨルダン", + "LA": "ラオス", + "LV": "ラトビア", + "LT": "リトアニア", + "LI": "リヒテンシュタイン", + "LY": "リビア", + "LR": "リベリア", + "LU": "ルクセンブルグ", + "RW": "ルワンダ", + "RO": "ルーマニア", + "LS": "レソト", + "LB": "レバノン", + "RE": "レユニオン島", + "RU": "ロシア", + "ZZ": "不明な地域", + "CN": "中国", + "CF": "中央アフリカ共和国", + "MO": "中華人民共和国マカオ特別行政区", + "HK": "中華人民共和国香港特別行政区", + "GF": "仏領ギアナ", + "PF": "仏領ポリネシア", + "MP": "北マリアナ諸島", + "ZA": "南アフリカ", + "GS": "南ジョージア島・南サンドイッチ諸島", + "AQ": "南極大陸", + "TW": "台湾", + "KR": "大韓民国", + "JP": "日本", + "KP": "朝鮮民主主義人民共和国", + "TL": "東ティモール", + "AS": "米領サモア", + "UM": "米領太平洋諸島", + "IO": "英領インド洋植民地", + "EH": "西サハラ", + "GQ": "赤道ギニア" +} \ No newline at end of file diff --git a/src/assets/countries/nl.json b/src/assets/countries/nl.json new file mode 100644 index 000000000..30e8c4bb4 --- /dev/null +++ b/src/assets/countries/nl.json @@ -0,0 +1,250 @@ +{ + "AF": "Afghanistan", + "AX": "Alandeilanden", + "AL": "Albanië", + "DZ": "Algerije", + "AS": "Amerikaans Samoa", + "VI": "Amerikaanse Maagdeneilanden", + "UM": "Amerikaanse kleinere afgelegen eilanden", + "AD": "Andorra", + "AO": "Angola", + "AI": "Anguilla", + "AQ": "Antarctica", + "AG": "Antigua en Barbuda", + "AR": "Argentinië", + "AM": "Armenië", + "AW": "Aruba", + "AU": "Australië", + "AZ": "Azerbeidzjan", + "BS": "Bahama’s", + "BH": "Bahrein", + "BD": "Bangladesh", + "BB": "Barbados", + "BE": "België", + "BZ": "Belize", + "BJ": "Benin", + "BM": "Bermuda", + "BT": "Bhutan", + "BO": "Bolivia", + "BA": "Bosnië en Herzegovina", + "BW": "Botswana", + "BV": "Bouveteiland", + "BR": "Brazilië", + "IO": "Britse Gebieden in de Indische Oceaan", + "VG": "Britse Maagdeneilanden", + "BN": "Brunei", + "BG": "Bulgarije", + "BF": "Burkina Faso", + "BI": "Burundi", + "KH": "Cambodja", + "CA": "Canada", + "KY": "Caymaneilanden", + "CF": "Centraal-Afrikaanse Republiek", + "CL": "Chili", + "CN": "China", + "CX": "Christmaseiland", + "CC": "Cocoseilanden", + "CO": "Colombia", + "KM": "Comoren", + "CG": "Congo", + "CD": "Congo-Kinshasa", + "CK": "Cookeilanden", + "CR": "Costa Rica", + "CU": "Cuba", + "CY": "Cyprus", + "DK": "Denemarken", + "DJ": "Djibouti", + "DM": "Dominica", + "DO": "Dominicaanse Republiek", + "DE": "Duitsland", + "EC": "Ecuador", + "EG": "Egypte", + "SV": "El Salvador", + "GQ": "Equatoriaal-Guinea", + "ER": "Eritrea", + "EE": "Estland", + "ET": "Ethiopië", + "FO": "Faeröer", + "FK": "Falklandeilanden", + "FJ": "Fiji", + "PH": "Filipijnen", + "FI": "Finland", + "FR": "Frankrijk", + "GF": "Frans-Guyana", + "PF": "Frans-Polynesië", + "TF": "Franse Gebieden in de zuidelijke Indische Oceaan", + "GA": "Gabon", + "GM": "Gambia", + "GE": "Georgië", + "GH": "Ghana", + "GI": "Gibraltar", + "GD": "Grenada", + "GR": "Griekenland", + "GL": "Groenland", + "GP": "Guadeloupe", + "GU": "Guam", + "GT": "Guatemala", + "GG": "Guernsey", + "GN": "Guinee", + "GW": "Guinee-Bissau", + "GY": "Guyana", + "HT": "Haïti", + "HM": "Heard- en McDonaldeilanden", + "HN": "Honduras", + "HU": "Hongarije", + "HK": "Hongkong SAR van China", + "IS": "IJsland", + "IE": "Ierland", + "IN": "India", + "ID": "Indonesië", + "IQ": "Irak", + "IR": "Iran", + "IM": "Isle of Man", + "IL": "Israël", + "IT": "Italië", + "CI": "Ivoorkust", + "JM": "Jamaica", + "JP": "Japan", + "YE": "Jemen", + "JE": "Jersey", + "JO": "Jordanië", + "CV": "Kaapverdië", + "CM": "Kameroen", + "KZ": "Kazachstan", + "KE": "Kenia", + "KG": "Kirgizië", + "KI": "Kiribati", + "KW": "Koeweit", + "HR": "Kroatië", + "LA": "Laos", + "LS": "Lesotho", + "LV": "Letland", + "LB": "Libanon", + "LR": "Liberia", + "LY": "Libië", + "LI": "Liechtenstein", + "LT": "Litouwen", + "LU": "Luxemburg", + "MO": "Macao SAR van China", + "MK": "Macedonië", + "MG": "Madagaskar", + "MW": "Malawi", + "MV": "Maldiven", + "MY": "Maleisië", + "ML": "Mali", + "MT": "Malta", + "MA": "Marokko", + "MH": "Marshalleilanden", + "MQ": "Martinique", + "MR": "Mauritanië", + "MU": "Mauritius", + "YT": "Mayotte", + "MX": "Mexico", + "FM": "Micronesië", + "MD": "Moldavië", + "MC": "Monaco", + "MN": "Mongolië", + "ME": "Montenegro", + "MS": "Montserrat", + "MZ": "Mozambique", + "MM": "Myanmar", + "NA": "Namibië", + "NR": "Nauru", + "NL": "Nederland", + "AN": "Nederlandse Antillen", + "NP": "Nepal", + "NI": "Nicaragua", + "NC": "Nieuw-Caledonië", + "NZ": "Nieuw-Zeeland", + "NE": "Niger", + "NG": "Nigeria", + "NU": "Niue", + "KP": "Noord-Korea", + "MP": "Noordelijke Marianeneilanden", + "NO": "Noorwegen", + "NF": "Norfolkeiland", + "UG": "Oeganda", + "UA": "Oekraïne", + "UZ": "Oezbekistan", + "OM": "Oman", + "ZZ": "Onbekend of onjuist gebied", + "TL": "Oost-Timor", + "AT": "Oostenrijk", + "PK": "Pakistan", + "PW": "Palau", + "PS": "Palestijns Gebied", + "PA": "Panama", + "PG": "Papoea-Nieuw-Guinea", + "PY": "Paraguay", + "PE": "Peru", + "PN": "Pitcairn", + "PL": "Polen", + "PT": "Portugal", + "PR": "Puerto Rico", + "QA": "Qatar", + "RO": "Roemenië", + "RU": "Rusland", + "RW": "Rwanda", + "RE": "Réunion", + "BL": "Saint Barthélemy", + "KN": "Saint Kitts en Nevis", + "LC": "Saint Lucia", + "PM": "Saint Pierre en Miquelon", + "VC": "Saint Vincent en de Grenadines", + "SB": "Salomonseilanden", + "WS": "Samoa", + "SM": "San Marino", + "ST": "Sao Tomé en Principe", + "SA": "Saoedi-Arabië", + "SN": "Senegal", + "RS": "Servië", + "CS": "Servië en Montenegro", + "SC": "Seychellen", + "SL": "Sierra Leone", + "SG": "Singapore", + "SH": "Sint-Helena", + "MF": "Sint-Maarten", + "SI": "Slovenië", + "SK": "Slowakije", + "SD": "Soedan", + "SO": "Somalië", + "ES": "Spanje", + "LK": "Sri Lanka", + "SR": "Suriname", + "SJ": "Svalbard en Jan Mayen", + "SZ": "Swaziland", + "SY": "Syrië", + "TJ": "Tadzjikistan", + "TW": "Taiwan", + "TZ": "Tanzania", + "TH": "Thailand", + "TG": "Togo", + "TK": "Tokelau", + "TO": "Tonga", + "TT": "Trinidad en Tobago", + "TD": "Tsjaad", + "CZ": "Tsjechië", + "TN": "Tunesië", + "TR": "Turkije", + "TM": "Turkmenistan", + "TC": "Turks- en Caicoseilanden", + "TV": "Tuvalu", + "UY": "Uruguay", + "VU": "Vanuatu", + "VA": "Vaticaanstad", + "VE": "Venezuela", + "GB": "Verenigd Koninkrijk", + "AE": "Verenigde Arabische Emiraten", + "US": "Verenigde Staten", + "VN": "Vietnam", + "WF": "Wallis en Futuna", + "EH": "Westelijke Sahara", + "BY": "Wit-Rusland", + "ZM": "Zambia", + "ZW": "Zimbabwe", + "ZA": "Zuid-Afrika", + "GS": "Zuid-Georgië en Zuidelijke Sandwicheilanden", + "KR": "Zuid-Korea", + "SE": "Zweden", + "CH": "Zwitserland" +} \ No newline at end of file diff --git a/src/assets/countries/pl.json b/src/assets/countries/pl.json new file mode 100644 index 000000000..598b7d964 --- /dev/null +++ b/src/assets/countries/pl.json @@ -0,0 +1,250 @@ +{ + "AF": "Afganistan", + "AL": "Albania", + "DZ": "Algieria", + "AD": "Andora", + "AO": "Angola", + "AI": "Anguilla", + "AQ": "Antarktyka", + "AG": "Antigua i Barbuda", + "AN": "Antyle Holenderskie", + "SA": "Arabia Saudyjska", + "AR": "Argentyna", + "AM": "Armenia", + "AW": "Aruba", + "AU": "Australia", + "AT": "Austria", + "AZ": "Azerbejdżan", + "BS": "Bahamy", + "BH": "Bahrajn", + "BD": "Bangladesz", + "BB": "Barbados", + "BE": "Belgia", + "BZ": "Belize", + "BJ": "Benin", + "BM": "Bermudy", + "BT": "Bhutan", + "BY": "Białoruś", + "MM": "Birma", + "BO": "Boliwia", + "BW": "Botswana", + "BA": "Bośnia i Hercegowina", + "BR": "Brazylia", + "BN": "Brunei Darussalam", + "VG": "Brytyjskie Wyspy Dziewicze", + "BF": "Burkina Faso", + "BI": "Burundi", + "BG": "Bułgaria", + "CL": "Chile", + "CN": "Chiny", + "HR": "Chorwacja", + "CY": "Cypr", + "TD": "Czad", + "ME": "Czarnogóra", + "CZ": "Czechy", + "UM": "Dalekie Wyspy Mniejsze Stanów Zjednoczonych", + "DK": "Dania", + "CD": "Demokratyczna Republika Konga", + "DM": "Dominika", + "DJ": "Dżibuti", + "EG": "Egipt", + "EC": "Ekwador", + "ER": "Erytrea", + "EE": "Estonia", + "ET": "Etiopia", + "FK": "Falklandy", + "FM": "Federalne Stany Mikronezji", + "FJ": "Fidżi", + "PH": "Filipiny", + "FI": "Finlandia", + "FR": "Francja", + "TF": "Francuskie Terytoria Południowe", + "GA": "Gabon", + "GM": "Gambia", + "GS": "Georgia Południowa i Sandwich Południowy", + "GH": "Ghana", + "GI": "Gibraltar", + "GR": "Grecja", + "GD": "Grenada", + "GL": "Grenlandia", + "GE": "Gruzja", + "GU": "Guam", + "GY": "Gujana", + "GF": "Gujana Francuska", + "GP": "Gwadelupa", + "GT": "Gwatemala", + "GN": "Gwinea", + "GW": "Gwinea Bissau", + "GQ": "Gwinea Równikowa", + "HT": "Haiti", + "ES": "Hiszpania", + "NL": "Holandia", + "HN": "Honduras", + "HK": "Hongkong, Specjalny Region Administracyjny Chin", + "IN": "Indie", + "ID": "Indonezja", + "IQ": "Irak", + "IR": "Iran", + "IE": "Irlandia", + "IS": "Islandia", + "IL": "Izrael", + "JM": "Jamajka", + "JP": "Japonia", + "YE": "Jemen", + "JO": "Jordania", + "KY": "Kajmany", + "KH": "Kambodża", + "CM": "Kamerun", + "CA": "Kanada", + "QA": "Katar", + "KZ": "Kazachstan", + "KE": "Kenia", + "KG": "Kirgistan", + "KI": "Kiribati", + "CO": "Kolumbia", + "KM": "Komory", + "CG": "Kongo", + "KR": "Korea Południowa", + "KP": "Korea Północna", + "CR": "Kostaryka", + "CU": "Kuba", + "KW": "Kuwejt", + "LA": "Laos", + "LS": "Lesotho", + "LB": "Liban", + "LR": "Liberia", + "LY": "Libia", + "LI": "Liechtenstein", + "LT": "Litwa", + "LU": "Luksemburg", + "MK": "Macedonia", + "MG": "Madagaskar", + "YT": "Majotta", + "MO": "Makau, Specjalny Region Administracyjny Chin", + "MW": "Malawi", + "MV": "Malediwy", + "MY": "Malezja", + "ML": "Mali", + "MT": "Malta", + "MP": "Mariany Północne", + "MA": "Maroko", + "MQ": "Martynika", + "MR": "Mauretania", + "MU": "Mauritius", + "MX": "Meksyk", + "MC": "Monako", + "MN": "Mongolia", + "MS": "Montserrat", + "MZ": "Mozambik", + "MD": "Mołdawia", + "NA": "Namibia", + "NR": "Nauru", + "NP": "Nepal", + "DE": "Niemcy", + "ZZ": "Nieznany lub nieprawidłowy region", + "NE": "Niger", + "NG": "Nigeria", + "NI": "Nikaragua", + "NU": "Niue", + "NF": "Norfolk", + "NO": "Norwegia", + "NC": "Nowa Kaledonia", + "NZ": "Nowa Zelandia", + "OM": "Oman", + "PK": "Pakistan", + "PW": "Palau", + "PA": "Panama", + "PG": "Papua Nowa Gwinea", + "PY": "Paragwaj", + "PE": "Peru", + "PN": "Pitcairn", + "PF": "Polinezja Francuska", + "PL": "Polska", + "PR": "Portoryko", + "PT": "Portugalia", + "DO": "Republika Dominikańska", + "ZA": "Republika Południowej Afryki", + "CV": "Republika Zielonego Przylądka", + "CF": "Republika Środkowoafrykańska", + "RE": "Reunion", + "RU": "Rosja", + "RO": "Rumunia", + "RW": "Rwanda", + "EH": "Sahara Zachodnia", + "BL": "Saint Barthélemy", + "KN": "Saint Kitts i Nevis", + "LC": "Saint Lucia", + "VC": "Saint Vincent i Grenadyny", + "PM": "Saint-Pierre i Miquelon", + "SV": "Salwador", + "WS": "Samoa", + "AS": "Samoa Amerykańskie", + "SM": "San Marino", + "SN": "Senegal", + "RS": "Serbia", + "CS": "Serbia i Czarnogóra", + "SC": "Seszele", + "SL": "Sierra Leone", + "SG": "Singapur", + "MF": "Sint Maarten", + "SO": "Somalia", + "LK": "Sri Lanka", + "US": "Stany Zjednoczone", + "SZ": "Suazi", + "SD": "Sudan", + "SR": "Surinam", + "SJ": "Svalbard i Jan Mayen", + "SY": "Syria", + "CH": "Szwajcaria", + "SE": "Szwecja", + "SK": "Słowacja", + "SI": "Słowenia", + "TJ": "Tadżykistan", + "TH": "Tajlandia", + "TW": "Tajwan", + "TZ": "Tanzania", + "PS": "Terytoria Palestyńskie", + "IO": "Terytorium Brytyjskie Oceanu Indyjskiego", + "TL": "Timor Wschodni", + "TG": "Togo", + "TK": "Tokelau", + "TO": "Tonga", + "TT": "Trynidad i Tobago", + "TN": "Tunezja", + "TR": "Turcja", + "TM": "Turkmenistan", + "TC": "Turks i Caicos", + "TV": "Tuvalu", + "UG": "Uganda", + "UA": "Ukraina", + "UY": "Urugwaj", + "UZ": "Uzbekistan", + "VU": "Vanuatu", + "WF": "Wallis i Futuna", + "VA": "Watykan", + "VE": "Wenezuela", + "GB": "Wielka Brytania", + "VN": "Wietnam", + "CI": "Wybrzeże Kości Słoniowej", + "BV": "Wyspa Bouveta", + "CX": "Wyspa Bożego Narodzenia", + "GG": "Wyspa Guernsey", + "JE": "Wyspa Jersey", + "IM": "Wyspa Man", + "SH": "Wyspa Świętej Heleny", + "AX": "Wyspy Alandzkie", + "CK": "Wyspy Cooka", + "VI": "Wyspy Dziewicze Stanów Zjednoczonych", + "HM": "Wyspy Heard i McDonalda", + "CC": "Wyspy Kokosowe", + "MH": "Wyspy Marshalla", + "FO": "Wyspy Owcze", + "SB": "Wyspy Salomona", + "ST": "Wyspy Świętego Tomasza i Książęca", + "HU": "Węgry", + "IT": "Włochy", + "ZM": "Zambia", + "ZW": "Zimbabwe", + "AE": "Zjednoczone Emiraty Arabskie", + "LV": "Łotwa" +} \ No newline at end of file diff --git a/src/assets/countries/pt-br.json b/src/assets/countries/pt-br.json new file mode 100644 index 000000000..7ad25a8ab --- /dev/null +++ b/src/assets/countries/pt-br.json @@ -0,0 +1,250 @@ +{ + "AF": "Afeganistão", + "AL": "Albânia", + "DE": "Alemanha", + "AD": "Andorra", + "AO": "Angola", + "AI": "Anguilla", + "AN": "Antilhas Holandesas", + "AQ": "Antártida", + "AG": "Antígua e Barbuda", + "AR": "Argentina", + "DZ": "Argélia", + "AM": "Armênia", + "AW": "Aruba", + "SA": "Arábia Saudita", + "AU": "Austrália", + "AZ": "Azerbaijão", + "BS": "Bahamas", + "BH": "Bahrain", + "BD": "Bangladesh", + "BB": "Barbados", + "BY": "Belarus", + "BZ": "Belize", + "BJ": "Benin", + "BM": "Bermudas", + "BO": "Bolívia", + "BW": "Botsuana", + "BR": "Brasil", + "BN": "Brunei", + "BG": "Bulgária", + "BF": "Burquina Faso", + "BI": "Burundi", + "BT": "Butão", + "BE": "Bélgica", + "BA": "Bósnia-Herzegovina", + "CV": "Cabo Verde", + "KH": "Camboja", + "CA": "Canadá", + "KZ": "Casaquistão", + "QA": "Catar", + "TD": "Chade", + "CL": "Chile", + "CN": "China", + "CY": "Chipre", + "SG": "Cingapura", + "CO": "Colômbia", + "KM": "Comores", + "CG": "Congo", + "CD": "Congo-Kinshasa", + "KP": "Coreia do Norte", + "KR": "Coreia do Sul", + "CR": "Costa Rica", + "CI": "Costa do Marfim", + "HR": "Croácia", + "CU": "Cuba", + "DK": "Dinamarca", + "DJ": "Djibuti", + "DM": "Dominica", + "EG": "Egito", + "SV": "El Salvador", + "AE": "Emirados Árabes Unidos", + "EC": "Equador", + "ER": "Eritreia", + "SK": "Eslováquia", + "SI": "Eslovênia", + "ES": "Espanha", + "US": "Estados Unidos", + "EE": "Estônia", + "ET": "Etiópia", + "FJ": "Fiji", + "PH": "Filipinas", + "FI": "Finlândia", + "FR": "França", + "GA": "Gabão", + "GH": "Gana", + "GE": "Geórgia", + "GS": "Geórgia do Sul e Ilhas Sandwich do Sul", + "GI": "Gibraltar", + "GD": "Granada", + "GL": "Groênlandia", + "GR": "Grécia", + "GP": "Guadalupe", + "GU": "Guam", + "GT": "Guatemala", + "GG": "Guernsey", + "GY": "Guiana", + "GF": "Guiana Francesa", + "GN": "Guiné", + "GW": "Guiné Bissau", + "GQ": "Guiné Equatorial", + "GM": "Gâmbia", + "HT": "Haiti", + "NL": "Holanda", + "HN": "Honduras", + "HK": "Hong Kong, Região Admin. Especial da China", + "HU": "Hungria", + "BV": "Ilha Bouvet", + "HM": "Ilha Heard e Ilhas McDonald", + "NF": "Ilha Norfolk", + "IM": "Ilha de Man", + "AX": "Ilhas Aland", + "KY": "Ilhas Caiman", + "CC": "Ilhas Coco", + "CK": "Ilhas Cook", + "FO": "Ilhas Faroe", + "FK": "Ilhas Malvinas", + "MP": "Ilhas Marianas do Norte", + "MH": "Ilhas Marshall", + "UM": "Ilhas Menores Distantes dos Estados Unidos", + "CX": "Ilhas Natal", + "SB": "Ilhas Salomão", + "TC": "Ilhas Turks e Caicos", + "VG": "Ilhas Virgens Britânicas", + "VI": "Ilhas Virgens dos EUA", + "ID": "Indonésia", + "IQ": "Iraque", + "IE": "Irlanda", + "IR": "Irã", + "IS": "Islândia", + "IL": "Israel", + "IT": "Itália", + "YE": "Iêmen", + "JM": "Jamaica", + "JP": "Japão", + "JE": "Jersey", + "JO": "Jordânia", + "KW": "Kuwait", + "LS": "Lesoto", + "LV": "Letônia", + "LR": "Libéria", + "LI": "Liechtenstein", + "LT": "Lituânia", + "LU": "Luxemburgo", + "LB": "Líbano", + "LY": "Líbia", + "MO": "Macau, Região Admin. Especial da China", + "MK": "Macedônia", + "MG": "Madagascar", + "MW": "Malawi", + "MV": "Maldivas", + "ML": "Mali", + "MT": "Malta", + "MY": "Malásia", + "MA": "Marrocos", + "MQ": "Martinica", + "MR": "Mauritânia", + "MU": "Maurício", + "YT": "Mayotte", + "MM": "Mianmar", + "FM": "Micronésia", + "MD": "Moldávia", + "MN": "Mongólia", + "ME": "Montenegro", + "MS": "Montserrat", + "MZ": "Moçambique", + "MX": "México", + "MC": "Mônaco", + "NA": "Namíbia", + "NR": "Nauru", + "NP": "Nepal", + "NI": "Nicarágua", + "NG": "Nigéria", + "NU": "Niue", + "NO": "Noruega", + "NC": "Nova Caledônia", + "NZ": "Nova Zelândia", + "NE": "Níger", + "OM": "Omã", + "PW": "Palau", + "PA": "Panamá", + "PG": "Papua-Nova Guiné", + "PK": "Paquistão", + "PY": "Paraguai", + "PE": "Peru", + "PN": "Pitcairn", + "PF": "Polinésia Francesa", + "PL": "Polônia", + "PR": "Porto Rico", + "PT": "Portugal", + "KG": "Quirguistão", + "KI": "Quiribati", + "KE": "Quênia", + "ZZ": "Região desconhecida ou inválida", + "GB": "Reino Unido", + "CF": "República Centro-Africana", + "DO": "República Dominicana", + "LA": "República Popular Democrática do Laos", + "CZ": "República Tcheca", + "CM": "República dos Camarões", + "RE": "Reunião", + "RO": "Romênia", + "RW": "Ruanda", + "RU": "Rússia", + "EH": "Saara Ocidental", + "PM": "Saint Pierre e Miquelon", + "WS": "Samoa", + "AS": "Samoa Americana", + "SM": "San Marino", + "SH": "Santa Helena", + "LC": "Santa Lúcia", + "SN": "Senegal", + "SL": "Serra Leoa", + "SC": "Seychelles", + "SO": "Somália", + "LK": "Sri Lanka", + "SZ": "Suazilândia", + "SD": "Sudão", + "SR": "Suriname", + "SE": "Suécia", + "CH": "Suíça", + "SJ": "Svalbard e Jan Mayen", + "BL": "São Bartolomeu", + "KN": "São Cristovão e Nevis", + "MF": "São Martinho", + "ST": "São Tomé e Príncipe", + "VC": "São Vicente e Granadinas", + "RS": "Sérvia", + "CS": "Sérvia e Montenegro", + "SY": "Síria", + "TJ": "Tadjiquistão", + "TH": "Tailândia", + "TW": "Taiwan", + "TZ": "Tanzânia", + "IO": "Território Britânico do Oceano Índico", + "PS": "Território da Palestina", + "TF": "Territórios Franceses do Sul", + "TL": "Timor Leste", + "TG": "Togo", + "TK": "Tokelau", + "TO": "Tonga", + "TT": "Trinidad e Tobago", + "TN": "Tunísia", + "TM": "Turcomenistão", + "TR": "Turquia", + "TV": "Tuvalu", + "UA": "Ucrânia", + "UG": "Uganda", + "UY": "Uruguai", + "UZ": "Uzbequistão", + "VU": "Vanuatu", + "VA": "Vaticano", + "VE": "Venezuela", + "VN": "Vietnã", + "WF": "Wallis e Futuna", + "ZW": "Zimbábue", + "ZM": "Zâmbia", + "ZA": "África do Sul", + "AT": "Áustria", + "IN": "Índia" +} \ No newline at end of file diff --git a/src/assets/countries/ru.json b/src/assets/countries/ru.json new file mode 100644 index 000000000..118cf4c13 --- /dev/null +++ b/src/assets/countries/ru.json @@ -0,0 +1,250 @@ +{ + "AU": "Австралия", + "AT": "Австрия", + "AZ": "Азербайджан", + "AX": "Аландские острова", + "AL": "Албания", + "DZ": "Алжир", + "VI": "Американские Виргинские острова", + "AS": "Американское Самоа", + "AO": "Ангола", + "AI": "Ангуилла", + "AD": "Андорра", + "AQ": "Антарктика", + "AG": "Антигуа и Барбуда", + "AR": "Аргентина", + "AM": "Армения", + "AW": "Аруба", + "AF": "Афганистан", + "BS": "Багамские острова", + "BD": "Бангладеш", + "BB": "Барбадос", + "BH": "Бахрейн", + "BY": "Беларусь", + "BZ": "Белиз", + "BE": "Бельгия", + "BJ": "Бенин", + "BM": "Бермудские Острова", + "BG": "Болгария", + "BO": "Боливия", + "BA": "Босния и Герцеговина", + "BW": "Ботсвана", + "BR": "Бразилия", + "IO": "Британская территория в Индийском океане", + "VG": "Британские Виргинские Острова", + "BN": "Бруней Даруссалам", + "BF": "Буркина Фасо", + "BI": "Бурунди", + "BT": "Бутан", + "VU": "Вануату", + "VA": "Ватикан", + "GB": "Великобритания", + "HU": "Венгрия", + "VE": "Венесуэла", + "UM": "Внешние малые острова (США)", + "TL": "Восточный Тимор", + "VN": "Вьетнам", + "GA": "Габон", + "HT": "Гаити", + "GY": "Гайана", + "GM": "Гамбия", + "GH": "Гана", + "GP": "Гваделупа", + "GT": "Гватемала", + "GN": "Гвинея", + "GW": "Гвинея-Биссау", + "DE": "Германия", + "GG": "Гернси", + "GI": "Гибралтар", + "HN": "Гондурас", + "HK": "Гонконг, Особый Административный Район Китая", + "GD": "Гренада", + "GL": "Гренландия", + "GR": "Греция", + "GE": "Грузия", + "GU": "Гуам", + "DK": "Дания", + "CD": "Демократическая Республика Конго", + "JE": "Джерси", + "DJ": "Джибути", + "DO": "Доминиканская Республика", + "EG": "Египет", + "ZM": "Замбия", + "EH": "Западная Сахара", + "ZW": "Зимбабве", + "IL": "Израиль", + "IN": "Индия", + "ID": "Индонезия", + "JO": "Иордания", + "IQ": "Ирак", + "IR": "Иран", + "IE": "Ирландия", + "IS": "Исландия", + "ES": "Испания", + "IT": "Италия", + "YE": "Йемен", + "KZ": "Казахстан", + "KY": "Каймановы острова", + "KH": "Камбоджа", + "CM": "Камерун", + "CA": "Канада", + "QA": "Катар", + "KE": "Кения", + "CY": "Кипр", + "KI": "Кирибати", + "CN": "Китай", + "CC": "Кокосовые острова", + "CO": "Колумбия", + "KM": "Коморские Острова", + "CG": "Конго", + "KP": "Корейская Народно-Демократическая Республика", + "CR": "Коста-Рика", + "CI": "Кот д’Ивуар", + "CU": "Куба", + "KW": "Кувейт", + "KG": "Кыргызстан", + "LA": "Лаос", + "LV": "Латвия", + "LS": "Лесото", + "LR": "Либерия", + "LB": "Ливан", + "LY": "Ливия", + "LT": "Литва", + "LI": "Лихтенштейн", + "LU": "Люксембург", + "MU": "Маврикий", + "MR": "Мавритания", + "MG": "Мадагаскар", + "YT": "Майотта", + "MO": "Макао (особый административный район КНР)", + "MK": "Македония", + "MW": "Малави", + "MY": "Малайзия", + "ML": "Мали", + "MV": "Мальдивы", + "MT": "Мальта", + "MA": "Марокко", + "MQ": "Мартиник", + "MH": "Маршалловы Острова", + "MX": "Мексика", + "MZ": "Мозамбик", + "MD": "Молдова", + "MC": "Монако", + "MN": "Монголия", + "MS": "Монсеррат", + "MM": "Мьянма", + "NA": "Намибия", + "NR": "Науру", + "ZZ": "Неизвестный или недействительный регион", + "NP": "Непал", + "NE": "Нигер", + "NG": "Нигерия", + "AN": "Нидерландские Антильские острова", + "NL": "Нидерланды", + "NI": "Никарагуа", + "NU": "Ниуе", + "NZ": "Новая Зеландия", + "NC": "Новая Каледония", + "NO": "Норвегия", + "AE": "Объединенные Арабские Эмираты", + "OM": "Оман", + "BV": "Остров Буве", + "DM": "Остров Доминика", + "IM": "Остров Мэн", + "NF": "Остров Норфолк", + "CX": "Остров Рождества", + "BL": "Остров Святого Бартоломея", + "MF": "Остров Святого Мартина", + "SH": "Остров Святой Елены", + "CV": "Острова Зеленого Мыса", + "CK": "Острова Кука", + "TC": "Острова Тёркс и Кайкос", + "HM": "Острова Херд и Макдональд", + "PK": "Пакистан", + "PW": "Палау", + "PS": "Палестинская автономия", + "PA": "Панама", + "PG": "Папуа-Новая Гвинея", + "PY": "Парагвай", + "PE": "Перу", + "PN": "Питкерн", + "PL": "Польша", + "PT": "Португалия", + "PR": "Пуэрто-Рико", + "KR": "Республика Корея", + "RE": "Реюньон", + "RU": "Россия", + "RW": "Руанда", + "RO": "Румыния", + "US": "США", + "SV": "Сальвадор", + "WS": "Самоа", + "SM": "Сан-Марино", + "ST": "Сан-Томе и Принсипи", + "SA": "Саудовская Аравия", + "SZ": "Свазиленд", + "SJ": "Свальбард и Ян-Майен", + "MP": "Северные Марианские Острова", + "SC": "Сейшельские Острова", + "PM": "Сен-Пьер и Микелон", + "SN": "Сенегал", + "VC": "Сент-Винсент и Гренадины", + "KN": "Сент-Киттс и Невис", + "LC": "Сент-Люсия", + "RS": "Сербия", + "CS": "Сербия и Черногория", + "SG": "Сингапур", + "SY": "Сирийская Арабская Республика", + "SK": "Словакия", + "SI": "Словения", + "SB": "Соломоновы Острова", + "SO": "Сомали", + "SD": "Судан", + "SR": "Суринам", + "SL": "Сьерра-Леоне", + "TJ": "Таджикистан", + "TH": "Таиланд", + "TW": "Тайвань", + "TZ": "Танзания", + "TG": "Того", + "TK": "Токелау", + "TO": "Тонга", + "TT": "Тринидад и Тобаго", + "TV": "Тувалу", + "TN": "Тунис", + "TM": "Туркменистан", + "TR": "Турция", + "UG": "Уганда", + "UZ": "Узбекистан", + "UA": "Украина", + "WF": "Уоллис и Футуна", + "UY": "Уругвай", + "FO": "Фарерские острова", + "FM": "Федеративные Штаты Микронезии", + "FJ": "Фиджи", + "PH": "Филиппины", + "FI": "Финляндия", + "FK": "Фолклендские острова", + "FR": "Франция", + "GF": "Французская Гвиана", + "PF": "Французская Полинезия", + "TF": "Французские Южные Территории", + "HR": "Хорватия", + "CF": "Центрально-Африканская Республика", + "TD": "Чад", + "ME": "Черногория", + "CZ": "Чешская республика", + "CL": "Чили", + "CH": "Швейцария", + "SE": "Швеция", + "LK": "Шри-Ланка", + "EC": "Эквадор", + "GQ": "Экваториальная Гвинея", + "ER": "Эритрея", + "EE": "Эстония", + "ET": "Эфиопия", + "ZA": "Южная Африка", + "GS": "Южная Джорджия и Южные Сандвичевы Острова", + "JM": "Ямайка", + "JP": "Япония" +} \ No newline at end of file diff --git a/src/assets/countries/sv.json b/src/assets/countries/sv.json new file mode 100644 index 000000000..b71f68d54 --- /dev/null +++ b/src/assets/countries/sv.json @@ -0,0 +1,250 @@ +{ + "AF": "Afghanistan", + "AL": "Albanien", + "DZ": "Algeriet", + "VI": "Amerikanska Jungfruöarna", + "AS": "Amerikanska Samoa", + "AD": "Andorra", + "AO": "Angola", + "AI": "Anguilla", + "AQ": "Antarktis", + "AG": "Antigua och Barbuda", + "AR": "Argentina", + "AM": "Armenien", + "AW": "Aruba", + "AU": "Australien", + "AZ": "Azerbajdzjan", + "BS": "Bahamas", + "BH": "Bahrain", + "BD": "Bangladesh", + "BB": "Barbados", + "BE": "Belgien", + "BZ": "Belize", + "BJ": "Benin", + "BM": "Bermuda", + "BT": "Bhutan", + "BO": "Bolivia", + "BA": "Bosnien och Hercegovina", + "BW": "Botswana", + "BV": "Bouvetön", + "BR": "Brasilien", + "IO": "Brittiska Indiska oceanöarna", + "VG": "Brittiska Jungfruöarna", + "BN": "Brunei", + "BG": "Bulgarien", + "BF": "Burkina Faso", + "BI": "Burundi", + "KY": "Caymanöarna", + "CF": "Centralafrikanska republiken", + "CL": "Chile", + "CO": "Colombia", + "CK": "Cooköarna", + "CR": "Costa Rica", + "CY": "Cypern", + "DK": "Danmark", + "DJ": "Djibouti", + "DM": "Dominica", + "DO": "Dominikanska republiken", + "EC": "Ecuador", + "EG": "Egypten", + "GQ": "Ekvatorialguinea", + "SV": "El Salvador", + "CI": "Elfenbenskusten", + "ER": "Eritrea", + "EE": "Estland", + "ET": "Etiopien", + "FK": "Falklandsöarna", + "FJ": "Fiji", + "PH": "Filippinerna", + "FI": "Finland", + "FR": "Frankrike", + "GF": "Franska Guyana", + "PF": "Franska Polynesien", + "TF": "Franska Sydterritorierna", + "FO": "Färöarna", + "AE": "Förenade Arabemiraten", + "GA": "Gabon", + "GM": "Gambia", + "GE": "Georgien", + "GH": "Ghana", + "GI": "Gibraltar", + "GR": "Grekland", + "GD": "Grenada", + "GL": "Grönland", + "GP": "Guadeloupe", + "GU": "Guam", + "GT": "Guatemala", + "GG": "Guernsey", + "GN": "Guinea", + "GW": "Guinea-Bissau", + "GY": "Guyana", + "HT": "Haiti", + "HM": "Heard- och McDonaldöarna", + "HN": "Honduras", + "HK": "Hongkong (S.A.R. Kina)", + "IN": "Indien", + "ID": "Indonesien", + "IQ": "Irak", + "IR": "Iran", + "IE": "Irland", + "IS": "Island", + "IM": "Isle of Man", + "IL": "Israel", + "IT": "Italien", + "JM": "Jamaica", + "JP": "Japan", + "YE": "Jemen", + "JE": "Jersey", + "JO": "Jordanien", + "CX": "Julön", + "KH": "Kambodja", + "CM": "Kamerun", + "CA": "Kanada", + "CV": "Kap Verde", + "KZ": "Kazakstan", + "KE": "Kenya", + "CN": "Kina", + "KG": "Kirgizistan", + "KI": "Kiribati", + "CC": "Kokosöarna", + "KM": "Komorerna", + "CG": "Kongo-Brazzaville", + "CD": "Kongo-Kinshasa", + "HR": "Kroatien", + "CU": "Kuba", + "KW": "Kuwait", + "LA": "Laos", + "LS": "Lesotho", + "LV": "Lettland", + "LB": "Libanon", + "LR": "Liberia", + "LY": "Libyen", + "LI": "Liechtenstein", + "LT": "Litauen", + "LU": "Luxemburg", + "MO": "Macao (S.A.R. Kina)", + "MG": "Madagaskar", + "MK": "Makedonien", + "MW": "Malawi", + "MY": "Malaysia", + "MV": "Maldiverna", + "ML": "Mali", + "MT": "Malta", + "MA": "Marocko", + "MH": "Marshallöarna", + "MQ": "Martinique", + "MR": "Mauretanien", + "MU": "Mauritius", + "YT": "Mayotte", + "MX": "Mexiko", + "FM": "Mikronesien", + "MD": "Moldavien", + "MC": "Monaco", + "MN": "Mongoliet", + "ME": "Montenegro", + "MS": "Montserrat", + "MZ": "Moçambique", + "MM": "Myanmar", + "NA": "Namibia", + "NR": "Nauru", + "NL": "Nederländerna", + "AN": "Nederländska Antillerna", + "NP": "Nepal", + "NI": "Nicaragua", + "NE": "Niger", + "NG": "Nigeria", + "NU": "Niue", + "KP": "Nordkorea", + "MP": "Nordmarianerna", + "NF": "Norfolkön", + "NO": "Norge", + "NC": "Nya Kaledonien", + "NZ": "Nya Zeeland", + "OM": "Oman", + "PK": "Pakistan", + "PW": "Palau", + "PS": "Palestinska territoriet", + "PA": "Panama", + "PG": "Papua Nya Guinea", + "PY": "Paraguay", + "PE": "Peru", + "PN": "Pitcairn", + "PL": "Polen", + "PT": "Portugal", + "PR": "Puerto Rico", + "QA": "Qatar", + "RO": "Rumänien", + "RW": "Rwanda", + "RU": "Ryssland", + "RE": "Réunion", + "BL": "S:t Barthélemy", + "SH": "S:t Helena", + "KN": "S:t Kitts och Nevis", + "LC": "S:t Lucia", + "MF": "S:t Martin", + "PM": "S:t Pierre och Miquelon", + "VC": "S:t Vincent och Grenadinerna", + "SB": "Salomonöarna", + "WS": "Samoa", + "SM": "San Marino", + "SA": "Saudiarabien", + "CH": "Schweiz", + "SN": "Senegal", + "RS": "Serbien", + "CS": "Serbien och Montenegro", + "SC": "Seychellerna", + "SL": "Sierra Leone", + "SG": "Singapore", + "SK": "Slovakien", + "SI": "Slovenien", + "SO": "Somalia", + "ES": "Spanien", + "LK": "Sri Lanka", + "GB": "Storbritannien", + "SD": "Sudan", + "SR": "Surinam", + "SJ": "Svalbard och Jan Mayen", + "SE": "Sverige", + "SZ": "Swaziland", + "ZA": "Sydafrika", + "GS": "Sydgeorgien och Södra Sandwichöarna", + "KR": "Sydkorea", + "SY": "Syrien", + "ST": "São Tomé och Príncipe", + "TJ": "Tadzjikistan", + "TW": "Taiwan", + "TZ": "Tanzania", + "TD": "Tchad", + "TH": "Thailand", + "CZ": "Tjeckien", + "TG": "Togo", + "TK": "Tokelau", + "TO": "Tonga", + "TT": "Trinidad och Tobago", + "TN": "Tunisien", + "TR": "Turkiet", + "TM": "Turkmenistan", + "TC": "Turks- och Caicosöarna", + "TV": "Tuvalu", + "DE": "Tyskland", + "US": "USA", + "UM": "USA:s yttre öar", + "UG": "Uganda", + "UA": "Ukraina", + "HU": "Ungern", + "UY": "Uruguay", + "UZ": "Uzbekistan", + "VU": "Vanuatu", + "VA": "Vatikanstaten", + "VE": "Venezuela", + "VN": "Vietnam", + "BY": "Vitryssland", + "EH": "Västsahara", + "WF": "Wallis- och Futunaöarna", + "ZM": "Zambia", + "ZW": "Zimbabwe", + "ZZ": "okänd eller ogiltig regionkod", + "AX": "Åland", + "AT": "Österrike", + "TL": "Östtimor" +} \ No newline at end of file diff --git a/src/assets/countries/tr.json b/src/assets/countries/tr.json new file mode 100644 index 000000000..2669fcd76 --- /dev/null +++ b/src/assets/countries/tr.json @@ -0,0 +1,250 @@ +{ + "VI": "ABD Virgin Adaları", + "AF": "Afganistan", + "AX": "Aland Adaları", + "DE": "Almanya", + "US": "Amerika Birleşik Devletleri", + "UM": "Amerika Birleşik Devletleri Küçük Dış Adaları", + "AS": "Amerikan Samoası", + "AD": "Andorra", + "AO": "Angola", + "AI": "Anguilla", + "AQ": "Antarktika", + "AG": "Antigua ve Barbuda", + "AR": "Arjantin", + "AL": "Arnavutluk", + "AW": "Aruba", + "AU": "Avustralya", + "AT": "Avusturya", + "AZ": "Azerbaycan", + "BS": "Bahamalar", + "BH": "Bahreyn", + "BD": "Bangladeş", + "BB": "Barbados", + "EH": "Batı Sahara", + "BZ": "Belize", + "BE": "Belçika", + "BJ": "Benin", + "BM": "Bermuda", + "BY": "Beyaz Rusya", + "BT": "Bhutan", + "ZZ": "Bilinmeyen veya Geçersiz Bölge", + "AE": "Birleşik Arap Emirlikleri", + "GB": "Birleşik Krallık", + "BO": "Bolivya", + "BA": "Bosna Hersek", + "BW": "Botsvana", + "BV": "Bouvet Adası", + "BR": "Brezilya", + "BN": "Brunei", + "BG": "Bulgaristan", + "BF": "Burkina Faso", + "BI": "Burundi", + "CV": "Cape Verde", + "KY": "Cayman Adaları", + "GI": "Cebelitarık", + "DZ": "Cezayir", + "CX": "Christmas Adası", + "DJ": "Cibuti", + "CC": "Cocos Adaları", + "CK": "Cook Adaları", + "DK": "Danimarka", + "DO": "Dominik Cumhuriyeti", + "DM": "Dominika", + "TL": "Doğu Timor", + "EC": "Ekvador", + "GQ": "Ekvator Ginesi", + "SV": "El Salvador", + "ID": "Endonezya", + "ER": "Eritre", + "AM": "Ermenistan", + "EE": "Estonya", + "ET": "Etiyopya", + "FK": "Falkland Adaları", + "FO": "Faroe Adaları", + "MA": "Fas", + "FJ": "Fiji", + "CI": "Fildişi Sahili", + "PH": "Filipinler", + "PS": "Filistin Bölgesi", + "FI": "Finlandiya", + "FR": "Fransa", + "GF": "Fransız Guyanası", + "TF": "Fransız Güney Bölgeleri", + "PF": "Fransız Polinezyası", + "GA": "Gabon", + "GM": "Gambiya", + "GH": "Gana", + "GN": "Gine", + "GW": "Gine-Bissau", + "GD": "Grenada", + "GL": "Grönland", + "GP": "Guadeloupe", + "GU": "Guam", + "GT": "Guatemala", + "GG": "Guernsey", + "GY": "Guyana", + "ZA": "Güney Afrika", + "GS": "Güney Georgia ve Güney Sandwich Adaları", + "KR": "Güney Kore", + "CY": "Güney Kıbrıs Rum Kesimi", + "GE": "Gürcistan", + "HT": "Haiti", + "HM": "Heard Adası ve McDonald Adaları", + "IN": "Hindistan", + "IO": "Hint Okyanusu İngiliz Bölgesi", + "NL": "Hollanda", + "AN": "Hollanda Antilleri", + "HN": "Honduras", + "HK": "Hong Kong SAR - Çin", + "HR": "Hırvatistan", + "IQ": "Irak", + "JM": "Jamaika", + "JP": "Japonya", + "JE": "Jersey", + "KH": "Kamboçya", + "CM": "Kamerun", + "CA": "Kanada", + "ME": "Karadağ", + "QA": "Katar", + "KZ": "Kazakistan", + "KE": "Kenya", + "KI": "Kiribati", + "CO": "Kolombiya", + "KM": "Komorlar", + "CG": "Kongo - Brazavil", + "CD": "Kongo - Kinşasa", + "CR": "Kosta Rika", + "KW": "Kuveyt", + "KP": "Kuzey Kore", + "MP": "Kuzey Mariana Adaları", + "CU": "Küba", + "KG": "Kırgızistan", + "LA": "Laos", + "LS": "Lesotho", + "LV": "Letonya", + "LR": "Liberya", + "LY": "Libya", + "LI": "Liechtenstein", + "LT": "Litvanya", + "LB": "Lübnan", + "LU": "Lüksemburg", + "HU": "Macaristan", + "MG": "Madagaskar", + "MO": "Makao S.A.R. Çin", + "MK": "Makedonya", + "MW": "Malavi", + "MV": "Maldivler", + "MY": "Malezya", + "ML": "Mali", + "MT": "Malta", + "IM": "Man Adası", + "MH": "Marshall Adaları", + "MQ": "Martinik", + "MU": "Mauritius", + "YT": "Mayotte", + "MX": "Meksika", + "FM": "Mikronezya Federal Eyaletleri", + "MD": "Moldova", + "MC": "Monako", + "MS": "Montserrat", + "MR": "Moritanya", + "MZ": "Mozambik", + "MN": "Moğolistan", + "MM": "Myanmar", + "EG": "Mısır", + "NA": "Namibya", + "NR": "Nauru", + "NP": "Nepal", + "NE": "Nijer", + "NG": "Nijerya", + "NI": "Nikaragua", + "NU": "Niue", + "NF": "Norfolk Adası", + "NO": "Norveç", + "CF": "Orta Afrika Cumhuriyeti", + "PK": "Pakistan", + "PW": "Palau", + "PA": "Panama", + "PG": "Papua Yeni Gine", + "PY": "Paraguay", + "PE": "Peru", + "PN": "Pitcairn", + "PL": "Polonya", + "PT": "Portekiz", + "PR": "Porto Riko", + "RE": "Reunion", + "RO": "Romanya", + "RW": "Ruanda", + "RU": "Rusya Federasyonu", + "BL": "Saint Barthelemy", + "SH": "Saint Helena", + "KN": "Saint Kitts ve Nevis", + "LC": "Saint Lucia", + "MF": "Saint Martin", + "PM": "Saint Pierre ve Miquelon", + "VC": "Saint Vincent ve Grenadinler", + "WS": "Samoa", + "SM": "San Marino", + "ST": "Sao Tome ve Principe", + "SN": "Senegal", + "SC": "Seyşel Adaları", + "SL": "Sierra Leone", + "SG": "Singapur", + "SK": "Slovakya", + "SI": "Slovenya", + "SB": "Solomon Adaları", + "SO": "Somali", + "LK": "Sri Lanka", + "SD": "Sudan", + "SR": "Surinam", + "SY": "Suriye", + "SA": "Suudi Arabistan", + "SJ": "Svalbard ve Jan Mayen", + "SZ": "Svaziland", + "RS": "Sırbistan", + "CS": "Sırbistan-Karadağ", + "TJ": "Tacikistan", + "TZ": "Tanzanya", + "TH": "Tayland", + "TW": "Tayvan", + "TG": "Togo", + "TK": "Tokelau", + "TO": "Tonga", + "TT": "Trinidad ve Tobago", + "TN": "Tunus", + "TC": "Turks ve Caicos Adaları", + "TV": "Tuvalu", + "TR": "Türkiye", + "TM": "Türkmenistan", + "UG": "Uganda", + "UA": "Ukrayna", + "OM": "Umman", + "UY": "Uruguay", + "VU": "Vanuatu", + "VA": "Vatikan", + "VE": "Venezuela", + "VN": "Vietnam", + "WF": "Wallis ve Futuna", + "YE": "Yemen", + "NC": "Yeni Kaledonya", + "NZ": "Yeni Zelanda", + "GR": "Yunanistan", + "ZM": "Zambiya", + "ZW": "Zimbabve", + "TD": "Çad", + "CZ": "Çek Cumhuriyeti", + "CN": "Çin", + "UZ": "Özbekistan", + "JO": "Ürdün", + "VG": "İngiliz Virgin Adaları", + "IR": "İran", + "IE": "İrlanda", + "ES": "İspanya", + "IL": "İsrail", + "SE": "İsveç", + "CH": "İsviçre", + "IT": "İtalya", + "IS": "İzlanda", + "CL": "Şili" +} \ No newline at end of file diff --git a/src/assets/countries/zh-cn.json b/src/assets/countries/zh-cn.json new file mode 100644 index 000000000..d0d2ce5c5 --- /dev/null +++ b/src/assets/countries/zh-cn.json @@ -0,0 +1,250 @@ +{ + "BT": "不丹", + "TL": "东帝汶", + "CN": "中国", + "MO": "中国澳门特别行政区", + "HK": "中国香港特别行政区", + "CF": "中非共和国", + "DK": "丹麦", + "UA": "乌克兰", + "UZ": "乌兹别克斯坦", + "UG": "乌干达", + "UY": "乌拉圭", + "TD": "乍得", + "YE": "也门", + "AM": "亚美尼亚", + "IL": "以色列", + "IQ": "伊拉克", + "IR": "伊朗", + "BZ": "伯利兹", + "CV": "佛得角", + "RU": "俄罗斯", + "BG": "保加利亚", + "HR": "克罗地亚", + "GU": "关岛", + "GM": "冈比亚", + "IS": "冰岛", + "GN": "几内亚", + "GW": "几内亚比绍", + "LI": "列支敦士登", + "CG": "刚果(布)", + "CD": "刚果(金)", + "LY": "利比亚", + "LR": "利比里亚", + "CA": "加拿大", + "GH": "加纳", + "GA": "加蓬", + "HU": "匈牙利", + "MP": "北马里亚纳群岛", + "GS": "南乔治亚岛和南桑威齐群岛", + "AQ": "南极洲", + "ZA": "南非", + "BW": "博茨瓦纳", + "QA": "卡塔尔", + "RW": "卢旺达", + "LU": "卢森堡", + "IN": "印度", + "ID": "印度尼西亚", + "GT": "危地马拉", + "EC": "厄瓜多尔", + "ER": "厄立特里亚", + "SY": "叙利亚", + "CU": "古巴", + "TW": "台湾", + "KG": "吉尔吉斯斯坦", + "DJ": "吉布提", + "KZ": "哈萨克斯坦", + "CO": "哥伦比亚", + "CR": "哥斯达黎加", + "CM": "喀麦隆", + "TV": "图瓦卢", + "TM": "土库曼斯坦", + "TR": "土耳其", + "LC": "圣卢西亚", + "KN": "圣基茨和尼维斯", + "ST": "圣多美和普林西比", + "BL": "圣巴泰勒米", + "VC": "圣文森特和格林纳丁斯", + "PM": "圣皮埃尔和密克隆", + "CX": "圣诞岛", + "SH": "圣赫勒拿", + "MF": "圣马丁", + "SM": "圣马力诺", + "GY": "圭亚那", + "TZ": "坦桑尼亚", + "EG": "埃及", + "ET": "埃塞俄比亚", + "KI": "基里巴斯", + "TJ": "塔吉克斯坦", + "SN": "塞内加尔", + "RS": "塞尔维亚", + "CS": "塞尔维亚和黑山", + "SL": "塞拉利昂", + "CY": "塞浦路斯", + "SC": "塞舌尔群岛", + "MX": "墨西哥", + "TG": "多哥", + "DM": "多米尼加", + "DO": "多米尼加共和国", + "AX": "奥兰群岛", + "AT": "奥地利", + "VE": "委内瑞拉", + "BD": "孟加拉国", + "AO": "安哥拉", + "AI": "安圭拉", + "AG": "安提瓜和巴布达", + "AD": "安道尔", + "FM": "密克罗尼西亚联邦", + "NI": "尼加拉瓜", + "NG": "尼日利亚", + "NE": "尼日尔", + "NP": "尼泊尔", + "PS": "巴勒斯坦领土", + "BS": "巴哈马", + "PK": "巴基斯坦", + "BB": "巴巴多斯", + "PG": "巴布亚新几内亚", + "PY": "巴拉圭", + "PA": "巴拿马", + "BH": "巴林", + "BR": "巴西", + "BF": "布基纳法索", + "BV": "布维特岛", + "BI": "布隆迪", + "GR": "希腊", + "PW": "帕劳", + "CK": "库克群岛", + "KY": "开曼群岛", + "DE": "德国", + "IT": "意大利", + "SB": "所罗门群岛", + "TK": "托克劳", + "LV": "拉脱维亚", + "NO": "挪威", + "CZ": "捷克共和国", + "MD": "摩尔多瓦", + "MA": "摩洛哥", + "MC": "摩纳哥", + "BN": "文莱", + "FJ": "斐济", + "SZ": "斯威士兰", + "SK": "斯洛伐克", + "SI": "斯洛文尼亚", + "SJ": "斯瓦尔巴特和扬马延", + "LK": "斯里兰卡", + "SG": "新加坡", + "NC": "新喀里多尼亚", + "NZ": "新西兰", + "JP": "日本", + "CL": "智利", + "IM": "曼岛", + "KP": "朝鲜", + "ZZ": "未知或无效地区", + "KH": "柬埔寨", + "GG": "格恩西岛", + "GD": "格林纳达", + "GL": "格陵兰", + "GE": "格鲁吉亚", + "VA": "梵蒂冈", + "BE": "比利时", + "MR": "毛里塔尼亚", + "MU": "毛里求斯", + "TO": "汤加", + "SA": "沙特阿拉伯", + "FR": "法国", + "TF": "法属南部领土", + "GF": "法属圭亚那", + "PF": "法属波利尼西亚", + "FO": "法罗群岛", + "PL": "波兰", + "PR": "波多黎各", + "BA": "波斯尼亚和黑塞哥维那", + "TH": "泰国", + "JE": "泽西岛", + "ZW": "津巴布韦", + "HN": "洪都拉斯", + "HT": "海地", + "AU": "澳大利亚", + "IE": "爱尔兰", + "EE": "爱沙尼亚", + "JM": "牙买加", + "TC": "特克斯和凯科斯群岛", + "TT": "特立尼达和多巴哥", + "BO": "玻利维亚", + "NR": "瑙鲁", + "SE": "瑞典", + "CH": "瑞士", + "GP": "瓜德罗普岛", + "WF": "瓦利斯和富图纳", + "VU": "瓦努阿图", + "RE": "留尼汪", + "BY": "白俄罗斯", + "BM": "百慕大", + "PN": "皮特凯恩", + "GI": "直布罗陀", + "FK": "福克兰群岛", + "KW": "科威特", + "KM": "科摩罗", + "CC": "科科斯群岛", + "PE": "秘鲁", + "TN": "突尼斯", + "LT": "立陶宛", + "SO": "索马里", + "JO": "约旦", + "NA": "纳米比亚", + "NU": "纽埃", + "MM": "缅甸", + "RO": "罗马尼亚", + "US": "美国", + "UM": "美国边远小岛", + "VI": "美属维京群岛", + "AS": "美属萨摩亚", + "LA": "老挝人民民主共和国", + "KE": "肯尼亚", + "FI": "芬兰", + "SD": "苏丹", + "SR": "苏里南", + "GB": "英国", + "IO": "英属印度洋领地", + "VG": "英属维京群岛", + "NL": "荷兰", + "AN": "荷属安的列斯群岛", + "MZ": "莫桑比克", + "LS": "莱索托", + "PH": "菲律宾", + "SV": "萨尔瓦多", + "WS": "萨摩亚", + "PT": "葡萄牙", + "MN": "蒙古", + "MS": "蒙塞拉特群岛", + "EH": "西撒哈拉", + "ES": "西班牙", + "NF": "诺福克岛", + "CI": "象牙海岸", + "BJ": "贝宁", + "ZM": "赞比亚", + "GQ": "赤道几内亚", + "HM": "赫德与麦克唐纳群岛", + "VN": "越南", + "AZ": "阿塞拜疆", + "AF": "阿富汗", + "DZ": "阿尔及利亚", + "AL": "阿尔巴尼亚", + "AE": "阿拉伯联合酋长国", + "OM": "阿曼", + "AR": "阿根廷", + "AW": "阿鲁巴", + "KR": "韩国", + "MK": "马其顿", + "MV": "马尔代夫", + "MW": "马拉维", + "MQ": "马提尼克群岛", + "MY": "马来西亚", + "YT": "马约特", + "MH": "马绍尔群岛", + "MT": "马耳他", + "MG": "马达加斯加", + "ML": "马里", + "LB": "黎巴嫩", + "ME": "黑山共和国" +} \ No newline at end of file diff --git a/src/assets/countries/zh-tw.json b/src/assets/countries/zh-tw.json new file mode 100644 index 000000000..3d79d4572 --- /dev/null +++ b/src/assets/countries/zh-tw.json @@ -0,0 +1,250 @@ +{ + "BT": "不丹", + "CN": "中華人民共和國", + "MO": "中華人民共和國澳門特別行政區", + "HK": "中華人民共和國香港特別行政區", + "CF": "中非共和國", + "DK": "丹麥", + "AZ": "亞塞拜然", + "AM": "亞美尼亞", + "AX": "亞蘭群島", + "IL": "以色列", + "IQ": "伊拉克", + "IR": "伊朗", + "RU": "俄羅斯", + "BG": "保加利亞", + "HR": "克羅埃西亞", + "IS": "冰島", + "SJ": "冷岸及央麥恩群島", + "LI": "列支敦斯登", + "LY": "利比亞", + "CG": "剛果", + "CD": "剛果民主共和國", + "GA": "加彭", + "CA": "加拿大", + "HU": "匈牙利", + "KP": "北韓", + "MP": "北馬里亞納群島", + "TT": "千里達及托巴哥", + "GS": "南喬治亞與南三明治群島", + "AQ": "南極洲", + "ZA": "南非", + "KR": "南韓", + "QA": "卡達", + "ID": "印尼", + "IN": "印度", + "ER": "厄利垂亞", + "EC": "厄瓜多", + "CU": "古巴", + "CC": "可可斯群島", + "TW": "台灣", + "SZ": "史瓦濟蘭", + "DJ": "吉布地", + "KG": "吉爾吉斯", + "KI": "吉里巴斯", + "TV": "吐瓦魯", + "KZ": "哈薩克", + "CO": "哥倫比亞", + "GP": "哥德普洛", + "CR": "哥斯大黎加", + "CM": "喀麥隆", + "GE": "喬治亞共和國", + "TC": "土克斯及開科斯群島", + "TM": "土庫曼", + "TR": "土耳其", + "TZ": "坦尚尼亞", + "EG": "埃及", + "TJ": "塔吉克", + "SN": "塞內加爾", + "SC": "塞席爾", + "RS": "塞爾維亞", + "CS": "塞爾維亞和蒙特尼哥羅", + "MX": "墨西哥", + "TG": "多哥共和國", + "DM": "多明尼加", + "DO": "多明尼加共和國", + "NG": "奈及利亞", + "AT": "奧地利", + "VE": "委內瑞拉", + "BD": "孟加拉", + "AO": "安哥拉", + "AI": "安圭拉島", + "AG": "安地卡及巴布達", + "AD": "安道爾", + "HN": "宏都拉斯", + "FM": "密克羅尼西亞群島", + "LA": "寮國", + "ZM": "尚比亞", + "NI": "尼加拉瓜", + "NE": "尼日", + "NP": "尼泊爾", + "PS": "巴勒斯坦", + "BS": "巴哈馬", + "PK": "巴基斯坦", + "PG": "巴布亞紐幾內亞", + "PY": "巴拉圭", + "PA": "巴拿馬", + "BH": "巴林", + "BR": "巴西", + "BB": "巴貝多", + "BF": "布吉納法索", + "BV": "布威島", + "GR": "希臘", + "PW": "帛琉", + "GN": "幾內亞", + "GW": "幾內亞比索", + "CK": "庫克群島", + "DE": "德國", + "EE": "愛沙尼亞", + "IE": "愛爾蘭", + "TK": "托克勞群島", + "LV": "拉脫維亞", + "NO": "挪威", + "CZ": "捷克共和國", + "MA": "摩洛哥", + "MD": "摩爾多瓦", + "MC": "摩納哥", + "SY": "敘利亞", + "FJ": "斐濟", + "SK": "斯洛伐克", + "SI": "斯洛維尼亞", + "LK": "斯里蘭卡", + "SG": "新加坡", + "NC": "新喀里多尼亞群島", + "JP": "日本", + "CL": "智利", + "IM": "曼島", + "ZZ": "未確定的區域", + "TO": "東加", + "TL": "東帝汶", + "TD": "查德", + "KH": "柬埔寨", + "GG": "根西島", + "GD": "格瑞納達", + "GL": "格陵蘭", + "VA": "梵蒂岡", + "MU": "模里西斯", + "BE": "比利時", + "BN": "汶萊", + "SA": "沙烏地阿拉伯", + "FR": "法國", + "TF": "法屬南方屬地", + "GF": "法屬圭亞那", + "PF": "法屬玻里尼西亞", + "FO": "法羅群島", + "BA": "波士尼亞與赫塞格維納", + "PR": "波多黎各", + "BW": "波札那", + "PL": "波蘭", + "TH": "泰國", + "HT": "海地", + "JE": "澤西島", + "AU": "澳洲", + "UA": "烏克蘭", + "UG": "烏干達", + "UY": "烏拉圭", + "UZ": "烏茲別克", + "JM": "牙買加", + "SL": "獅子山", + "BO": "玻利維亞", + "SE": "瑞典", + "CH": "瑞士", + "GT": "瓜地馬拉", + "WF": "瓦利斯和福杜納群島", + "GM": "甘比亞", + "RE": "留尼旺", + "BY": "白俄羅斯", + "BM": "百慕達", + "PN": "皮特康", + "RW": "盧安達", + "LU": "盧森堡", + "GI": "直布羅陀", + "FK": "福克蘭群島", + "KW": "科威特", + "KM": "科摩羅群島", + "CI": "科特迪瓦", + "PE": "秘魯", + "TN": "突尼西亞", + "LT": "立陶宛", + "JO": "約旦", + "NA": "納米比亞", + "NU": "紐威島", + "NZ": "紐西蘭", + "SB": "索羅門群島", + "SO": "索馬利亞", + "CV": "維德角", + "MM": "緬甸", + "RO": "羅馬尼亞", + "US": "美國", + "VI": "美屬維京群島", + "AS": "美屬薩摩亞群島", + "UM": "美屬邊疆群島", + "IT": "義大利", + "KN": "聖克里斯多福及尼維斯", + "ST": "聖多美及普林西比", + "BL": "聖巴瑟米", + "PM": "聖彼德與密啟崙", + "VC": "聖文森及格瑞那丁", + "CX": "聖誕島", + "SH": "聖赫勒拿島", + "LC": "聖露西亞", + "MF": "聖馬丁", + "SM": "聖馬利諾", + "KE": "肯亞", + "FI": "芬蘭", + "GB": "英國", + "IO": "英屬印度洋領土", + "VG": "英屬維京群島", + "MR": "茅利塔尼亞", + "AN": "荷屬安地列斯", + "NL": "荷蘭", + "MZ": "莫三比克", + "PH": "菲律賓", + "VU": "萬那杜", + "YE": "葉門", + "PT": "葡萄牙", + "MN": "蒙古", + "ME": "蒙特內哥羅", + "MS": "蒙特色拉特島", + "BI": "蒲隆地", + "GY": "蓋亞納", + "WS": "薩摩亞群島", + "SV": "薩爾瓦多", + "SD": "蘇丹", + "SR": "蘇利南", + "ET": "衣索比亞", + "EH": "西撒哈拉", + "ES": "西班牙", + "NF": "諾福克島", + "NR": "諾魯", + "BJ": "貝南", + "BZ": "貝里斯", + "LR": "賴比瑞亞", + "LS": "賴索扥", + "CY": "賽普勒斯", + "GQ": "赤道幾內亞", + "HM": "赫德與麥克當諾群島", + "VN": "越南", + "ZW": "辛巴威", + "GH": "迦納", + "KY": "開曼群島", + "GU": "關島", + "AF": "阿富汗", + "AE": "阿拉伯聯合大公國", + "OM": "阿曼王國", + "AR": "阿根廷", + "DZ": "阿爾及利亞", + "AL": "阿爾巴尼亞", + "AW": "阿路巴", + "MQ": "馬丁尼克島", + "MY": "馬來西亞", + "MK": "馬其頓", + "ML": "馬利", + "MW": "馬拉威", + "MT": "馬爾他", + "MV": "馬爾地夫", + "YT": "馬約特", + "MH": "馬紹爾群島", + "MG": "馬達加斯加", + "LB": "黎巴嫩" +} \ No newline at end of file diff --git a/src/assets/exttomime.json b/src/assets/exttomime.json new file mode 100644 index 000000000..445a11777 --- /dev/null +++ b/src/assets/exttomime.json @@ -0,0 +1,1256 @@ +{ +"123": {"type":"application/vnd.lotus-1-2-3"}, +"3dm": {"type":"x-world/x-3dmf"}, +"3dmf": {"type":"x-world/x-3dmf"}, +"3dml": {"type":"text/vnd.in3d.3dml"}, +"3ds": {"type":"image/x-3ds"}, +"3g2": {"type":"video/3gpp2"}, +"3gp": {"type":"video/quicktime","icon":"quicktime","string":"video","groups":["video"]}, +"7z": {"type":"application/x-7z-compressed","icon":"archive"}, +"a": {"type":"application/octet-stream"}, +"aab": {"type":"application/x-authorware-bin"}, +"aac": {"type":"audio/aac","icon":"audio","string":"audio","groups":["audio"]}, +"aam": {"type":"application/x-authorware-map"}, +"aas": {"type":"application/x-authorware-seg"}, +"abc": {"type":"text/vnd.abc"}, +"abw": {"type":"application/x-abiword"}, +"ac": {"type":"application/pkix-attr-cert"}, +"acc": {"type":"application/vnd.americandynamics.acc"}, +"accdb": {"type":"application/msaccess","icon":"database"}, +"ace": {"type":"application/x-ace-compressed","icon":"archive"}, +"acgi": {"type":"text/html"}, +"acu": {"type":"application/vnd.acucobol"}, +"acutc": {"type":"application/vnd.acucorp"}, +"adp": {"type":"audio/adpcm"}, +"aep": {"type":"application/vnd.audiograph"}, +"afl": {"type":"video/animaflex"}, +"afm": {"type":"application/x-font-type1"}, +"afp": {"type":"application/vnd.ibm.modcap"}, +"ahead": {"type":"application/vnd.ahead.space"}, +"ai": {"type":"application/postscript","icon":"eps","string":"image","groups":["image"]}, +"aif": {"type":"audio/x-aiff","icon":"audio","string":"audio","groups":["audio"]}, +"aifc": {"type":"audio/x-aiff","icon":"audio","string":"audio","groups":["audio"]}, +"aiff": {"type":"audio/x-aiff","icon":"audio","string":"audio","groups":["audio"]}, +"aim": {"type":"application/x-aim"}, +"aip": {"type":"text/x-audiosoft-intra"}, +"air": {"type":"application/vnd.adobe.air-application-installer-package+zip"}, +"ait": {"type":"application/vnd.dvb.ait"}, +"ami": {"type":"application/vnd.amiga.ami"}, +"amr": {"type":"audio/amr","icon":"audio","string":"audio","groups":["audio"]}, +"ani": {"type":"application/x-navi-animation"}, +"aos": {"type":"application/x-nokia-9000-communicator-add-on-software"}, +"apk": {"type":"application/vnd.android.package-archive"}, +"appcache": {"type":"text/cache-manifest"}, +"applescript": {"type":"text/plain","icon":"text"}, +"application": {"type":"application/x-ms-application"}, +"apr": {"type":"application/vnd.lotus-approach"}, +"aps": {"type":"application/mime"}, +"arc": {"type":"application/x-freearc"}, +"arj": {"type":"application/arj"}, +"art": {"type":"image/x-jg"}, +"asa": {"type":"text/plain"}, +"asax": {"type":"application/octet-stream"}, +"asc": {"type":"text/plain","icon":"sourcecode"}, +"ascx": {"type":"text/plain"}, +"asf": {"type":"video/x-ms-asf","icon":"wmv","string":"video","groups":["video"]}, +"ashx": {"type":"text/plain"}, +"asm": {"type":"text/plain","icon":"sourcecode"}, +"asmx": {"type":"text/plain"}, +"aso": {"type":"application/vnd.accpac.simply.aso"}, +"asp": {"type":"text/plain"}, +"aspx": {"type":"text/plain"}, +"asx": {"type":"video/x-ms-asf"}, +"atc": {"type":"application/vnd.acucorp"}, +"atom": {"type":"application/atom+xml","icon":"markup"}, +"atomcat": {"type":"application/atomcat+xml","icon":"markup"}, +"atomsvc": {"type":"application/atomsvc+xml","icon":"markup"}, +"atx": {"type":"application/vnd.antix.game-component"}, +"au": {"type":"audio/au","icon":"audio","string":"audio","groups":["audio"]}, +"avi": {"type":"video/x-ms-wm","icon":"avi","string":"video","groups":["video","web_video"]}, +"avs": {"type":"video/avs-video"}, +"aw": {"type":"application/applixware"}, +"axd": {"type":"text/plain"}, +"azf": {"type":"application/vnd.airzip.filesecure.azf","icon":"archive"}, +"azs": {"type":"application/vnd.airzip.filesecure.azs","icon":"archive"}, +"azw": {"type":"application/vnd.amazon.ebook"}, +"bat": {"type":"application/x-msdownload"}, +"bcpio": {"type":"application/x-bcpio"}, +"bdf": {"type":"application/x-font-bdf"}, +"bdm": {"type":"application/vnd.syncml.dm+wbxml"}, +"bed": {"type":"application/vnd.realvnc.bed"}, +"bh2": {"type":"application/vnd.fujitsu.oasysprs"}, +"bin": {"type":"application/octet-stream"}, +"blb": {"type":"application/x-blorb"}, +"blorb": {"type":"application/x-blorb"}, +"bm": {"type":"image/bmp","icon":"bmp","string":"image","groups":["image","web_image"]}, +"bmi": {"type":"application/vnd.bmi"}, +"bmp": {"type":"image/bmp","icon":"bmp","string":"image","groups":["image","web_image"]}, +"boo": {"type":"application/book"}, +"book": {"type":"application/vnd.framemaker"}, +"box": {"type":"application/vnd.previewsystems.box"}, +"boz": {"type":"application/x-bzip2","icon":"archive"}, +"bpk": {"type":"application/octet-stream"}, +"bsh": {"type":"application/x-bsh"}, +"btif": {"type":"image/prs.btif"}, +"bz": {"type":"application/x-bzip","icon":"archive"}, +"bz2": {"type":"application/x-bzip2","icon":"archive"}, +"c": {"type":"text/plain","icon":"sourcecode"}, +"c++": {"type":"text/plain"}, +"c11amc": {"type":"application/vnd.cluetrust.cartomobile-config"}, +"c11amz": {"type":"application/vnd.cluetrust.cartomobile-config-pkg"}, +"c4d": {"type":"application/vnd.clonk.c4group"}, +"c4f": {"type":"application/vnd.clonk.c4group"}, +"c4g": {"type":"application/vnd.clonk.c4group"}, +"c4p": {"type":"application/vnd.clonk.c4group"}, +"c4u": {"type":"application/vnd.clonk.c4group"}, +"cab": {"type":"application/vnd.ms-cab-compressed","icon":"archive"}, +"caf": {"type":"audio/x-caf"}, +"cap": {"type":"application/vnd.tcpdump.pcap"}, +"car": {"type":"application/vnd.curl.car"}, +"cat": {"type":"application/vnd.ms-pki.seccat"}, +"cb7": {"type":"application/x-cbr"}, +"cba": {"type":"application/x-cbr"}, +"cbr": {"type":"application/x-cbr"}, +"cbt": {"type":"application/x-cbr"}, +"cbz": {"type":"application/x-cbr"}, +"cc": {"type":"text/x-c"}, +"ccad": {"type":"application/clariscad"}, +"cco": {"type":"application/x-cocoa"}, +"cct": {"type":"shockwave/director","icon":"flash"}, +"ccxml": {"type":"application/ccxml+xml"}, +"cdbcmsg": {"type":"application/vnd.contact.cmsg"}, +"cdf": {"type":"application/x-netcdf"}, +"cdkey": {"type":"application/vnd.mediastation.cdkey"}, +"cdmia": {"type":"application/cdmi-capability"}, +"cdmic": {"type":"application/cdmi-container"}, +"cdmid": {"type":"application/cdmi-domain"}, +"cdmio": {"type":"application/cdmi-object"}, +"cdmiq": {"type":"application/cdmi-queue"}, +"cdx": {"type":"chemical/x-cdx"}, +"cdxml": {"type":"application/vnd.chemdraw+xml"}, +"cdy": {"type":"application/vnd.cinderella"}, +"cer": {"type":"application/pkix-cert"}, +"cfc": {"type":"application/x-coldfusion"}, +"cfm": {"type":"application/x-coldfusion"}, +"cfs": {"type":"application/x-cfs-compressed"}, +"cgm": {"type":"image/cgm"}, +"cha": {"type":"application/x-chat"}, +"chat": {"type":"application/x-chat"}, +"chm": {"type":"application/vnd.ms-htmlhelp"}, +"chrt": {"type":"application/vnd.kde.kchart","icon":"chart"}, +"cif": {"type":"chemical/x-cif"}, +"cii": {"type":"application/vnd.anser-web-certificate-issue-initiation"}, +"cil": {"type":"application/vnd.ms-artgalry"}, +"cla": {"type":"application/vnd.claymore"}, +"class": {"type":"application/java-vm"}, +"clkk": {"type":"application/vnd.crick.clicker.keyboard"}, +"clkp": {"type":"application/vnd.crick.clicker.palette"}, +"clkt": {"type":"application/vnd.crick.clicker.template"}, +"clkw": {"type":"application/vnd.crick.clicker.wordbank"}, +"clkx": {"type":"application/vnd.crick.clicker"}, +"clp": {"type":"application/x-msclip"}, +"cmc": {"type":"application/vnd.cosmocaller"}, +"cmdf": {"type":"chemical/x-cmdf"}, +"cml": {"type":"chemical/x-cml"}, +"cmp": {"type":"application/vnd.yellowriver-custom-menu"}, +"cmx": {"type":"image/x-cmx"}, +"cod": {"type":"application/vnd.rim.cod"}, +"com": {"type":"application/x-msdownload"}, +"conf": {"type":"text/plain"}, +"cpio": {"type":"application/x-cpio"}, +"cpp": {"type":"text/plain","icon":"sourcecode"}, +"cpt": {"type":"application/mac-compactpro"}, +"crd": {"type":"application/x-mscardfile"}, +"crl": {"type":"application/pkix-crl"}, +"crt": {"type":"application/x-x509-ca-cert"}, +"crx": {"type":"application/octet-stream"}, +"cryptonote": {"type":"application/vnd.rig.cryptonote"}, +"cs": {"type":"application/x-csh","icon":"sourcecode"}, +"csh": {"type":"application/x-csh"}, +"csml": {"type":"chemical/x-csml"}, +"csp": {"type":"application/vnd.commonspace"}, +"csr": {"type":"application/pkcs10"}, +"css": {"type":"text/css","icon":"text","groups":["web_file"]}, +"cst": {"type":"application/x-director"}, +"csv": {"type":"text/csv","icon":"spreadsheet","groups":["spreadsheet"]}, +"cu": {"type":"application/cu-seeme"}, +"curl": {"type":"text/vnd.curl"}, +"cww": {"type":"application/prs.cww"}, +"cxt": {"type":"application/x-director"}, +"cxx": {"type":"text/x-c"}, +"dae": {"type":"model/vnd.collada+xml"}, +"daf": {"type":"application/vnd.mobius.daf"}, +"dart": {"type":"application/vnd.dart"}, +"dataless": {"type":"application/vnd.fdsn.seed"}, +"davmount": {"type":"application/davmount+xml"}, +"dbk": {"type":"application/docbook+xml"}, +"dcr": {"type":"application/x-director","icon":"flash"}, +"dcurl": {"type":"text/vnd.curl.dcurl"}, +"dd2": {"type":"application/vnd.oma.dd2+xml"}, +"ddd": {"type":"application/vnd.fujixerox.ddd"}, +"deb": {"type":"application/x-debian-package"}, +"deepv": {"type":"application/x-deepv"}, +"def": {"type":"text/plain"}, +"deploy": {"type":"application/octet-stream"}, +"der": {"type":"application/x-x509-ca-cert"}, +"dfac": {"type":"application/vnd.dreamfactory"}, +"dgc": {"type":"application/x-dgc-compressed"}, +"dic": {"type":"text/x-c"}, +"dif": {"type":"video/x-dv","icon":"quicktime","string":"video","groups":["video"]}, +"dir": {"type":"application/x-director","icon":"flash"}, +"dis": {"type":"application/vnd.mobius.dis"}, +"dist": {"type":"application/octet-stream"}, +"distz": {"type":"application/octet-stream"}, +"djv": {"type":"image/vnd.djvu"}, +"djvu": {"type":"image/vnd.djvu"}, +"dl": {"type":"video/dl"}, +"dll": {"type":"application/x-msdownload"}, +"dmg": {"type":"application/octet-stream","icon":"unknown"}, +"dmp": {"type":"application/vnd.tcpdump.pcap"}, +"dms": {"type":"application/octet-stream"}, +"dna": {"type":"application/vnd.dna"}, +"doc": {"type":"application/msword","icon":"document","groups":["document"]}, +"docm": {"type":"application/vnd.ms-word.document.macroenabled.12","icon":"document"}, +"docx": {"type":"application/vnd.openxmlformats-officedocument.wordprocessingml.document","icon":"document","groups":["document"]}, +"dot": {"type":"application/msword"}, +"dotm": {"type":"application/vnd.ms-word.template.macroenabled.12","icon":"document"}, +"dotx": {"type":"application/vnd.openxmlformats-officedocument.wordprocessingml.template","icon":"document"}, +"dp": {"type":"application/vnd.osgi.dp"}, +"dpg": {"type":"application/vnd.dpgraph"}, +"dra": {"type":"audio/vnd.dra"}, +"drw": {"type":"application/drafting"}, +"dsc": {"type":"text/prs.lines.tag"}, +"dssc": {"type":"application/dssc+der"}, +"dtb": {"type":"application/x-dtbook+xml"}, +"dtd": {"type":"application/xml-dtd"}, +"dts": {"type":"audio/vnd.dts"}, +"dtshd": {"type":"audio/vnd.dts.hd"}, +"dump": {"type":"application/octet-stream"}, +"dv": {"type":"video/x-dv","icon":"quicktime","string":"video","groups":["video"]}, +"dvb": {"type":"video/vnd.dvb.file"}, +"dvi": {"type":"application/x-dvi"}, +"dwf": {"type":"model/vnd.dwf"}, +"dwg": {"type":"image/vnd.dwg"}, +"dxf": {"type":"image/vnd.dxf"}, +"dxp": {"type":"application/vnd.spotfire.dxp"}, +"dxr": {"type":"application/x-director","icon":"flash"}, +"ecelp4800": {"type":"audio/vnd.nuera.ecelp4800"}, +"ecelp7470": {"type":"audio/vnd.nuera.ecelp7470"}, +"ecelp9600": {"type":"audio/vnd.nuera.ecelp9600"}, +"ecma": {"type":"application/ecmascript"}, +"edm": {"type":"application/vnd.novadigm.edm"}, +"edx": {"type":"application/vnd.novadigm.edx"}, +"efif": {"type":"application/vnd.picsel"}, +"ei6": {"type":"application/vnd.pg.osasli"}, +"el": {"type":"text/x-script.elisp"}, +"elc": {"type":"application/octet-stream"}, +"emf": {"type":"application/x-msmetafile"}, +"eml": {"type":"message/rfc822"}, +"emma": {"type":"application/emma+xml"}, +"emz": {"type":"application/x-msmetafile"}, +"env": {"type":"application/x-envoy"}, +"eol": {"type":"audio/vnd.digital-winds"}, +"eot": {"type":"application/vnd.ms-fontobject"}, +"eps": {"type":"application/postscript","icon":"eps"}, +"epub": {"type":"application/epub+zip","icon":"epub","groups":["document"]}, +"es": {"type":"application/x-esrehber"}, +"es3": {"type":"application/vnd.eszigno3+xml"}, +"esa": {"type":"application/vnd.osgi.subsystem"}, +"esf": {"type":"application/vnd.epson.esf"}, +"et3": {"type":"application/vnd.eszigno3+xml"}, +"etx": {"type":"text/x-setext"}, +"eva": {"type":"application/x-eva"}, +"evy": {"type":"application/x-envoy"}, +"exe": {"type":"application/x-msdownload"}, +"exi": {"type":"application/exi"}, +"ext": {"type":"application/vnd.novadigm.ext"}, +"ez": {"type":"application/andrew-inset"}, +"ez2": {"type":"application/vnd.ezpix-album"}, +"ez3": {"type":"application/vnd.ezpix-package"}, +"f": {"type":"text/x-fortran"}, +"f4v": {"type":"video/mp4","icon":"flash","string":"video","groups":["video","web_video"]}, +"f77": {"type":"text/x-fortran"}, +"f90": {"type":"text/x-fortran"}, +"fbs": {"type":"image/vnd.fastbidsheet"}, +"fcdt": {"type":"application/vnd.adobe.formscentral.fcdt"}, +"fcs": {"type":"application/vnd.isac.fcs"}, +"fdf": {"type":"application/pdf","icon":"pdf"}, +"fdk": {"type":"application/octet-stream"}, +"fe_launch": {"type":"application/vnd.denovo.fcselayout-link"}, +"fg5": {"type":"application/vnd.fujitsu.oasysgp"}, +"fgd": {"type":"application/x-director"}, +"fh": {"type":"image/x-freehand"}, +"fh4": {"type":"image/x-freehand"}, +"fh5": {"type":"image/x-freehand"}, +"fh7": {"type":"image/x-freehand"}, +"fhc": {"type":"image/x-freehand"}, +"fif": {"type":"application/fractals"}, +"fig": {"type":"application/x-xfig"}, +"flac": {"type":"audio/x-flac","icon":"audio","string":"audio","groups":["audio","web_audio"]}, +"fli": {"type":"video/x-fli"}, +"flo": {"type":"application/vnd.micrografx.flo"}, +"flv": {"type":"video/x-flv","icon":"flash","string":"video","groups":["video","web_video"]}, +"flw": {"type":"application/vnd.kde.kivio"}, +"flx": {"type":"text/vnd.fmi.flexstor"}, +"fly": {"type":"text/vnd.fly"}, +"fm": {"type":"application/vnd.framemaker"}, +"fmf": {"type":"video/x-atomic3d-feature"}, +"fnc": {"type":"application/vnd.frogans.fnc"}, +"for": {"type":"text/x-fortran"}, +"fpx": {"type":"image/vnd.fpx"}, +"frame": {"type":"application/vnd.framemaker"}, +"frl": {"type":"application/freeloader"}, +"fsc": {"type":"application/vnd.fsc.weblaunch"}, +"fst": {"type":"image/vnd.fst"}, +"ftc": {"type":"application/vnd.fluxtime.clip"}, +"fti": {"type":"application/vnd.anser-web-funds-transfer-initiation"}, +"funk": {"type":"audio/make"}, +"fvt": {"type":"video/vnd.fvt"}, +"fxp": {"type":"application/vnd.adobe.fxp"}, +"fxpl": {"type":"application/vnd.adobe.fxp"}, +"fzs": {"type":"application/vnd.fuzzysheet"}, +"g": {"type":"text/plain"}, +"g2w": {"type":"application/vnd.geoplan"}, +"g3": {"type":"image/g3fax"}, +"g3w": {"type":"application/vnd.geospace"}, +"gac": {"type":"application/vnd.groove-account"}, +"gam": {"type":"application/x-tads"}, +"gbr": {"type":"application/rpki-ghostbusters"}, +"gca": {"type":"application/x-gca-compressed"}, +"gdl": {"type":"model/vnd.gdl"}, +"gdoc": {"type":"application/vnd.google-apps.document","icon":"document","groups":["document"]}, +"gdraw": {"type":"application/vnd.google-apps.drawing","icon":"draw"}, +"geo": {"type":"application/vnd.dynageo"}, +"gex": {"type":"application/vnd.geometry-explorer"}, +"ggb": {"type":"application/vnd.geogebra.file","icon":"archive"}, +"ggt": {"type":"application/vnd.geogebra.tool","icon":"archive"}, +"ghf": {"type":"application/vnd.groove-help"}, +"gif": {"type":"image/gif","icon":"gif","string":"image","groups":["image","web_image"]}, +"gim": {"type":"application/vnd.groove-identity-message"}, +"gl": {"type":"video/gl"}, +"gml": {"type":"application/gml+xml"}, +"gmx": {"type":"application/vnd.gmx"}, +"gnumeric": {"type":"application/x-gnumeric","icon":"calc"}, +"gph": {"type":"application/vnd.flographit"}, +"gpx": {"type":"application/gpx+xml"}, +"gqf": {"type":"application/vnd.grafeq"}, +"gqs": {"type":"application/vnd.grafeq"}, +"gram": {"type":"application/srgs"}, +"gramps": {"type":"application/x-gramps-xml"}, +"gre": {"type":"application/vnd.geometry-explorer"}, +"grv": {"type":"application/vnd.groove-injector"}, +"grxml": {"type":"application/srgs+xml"}, +"gsd": {"type":"audio/x-gsm"}, +"gsf": {"type":"application/x-font-ghostscript"}, +"gsheet": {"type":"application/vnd.google-apps.spreadsheet","icon":"spreadsheet","groups":["spreadsheet"]}, +"gslides": {"type":"application/vnd.google-apps.presentation","icon":"powerpoint","groups":["presentation"]}, +"gsm": {"type":"audio/x-gsm"}, +"gsp": {"type":"application/x-gsp"}, +"gss": {"type":"application/x-gss"}, +"gtar": {"type":"application/x-gtar","icon":"archive","string":"archive","groups":["archive"]}, +"gtm": {"type":"application/vnd.groove-tool-message"}, +"gtw": {"type":"model/vnd.gtw"}, +"gv": {"type":"text/vnd.graphviz"}, +"gxf": {"type":"application/gxf"}, +"gxt": {"type":"application/vnd.geonext"}, +"gz": {"type":"application/g-zip","icon":"archive","string":"archive","groups":["archive"]}, +"gzip": {"type":"application/g-zip","icon":"archive","string":"archive","groups":["archive"]}, +"h": {"type":"text/plain","icon":"sourcecode"}, +"h261": {"type":"video/h261"}, +"h263": {"type":"video/h263"}, +"h264": {"type":"video/h264"}, +"hal": {"type":"application/vnd.hal+xml"}, +"hbci": {"type":"application/vnd.hbci"}, +"hdf": {"type":"application/x-hdf"}, +"help": {"type":"application/x-helpfile"}, +"hgl": {"type":"application/vnd.hp-hpgl"}, +"hh": {"type":"text/x-c"}, +"hlb": {"type":"text/x-script"}, +"hlp": {"type":"application/winhlp"}, +"hpg": {"type":"application/vnd.hp-hpgl"}, +"hpgl": {"type":"application/vnd.hp-hpgl"}, +"hpid": {"type":"application/vnd.hp-hpid"}, +"hpp": {"type":"text/plain","icon":"sourcecode"}, +"hps": {"type":"application/vnd.hp-hps"}, +"hqx": {"type":"application/mac-binhex40","icon":"archive","string":"archive","groups":["archive"]}, +"hta": {"type":"application/octet-stream"}, +"htc": {"type":"text/x-component","icon":"markup"}, +"htke": {"type":"application/vnd.kenameaapp"}, +"htm": {"type":"text/html","icon":"html","groups":["web_file"]}, +"html": {"type":"text/html","icon":"html","groups":["web_file"]}, +"htmls": {"type":"text/html"}, +"htt": {"type":"text/webviewhtml"}, +"htx": {"type":"text/html"}, +"hvd": {"type":"application/vnd.yamaha.hv-dic"}, +"hvp": {"type":"application/vnd.yamaha.hv-voice"}, +"hvs": {"type":"application/vnd.yamaha.hv-script"}, +"i2g": {"type":"application/vnd.intergeo"}, +"ibooks": {"type":"application/x-ibooks+zip","icon":"archive"}, +"icc": {"type":"application/vnd.iccprofile"}, +"ice": {"type":"x-conference/x-cooltalk"}, +"icm": {"type":"application/vnd.iccprofile"}, +"ico": {"type":"image/vnd.microsoft.icon","icon":"image","string":"image","groups":["image"]}, +"ics": {"type":"text/calendar","icon":"text"}, +"idc": {"type":"text/plain"}, +"ief": {"type":"image/ief"}, +"iefs": {"type":"image/ief"}, +"ifb": {"type":"text/calendar"}, +"ifm": {"type":"application/vnd.shana.informed.formdata"}, +"iges": {"type":"model/iges"}, +"igl": {"type":"application/vnd.igloader"}, +"igm": {"type":"application/vnd.insors.igm"}, +"igs": {"type":"model/iges"}, +"igx": {"type":"application/vnd.micrografx.igx"}, +"iif": {"type":"application/vnd.shana.informed.interchange"}, +"ima": {"type":"application/x-ima"}, +"imap": {"type":"application/x-httpd-imap"}, +"imp": {"type":"application/vnd.accpac.simply.imp"}, +"ims": {"type":"application/vnd.ms-ims"}, +"in": {"type":"text/plain"}, +"inf": {"type":"application/inf"}, +"ini": {"type":"text/plain"}, +"ink": {"type":"application/inkml+xml"}, +"inkml": {"type":"application/inkml+xml"}, +"ins": {"type":"application/x-internett-signup"}, +"install": {"type":"application/x-install-instructions"}, +"iota": {"type":"application/vnd.astraea-software.iota"}, +"ip": {"type":"application/x-ip2"}, +"ipa": {"type":"application/octet-stream"}, +"ipfix": {"type":"application/ipfix"}, +"ipk": {"type":"application/vnd.shana.informed.package"}, +"irm": {"type":"application/vnd.ibm.rights-management"}, +"irp": {"type":"application/vnd.irepository.package+xml"}, +"isf": {"type":"application/inspiration","icon":"isf"}, +"iso": {"type":"application/x-iso9660-image"}, +"ist": {"type":"application/inspiration.template","icon":"isf"}, +"isu": {"type":"video/x-isvideo"}, +"it": {"type":"audio/it"}, +"itp": {"type":"application/vnd.shana.informed.formtemplate"}, +"iv": {"type":"application/x-inventor"}, +"ivp": {"type":"application/vnd.immervision-ivp"}, +"ivr": {"type":"i-world/i-vrml"}, +"ivu": {"type":"application/vnd.immervision-ivu"}, +"ivy": {"type":"application/x-livescreen"}, +"jad": {"type":"text/vnd.sun.j2me.app-descriptor"}, +"jam": {"type":"application/vnd.jam"}, +"jar": {"type":"application/java-archive"}, +"jav": {"type":"text/plain"}, +"java": {"type":"text/plain","icon":"sourcecode"}, +"jcb": {"type":"text/xml","icon":"markup"}, +"jcl": {"type":"text/xml","icon":"markup"}, +"jcm": {"type":"application/x-java-commerce"}, +"jcw": {"type":"text/xml","icon":"markup"}, +"jfif": {"type":"image/jpeg"}, +"jfif-tbnl": {"type":"image/jpeg"}, +"jisp": {"type":"application/vnd.jisp"}, +"jlt": {"type":"application/vnd.hp-jlyt"}, +"jmt": {"type":"text/xml","icon":"markup"}, +"jmx": {"type":"text/xml","icon":"markup"}, +"jnlp": {"type":"application/x-java-jnlp-file"}, +"joda": {"type":"application/vnd.joost.joda-archive"}, +"jpe": {"type":"image/jpeg","icon":"jpeg","string":"image","groups":["image","web_image"]}, +"jpeg": {"type":"image/jpeg","icon":"jpeg","string":"image","groups":["image","web_image"]}, +"jpg": {"type":"image/jpeg","icon":"jpeg","string":"image","groups":["image","web_image"]}, +"jpgm": {"type":"video/jpm"}, +"jpgv": {"type":"video/jpeg"}, +"jpm": {"type":"video/jpm"}, +"jps": {"type":"image/x-jps"}, +"jqz": {"type":"text/xml","icon":"markup"}, +"js": {"type":"application/x-javascript","icon":"text","groups":["web_file"]}, +"json": {"type":"application/json"}, +"jsonml": {"type":"application/jsonml+json"}, +"jut": {"type":"image/jutvision"}, +"kar": {"type":"audio/midi"}, +"karbon": {"type":"application/vnd.kde.karbon"}, +"key": {"type":"application/pkcs8"}, +"kfo": {"type":"application/vnd.kde.kformula"}, +"kia": {"type":"application/vnd.kidspiration"}, +"kml": {"type":"application/vnd.google-earth.kml+xml"}, +"kmz": {"type":"application/vnd.google-earth.kmz"}, +"kne": {"type":"application/vnd.kinar"}, +"knp": {"type":"application/vnd.kinar"}, +"kon": {"type":"application/vnd.kde.kontour"}, +"kpr": {"type":"application/vnd.kde.kpresenter"}, +"kpt": {"type":"application/vnd.kde.kpresenter"}, +"kpxx": {"type":"application/vnd.ds-keypoint"}, +"ksh": {"type":"application/x-ksh"}, +"ksp": {"type":"application/vnd.kde.kspread"}, +"ktr": {"type":"application/vnd.kahootz"}, +"ktx": {"type":"image/ktx"}, +"ktz": {"type":"application/vnd.kahootz"}, +"kwd": {"type":"application/vnd.kde.kword"}, +"kwt": {"type":"application/vnd.kde.kword"}, +"la": {"type":"audio/nspaudio"}, +"lam": {"type":"audio/x-liveaudio"}, +"lasxml": {"type":"application/vnd.las.las+xml"}, +"latex": {"type":"application/x-latex","icon":"text"}, +"lbd": {"type":"application/vnd.llamagraphics.life-balance.desktop"}, +"lbe": {"type":"application/vnd.llamagraphics.life-balance.exchange+xml"}, +"les": {"type":"application/vnd.hhe.lesson-player"}, +"lha": {"type":"application/x-lzh-compressed"}, +"lhx": {"type":"application/octet-stream"}, +"link66": {"type":"application/vnd.route66.link66+xml"}, +"list": {"type":"text/plain"}, +"list3820": {"type":"application/vnd.ibm.modcap"}, +"listafp": {"type":"application/vnd.ibm.modcap"}, +"lma": {"type":"audio/nspaudio"}, +"lnk": {"type":"application/x-ms-shortcut"}, +"log": {"type":"text/plain"}, +"lostxml": {"type":"application/lost+xml"}, +"lrf": {"type":"application/octet-stream"}, +"lrm": {"type":"application/vnd.ms-lrm"}, +"lsp": {"type":"application/x-lisp"}, +"lst": {"type":"text/plain"}, +"lsx": {"type":"text/x-la-asf"}, +"ltf": {"type":"application/vnd.frogans.ltf"}, +"ltx": {"type":"application/x-latex"}, +"lvp": {"type":"audio/vnd.lucent.voice"}, +"lwp": {"type":"application/vnd.lotus-wordpro"}, +"lz": {"type":"application/x-lzip","icon":"archive"}, +"lzh": {"type":"application/x-lzh-compressed"}, +"lzma": {"type":"application/x-lzma"}, +"lzo": {"type":"application/x-lzop"}, +"lzx": {"type":"application/lzx"}, +"m": {"type":"text/plain","icon":"sourcecode"}, +"m13": {"type":"application/x-msmediaview"}, +"m14": {"type":"application/x-msmediaview"}, +"m1v": {"type":"video/mpeg"}, +"m21": {"type":"application/mp21"}, +"m2a": {"type":"audio/mpeg"}, +"m2v": {"type":"video/mpeg"}, +"m3a": {"type":"audio/mpeg"}, +"m3u": {"type":"audio/x-mpegurl","icon":"mp3","string":"audio","groups":["audio"]}, +"m3u8": {"type":"application/vnd.apple.mpegurl"}, +"m4a": {"type":"audio/mp4","icon":"audio","string":"audio","groups":["audio","web_audio"]}, +"m4u": {"type":"video/vnd.mpegurl"}, +"m4v": {"type":"video/mp4","icon":"mpeg","string":"video","groups":["video","web_video"]}, +"ma": {"type":"application/mathematica","string":"math"}, +"mads": {"type":"application/mads+xml"}, +"mag": {"type":"application/vnd.ecowin.chart"}, +"maker": {"type":"application/vnd.framemaker"}, +"man": {"type":"text/troff"}, +"map": {"type":"application/x-navimap"}, +"mar": {"type":"application/octet-stream"}, +"mathml": {"type":"application/mathml+xml","string":"math"}, +"mb": {"type":"application/mathematica","string":"math"}, +"mbd": {"type":"application/mbedlet"}, +"mbk": {"type":"application/vnd.mobius.mbk"}, +"mbox": {"type":"application/mbox"}, +"mbz": {"type":"application/vnd.moodle.backup","icon":"moodle"}, +"mc$": {"type":"application/x-magic-cap-package-1.0"}, +"mc1": {"type":"application/vnd.medcalcdata"}, +"mcd": {"type":"application/vnd.mcd"}, +"mcf": {"type":"image/vasa"}, +"mcp": {"type":"application/netmc"}, +"mcurl": {"type":"text/vnd.curl.mcurl"}, +"mdb": {"type":"application/x-msaccess","icon":"database"}, +"mdi": {"type":"image/vnd.ms-modi"}, +"me": {"type":"text/troff"}, +"mesh": {"type":"model/mesh"}, +"meta4": {"type":"application/metalink4+xml"}, +"metalink": {"type":"application/metalink+xml"}, +"mets": {"type":"application/mets+xml"}, +"mfm": {"type":"application/vnd.mfmp"}, +"mft": {"type":"application/rpki-manifest"}, +"mgp": {"type":"application/vnd.osgeo.mapguide.package"}, +"mgz": {"type":"application/vnd.proteus.magazine"}, +"mht": {"type":"message/rfc822"}, +"mhtml": {"type":"message/rfc822"}, +"mid": {"type":"audio/midi"}, +"midi": {"type":"audio/midi"}, +"mie": {"type":"application/x-mie"}, +"mif": {"type":"application/vnd.mif"}, +"mime": {"type":"message/rfc822"}, +"mj2": {"type":"video/mj2"}, +"mjf": {"type":"audio/x-vnd.audioexplosion.mjuicemediafile"}, +"mjp2": {"type":"video/mj2"}, +"mjpg": {"type":"video/x-motion-jpeg"}, +"mk3d": {"type":"video/x-matroska"}, +"mka": {"type":"audio/x-matroska"}, +"mks": {"type":"video/x-matroska"}, +"mkv": {"type":"video/x-matroska"}, +"mlp": {"type":"application/vnd.dolby.mlp"}, +"mm": {"type":"application/base64"}, +"mmd": {"type":"application/vnd.chipnuts.karaoke-mmd"}, +"mme": {"type":"application/base64"}, +"mmf": {"type":"application/vnd.smaf"}, +"mmr": {"type":"image/vnd.fujixerox.edmics-mmr"}, +"mng": {"type":"video/x-mng"}, +"mny": {"type":"application/x-msmoney"}, +"mobi": {"type":"application/x-mobipocket-ebook"}, +"mod": {"type":"audio/mod"}, +"mods": {"type":"application/mods+xml"}, +"moov": {"type":"video/quicktime"}, +"mov": {"type":"video/quicktime","icon":"quicktime","string":"video","groups":["video","web_video"]}, +"movie": {"type":"video/x-sgi-movie","icon":"quicktime","string":"video","groups":["video"]}, +"mp2": {"type":"audio/mpeg"}, +"mp21": {"type":"application/mp21"}, +"mp2a": {"type":"audio/mpeg"}, +"mp3": {"type":"audio/mp3","icon":"mp3","string":"audio","groups":["audio","web_audio"]}, +"mp4": {"type":"video/mp4","icon":"mpeg","string":"video","groups":["video","web_video"]}, +"mp4a": {"type":"audio/mp4","icon":"audio","string":"audio","groups":["audio","web_audio"]}, +"mp4s": {"type":"application/mp4"}, +"mp4v": {"type":"video/mp4","icon":"mpeg","string":"video","groups":["video","web_video"]}, +"mpa": {"type":"audio/mpeg"}, +"mpc": {"type":"application/vnd.mophun.certificate"}, +"mpe": {"type":"video/mpeg","icon":"mpeg","string":"video","groups":["video","web_video"]}, +"mpeg": {"type":"video/mpeg","icon":"mpeg","string":"video","groups":["video","web_video"]}, +"mpg": {"type":"video/mpeg","icon":"mpeg","string":"video","groups":["video","web_video"]}, +"mpg4": {"type":"video/mp4"}, +"mpga": {"type":"audio/mpeg"}, +"mpkg": {"type":"application/vnd.apple.installer+xml"}, +"mpm": {"type":"application/vnd.blueice.multipass"}, +"mpn": {"type":"application/vnd.mophun.application"}, +"mpp": {"type":"application/vnd.ms-project"}, +"mpt": {"type":"application/vnd.ms-project"}, +"mpv": {"type":"application/x-project"}, +"mpx": {"type":"application/x-project"}, +"mpy": {"type":"application/vnd.ibm.minipay"}, +"mqy": {"type":"application/vnd.mobius.mqy"}, +"mrc": {"type":"application/marc"}, +"mrcx": {"type":"application/marcxml+xml"}, +"ms": {"type":"text/troff"}, +"mscml": {"type":"application/mediaservercontrol+xml"}, +"mseed": {"type":"application/vnd.fdsn.mseed"}, +"mseq": {"type":"application/vnd.mseq"}, +"msf": {"type":"application/vnd.epson.msf"}, +"msh": {"type":"model/mesh"}, +"msi": {"type":"application/x-msdownload"}, +"msl": {"type":"application/vnd.mobius.msl"}, +"msty": {"type":"application/vnd.muvee.style"}, +"mts": {"type":"model/vnd.mts"}, +"mus": {"type":"application/vnd.musician"}, +"musicxml": {"type":"application/vnd.recordare.musicxml+xml"}, +"mv": {"type":"video/x-sgi-movie"}, +"mvb": {"type":"application/x-msmediaview"}, +"mwf": {"type":"application/vnd.mfer"}, +"mxf": {"type":"application/mxf"}, +"mxl": {"type":"application/vnd.recordare.musicxml"}, +"mxml": {"type":"application/xv+xml"}, +"mxs": {"type":"application/vnd.triscape.mxs"}, +"mxu": {"type":"video/vnd.mpegurl"}, +"my": {"type":"audio/make"}, +"mzz": {"type":"application/x-vnd.audioexplosion.mzz"}, +"n-gage": {"type":"application/vnd.nokia.n-gage.symbian.install"}, +"n3": {"type":"text/n3"}, +"nap": {"type":"image/naplps"}, +"naplps": {"type":"image/naplps"}, +"nb": {"type":"application/mathematica","string":"math"}, +"nbp": {"type":"application/vnd.wolfram.player"}, +"nc": {"type":"application/x-netcdf"}, +"ncm": {"type":"application/vnd.nokia.configuration-message"}, +"ncx": {"type":"application/x-dtbncx+xml"}, +"nfo": {"type":"text/x-nfo"}, +"ngdat": {"type":"application/vnd.nokia.n-gage.data"}, +"nif": {"type":"image/x-niff"}, +"niff": {"type":"image/x-niff"}, +"nitf": {"type":"application/vnd.nitf"}, +"nix": {"type":"application/x-mix-transfer"}, +"nlu": {"type":"application/vnd.neurolanguage.nlu"}, +"nml": {"type":"application/vnd.enliven"}, +"nnd": {"type":"application/vnd.noblenet-directory"}, +"nns": {"type":"application/vnd.noblenet-sealer"}, +"nnw": {"type":"application/vnd.noblenet-web"}, +"npx": {"type":"image/vnd.net-fpx"}, +"nsc": {"type":"application/x-conference"}, +"nsf": {"type":"application/vnd.lotus-notes"}, +"ntf": {"type":"application/vnd.nitf"}, +"nvd": {"type":"application/x-navidoc"}, +"nzb": {"type":"application/x-nzb"}, +"o": {"type":"application/octet-stream"}, +"oa2": {"type":"application/vnd.fujitsu.oasys2"}, +"oa3": {"type":"application/vnd.fujitsu.oasys3"}, +"oas": {"type":"application/vnd.fujitsu.oasys"}, +"obd": {"type":"application/x-msbinder"}, +"obj": {"type":"application/x-tgif"}, +"oda": {"type":"application/oda"}, +"odb": {"type":"application/vnd.oasis.opendocument.database","icon":"base"}, +"odc": {"type":"application/vnd.oasis.opendocument.chart","icon":"chart"}, +"odf": {"type":"application/vnd.oasis.opendocument.formula","icon":"math"}, +"odft": {"type":"application/vnd.oasis.opendocument.formula-template","icon":"math"}, +"odg": {"type":"application/vnd.oasis.opendocument.graphics","icon":"draw"}, +"odi": {"type":"application/vnd.oasis.opendocument.image","icon":"draw"}, +"odm": {"type":"application/vnd.oasis.opendocument.text-master","icon":"writer"}, +"odp": {"type":"application/vnd.oasis.opendocument.presentation","icon":"impress"}, +"ods": {"type":"application/vnd.oasis.opendocument.spreadsheet","icon":"calc","groups":["spreadsheet"]}, +"odt": {"type":"application/vnd.oasis.opendocument.text","icon":"writer","groups":["document"]}, +"oga": {"type":"audio/ogg","icon":"audio","string":"audio","groups":["audio","web_audio"]}, +"ogg": {"type":"audio/ogg","icon":"audio","string":"audio","groups":["audio","web_audio"]}, +"ogv": {"type":"video/ogg","icon":"video","string":"video","groups":["video","web_video"]}, +"ogx": {"type":"application/ogg"}, +"omc": {"type":"application/x-omc"}, +"omcd": {"type":"application/x-omcdatamaker"}, +"omcr": {"type":"application/x-omcregerator"}, +"omdoc": {"type":"application/omdoc+xml"}, +"onepkg": {"type":"application/onenote"}, +"onetmp": {"type":"application/onenote"}, +"onetoc": {"type":"application/onenote"}, +"onetoc2": {"type":"application/onenote"}, +"opf": {"type":"application/oebps-package+xml"}, +"opml": {"type":"text/x-opml"}, +"oprc": {"type":"application/vnd.palm"}, +"org": {"type":"application/vnd.lotus-organizer"}, +"osf": {"type":"application/vnd.yamaha.openscoreformat"}, +"osfpvg": {"type":"application/vnd.yamaha.openscoreformat.osfpvg+xml"}, +"otc": {"type":"application/vnd.oasis.opendocument.chart-template","icon":"chart"}, +"otf": {"type":"application/x-font-otf"}, +"otg": {"type":"application/vnd.oasis.opendocument.graphics-template","icon":"draw"}, +"oth": {"type":"application/vnd.oasis.opendocument.text-web","icon":"oth","groups":["document"]}, +"oti": {"type":"application/vnd.oasis.opendocument.image-template"}, +"otp": {"type":"application/vnd.oasis.opendocument.presentation-template","icon":"impress"}, +"ots": {"type":"application/vnd.oasis.opendocument.spreadsheet-template","icon":"calc","groups":["spreadsheet"]}, +"ott": {"type":"application/vnd.oasis.opendocument.text-template","icon":"writer","groups":["document"]}, +"oxps": {"type":"application/oxps"}, +"oxt": {"type":"application/vnd.openofficeorg.extension"}, +"p": {"type":"text/x-pascal"}, +"p10": {"type":"application/pkcs10"}, +"p12": {"type":"application/x-pkcs12"}, +"p7a": {"type":"application/x-pkcs7-signature"}, +"p7b": {"type":"application/x-pkcs7-certificates"}, +"p7c": {"type":"application/pkcs7-mime"}, +"p7m": {"type":"application/pkcs7-mime"}, +"p7r": {"type":"application/x-pkcs7-certreqresp"}, +"p7s": {"type":"application/pkcs7-signature"}, +"p8": {"type":"application/pkcs8"}, +"part": {"type":"application/pro_eng"}, +"pas": {"type":"text/x-pascal"}, +"paw": {"type":"application/vnd.pawaafile"}, +"pbd": {"type":"application/vnd.powerbuilder6"}, +"pbm": {"type":"image/x-portable-bitmap"}, +"pcap": {"type":"application/vnd.tcpdump.pcap"}, +"pcf": {"type":"application/x-font-pcf"}, +"pcl": {"type":"application/vnd.hp-pcl"}, +"pclxl": {"type":"application/vnd.hp-pclxl"}, +"pct": {"type":"image/pict","icon":"image","string":"image","groups":["image"]}, +"pcurl": {"type":"application/vnd.curl.pcurl"}, +"pcx": {"type":"image/x-pcx"}, +"pdb": {"type":"application/vnd.palm"}, +"pdf": {"type":"application/pdf","icon":"pdf"}, +"pem": {"type":"application/x-pem-file"}, +"pfa": {"type":"application/x-font-type1"}, +"pfb": {"type":"application/x-font-type1"}, +"pfm": {"type":"application/x-font-type1"}, +"pfr": {"type":"application/font-tdpfr"}, +"pfunk": {"type":"audio/make"}, +"pfx": {"type":"application/x-pkcs12"}, +"pgm": {"type":"image/x-portable-graymap"}, +"pgn": {"type":"application/x-chess-pgn"}, +"pgp": {"type":"application/pgp-encrypted"}, +"phar": {"type":"application/octet-stream"}, +"php": {"type":"text/plain","icon":"sourcecode"}, +"phps": {"type":"application/x-httpd-phps"}, +"pic": {"type":"image/pict","icon":"image","string":"image","groups":["image"]}, +"pict": {"type":"image/pict","icon":"image","string":"image","groups":["image"]}, +"pkg": {"type":"application/octet-stream"}, +"pki": {"type":"application/pkixcmp"}, +"pkipath": {"type":"application/pkix-pkipath"}, +"pko": {"type":"application/vnd.ms-pki.pko"}, +"pl": {"type":"text/plain"}, +"plb": {"type":"application/vnd.3gpp.pic-bw-large"}, +"plc": {"type":"application/vnd.mobius.plc"}, +"plf": {"type":"application/vnd.pocketlearn"}, +"plist": {"type":"application/x-plist"}, +"pls": {"type":"application/pls+xml"}, +"plx": {"type":"application/x-pixclscript"}, +"pm": {"type":"image/x-xpixmap"}, +"pm4": {"type":"application/x-pagemaker"}, +"pm5": {"type":"application/x-pagemaker"}, +"pml": {"type":"application/vnd.ctc-posml"}, +"png": {"type":"image/png","icon":"png","string":"image","groups":["image","web_image"]}, +"pnm": {"type":"image/x-portable-anymap"}, +"portpkg": {"type":"application/vnd.macports.portpkg"}, +"pot": {"type":"application/vnd.ms-powerpoint","icon":"powerpoint"}, +"potm": {"type":"application/vnd.ms-powerpoint.template.macroenabled.12","icon":"powerpoint"}, +"potx": {"type":"application/vnd.openxmlformats-officedocument.presentationml.template","icon":"powerpoint"}, +"pov": {"type":"model/x-pov"}, +"ppa": {"type":"application/vnd.ms-powerpoint","icon":"powerpoint"}, +"ppam": {"type":"application/vnd.ms-powerpoint.addin.macroenabled.12","icon":"powerpoint"}, +"ppd": {"type":"application/vnd.cups-ppd"}, +"ppm": {"type":"image/x-portable-pixmap"}, +"pps": {"type":"application/vnd.ms-powerpoint","icon":"powerpoint","groups":["presentation"]}, +"ppsm": {"type":"application/vnd.ms-powerpoint.slideshow.macroenabled.12","icon":"powerpoint"}, +"ppsx": {"type":"application/vnd.openxmlformats-officedocument.presentationml.slideshow","icon":"powerpoint"}, +"ppt": {"type":"application/vnd.ms-powerpoint","icon":"powerpoint","groups":["presentation"]}, +"pptm": {"type":"application/vnd.ms-powerpoint.presentation.macroenabled.12","icon":"powerpoint"}, +"pptx": {"type":"application/vnd.openxmlformats-officedocument.presentationml.presentation","icon":"powerpoint"}, +"ppz": {"type":"application/mspowerpoint"}, +"pqa": {"type":"application/vnd.palm"}, +"prc": {"type":"application/x-mobipocket-ebook"}, +"pre": {"type":"application/vnd.lotus-freelance"}, +"prf": {"type":"application/pics-rules"}, +"prt": {"type":"application/pro_eng"}, +"ps": {"type":"application/postscript","icon":"pdf"}, +"psb": {"type":"application/vnd.3gpp.pic-bw-small"}, +"psd": {"type":"image/vnd.adobe.photoshop","icon":"psd"}, +"psf": {"type":"application/x-font-linux-psf"}, +"pskcxml": {"type":"application/pskc+xml"}, +"ptid": {"type":"application/vnd.pvi.ptid1"}, +"pub": {"type":"application/x-mspublisher","icon":"publisher"}, +"pvb": {"type":"application/vnd.3gpp.pic-bw-var"}, +"pvu": {"type":"paleovu/x-pv"}, +"pwn": {"type":"application/vnd.3m.post-it-notes"}, +"pwz": {"type":"application/vnd.ms-powerpoint","icon":"powerpoint"}, +"py": {"type":"text/x-script.phyton"}, +"pya": {"type":"audio/vnd.ms-playready.media.pya"}, +"pyc": {"type":"application/x-bytecode.python"}, +"pyv": {"type":"video/vnd.ms-playready.media.pyv"}, +"qam": {"type":"application/vnd.epson.quickanime"}, +"qbo": {"type":"application/vnd.intu.qbo"}, +"qcp": {"type":"audio/vnd.qcelp"}, +"qd3": {"type":"x-world/x-3dmf"}, +"qd3d": {"type":"x-world/x-3dmf"}, +"qfx": {"type":"application/vnd.intu.qfx"}, +"qif": {"type":"image/x-quicktime"}, +"qps": {"type":"application/vnd.publishare-delta-tree"}, +"qt": {"type":"video/quicktime","icon":"quicktime","string":"video","groups":["video","web_video"]}, +"qtc": {"type":"video/x-qtc"}, +"qti": {"type":"image/x-quicktime"}, +"qtif": {"type":"image/x-quicktime"}, +"qwd": {"type":"application/vnd.quark.quarkxpress"}, +"qwt": {"type":"application/vnd.quark.quarkxpress"}, +"qxb": {"type":"application/vnd.quark.quarkxpress"}, +"qxd": {"type":"application/vnd.quark.quarkxpress"}, +"qxl": {"type":"application/vnd.quark.quarkxpress"}, +"qxt": {"type":"application/vnd.quark.quarkxpress"}, +"ra": {"type":"audio/x-realaudio-plugin","icon":"audio","string":"audio","groups":["audio","web_audio"]}, +"ram": {"type":"audio/x-pn-realaudio-plugin","icon":"audio","string":"audio","groups":["audio"]}, +"rar": {"type":"application/x-rar-compressed"}, +"ras": {"type":"image/x-cmu-raster"}, +"rast": {"type":"image/cmu-raster"}, +"rb": {"type":"text/plain"}, +"rcprofile": {"type":"application/vnd.ipunplugged.rcprofile"}, +"rdf": {"type":"application/rdf+xml"}, +"rdz": {"type":"application/vnd.data-vision.rdz"}, +"rep": {"type":"application/vnd.businessobjects"}, +"res": {"type":"application/x-dtbresource+xml"}, +"resx": {"type":"text/xml"}, +"rexx": {"type":"text/x-script.rexx"}, +"rf": {"type":"image/vnd.rn-realflash"}, +"rgb": {"type":"image/x-rgb"}, +"rhb": {"type":"text/xml","icon":"markup"}, +"rif": {"type":"application/reginfo+xml"}, +"rip": {"type":"audio/vnd.rip"}, +"ris": {"type":"application/x-research-info-systems"}, +"rl": {"type":"application/resource-lists+xml"}, +"rlc": {"type":"image/vnd.fujixerox.edmics-rlc"}, +"rld": {"type":"application/resource-lists-diff+xml"}, +"rm": {"type":"audio/x-pn-realaudio-plugin","icon":"audio","string":"audio","groups":["audio"]}, +"rmi": {"type":"audio/midi"}, +"rmm": {"type":"audio/x-pn-realaudio"}, +"rmp": {"type":"audio/x-pn-realaudio-plugin"}, +"rms": {"type":"application/vnd.jcp.javame.midlet-rms"}, +"rmvb": {"type":"application/vnd.rn-realmedia-vbr","icon":"video","string":"video","groups":["video"]}, +"rnc": {"type":"application/relax-ng-compact-syntax"}, +"rng": {"type":"application/ringing-tones"}, +"rnx": {"type":"application/vnd.rn-realplayer"}, +"roa": {"type":"application/rpki-roa"}, +"roff": {"type":"text/troff"}, +"rp": {"type":"image/vnd.rn-realpix"}, +"rp9": {"type":"application/vnd.cloanto.rp9"}, +"rpm": {"type":"application/x-rpm"}, +"rpss": {"type":"application/vnd.nokia.radio-presets"}, +"rpst": {"type":"application/vnd.nokia.radio-preset"}, +"rq": {"type":"application/sparql-query"}, +"rs": {"type":"application/rls-services+xml"}, +"rsd": {"type":"application/rsd+xml"}, +"rss": {"type":"application/rss+xml"}, +"rt": {"type":"text/richtext"}, +"rtf": {"type":"text/rtf","icon":"text","groups":["document"]}, +"rtx": {"type":"text/richtext","icon":"text"}, +"rv": {"type":"audio/x-pn-realaudio-plugin","icon":"audio","string":"video","groups":["video"]}, +"s": {"type":"text/x-asm"}, +"s3m": {"type":"audio/s3m"}, +"saf": {"type":"application/vnd.yamaha.smaf-audio"}, +"safariextz": {"type":"application/octet-stream"}, +"sass": {"type":"text/x-sass"}, +"saveme": {"type":"application/octet-stream"}, +"sbk": {"type":"application/x-tbook"}, +"sbml": {"type":"application/sbml+xml"}, +"sc": {"type":"application/vnd.ibm.secure-container"}, +"scd": {"type":"application/x-msschedule"}, +"scm": {"type":"application/vnd.lotus-screencam"}, +"scq": {"type":"application/scvp-cv-request"}, +"scs": {"type":"application/scvp-cv-response"}, +"scss": {"type":"text/x-scss"}, +"scurl": {"type":"text/vnd.curl.scurl"}, +"sda": {"type":"application/vnd.stardivision.draw","icon":"draw"}, +"sdc": {"type":"application/vnd.stardivision.calc","icon":"calc"}, +"sdd": {"type":"application/vnd.stardivision.impress","icon":"impress"}, +"sdkd": {"type":"application/vnd.solent.sdkm+xml"}, +"sdkm": {"type":"application/vnd.solent.sdkm+xml"}, +"sdml": {"type":"text/plain"}, +"sdp": {"type":"application/sdp"}, +"sdr": {"type":"application/sounder"}, +"sdw": {"type":"application/vnd.stardivision.writer","icon":"writer"}, +"sea": {"type":"application/sea"}, +"see": {"type":"application/vnd.seemail"}, +"seed": {"type":"application/vnd.fdsn.seed"}, +"sema": {"type":"application/vnd.sema"}, +"semd": {"type":"application/vnd.semd"}, +"semf": {"type":"application/vnd.semf"}, +"ser": {"type":"application/java-serialized-object"}, +"set": {"type":"application/set"}, +"setpay": {"type":"application/set-payment-initiation"}, +"setreg": {"type":"application/set-registration-initiation"}, +"sfd-hdstx": {"type":"application/vnd.hydrostatix.sof-data"}, +"sfs": {"type":"application/vnd.spotfire.sfs"}, +"sfv": {"type":"text/x-sfv"}, +"sgi": {"type":"image/sgi"}, +"sgl": {"type":"application/vnd.stardivision.writer-global"}, +"sgm": {"type":"text/sgml"}, +"sgml": {"type":"text/sgml"}, +"sh": {"type":"application/x-sh","icon":"sourcecode"}, +"shar": {"type":"application/x-shar"}, +"shf": {"type":"application/shf+xml"}, +"shtml": {"type":"text/html"}, +"sid": {"type":"image/x-mrsid-image"}, +"sig": {"type":"application/pgp-signature"}, +"sil": {"type":"audio/silk"}, +"silo": {"type":"model/mesh"}, +"sis": {"type":"application/vnd.symbian.install"}, +"sisx": {"type":"application/vnd.symbian.install"}, +"sit": {"type":"application/x-stuffit","icon":"archive","string":"archive","groups":["archive"]}, +"sitx": {"type":"application/x-stuffitx"}, +"skd": {"type":"application/vnd.koan"}, +"skm": {"type":"application/vnd.koan"}, +"skp": {"type":"application/vnd.koan"}, +"skt": {"type":"application/vnd.koan"}, +"sl": {"type":"application/x-seelogo"}, +"sldm": {"type":"application/vnd.ms-powerpoint.slide.macroenabled.12","icon":"powerpoint"}, +"sldx": {"type":"application/vnd.openxmlformats-officedocument.presentationml.slide"}, +"slt": {"type":"application/vnd.epson.salt"}, +"sm": {"type":"application/vnd.stepmania.stepchart"}, +"smf": {"type":"application/vnd.stardivision.math","icon":"math"}, +"smi": {"type":"application/smil","icon":"text"}, +"smil": {"type":"application/smil","icon":"text"}, +"smv": {"type":"video/x-smv"}, +"smzip": {"type":"application/vnd.stepmania.package"}, +"snd": {"type":"audio/basic"}, +"snf": {"type":"application/x-font-snf"}, +"so": {"type":"application/octet-stream"}, +"sol": {"type":"application/solids"}, +"spc": {"type":"application/x-pkcs7-certificates"}, +"spf": {"type":"application/vnd.yamaha.smaf-phrase"}, +"spl": {"type":"application/x-futuresplash"}, +"spot": {"type":"text/vnd.in3d.spot"}, +"spp": {"type":"application/scvp-vp-response"}, +"spq": {"type":"application/scvp-vp-request"}, +"spr": {"type":"application/x-sprite"}, +"sprite": {"type":"application/x-sprite"}, +"spx": {"type":"audio/ogg"}, +"sql": {"type":"application/x-sql"}, +"sqt": {"type":"text/xml","icon":"markup"}, +"src": {"type":"application/x-wais-source"}, +"srt": {"type":"application/x-subrip"}, +"sru": {"type":"application/sru+xml"}, +"srx": {"type":"application/sparql-results+xml"}, +"ssdl": {"type":"application/ssdl+xml"}, +"sse": {"type":"application/vnd.kodak-descriptor"}, +"ssf": {"type":"application/vnd.epson.ssf"}, +"ssi": {"type":"text/x-server-parsed-html"}, +"ssm": {"type":"application/streamingmedia"}, +"ssml": {"type":"application/ssml+xml"}, +"sst": {"type":"application/vnd.ms-pki.certstore"}, +"st": {"type":"application/vnd.sailingtracker.track"}, +"stc": {"type":"application/vnd.sun.xml.calc.template","icon":"calc"}, +"std": {"type":"application/vnd.sun.xml.draw.template","icon":"draw"}, +"step": {"type":"application/step"}, +"stf": {"type":"application/vnd.wt.stf"}, +"sti": {"type":"application/vnd.sun.xml.impress.template","icon":"impress"}, +"stk": {"type":"application/hyperstudio"}, +"stl": {"type":"application/vnd.ms-pki.stl"}, +"stp": {"type":"application/step"}, +"str": {"type":"application/vnd.pg.format"}, +"stw": {"type":"application/vnd.sun.xml.writer.template","icon":"writer"}, +"styl": {"type":"text/x-styl"}, +"sub": {"type":"image/vnd.dvb.subtitle"}, +"sus": {"type":"application/vnd.sus-calendar"}, +"susp": {"type":"application/vnd.sus-calendar"}, +"sv4cpio": {"type":"application/x-sv4cpio"}, +"sv4crc": {"type":"application/x-sv4crc"}, +"svc": {"type":"application/vnd.dvb.service"}, +"svd": {"type":"application/vnd.svd"}, +"svf": {"type":"image/vnd.dwg"}, +"svg": {"type":"image/svg+xml","icon":"image","string":"image","groups":["image","web_image"]}, +"svgz": {"type":"image/svg+xml","icon":"image","string":"image","groups":["image","web_image"]}, +"svr": {"type":"application/x-world"}, +"swa": {"type":"application/x-director","icon":"flash"}, +"swf": {"type":"application/x-shockwave-flash","icon":"flash","groups":["video"]}, +"swfl": {"type":"application/x-shockwave-flash","icon":"flash","groups":["video"]}, +"swi": {"type":"application/vnd.aristanetworks.swi"}, +"sxc": {"type":"application/vnd.sun.xml.calc","icon":"calc"}, +"sxd": {"type":"application/vnd.sun.xml.draw","icon":"draw"}, +"sxg": {"type":"application/vnd.sun.xml.writer.global","icon":"writer"}, +"sxi": {"type":"application/vnd.sun.xml.impress","icon":"impress"}, +"sxm": {"type":"application/vnd.sun.xml.math","icon":"math"}, +"sxw": {"type":"application/vnd.sun.xml.writer","icon":"writer"}, +"t": {"type":"text/troff"}, +"t3": {"type":"application/x-t3vm-image"}, +"taglet": {"type":"application/vnd.mynfc"}, +"talk": {"type":"text/x-speech"}, +"tao": {"type":"application/vnd.tao.intent-module-archive"}, +"tar": {"type":"application/x-tar","icon":"archive","string":"archive","groups":["archive"]}, +"tbk": {"type":"application/toolbook"}, +"tcap": {"type":"application/vnd.3gpp2.tcap"}, +"tcl": {"type":"application/x-tcl"}, +"tcsh": {"type":"text/x-script.tcsh"}, +"teacher": {"type":"application/vnd.smart.teacher"}, +"tei": {"type":"application/tei+xml"}, +"teicorpus": {"type":"application/tei+xml"}, +"tex": {"type":"application/x-tex","icon":"text"}, +"texi": {"type":"application/x-texinfo","icon":"text"}, +"texinfo": {"type":"application/x-texinfo","icon":"text"}, +"text": {"type":"text/plain"}, +"tfi": {"type":"application/thraud+xml"}, +"tfm": {"type":"application/x-tex-tfm"}, +"tga": {"type":"image/x-tga"}, +"tgz": {"type":"application/g-zip","icon":"archive","string":"archive","groups":["archive"]}, +"thmx": {"type":"application/vnd.ms-officetheme"}, +"tif": {"type":"image/tiff","icon":"tiff","string":"image","groups":["image"]}, +"tiff": {"type":"image/tiff","icon":"tiff","string":"image","groups":["image"]}, +"tmo": {"type":"application/vnd.tmobile-livetv"}, +"torrent": {"type":"application/x-bittorrent"}, +"tpl": {"type":"application/vnd.groove-tool-template"}, +"tpt": {"type":"application/vnd.trid.tpt"}, +"tr": {"type":"text/troff"}, +"tra": {"type":"application/vnd.trueapp"}, +"trm": {"type":"application/x-msterminal"}, +"tsd": {"type":"application/timestamped-data"}, +"tsi": {"type":"audio/tsp-audio"}, +"tsp": {"type":"application/dsptype"}, +"tsv": {"type":"text/tab-separated-values","icon":"text"}, +"ttc": {"type":"application/x-font-ttf"}, +"ttf": {"type":"application/x-font-ttf"}, +"ttl": {"type":"text/turtle"}, +"turbot": {"type":"image/florian"}, +"twd": {"type":"application/vnd.simtech-mindmapper"}, +"twds": {"type":"application/vnd.simtech-mindmapper"}, +"txd": {"type":"application/vnd.genomatix.tuxedo"}, +"txf": {"type":"application/vnd.mobius.txf"}, +"txt": {"type":"text/plain","icon":"text"}, +"udeb": {"type":"application/x-debian-package"}, +"ufd": {"type":"application/vnd.ufdl"}, +"ufdl": {"type":"application/vnd.ufdl"}, +"uil": {"type":"text/x-uil"}, +"ulx": {"type":"application/x-glulx"}, +"umj": {"type":"application/vnd.umajin"}, +"uni": {"type":"text/uri-list"}, +"unis": {"type":"text/uri-list"}, +"unityweb": {"type":"application/vnd.unity"}, +"unv": {"type":"application/i-deas"}, +"uoml": {"type":"application/vnd.uoml+xml"}, +"uri": {"type":"text/uri-list"}, +"uris": {"type":"text/uri-list"}, +"urls": {"type":"text/uri-list"}, +"ustar": {"type":"application/x-ustar"}, +"utz": {"type":"application/vnd.uiq.theme"}, +"uu": {"type":"text/x-uuencode"}, +"uue": {"type":"text/x-uuencode"}, +"uva": {"type":"audio/vnd.dece.audio"}, +"uvd": {"type":"application/vnd.dece.data"}, +"uvf": {"type":"application/vnd.dece.data"}, +"uvg": {"type":"image/vnd.dece.graphic"}, +"uvh": {"type":"video/vnd.dece.hd"}, +"uvi": {"type":"image/vnd.dece.graphic"}, +"uvm": {"type":"video/vnd.dece.mobile"}, +"uvp": {"type":"video/vnd.dece.pd"}, +"uvs": {"type":"video/vnd.dece.sd"}, +"uvt": {"type":"application/vnd.dece.ttml+xml"}, +"uvu": {"type":"video/vnd.uvvu.mp4"}, +"uvv": {"type":"video/vnd.dece.video"}, +"uvva": {"type":"audio/vnd.dece.audio"}, +"uvvd": {"type":"application/vnd.dece.data"}, +"uvvf": {"type":"application/vnd.dece.data"}, +"uvvg": {"type":"image/vnd.dece.graphic"}, +"uvvh": {"type":"video/vnd.dece.hd"}, +"uvvi": {"type":"image/vnd.dece.graphic"}, +"uvvm": {"type":"video/vnd.dece.mobile"}, +"uvvp": {"type":"video/vnd.dece.pd"}, +"uvvs": {"type":"video/vnd.dece.sd"}, +"uvvt": {"type":"application/vnd.dece.ttml+xml"}, +"uvvu": {"type":"video/vnd.uvvu.mp4"}, +"uvvv": {"type":"video/vnd.dece.video"}, +"uvvx": {"type":"application/vnd.dece.unspecified"}, +"uvvz": {"type":"application/vnd.dece.zip"}, +"uvx": {"type":"application/vnd.dece.unspecified"}, +"uvz": {"type":"application/vnd.dece.zip"}, +"vcard": {"type":"text/vcard"}, +"vcd": {"type":"application/x-cdlink"}, +"vcf": {"type":"text/x-vcard"}, +"vcg": {"type":"application/vnd.groove-vcard"}, +"vcs": {"type":"text/x-vcalendar"}, +"vcx": {"type":"application/vnd.vcx"}, +"vda": {"type":"application/vda"}, +"vdo": {"type":"video/vdo"}, +"vew": {"type":"application/groupwise"}, +"vis": {"type":"application/vnd.visionary"}, +"viv": {"type":"video/vnd.vivo"}, +"vivo": {"type":"video/vivo"}, +"vmd": {"type":"application/vocaltec-media-desc"}, +"vmf": {"type":"application/vocaltec-media-file"}, +"vob": {"type":"video/x-ms-vob"}, +"voc": {"type":"audio/voc"}, +"vor": {"type":"application/vnd.stardivision.writer","icon":"writer"}, +"vos": {"type":"video/vosaic"}, +"vox": {"type":"audio/voxware"}, +"vqe": {"type":"audio/x-twinvq-plugin"}, +"vqf": {"type":"audio/x-twinvq"}, +"vql": {"type":"audio/x-twinvq-plugin"}, +"vrml": {"type":"model/vrml"}, +"vrt": {"type":"x-world/x-vrt"}, +"vsd": {"type":"application/vnd.visio"}, +"vsf": {"type":"application/vnd.vsf"}, +"vss": {"type":"application/vnd.visio"}, +"vst": {"type":"application/vnd.visio"}, +"vsw": {"type":"application/vnd.visio"}, +"vtt": {"type":"text/vtt"}, +"vtu": {"type":"model/vnd.vtu"}, +"vxml": {"type":"application/voicexml+xml"}, +"w3d": {"type":"application/x-director"}, +"w60": {"type":"application/wordperfect6.0"}, +"w61": {"type":"application/wordperfect6.1"}, +"w6w": {"type":"application/msword"}, +"wad": {"type":"application/x-doom"}, +"wav": {"type":"audio/wav","icon":"wav","string":"audio","groups":["audio","web_audio"]}, +"wax": {"type":"audio/x-ms-wax"}, +"wb1": {"type":"application/x-qpro"}, +"wbmp": {"type":"image/vnd.wap.wbmp"}, +"wbs": {"type":"application/vnd.criticaltools.wbs+xml"}, +"wbxml": {"type":"application/vnd.wap.wbxml"}, +"wcm": {"type":"application/vnd.ms-works"}, +"wdb": {"type":"application/vnd.ms-works"}, +"wdp": {"type":"image/vnd.ms-photo"}, +"web": {"type":"application/vnd.xara"}, +"weba": {"type":"audio/webm","icon":"audio","string":"audio","groups":["audio","web_audio"]}, +"webm": {"type":"video/webm","icon":"video","string":"video","groups":["video","web_video"]}, +"webp": {"type":"image/webp"}, +"wg": {"type":"application/vnd.pmi.widget"}, +"wgt": {"type":"application/widget"}, +"wiz": {"type":"application/msword"}, +"wk1": {"type":"application/x-123"}, +"wks": {"type":"application/vnd.ms-works"}, +"wm": {"type":"video/x-ms-wm"}, +"wma": {"type":"audio/x-ms-wma"}, +"wmd": {"type":"application/x-ms-wmd"}, +"wmf": {"type":"application/x-msmetafile"}, +"wml": {"type":"text/vnd.wap.wml"}, +"wmlc": {"type":"application/vnd.wap.wmlc"}, +"wmls": {"type":"text/vnd.wap.wmlscript"}, +"wmlsc": {"type":"application/vnd.wap.wmlscriptc"}, +"wmv": {"type":"video/x-ms-wmv","icon":"wmv","string":"video","groups":["video"]}, +"wmx": {"type":"video/x-ms-wmx"}, +"wmz": {"type":"application/x-ms-wmz"}, +"woff": {"type":"application/x-font-woff"}, +"word": {"type":"application/msword"}, +"wp": {"type":"application/wordperfect"}, +"wp5": {"type":"application/wordperfect"}, +"wp6": {"type":"application/wordperfect"}, +"wpd": {"type":"application/vnd.wordperfect"}, +"wpl": {"type":"application/vnd.ms-wpl"}, +"wps": {"type":"application/vnd.ms-works"}, +"wq1": {"type":"application/x-lotus"}, +"wqd": {"type":"application/vnd.wqd"}, +"wri": {"type":"application/x-mswrite"}, +"wrl": {"type":"model/vrml"}, +"wrz": {"type":"model/vrml"}, +"wsc": {"type":"text/scriplet"}, +"wsdl": {"type":"application/wsdl+xml"}, +"wspolicy": {"type":"application/wspolicy+xml"}, +"wsrc": {"type":"application/x-wais-source"}, +"wtb": {"type":"application/vnd.webturbo"}, +"wtk": {"type":"application/x-wintalk"}, +"wvx": {"type":"video/x-ms-wvx"}, +"x-png": {"type":"image/png","icon":"png","string":"image","groups":["image","web_image"]}, +"x3d": {"type":"model/x3d+xml"}, +"x3db": {"type":"model/x3d+binary"}, +"x3dbz": {"type":"model/x3d+binary"}, +"x3dv": {"type":"model/x3d+vrml"}, +"x3dvz": {"type":"model/x3d+vrml"}, +"x3dz": {"type":"model/x3d+xml"}, +"xaml": {"type":"application/xaml+xml"}, +"xap": {"type":"application/x-silverlight-app"}, +"xar": {"type":"application/vnd.xara"}, +"xbap": {"type":"application/x-ms-xbap"}, +"xbd": {"type":"application/vnd.fujixerox.docuworks.binder"}, +"xbm": {"type":"image/x-xbitmap"}, +"xdf": {"type":"application/xcap-diff+xml"}, +"xdm": {"type":"application/vnd.syncml.dm+xml"}, +"xdp": {"type":"application/pdf","icon":"pdf"}, +"xdr": {"type":"video/x-amt-demorun"}, +"xdssc": {"type":"application/dssc+xml"}, +"xdw": {"type":"application/vnd.fujixerox.docuworks"}, +"xenc": {"type":"application/xenc+xml"}, +"xer": {"type":"application/patch-ops-error+xml"}, +"xfd": {"type":"application/pdf","icon":"pdf"}, +"xfdf": {"type":"application/pdf","icon":"pdf"}, +"xfdl": {"type":"application/vnd.xfdl"}, +"xgz": {"type":"xgl/drawing"}, +"xht": {"type":"application/xhtml+xml"}, +"xhtml": {"type":"application/xhtml+xml","icon":"html","groups":["web_file"]}, +"xhvml": {"type":"application/xv+xml"}, +"xif": {"type":"image/vnd.xiff"}, +"xl": {"type":"application/excel"}, +"xla": {"type":"application/vnd.ms-excel","icon":"spreadsheet"}, +"xlam": {"type":"application/vnd.ms-excel.addin.macroenabled.12","icon":"spreadsheet"}, +"xlb": {"type":"application/excel"}, +"xlc": {"type":"application/vnd.ms-excel","icon":"spreadsheet"}, +"xld": {"type":"application/excel"}, +"xlf": {"type":"application/x-xliff+xml"}, +"xlk": {"type":"application/excel"}, +"xll": {"type":"application/excel"}, +"xlm": {"type":"application/vnd.ms-excel","icon":"spreadsheet"}, +"xls": {"type":"application/vnd.ms-excel","icon":"spreadsheet","groups":["spreadsheet"]}, +"xlsb": {"type":"application/vnd.ms-excel.sheet.binary.macroenabled.12","icon":"spreadsheet"}, +"xlsm": {"type":"application/vnd.ms-excel.sheet.macroenabled.12","icon":"spreadsheet","groups":["spreadsheet"]}, +"xlsx": {"type":"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","icon":"spreadsheet"}, +"xlt": {"type":"application/vnd.ms-excel","icon":"spreadsheet"}, +"xltm": {"type":"application/vnd.ms-excel.template.macroenabled.12","icon":"spreadsheet"}, +"xltx": {"type":"application/vnd.openxmlformats-officedocument.spreadsheetml.template","icon":"spreadsheet"}, +"xlv": {"type":"application/excel"}, +"xlw": {"type":"application/vnd.ms-excel","icon":"spreadsheet"}, +"xm": {"type":"audio/xm"}, +"xml": {"type":"application/xml","icon":"markup"}, +"xmz": {"type":"xgl/movie"}, +"xo": {"type":"application/vnd.olpc-sugar"}, +"xop": {"type":"application/xop+xml"}, +"xpi": {"type":"application/x-xpinstall"}, +"xpix": {"type":"application/x-vnd.ls-xpix"}, +"xpl": {"type":"application/xproc+xml"}, +"xpm": {"type":"image/x-xpixmap"}, +"xpr": {"type":"application/vnd.is-xpr"}, +"xps": {"type":"application/vnd.ms-xpsdocument"}, +"xpw": {"type":"application/vnd.intercon.formnet"}, +"xpx": {"type":"application/vnd.intercon.formnet"}, +"xsl": {"type":"text/xml","icon":"markup"}, +"xslt": {"type":"application/xslt+xml"}, +"xsm": {"type":"application/vnd.syncml+xml"}, +"xspf": {"type":"application/xspf+xml"}, +"xsr": {"type":"video/x-amt-showrun"}, +"xul": {"type":"application/vnd.mozilla.xul+xml"}, +"xvm": {"type":"application/xv+xml"}, +"xvml": {"type":"application/xv+xml"}, +"xwd": {"type":"image/x-xwindowdump"}, +"xxx": {"type":"document/unknown","icon":"unknown"}, +"xyz": {"type":"chemical/x-xyz"}, +"xz": {"type":"application/x-xz"}, +"yaml": {"type":"text/yaml"}, +"yang": {"type":"application/yang"}, +"yin": {"type":"application/yin+xml"}, +"yml": {"type":"text/yaml"}, +"z": {"type":"application/x-compress"}, +"z1": {"type":"application/x-zmachine"}, +"z2": {"type":"application/x-zmachine"}, +"z3": {"type":"application/x-zmachine"}, +"z4": {"type":"application/x-zmachine"}, +"z5": {"type":"application/x-zmachine"}, +"z6": {"type":"application/x-zmachine"}, +"z7": {"type":"application/x-zmachine"}, +"z8": {"type":"application/x-zmachine"}, +"zaz": {"type":"application/vnd.zzazz.deck+xml"}, +"zip": {"type":"application/zip","icon":"archive","string":"archive","groups":["archive"]}, +"zir": {"type":"application/vnd.zul"}, +"zirz": {"type":"application/vnd.zul"}, +"zmm": {"type":"application/vnd.handheld-entertainment+xml"}, +"zoo": {"type":"application/octet-stream"}, +"zsh": {"type":"text/x-script.zsh"} +} \ No newline at end of file diff --git a/src/assets/mimetoext.json b/src/assets/mimetoext.json new file mode 100644 index 000000000..842fcf09d --- /dev/null +++ b/src/assets/mimetoext.json @@ -0,0 +1,1088 @@ +{ +"application/acad": ["dwg"], +"application/andrew-inset": ["ez"], +"application/applixware": ["aw"], +"application/arj": ["arj"], +"application/atom+xml": ["atom"], +"application/atomcat+xml": ["atomcat"], +"application/atomsvc+xml": ["atomsvc"], +"application/base64": ["mm","mme"], +"application/binhex": ["hqx"], +"application/binhex4": ["hqx"], +"application/book": ["boo","book"], +"application/ccxml+xml": ["ccxml"], +"application/cdf": ["cdf"], +"application/cdmi-capability": ["cdmia"], +"application/cdmi-container": ["cdmic"], +"application/cdmi-domain": ["cdmid"], +"application/cdmi-object": ["cdmio"], +"application/cdmi-queue": ["cdmiq"], +"application/clariscad": ["ccad"], +"application/commonground": ["dp"], +"application/cu-seeme": ["cu"], +"application/davmount+xml": ["davmount"], +"application/docbook+xml": ["dbk"], +"application/drafting": ["drw"], +"application/dsptype": ["tsp"], +"application/dssc+der": ["dssc"], +"application/dssc+xml": ["xdssc"], +"application/dxf": ["dxf"], +"application/ecmascript": ["ecma","js"], +"application/emma+xml": ["emma"], +"application/envoy": ["evy"], +"application/epub+zip": ["epub"], +"application/excel": ["xl","xlw","xlb","xlc","xld","xlk","xla","xlm","xls","xlt","xlv","xll"], +"application/exi": ["exi"], +"application/font-tdpfr": ["pfr"], +"application/font-woff": ["woff"], +"application/fractals": ["fif"], +"application/freeloader": ["frl"], +"application/futuresplash": ["spl"], +"application/g-zip": ["tgz","gz","gzip"], +"application/gml+xml": ["gml"], +"application/gnutar": ["tgz"], +"application/gpx+xml": ["gpx"], +"application/groupwise": ["vew"], +"application/gxf": ["gxf"], +"application/hlp": ["hlp"], +"application/hta": ["hta"], +"application/hyperstudio": ["stk"], +"application/i-deas": ["unv"], +"application/iges": ["iges","igs"], +"application/inf": ["inf"], +"application/inkml+xml": ["ink","inkml"], +"application/inspiration": ["isf"], +"application/inspiration.template": ["ist"], +"application/ipfix": ["ipfix"], +"application/java": ["class"], +"application/java-archive": ["jar"], +"application/java-byte-code": ["class"], +"application/java-serialized-object": ["ser"], +"application/java-vm": ["class"], +"application/javascript": ["js"], +"application/json": ["json"], +"application/jsonml+json": ["jsonml"], +"application/lha": ["lha"], +"application/lost+xml": ["lostxml"], +"application/lzx": ["lzx"], +"application/mac-binary": ["bin"], +"application/mac-binhex": ["hqx"], +"application/mac-binhex40": ["hqx"], +"application/mac-compactpro": ["cpt"], +"application/macbinary": ["bin"], +"application/mads+xml": ["mads"], +"application/marc": ["mrc"], +"application/marcxml+xml": ["mrcx"], +"application/mathematica": ["ma","mb","nb"], +"application/mathml+xml": ["mathml"], +"application/mbedlet": ["mbd"], +"application/mbox": ["mbox"], +"application/mcad": ["mcd"], +"application/mediaservercontrol+xml": ["mscml"], +"application/metalink+xml": ["metalink"], +"application/metalink4+xml": ["meta4"], +"application/mets+xml": ["mets"], +"application/mime": ["aps"], +"application/mods+xml": ["mods"], +"application/mp21": ["mp21","m21"], +"application/mp4": ["mp4s"], +"application/msaccess": ["accdb"], +"application/mspowerpoint": ["pot","pps","ppt","ppz"], +"application/msword": ["doc","dot","w6w","wiz","word"], +"application/mswrite": ["wri"], +"application/mxf": ["mxf"], +"application/netmc": ["mcp"], +"application/octet-stream": ["bin","a","arj","asax","zoo","bpk","com","crx","deploy","dist","distz","dmg","dms","dump","elc","exe","fdk","arc","ipa","lha","lhx","lrf","lzh","lzx","mar","o","phar","pkg","psd","safariextz","saveme","so","uu","hta"], +"application/oda": ["oda"], +"application/oebps-package+xml": ["opf"], +"application/ogg": ["ogx"], +"application/omdoc+xml": ["omdoc"], +"application/onenote": ["onepkg","onetmp","onetoc","onetoc2"], +"application/oxps": ["oxps"], +"application/patch-ops-error+xml": ["xer"], +"application/pdf": ["pdf","fdf","xdp","xfd","xfdf"], +"application/pgp-encrypted": ["pgp"], +"application/pgp-signature": ["asc","sig"], +"application/pics-rules": ["prf"], +"application/pkcs-12": ["p12"], +"application/pkcs-crl": ["crl"], +"application/pkcs10": ["p10","csr"], +"application/pkcs7-mime": ["p7c","p7m"], +"application/pkcs7-signature": ["p7s"], +"application/pkcs8": ["p8","key"], +"application/pkix-attr-cert": ["ac"], +"application/pkix-cert": ["cer","crt"], +"application/pkix-crl": ["crl"], +"application/pkix-pkipath": ["pkipath"], +"application/pkixcmp": ["pki"], +"application/plain": ["text"], +"application/pls+xml": ["pls"], +"application/postscript": ["ps","ai","eps"], +"application/powerpoint": ["ppt"], +"application/pro_eng": ["part","prt"], +"application/prs.cww": ["cww"], +"application/pskc+xml": ["pskcxml"], +"application/rdf+xml": ["rdf"], +"application/reginfo+xml": ["rif"], +"application/relax-ng-compact-syntax": ["rnc"], +"application/resource-lists+xml": ["rl"], +"application/resource-lists-diff+xml": ["rld"], +"application/ringing-tones": ["rng"], +"application/rls-services+xml": ["rs"], +"application/rpki-ghostbusters": ["gbr"], +"application/rpki-manifest": ["mft"], +"application/rpki-roa": ["roa"], +"application/rsd+xml": ["rsd"], +"application/rss+xml": ["rss"], +"application/rtf": ["rtf","rtx"], +"application/sbml+xml": ["sbml"], +"application/scvp-cv-request": ["scq"], +"application/scvp-cv-response": ["scs"], +"application/scvp-vp-request": ["spq"], +"application/scvp-vp-response": ["spp"], +"application/sdp": ["sdp"], +"application/sea": ["sea"], +"application/set": ["set"], +"application/set-payment-initiation": ["setpay"], +"application/set-registration-initiation": ["setreg"], +"application/shf+xml": ["shf"], +"application/sla": ["stl"], +"application/smil": ["smil","smi"], +"application/smil+xml": ["smi","smil"], +"application/solids": ["sol"], +"application/sounder": ["sdr"], +"application/sparql-query": ["rq"], +"application/sparql-results+xml": ["srx"], +"application/srgs": ["gram"], +"application/srgs+xml": ["grxml"], +"application/sru+xml": ["sru"], +"application/ssdl+xml": ["ssdl"], +"application/ssml+xml": ["ssml"], +"application/step": ["step","stp"], +"application/streamingmedia": ["ssm"], +"application/tei+xml": ["tei","teicorpus"], +"application/thraud+xml": ["tfi"], +"application/timestamped-data": ["tsd"], +"application/toolbook": ["tbk"], +"application/vda": ["vda"], +"application/vnd.3gpp.pic-bw-large": ["plb"], +"application/vnd.3gpp.pic-bw-small": ["psb"], +"application/vnd.3gpp.pic-bw-var": ["pvb"], +"application/vnd.3gpp2.tcap": ["tcap"], +"application/vnd.3m.post-it-notes": ["pwn"], +"application/vnd.accpac.simply.aso": ["aso"], +"application/vnd.accpac.simply.imp": ["imp"], +"application/vnd.acucobol": ["acu"], +"application/vnd.acucorp": ["atc","acutc"], +"application/vnd.adobe.air-application-installer-package+zip": ["air"], +"application/vnd.adobe.formscentral.fcdt": ["fcdt"], +"application/vnd.adobe.fxp": ["fxp","fxpl"], +"application/vnd.adobe.xdp+xml": ["xdp"], +"application/vnd.adobe.xfdf": ["xfdf"], +"application/vnd.ahead.space": ["ahead"], +"application/vnd.airzip.filesecure.azf": ["azf"], +"application/vnd.airzip.filesecure.azs": ["azs"], +"application/vnd.amazon.ebook": ["azw"], +"application/vnd.americandynamics.acc": ["acc"], +"application/vnd.amiga.ami": ["ami"], +"application/vnd.android.package-archive": ["apk"], +"application/vnd.anser-web-certificate-issue-initiation": ["cii"], +"application/vnd.anser-web-funds-transfer-initiation": ["fti"], +"application/vnd.antix.game-component": ["atx"], +"application/vnd.apple.installer+xml": ["mpkg"], +"application/vnd.apple.mpegurl": ["m3u8"], +"application/vnd.aristanetworks.swi": ["swi"], +"application/vnd.astraea-software.iota": ["iota"], +"application/vnd.audiograph": ["aep"], +"application/vnd.blueice.multipass": ["mpm"], +"application/vnd.bmi": ["bmi"], +"application/vnd.businessobjects": ["rep"], +"application/vnd.chemdraw+xml": ["cdxml"], +"application/vnd.chipnuts.karaoke-mmd": ["mmd"], +"application/vnd.cinderella": ["cdy"], +"application/vnd.claymore": ["cla"], +"application/vnd.cloanto.rp9": ["rp9"], +"application/vnd.clonk.c4group": ["c4d","c4f","c4g","c4p","c4u"], +"application/vnd.cluetrust.cartomobile-config": ["c11amc"], +"application/vnd.cluetrust.cartomobile-config-pkg": ["c11amz"], +"application/vnd.commonspace": ["csp"], +"application/vnd.contact.cmsg": ["cdbcmsg"], +"application/vnd.cosmocaller": ["cmc"], +"application/vnd.crick.clicker": ["clkx"], +"application/vnd.crick.clicker.keyboard": ["clkk"], +"application/vnd.crick.clicker.palette": ["clkp"], +"application/vnd.crick.clicker.template": ["clkt"], +"application/vnd.crick.clicker.wordbank": ["clkw"], +"application/vnd.criticaltools.wbs+xml": ["wbs"], +"application/vnd.ctc-posml": ["pml"], +"application/vnd.cups-ppd": ["ppd"], +"application/vnd.curl.car": ["car"], +"application/vnd.curl.pcurl": ["pcurl"], +"application/vnd.dart": ["dart"], +"application/vnd.data-vision.rdz": ["rdz"], +"application/vnd.dece.data": ["uvd","uvf","uvvd","uvvf"], +"application/vnd.dece.ttml+xml": ["uvt","uvvt"], +"application/vnd.dece.unspecified": ["uvvx","uvx"], +"application/vnd.dece.zip": ["uvvz","uvz"], +"application/vnd.denovo.fcselayout-link": ["fe_launch"], +"application/vnd.dna": ["dna"], +"application/vnd.dolby.mlp": ["mlp"], +"application/vnd.dpgraph": ["dpg"], +"application/vnd.dreamfactory": ["dfac"], +"application/vnd.ds-keypoint": ["kpxx"], +"application/vnd.dvb.ait": ["ait"], +"application/vnd.dvb.service": ["svc"], +"application/vnd.dynageo": ["geo"], +"application/vnd.ecowin.chart": ["mag"], +"application/vnd.enliven": ["nml"], +"application/vnd.epson.esf": ["esf"], +"application/vnd.epson.msf": ["msf"], +"application/vnd.epson.quickanime": ["qam"], +"application/vnd.epson.salt": ["slt"], +"application/vnd.epson.ssf": ["ssf"], +"application/vnd.eszigno3+xml": ["es3","et3"], +"application/vnd.ezpix-album": ["ez2"], +"application/vnd.ezpix-package": ["ez3"], +"application/vnd.fdf": ["fdf"], +"application/vnd.fdsn.mseed": ["mseed"], +"application/vnd.fdsn.seed": ["dataless","seed"], +"application/vnd.flographit": ["gph"], +"application/vnd.fluxtime.clip": ["ftc"], +"application/vnd.framemaker": ["book","fm","frame","maker"], +"application/vnd.frogans.fnc": ["fnc"], +"application/vnd.frogans.ltf": ["ltf"], +"application/vnd.fsc.weblaunch": ["fsc"], +"application/vnd.fujitsu.oasys": ["oas"], +"application/vnd.fujitsu.oasys2": ["oa2"], +"application/vnd.fujitsu.oasys3": ["oa3"], +"application/vnd.fujitsu.oasysgp": ["fg5"], +"application/vnd.fujitsu.oasysprs": ["bh2"], +"application/vnd.fujixerox.ddd": ["ddd"], +"application/vnd.fujixerox.docuworks": ["xdw"], +"application/vnd.fujixerox.docuworks.binder": ["xbd"], +"application/vnd.fuzzysheet": ["fzs"], +"application/vnd.genomatix.tuxedo": ["txd"], +"application/vnd.geogebra.file": ["ggb"], +"application/vnd.geogebra.tool": ["ggt"], +"application/vnd.geometry-explorer": ["gex","gre"], +"application/vnd.geonext": ["gxt"], +"application/vnd.geoplan": ["g2w"], +"application/vnd.geospace": ["g3w"], +"application/vnd.gmx": ["gmx"], +"application/vnd.google-apps.document": ["gdoc"], +"application/vnd.google-apps.presentation": ["gslides"], +"application/vnd.google-apps.spreadsheet": ["gsheet"], +"application/vnd.google-earth.kml+xml": ["kml"], +"application/vnd.google-earth.kmz": ["kmz"], +"application/vnd.grafeq": ["gqf","gqs"], +"application/vnd.groove-account": ["gac"], +"application/vnd.groove-help": ["ghf"], +"application/vnd.groove-identity-message": ["gim"], +"application/vnd.groove-injector": ["grv"], +"application/vnd.groove-tool-message": ["gtm"], +"application/vnd.groove-tool-template": ["tpl"], +"application/vnd.groove-vcard": ["vcg"], +"application/vnd.hal+xml": ["hal"], +"application/vnd.handheld-entertainment+xml": ["zmm"], +"application/vnd.hbci": ["hbci"], +"application/vnd.hhe.lesson-player": ["les"], +"application/vnd.hp-hpgl": ["hpgl","hgl","hpg"], +"application/vnd.hp-hpid": ["hpid"], +"application/vnd.hp-hps": ["hps"], +"application/vnd.hp-jlyt": ["jlt"], +"application/vnd.hp-pcl": ["pcl"], +"application/vnd.hp-pclxl": ["pclxl"], +"application/vnd.hydrostatix.sof-data": ["sfd-hdstx"], +"application/vnd.ibm.minipay": ["mpy"], +"application/vnd.ibm.modcap": ["afp","list3820","listafp"], +"application/vnd.ibm.rights-management": ["irm"], +"application/vnd.ibm.secure-container": ["sc"], +"application/vnd.iccprofile": ["icc","icm"], +"application/vnd.igloader": ["igl"], +"application/vnd.immervision-ivp": ["ivp"], +"application/vnd.immervision-ivu": ["ivu"], +"application/vnd.insors.igm": ["igm"], +"application/vnd.intercon.formnet": ["xpw","xpx"], +"application/vnd.intergeo": ["i2g"], +"application/vnd.intu.qbo": ["qbo"], +"application/vnd.intu.qfx": ["qfx"], +"application/vnd.ipunplugged.rcprofile": ["rcprofile"], +"application/vnd.irepository.package+xml": ["irp"], +"application/vnd.is-xpr": ["xpr"], +"application/vnd.isac.fcs": ["fcs"], +"application/vnd.jam": ["jam"], +"application/vnd.jcp.javame.midlet-rms": ["rms"], +"application/vnd.jisp": ["jisp"], +"application/vnd.joost.joda-archive": ["joda"], +"application/vnd.kahootz": ["ktr","ktz"], +"application/vnd.kde.karbon": ["karbon"], +"application/vnd.kde.kchart": ["chrt"], +"application/vnd.kde.kformula": ["kfo"], +"application/vnd.kde.kivio": ["flw"], +"application/vnd.kde.kontour": ["kon"], +"application/vnd.kde.kpresenter": ["kpr","kpt"], +"application/vnd.kde.kspread": ["ksp"], +"application/vnd.kde.kword": ["kwd","kwt"], +"application/vnd.kenameaapp": ["htke"], +"application/vnd.kidspiration": ["kia"], +"application/vnd.kinar": ["kne","knp"], +"application/vnd.koan": ["skd","skm","skp","skt"], +"application/vnd.kodak-descriptor": ["sse"], +"application/vnd.las.las+xml": ["lasxml"], +"application/vnd.llamagraphics.life-balance.desktop": ["lbd"], +"application/vnd.llamagraphics.life-balance.exchange+xml": ["lbe"], +"application/vnd.lotus-1-2-3": ["123"], +"application/vnd.lotus-approach": ["apr"], +"application/vnd.lotus-freelance": ["pre"], +"application/vnd.lotus-notes": ["nsf"], +"application/vnd.lotus-organizer": ["org"], +"application/vnd.lotus-screencam": ["scm"], +"application/vnd.lotus-wordpro": ["lwp"], +"application/vnd.macports.portpkg": ["portpkg"], +"application/vnd.mcd": ["mcd"], +"application/vnd.medcalcdata": ["mc1"], +"application/vnd.mediastation.cdkey": ["cdkey"], +"application/vnd.mfer": ["mwf"], +"application/vnd.mfmp": ["mfm"], +"application/vnd.micrografx.flo": ["flo"], +"application/vnd.micrografx.igx": ["igx"], +"application/vnd.mif": ["mif"], +"application/vnd.mobius.daf": ["daf"], +"application/vnd.mobius.dis": ["dis"], +"application/vnd.mobius.mbk": ["mbk"], +"application/vnd.mobius.mqy": ["mqy"], +"application/vnd.mobius.msl": ["msl"], +"application/vnd.mobius.plc": ["plc"], +"application/vnd.mobius.txf": ["txf"], +"application/vnd.moodle.backup": ["mbz"], +"application/vnd.mophun.application": ["mpn"], +"application/vnd.mophun.certificate": ["mpc"], +"application/vnd.mozilla.xul+xml": ["xul"], +"application/vnd.ms-artgalry": ["cil"], +"application/vnd.ms-cab-compressed": ["cab"], +"application/vnd.ms-excel": ["xls","xla","xlb","xlc","xll","xlm","xlt","xlw"], +"application/vnd.ms-excel.addin.macroenabled.12": ["xlam"], +"application/vnd.ms-excel.sheet.binary.macroenabled.12": ["xlsb"], +"application/vnd.ms-excel.sheet.macroenabled.12": ["xlsm"], +"application/vnd.ms-excel.template.macroenabled.12": ["xltm"], +"application/vnd.ms-fontobject": ["eot"], +"application/vnd.ms-htmlhelp": ["chm"], +"application/vnd.ms-ims": ["ims"], +"application/vnd.ms-lrm": ["lrm"], +"application/vnd.ms-officetheme": ["thmx"], +"application/vnd.ms-pki.certstore": ["sst"], +"application/vnd.ms-pki.pko": ["pko"], +"application/vnd.ms-pki.seccat": ["cat"], +"application/vnd.ms-pki.stl": ["stl"], +"application/vnd.ms-powerpoint": ["ppt","pot","ppa","pps","pwz"], +"application/vnd.ms-powerpoint.addin.macroenabled.12": ["ppam"], +"application/vnd.ms-powerpoint.presentation.macroenabled.12": ["pptm"], +"application/vnd.ms-powerpoint.slide.macroenabled.12": ["sldm"], +"application/vnd.ms-powerpoint.slideshow.macroenabled.12": ["ppsm"], +"application/vnd.ms-powerpoint.template.macroenabled.12": ["potm"], +"application/vnd.ms-project": ["mpp","mpt"], +"application/vnd.ms-word.document.macroenabled.12": ["docm"], +"application/vnd.ms-word.template.macroenabled.12": ["dotm"], +"application/vnd.ms-works": ["wcm","wdb","wks","wps"], +"application/vnd.ms-wpl": ["wpl"], +"application/vnd.ms-xpsdocument": ["xps"], +"application/vnd.mseq": ["mseq"], +"application/vnd.musician": ["mus"], +"application/vnd.muvee.style": ["msty"], +"application/vnd.mynfc": ["taglet"], +"application/vnd.neurolanguage.nlu": ["nlu"], +"application/vnd.nitf": ["nitf","ntf"], +"application/vnd.noblenet-directory": ["nnd"], +"application/vnd.noblenet-sealer": ["nns"], +"application/vnd.noblenet-web": ["nnw"], +"application/vnd.nokia.configuration-message": ["ncm"], +"application/vnd.nokia.n-gage.data": ["ngdat"], +"application/vnd.nokia.n-gage.symbian.install": ["n-gage"], +"application/vnd.nokia.radio-preset": ["rpst"], +"application/vnd.nokia.radio-presets": ["rpss"], +"application/vnd.nokia.ringing-tone": ["rng"], +"application/vnd.novadigm.edm": ["edm"], +"application/vnd.novadigm.edx": ["edx"], +"application/vnd.novadigm.ext": ["ext"], +"application/vnd.oasis.opendocument.chart": ["odc"], +"application/vnd.oasis.opendocument.chart-template": ["otc"], +"application/vnd.oasis.opendocument.database": ["odb"], +"application/vnd.oasis.opendocument.formula": ["odf"], +"application/vnd.oasis.opendocument.formula-template": ["odft"], +"application/vnd.oasis.opendocument.graphics": ["odg"], +"application/vnd.oasis.opendocument.graphics-template": ["otg"], +"application/vnd.oasis.opendocument.image": ["odi"], +"application/vnd.oasis.opendocument.image-template": ["oti"], +"application/vnd.oasis.opendocument.presentation": ["odp"], +"application/vnd.oasis.opendocument.presentation-template": ["otp"], +"application/vnd.oasis.opendocument.spreadsheet": ["ods"], +"application/vnd.oasis.opendocument.spreadsheet-template": ["ots"], +"application/vnd.oasis.opendocument.text": ["odt"], +"application/vnd.oasis.opendocument.text-master": ["odm"], +"application/vnd.oasis.opendocument.text-template": ["ott"], +"application/vnd.oasis.opendocument.text-web": ["oth"], +"application/vnd.olpc-sugar": ["xo"], +"application/vnd.oma.dd2+xml": ["dd2"], +"application/vnd.openofficeorg.extension": ["oxt"], +"application/vnd.openxmlformats-officedocument.presentationml.presentation": ["pptx"], +"application/vnd.openxmlformats-officedocument.presentationml.slide": ["sldx"], +"application/vnd.openxmlformats-officedocument.presentationml.slideshow": ["ppsx"], +"application/vnd.openxmlformats-officedocument.presentationml.template": ["potx"], +"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": ["xlsx"], +"application/vnd.openxmlformats-officedocument.spreadsheetml.template": ["xltx"], +"application/vnd.openxmlformats-officedocument.wordprocessingml.document": ["docx"], +"application/vnd.openxmlformats-officedocument.wordprocessingml.template": ["dotx"], +"application/vnd.osgeo.mapguide.package": ["mgp"], +"application/vnd.osgi.dp": ["dp"], +"application/vnd.osgi.subsystem": ["esa"], +"application/vnd.palm": ["oprc","pdb","pqa"], +"application/vnd.pawaafile": ["paw"], +"application/vnd.pg.format": ["str"], +"application/vnd.pg.osasli": ["ei6"], +"application/vnd.picsel": ["efif"], +"application/vnd.pmi.widget": ["wg"], +"application/vnd.pocketlearn": ["plf"], +"application/vnd.powerbuilder6": ["pbd"], +"application/vnd.previewsystems.box": ["box"], +"application/vnd.proteus.magazine": ["mgz"], +"application/vnd.publishare-delta-tree": ["qps"], +"application/vnd.pvi.ptid1": ["ptid"], +"application/vnd.quark.quarkxpress": ["qwd","qwt","qxb","qxd","qxl","qxt"], +"application/vnd.realvnc.bed": ["bed"], +"application/vnd.recordare.musicxml": ["mxl"], +"application/vnd.recordare.musicxml+xml": ["musicxml"], +"application/vnd.rig.cryptonote": ["cryptonote"], +"application/vnd.rim.cod": ["cod"], +"application/vnd.rn-realmedia": ["rm"], +"application/vnd.rn-realmedia-vbr": ["rmvb"], +"application/vnd.rn-realplayer": ["rnx"], +"application/vnd.route66.link66+xml": ["link66"], +"application/vnd.sailingtracker.track": ["st"], +"application/vnd.seemail": ["see"], +"application/vnd.sema": ["sema"], +"application/vnd.semd": ["semd"], +"application/vnd.semf": ["semf"], +"application/vnd.shana.informed.formdata": ["ifm"], +"application/vnd.shana.informed.formtemplate": ["itp"], +"application/vnd.shana.informed.interchange": ["iif"], +"application/vnd.shana.informed.package": ["ipk"], +"application/vnd.simtech-mindmapper": ["twd","twds"], +"application/vnd.smaf": ["mmf"], +"application/vnd.smart.teacher": ["teacher"], +"application/vnd.solent.sdkm+xml": ["sdkd","sdkm"], +"application/vnd.spotfire.dxp": ["dxp"], +"application/vnd.spotfire.sfs": ["sfs"], +"application/vnd.stardivision.calc": ["sdc"], +"application/vnd.stardivision.draw": ["sda"], +"application/vnd.stardivision.impress": ["sdd"], +"application/vnd.stardivision.math": ["smf"], +"application/vnd.stardivision.writer": ["sdw","vor"], +"application/vnd.stardivision.writer-global": ["sgl"], +"application/vnd.stepmania.package": ["smzip"], +"application/vnd.stepmania.stepchart": ["sm"], +"application/vnd.sun.xml.calc": ["sxc"], +"application/vnd.sun.xml.calc.template": ["stc"], +"application/vnd.sun.xml.draw": ["sxd"], +"application/vnd.sun.xml.draw.template": ["std"], +"application/vnd.sun.xml.impress": ["sxi"], +"application/vnd.sun.xml.impress.template": ["sti"], +"application/vnd.sun.xml.math": ["sxm"], +"application/vnd.sun.xml.writer": ["sxw"], +"application/vnd.sun.xml.writer.global": ["sxg"], +"application/vnd.sun.xml.writer.template": ["stw"], +"application/vnd.sus-calendar": ["sus","susp"], +"application/vnd.svd": ["svd"], +"application/vnd.symbian.install": ["sis","sisx"], +"application/vnd.syncml+xml": ["xsm"], +"application/vnd.syncml.dm+wbxml": ["bdm"], +"application/vnd.syncml.dm+xml": ["xdm"], +"application/vnd.tao.intent-module-archive": ["tao"], +"application/vnd.tcpdump.pcap": ["cap","dmp","pcap"], +"application/vnd.tmobile-livetv": ["tmo"], +"application/vnd.trid.tpt": ["tpt"], +"application/vnd.triscape.mxs": ["mxs"], +"application/vnd.trueapp": ["tra"], +"application/vnd.ufdl": ["ufdl","ufd"], +"application/vnd.uiq.theme": ["utz"], +"application/vnd.umajin": ["umj"], +"application/vnd.unity": ["unityweb"], +"application/vnd.uoml+xml": ["uoml"], +"application/vnd.vcx": ["vcx"], +"application/vnd.visio": ["vsd","vss","vst","vsw"], +"application/vnd.visionary": ["vis"], +"application/vnd.vsf": ["vsf"], +"application/vnd.wap.wbxml": ["wbxml"], +"application/vnd.wap.wmlc": ["wmlc"], +"application/vnd.wap.wmlscriptc": ["wmlsc"], +"application/vnd.webturbo": ["wtb"], +"application/vnd.wolfram.player": ["nbp"], +"application/vnd.wordperfect": ["wpd"], +"application/vnd.wqd": ["wqd"], +"application/vnd.wt.stf": ["stf"], +"application/vnd.xara": ["xar","web"], +"application/vnd.xfdl": ["xfdl"], +"application/vnd.yamaha.hv-dic": ["hvd"], +"application/vnd.yamaha.hv-script": ["hvs"], +"application/vnd.yamaha.hv-voice": ["hvp"], +"application/vnd.yamaha.openscoreformat": ["osf"], +"application/vnd.yamaha.openscoreformat.osfpvg+xml": ["osfpvg"], +"application/vnd.yamaha.smaf-audio": ["saf"], +"application/vnd.yamaha.smaf-phrase": ["spf"], +"application/vnd.yellowriver-custom-menu": ["cmp"], +"application/vnd.zul": ["zir","zirz"], +"application/vnd.zzazz.deck+xml": ["zaz"], +"application/vocaltec-media-desc": ["vmd"], +"application/vocaltec-media-file": ["vmf"], +"application/voicexml+xml": ["vxml"], +"application/widget": ["wgt"], +"application/winhlp": ["hlp"], +"application/wordperfect": ["wp","wp5","wp6","wpd"], +"application/wordperfect6.0": ["w60","wp5"], +"application/wordperfect6.1": ["w61"], +"application/wsdl+xml": ["wsdl"], +"application/wspolicy+xml": ["wspolicy"], +"application/x-123": ["wk1"], +"application/x-7z-compressed": ["7z"], +"application/x-abiword": ["abw"], +"application/x-ace-compressed": ["ace"], +"application/x-aim": ["aim"], +"application/x-apple-diskimage": ["dmg"], +"application/x-authorware-bin": ["aab"], +"application/x-authorware-map": ["aam"], +"application/x-authorware-seg": ["aas"], +"application/x-bcpio": ["bcpio"], +"application/x-binary": ["bin"], +"application/x-binhex40": ["hqx"], +"application/x-bittorrent": ["torrent"], +"application/x-blorb": ["blorb","blb"], +"application/x-bsh": ["bsh","sh","shar"], +"application/x-bytecode.elisp (compiled elisp)": ["elc"], +"application/x-bytecode.python": ["pyc"], +"application/x-bzip": ["bz"], +"application/x-bzip2": ["bz2","boz"], +"application/x-cbr": ["cbr","cb7","cba","cbt","cbz"], +"application/x-cdf": ["cdf"], +"application/x-cdlink": ["vcd"], +"application/x-cfs-compressed": ["cfs"], +"application/x-chat": ["chat","cha"], +"application/x-chess-pgn": ["pgn"], +"application/x-cmu-raster": ["ras"], +"application/x-cocoa": ["cco"], +"application/x-coldfusion": ["cfc","cfm"], +"application/x-compactpro": ["cpt"], +"application/x-compress": ["z"], +"application/x-compressed": ["gz","tgz","z","zip"], +"application/x-conference": ["nsc"], +"application/x-cpio": ["cpio"], +"application/x-cpt": ["cpt"], +"application/x-csh": ["csh","cs"], +"application/x-debian-package": ["deb","udeb"], +"application/x-deepv": ["deepv"], +"application/x-dgc-compressed": ["dgc"], +"application/x-director": ["cct","cst","cxt","dcr","dir","dxr","fgd","swa","w3d"], +"application/x-doom": ["wad"], +"application/x-dtbncx+xml": ["ncx"], +"application/x-dtbook+xml": ["dtb"], +"application/x-dtbresource+xml": ["res"], +"application/x-dvi": ["dvi"], +"application/x-elc": ["elc"], +"application/x-envoy": ["evy","env"], +"application/x-esrehber": ["es"], +"application/x-eva": ["eva"], +"application/x-excel": ["xla","xlw","xlc","xld","xlk","xlb","xlm","xls","xlt","xlv","xll"], +"application/x-font-bdf": ["bdf"], +"application/x-font-ghostscript": ["gsf"], +"application/x-font-linux-psf": ["psf"], +"application/x-font-otf": ["otf"], +"application/x-font-pcf": ["pcf"], +"application/x-font-snf": ["snf"], +"application/x-font-ttf": ["ttf","ttc"], +"application/x-font-type1": ["afm","pfa","pfb","pfm"], +"application/x-font-woff": ["woff"], +"application/x-frame": ["mif"], +"application/x-freearc": ["arc"], +"application/x-freelance": ["pre"], +"application/x-futuresplash": ["spl"], +"application/x-gca-compressed": ["gca"], +"application/x-glulx": ["ulx"], +"application/x-gnumeric": ["gnumeric"], +"application/x-gramps-xml": ["gramps"], +"application/x-gsp": ["gsp"], +"application/x-gss": ["gss"], +"application/x-gtar": ["gtar"], +"application/x-gzip": ["gz","gzip","tgz"], +"application/x-hdf": ["hdf"], +"application/x-helpfile": ["help","hlp"], +"application/x-httpd-imap": ["imap"], +"application/x-httpd-phps": ["phps"], +"application/x-ibooks+zip": ["ibooks"], +"application/x-ima": ["ima"], +"application/x-install-instructions": ["install"], +"application/x-internett-signup": ["ins"], +"application/x-inventor": ["iv"], +"application/x-ip2": ["ip"], +"application/x-iso9660-image": ["iso"], +"application/x-java-class": ["class"], +"application/x-java-commerce": ["jcm"], +"application/x-java-jnlp-file": ["jnlp"], +"application/x-javascript": ["js"], +"application/x-koan": ["skd","skm","skp","skt"], +"application/x-ksh": ["ksh"], +"application/x-latex": ["latex","ltx"], +"application/x-lha": ["lha"], +"application/x-lisp": ["lsp"], +"application/x-livescreen": ["ivy"], +"application/x-lotus": ["wq1"], +"application/x-lotusscreencam": ["scm"], +"application/x-lzh": ["lzh"], +"application/x-lzh-compressed": ["lha","lzh"], +"application/x-lzip": ["lz"], +"application/x-lzma": ["lzma"], +"application/x-lzop": ["lzo"], +"application/x-lzx": ["lzx"], +"application/x-mac-binhex40": ["hqx"], +"application/x-macbinary": ["bin"], +"application/x-magic-cap-package-1.0": ["mc$"], +"application/x-mathcad": ["mcd"], +"application/x-meme": ["mm"], +"application/x-midi": ["mid","midi"], +"application/x-mie": ["mie"], +"application/x-mif": ["mif"], +"application/x-mix-transfer": ["nix"], +"application/x-mobipocket-ebook": ["mobi","prc"], +"application/x-mplayer2": ["asx"], +"application/x-ms-application": ["application"], +"application/x-ms-shortcut": ["lnk"], +"application/x-ms-wmd": ["wmd"], +"application/x-ms-wmz": ["wmz"], +"application/x-ms-xbap": ["xbap"], +"application/x-msaccess": ["mdb"], +"application/x-msbinder": ["obd"], +"application/x-mscardfile": ["crd"], +"application/x-msclip": ["clp"], +"application/x-msdownload": ["dll","bat","com","exe","msi"], +"application/x-msexcel": ["xla","xls","xlw"], +"application/x-msmediaview": ["mvb","m13","m14"], +"application/x-msmetafile": ["emf","emz","wmf"], +"application/x-msmoney": ["mny"], +"application/x-mspowerpoint": ["ppt"], +"application/x-mspublisher": ["pub"], +"application/x-msschedule": ["scd"], +"application/x-msterminal": ["trm"], +"application/x-mswrite": ["wri"], +"application/x-navi-animation": ["ani"], +"application/x-navidoc": ["nvd"], +"application/x-navimap": ["map"], +"application/x-navistyle": ["stl"], +"application/x-netcdf": ["cdf","nc"], +"application/x-newton-compatible-pkg": ["pkg"], +"application/x-nokia-9000-communicator-add-on-software": ["aos"], +"application/x-nzb": ["nzb"], +"application/x-omc": ["omc"], +"application/x-omcdatamaker": ["omcd"], +"application/x-omcregerator": ["omcr"], +"application/x-pagemaker": ["pm4","pm5"], +"application/x-pcl": ["pcl"], +"application/x-pem-file": ["pem"], +"application/x-pixclscript": ["plx"], +"application/x-pkcs10": ["p10"], +"application/x-pkcs12": ["p12","pfx"], +"application/x-pkcs7-certificates": ["p7b","spc"], +"application/x-pkcs7-certreqresp": ["p7r"], +"application/x-pkcs7-crl": ["crl"], +"application/x-pkcs7-mime": ["p7c","p7m"], +"application/x-pkcs7-signature": ["p7a"], +"application/x-plist": ["plist"], +"application/x-pointplus": ["css"], +"application/x-portable-anymap": ["pnm"], +"application/x-project": ["mpc","mpt","mpv","mpx"], +"application/x-qpro": ["wb1"], +"application/x-rar-compressed": ["rar"], +"application/x-research-info-systems": ["ris"], +"application/x-rpm": ["rpm"], +"application/x-rtf": ["rtf"], +"application/x-sdp": ["sdp"], +"application/x-sea": ["sea"], +"application/x-seelogo": ["sl"], +"application/x-sh": ["sh"], +"application/x-shar": ["shar","sh"], +"application/x-shockwave-flash": ["swf","swfl"], +"application/x-silverlight-app": ["xap"], +"application/x-sit": ["sit"], +"application/x-sprite": ["spr","sprite"], +"application/x-sql": ["sql"], +"application/x-stuffit": ["sit"], +"application/x-stuffitx": ["sitx"], +"application/x-subrip": ["srt"], +"application/x-sv4cpio": ["sv4cpio"], +"application/x-sv4crc": ["sv4crc"], +"application/x-t3vm-image": ["t3"], +"application/x-tads": ["gam"], +"application/x-tar": ["tar"], +"application/x-tbook": ["sbk","tbk"], +"application/x-tcl": ["tcl"], +"application/x-tex": ["tex"], +"application/x-tex-tfm": ["tfm"], +"application/x-texinfo": ["texi","texinfo"], +"application/x-tgif": ["obj"], +"application/x-troff": ["roff","t","tr"], +"application/x-troff-man": ["man"], +"application/x-troff-me": ["me"], +"application/x-troff-ms": ["ms"], +"application/x-troff-msvideo": ["avi"], +"application/x-ustar": ["ustar"], +"application/x-visio": ["vsd","vst","vsw"], +"application/x-vnd.audioexplosion.mzz": ["mzz"], +"application/x-vnd.ls-xpix": ["xpix"], +"application/x-vrml": ["vrml"], +"application/x-wais-source": ["src","wsrc"], +"application/x-winhelp": ["hlp"], +"application/x-wintalk": ["wtk"], +"application/x-world": ["svr","wrl"], +"application/x-wpwin": ["wpd"], +"application/x-wri": ["wri"], +"application/x-x509-ca-cert": ["crt","cer","der"], +"application/x-x509-user-cert": ["crt"], +"application/x-xfig": ["fig"], +"application/x-xliff+xml": ["xlf"], +"application/x-xpinstall": ["xpi"], +"application/x-xz": ["xz"], +"application/x-zip-compressed": ["zip"], +"application/x-zmachine": ["z1","z2","z3","z4","z5","z6","z7","z8"], +"application/xaml+xml": ["xaml"], +"application/xcap-diff+xml": ["xdf"], +"application/xenc+xml": ["xenc"], +"application/xhtml+xml": ["xhtml","xht"], +"application/xml": ["xml","xsl"], +"application/xml-dtd": ["dtd"], +"application/xop+xml": ["xop"], +"application/xproc+xml": ["xpl"], +"application/xslt+xml": ["xslt"], +"application/xspf+xml": ["xspf"], +"application/xv+xml": ["mxml","xhvml","xvm","xvml"], +"application/yang": ["yang"], +"application/yin+xml": ["yin"], +"application/zip": ["zip"], +"audio/aac": ["aac"], +"audio/adpcm": ["adp"], +"audio/aiff": ["aif","aifc","aiff"], +"audio/amr": ["amr"], +"audio/au": ["au"], +"audio/basic": ["au","snd"], +"audio/it": ["it"], +"audio/make": ["funk","my","pfunk"], +"audio/make.my.funk": ["pfunk"], +"audio/mid": ["rmi"], +"audio/midi": ["midi","kar","mid","rmi"], +"audio/mod": ["mod"], +"audio/mp3": ["mp3"], +"audio/mp4": ["mp4a","m4a"], +"audio/mpeg": ["m2a","m3a","mp2","mp2a","mp3","mpa","mpg","mpga"], +"audio/mpeg3": ["mp3"], +"audio/nspaudio": ["la","lma"], +"audio/ogg": ["ogg","oga","spx"], +"audio/s3m": ["s3m"], +"audio/silk": ["sil"], +"audio/tsp-audio": ["tsi"], +"audio/tsplayer": ["tsp"], +"audio/vnd.dece.audio": ["uva","uvva"], +"audio/vnd.digital-winds": ["eol"], +"audio/vnd.dra": ["dra"], +"audio/vnd.dts": ["dts"], +"audio/vnd.dts.hd": ["dtshd"], +"audio/vnd.lucent.voice": ["lvp"], +"audio/vnd.ms-playready.media.pya": ["pya"], +"audio/vnd.nuera.ecelp4800": ["ecelp4800"], +"audio/vnd.nuera.ecelp7470": ["ecelp7470"], +"audio/vnd.nuera.ecelp9600": ["ecelp9600"], +"audio/vnd.qcelp": ["qcp"], +"audio/vnd.rip": ["rip"], +"audio/voc": ["voc"], +"audio/voxware": ["vox"], +"audio/wav": ["wav"], +"audio/webm": ["weba"], +"audio/x-aac": ["aac"], +"audio/x-adpcm": ["snd"], +"audio/x-aiff": ["aiff","aif","aifc"], +"audio/x-au": ["au"], +"audio/x-caf": ["caf"], +"audio/x-flac": ["flac"], +"audio/x-gsm": ["gsd","gsm"], +"audio/x-jam": ["jam"], +"audio/x-liveaudio": ["lam"], +"audio/x-matroska": ["mka"], +"audio/x-mid": ["mid","midi"], +"audio/x-midi": ["mid","midi"], +"audio/x-mod": ["mod"], +"audio/x-mpeg": ["mp2"], +"audio/x-mpeg-3": ["mp3"], +"audio/x-mpegurl": ["m3u"], +"audio/x-mpequrl": ["m3u"], +"audio/x-ms-wax": ["wax"], +"audio/x-ms-wma": ["wma"], +"audio/x-nspaudio": ["la","lma"], +"audio/x-pn-realaudio": ["ra","ram","rm","rmm","rmp"], +"audio/x-pn-realaudio-plugin": ["rmp","ra","ram","rm","rpm","rv"], +"audio/x-psid": ["sid"], +"audio/x-realaudio": ["ra"], +"audio/x-realaudio-plugin": ["ra"], +"audio/x-twinvq": ["vqf"], +"audio/x-twinvq-plugin": ["vqe","vql"], +"audio/x-vnd.audioexplosion.mjuicemediafile": ["mjf"], +"audio/x-voc": ["voc"], +"audio/x-wav": ["wav"], +"audio/xm": ["xm"], +"chemical/x-cdx": ["cdx"], +"chemical/x-cif": ["cif"], +"chemical/x-cmdf": ["cmdf"], +"chemical/x-cml": ["cml"], +"chemical/x-csml": ["csml"], +"chemical/x-pdb": ["pdb","xyz"], +"chemical/x-xyz": ["xyz"], +"document/unknown": ["xxx"], +"drawing/x-dwf (old)": ["dwf"], +"i-world/i-vrml": ["ivr"], +"image/bmp": ["bmp","bm"], +"image/cgm": ["cgm"], +"image/cmu-raster": ["ras","rast"], +"image/fif": ["fif"], +"image/florian": ["flo","turbot"], +"image/g3fax": ["g3"], +"image/gif": ["gif"], +"image/ief": ["ief","iefs"], +"image/jpeg": ["jpeg","jfif","jfif-tbnl","jpe","jpg"], +"image/jutvision": ["jut"], +"image/ktx": ["ktx"], +"image/naplps": ["nap","naplps"], +"image/pict": ["pct","pic","pict"], +"image/pjpeg": ["jfif","jpe","jpeg","jpg"], +"image/png": ["png","x-png"], +"image/prs.btif": ["btif"], +"image/sgi": ["sgi"], +"image/svg+xml": ["svg","svgz"], +"image/tiff": ["tiff","tif"], +"image/vasa": ["mcf"], +"image/vnd.adobe.photoshop": ["psd"], +"image/vnd.dece.graphic": ["uvg","uvi","uvvg","uvvi"], +"image/vnd.djvu": ["djvu","djv"], +"image/vnd.dvb.subtitle": ["sub"], +"image/vnd.dwg": ["dwg","dxf","svf"], +"image/vnd.dxf": ["dxf"], +"image/vnd.fastbidsheet": ["fbs"], +"image/vnd.fpx": ["fpx"], +"image/vnd.fst": ["fst"], +"image/vnd.fujixerox.edmics-mmr": ["mmr"], +"image/vnd.fujixerox.edmics-rlc": ["rlc"], +"image/vnd.microsoft.icon": ["ico"], +"image/vnd.ms-modi": ["mdi"], +"image/vnd.ms-photo": ["wdp"], +"image/vnd.net-fpx": ["npx","fpx"], +"image/vnd.rn-realflash": ["rf"], +"image/vnd.rn-realpix": ["rp"], +"image/vnd.wap.wbmp": ["wbmp"], +"image/vnd.xiff": ["xif"], +"image/webp": ["webp"], +"image/x-3ds": ["3ds"], +"image/x-cmu-raster": ["ras"], +"image/x-cmx": ["cmx"], +"image/x-dwg": ["dwg","dxf","svf"], +"image/x-freehand": ["fh","fh4","fh5","fh7","fhc"], +"image/x-icon": ["ico"], +"image/x-jg": ["art"], +"image/x-jps": ["jps"], +"image/x-mrsid-image": ["sid"], +"image/x-niff": ["nif","niff"], +"image/x-pcx": ["pcx"], +"image/x-pict": ["pct","pic","pict"], +"image/x-portable-anymap": ["pnm"], +"image/x-portable-bitmap": ["pbm"], +"image/x-portable-graymap": ["pgm"], +"image/x-portable-greymap": ["pgm"], +"image/x-portable-pixmap": ["ppm"], +"image/x-quicktime": ["qif","qti","qtif"], +"image/x-rgb": ["rgb"], +"image/x-tga": ["tga"], +"image/x-tiff": ["tif","tiff"], +"image/x-windows-bmp": ["bmp"], +"image/x-xbitmap": ["xbm"], +"image/x-xbm": ["xbm"], +"image/x-xpixmap": ["xpm","pm"], +"image/x-xwd": ["xwd"], +"image/x-xwindowdump": ["xwd"], +"image/xbm": ["xbm"], +"image/xpm": ["xpm"], +"message/rfc822": ["eml","mht","mhtml","mime"], +"model/iges": ["iges","igs"], +"model/mesh": ["mesh","msh","silo"], +"model/vnd.collada+xml": ["dae"], +"model/vnd.dwf": ["dwf"], +"model/vnd.gdl": ["gdl"], +"model/vnd.gtw": ["gtw"], +"model/vnd.mts": ["mts"], +"model/vnd.vtu": ["vtu"], +"model/vrml": ["vrml","wrl","wrz"], +"model/x-pov": ["pov"], +"model/x3d+binary": ["x3db","x3dbz"], +"model/x3d+vrml": ["x3dv","x3dvz"], +"model/x3d+xml": ["x3d","x3dz"], +"multipart/x-gzip": ["gzip"], +"multipart/x-ustar": ["ustar"], +"multipart/x-zip": ["zip"], +"music/crescendo": ["mid","midi"], +"music/x-karaoke": ["kar"], +"paleovu/x-pv": ["pvu"], +"shockwave/director": ["cct"], +"text/asp": ["asp"], +"text/cache-manifest": ["appcache"], +"text/calendar": ["ics","ifb"], +"text/css": ["css"], +"text/csv": ["csv"], +"text/ecmascript": ["js"], +"text/html": ["html","acgi","htc","htm","htmls","htx","shtml"], +"text/javascript": ["js"], +"text/mcf": ["mcf"], +"text/n3": ["n3"], +"text/pascal": ["pas"], +"text/plain": ["txt","applescript","asc","ascx","ashx","asm","asmx","asp","aspx","axd","c","c++","cc","com","conf","cpp","cs","cxx","def","f","f90","asa","g","h","hh","hpp","idc","in","ini","jav","java","list","log","lst","m","mar","php","pl","rb","sdml","text","for"], +"text/prs.lines.tag": ["dsc"], +"text/richtext": ["rtx","rt","rtf"], +"text/rtf": ["rtf"], +"text/scriplet": ["wsc"], +"text/sgml": ["sgml","sgm"], +"text/tab-separated-values": ["tsv"], +"text/troff": ["man","me","ms","roff","t","tr"], +"text/turtle": ["ttl"], +"text/uri-list": ["uri","uni","unis","uris","urls"], +"text/vcard": ["vcard"], +"text/vnd.abc": ["abc"], +"text/vnd.curl": ["curl"], +"text/vnd.curl.dcurl": ["dcurl"], +"text/vnd.curl.mcurl": ["mcurl"], +"text/vnd.curl.scurl": ["scurl"], +"text/vnd.dvb.subtitle": ["sub"], +"text/vnd.fly": ["fly"], +"text/vnd.fmi.flexstor": ["flx"], +"text/vnd.graphviz": ["gv"], +"text/vnd.in3d.3dml": ["3dml"], +"text/vnd.in3d.spot": ["spot"], +"text/vnd.rn-realtext": ["rt"], +"text/vnd.sun.j2me.app-descriptor": ["jad"], +"text/vnd.wap.wml": ["wml"], +"text/vnd.wap.wmlscript": ["wmls"], +"text/vtt": ["vtt"], +"text/webviewhtml": ["htt"], +"text/x-asm": ["asm","s"], +"text/x-audiosoft-intra": ["aip"], +"text/x-c": ["c","cc","cpp","cxx","dic","h","hh"], +"text/x-component": ["htc"], +"text/x-fortran": ["f","f77","f90","for"], +"text/x-h": ["h","hh"], +"text/x-java-source": ["jav","java"], +"text/x-la-asf": ["lsx"], +"text/x-m": ["m"], +"text/x-nfo": ["nfo"], +"text/x-opml": ["opml"], +"text/x-pascal": ["p","pas"], +"text/x-sass": ["sass"], +"text/x-script": ["hlb"], +"text/x-script.csh": ["csh"], +"text/x-script.elisp": ["el"], +"text/x-script.guile": ["scm"], +"text/x-script.ksh": ["ksh"], +"text/x-script.lisp": ["lsp"], +"text/x-script.perl": ["pl"], +"text/x-script.perl-module": ["pm"], +"text/x-script.phyton": ["py"], +"text/x-script.rexx": ["rexx"], +"text/x-script.scheme": ["scm"], +"text/x-script.sh": ["sh"], +"text/x-script.tcl": ["tcl"], +"text/x-script.tcsh": ["tcsh"], +"text/x-script.zsh": ["zsh"], +"text/x-scss": ["scss"], +"text/x-server-parsed-html": ["shtml","ssi"], +"text/x-setext": ["etx"], +"text/x-sfv": ["sfv"], +"text/x-sgml": ["sgm","sgml"], +"text/x-speech": ["spc","talk"], +"text/x-styl": ["styl"], +"text/x-uil": ["uil"], +"text/x-uuencode": ["uu","uue"], +"text/x-vcalendar": ["vcs"], +"text/x-vcard": ["vcf"], +"text/xml": ["resx","jcb","jcw","jmt","jmx","jcl","xsl","rhb","sqt","xml","jqz"], +"text/yaml": ["yaml","yml"], +"video/3gpp": ["3gp"], +"video/3gpp2": ["3g2"], +"video/animaflex": ["afl"], +"video/avi": ["avi"], +"video/avs-video": ["avs"], +"video/dl": ["dl"], +"video/fli": ["fli"], +"video/gl": ["gl"], +"video/h261": ["h261"], +"video/h263": ["h263"], +"video/h264": ["h264"], +"video/jpeg": ["jpgv"], +"video/jpm": ["jpgm","jpm"], +"video/mj2": ["mj2","mjp2"], +"video/mp4": ["mp4","f4v","m4v","mp4v","mpg4"], +"video/mpeg": ["mpeg","m1v","m2v","mp2","mp3","mpa","mpe","mpg"], +"video/msvideo": ["avi"], +"video/ogg": ["ogv"], +"video/quicktime": ["mov","3gp","moov","qt"], +"video/vdo": ["vdo"], +"video/vivo": ["viv","vivo"], +"video/vnd.dece.hd": ["uvh","uvvh"], +"video/vnd.dece.mobile": ["uvm","uvvm"], +"video/vnd.dece.pd": ["uvp","uvvp"], +"video/vnd.dece.sd": ["uvs","uvvs"], +"video/vnd.dece.video": ["uvv","uvvv"], +"video/vnd.dvb.file": ["dvb"], +"video/vnd.fvt": ["fvt"], +"video/vnd.mpegurl": ["m4u","mxu"], +"video/vnd.ms-playready.media.pyv": ["pyv"], +"video/vnd.rn-realvideo": ["rv"], +"video/vnd.uvvu.mp4": ["uvu","uvvu"], +"video/vnd.vivo": ["viv","vivo"], +"video/vosaic": ["vos"], +"video/webm": ["webm"], +"video/x-amt-demorun": ["xdr"], +"video/x-amt-showrun": ["xsr"], +"video/x-atomic3d-feature": ["fmf"], +"video/x-dl": ["dl"], +"video/x-dv": ["dv","dif"], +"video/x-f4v": ["f4v"], +"video/x-fli": ["fli"], +"video/x-flv": ["flv"], +"video/x-gl": ["gl"], +"video/x-isvideo": ["isu"], +"video/x-m4v": ["m4v"], +"video/x-matroska": ["mkv","mk3d","mks"], +"video/x-mng": ["mng"], +"video/x-motion-jpeg": ["mjpg"], +"video/x-mpeg": ["mp2","mp3"], +"video/x-mpeq2a": ["mp2"], +"video/x-ms-asf": ["asf","asx"], +"video/x-ms-asf-plugin": ["asx"], +"video/x-ms-vob": ["vob"], +"video/x-ms-wm": ["wm","avi"], +"video/x-ms-wmv": ["wmv"], +"video/x-ms-wmx": ["wmx"], +"video/x-ms-wvx": ["wvx"], +"video/x-msvideo": ["avi"], +"video/x-qtc": ["qtc"], +"video/x-scm": ["scm"], +"video/x-sgi-movie": ["movie","mv"], +"video/x-smv": ["smv"], +"windows/metafile": ["wmf"], +"www/mime": ["mime"], +"x-conference/x-cooltalk": ["ice"], +"x-music/x-midi": ["mid","midi"], +"x-world/x-3dmf": ["3dm","3dmf","qd3","qd3d"], +"x-world/x-svr": ["svr"], +"x-world/x-vrml": ["vrml","wrl","wrz"], +"x-world/x-vrt": ["vrt"], +"xgl/drawing": ["xgz"], +"xgl/movie": ["xmz"] +} \ No newline at end of file diff --git a/src/assets/mimetypes/en.json b/src/assets/mimetypes/en.json new file mode 100644 index 000000000..f94347be4 --- /dev/null +++ b/src/assets/mimetypes/en.json @@ -0,0 +1,54 @@ +{ + "application/epub_zip": "EPUB ebook", + "application/msword": "Word document", + "application/pdf": "PDF document", + "application/vnd.moodle.backup": "Moodle backup", + "application/vnd.ms-excel": "Excel spreadsheet", + "application/vnd.ms-excel.sheet.macroEnabled.12": "Excel 2007 macro-enabled workbook", + "application/vnd.ms-powerpoint": "Powerpoint presentation", + "application/vnd.oasis.opendocument.spreadsheet": "OpenDocument Spreadsheet", + "application/vnd.oasis.opendocument.spreadsheet-template": "OpenDocument Spreadsheet template", + "application/vnd.oasis.opendocument.text": "OpenDocument Text document", + "application/vnd.oasis.opendocument.text-template": "OpenDocument Text template", + "application/vnd.oasis.opendocument.text-web": "OpenDocument Web page template", + "application/vnd.openxmlformats-officedocument.presentationml.presentation": "Powerpoint 2007 presentation", + "application/vnd.openxmlformats-officedocument.presentationml.slideshow": "Powerpoint 2007 slideshow", + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": "Excel 2007 spreadsheet", + "application/vnd.openxmlformats-officedocument.spreadsheetml.template": "Excel 2007 template", + "application/vnd.openxmlformats-officedocument.wordprocessingml.document": "Word 2007 document", + "application/x-iwork-keynote-sffkey": "iWork Keynote presentation", + "application/x-iwork-numbers-sffnumbers": "iWork Numbers spreadsheet", + "application/x-iwork-pages-sffpages": "iWork Pages document", + "application/x-javascript": "JavaScript source", + "application/x-mspublisher": "Publisher document", + "application/x-shockwave-flash": "Flash animation", + "application/xhtml_xml": "XHTML document", + "archive": "Archive ({{$a.EXT}})", + "audio": "Audio file ({{$a.EXT}})", + "default": "{{$a.mimetype}}", + "document/unknown": "File", + "group:archive": "Archive files", + "group:audio": "Audio files", + "group:document": "Document files", + "group:html_audio": "Audio files natively supported by browsers", + "group:html_track": "HTML track files", + "group:html_video": "Video files natively supported by browsers", + "group:image": "Image files", + "group:presentation": "Presentation files", + "group:sourcecode": "Source code", + "group:spreadsheet": "Spreadsheet files", + "group:video": "Video files", + "group:web_audio": "Audio files used on the web", + "group:web_file": "Web files", + "group:web_image": "Image files used on the web", + "group:web_video": "Video files used on the web", + "image": "Image ({{$a.MIMETYPE2}})", + "image/vnd.microsoft.icon": "Windows icon", + "text/css": "Cascading Style-Sheet", + "text/csv": "Comma-separated values", + "text/html": "HTML document", + "text/plain": "Text file", + "text/rtf": "RTF document", + "text/vtt": "Web Video Text Track", + "video": "Video file ({{$a.EXT}})" +} \ No newline at end of file diff --git a/src/core/constants.ts b/src/core/constants.ts new file mode 100644 index 000000000..08b6ef10b --- /dev/null +++ b/src/core/constants.ts @@ -0,0 +1,27 @@ +// (C) Copyright 2015 Martin Dougiamas +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/** + * Static class to contain all the core constants. + */ +export class CoreConstants { + public static secondsYear = 31536000; + public static secondsDay = 86400; + public static secondsHour = 3600; + public static secondsMinute = 60; + public static wifiDownloadThreshold = 104857600; // 100MB. + public static downloadThreshold = 10485760; // 10MB. + public static dontShowError = 'CoreDontShowError'; + public static settingsRichTextEditor = 'CoreSettingsRichTextEditor'; +} diff --git a/src/core/emulator/emulator.module.ts b/src/core/emulator/emulator.module.ts index 4c87604d0..438078fc8 100644 --- a/src/core/emulator/emulator.module.ts +++ b/src/core/emulator/emulator.module.ts @@ -22,6 +22,7 @@ import { Network } from '@ionic-native/network'; import { ClipboardMock } from './providers/clipboard'; import { GlobalizationMock } from './providers/globalization'; import { NetworkMock } from './providers/network'; +import { InAppBrowser } from '@ionic-native/in-app-browser'; @NgModule({ declarations: [ @@ -52,7 +53,8 @@ import { NetworkMock } from './providers/network'; // Use platform instead of CoreAppProvider to prevent circular dependencies. return platform.is('cordova') ? new Network() : new NetworkMock(); } - } + }, + InAppBrowser ] }) export class CoreEmulatorModule { diff --git a/src/lang/en.json b/src/lang/en.json index 98b65f8b5..415978003 100644 --- a/src/lang/en.json +++ b/src/lang/en.json @@ -150,6 +150,7 @@ "now" : "now", "numwords": "{{$a}} words", "offline": "Offline", + "ok": "OK", "online": "Online", "openfullimage": "Click here to display the image at full size", "openinbrowser": "Open in browser", diff --git a/src/providers/utils/dom.ts b/src/providers/utils/dom.ts new file mode 100644 index 000000000..cbb94dc8b --- /dev/null +++ b/src/providers/utils/dom.ts @@ -0,0 +1,830 @@ +// (C) Copyright 2015 Martin Dougiamas +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import { Injectable } from '@angular/core'; +import { LoadingController, Loading, ToastController, Toast, AlertController, Alert, Platform } from 'ionic-angular'; +import { TranslateService } from '@ngx-translate/core'; +import { CoreTextUtilsProvider } from './text'; +import { CoreAppProvider } from '../app'; +import { CoreConfigProvider } from '../config'; +import { CoreUrlUtilsProvider } from './url'; +import { CoreConstants } from '../../core/constants'; + +/* + * "Utils" service with helper functions for UI, DOM elements and HTML code. + */ +@Injectable() +export class CoreDomUtilsProvider { + element = document.createElement('div'); // Fake element to use in some functions, to prevent re-creating it each time. + matchesFn: string; // Name of the "matches" function to use when simulating a closest call. + inputSupportKeyboard = ['date', 'datetime', 'datetime-local', 'email', 'month', 'number', 'password', + 'search', 'tel', 'text', 'time', 'url', 'week']; + + constructor(private translate: TranslateService, private loadingCtrl: LoadingController, private toastCtrl: ToastController, + private alertCtrl: AlertController, private textUtils: CoreTextUtilsProvider, private appProvider: CoreAppProvider, + private platform: Platform, private configProvider: CoreConfigProvider, private urlUtils: CoreUrlUtilsProvider) {} + + /** + * Wraps a message with mm-format-text if the message contains HTML tags. + * + * @param {string} message Message to wrap. + * @return {string} Result message. + */ + private addFormatTextIfNeeded(message: string) : string { + if (this.textUtils.hasHTMLTags(message)) { + return '' + message + ''; + } + return message; + } + + /** + * Equivalent to element.closest(). If the browser doesn't support element.closest, it will + * traverse the parents to achieve the same functionality. + * Returns the closest ancestor of the current element (or the current element itself) which matches the selector. + * + * @param {HTMLElement} element DOM Element. + * @param {string} selector Selector to search. + * @return {Element} Closest ancestor. + */ + closest(element: HTMLElement, selector: string) : Element { + // Try to use closest if the browser supports it. + if (typeof element.closest == 'function') { + return element.closest(selector); + } + + if (!this.matchesFn) { + // Find the matches function supported by the browser. + ['matches','webkitMatchesSelector','mozMatchesSelector','msMatchesSelector','oMatchesSelector'].some((fn) => { + if (typeof document.body[fn] == 'function') { + this.matchesFn = fn; + return true; + } + return false; + }); + + if (!this.matchesFn) { + return; + } + } + + // Traverse parents. + while (element) { + if (element[this.matchesFn](selector)) { + return element; + } + element = element.parentElement; + } + } + + /** + * If the download size is higher than a certain threshold shows a confirm dialog. + * + * @param {any} size Object containing size to download and a boolean to indicate if its totally or partialy calculated. + * @param {string} [message] Code of the message to show. Default: 'mm.course.confirmdownload'. + * @param {string} [unknownMessage] ID of the message to show if size is unknown. + * @param {number} [wifiThreshold] Threshold to show confirm in WiFi connection. Default: CoreWifiDownloadThreshold. + * @param {number} [limitedThreshold] Threshold to show confirm in limited connection. Default: CoreDownloadThreshold. + * @return {Promise} Promise resolved when the user confirms or if no confirm needed. + */ + confirmDownloadSize(size: any, message?: string, unknownMessage?: string, wifiThreshold?: number, limitedThreshold?: number) + : Promise { + wifiThreshold = typeof wifiThreshold == 'undefined' ? CoreConstants.wifiDownloadThreshold : wifiThreshold; + limitedThreshold = typeof limitedThreshold == 'undefined' ? CoreConstants.downloadThreshold : limitedThreshold; + + if (size.size < 0 || (size.size == 0 && !size.total)) { + // Seems size was unable to be calculated. Show a warning. + unknownMessage = unknownMessage || 'mm.course.confirmdownloadunknownsize'; + return this.showConfirm(this.translate.instant(unknownMessage)); + } else if (!size.total) { + // Filesize is only partial. + let readableSize = this.textUtils.bytesToSize(size.size, 2); + return this.showConfirm(this.translate.instant('mm.course.confirmpartialdownloadsize', {size: readableSize})); + } else if (size.size >= wifiThreshold || (this.appProvider.isNetworkAccessLimited() && size.size >= limitedThreshold)) { + message = message || 'mm.course.confirmdownload'; + let readableSize = this.textUtils.bytesToSize(size.size, 2); + return this.showConfirm(this.translate.instant(message, {size: readableSize})); + } + return Promise.resolve(); + } + + /** + * Extract the downloadable URLs from an HTML code. + * + * @param {string} html HTML code. + * @return {string[]} List of file urls. + */ + extractDownloadableFilesFromHtml(html: string) : string[] { + let elements, + urls = []; + + this.element.innerHTML = html; + elements = this.element.querySelectorAll('a, img, audio, video, source, track'); + + for (let i in elements) { + let element = elements[i], + url = element.tagName === 'A' ? element.href : element.src; + + if (url && this.urlUtils.isDownloadableUrl(url) && urls.indexOf(url) == -1) { + urls.push(url); + } + + // Treat video poster. + if (element.tagName == 'VIDEO' && element.getAttribute('poster')) { + url = element.getAttribute('poster'); + if (url && this.urlUtils.isDownloadableUrl(url) && urls.indexOf(url) == -1) { + urls.push(url); + } + } + } + + return urls; + } + + /** + * Extract the downloadable URLs from an HTML code and returns them in fake file objects. + * + * @param {string} html HTML code. + * @return {any[]} List of fake file objects with file URLs. + */ + extractDownloadableFilesFromHtmlAsFakeFileObjects(html: string) : any[] { + let urls = this.extractDownloadableFilesFromHtml(html); + // Convert them to fake file objects. + return urls.map((url) => { + return { + fileurl: url + }; + }); + } + + /** + * Search all the URLs in a CSS file content. + * + * @param {string} code CSS code. + * @return {string[]} List of URLs. + */ + extractUrlsFromCSS(code: string) : string[] { + // First of all, search all the url(...) occurrences that don't include "data:". + let urls = [], + matches = code.match(/url\(\s*["']?(?!data:)([^)]+)\)/igm); + + // Extract the URL form each match. + matches.forEach((match) => { + let submatches = match.match(/url\(\s*['"]?([^'"]*)['"]?\s*\)/im); + if (submatches && submatches[1]) { + urls.push(submatches[1]); + } + }); + + return urls; + } + + /** + * Focus an element and open keyboard. + * + * @param {HTMLElement} el HTML element to focus. + */ + focusElement(el: HTMLElement) : void { + if (el && el.focus) { + el.focus(); + if (this.platform.is('android') && this.supportsInputKeyboard(el)) { + // On some Android versions the keyboard doesn't open automatically. + this.appProvider.openKeyboard(); + } + } + } + + /** + * Formats a size to be used as width/height of an element. + * If the size is already valid (like '500px' or '50%') it won't be modified. + * Returned size will have a format like '500px'. + * + * @param {any} size Size to format. + * @return {string} Formatted size. If size is not valid, returns an empty string. + */ + formatPixelsSize(size: any) : string { + if (typeof size == 'string' && (size.indexOf('px') > -1 || size.indexOf('%') > -1)) { + // It seems to be a valid size. + return size; + } + + size = parseInt(size, 10); + if (!isNaN(size)) { + return size + 'px'; + } + return ''; + } + + /** + * Returns the contents of a certain selection in a DOM element. + * + * @param {HTMLElement} element DOM element to search in. + * @param {string} selector Selector to search. + * @return {string} Selection contents. Undefined if not found. + */ + getContentsOfElement(element: HTMLElement, selector: string) : string { + if (element) { + let selected = element.querySelector(selector); + if (selected) { + return selected.innerHTML; + } + } + } + + /** + * Returns height of an element. + * + * @param {any} element DOM element to measure. + * @param {boolean} [usePadding] Whether to use padding to calculate the measure. + * @param {boolean} [useMargin] Whether to use margin to calculate the measure. + * @param {boolean} [useBorder] Whether to use borders to calculate the measure. + * @param {boolean} [innerMeasure] If inner measure is needed: padding, margin or borders will be substracted. + * @return {number} Height in pixels. + */ + getElementHeight(element: any, usePadding?: boolean, useMargin?: boolean, useBorder?: boolean, + innerMeasure?: boolean) : number { + return this.getElementMeasure(element, false, usePadding, useMargin, useBorder, innerMeasure); + } + + /** + * Returns height or width of an element. + * + * @param {any} element DOM element to measure. + * @param {boolean} [isWidth] Whether to get width or height. + * @param {boolean} [usePadding] Whether to use padding to calculate the measure. + * @param {boolean} [useMargin] Whether to use margin to calculate the measure. + * @param {boolean} [useBorder] Whether to use borders to calculate the measure. + * @param {boolean} [innerMeasure] If inner measure is needed: padding, margin or borders will be substracted. + * @return {number} Measure in pixels. + */ + getElementMeasure(element: any, getWidth?: boolean, usePadding?: boolean, useMargin?: boolean, useBorder?: boolean, + innerMeasure?: boolean) : number { + + let offsetMeasure = getWidth ? 'offsetWidth' : 'offsetHeight', + measureName = getWidth ? 'width' : 'height', + clientMeasure = getWidth ? 'clientWidth' : 'clientHeight', + priorSide = getWidth ? 'Left' : 'Top', + afterSide = getWidth ? 'Right' : 'Bottom', + measure = element[offsetMeasure] || element[measureName] || element[clientMeasure] || 0; + + // Measure not correctly taken. + if (measure <= 0) { + let style = getComputedStyle(element); + if (style && style.display == '') { + element.style.display = 'inline-block'; + measure = element[offsetMeasure] || element[measureName] || element[clientMeasure] || 0; + element.style.display = ''; + } + } + + if (usePadding || useMargin || useBorder) { + let surround = 0, + computedStyle = getComputedStyle(element); + if (usePadding) { + surround += parseInt(computedStyle['padding' + priorSide], 10) + parseInt(computedStyle['padding' + afterSide], 10); + } + if (useMargin) { + surround += parseInt(computedStyle['margin' + priorSide], 10) + parseInt(computedStyle['margin' + afterSide], 10); + } + if (useBorder) { + surround += parseInt(computedStyle['border' + priorSide], 10) + parseInt(computedStyle['border' + afterSide], 10); + } + if (innerMeasure) { + measure = measure > surround ? measure - surround : 0; + } else { + measure += surround; + } + } + + return measure; + + } + + /** + * Returns width of an element. + * + * @param {any} element DOM element to measure. + * @param {boolean} [usePadding] Whether to use padding to calculate the measure. + * @param {boolean} [useMargin] Whether to use margin to calculate the measure. + * @param {boolean} [useBorder] Whether to use borders to calculate the measure. + * @param {boolean} [innerMeasure] If inner measure is needed: padding, margin or borders will be substracted. + * @return {number} Width in pixels. + */ + getElementWidth(element: any, usePadding?: boolean, useMargin?: boolean, useBorder?: boolean, + innerMeasure?: boolean) : number { + return this.getElementMeasure(element, true, usePadding, useMargin, useBorder, innerMeasure); + } + + /** + * Retrieve the position of a element relative to another element. + * + * @param {HTMLElement} container Element to search in. + * @param {string} [selector] Selector to find the element to gets the position. + * @param {string} [positionParentClass] Parent Class where to stop calculating the position. Default scroll-content. + * @return {number[]} positionLeft, positionTop of the element relative to. + */ + getElementXY(container: HTMLElement, selector?: string, positionParentClass?: string) : number[] { + let element: HTMLElement = (selector ? container.querySelector(selector) : container), + offsetElement, + positionTop = 0, + positionLeft = 0; + + if (!positionParentClass) { + positionParentClass = 'scroll-content'; + } + + if (!element) { + return null; + } + + while (element) { + positionLeft += (element.offsetLeft - element.scrollLeft + element.clientLeft); + positionTop += (element.offsetTop - element.scrollTop + element.clientTop); + + offsetElement = element.offsetParent; + element = element.parentElement; + + // Every parent class has to be checked but the position has to be got form offsetParent. + while (offsetElement != element && element) { + // If positionParentClass element is reached, stop adding tops. + if (element.className.indexOf(positionParentClass) != -1) { + element = null; + } else { + element = element.parentElement; + } + } + + // Finally, check again. + if (element.className.indexOf(positionParentClass) != -1) { + element = null; + } + } + + return [positionLeft, positionTop]; + } + + /** + * Given an error message, return a suitable error title. + * + * @param {string} message The error message. + * @return {string} Title. + */ + private getErrorTitle(message: string) : string { + if (message == this.translate.instant('mm.core.networkerrormsg') || + message == this.translate.instant('mm.fileuploader.errormustbeonlinetoupload')) { + return '\ + '; + } + return this.textUtils.decodeHTML(this.translate.instant('mm.core.error')); + } + + /** + * Check if an element is outside of screen (viewport). + * + * @param {HTMLElement} scrollEl The element that must be scrolled. + * @param {HTMLElement} element DOM element to check. + * @return {boolean} Whether the element is outside of the viewport. + */ + isElementOutsideOfScreen(scrollEl: HTMLElement, element: HTMLElement) : boolean { + let elementRect = element.getBoundingClientRect(), + elementMidPoint, + scrollElRect, + scrollTopPos = 0; + + if (!elementRect) { + return false; + } + + elementMidPoint = Math.round((elementRect.bottom + elementRect.top) / 2); + + scrollElRect = scrollEl.getBoundingClientRect(); + scrollTopPos = (scrollElRect && scrollElRect.top) || 0; + + return elementMidPoint > window.innerHeight || elementMidPoint < scrollTopPos; + } + + /** + * Check if rich text editor is enabled. + * + * @return {Promise} Promise resolved with boolean: true if enabled, false otherwise. + */ + isRichTextEditorEnabled() : Promise { + if (this.isRichTextEditorSupported()) { + return this.configProvider.get(CoreConstants.settingsRichTextEditor, true); + } + + return Promise.resolve(false); + } + + /** + * Check if rich text editor is supported in the platform. + * + * @return {boolean} Whether it's supported. + */ + isRichTextEditorSupported() : boolean { + // Disabled just for iOS. + return !this.platform.is('ios'); + } + + /** + * Search and remove a certain element from inside another element. + * + * @param {HTMLElement} element DOM element to search in. + * @param {string} selector Selector to search. + */ + removeElement(element: HTMLElement, selector: string) : void { + if (element) { + let selected = element.querySelector(selector); + if (selected) { + selected.remove(); + } + } + } + + /** + * Search and remove a certain element from an HTML code. + * + * @param {string} html HTML code to change. + * @param {string} selector Selector to search. + * @param {boolean} [removeAll] True if it should remove all matches found, false if it should only remove the first one. + * @return {string} HTML without the element. + */ + removeElementFromHtml(html: string, selector: string, removeAll?: boolean) : string { + let selected; + + this.element.innerHTML = html; + + if (removeAll) { + selected = this.element.querySelectorAll(selector); + for (let i in selected) { + selected[i].remove(); + } + } else { + selected = this.element.querySelector(selector); + if (selected) { + selected.remove(); + } + } + + return this.element.innerHTML; + } + + /** + * Search for certain classes in an element contents and replace them with the specified new values. + * + * @param {HTMLElement} element DOM element. + * @param {any} map Mapping of the classes to replace. Keys must be the value to replace, values must be + * the new class name. Example: {'correct': 'mm-question-answer-correct'}. + */ + replaceClassesInElement(element: HTMLElement, map: any) : void { + for (let key in map) { + let foundElements = element.querySelectorAll('.' + key); + + for (let i in foundElements) { + let foundElement = foundElements[i]; + foundElement.className = foundElement.className.replace(key, map[key]); + } + } + } + + /** + * Given an HTML, search all links and media and tries to restore original sources using the paths object. + * + * @param {string} html HTML code. + * @param {object} paths Object linking URLs in the html code with the real URLs to use. + * @param {Function} [anchorFn] Function to call with each anchor. Optional. + * @return {string} Treated HTML code. + */ + restoreSourcesInHtml(html: string, paths: object, anchorFn?: Function) : string { + let media, + anchors; + + this.element.innerHTML = html; + + // Treat elements with src (img, audio, video, ...). + media = this.element.querySelectorAll('img, video, audio, source, track'); + for (let i in media) { + let el = media[i], + newSrc = paths[this.textUtils.decodeURIComponent(el.getAttribute('src'))]; + + if (typeof newSrc != 'undefined') { + el.setAttribute('src', newSrc); + } + + // Treat video posters. + if (el.tagName == 'VIDEO' && el.getAttribute('poster')) { + newSrc = paths[this.textUtils.decodeURIComponent(el.getAttribute('poster'))]; + if (typeof newSrc !== 'undefined') { + el.setAttribute('poster', newSrc); + } + } + } + + // Now treat links. + anchors = this.element.querySelectorAll('a'); + for (let i in anchors) { + let anchor = anchors[i], + href = this.textUtils.decodeURIComponent(anchor.getAttribute('href')), + newUrl = paths[href]; + + if (typeof newUrl != 'undefined') { + anchor.setAttribute('href', newUrl); + + if (typeof anchorFn == 'function') { + anchorFn(anchor, href); + } + } + } + + return this.element.innerHTML; + } + + /** + * Scroll to a certain element inside another element. + * + * @param {HTMLElement} scrollEl The element that must be scrolled. + * @param {HTMLElement} container Element to search in. + * @param {string} [selector] Selector to find the element to scroll to. If not defined, scroll to the container. + * @param {string} [scrollParentClass] Parent class where to stop calculating the position. Default scroll-content. + * @return {boolean} True if the element is found, false otherwise. + */ + scrollToElement(scrollEl: HTMLElement, container: HTMLElement, selector?: string, scrollParentClass?: string) : boolean { + let position = this.getElementXY(container, selector, scrollParentClass); + if (!position) { + return false; + } + + scrollEl.scrollTo(position[0], position[1]); + return true; + } + + /** + * Search for an input with error (mm-input-error directive) and scrolls to it if found. + * + * @param {HTMLElement} scrollEl The element that must be scrolled. + * @param {HTMLElement} container Element to search in. + * @param [scrollParentClass] Parent class where to stop calculating the position. Default scroll-content. + * @return {boolean} True if the element is found, false otherwise. + */ + scrollToInputError(scrollEl: HTMLElement, container: HTMLElement, scrollParentClass?: string) : boolean { + // @todo + return true; + // Wait an instant to make sure errors are shown and scroll to the element. + // return $timeout(function() { + // if (!scrollDelegate) { + // scrollDelegate = $ionicScrollDelegate; + // } + + // scrollDelegate.resize(); + // return self.scrollToElement(container, '.mm-input-has-errors', scrollDelegate, scrollParentClass); + // }, 100); + } + + /** + * Show an alert modal with a button to close it. + * + * @param {string} title Title to show. + * @param {string} message Message to show. + * @param {string} [buttonText] Text of the button. + * @param {number} [autocloseTime] Number of milliseconds to wait to close the modal. If not defined, modal won't be closed. + * @return {Alert} The alert modal. + */ + showAlert(title: string, message: string, buttonText?: string, autocloseTime?: number) : Alert { + let alert = this.alertCtrl.create({ + title: title, + message: this.addFormatTextIfNeeded(message), // Add format-text to handle links. + buttons: [buttonText || this.translate.instant('mm.core.ok')] + }); + + alert.present(); + + if (autocloseTime > 0) { + setTimeout(() => { + alert.dismiss(); + }, autocloseTime); + } + + return alert; + } + + /** + * Show an alert modal with a button to close it, translating the values supplied. + * + * @param {string} title Title to show. + * @param {string} message Message to show. + * @param {string} [buttonText] Text of the button. + * @param {number} [autocloseTime] Number of milliseconds to wait to close the modal. If not defined, modal won't be closed. + * @return {Alert} The alert modal. + */ + showAlertTranslated(title: string, message: string, buttonText?: string, autocloseTime?: number) : Alert { + title = title ? this.translate.instant(title) : title; + message = message ? this.translate.instant(message) : message; + buttonText = buttonText ? this.translate.instant(buttonText) : buttonText; + + return this.showAlert(title, message, buttonText, autocloseTime); + } + + /** + * Show a confirm modal. + * + * @param {string} message Message to show in the modal body. + * @param {string} [title] Title of the modal. + * @param {string} [okText] Text of the OK button. + * @param {string} [cancelText] Text of the Cancel button. + * @param {any} [options] More options. See https://ionicframework.com/docs/api/components/alert/AlertController/ + * @return {Promise} Promise resolved if the user confirms and rejected if he cancels. + */ + showConfirm(message: string, title?: string, okText?: string, cancelText?: string, options?: any) : Promise { + return new Promise((resolve, reject) => { + options = options || {}; + + options.message = this.addFormatTextIfNeeded(message); // Add format-text to handle links. + options.title = title; + if (!title) { + options.cssClass = 'mm-nohead'; + } + options.buttons = [ + { + text: cancelText || this.translate.instant('mm.core.cancel'), + role: 'cancel', + handler: () => { + reject(); + } + }, + { + text: okText || this.translate.instant('mm.core.ok'), + handler: () => { + resolve(); + } + } + ]; + + this.alertCtrl.create(options).present(); + }); + } + + /** + * Show an alert modal with an error message. + * + * @param {any} error Message to show. + * @param {boolean} [needsTranslate] Whether the error needs to be translated. + * @param {number} [autocloseTime] Number of milliseconds to wait to close the modal. If not defined, modal won't be closed. + * @return {Alert} The alert modal. + */ + showErrorModal(error: any, needsTranslate?: boolean, autocloseTime?: number) : Alert { + if (typeof error == 'object') { + // We received an object instead of a string. Search for common properties. + if (typeof error.content != 'undefined') { + error = error.content; + } else if (typeof error.body != 'undefined') { + error = error.body; + } else if (typeof error.message != 'undefined') { + error = error.message; + } else if (typeof error.error != 'undefined') { + error = error.error; + } else { + // No common properties found, just stringify it. + error = JSON.stringify(error); + } + + // Try to remove tokens from the contents. + let matches = error.match(/token"?[=|:]"?(\w*)/, ''); + if (matches && matches[1]) { + error = error.replace(new RegExp(matches[1], 'g'), 'secret'); + } + } + + let message = this.textUtils.decodeHTML(needsTranslate ? this.translate.instant(error) : error); + return this.showAlert(this.getErrorTitle(message), message, null, autocloseTime); + } + + /** + * Show an alert modal with an error message. It uses a default message if error is not a string. + * + * @param {any} error Message to show. + * @param {any} [defaultError] Message to show if the error is not a string. + * @param {boolean} [needsTranslate] Whether the error needs to be translated. + * @param {number} [autocloseTime] Number of milliseconds to wait to close the modal. If not defined, modal won't be closed. + * @return {Alert} The alert modal. + */ + showErrorModalDefault(error: any, defaultError: any, needsTranslate?: boolean, autocloseTime?: number) : Alert { + if (error != CoreConstants.dontShowError) { + error = typeof error == 'string' ? error : defaultError; + return this.showErrorModal(error, needsTranslate, autocloseTime); + } + } + + /** + * Displays a loading modal window. + * + * @param {string} [text] The text of the modal window. Default: mm.core.loading. + * @param {boolean} [needsTranslate] Whether the 'text' needs to be translated. + * @return {Loading} Loading modal instance. + * @description + * Usage: + * let modal = domUtils.showModalLoading(myText); + * ... + * modal.dismiss(); + */ + showModalLoading(text?: string, needsTranslate?: boolean) : Loading { + if (!text) { + text = this.translate.instant('mm.core.loading'); + } else if (needsTranslate) { + text = this.translate.instant(text); + } + + let loader = this.loadingCtrl.create({ + content: text + }); + + loader.present(); + + return loader; + } + + /** + * Show a prompt modal to input some data. + * + * @param {string} message Modal message. + * @param {string} [title] Modal title. + * @param {string} [placeholder] Placeholder of the input element. By default, "Password". + * @param {string} [type] Type of the input element. By default, password. + * @return {Promise} Promise resolved with the input data if the user clicks OK, rejected if cancels. + */ + showPrompt(message: string, title?: string, placeholder?: string, type = 'password') : Promise { + return new Promise((resolve, reject) => { + this.alertCtrl.create({ + message: this.addFormatTextIfNeeded(message), // Add format-text to handle links. + title: title, + inputs: [ + { + name: 'promptinput', + placeholder: placeholder || this.translate.instant('mm.login.password'), + type: type + } + ], + buttons: [ + { + text: this.translate.instant('mm.core.cancel'), + role: 'cancel', + handler: () => { + reject(); + } + }, + { + text: this.translate.instant('mm.core.ok'), + handler: (data) => { + resolve(data.promptinput); + } + } + ] + }).present(); + }); + } + + /** + * Displays an autodimissable toast modal window. + * + * @param {string} text The text of the toast. + * @param {boolean} [needsTranslate] Whether the 'text' needs to be translated. + * @param {number} [duration=2000] Duration in ms of the dimissable toast. + * @return {Toast} Toast instance. + */ + showToast(text: string, needsTranslate?: boolean, duration = 2000) : Toast { + if (needsTranslate) { + text = this.translate.instant(text); + } + + let loader = this.toastCtrl.create({ + message: text, + duration: duration, + position: 'bottom', + dismissOnPageChange: true + }); + + loader.present(); + + return loader; + } + + /** + * Check if an element supports input via keyboard. + * + * @param {any} el HTML element to check. + * @return {boolean} Whether it supports input using keyboard. + */ + supportsInputKeyboard(el: any) : boolean { + return el && !el.disabled && (el.tagName.toLowerCase() == 'textarea' || + (el.tagName.toLowerCase() == 'input' && this.inputSupportKeyboard.indexOf(el.type) != -1)); + } +} diff --git a/src/providers/utils/mimetype.ts b/src/providers/utils/mimetype.ts new file mode 100644 index 000000000..e8fe9861b --- /dev/null +++ b/src/providers/utils/mimetype.ts @@ -0,0 +1,471 @@ +// (C) Copyright 2015 Martin Dougiamas +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import { Injectable } from '@angular/core'; +import { HttpClient } from '@angular/common/http'; +import { CoreLoggerProvider } from '../logger'; +import { TranslateService } from '@ngx-translate/core'; +import { CoreTextUtilsProvider } from './text'; + +/* + * "Utils" service with helper functions for mimetypes and extensions. + */ +@Injectable() +export class CoreMimetypeUtilsProvider { + logger; + extToMime = {}; // Object to map extensions -> mimetypes. + mimeToExt = {}; // Object to map mimetypes -> extensions. + groupsMimeInfo = {}; // Object to hold extensions and mimetypes that belong to a certain "group" (audio, video, ...). + extensionRegex = /^[a-z0-9]+$/; + wsProvider: any = {}; // @todo + + constructor(http: HttpClient, logger: CoreLoggerProvider, private translate: TranslateService, + private textUtils: CoreTextUtilsProvider) { + this.logger = logger.getInstance('CoreMimetypeUtilsProvider'); + + http.get('assets/exttomime.json').subscribe((result) => { + this.extToMime = result; + }, (err) => { + // Error, shouldn't happen. + }); + + http.get('assets/mimetoext.json').subscribe((result) => { + this.mimeToExt = result; + }, (err) => { + // Error, shouldn't happen. + }); + } + + /** + * Check if a file extension can be embedded without using iframes. + * + * @param {string} extension Extension. + * @return {boolean} Whether it can be embedded. + */ + canBeEmbedded(extension: string) : boolean { + return this.isExtensionInGroup(extension, ['web_image', 'web_video', 'web_audio']); + } + + /** + * Clean a extension, removing the dot, hash, extra params... + * + * @param {string} extension Extension to clean. + * @return {string} Clean extension. + */ + cleanExtension(extension: string) : string { + if (!extension) { + return extension; + } + + // If the extension has parameters, remove them. + let position = extension.indexOf('?'); + if (position > -1) { + extension = extension.substr(0, position); + } + + // Remove hash in extension if there's any (added by filepool). + extension = extension.replace(/_.{32}$/, ''); + + // Remove dot from the extension if found. + if (extension && extension[0] == '.') { + extension = extension.substr(1); + } + + return extension; + } + + /** + * Fill the mimetypes and extensions info for a certain group. + * + * @param {string} group Group name. + */ + protected fillGroupMimeInfo(group: string) : void { + let mimetypes = {}, // Use an object to prevent duplicates. + extensions = []; // Extensions are unique. + + for (let extension in this.extToMime) { + let data = this.extToMime[extension]; + if (data.type && data.groups && data.groups.indexOf(group) != -1) { + // This extension has the group, add it to the list. + mimetypes[data.type] = true; + extensions.push(extension); + } + } + + this.groupsMimeInfo[group] = { + mimetypes: Object.keys(mimetypes), + extensions: extensions + }; + } + + /** + * Get the extension of a mimetype. Returns undefined if not found. + * + * @param {string} mimetype Mimetype. + * @param {string} [url] URL of the file. It will be used if there's more than one possible extension. + * @return {string} Extension. + */ + getExtension(mimetype: string, url?: string) : string { + mimetype = mimetype || ''; + mimetype = mimetype.split(';')[0]; // Remove codecs from the mimetype if any. + + if (mimetype == 'application/x-forcedownload' || mimetype == 'application/forcedownload') { + // Couldn't get the right mimetype, try to guess it. + return this.guessExtensionFromUrl(url); + } + + let extensions = this.mimeToExt[mimetype]; + if (extensions && extensions.length) { + if (extensions.length > 1 && url) { + // There's more than one possible extension. Check if the URL has extension. + let candidate = this.guessExtensionFromUrl(url); + if (extensions.indexOf(candidate) != -1) { + return candidate; + } + } + return extensions[0]; + } + } + + /** + * Get the "type" (string) of an extension, something like "image", "video" or "audio". + * + * @param {string} extension Extension. + * @return {string} Type of the extension. + */ + getExtensionType(extension: string) : string { + extension = this.cleanExtension(extension); + + if (this.extToMime[extension] && this.extToMime[extension].string) { + return this.extToMime[extension].string; + } + } + + /** + * Get all the possible extensions of a mimetype. Returns empty array if not found. + * + * @param {string} mimetype Mimetype. + * @return {string[]} Extensions. + */ + getExtensions(mimetype: string) : string[] { + mimetype = mimetype || ''; + mimetype = mimetype.split(';')[0]; // Remove codecs from the mimetype if any. + return this.mimeToExt[mimetype] || []; + } + + /** + * Get a file icon URL based on its file name. + * + * @param {string} The name of the file. + * @return {string} The path to a file icon. + */ + getFileIcon(filename: string) : string { + let ext = this.getFileExtension(filename), + icon = 'unknown'; + + if (ext && this.extToMime[ext]) { + if (this.extToMime[ext].icon) { + icon = this.extToMime[ext].icon; + } else { + let type = this.extToMime[ext].type.split('/')[0]; + if (type == 'video' || type == 'text' || type == 'image' || type == 'document' || type == 'audio') { + icon = type; + } + } + } + + return 'img/files/' + icon + '-64.png'; + } + + /** + * Get the folder icon URL. + * + * @return {string} The path to a folder icon. + */ + getFolderIcon() : string { + return 'img/files/folder-64.png'; + } + + /** + * Get the mimetype of a file given its URL. It'll try to guess it using the URL, if that fails then it'll + * perform a HEAD request to get it. It's done in this order because pluginfile.php can return wrong mimetypes. + * + * @param {string} url The URL of the file. + * @return {Promise} Promise resolved with the mimetype. + */ + getMimeTypeFromUrl(url: string) : Promise { + // First check if it can be guessed from the URL. + let extension = this.guessExtensionFromUrl(url), + mimetype = this.getMimeType(extension); + + if (mimetype) { + return Promise.resolve(mimetype); + } + + // Can't be guessed, get the remote mimetype. + return this.wsProvider.getRemoteFileMimeType(url).then((mimetype) => { + return mimetype || ''; + }); + } + + /** + * Guess the extension of a file from its URL. + * This is very weak and unreliable. + * + * @param {string} fileUrl The file URL. + * @return {string} The lowercased extension without the dot, or undefined. + */ + guessExtensionFromUrl(fileUrl: string) : string { + let split = fileUrl.split('.'), + candidate, + extension, + position; + + if (split.length > 1) { + candidate = split.pop().toLowerCase(); + // Remove params if any. + position = candidate.indexOf('?'); + if (position > -1) { + candidate = candidate.substr(0, position); + } + + if (this.extensionRegex.test(candidate)) { + extension = candidate; + } + } + + // Check extension corresponds to a mimetype to know if it's valid. + if (extension && typeof this.getMimeType(extension) == 'undefined') { + this.logger.warn('Guess file extension: Not valid extension ' + extension); + return; + } + + return extension; + } + + /** + * Returns the file extension of a file. + * When the file does not have an extension, it returns undefined. + * + * @param {string} filename The file name. + * @return {string} The lowercased extension, or undefined. + */ + getFileExtension(filename: string) : string { + let dot = filename.lastIndexOf("."), + ext; + + if (dot > -1) { + ext = filename.substr(dot + 1).toLowerCase(); + ext = this.cleanExtension(ext); + + // Check extension corresponds to a mimetype to know if it's valid. + if (typeof this.getMimeType(ext) == 'undefined') { + this.logger.warn('Get file extension: Not valid extension ' + ext); + return; + } + } + + return ext; + } + + /** + * Get the mimetype/extension info belonging to a certain group. + * + * @param {string} group Group name. + * @param {string} [field] The field to get. If not supplied, all the info will be returned. + * @return {any} Info for the group. + */ + getGroupMimeInfo(group: string, field?: string) : any { + if (typeof this.groupsMimeInfo[group] == 'undefined') { + this.fillGroupMimeInfo(group); + } + + if (field) { + return this.groupsMimeInfo[group][field]; + } + return this.groupsMimeInfo[group]; + } + + /** + * Get the mimetype of an extension. Returns undefined if not found. + * + * @param {string} extension Extension. + * @return {string} Mimetype. + */ + getMimeType(extension: string) : string { + extension = this.cleanExtension(extension); + + if (this.extToMime[extension] && this.extToMime[extension].type) { + return this.extToMime[extension].type; + } + } + + /** + * Obtains descriptions for file types (e.g. 'Microsoft Word document') from the language file. + * Based on Moodle's get_mimetype_description. + * + * @param {any} obj Instance of FileEntry OR object with 'filename' and 'mimetype' OR string with mimetype. + * @param {boolean} [capitalise] If true, capitalises first character of result. + * @return {string} Type description. + */ + getMimetypeDescription(obj: any, capitalise?: boolean) : string { + let filename = '', + mimetype = '', + extension = '', + langPrefix = 'mm.core.mimetype-'; + + if (typeof obj == 'object' && typeof obj.file == 'function') { + // It's a FileEntry. Don't use the file function because it's asynchronous and the type isn't reliable. + filename = obj.name; + } else if (typeof obj == 'object') { + filename = obj.filename || ''; + mimetype = obj.mimetype || ''; + } else { + mimetype = obj; + } + + if (filename) { + extension = this.getFileExtension(filename); + + if (!mimetype) { + // Try to calculate the mimetype using the extension. + mimetype = this.getMimeType(extension); + } + } + + if (!mimetype) { + // Don't have the mimetype, stop. + return ''; + } + + if (!extension) { + extension = this.getExtension(mimetype); + } + + let mimetypeStr = this.getMimetypeType(mimetype) || '', + chunks = mimetype.split('/'), + attr = { + mimetype: mimetype, + ext: extension || '', + mimetype1: chunks[0], + mimetype2: chunks[1] || '', + }, + translateParams = {}; + + for (let key in attr) { + let value = attr[key]; + translateParams[key] = value; + translateParams[key.toUpperCase()] = value.toUpperCase(); + translateParams[this.textUtils.ucFirst(key)] = this.textUtils.ucFirst(value); + } + + // MIME types may include + symbol but this is not permitted in string ids. + let safeMimetype = mimetype.replace(/\+/g, '_'), + safeMimetypeStr = mimetypeStr.replace(/\+/g, '_'), + safeMimetypeTrns = this.translate.instant(langPrefix + safeMimetype, {$a: translateParams}), + safeMimetypeStrTrns = this.translate.instant(langPrefix + safeMimetypeStr, {$a: translateParams}), + defaultTrns = this.translate.instant(langPrefix + 'default', {$a: translateParams}), + result = mimetype; + + if (safeMimetypeTrns != langPrefix + safeMimetype) { + result = safeMimetypeTrns; + } else if (safeMimetypeStrTrns != langPrefix + safeMimetypeStr) { + result = safeMimetypeStrTrns; + } else if (defaultTrns != langPrefix + 'default') { + result = defaultTrns; + } + + if (capitalise) { + result = this.textUtils.ucFirst(result); + } + + return result; + } + + /** + * Get the "type" (string) of a mimetype, something like "image", "video" or "audio". + * + * @param {string} mimetype Mimetype. + * @return {string} Type of the mimetype. + */ + getMimetypeType(mimetype: string) : string { + mimetype = mimetype.split(';')[0]; // Remove codecs from the mimetype if any. + + let extensions = this.mimeToExt[mimetype]; + if (!extensions) { + return; + } + + for (let i = 0; i < extensions.length; i++) { + let extension = extensions[i]; + if (this.extToMime[extension] && this.extToMime[extension].string) { + return this.extToMime[extension].string; + } + } + } + + /** + * Given a group name, return the translated name. + * + * @param {string} name Group name. + * @return {string} Translated name. + */ + getTranslatedGroupName(name: string) : string { + let key = 'mm.core.mimetype-group:' + name, + translated = this.translate.instant(key); + return translated != key ? translated : name; + } + + /** + * Check if an extension belongs to at least one of the groups. + * Similar to Moodle's file_mimetype_in_typegroup, but using the extension instead of mimetype. + * + * @param {string} extension Extension. + * @param {string[]} groups List of groups to check. + * @return {boolean} Whether the extension belongs to any of the groups. + */ + isExtensionInGroup(extension: string, groups: string[]) : boolean { + extension = this.cleanExtension(extension); + + if (groups && groups.length && this.extToMime[extension] && this.extToMime[extension].groups) { + for (let i = 0; i < this.extToMime[extension].groups.length; i++) { + let group = this.extToMime[extension].groups[i]; + if (groups.indexOf(group) != -1) { + return true; + } + } + } + return false; + } + + /** + * Remove the extension from a path (if any). + * + * @param {string} path Path. + * @return {string} Path without extension. + */ + removeExtension(path: string) : string { + let extension, + position = path.lastIndexOf('.'); + + if (position > -1) { + // Check extension corresponds to a mimetype to know if it's valid. + extension = path.substr(position + 1); + if (typeof this.getMimeType(extension) != 'undefined') { + return path.substr(0, position); // Remove extension. + } + } + return path; + } +} diff --git a/src/providers/utils/text.ts b/src/providers/utils/text.ts new file mode 100644 index 000000000..a8054ad68 --- /dev/null +++ b/src/providers/utils/text.ts @@ -0,0 +1,698 @@ +// (C) Copyright 2015 Martin Dougiamas +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import { Injectable } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; +import { CoreLangProvider } from '../lang'; + +/* + * "Utils" service with helper functions for text. +*/ +@Injectable() +export class CoreTextUtilsProvider { + element = document.createElement('div'); // Fake element to use in some functions, to prevent re-creating it each time. + + constructor(private translate: TranslateService, private langProvider: CoreLangProvider) {} + + /** + * Add or remove 'www' from a URL. The url needs to have http or https protocol. + * + * @param {string} url URL to modify. + * @return {string} Modified URL. + */ + addOrRemoveWWW(url: string) : string { + if (url) { + if (url.match(/http(s)?:\/\/www\./)) { + // Already has www. Remove it. + url = url.replace('www.', ''); + } else { + url = url.replace('https://', 'https://www.'); + url = url.replace('http://', 'http://www.'); + } + } + return url; + } + + /** + * Given a list of sentences, build a message with all of them wrapped in

. + * + * @param {string[]} messages Messages to show. + * @return {string} Message with all the messages. + */ + buildMessage(messages: string[]) : string { + let result = ''; + messages.forEach((message) => { + if (message) { + result += `

${message}

`; + } + }); + return result; + } + + /** + * Convert size in bytes into human readable format + * + * @param {number} bytes Number of bytes to convert. + * @param {number} [precision=2] Number of digits after the decimal separator. + * @return {string} Size in human readable format. + */ + bytesToSize(bytes: number, precision = 2) : string { + + if (typeof bytes == 'undefined' || bytes < 0) { + return this.translate.instant('mm.core.notapplicable'); + } + + if (precision < 0) { + precision = 2; + } + + let keys = ['mm.core.sizeb', 'mm.core.sizekb', 'mm.core.sizemb', 'mm.core.sizegb', 'mm.core.sizetb'], + units = this.translate.instant(keys), + pos = 0; + + if (bytes >= 1024) { + while (bytes >= 1024) { + pos++; + bytes = bytes / 1024; + } + // Round to "precision" decimals if needed. + bytes = Number(Math.round(parseFloat(bytes + 'e+' + precision)) + 'e-' + precision); + } + return this.translate.instant('mm.core.humanreadablesize', {size: bytes, unit: units[keys[pos]]}); + } + + /** + * Clean HTML tags. + * + * @param {string} text The text to be cleaned. + * @param {boolean} [singleLine] True if new lines should be removed (all the text in a single line). + * @return {string} Clean text. + */ + cleanTags(text: string, singleLine?: boolean) : string { + if (!text) { + return ''; + } + + // First, we use a regexpr. + text = text.replace(/(<([^>]+)>)/ig,""); + // Then, we rely on the browser. We need to wrap the text to be sure is HTML. + this.element.innerHTML = text; + text = this.element.textContent; + // Recover or remove new lines. + text = this.replaceNewLines(text, singleLine ? ' ' : '
'); + return text; + } + + /** + * Concatenate two paths, adding a slash between them if needed. + * + * @param {string} leftPath Left path. + * @param {string} rightPath Right path. + * @return {string} Concatenated path. + */ + concatenatePaths(leftPath: string, rightPath: string) : string { + if (!leftPath) { + return rightPath; + } else if (!rightPath) { + return leftPath; + } + + let lastCharLeft = leftPath.slice(-1), + firstCharRight = rightPath.charAt(0); + + if (lastCharLeft === '/' && firstCharRight === '/') { + return leftPath + rightPath.substr(1); + } else if(lastCharLeft !== '/' && firstCharRight !== '/') { + return leftPath + '/' + rightPath; + } else { + return leftPath + rightPath; + } + } + + /** + * Count words in a text. + * + * @param {string} text Text to count. + * @return {number} Number of words. + */ + countWords(text: string) : number { + // Clean HTML scripts and tags. + text = text.replace(/]*>([\S\s]*?)<\/script>/gmi, ''); + text = text.replace(/<\/?(?!\!)[^>]*>/gi, ''); + // Decode HTML entities. + text = this.decodeHTMLEntities(text); + // Replace underscores (which are classed as word characters) with spaces. + text = text.replace(/_/gi, " "); + + // This RegEx will detect any word change including Unicode chars. Some languages without spaces won't be counted fine. + return text.match(/\S+/gi).length; + } + + /** + * Decode an escaped HTML text. This implementation is based on PHP's htmlspecialchars_decode. + * + * @param {string|number} text Text to decode. + * @return {string} Decoded text. + */ + decodeHTML(text: string|number) : string { + if (typeof text == 'undefined' || text === null || (typeof text == 'number' && isNaN(text))) { + return ''; + } else if (typeof text != 'string') { + return '' + text; + } + + return text + .replace(/&/g, '&') + .replace(/</g, '<') + .replace(/>/g, '>') + .replace(/"/g, '"') + .replace(/'/g, "'") + .replace(/ /g, ' '); + } + + /** + * Decode HTML entities in a text. Equivalent to PHP html_entity_decode. + * + * @param {string} text Text to decode. + * @return {string} Decoded text. + */ + decodeHTMLEntities(text: string) : string { + if (text) { + this.element.innerHTML = text; + text = this.element.textContent; + this.element.textContent = ''; + } + + return text; + } + + /** + * Same as Javascript's decodeURI, but if an exception is thrown it will return the original URI. + * + * @param {string} uri URI to decode. + * @return {string} Decoded URI, or original URI if an exception is thrown. + */ + decodeURI(uri: string) : string { + try { + return decodeURI(uri); + } catch(ex) { + // Error, use the original URI. + } + return uri; + } + + /** + * Same as Javascript's decodeURIComponent, but if an exception is thrown it will return the original URI. + * + * @param {string} uri URI to decode. + * @return {string} Decoded URI, or original URI if an exception is thrown. + */ + decodeURIComponent(uri: string) : string { + try { + return decodeURIComponent(uri); + } catch(ex) { + // Error, use the original URI. + } + return uri; + } + + /** + * Escapes some characters in a string to be used as a regular expression. + * + * @param {string} text Text to escape. + * @return {string} Escaped text. + */ + escapeForRegex(text: string) : string { + if (!text) { + return ''; + } + return text.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&'); + } + + /** + * Escape an HTML text. This implementation is based on PHP's htmlspecialchars. + * + * @param {string|number} text Text to escape. + * @return {string} Escaped text. + */ + escapeHTML(text: string|number) : string { + if (typeof text == 'undefined' || text === null || (typeof text == 'number' && isNaN(text))) { + return ''; + } else if (typeof text != 'string') { + return '' + text; + } + + return text + .replace(/&/g, '&') + .replace(//g, '>') + .replace(/"/g, '"') + .replace(/'/g, '''); + } + + /** + * Shows a text on a new page. + * + * @param {string} title Title of the new state. + * @param {string} text Content of the text to be expanded. + * @param {boolean} [replaceLineBreaks] Whether to replace line breaks by
tag. + * @param {string} [component] Component to link the embedded files to. + * @param {string|number} [componentId] An ID to use in conjunction with the component. + */ + expandText(title: string, text: string, replaceLineBreaks?: boolean, component?: string, componentId?: string|number) : void { + if (text.length > 0) { + // Open a new page with the interpolated contents. + // @todo + // $state.go('site.mm_textviewer', { + // title: title, + // content: text, + // replacelinebreaks: replaceLineBreaks, + // component: component, + // componentId: componentId + // }); + } + } + + /** + * Formats a text, in HTML replacing new lines by correct html new lines. + * + * @param {string} text Text to format. + * @return {string} Formatted text. + */ + formatHtmlLines(text: string) : string { + let hasHTMLTags = this.hasHTMLTags(text); + if (text.indexOf('

') == -1) { + // Wrap the text in

tags. + text = '

' + text + '

'; + } + + if (!hasHTMLTags) { + // The text doesn't have HTML, replace new lines for
. + return this.replaceNewLines(text, '
'); + } + + return text; + } + + /** + * Formats a text, treating multilang tags and cleaning HTML if needed. + * + * @param {string} text Text to format. + * @param {boolean} [clean] Whether HTML tags should be removed. + * @param {boolean} [singleLine] Whether new lines should be removed. Only valid if clean is true. + * @param {number} [shortenLength] Number of characters to shorten the text. + * @return {Promise} Promise resolved with the formatted text. + */ + formatText(text: string, clean?: boolean, singleLine?: boolean, shortenLength?: number) : Promise { + return this.treatMultilangTags(text).then((formatted) => { + if (clean) { + formatted = this.cleanTags(formatted, singleLine); + } + if (shortenLength > 0) { + formatted = this.shortenText(formatted, shortenLength); + } + return formatted; + }); + } + + /** + * Formats a URL, trim, lowercase, etc... + * + * @param {string} url The url to be formatted. + * @return {string} Fromatted url. + */ + formatURL(url: string) : string { + url = url.trim(); + + // Check if the URL starts by http or https. + if (! /^http(s)?\:\/\/.*/i.test(url)) { + // Test first allways https. + url = 'https://' + url; + } + + // http allways in lowercase. + url = url.replace(/^http/i, 'http'); + url = url.replace(/^https/i, 'https'); + + // Replace last slash. + url = url.replace(/\/$/, ""); + + return url; + } + + /** + * Given a URL, returns what's after the last '/' without params. + * Example: + * http://mysite.com/a/course.html?id=1 -> course.html + * + * @param {string} url URL to treat. + * @return {string} Last file without params. + */ + getLastFileWithoutParams(url: string) : string { + let filename = url.substr(url.lastIndexOf('/') + 1); + if (filename.indexOf('?') != -1) { + filename = filename.substr(0, filename.indexOf('?')); + } + return filename; + } + + /** + * Get the pluginfile URL to replace @@PLUGINFILE@@ wildcards. + * + * @param {any[]} files Files to extract the URL from. They need to have the URL in a 'url' or 'fileurl' attribute. + * @return {string} Pluginfile URL, undefined if no files found. + */ + getTextPluginfileUrl(files: any[]) : string { + if (files && files.length) { + let fileURL = files[0].url || files[0].fileurl; + // Remove text after last slash (encoded or not). + return fileURL.substr(0, Math.max(fileURL.lastIndexOf('/'), fileURL.lastIndexOf('%2F'))); + } + + return undefined; + } + + /** + * Get the protocol from a URL. + * E.g. http://www.google.com returns 'http'. + * + * @param {string} url URL to treat. + * @return {string} Protocol, undefined if no protocol found. + */ + getUrlProtocol(url: string) : string { + if (!url) { + return; + } + + let matches = url.match(/^([^\/:\.\?]*):\/\//); + if (matches && matches[1]) { + return matches[1]; + } + } + + /** + * Get the scheme from a URL. Please notice that, if a URL has protocol, it will return the protocol. + * E.g. javascript:doSomething() returns 'javascript'. + * + * @param {string} url URL to treat. + * @return {string} Scheme, undefined if no scheme found. + */ + getUrlScheme(url: string) : string { + if (!url) { + return; + } + + let matches = url.match(/^([a-z][a-z0-9+\-.]*):/); + if (matches && matches[1]) { + return matches[1]; + } + } + + /* + * Gets a username from a URL like: user@mysite.com. + * + * @param {string} url URL to treat. + * @return {string} Username. Undefined if no username found. + */ + getUsernameFromUrl(url: string) : string { + if (url.indexOf('@') > -1) { + // Get URL without protocol. + let withoutProtocol = url.replace(/.*?:\/\//, ''), + matches = withoutProtocol.match(/[^@]*/); + + // Make sure that @ is at the start of the URL, not in a param at the end. + if (matches && matches.length && !matches[0].match(/[\/|?]/)) { + return matches[0]; + } + } + } + + /** + * Check if a text contains HTML tags. + * + * @param {string} text Text to check. + * @return {boolean} Whether it has HTML tags. + */ + hasHTMLTags(text: string) : boolean { + return /<[a-z][\s\S]*>/i.test(text); + } + + /** + * Check if a text contains Unicode long chars. + * Using as threshold Hex value D800 + * + * @param {string} text Text to check. + * @return {boolean} True if has Unicode chars, false otherwise. + */ + hasUnicode(text: string) : boolean { + for (let x = 0; x < text.length; x++) { + if (text.charCodeAt(x) > 55295) { + return true; + } + } + return false; + } + + /** + * Check if an object has any long Unicode char. + * + * @param {object} data Object to be checked. + * @return {boolean} If the data has any long Unicode char on it. + */ + hasUnicodeData(data: object) : boolean { + for (let el in data) { + if (typeof data[el] == 'object') { + if (this.hasUnicodeData(data[el])) { + return true; + } + } else if (typeof data[el] == 'string' && this.hasUnicode(data[el])) { + return true; + } + } + return false; + } + + /** + * Same as Javascript's JSON.parse, but if an exception is thrown it will return the original text. + * + * @param {string} json JSON text. + * @return {any} JSON parsed as object or what it gets. + */ + parseJSON(json: string) : any { + try { + return JSON.parse(json); + } catch(ex) { + // Error, use the json text. + } + return json; + } + + /** + * Remove protocol and www from a URL. + * + * @param {string} url URL to treat. + * @return {string} Treated URL. + */ + removeProtocolAndWWW(url: string) : string { + // Remove protocol. + url = url.replace(/.*?:\/\//g, ''); + // Remove www. + url = url.replace(/^www./, ''); + return url; + } + + /** + * Replace all characters that cause problems with files in Android and iOS. + * + * @param {string} text Text to treat. + * @return {string} Treated text. + */ + removeSpecialCharactersForFiles(text: string) : string { + return text.replace(/[#:\/\?\\]+/g, '_'); + } + + /** + * Replace all the new lines on a certain text. + * + * @param {string} text The text to be treated. + * @param {string} newValue Text to use instead of new lines. + * @return {string} Treated text. + */ + replaceNewLines(text: string, newValue: string) : string { + return text.replace(/(?:\r\n|\r|\n)/g, newValue); + } + + /** + * Replace @@PLUGINFILE@@ wildcards with the real URL in a text. + * + * @param {string} Text to treat. + * @param {any[]} files Files to extract the pluginfile URL from. They need to have the URL in a url or fileurl attribute. + * @return {string} Treated text. + */ + replacePluginfileUrls(text: string, files: any[]) : string { + if (text) { + let fileURL = this.getTextPluginfileUrl(files); + if (fileURL) { + return text.replace(/@@PLUGINFILE@@/g, fileURL); + } + } + return text; + } + + /** + * Replace pluginfile URLs with @@PLUGINFILE@@ wildcards. + * + * @param {string} text Text to treat. + * @param {any[]} files Files to extract the pluginfile URL from. They need to have the URL in a url or fileurl attribute. + * @return {string} Treated text. + */ + restorePluginfileUrls(text: string, files: any[]) : string { + if (text) { + let fileURL = this.getTextPluginfileUrl(files); + if (fileURL) { + return text.replace(new RegExp(this.escapeForRegex(fileURL), 'g'), '@@PLUGINFILE@@'); + } + } + return text; + } + + /** + * Rounds a number to use a certain amout of decimals or less. + * Difference between this function and float's toFixed: + * 7.toFixed(2) -> 7.00 + * roundToDecimals(7, 2) -> 7 + * + * @param {number} number Number to round. + * @param {number} [decimals=2] Number of decimals. By default, 2. + * @return {number} Rounded number. + */ + roundToDecimals(number: number, decimals = 2) : number { + let multiplier = Math.pow(10, decimals); + return Math.round(number * multiplier) / multiplier; + } + + /** + * Add quotes to HTML characters. + * + * Returns text with HTML characters (like "<", ">", etc.) properly quoted. + * Based on Moodle's s() function. + * + * @param {string} text Text to treat. + * @return {string} Treated text. + */ + s(text: string) : string { + if (!text) { + return ''; + } + + return this.escapeHTML(text).replace(/&#(\d+|x[0-9a-f]+);/i, '&#$1;'); + } + + /** + * Shortens a text to length and adds an ellipsis. + * + * @param {string} text The text to be shortened. + * @param {number} length The desired length. + * @return {string} Shortened text. + */ + shortenText(text: string, length: number) : string { + if (text.length > length) { + text = text.substr(0, length); + + // Now, truncate at the last word boundary (if exists). + let lastWordPos = text.lastIndexOf(' '); + if (lastWordPos > 0) { + text = text.substr(0, lastWordPos); + } + text += '…'; + } + return text; + } + + /** + * Strip Unicode long char of a given text. + * Using as threshold Hex value D800 + * + * @param {string} text Text to check. + * @return {string} Without the Unicode chars. + */ + stripUnicode(text: string) : string { + let stripped = ''; + for (let x = 0; x < text.length; x++) { + if (text.charCodeAt(x) <= 55295){ + stripped += text.charAt(x); + } + } + return stripped; + } + + /** + * Treat the multilang tags from a HTML code, leaving only the current language. + * + * @param {string} text The text to be treated. + * @return {Promise} Promise resolved with the formatted text. + */ + treatMultilangTags(text: string) : Promise { + if (!text) { + return Promise.resolve(''); + } + + return this.langProvider.getCurrentLanguage().then((language) => { + // Match the current language. + let currentLangRegEx = new RegExp('<(?:lang|span)[^>]+lang="' + language + '"[^>]*>(.*?)<\/(?:lang|span)>', 'g'), + anyLangRegEx = /<(?:lang|span)[^>]+lang="[a-zA-Z0-9_-]+"[^>]*>(.*?)<\/(?:lang|span)>/g; + + if (!text.match(currentLangRegEx)) { + // Current lang not found. Try to find the first language. + let matches = text.match(anyLangRegEx); + if (matches && matches[0]) { + language = matches[0].match(/lang="([a-zA-Z0-9_-]+)"/)[1]; + currentLangRegEx = new RegExp('<(?:lang|span)[^>]+lang="' + language + '"[^>]*>(.*?)<\/(?:lang|span)>', 'g'); + } else { + // No multi-lang tag found, stop. + return text; + } + } + // Extract contents of current language. + text = text.replace(currentLangRegEx, '$1'); + // Delete the rest of languages + text = text.replace(anyLangRegEx, ''); + return text; + }); + } + + /** + * If a number has only 1 digit, add a leading zero to it. + * + * @param {string|number} num Number to convert. + * @return {string} Number with leading zeros. + */ + twoDigits(num: string|number) : string { + if (num < 10) { + return '0' + num; + } else { + return '' + num; // Convert to string for coherence. + } + } + + /** + * Make a string's first character uppercase. + * + * @param {string} text Text to treat. + * @return {string} Treated text. + */ + ucFirst(text: string) : string { + return text.charAt(0).toUpperCase() + text.slice(1); + } +} diff --git a/src/providers/utils/time.ts b/src/providers/utils/time.ts new file mode 100644 index 000000000..a65b923e3 --- /dev/null +++ b/src/providers/utils/time.ts @@ -0,0 +1,148 @@ +// (C) Copyright 2015 Martin Dougiamas +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import { Injectable } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; +import * as moment from 'moment'; +import { CoreConstants } from '../../core/constants'; + +/* + * "Utils" service with helper functions for date and time. +*/ +@Injectable() +export class CoreTimeUtilsProvider { + + constructor(private translate: TranslateService) {} + + /** + * Returns hours, minutes and seconds in a human readable format + * + * @param {number} seconds A number of seconds + * @return {string} Seconds in a human readable format. + */ + formatTime(seconds: number) : string { + let totalSecs = Math.abs(seconds), + years = Math.floor(totalSecs / CoreConstants.secondsYear), + remainder = totalSecs - (years * CoreConstants.secondsYear), + days = Math.floor(remainder / CoreConstants.secondsDay); + + remainder = totalSecs - (days * CoreConstants.secondsDay); + + let hours = Math.floor(remainder / CoreConstants.secondsHour); + remainder = remainder - (hours * CoreConstants.secondsHour); + + let mins = Math.floor(remainder / CoreConstants.secondsMinute), + secs = remainder - (mins * CoreConstants.secondsMinute), + ss = this.translate.instant('mm.core.' + (secs == 1 ? 'sec' : 'secs')), + sm = this.translate.instant('mm.core.' + (mins == 1 ? 'min' : 'mins')), + sh = this.translate.instant('mm.core.' + (hours == 1 ? 'hour' : 'hours')), + sd = this.translate.instant('mm.core.' + (days == 1 ? 'day' : 'days')), + sy = this.translate.instant('mm.core.' + (years == 1 ? 'year' : 'years')), + oyears = '', + odays = '', + ohours = '', + omins = '', + osecs = ''; + + if (years) { + oyears = years + ' ' + sy; + } + if (days) { + odays = days + ' ' + sd; + } + if (hours) { + ohours = hours + ' ' + sh; + } + if (mins) { + omins = mins + ' ' + sm; + } + if (secs) { + osecs = secs + ' ' + ss; + } + + if (years) { + return oyears + ' ' + odays; + } + if (days) { + return odays + ' ' + ohours; + } + if (hours) { + return ohours + ' ' + omins; + } + if (mins) { + return omins + ' ' + osecs; + } + if (secs) { + return osecs; + } + + return this.translate.instant('mm.core.now'); + } + + /** + * Returns hours, minutes and seconds in a human readable format. + * + * @param {number} duration Duration in seconds + * @param {number} [precision] Number of elements to have in precission. 0 or undefined to full precission. + * @return {string} Duration in a human readable format. + */ + formatDuration(duration: number, precision?: number) : string { + precision = precision || 5; + + let eventDuration = moment.duration(duration, 'seconds'), + durationString = ''; + + if (precision && eventDuration.years() > 0) { + durationString += ' ' + moment.duration(eventDuration.years(), 'years').humanize(); + precision--; + } + if (precision && eventDuration.months() > 0) { + durationString += ' ' + moment.duration(eventDuration.months(), 'months').humanize(); + precision--; + } + if (precision && eventDuration.days() > 0) { + durationString += ' ' + moment.duration(eventDuration.days(), 'days').humanize(); + precision--; + } + if (precision && eventDuration.hours() > 0) { + durationString += ' ' + moment.duration(eventDuration.hours(), 'hours').humanize(); + precision--; + } + if (precision && eventDuration.minutes() > 0) { + durationString += ' ' + moment.duration(eventDuration.minutes(), 'minutes').humanize(); + precision--; + } + + return durationString.trim(); + } + + /** + * Return the current timestamp in a "readable" format: YYYYMMDDHHmmSS. + * + * @return {string} The readable timestamp. + */ + readableTimestamp() : string { + return moment(Date.now()).format('YYYYMMDDHHmmSS'); + } + + /** + * Return the current timestamp (UNIX format, seconds). + * + * @return {number} The current timestamp in seconds. + */ + timestamp() : number { + return Math.round(Date.now() / 1000); + } + +} diff --git a/src/providers/utils/url.ts b/src/providers/utils/url.ts new file mode 100644 index 000000000..3d6c9f47d --- /dev/null +++ b/src/providers/utils/url.ts @@ -0,0 +1,180 @@ +// (C) Copyright 2015 Martin Dougiamas +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import { Injectable } from '@angular/core'; +import { CoreLangProvider } from '../lang'; + +/* + * "Utils" service with helper functions for URLs. + */ +@Injectable() +export class CoreUrlUtilsProvider { + + constructor(private langProvider: CoreLangProvider) {} + + /** + * Extracts the parameters from a URL and stores them in an object. + * + * @param {string} url URL to treat. + * @return {object} Object with the params. + */ + extractUrlParams(url: string) : object { + let regex = /[?&]+([^=&]+)=?([^&]*)?/gi, + params = {}; + + url.replace(regex, (match: string, key: string, value: string) : string => { + params[key] = typeof value != 'undefined' ? value : ''; + return match; + }); + + return params; + } + + /** + * Returns the URL to the documentation of the app, based on Moodle version and current language. + * + * @param {string} [release] Moodle release. + * @param {string} [page=Mobile_app] Docs page to go to. + * @return {Promise} Promise resolved with the Moodle docs URL. + */ + getDocsUrl(release?: string, page = 'Mobile_app') : Promise { + let docsUrl = 'https://docs.moodle.org/en/' + page; + + if (typeof release != 'undefined') { + let version = release.substr(0, 3).replace('.', ''); + // Check is a valid number. + if (parseInt(version) >= 24) { + // Append release number. + docsUrl = docsUrl.replace('https://docs.moodle.org/', 'https://docs.moodle.org/' + version + '/'); + } + } + + return this.langProvider.getCurrentLanguage().then((lang) => { + return docsUrl.replace('/en/', '/' + lang + '/'); + }).catch(() => { + return docsUrl; + }); + } + + /** + * Returns if a URL has any protocol (not a relative URL). + * + * @param {string} url The url to test against the pattern. + * @return {boolean} Whether the url is absolute. + */ + isAbsoluteURL(url: string) : boolean { + return /^[^:]{2,}:\/\//i.test(url) || /^(tel:|mailto:|geo:)/.test(url); + } + + /** + * Returns if a URL is downloadable: plugin file OR theme/image.php OR gravatar. + * + * @param {string} url The URL to test. + * @return {boolean} Whether the URL is downloadable. + */ + isDownloadableUrl(url: string) : boolean { + return this.isPluginFileUrl(url) || this.isThemeImageUrl(url) || this.isGravatarUrl(url); + } + + /** + * Returns if a URL is a gravatar URL. + * + * @param {string} url The URL to test. + * @return {boolean} Whether the URL is a gravatar URL. + */ + isGravatarUrl(url: string) : boolean { + return url && url.indexOf('gravatar.com/avatar') !== -1; + } + + /** + * Check if a URL uses http or https protocol. + * + * @param {string} url The url to test. + * @return {boolean} Whether the url uses http or https protocol. + */ + isHttpURL(url: string) : boolean { + return /^https?\:\/\/.+/i.test(url); + } + + /** + * Returns if a URL is a pluginfile URL. + * + * @param {string} url The URL to test. + * @return {boolean} Whether the URL is a pluginfile URL. + */ + isPluginFileUrl(url: string) : boolean { + return url && url.indexOf('/pluginfile.php') !== -1; + } + + /** + * Returns if a URL is a theme image URL. + * + * @param {string} url The URL to test. + * @return {boolean} Whether the URL is a theme image URL. + */ + isThemeImageUrl(url: string) : boolean { + return url && url.indexOf('/theme/image.php') !== -1; + } + + /** + * Generic function for adding the wstoken to Moodle urls and for pointing to the correct script. + * For download remote files from Moodle we need to use the special /webservice/pluginfile passing + * the ws token as a get parameter. + * + * @param {string} url The url to be fixed. + * @param {string} token Token to use. + * @return {string} Fixed URL. + */ + fixPluginfileURL(url: string, token: string) : string { + if (!url || !token) { + return ''; + } + + // First check if we need to fix this url or is already fixed. + if (url.indexOf('token=') != -1) { + return url; + } + + // Check if is a valid URL (contains the pluginfile endpoint). + if (!this.isPluginFileUrl(url)) { + return url; + } + + // In which way the server is serving the files? Are we using slash parameters? + if (url.indexOf('?file=') != -1 || url.indexOf('?forcedownload=') != -1 || url.indexOf('?rev=') != -1) { + url += '&'; + } else { + url += '?'; + } + // Always send offline=1 (for external repositories). It shouldn't cause problems for local files or old Moodles. + url += 'token=' + token + '&offline=1'; + + // Some webservices returns directly the correct download url, others not. + if (url.indexOf('/webservice/pluginfile') == -1) { + url = url.replace('/pluginfile', '/webservice/pluginfile'); + } + return url; + } + + /** + * Remove the parameters from a URL, returning the URL without them. + * + * @param {string} url URL to treat. + * @return {string} URL without params. + */ + removeUrlParams(url: string) : string { + let matches = url.match(/^[^\?]+/); + return matches && matches[0]; + } +} diff --git a/src/providers/utils/utils.ts b/src/providers/utils/utils.ts new file mode 100644 index 000000000..2633f600f --- /dev/null +++ b/src/providers/utils/utils.ts @@ -0,0 +1,1098 @@ +// (C) Copyright 2015 Martin Dougiamas +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import { Injectable } from '@angular/core'; +import { Platform } from 'ionic-angular'; +import { InAppBrowser, InAppBrowserObject } from '@ionic-native/in-app-browser'; +import { Clipboard } from '@ionic-native/clipboard'; +import { CoreAppProvider } from '../app'; +import { CoreDomUtilsProvider } from './dom'; +import { CoreLoggerProvider } from '../logger'; +import { TranslateService } from '@ngx-translate/core'; +import { CoreLangProvider } from '../lang'; + +/* + * "Utils" service with helper functions. + */ +@Injectable() +export class CoreUtilsProvider { + logger; + iabInstance: InAppBrowserObject; + + constructor(private iab: InAppBrowser, private appProvider: CoreAppProvider, private clipboard: Clipboard, + private domUtils: CoreDomUtilsProvider, logger: CoreLoggerProvider, private translate: TranslateService, + private platform: Platform, private langProvider: CoreLangProvider) { + this.logger = logger.getInstance('CoreUtilsProvider'); + } + + /** + * Similar to Promise.all, but if a promise fails this function's promise won't be rejected until ALL promises have finished. + * + * @param {Promise[]} promises Promises. + * @return {Promise} Promise resolved if all promises are resolved and rejected if at least 1 promise fails. + */ + allPromises(promises: Promise[]): Promise { + if (!promises || !promises.length) { + return Promise.resolve(); + } + + return new Promise((resolve, reject) => { + let count = 0, + total = promises.length, + error; + + promises.forEach((promise) => { + promise.catch((err) => { + error = err; + }).finally(() => { + count++; + + if (count === total) { + // All promises have finished, reject/resolve. + if (error) { + reject(error); + } else { + resolve(); + } + } + }); + }); + }); + } + + /** + * Compare two objects. This function won't compare functions and proto properties, it's a basic compare. + * Also, this will only check if itemA's properties are in itemB with same value. This function will still + * return true if itemB has more properties than itemA. + * + * @param {any} itemA First object. + * @param {any} itemB Second object. + * @param {number} [maxLevels=0] Number of levels to reach if 2 objects are compared. + * @param {number} [level=0] Current deep level (when comparing objects). + * @param {boolean} [undefinedIsNull=true] True if undefined is equal to null. Defaults to true. + * @return {boolean} Whether both items are equal. + */ + basicLeftCompare(itemA: any, itemB: any, maxLevels = 0, level = 0, undefinedIsNull = true) : boolean { + if (typeof itemA == 'function' || typeof itemB == 'function') { + return true; // Don't compare functions. + } else if (typeof itemA == 'object' && typeof itemB == 'object') { + if (level >= maxLevels) { + return true; // Max deep reached. + } + + let equal = true; + for (let name in itemA) { + let value = itemA[name]; + if (name == '$$hashKey') { + // Ignore $$hashKey property since it's a "calculated" property. + return; + } + + if (!this.basicLeftCompare(value, itemB[name], maxLevels, level + 1)) { + equal = false; + } + } + + return equal; + } else { + if (undefinedIsNull && ( + (typeof itemA == 'undefined' && itemB === null) || (itemA === null && typeof itemB == 'undefined'))) { + return true; + } + + // We'll treat "2" and 2 as the same value. + let floatA = parseFloat(itemA), + floatB = parseFloat(itemB); + + if (!isNaN(floatA) && !isNaN(floatB)) { + return floatA == floatB; + } + return itemA === itemB; + } + } + + /** + * Blocks leaving a view. This function should be used in views that want to perform a certain action before + * leaving (usually, ask the user if he wants to leave because some data isn't saved). + * + * @param {Object} scope View's scope. + * @param {Function} canLeaveFn Function called when the user wants to leave the view. Must return a promise + * resolved if the view should be left, rejected if the user should stay in the view. + * @param {Object} [currentView] Current view. Defaults to $ionicHistory.currentView(). + * @return {Object} Object with: + * -back: Original back function. + * -unblock: Function to unblock. It is called automatically when scope is destroyed. + */ + blockLeaveView = function(scope, canLeaveFn, currentView) { + // @todo + // currentView = currentView || $ionicHistory.currentView(); + + // var unregisterHardwareBack, + // leaving = false, + // hasSplitView = $ionicPlatform.isTablet() && $state.current.name.split('.').length == 3, + // skipSplitViewLeave = false; + + // // Override Ionic's back button behavior. + // $rootScope.$ionicGoBack = goBack; + + // // Override Android's back button. We set a priority of 101 to override the "Return to previous view" action. + // unregisterHardwareBack = $ionicPlatform.registerBackButtonAction(goBack, 101); + + // // Add function to the stack. + // backFunctionsStack.push(goBack); + + // if (hasSplitView) { + // // Block split view. + // blockSplitView(true); + // } + + // scope.$on('$destroy', unblock); + + // return { + // back: originalBackFunction, + // unblock: unblock + // }; + + // // Function called when the user wants to leave the view. + // function goBack() { + // // Check that we're leaving the current view, since the user can navigate to other views from here. + // if ($ionicHistory.currentView() !== currentView) { + // // It's another view. + // originalBackFunction(); + // return; + // } + + // if (leaving) { + // // Leave view pending, don't call again. + // return; + // } + // leaving = true; + + // canLeaveFn().then(function() { + // // User confirmed to leave or there was no need to confirm, go back. + // // Skip next leave view from split view if there's one since we already checked if user can leave. + // skipSplitViewLeave = hasSplitView; + // originalBackFunction(); + // }).finally(function() { + // leaving = false; + // }); + // } + + // // Leaving current view when it's in split view. + // function leaveViewInSplitView() { + // if (skipSplitViewLeave) { + // skipSplitViewLeave = false; + // return $q.when(); + // } + + // return canLeaveFn(); + // } + + // // Restore original back functions. + // function unblock() { + // unregisterHardwareBack(); + + // if (hasSplitView) { + // // Unblock split view. + // blockSplitView(false); + // } + + // // Remove function from the stack. + // var position = backFunctionsStack.indexOf(goBack); + // if (position > -1) { + // backFunctionsStack.splice(position, 1); + // } + + // // Revert go back only if it hasn't been overridden by another view. + // if ($rootScope.$ionicGoBack === goBack) { + // if (!backFunctionsStack.length) { + // // Shouldn't happen. Reset stack. + // backFunctionsStack = [originalBackFunction]; + // $rootScope.$ionicGoBack = originalBackFunction; + // } else { + // $rootScope.$ionicGoBack = backFunctionsStack[backFunctionsStack.length - 1]; + // } + // } + // } + + // // Block or unblock split view. + // function blockSplitView(block) { + // $rootScope.$broadcast(mmCoreSplitViewBlock, { + // block: block, + // blockFunction: leaveViewInSplitView, + // state: currentView.stateName, + // stateParams: currentView.stateParams + // }); + // } + } + + /** + * Close the InAppBrowser window. + * + * @param {boolean} [closeAll] Desktop only. True to close all secondary windows, false to close only the "current" one. + */ + closeInAppBrowser(closeAll: boolean) : void { + if (this.iabInstance) { + this.iabInstance.close(); + if (closeAll && this.appProvider.isDesktop()) { + require('electron').ipcRenderer.send('closeSecondaryWindows'); + } + } + } + + /** + * Copy properties from one object to another. + * + * @param {any} from Object to copy the properties from. + * @param {any} to Object where to store the properties. + */ + copyProperties(from: any, to: any) : void { + for (let name in from) { + let value = from[name]; + if (typeof value == 'object') { + // Clone the object. + to[name] = Object.assign({}, value); + } else { + to[name] = value; + } + } + } + + /** + * Copies a text to clipboard and shows a toast message. + * + * @param {string} text Text to be copied + * @return {Promise} Promise resolved when text is copied. + */ + copyToClipboard(text: string) : Promise { + return this.clipboard.copy(text).then(() => { + // Show toast using ionicLoading. + return this.domUtils.showToast('mm.core.copiedtoclipboard', true); + }).catch(() => { + // Ignore errors. + }); + } + + /** + * Empties an array without losing its reference. + * + * @param {any[]} array Array to empty. + */ + emptyArray(array: any[]) : void { + array.length = 0; // Empty array without losing its reference. + } + + /** + * Removes all properties from an object without losing its reference. + * + * @param {object} object Object to remove the properties. + */ + emptyObject(object: object) : void { + for (let key in object) { + if (object.hasOwnProperty(key)) { + delete object[key]; + } + } + } + + /** + * Execute promises one depending on the previous. + * + * @param {any[]} orderedPromisesData Data to be executed including the following values: + * - func: Function to be executed. + * - context: Context to pass to the function. This allows using "this" inside the function. + * - params: Array of data to be sent to the function. + * - blocking: Boolean. If promise should block the following. + * @return {Promise} Promise resolved when all promises are resolved. + */ + executeOrderedPromises(orderedPromisesData: any[]) : Promise { + let promises = [], + dependency = Promise.resolve(); + + // Execute all the processes in order. + for (let i in orderedPromisesData) { + let data = orderedPromisesData[i], + promise; + + // Add the process to the dependency stack. + promise = dependency.finally(() => { + let prom; + + try { + prom = data.func.apply(data.context, data.params || []); + } catch (e) { + this.logger.error(e.message); + return; + } + return prom; + }); + promises.push(promise); + + // If the new process is blocking, we set it as the dependency. + if (data.blocking) { + dependency = promise; + } + } + + // Return when all promises are done. + return this.allPromises(promises); + } + + /** + * Given an array of strings, return only the ones that match a regular expression. + * + * @param {string[]} array Array to filter. + * @param {RegExp} regex RegExp to apply to each string. + * @return {string[]} Filtered array. + */ + filterByRegexp(array: string[], regex: RegExp) : string[] { + if (!array || !array.length) { + return []; + } + + return array.filter((entry) => { + let matches = entry.match(regex); + return matches && matches.length; + }); + } + + /** + * Filter the list of site IDs based on a isEnabled function. + * + * @param {string[]} siteIds Site IDs to filter. + * @param {Function} isEnabledFn Function to call for each site. Must return true or a promise resolved with true if enabled. + * It receives a siteId param and all the params sent to this function after 'checkAll'. + * @param {boolean} [checkAll] True if it should check all the sites, false if it should check only 1 and treat them all + * depending on this result. + * @param {any} ...args All the params sent after checkAll will be passed to isEnabledFn. + * @return {Promise} Promise resolved with the list of enabled sites. + */ + filterEnabledSites(siteIds: string[], isEnabledFn: Function, checkAll?: boolean, ...args) : Promise { + let promises = [], + enabledSites = []; + + for (let i in siteIds) { + let siteId = siteIds[i]; + if (checkAll || !promises.length) { + promises.push(Promise.resolve(isEnabledFn.apply(isEnabledFn, [siteId].concat(...args))).then((enabled) => { + if (enabled) { + enabledSites.push(siteId); + } + })); + } + } + + return this.allPromises(promises).catch(() => { + // Ignore errors. + }).then(() => { + if (!checkAll) { + // Checking 1 was enough, so it will either return all the sites or none. + return enabledSites.length ? siteIds : []; + } else { + return enabledSites; + } + }); + } + + /** + * Given a float, prints it nicely. Localized floats must not be used in calculations! + * Based on Moodle's format_float. + * + * @param {any} float The float to print. + * @return {string} Locale float. + */ + formatFloat(float: any) : string { + if (typeof float == 'undefined') { + return ''; + } + + let localeSeparator = this.translate.instant('mm.core.decsep'); + + // Convert float to string. + float += ''; + return float.replace('.', localeSeparator); + } + + /** + * Returns a tree formatted from a plain list. + * List has to be sorted by depth to allow this function to work correctly. Errors can be thrown if a child node is + * processed before a parent node. + * + * @param {any[]} list List to format. + * @param {string} [parentFieldName=parent] Name of the parent field to match with children. + * @param {string} [idFieldName=id] Name of the children field to match with parent. + * @param {number} [rootParentId=0] The id of the root. + * @param {number} [maxDepth=5] Max Depth to convert to tree. Children found will be in the last level of depth. + * @return {any[]} Array with the formatted tree, children will be on each node under children field. + */ + formatTree(list: any[], parentFieldName = 'parent', idFieldName = 'id', rootParentId = 0, maxDepth = 5) : any[] { + let map = {}, + mapDepth = {}, + parent, + id, + tree = []; + + list.forEach((node, index) => { + id = node[idFieldName]; + parent = node[parentFieldName]; + node.children = []; + + // Use map to look-up the parents. + map[id] = index; + if (parent != rootParentId) { + let parentNode = list[map[parent]]; + if (parentNode) { + if (mapDepth[parent] == maxDepth) { + // Reached max level of depth. Proceed with flat order. Find parent object of the current node. + let parentOfParent = parentNode[parentFieldName]; + if (parentOfParent) { + // This element will be the child of the node that is two levels up the hierarchy + // (i.e. the child of node.parent.parent). + list[map[parentOfParent]].children.push(node); + // Assign depth level to the same depth as the parent (i.e. max depth level). + mapDepth[id] = mapDepth[parent]; + // Change the parent to be the one that is two levels up the hierarchy. + node.parent = parentOfParent; + } + } else { + parentNode.children.push(node); + // Increase the depth level. + mapDepth[id] = mapDepth[parent] + 1; + } + } + } else { + tree.push(node); + + // Root elements are the first elements in the tree structure, therefore have the depth level 1. + mapDepth[id] = 1; + } + }); + + return tree; + } + + /** + * Get country name based on country code. + * + * @param {string} code Country code (AF, ES, US, ...). + * @return {string} Country name. If the country is not found, return the country code. + */ + getCountryName(code: string) : string { + let countryKey = 'mm.core.country-' + code, + countryName = this.translate.instant(countryKey); + + return countryName !== countryKey ? countryName : code; + } + + /** + * Get list of countries with their code and translated name. + * + * @return {Promise} Promise resolved with the list of countries. + */ + getCountryList() : Promise { + // Get the current language. + return this.langProvider.getCurrentLanguage().then((lang) => { + // Get the full list of translations. Create a promise to convert the observable into a promise. + return new Promise((resolve, reject) => { + let observer = this.translate.getTranslation(lang).subscribe((table) => { + resolve(table); + observer.unsubscribe(); + }, (err) => { + reject(err); + observer.unsubscribe(); + }); + }); + }).then((table) => { + let countries = {}; + + for (let name in table) { + if (name.indexOf('mm.core.country-') === 0) { + name = name.replace('mm.core.country-', ''); + countries[name] = table[name]; + } + } + + return countries; + }); + } + + /** + * Given a list of files, check if there are repeated names. + * + * @param {any[]} files List of files. + * @return {string|boolean} String with error message if repeated, false if no repeated. + */ + hasRepeatedFilenames(files: any[]) : string|boolean { + if (!files || !files.length) { + return false; + } + + let names = []; + + // Check if there are 2 files with the same name. + for (let i = 0; i < files.length; i++) { + let name = files[i].filename || files[i].name; + if (names.indexOf(name) > -1) { + return this.translate.instant('mm.core.filenameexist', {$a: name}); + } else { + names.push(name); + } + } + + return false; + } + + /** + * Gets the index of the first string that matches a regular expression. + * + * @param {string[]} array Array to search. + * @param {RegExp} regex RegExp to apply to each string. + * @return {number} Index of the first string that matches the RegExp. -1 if not found. + */ + indexOfRegexp(array: string[], regex: RegExp) : number { + if (!array || !array.length) { + return -1; + } + + for (let i = 0; i < array.length; i++) { + let entry = array[i], + matches = entry.match(regex); + + if (matches && matches.length) { + return i; + } + } + + return -1; + } + + /** + * Return true if the param is false (bool), 0 (number) or "0" (string). + * + * @param {any} value Value to check. + * @return {boolean} Whether the value is false, 0 or "0". + */ + isFalseOrZero(value: any) : boolean { + return typeof value != 'undefined' && (value === false || value === "false" || parseInt(value, 10) === 0); + } + + /** + * Return true if the param is true (bool), 1 (number) or "1" (string). + * + * @param {any} value Value to check. + * @return {boolean} Whether the value is true, 1 or "1". + */ + isTrueOrOne(value: any) : boolean { + return typeof value != 'undefined' && (value === true || value === "true" || parseInt(value, 10) === 1); + } + + /** + * Given an error returned by a WS call, check if the error is generated by the app or it has been returned by the WebSwervice. + * + * @param {string} error Error to check. + * @return {boolean} Whether the error was returned by the WebService. + */ + isWebServiceError(error: string) : boolean { + let localErrors = [ + this.translate.instant('mm.core.wsfunctionnotavailable'), + this.translate.instant('mm.core.lostconnection'), + this.translate.instant('mm.core.userdeleted'), + this.translate.instant('mm.core.unexpectederror'), + this.translate.instant('mm.core.networkerrormsg'), + this.translate.instant('mm.core.serverconnection'), + this.translate.instant('mm.core.errorinvalidresponse'), + this.translate.instant('mm.core.sitemaintenance'), + this.translate.instant('mm.core.upgraderunning'), + this.translate.instant('mm.core.nopasswordchangeforced'), + this.translate.instant('mm.core.unicodenotsupported') + ]; + return error && localErrors.indexOf(error) == -1; + } + + /** + * Merge two arrays, removing duplicate values. + * + * @param {any[]} array1 The first array. + * @param {any[]} array2 The second array. + * @param [key] Key of the property that must be unique. If not specified, the whole entry. + * @return {any[]} Merged array. + */ + mergeArraysWithoutDuplicates(array1: any[], array2: any[], key?: string) : any[] { + return this.uniqueArray(array1.concat(array2), key); + } + + /** + * Open a file using platform specific method. + * + * node-webkit: Using the default application configured. + * Android: Using the WebIntent plugin. + * iOs: Using handleDocumentWithURL. + * + * @param {string} path The local path of the file to be open. + * @return {Promise} Promise resolved when done. + */ + openFile(path: string) : Promise { + return new Promise((resolve, reject) => { + if (this.appProvider.isDesktop()) { + // It's a desktop app, send an event so the file is opened. It has to be done with an event + // because opening the file from here (renderer process) doesn't focus the opened app. + // Use sendSync so we can receive the result. + if (require('electron').ipcRenderer.sendSync('openItem', path)) { + resolve(); + } else { + reject(this.translate.instant('mm.core.erroropenfilenoapp')); + } + } else if ((window).plugins) { + // @todo + reject('TODO'); + + // var extension = $mmFS.getFileExtension(path), + // mimetype = $mmFS.getMimeType(extension); + + // if (ionic.Platform.isAndroid() && window.plugins.webintent) { + // var iParams = { + // action: "android.intent.action.VIEW", + // url: path, + // type: mimetype + // }; + + // window.plugins.webintent.startActivity( + // iParams, + // function() { + // $log.debug('Intent launched'); + // deferred.resolve(); + // }, + // function() { + // $log.debug('Intent launching failed.'); + // $log.debug('action: ' + iParams.action); + // $log.debug('url: ' + iParams.url); + // $log.debug('type: ' + iParams.type); + + // if (!extension || extension.indexOf('/') > -1 || extension.indexOf('\\') > -1) { + // // Extension not found. + // $mmLang.translateAndRejectDeferred(deferred, 'mm.core.erroropenfilenoextension'); + // } else { + // $mmLang.translateAndRejectDeferred(deferred, 'mm.core.erroropenfilenoapp'); + // } + // } + // ); + + // } else if (ionic.Platform.isIOS() && typeof handleDocumentWithURL == 'function') { + + // $mmFS.getBasePath().then(function(fsRoot) { + // // Encode/decode the specific file path, note that a path may contain directories + // // with white spaces, special characters... + // if (path.indexOf(fsRoot > -1)) { + // path = path.replace(fsRoot, ""); + // path = encodeURIComponent($mmText.decodeURIComponent(path)); + // path = fsRoot + path; + // } + + // handleDocumentWithURL( + // function() { + // $log.debug('File opened with handleDocumentWithURL' + path); + // deferred.resolve(); + // }, + // function(error) { + // $log.debug('Error opening with handleDocumentWithURL' + path); + // if(error == 53) { + // $log.error('No app that handles this file type.'); + // } + // self.openInBrowser(path); + // deferred.resolve(); + // }, + // path + // ); + // }, deferred.reject); + // } else { + // // Last try, launch the file with the browser. + // this.openInBrowser(path); + // resolve(); + // } + } else { + // Changing _blank for _system may work in cordova 2.4 and onwards. + this.logger.log('Opening external file using window.open()'); + window.open(path, '_blank'); + resolve(); + } + }); + } + + /** + * Open a URL using InAppBrowser. + * Do not use for files, refer to {@link openFile}. + * + * @param {string} url The URL to open. + * @param {any} [options] Override default options passed to InAppBrowser. + * @return {InAppBrowserObject} The opened window. + */ + openInApp(url: string, options?: any) : InAppBrowserObject { + if (!url) { + return; + } + + options = options || {}; + + if (!options.enableViewPortScale) { + options.enableViewPortScale = 'yes'; // Enable zoom on iOS. + } + + if (!options.location && this.platform.is('ios') && url.indexOf('file://') === 0) { + // The URL uses file protocol, don't show it on iOS. + // In Android we keep it because otherwise we lose the whole toolbar. + options.location = 'no'; + } + + this.iabInstance = this.iab.create(url, '_blank', options); + return this.iabInstance; + } + + /** + * Open a URL using a browser. + * Do not use for files, refer to {@link openFile}. + * + * @param {string} url The URL to open. + */ + openInBrowser(url: string) : void { + if (this.appProvider.isDesktop()) { + // It's a desktop app, use Electron shell library to open the browser. + let shell = require('electron').shell; + if (!shell.openExternal(url)) { + // Open browser failed, open a new window in the app. + window.open(url, '_system'); + } + } else { + window.open(url, '_system'); + } + } + + /** + * Open an online file using platform specific method. + * Specially useful for audio and video since they can be streamed. + * + * node-webkit: Using the default application configured. + * Android: Using the WebIntent plugin. + * iOS: Using the window.open method (InAppBrowser) + * We don't use iOS quickview framework because it doesn't support streaming. + * + * @param {string} url The URL of the file. + * @return {Promise} Promise resolved when opened. + */ + openOnlineFile(url: string) : Promise { + return new Promise((resolve, reject) => { + // @todo + reject('TODO'); + // if (ionic.Platform.isAndroid() && window.plugins && window.plugins.webintent) { + // // In Android we need the mimetype to open it. + // var iParams; + + // self.getMimeTypeFromUrl(url).catch(function() { + // // Error getting mimetype, return undefined. + // }).then(function(mimetype) { + // if (!mimetype) { + // // Couldn't retrieve mimetype. Return error. + // $mmLang.translateAndRejectDeferred(deferred, 'mm.core.erroropenfilenoextension'); + // return; + // } + + // iParams = { + // action: "android.intent.action.VIEW", + // url: url, + // type: mimetype + // }; + + // window.plugins.webintent.startActivity( + // iParams, + // function() { + // $log.debug('Intent launched'); + // deferred.resolve(); + // }, + // function() { + // $log.debug('Intent launching failed.'); + // $log.debug('action: ' + iParams.action); + // $log.debug('url: ' + iParams.url); + // $log.debug('type: ' + iParams.type); + + // $mmLang.translateAndRejectDeferred(deferred, 'mm.core.erroropenfilenoapp'); + // } + // ); + // }); + // } else { + // this.logger.log('Opening remote file using window.open()'); + // window.open(url, '_blank'); + // resolve(); + // } + }); + } + + /** + * Converts an object into an array, losing the keys. + * + * @param {object} obj Object to convert. + * @return {any[]} Array with the values of the object but losing the keys. + */ + objectToArray(obj: object) : any[] { + return Object.keys(obj).map((key) => { + return obj[key]; + }); + } + + /** + * Converts an object into an array of objects, where each entry is an object containing + * the key and value of the original object. + * For example, it can convert {size: 2} into [{name: 'size', value: 2}]. + * + * @param {object} obj Object to convert. + * @param {string} keyName Name of the properties where to store the keys. + * @param {string} valueName Name of the properties where to store the values. + * @param {boolean} [sort] True to sort keys alphabetically, false otherwise. + * @return {object[]} Array of objects with the name & value of each property. + */ + objectToArrayOfObjects(obj: object, keyName: string, valueName: string, sort?: boolean) : object[] { + // Get the entries from an object or primitive value. + let getEntries = (elKey, value) => { + if (typeof value == 'object') { + // It's an object, return at least an entry for each property. + let keys = Object.keys(value), + entries = []; + + keys.forEach((key) => { + let newElKey = elKey ? elKey + '[' + key + ']' : key; + entries = entries.concat(getEntries(newElKey, value[key])); + }); + + return entries; + } else { + // Not an object, return a single entry. + let entry = {}; + entry[keyName] = elKey; + entry[valueName] = value; + return entry; + } + }; + + if (!obj) { + return []; + } + + // "obj" will always be an object, so "entries" will always be an array. + let entries = getEntries('', obj); + if (sort) { + return entries.sort((a, b) => { + return a.name >= b.name ? 1 : -1; + }); + } + return entries; + } + + /** + * Converts an array of objects into an object with key and value. The opposite of objectToArrayOfObjects. + * For example, it can convert [{name: 'size', value: 2}] into {size: 2}. + * + * @param {object[]} objects List of objects to convert. + * @param {string} keyName Name of the properties where the keys are stored. + * @param {string} valueName Name of the properties where the values are stored. + * @param [keyPrefix] Key prefix if neededs to delete it. + * @return {object} Object. + */ + objectToKeyValueMap(objects: object[], keyName: string, valueName: string, keyPrefix?: string) : object { + let prefixSubstr = keyPrefix ? keyPrefix.length : 0, + mapped = {}; + objects.forEach((item) => { + let key = prefixSubstr > 0 ? item[keyName].substr(prefixSubstr) : item[keyName]; + mapped[key] = item[valueName]; + }); + return mapped; + } + + /** + * Given a promise, returns true if it's rejected or false if it's resolved. + * + * @param {Promise} promise Promise to check + * @return {Promise} Promise resolved with boolean: true if the promise is rejected or false if it's resolved. + */ + promiseFails(promise: Promise) : Promise { + return promise.then(() => { + return false; + }).catch(() => { + return true; + }); + } + + /** + * Given a promise, returns true if it's resolved or false if it's rejected. + * + * @param {Promise} promise Promise to check + * @return {Promise} Promise resolved with boolean: true if the promise it's resolved or false if it's rejected. + */ + promiseWorks(promise: Promise) : Promise { + return promise.then(() => { + return true; + }).catch(() => { + return false; + }); + } + + /** + * Tests to see whether two arrays or objects have the same value at a particular key. + * Missing values are replaced by '', and the values are compared with ===. + * Booleans and numbers are cast to string before comparing. + * + * @param {any} obj1 The first object or array. + * @param {any} obj2 The second object or array. + * @param {string} key Key to check. + * @return {boolean} Whether the two objects/arrays have the same value (or lack of one) for a given key. + */ + sameAtKeyMissingIsBlank(obj1: any, obj2: any, key: string) : boolean { + let value1 = typeof obj1[key] != 'undefined' ? obj1[key] : '', + value2 = typeof obj2[key] != 'undefined' ? obj2[key] : ''; + + if (typeof value1 == 'number' || typeof value1 == 'boolean') { + value1 = '' + value1; + } + if (typeof value2 == 'number' || typeof value2 == 'boolean') { + value2 = '' + value2; + } + return value1 === value2; + } + + /** + * Serialize an object to be used in a request. + * + * @param {any} obj Object to serialize. + * @param {boolean} [addNull] Add null values to the serialized as empty parameters. + * @return {string} Serialization of the object. + */ + serialize(obj: any, addNull?: boolean) : string { + let query = '', + fullSubName, + subValue, + innerObj; + + for (let name in obj) { + let value = obj[name]; + + if (value instanceof Array) { + for (let i = 0; i < value.length; ++i) { + subValue = value[i]; + fullSubName = name + '[' + i + ']'; + innerObj = {}; + innerObj[fullSubName] = subValue; + query += this.serialize(innerObj) + '&'; + } + } else if (value instanceof Object) { + for (let subName in value) { + subValue = value[subName]; + fullSubName = name + '[' + subName + ']'; + innerObj = {}; + innerObj[fullSubName] = subValue; + query += this.serialize(innerObj) + '&'; + } + } else if (addNull || (typeof value != 'undefined' && value !== null)) { + query += encodeURIComponent(name) + '=' + encodeURIComponent(value) + '&'; + } + } + + return query.length ? query.substr(0, query.length - 1) : query; + } + + /** + * Sum the filesizes from a list of files checking if the size will be partial or totally calculated. + * + * @param {any[]} files List of files to sum its filesize. + * @return {object} Object with the file size and a boolean to indicate if it is the total size or only partial. + */ + sumFileSizes(files: any[]) : object { + let result = { + size: 0, + total: true + }; + + files.forEach((file) => { + if (typeof file.filesize == 'undefined') { + // We don't have the file size, cannot calculate its total size. + result.total = false; + } else { + result.size += file.filesize; + } + }); + + return result; + } + + /** + * Converts locale specific floating point/comma number back to standard PHP float value. + * Do NOT try to do any math operations before this conversion on any user submitted floats! + * Based on Moodle's unformat_float function. + * + * @param {any} localeFloat Locale aware float representation. + * @return {any} False if bad format, empty string if empty value or the parsed float if not. + */ + unformatFloat(localeFloat: any) : any { + // Bad format on input type number. + if (typeof localeFloat == "undefined") { + return false; + } + + // Empty (but not zero). + if (localeFloat == null) { + return ''; + } + + // Convert float to string. + localeFloat += ''; + localeFloat = localeFloat.trim(); + + if (localeFloat == '') { + return ''; + } + + let localeSeparator = this.translate.instant('mm.core.decsep'); + + localeFloat = localeFloat.replace(' ', ''); // No spaces - those might be used as thousand separators. + localeFloat = localeFloat.replace(localeSeparator, '.'); + + localeFloat = parseFloat(localeFloat); + // Bad format. + if (isNaN(localeFloat)) { + return false; + } + return localeFloat; + } + + /** + * Return an array without duplicate values. + * + * @param {any[]} array The array to treat. + * @param [key] Key of the property that must be unique. If not specified, the whole entry. + * @return {any[]} Array without duplicate values. + */ + uniqueArray(array: any[], key?: string) : any[] { + let filtered = [], + unique = [], + len = array.length; + + for (let i = 0; i < len; i++) { + let entry = array[i], + value = key ? entry[key] : entry; + + if (unique.indexOf(value) == -1) { + unique.push(value); + filtered.push(entry); + } + } + + return filtered; + } +}