UNPKG

vue3-country-intl-diy

Version:

A vue3-based mobile phone area code selection, nationality selection component(一个基于vue3的手机区号选择、国籍选择组件)

2 lines (1 loc) 42.5 kB
"use strict";var e=require("vue");function t(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function n(e){for(var n=1;n<arguments.length;n++){var a=null!=arguments[n]?arguments[n]:{};n%2?t(Object(a),!0).forEach((function(t){o(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):t(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}function o(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}for(var a={offset:function(e){var t={top:0,left:0},n=e.offsetParent;for(t.top=e.offsetTop,t.left=e.offsetLeft;null!=n;)t.top+=n.offsetTop,t.left+=n.offsetLeft,n=n.offsetParent;return n=null,t},elementContains:function(e,t){if(e===t)return!1;if(!e)return!1;if("function"==typeof e.contains)return e.contains(t);for(;;){if(!t)return!1;if(t===e)return!0;t=t.parentNode}return!1},hasClass:function(e,t){if(e&&e.nodeName){if(t){if(e.classList)return e.classList.contains(t);for(var n=!1,o=e.className.split(" "),a=0,i=o.length;a<i;a++)if(o[a]===t){n=!0;break}return n}console.error("className 必须是一个字符串")}else console.error("ele 必须是一个dom元素")},hasScroll:function(){return{vertical:document.body.offsetWidth<window.innerWidth,horizontal:document.documentElement.clientHeight<window.innerHeight}},scrollWidth:function(e,t){var n,o=document.createElement("div"),a={vertical:0,horizontal:0};return o.style.cssText="width: 200px;height: 200px",e?(t?n=t.cloneNode(!0):e&&!t&&(n=document.createElement("div")),n.style.cssText="width: 100px;height: 100px;opacity: 0;position:absolute;left: -100px;overflow:auto;",n.appendChild(o),document.body.appendChild(n),a.vertical=n.offsetWidth-n.clientWidth,a.horizontal=n.offsetHeight-n.clientHeight,document.body.removeChild(n),n=o=null,a):(a.vertical=window.innerWidth-document.documentElement.offsetWidth,a.horizontal=window.innerHeight-document.documentElement.clientHeight,a)},addClass:function(e,t){if(e&&t&&1===e.nodeType){var n=t.split(" ");if(e.classList){for(var o=0,i=n.length;o<i;o++){var l=n[o];e.classList.contains(l)||e.classList.add(l)}return e}var r=e.className&&e.className.length>0?e.className.split(" "):[];return 0===r.length?void(e.className=t):(Array.prototype.push.apply(r,n),r=a.arrayNoReapeat(r),e.className=r.join(" "),e)}},arrayNoReapeat:function(e,t){if(!e||0===e.length)return e;t=void 0!==t&&!!t;var n=e.length,o=[];if(!t){for(var a={},i=0;i<n;i++)a[e[i]]=1;for(var l in a)o.push(l);return o}o.push(e[0]);for(i=1;i<n;i++){for(var r=e[i],s=!1,u=0;u<o.length;u++)if(r===e[u]){s=!0;break}s||o.push(r)}return o},removeClass:function(e,t){if(e&&t&&1===e.nodeType){var n=t.split(" ");if(e.classList){for(var o=0,a=n.length;o<a;o++){var i=n[o];e.classList.contains(i)&&e.classList.remove(i)}return e}var l=e.className&&e.className.length>0?e.className.split(" "):[];if(0!==l.length){for(o=l.length;o>=0;o--)for(var r=0,s=n.length;r<s;r++)l[o]===n[r]&&l.splice(o,1);return e.className=l.join(" "),e}}},bindEvent:function(e,t,n){document.addEventListener?(e.addEventListener(t,n,!1),e.addEventListener(t,n,!1)):window.attachEvent&&(e.attachEvent("on"+t,n),e.attachEvent("on"+t,n))},unBindEvent:function(e,t,n){e&&(document.removeEventListener?(e.removeEventListener(t,n,!1),e.removeEventListener(t,n,!1)):window.detachEvent&&(e.detachEvent("on"+t,n),e.detachEvent("on"+t,n)))},getElementRect:function(e){var t=e.getBoundingClientRect(),n=document.documentElement.clientTop?document.documentElement.clientTop:0,o=document.documentElement.clientLeft?document.documentElement.clientLeft:0;return{top:t.top-n,bottom:t.bottom-n,left:t.left-o,right:t.right-o}},termianl:function(){var e=navigator.userAgent;return{android:e.indexOf("Android")>-1||e.indexOf("Linux")>-1,ios:!!e.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/)}},getStyle:function(e,t){if(e&&e.nodeName){if(t){var n="";return window.getComputedStyle?n=window.getComputedStyle(e,null)[t]:e.currentStyle&&(n=e.currentStyle[t]),isNaN(parseFloat(n))?n:parseFloat(n)}console.error("cssAttribute 必须是一个字符串")}else console.error("ele 必须是一个dom元素")},getIndex:function(e,t){if(!e||0==e.length||!t||"function"!=typeof t)return-1;if(e.findIndex)return e.findIndex(t);for(var n=e.length,o=0,a=-1;o<n;o++){if(!0===t(e[o],a,e)){a=o;break}}return a},eleIsIntoView:function(e){var t=a.scrollTop(),n=0,o=a.getScrollParent(e);o&&"HTML"!=o.nodeName&&(n=a.scrollTop(e));var i=a.offset(e),l=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,r=i.top-t-n,s=r+e.offsetHeight;return r>0&&r<l&&s>0&&s<l},scrollTop:function(e){if(e){for(var t=e.parentElement,n=e.scrollTop||0;null!=t;){if(a.eleHasScroll(t))return t.scrollTop;t=t.parentElement}return n}return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0},eleHasScroll:function(e){if(!(e instanceof HTMLElement))return!1;if(e.scrollTop>0)return!0;e.scrollTop++;var t=e.scrollTop;return t&&(e.scrollTop=0),t>0},getScrollParent:function(e){if(e)for(var t=e.parentElement;null!=t;){if(a.eleHasScroll(t))return t;t=t.parentElement}},findCountryInfo:function(e,t,n,o){var a=e;if(0==(a+"").length)return{};var i="phone"===t.toLowerCase();"+"===(a+"").charAt(0)&&(a=a.substr(1));var l=o.filter((function(e){return i?n?e.iso2==n:e.dialCode==a||(1==e.dialCode&&e.areaCodes?e.areaCodes.some((function(e){return e==a})):void 0):e.iso2==a}));return l=l&&0!==l.length&&l[0]||{}}},i=["阿富汗","阿尔巴尼亚","阿尔及利亚","美属萨摩亚群岛","安道尔","安哥拉共和国","安圭拉","安提瓜岛","阿根廷","亚美尼亚","阿鲁巴","澳大利亚","奥地利共和国","阿塞拜疆共和国","巴哈马国","巴林王国","孟加拉人民共和国","巴巴多斯","白俄罗斯共和国","比利时王国 (België)","伯利兹","贝宁共和国 (Bénin)","百慕大群岛","不丹王国","玻利维亚国","波斯尼亚和黑塞哥维那","博茨瓦纳","巴西联邦共和国","英属印度洋领地","英属维尔京群岛","文莱达鲁萨兰国","保加利亚共和国","布基纳法索","布隆迪共和国","柬埔寨王国","喀麦隆共和国","加拿大","佛得角共和国","荷兰王国","开曼群岛","中非共和国","乍得共和国","智利共和国","中国","圣诞岛","科科斯群岛","哥伦比亚共和国","科摩罗联盟","刚果民主共和国","刚果共和国","库克群岛","哥斯达黎加共和国","科特迪瓦","克罗地亚共和国","古巴共和国","库拉索","塞浦路斯","捷克共和国","丹麦","吉布提共和国","多米尼克国","多米尼加共和国","厄瓜多尔","埃及","萨尔瓦","赤道几内亚","厄立特里亚","爱沙尼亚共和国","埃塞俄比亚","马尔维纳斯群岛","法罗群岛","斐济共和国","芬兰","法国","法属圭亚那","法属波利尼西亚","加蓬","冈比亚","格鲁吉亚","德国","加纳","直布罗陀","希腊","格陵兰","格林纳达","瓜德罗普岛","关岛","危地马拉","根西","几内亚","几内亚比绍共和国","圭亚那","海地","洪都拉斯","中国香港","匈牙利","冰岛","印度","印度尼西亚","地拉那","伊拉克共和国","爱尔兰","马恩岛","以色列国","意大利","牙买加","日本","泽西","约旦哈希姆王国","哈萨克斯坦共和国","肯尼亚","基里巴斯","科索沃","科威特国","吉尔吉斯共和国","老挝人民民主共和国","拉脱维亚共和国","黎巴嫩共和国","莱索托","利比里亚","利比亚","列支敦士登","立陶宛共和国","卢森堡","中国澳门","马其顿","马达加斯加共和国","马拉维","马来西亚","马尔代夫","马里","马耳他","马绍尔群岛共和国","马提尼克岛","毛里塔尼亚","毛里求斯","马约特","墨西哥","密克罗尼西亚","摩尔多瓦共和国","摩纳哥","蒙古","黑山共和国","蒙特塞拉特岛","摩洛哥","莫桑比克","缅甸联邦共和国","纳米比亚","瑙鲁","尼泊尔","荷兰","新喀里多尼亚","新西兰","尼加拉瓜","尼日尔","尼日利亚","纽埃","诺福克岛","North Korea (조선 민주주의 인민 공화국)","北马里亚纳群岛","挪威","阿曼苏丹国","巴基斯坦","帕劳共和国","巴勒斯坦国","巴拿马","巴布亚新几内亚独立国","巴拉圭","秘鲁","菲律宾共和国","波兰","葡萄牙","波多黎各岛","卡塔尔国","留尼旺岛","罗马尼亚","俄罗斯","卢旺达","圣巴托洛缪岛","圣海伦娜岛","圣基茨和尼维斯联邦","圣卢西亚","圣马丁岛","圣皮埃尔岛和密克隆岛","圣文森特和格林纳丁斯","西萨摩亚","圣马利诺","São Tomé and Príncipe (São Tomé e Príncipe)","沙特阿拉伯王国","塞内加尔","塞尔维亚共和国","塞舌尔","塞拉利昂共和国","新加坡","圣马丁岛","斯洛伐克共和国","斯洛文尼亚","所罗门群岛","索马里","南非","韩国","南苏丹共和国","西班牙","斯里兰卡","苏丹","苏里南","斯瓦尔巴群岛","斯威士兰","瑞典","瑞士","阿拉伯叙利亚共和国","中国台湾","塔吉克斯坦共和国","坦桑尼亚","泰国","东帝汶民主共和国","多哥","托克劳群岛","汤加","特立尼达和多巴哥共和国","突尼斯","土耳其","土库曼斯坦","特克斯和凯科斯群岛","图瓦卢","美属维尔京群岛","乌干达共和国","乌克兰","阿拉伯联合酋长国","大不列颠联合王国","美国","乌拉圭","乌兹别克斯坦共和国","瓦努阿图","梵蒂冈","委内瑞拉","越南","瓦利斯群岛和富图纳群岛","阿拉伯撒哈拉民主共和国","也门共和国","赞比亚","津巴布韦","奥兰群岛","南极洲","布维岛","南乔治亚和南桑威奇群岛","赫德岛和麦克唐纳群岛","皮特凯恩群岛","法属南部和南极领地","美国本土外小岛屿"],l=[["Afghanistan (‫افغانستان‬‎)","af","93"],["Albania (Shqipëri)","al","355"],["Algeria (‫الجزائر‬‎)","dz","213"],["American Samoa","as","1684"],["Andorra","ad","376"],["Angola","ao","244"],["Anguilla","ai","1264"],["Antigua and Barbuda","ag","1268"],["Argentina","ar","54"],["Armenia (Հայաստան)","am","374"],["Aruba","aw","297"],["Australia","au","61",0],["Austria (Österreich)","at","43"],["Azerbaijan (Azərbaycan)","az","994"],["Bahamas","bs","1242"],["Bahrain (‫البحرين‬‎)","bh","973"],["Bangladesh (বাংলাদেশ)","bd","880"],["Barbados","bb","1246"],["Belarus (Беларусь)","by","375"],["Belgium (België)","be","32"],["Belize","bz","501"],["Benin (Bénin)","bj","229"],["Bermuda","bm","1441"],["Bhutan (འབྲུག)","bt","975"],["Bolivia","bo","591"],["Bosnia and Herzegovina (Босна и Херцеговина)","ba","387"],["Botswana","bw","267"],["Brazil (Brasil)","br","55"],["British Indian Ocean Territory","io","246"],["British Virgin Islands","vg","1284"],["Brunei","bn","673"],["Bulgaria (България)","bg","359"],["Burkina Faso","bf","226"],["Burundi (Uburundi)","bi","257"],["Cambodia (កម្ពុជា)","kh","855"],["Cameroon (Cameroun)","cm","237"],["Canada","ca","1",1,["204","226","236","249","250","289","306","343","365","387","403","416","418","431","437","438","450","506","514","519","548","579","581","587","604","613","639","647","672","705","709","742","778","780","782","807","819","825","867","873","902","905"]],["Cape Verde (Kabu Verdi)","cv","238"],["Caribbean Netherlands","bq","599",1],["Cayman Islands","ky","1345"],["Central African Republic (République centrafricaine)","cf","236"],["Chad (Tchad)","td","235"],["Chile","cl","56"],["China (中国)","cn","86"],["Christmas Island","cx","61",2],["Cocos (Keeling) Islands","cc","61",1],["Colombia","co","57"],["Comoros (‫جزر القمر‬‎)","km","269"],["Congo (DRC) (Jamhuri ya Kidemokrasia ya Kongo)","cd","243"],["Congo (Republic) (Congo-Brazzaville)","cg","242"],["Cook Islands","ck","682"],["Costa Rica","cr","506"],["Côte d’Ivoire","ci","225"],["Croatia (Hrvatska)","hr","385"],["Cuba","cu","53"],["Curaçao","cw","599",0],["Cyprus (Κύπρος)","cy","357"],["Czech Republic (Česká republika)","cz","420"],["Denmark (Danmark)","dk","45"],["Djibouti","dj","253"],["Dominica","dm","1767"],["Dominican Republic (República Dominicana)","do","1",2,["809","829","849"]],["Ecuador","ec","593"],["Egypt (‫مصر‬‎)","eg","20"],["El Salvador","sv","503"],["Equatorial Guinea (Guinea Ecuatorial)","gq","240"],["Eritrea","er","291"],["Estonia (Eesti)","ee","372"],["Ethiopia","et","251"],["Falkland Islands (Islas Malvinas)","fk","500"],["Faroe Islands (Føroyar)","fo","298"],["Fiji","fj","679"],["Finland (Suomi)","fi","358",0],["France","fr","33"],["French Guiana (Guyane française)","gf","594"],["French Polynesia (Polynésie française)","pf","689"],["Gabon","ga","241"],["Gambia","gm","220"],["Georgia (საქართველო)","ge","995"],["Germany (Deutschland)","de","49"],["Ghana (Gaana)","gh","233"],["Gibraltar","gi","350"],["Greece (Ελλάδα)","gr","30"],["Greenland (Kalaallit Nunaat)","gl","299"],["Grenada","gd","1473"],["Guadeloupe","gp","590",0],["Guam","gu","1671"],["Guatemala","gt","502"],["Guernsey","gg","44",1],["Guinea (Guinée)","gn","224"],["Guinea-Bissau (Guiné Bissau)","gw","245"],["Guyana","gy","592"],["Haiti","ht","509"],["Honduras","hn","504"],["Hong Kong (中国香港)","hk","852"],["Hungary (Magyarország)","hu","36"],["Iceland (Ísland)","is","354"],["India (भारत)","in","91"],["Indonesia","id","62"],["Iran (‫ایران‬‎)","ir","98"],["Iraq (‫العراق‬‎)","iq","964"],["Ireland","ie","353"],["Isle of Man","im","44",2],["Israel (‫ישראל‬‎)","il","972"],["Italy (Italia)","it","39",0],["Jamaica","jm","1",4,["876","658"]],["Japan (日本)","jp","81"],["Jersey","je","44",3],["Jordan (‫الأردن‬‎)","jo","962"],["Kazakhstan (Казахстан)","kz","7",1],["Kenya","ke","254"],["Kiribati","ki","686"],["Kosovo","xk","383"],["Kuwait (‫الكويت‬‎)","kw","965"],["Kyrgyzstan (Кыргызстан)","kg","996"],["Laos (ລາວ)","la","856"],["Latvia (Latvija)","lv","371"],["Lebanon (‫لبنان‬‎)","lb","961"],["Lesotho","ls","266"],["Liberia","lr","231"],["Libya (‫ليبيا‬‎)","ly","218"],["Liechtenstein","li","423"],["Lithuania (Lietuva)","lt","370"],["Luxembourg","lu","352"],["Macau (中國澳門)","mo","853"],["Macedonia (FYROM) (Македонија)","mk","389"],["Madagascar (Madagasikara)","mg","261"],["Malawi","mw","265"],["Malaysia","my","60"],["Maldives","mv","960"],["Mali","ml","223"],["Malta","mt","356"],["Marshall Islands","mh","692"],["Martinique","mq","596"],["Mauritania (‫موريتانيا‬‎)","mr","222"],["Mauritius (Moris)","mu","230"],["Mayotte","yt","262",1],["Mexico (México)","mx","52"],["Micronesia","fm","691"],["Moldova (Republica Moldova)","md","373"],["Monaco","mc","377"],["Mongolia (Монгол)","mn","976"],["Montenegro (Crna Gora)","me","382"],["Montserrat","ms","1664"],["Morocco (‫المغرب‬‎)","ma","212",0],["Mozambique (Moçambique)","mz","258"],["Myanmar (Burma) (မြန်မာ)","mm","95"],["Namibia (Namibië)","na","264"],["Nauru","nr","674"],["Nepal (नेपाल)","np","977"],["Netherlands (Nederland)","nl","31"],["New Caledonia (Nouvelle-Calédonie)","nc","687"],["New Zealand","nz","64"],["Nicaragua","ni","505"],["Niger (Nijar)","ne","227"],["Nigeria","ng","234"],["Niue","nu","683"],["Norfolk Island","nf","672"],["North Korea (조선 민주주의 인민 공화국)","kp","850"],["Northern Mariana Islands","mp","1670"],["Norway (Norge)","no","47",0],["Oman (‫عُمان‬‎)","om","968"],["Pakistan (‫پاکستان‬‎)","pk","92"],["Palau","pw","680"],["Palestine (‫فلسطين‬‎)","ps","970"],["Panama (Panamá)","pa","507"],["Papua New Guinea","pg","675"],["Paraguay","py","595"],["Peru (Perú)","pe","51"],["Philippines","ph","63"],["Poland (Polska)","pl","48"],["Portugal","pt","351"],["Puerto Rico","pr","1",3,["787","939"]],["Qatar (‫قطر‬‎)","qa","974"],["Réunion (La Réunion)","re","262",0],["Romania (România)","ro","40"],["Russia (Россия)","ru","7",0],["Rwanda","rw","250"],["Saint Barthélemy","bl","590",1],["Saint Helena","sh","290"],["Saint Kitts and Nevis","kn","1869"],["Saint Lucia","lc","1758"],["Saint Martin (Saint-Martin (partie française))","mf","590",2],["Saint Pierre and Miquelon (Saint-Pierre-et-Miquelon)","pm","508"],["Saint Vincent and the Grenadines","vc","1784"],["Samoa","ws","685"],["San Marino","sm","378"],["São Tomé and Príncipe (São Tomé e Príncipe)","st","239"],["Saudi Arabia (‫المملكة العربية السعودية‬‎)","sa","966"],["Senegal (Sénégal)","sn","221"],["Serbia (Србија)","rs","381"],["Seychelles","sc","248"],["Sierra Leone","sl","232"],["Singapore","sg","65"],["Sint Maarten","sx","1721"],["Slovakia (Slovensko)","sk","421"],["Slovenia (Slovenija)","si","386"],["Solomon Islands","sb","677"],["Somalia (Soomaaliya)","so","252"],["South Africa","za","27"],["South Korea (대한민국)","kr","82"],["South Sudan (‫جنوب السودان‬‎)","ss","211"],["Spain (España)","es","34"],["Sri Lanka (ශ්‍රී ලංකාව)","lk","94"],["Sudan (‫السودان‬‎)","sd","249"],["Suriname","sr","597"],["Svalbard and Jan Mayen","sj","47",1],["Swaziland","sz","268"],["Sweden (Sverige)","se","46"],["Switzerland (Schweiz)","ch","41"],["Syria (‫سوريا‬‎)","sy","963"],["Taiwan (中国台灣)","tw","886"],["Tajikistan","tj","992"],["Tanzania","tz","255"],["Thailand (ไทย)","th","66"],["Timor-Leste","tl","670"],["Togo","tg","228"],["Tokelau","tk","690"],["Tonga","to","676"],["Trinidad and Tobago","tt","1868"],["Tunisia (‫تونس‬‎)","tn","216"],["Turkey (Türkiye)","tr","90"],["Turkmenistan","tm","993"],["Turks and Caicos Islands","tc","1649"],["Tuvalu","tv","688"],["U.S. Virgin Islands","vi","1340"],["Uganda","ug","256"],["Ukraine (Україна)","ua","380"],["United Arab Emirates (‫الإمارات العربية المتحدة‬‎)","ae","971"],["United Kingdom","gb","44",0],["United States","us","1",0],["Uruguay","uy","598"],["Uzbekistan (Oʻzbekiston)","uz","998"],["Vanuatu","vu","678"],["Vatican City (Città del Vaticano)","va","39",1],["Venezuela","ve","58"],["Vietnam (Việt Nam)","vn","84"],["Wallis and Futuna (Wallis-et-Futuna)","wf","681"],["Western Sahara (‫الصحراء الغربية‬‎)","eh","212",1],["Yemen (‫اليمن‬‎)","ye","967"],["Zambia","zm","260"],["Zimbabwe","zw","263"],["Åland Islands","ax","358",1],["Antarctica","aq","672"],["Bouvet Island","bv","47"],["South Georgia and the South Sandwich Islands","gs","500"],["Heard Island and McDonald Islands","hm","672"],["Pitcairn","pn","64"],["French Southern Territories","tf","262"],["United States Minor Outlying Islands","um","1"]],r=0;r<l.length;r++){var s=l[r];l[r]={name:s[0],nameCN:i[r],iso2:s[1],dialCode:s[2],priority:s[3]||0,areaCodes:s[4]||null}}var u=l,c={modelValue:{type:[String,Number],default:""},type:{type:String,default:"phone"},iso2:{type:String,default:""},listZIndex:{type:Number,default:0},maxHeight:{type:Number,default:0},searchText:{type:[String,Number],default:""},showAreaCode:{type:Boolean,default:!0},selectedText:{type:String,default:"Selected"},showSelectedText:{type:Boolean,default:!0},searchAble:{type:Boolean,default:!0},disableCountry:{type:[String,Array],default:function(){return[]}},onlyCountry:{type:[String,Array],default:function(){return[]}},noDataText:{type:String,default:"未找到任何数据!"},useChinese:{type:Boolean,default:!1}},d={name:"CountryList",props:n({},c),emits:["update:modelValue","onChange"],setup:function(t,n){var o=e.reactive({item:{}}),i=e.ref(""),l=e.computed((function(){var e=t.searchText||"",n=u,o="string"==typeof t.disableCountry?t.disableCountry.split(","):t.disableCountry,i="string"==typeof t.onlyCountry?t.onlyCountry.split(","):t.onlyCountry;return i.length>0&&(n=n.filter((function(e){return a.getIndex(i,(function(t){var n=t+"";return"+"===n.charAt(0)&&(n=n.replace("+","")),e.name===t||e.nameCN===t||e.dialCode===n||e.iso2===t}))>-1}))),o.length>0&&(n=n.filter((function(e){return-1===a.getIndex(o,(function(t){var n=t+"";return"+"===n.charAt(0)&&(n=n.replace("+","")),e.name===t||e.nameCN===t||e.dialCode===n||e.iso2===t}))}))),t.searchAble&&0!==e.length?(e=e.replace("+","\\+"),n=n.filter((function(t){var n=new RegExp(e,"gi");return!!n.test(t.name||t.nameCN)||(!!n.test(t.dialCode)||(!!n.test(t.iso2)||t.areaCodes&&t.areaCodes.some((function(t){return e.search(t)>-1}))))}))):n})),r=e.watch((function(){return t.modelValue}),(function(){if(i.value!=t.modelValue){var e=a.findCountryInfo(t.modelValue,t.type,t.iso2,l.value);if(e&&e!==o.item){o.item=e,i.value=t.modelValue;var r="";r="phone"===t.type.toLowerCase()?1==e.dialCode&&e.areaCodes?e.areaCodes[0]:e.dialCode||"":e.iso2||"",n.emit("onChange",e,r)}}}),{immediate:!0});return e.onMounted((function(){"phone"==t.type&&0==(t.iso2+"").length&&console.warn("当type=phone时最好传递iso2属性,否则当区号代码为212或358时会出现选择不正确问题!")})),e.onUnmounted((function(){r()})),{selected:o,countryList:l,areaCodeView:function(e,t){if(1==e&&t.areaCodes){var n=t.areaCodes.slice(0,5);return t.areaCodes[0]+" [".concat(n.join(", "),"]")}return e},countryItemClickEvt:function(e){(e=e||window.event).stopPropagation?e.stopPropagation():e.cancelBubble=!0;var a,r=e.target;if(!t.justRead){for(;r&&"LI"!==r.nodeName;)r=r.parentElement;if(r){e.currentTarget;for(var s=r.getAttribute("data-iso"),u=0,c=l.value.length;u<c;u++)if(l.value[u].iso2==s){a=l.value[u];break}if(a){o.item=a;var d="";d="phone"===t.type.toLowerCase()?1==a.dialCode&&a.areaCodes?a.areaCodes[0]:a.dialCode||"":a.iso2||"",i.value=d,n.emit("update:modelValue",d),n.emit("onChange",a,d)}}}}}}},m=["data-index","data-iso"],p={class:"vue-country-name"},f={class:"selected-text"},h={class:"vue-country-no-data"};d.render=function(t,n,o,a,i,l){return e.openBlock(),e.createElementBlock("div",{class:"vue-country-list-wrap",style:e.normalizeStyle({"z-index":0!=t.listZIndex?t.listZIndex:"","max-height":t.maxHeight>0?t.maxHeight+"px":""})},[e.createElementVNode("ul",{class:"vue-country-list",onMousedown:n[0]||(n[0]=function(){return a.countryItemClickEvt&&a.countryItemClickEvt.apply(a,arguments)})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.countryList,(function(n,o){return e.openBlock(),e.createElementBlock("li",{class:e.normalizeClass(["vue-country-item",{selected:n.iso2===a.selected.item.iso2}]),key:n.iso2+o,"data-index":o,"data-iso":n.iso2},[e.createElementVNode("span",{class:e.normalizeClass(["iti-flag",n.iso2])},null,2),e.createElementVNode("span",p,e.toDisplayString(t.useChinese?n.nameCN:n.name),1),e.withDirectives(e.createElementVNode("span",{class:"vue-country-areaCode"}," +"+e.toDisplayString(a.areaCodeView(n.dialCode,n)),513),[[e.vShow,t.showAreaCode]]),e.withDirectives(e.createElementVNode("span",f,[e.renderSlot(t.$slots,"selected",{},(function(){return[e.createTextVNode(e.toDisplayString(t.selectedText),1)]}))],512),[[e.vShow,t.showSelectedText]])],10,m)})),128)),e.withDirectives(e.createElementVNode("li",h,[e.renderSlot(t.$slots,"vueCountryNoData",{},(function(){return[e.createTextVNode(e.toDisplayString(t.noDataText),1)]}))],512),[[e.vShow,0===a.countryList.length]])],32)],4)},d.__file="src/components/country-list/CountryList.vue";var v={name:"SchemaInput",components:{"country-list":d},inheritAttrs:!1,props:n(n({},c),{},{placeholder:{type:String,default:"请选择国家"},showLabelImg:{type:Boolean,default:!0},onlyValue:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},iosMobileReadonly:{type:Boolean,default:!0},static:{type:Boolean,default:!1},transitionName:{type:String,default:"fade_in_up"}}),emits:["update:modelValue","onChange"],setup:function(t,o){var i=e.reactive({item:{}}),l=e.ref(null),r=e.ref(null),s=e.computed((function(){var e=i.item,n=t.useChinese?e.nameCN:e.name,o="+"==(t.modelValue+"").charAt(0)?t.modelValue.substr(1):t.modelValue;if("phone"===t.type.toLowerCase()){var a=e.dialCode;return t.onlyValue?1==a&&e.areaCodes?"+"+(o||e.areaCodes[0]):"+"+e.dialCode:t.showAreaCode?1==a&&e.areaCodes?"".concat(e.name,"(+").concat(o||e.areaCodes[0],")"):n+"(+"+e.dialCode+")":n}return t.onlyValue?e.iso2:n})),c=e.ref(""),d=e.ref(!1),m=e.ref(!1),p=e.ref(!1),f=e.ref(!0),h=e.ref(!1),v=e.ref(window.innerWidth),y=e.ref(null),g=e.ref(null),C=e.computed((function(){return t.static||m.value})),b=e.watch((function(){return t.modelValue}),(function(e){d.value,d.value||(i.item=a.findCountryInfo(t.modelValue,t.type,t.iso2,u))}),{immediate:!0});return e.onMounted((function(){t.static&&(d.value=!0)})),e.onUnmounted((function(){b()})),{id:e.ref("vue_country_intl-"+(window._vueCountryIntl_count++||1)),searchText:c,countryListDisplay:d,countryListVisible:C,inputFocused:p,listOnBottom:f,isIos:h,deviceWidth:v,inputWrap:l,countryList:r,viewText:s,selected:i,searchInput:y,vueCountryIntlWrapper:g,onCountryChange:function(e){e.iso2,i.item.iso2,e.iso2!==i.item.iso2&&(i.item=e,o.emit("onChange",e))},onModelValue:function(e){o.emit("update:modelValue",e)},hide:function(){if(C.value&&!t.disabled&&!t.readonly&&!t.static)var e=setTimeout((function(){clearTimeout(e),c.value="",p.value=!1,m.value=!1,f.value=!0}),100)},show:function(){if(!(t.disabled||t.readonly||t.static)){var n=function(){if(p.value=!0,m.value=!0,c.value="",!t.readonly)var n=setTimeout((function(){clearTimeout(n),y.value.focus()}),0);e.nextTick((function(){var t,n;t=r.value.$el,a.eleIsIntoView(t)?f.value=!0:(t.style.opacity=0,f.value=!1,n&&"function"==typeof n&&n(),e.nextTick((function(){t.style.opacity=null,a.eleIsIntoView(t)||(f.value=!0,n&&"function"==typeof n&&n())})))}))};if(d.value)n();else{d.value=!0;var o=setTimeout((function(){clearTimeout(o),n()}),0)}}},getCountryInfo:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"phone",o=arguments.length>2?arguments[2]:void 0,i=a.findCountryInfo(e,t,o,u);return i.iso2?n({},i):null}}}},y=["aria-readonly","aria-disabled","id","placeholder","readonly"],g={class:"country-intl-label"},C=e.createElementVNode("label",{class:"dropdown-flag"},null,-1),b=e.createElementVNode("div",{class:"prevent-click"},null,-1);v.render=function(t,n,o,a,i,l){var r=e.resolveComponent("country-list");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["vue-country-intl-input",{focused:t.inputFocused,"list-on-bottom":t.listOnBottom,"list-on-top":!t.listOnBottom,"vue-country-disabled":t.disabled,"vue-country-readonly":t.readonly,static:t.static}]),ref:"vueCountryIntlWrapper"},[e.createElementVNode("div",{class:e.normalizeClass(["country-intl-input-wrap",{"no-data":!t.selected.item.name,"has-selected":t.selected.item.name}]),ref:"inputWrap",onClick:n[2]||(n[2]=function(){return t.show&&t.show.apply(t,arguments)})},[e.withDirectives(e.createElementVNode("input",{type:"text","onUpdate:modelValue":n[0]||(n[0]=function(e){return t.searchText=e}),class:"country-intl-input",autocomplete:"off",ref:"searchInput",onBlur:n[1]||(n[1]=function(){return t.hide&&t.hide.apply(t,arguments)}),"aria-readonly":t.readonly,"aria-disabled":t.disabled,id:t.id+"-input",placeholder:t.placeholder,readonly:t.isIos&&t.deviceWidth<992&&t.iosMobileReadonly},null,40,y),[[e.vModelText,t.searchText]]),e.createElementVNode("label",g,[e.withDirectives(e.createElementVNode("span",{class:e.normalizeClass(["iti-flag",t.selected.item.iso2])},null,2),[[e.vShow,t.showLabelImg]]),e.createElementVNode("span",null,e.toDisplayString(t.viewText),1)]),C,b],2),e.createVNode(e.Transition,{name:t.transitionName},{default:e.withCtx((function(){return[t.countryListDisplay?e.withDirectives((e.openBlock(),e.createBlock(r,{key:0,ref:"countryList","model-value":t.modelValue,"search-text":t.searchText,selectedText:t.selectedText,"show-selected-text":t.showSelectedText,"show-area-code":t.showAreaCode,"list-z-index":t.listZIndex,type:t.type,iso2:t.iso2,"search-able":t.searchAble,"disable-country":t.disableCountry,"only-country":t.onlyCountry,"no-data-text":t.noDataText,"use-chinese":t.useChinese,onOnChange:t.onCountryChange,"onUpdate:modelValue":t.onModelValue},{vueCountryNoData:e.withCtx((function(){return[e.renderSlot(t.$slots,"vueCountryNoData")]})),selected:e.withCtx((function(){return[e.renderSlot(t.$slots,"selected")]})),_:3},8,["model-value","search-text","selectedText","show-selected-text","show-area-code","list-z-index","type","iso2","search-able","disable-country","only-country","no-data-text","use-chinese","onOnChange","onUpdate:modelValue"])),[[e.vShow,t.countryListVisible]]):e.createCommentVNode("v-if",!0)]})),_:3},8,["name"])],2)},v.__file="src/components/schema-input/SchemaInput.vue";var w={name:"SchemaPopover",components:{"country-list":d},inheritAttrs:!1,props:n(n({},c),{},{visible:{type:Boolean,default:!1},showLabelImg:{type:Boolean,default:!0},onlyValue:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},searchInputPlaceholder:{type:String,default:"输入国家名称、区号搜索"},popoverClass:{type:String,default:""},offset:{type:Array,default:function(){return[0,10]}},rightOffset:{type:Number,default:20},transitionName:{type:String,default:"zoom_in"}}),emits:["update:modelValue","onChange","update:visible"],setup:function(t,o){var i=e.reactive({item:{}}),l=e.ref(""),r=e.ref(!0),s=e.ref(null),c=e.ref(null),d=e.ref(!1),m=e.ref(!1),p=e.reactive({left:"-100%",top:"-100%"}),f=e.ref(null),h=function(e,t){e-=a.scrollTop();var n=c.value.offsetHeight+e,o=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;return c.value.offsetHeight,e>0&&e<o&&n>0&&n<o},v=function(){t.disabled||t.readonly||e.nextTick((function(){var e=s.value,n=a.offset(e),o=e.offsetHeight,i=a.getScrollParent(e),l=0;a.scrollTop(),i&&"HTML"!=i.nodeName&&(l=l=a.scrollTop(e));var u=0,d=n.left+t.offset[0];if(u=n.top+o+t.offset[1]-l,h(u))r.value=!0;else{var m=n.top-c.value.offsetHeight-t.offset[1]-l;h(m)?(u=m,r.value=!1):r.value=!0}p.top=u+"px",p.left=d+"px";var v=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;f.value=v<992?"calc(100vw - ".concat(d,"px - ").concat(t.rightOffset,"px)"):null,f.value}))},y=function(){o.emit("update:visible",!1)},g=e.watch((function(){return t.visible}),(function(e){if(e)if(m.value)v();else{m.value=!0,i.item=a.findCountryInfo(t.modelValue,t.type,t.iso2,u),i.item;var n=setTimeout((function(){clearTimeout(n),v()}),0)}})),C=function(e){var n=(e=e||window.event).target;t.visible&&(a.elementContains(s.value,n)||a.elementContains(c.value,n)||y())};return e.onMounted((function(){a.bindEvent(document.body,"click",C)})),e.onUnmounted((function(){g(),a.unBindEvent(document.body,"click",C)})),{id:e.ref("vue_country_intl-"+(window._vueCountryIntl_count++||2)),selected:i,searchText:l,listOnBottom:r,popoverDisplay:m,popoverContainer:s,popover:c,popoverVisible:d,popoverPosition:p,popoverMaxWidth:f,onCountryChange:function(e){e.iso2,i.item.iso2,e.iso2!==i.item.iso2&&(i.item=e,o.emit("onChange",e),y())},onModelValueChange:function(e){o.emit("update:modelValue",e)},show:v,hide:y,getCountryInfo:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"phone",o=arguments.length>2?arguments[2]:void 0,i=a.findCountryInfo(e,t,o,u);return i.iso2?n({},i):null}}}},x=["id"],S={class:"search-input-box"},V=["placeholder"],T=e.createElementVNode("div",{class:"vue-country-intl-popover-arrow"},null,-1);w.render=function(t,n,o,a,i,l){var r=e.resolveComponent("country-list");return e.openBlock(),e.createElementBlock("div",{class:"vue-country-intl-schema-popover",ref:"popoverContainer",id:t.id},[e.renderSlot(t.$slots,"default"),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{name:t.transitionName},{default:e.withCtx((function(){return[t.popoverDisplay?e.withDirectives((e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["vue-country-intl-popover",[{"list-on-top":!t.listOnBottom,"list-on-bottom":t.listOnBottom},t.popoverClass]]),ref:"popover",style:e.normalizeStyle({left:t.popoverPosition.left,top:t.popoverPosition.top,maxWidth:t.popoverMaxWidth})},[e.createElementVNode("div",S,[e.withDirectives(e.createElementVNode("input",{type:"text",class:"search-input",autocomplete:"off","onUpdate:modelValue":n[0]||(n[0]=function(e){return t.searchText=e}),placeholder:t.searchInputPlaceholder},null,8,V),[[e.vModelText,t.searchText]])]),e.createVNode(r,{ref:"countryList","model-value":t.modelValue,"search-text":t.searchText,selectedText:t.selectedText,"show-selected-text":t.showSelectedText,"show-area-code":t.showAreaCode,"list-z-index":t.listZIndex,type:t.type,iso2:t.iso2,"search-able":t.searchAble,"disable-country":t.disableCountry,"only-country":t.onlyCountry,"no-data-text":t.noDataText,"use-chinese":t.useChinese,"onUpdate:modelValue":t.onModelValueChange,onOnChange:t.onCountryChange},{vueCountryNoData:e.withCtx((function(){return[e.renderSlot(t.$slots,"vueCountryNoData")]})),selected:e.withCtx((function(){return[e.renderSlot(t.$slots,"selected")]})),_:3},8,["model-value","search-text","selectedText","show-selected-text","show-area-code","list-z-index","type","iso2","search-able","disable-country","only-country","no-data-text","use-chinese","onUpdate:modelValue","onOnChange"]),T],6)),[[e.vShow,t.visible]]):e.createCommentVNode("v-if",!0)]})),_:3},8,["name"])]))],8,x)},w.__file="src/components/schema-popover/SchemaPopover.vue";var N={name:"SchemaModal",components:{"country-list":d},inheritAttrs:!1,props:n(n({},c),{},{disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},searchInputPlaceholder:{type:String,default:"输入国家名称、区号搜索"},cancelText:{type:String,default:"取消"},visible:{type:Boolean,default:!1},modalClass:{type:String,default:""},transitionName:{type:String,default:"fade"}}),emits:["update:modelValue","onChange","update:visible"],setup:function(t,o){var i,l=e.reactive({item:{}}),r=e.ref(""),s=e.ref(t.visible),c=e.ref(!1),d=e.ref(!1),m=e.ref(null),p=function(){var e,t,n,l,r,u,c;e=document.body,t=e.style.overflow,n=e.style.paddingRight,l=e.style.paddingBottom,r=a.hasClass(e,"bs-lock-scroll"),u=a.hasScroll(),c=a.scrollWidth(),e.style.overflow="hidden",r||a.addClass(e,"lock-scroll"),u.vertical&&(document.body.style.paddingRight=c.vertical+"px"),u.horizontal&&(e.style.paddingBottom=c.horizontal+"px"),i=function(){var e=document.body;r||a.removeClass(e,"lock-scroll"),e.style.overflow=t||"hidden"===t?"":t,n||parseFloat(n)===c.vertical?e.style.paddingRight="":e.style.paddingRight=n,l||parseFloat(l)===c.horizontal?e.style.paddingBottom="":e.style.paddingBottom=l},d.value||(d.value=!0),s.value=!0,o.emit("update:visible",!0)},f=function(){if(d.value)var e=setTimeout((function(){clearTimeout(e),"function"==typeof i&&(i(),i=null),s.value=!1,r.value="",o.emit("update:visible",!1)}),100)},h=e.watch((function(){return t.visible}),(function(e){if(e!==s.value)if(e)if(c.value)p();else{c.value=!0,l.item=a.findCountryInfo(t.modelValue,t.type,t.iso2,u);var n=setTimeout((function(){clearTimeout(n),p()}),0)}else f()}),{immediate:!0});return e.onBeforeUnmount((function(){f()})),e.onUnmounted((function(){h()})),{id:e.ref("vue_country_intl-"+window._vueCountryIntl_count++),selected:l,searchText:r,modalVisible:s,modalDisplay:c,countryListVisible:d,intlModal:m,onCountryChange:function(e){e.iso2,l.item.iso2,e.iso2!==l.item.iso2&&(l.item=e,o.emit("onChange",e),f())},onModelValueChange:function(e){o.emit("update:modelValue",e)},show:p,hide:f,getCountryInfo:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"phone",o=arguments.length>2?arguments[2]:void 0,i=a.findCountryInfo(e,t,o,u);return i.iso2?n({},i):null}}}},k={class:"country-modal-content"},B={class:"country-modal-search-box"},I={class:"modal-search-wrap"},E=["placeholder"];N.render=function(t,n,o,a,i,l){var r=e.resolveComponent("country-list");return e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{name:t.transitionName},{default:e.withCtx((function(){return[t.modalDisplay?e.withDirectives((e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["vue-country-intl-modal",t.modalClass]),ref:"intlModal",style:e.normalizeStyle({zIndex:0!=t.listZIndex?t.listZIndex:""})},[e.createElementVNode("div",k,[e.createElementVNode("div",B,[e.createElementVNode("div",I,[e.withDirectives(e.createElementVNode("input",{type:"text","onUpdate:modelValue":n[0]||(n[0]=function(e){return t.searchText=e}),autocomplete:"off",class:"country-modal-search-input",placeholder:t.searchInputPlaceholder},null,8,E),[[e.vModelText,t.searchText]]),e.createElementVNode("span",{class:"country-modal-search-cancel",onClick:n[1]||(n[1]=function(){return t.hide&&t.hide.apply(t,arguments)})},[e.createCommentVNode("取消"),e.createTextVNode(e.toDisplayString(t.cancelText),1)])])]),e.withDirectives(e.createVNode(r,{ref:"countryList","model-value":t.modelValue,"search-text":t.searchText,selectedText:t.selectedText,"show-selected-text":t.showSelectedText,"show-area-code":t.showAreaCode,"list-z-index":t.listZIndex,type:t.type,iso2:t.iso2,"search-able":t.searchAble,"disable-country":t.disableCountry,"only-country":t.onlyCountry,"no-data-text":t.noDataText,"use-chinese":t.useChinese,onOnChange:t.onCountryChange,"onUpdate:modelValue":t.onModelValueChange},{vueCountryNoData:e.withCtx((function(){return[e.renderSlot(t.$slots,"vueCountryNoData")]})),selected:e.withCtx((function(){return[e.renderSlot(t.$slots,"selected")]})),_:3},8,["model-value","search-text","selectedText","show-selected-text","show-area-code","list-z-index","type","iso2","search-able","disable-country","only-country","no-data-text","use-chinese","onOnChange","onUpdate:modelValue"]),[[e.vShow,t.countryListVisible]])])],6)),[[e.vShow,t.modalVisible]]):e.createCommentVNode("v-if",!0)]})),_:3},8,["name"])])},N.__file="src/components/schema-modal/SchemaModal.vue";var M={name:"Vue3CountryIntl",components:{"schema-input":v,"schema-popover":w,"schema-modal":N},props:n(n({},c),{},{schema:{type:String,default:"input"},placeholder:{type:String,default:"请选择国家"},showLabelImg:{type:Boolean,default:!0},onlyValue:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},offsetTop:{type:Number,default:10},popoverClass:{type:String,default:""},visible:{type:Boolean,default:!1},modalClass:{type:String,default:""},cancelText:{type:String,default:"取消"},iosMobileReadonly:{type:Boolean,default:!0},useChinese:{type:Boolean,default:!1},static:{type:Boolean,default:!1},offset:{type:Array,default:function(){return[0,10]}},rightOffset:{type:Number,default:20},transitionName:{type:[String,void 0],default:void 0}}),emits:["update:modelValue","update:visible","onChange"],setup:function(t,n){window._vueCountryIntl_count||(window._vueCountryIntl_count=1);var o,i,l=e.reactive({item:{}}),r=e.ref(t.visible);"modal"!=t.schema&&"popover"!=t.schema||(o=e.watch((function(){return t.visible}),(function(e){e!=r.value&&(r.value=e)})),i=e.watch(r,(function(e){e!=t.visible&&n.emit("update:visible",e)})));var s=e.ref(null),u=e.ref(null),c=e.ref(null);return e.onMounted((function(){var e=document.body.classList;a.termianl().ios&&!e.contains("vue-country-ios")&&e.add("vue-country-ios")})),e.onUnmounted((function(){"function"==typeof o&&o(),"function"==typeof i&&i()})),{onChange:function(e){l.item=e,n.emit("onChange",e)},version:"1.0.16",getSelected:function(){return l.item},modalVisible:r,show:function(){var e;switch(t.schema){case"input":e=s;break;case"popover":e=u;break;case"modal":e=c}e.value.show()},hide:function(){var e;switch(t.schema){case"input":e=s;break;case"popover":e=u;break;case"modal":e=c}e.value.hide()},schemaInput:s,schemaPopover:u,modalPopover:c,onModelValueChange:function(e){n.emit("update:modelValue",e)},getCountryInfo:function(e){var n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"phone",a=arguments.length>2?arguments[2]:void 0;switch(t.schema){case"input":n=s;break;case"popover":n=u;break;case"modal":n=c}return n.value.getCountryInfo(e,o,a)}}}};M.render=function(t,n,o,a,i,l){var r=e.resolveComponent("schema-input"),s=e.resolveComponent("schema-popover"),u=e.resolveComponent("schema-modal");return"input"===t.schema?(e.openBlock(),e.createBlock(r,e.mergeProps({key:0,ref:"schemaInput"},t.$props,{"model-value":t.modelValue,"onUpdate:modelValue":t.onModelValueChange,onOnChange:t.onChange}),{vueCountryNoData:e.withCtx((function(){return[e.renderSlot(t.$slots,"vueCountryNoData")]})),selected:e.withCtx((function(){return[e.renderSlot(t.$slots,"selected")]})),_:3},16,["model-value","onUpdate:modelValue","onOnChange"])):"popover"===t.schema?(e.openBlock(),e.createBlock(s,e.mergeProps({key:1,ref:"schemaPopover"},t.$props,{"model-value":t.modelValue,"onUpdate:modelValue":t.onModelValueChange,visible:t.modalVisible,"onUpdate:visible":n[0]||(n[0]=function(e){return t.modalVisible=e}),onOnChange:t.onChange}),{vueCountryNoData:e.withCtx((function(){return[e.renderSlot(t.$slots,"vueCountryNoData")]})),selected:e.withCtx((function(){return[e.renderSlot(t.$slots,"selected")]})),default:e.withCtx((function(){return[e.renderSlot(t.$slots,"default")]})),_:3},16,["model-value","onUpdate:modelValue","visible","onOnChange"])):"modal"===t.schema?(e.openBlock(),e.createBlock(u,e.mergeProps({key:2,ref:"schemaModal"},t.$props,{"model-value":t.modelValue,"onUpdate:modelValue":t.onModelValueChange,visible:t.modalVisible,"onUpdate:visible":n[1]||(n[1]=function(e){return t.modalVisible=e}),onOnChange:t.onChange}),{vueCountryNoData:e.withCtx((function(){return[e.renderSlot(t.$slots,"vueCountryNoData")]})),selected:e.withCtx((function(){return[e.renderSlot(t.$slots,"selected")]})),_:3},16,["model-value","onUpdate:modelValue","visible","onOnChange"])):e.createCommentVNode("v-if",!0)},M.__file="src/components/Vue3CountryIntl.vue",module.exports=M;