package tool

var t map[string]string

func init() {
	t = make(map[string]string)
	t["阿富汗"] = "AF"
	t["奥兰(阿赫韦南马)"] = "AX"
	t["阿尔巴尼亚"] = "AL"
	t["奥尔德尼岛"] = "—"
	t["阿尔及利亚"] = "DZ"
	t["美属萨摩亚(东萨摩亚)"] = "AS"
	t["安道尔(安道拉)"] = "AD"
	t["安哥拉"] = "AO"
	t["安圭拉/ 安吉拉"] = "AI"
	t["南极洲"] = "AQ"
	t["安地卡及巴布达/ 安提瓜和巴布达"] = "AG"
	t["阿根廷"] = "AR"
	t["亚美尼亚/ 阿美尼亚"] = "AM"
	t["阿鲁巴"] = "AW"
	t["澳大利亚(澳洲)"] = "AU"
	t["澳大利亚"] = "AU"
	t["奥地利"] = "AT"
	t["亚塞拜然/ 阿塞拜疆"] = "AZ"
	t["阿塞拜疆"] = "AZ"

	t["巴哈马"] = "BS"
	t["巴林"] = "BH"
	t["孟加拉"] = "BD"
	t["孟加拉国"] = "BD"
	t["巴贝多/ 巴巴多斯"] = "BB"
	t["白俄罗斯(白罗斯)"] = "BY"
	t["比利时"] = "BE"
	t["贝里斯/ 伯利兹"] = "BZ"
	t["贝南/ 贝宁"] = "BJ"
	t["百慕达(萨默斯)"] = "BM"
	t["不丹"] = "BT"
	t["玻利维亚"] = "BO"
	t["波士尼亚与赫塞哥维纳(波赫) / 波斯尼亚和黑塞哥维那(波黑)"] = "BA"
	t["波札那/ 博茨瓦纳"] = "BW"
	t["布威岛/ 鲍威特岛"] = "BV"
	t["巴西"] = "BR"
	t["英属印度洋领地"] = "IO"
	t["汶莱(文莱)"] = "BN"
	t["保加利亚"] = "BG"
	t["布吉纳法索/ 布基纳法索"] = "BF"
	t["蒲隆地/ 布隆迪"] = "BI"
	t["柬埔寨"] = "KH"
	t["喀麦隆"] = "CM"
	t["加拿大"] = "CA"
	t["维德角/ 佛得角"] = "CV"
	t["荷兰加勒比区"] = "BQ"
	t["开曼群岛"] = "KY"
	t["中非共和国"] = "CF"
	t["查德/ 乍得"] = "TD"
	t["智利"] = "CL"
	t["中国"] = "CN"
	t["圣诞岛"] = "CX"
	t["科科斯（基林）群岛"] = "CC"
	t["哥伦比亚"] = "CO"
	t["葛摩/ 科摩罗"] = "KM"
	t["民主刚果"] = "CD"
	t["刚果共和国(刚果)"] = "CG"
	t["库克群岛"] = "CK"
	t["哥斯大黎加/ 哥斯达黎加"] = "CR"
	t["克罗埃西亚/ 克罗地亚"] = "HR"
	t["古巴"] = "CU"
	t["古拉索/ 库拉索"] = "CW"
	t["赛普勒斯/ 塞浦路斯"] = "CY"
	t["捷克"] = "CZ"
	t["捷克国"] = "CZ"
	t["丹麦"] = "DK"
	t["吉布提"] = "DJ"
	t["多米尼克"] = "DM"
	t["多明尼加/ 多米尼加"] = "DO"
	t["厄瓜多尔(厄瓜多)"] = "EC"
	t["埃及"] = "EG"
	t["萨尔瓦多"] = "SV"
	t["赤道几内亚"] = "GQ"
	t["厄利垂亚/ 厄立特里亚"] = "ER"
	t["爱沙尼亚"] = "EE"
	t["衣索比亚/ 埃塞俄比亚"] = "ET"
	t["福克兰群岛"] = "FK"
	t["法罗群岛"] = "FO"
	t["斐济"] = "FJ"
	t["芬兰"] = "FI"
	t["法国(法兰西)"] = "FR"
	t["法属圭亚那"] = "GF"
	t["法属玻里尼西亚/ 法属波利尼西亚"] = "PF"
	t["法属南部和南极领地(法属南部领地)"] = "TF"
	t["加彭/ 加蓬"] = "GA"
	t["甘比亚/ 冈比亚"] = "GM"
	t["乔治亚"] = "GE"
	t["德国"] = "DE"
	t["迦纳(加纳)"] = "GH"
	t["直布罗陀"] = "GI"
	t["希腊"] = "GR"
	t["格陵兰"] = "GL"
	t["格瑞那达/ 格林纳达"] = "GD"
	t["瓜地洛普/ 瓜德罗普"] = "GP"
	t["关岛"] = "GU"
	t["瓜地马拉/ 危地马拉"] = "GT"
	t["耿西/ 根西"] = "GG"
	t["几内亚"] = "GN"
	t["几内亚比索/ 几内亚比绍"] = "GW"
	t["盖亚那/ 圭亚那"] = "GY"
	t["海地"] = "HT"
	t["赫德岛和麦克唐纳群岛"] = "HM"
	t["洪都拉斯/ 宏都拉斯"] = "HN"
	t["香港"] = "HK"
	t["匈牙利"] = "HU"
	t["冰岛"] = "IS"
	t["印度"] = "IN"
	t["印度尼西亚(印尼)"] = "ID"
	t["伊朗"] = "IR"
	t["伊拉克"] = "IQ"
	t["爱尔兰"] = "IE"
	t["以色列"] = "IL"
	t["曼岛/ 萌岛"] = "IM"
	t["义大利/ 意大利"] = "IT"
	t["象牙海岸/ 科特迪瓦"] = "CI"
	t["牙买加"] = "JM"
	t["日本"] = "JP"
	t["泽西"] = "JE"
	t["约旦"] = "JO"
	t["哈萨克"] = "KZ"
	t["肯亚/ 肯雅"] = "KE"
	t["吉里巴斯/ 基里巴斯"] = "KI"
	t["朝鲜(北韩)"] = "KP"
	t["大韩民国(韩国/南韩)"] = "KR"
	t["韩国"] = "KR"
	t["科索沃"] = "XK"
	t["科威特"] = "KW"
	t["吉尔吉斯"] = "KG"
	t["寮国/ 老挝"] = "LA"
	t["拉脱维亚"] = "LV"
	t["黎巴嫩"] = "LB"
	t["赖索托/ 莱索托"] = "LS"
	t["赖比瑞亚/ 利比里亚"] = "LR"
	t["利比亚"] = "LY"
	t["列支敦斯登/ 列支敦士登"] = "LI"
	t["立陶宛"] = "LT"
	t["卢森堡"] = "LU"
	t["澳门"] = "MO"
	t["北马其顿"] = "MK"
	t["马达加斯加"] = "MG"
	t["马拉威/ 马拉维"] = "MW"
	t["马来西亚"] = "MY"
	t["马尔地夫/ 马尔代夫"] = "MV"
	t["马利/ 马里"] = "ML"
	t["马尔他"] = "MT"
	t["马绍尔群岛"] = "MH"
	t["马丁尼克/ 马提尼克"] = "MQ"
	t["茅利塔尼亚/ 毛里塔尼亚"] = "MR"
	t["模里西斯/ 毛里裘斯"] = "MU"
	t["马约特"] = "YT"
	t["墨西哥"] = "MX"
	t["密克罗尼西亚联邦"] = "FM"
	t["摩尔多瓦"] = "MD"
	t["摩纳哥"] = "MC"
	t["蒙古"] = "MN"
	t["蒙特内哥罗/ 蒙特尼哥罗(黑山)"] = "ME"
	t["蒙哲腊/ 蒙塞拉特"] = "MS"
	t["摩洛哥"] = "MA"
	t["莫三比克/ 莫桑比克"] = "MZ"
	t["缅甸"] = "MM"
	t["纳米比亚"] = "NA"
	t["诺鲁/ 瑙鲁"] = "NR"
	t["尼泊尔"] = "NP"
	t["荷兰"] = "NL"
	t["新喀里多尼亚"] = "NC"
	t["纽西兰"] = "NZ"
	t["尼加拉瓜"] = "NI"
	t["尼日尔(尼日)"] = "NE"
	t["奈及利亚/ 尼日利亚"] = "NG"
	t["纽埃"] = "NU"
	t["诺福克岛"] = "NF"
	t["北马里亚纳群岛"] = "MP"
	t["挪威"] = "NO"
	t["阿曼"] = "OM"
	t["巴基斯坦"] = "PK"
	t["帛琉"] = "PW"
	t["巴勒斯坦"] = "PS"
	t["巴拿马"] = "PA"
	t["巴布亚纽几内亚/ 巴布亚新几内亚"] = "PG"
	t["巴拉圭"] = "PY"
	t["秘鲁"] = "PE"
	t["菲律宾"] = "PH"
	t["皮特肯群岛"] = "PN"
	t["波兰"] = "PL"
	t["葡萄牙"] = "PT"
	t["波多黎各"] = "PR"
	t["卡达/ 卡塔尔"] = "QA"
	t["留尼旺"] = "RE"
	t["罗马尼亚"] = "RO"
	t["俄罗斯"] = "RU"
	t["卢安达/ 卢旺达"] = "RW"
	t["圣巴泰勒米"] = "BL"
	t["圣赫勒拿、亚森欣与垂斯坦昆哈/ 圣海伦娜、阿森松和崔斯坦达库尼亚"] = "SH"
	t["圣克里斯多福及尼维斯/ 圣基茨和尼维斯"] = "KN"
	t["圣露西亚/ 圣卢西亚"] = "LC"
	t["法属圣马丁"] = "MF"
	t["圣皮耶与密克隆/ 圣皮埃尔和密克隆"] = "PM"
	t["圣文森及格瑞那丁/ 圣文森特和格林纳丁斯"] = "VC"
	t["萨摩亚"] = "WS"
	t["圣马利诺"] = "SM"
	t["圣多美普林西比/ 圣多美和普林西比"] = "ST"
	t["沙乌地阿拉伯/ 沙地阿拉伯"] = "SA"
	t["沙特阿拉伯"] = "SA"
	t["塞内加尔"] = "SN"
	t["塞尔维亚"] = "RS"
	t["塞席尔/ 塞舌尔"] = "SC"
	t["狮子山/ 塞拉利昂"] = "SL"
	t["新加坡"] = "SG"
	t["荷属圣马丁"] = "SX"
	t["斯洛伐克"] = "SK"
	t["斯洛维尼亚/ 斯洛文尼亚"] = "SI"
	t["索罗门群岛/ 所罗门群岛"] = "SB"
	t["索马里/ 索马利亚"] = "SO"
	t["南非"] = "ZA"
	t["南乔治亚与南桑威奇/ 南佐治亚及南三文治"] = "GS"
	t["南苏丹"] = "SS"
	t["西班牙"] = "ES"
	t["斯里兰卡"] = "LK"
	t["苏丹"] = "SD"
	t["苏利南/ 苏里南"] = "SR"
	t["斯瓦巴和扬马延"] = "SJ"
	t["史瓦帝尼/ 斯威士兰"] = "SZ"
	t["瑞典"] = "SE"
	t["瑞士"] = "CH"
	t["叙利亚"] = "SY"
	t["台湾(台湾)"] = "TW"
	t["台湾"] = "TW"
	t["塔吉克"] = "TJ"
	t["坦尚尼亚/ 坦桑尼亚"] = "TZ"
	t["泰国"] = "TH"
	t["东帝汶"] = "TL"
	t["多哥"] = "TG"
	t["托克劳"] = "TK"
	t["东加/ 汤加"] = "TO"
	t["千里达及托巴哥/ 千里达及多巴哥"] = "TT"
	t["突尼西亚"] = "TN"
	t["土耳其"] = "TR"
	t["土库曼斯坦(土库曼)"] = "TM"
	t["土克凯可群岛/ 特克斯和凯科斯群岛"] = "TC"
	t["吐瓦鲁/ 图瓦卢"] = "TV"
	t["乌干达"] = "UG"
	t["乌克兰"] = "UA"
	t["阿拉伯联合大公国(阿联) / 阿拉伯联合酋长国(阿联酋)"] = "AE"
	t["阿联酋"] = "AE"
	t["英国"] = "GB"
	t["美国"] = "US"
	t["美国本土外小岛屿"] = "UM"
	t["乌拉圭"] = "UY"
	t["乌兹别克"] = "UZ"
	t["万那杜/ 瓦努阿图"] = "VU"
	t["梵蒂冈"] = "VA"
	t["委内瑞拉"] = "VE"
	t["越南"] = "VN"
	t["英属维京群岛/ 英属处女群岛"] = "VG"
	t["美属维京群岛/ 美属处女群岛"] = "VI"
	t["瓦利斯和富图纳"] = "WF"
	t["西撒哈拉"] = "EH"
	t["叶门/ 也门"] = "YE"
	t["尚比亚/ 赞比亚"] = "ZM"
	t["辛巴威/ 津巴布韦"] = "ZW"
}

func GetISOCodeFromCn(cn string) string {
	if v, ok := t[cn]; ok {
		return v
	}
	return ""
}
