@xlui/xux-ui 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +55 -10
- package/dist/index.css +1 -1
- package/dist/index.js +82 -15
- package/dist/index.mjs +1170 -992
- package/package.json +60 -57
- package/src/components/Accordion/index.vue +2 -0
- package/src/components/Button/index.vue +81 -34
- package/src/components/Tooltips/index.vue +374 -0
- package/src/composables/Alert.ts +238 -0
- package/src/index.ts +3 -0
package/dist/index.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),fe=/^[a-z0-9]+(-[a-z0-9]+)*$/,O=(t,a,l,n="")=>{const o=t.split(":");if(t.slice(0,1)==="@"){if(o.length<2||o.length>3)return null;n=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){const i=o.pop(),h=o.pop(),g={provider:o.length>0?o[0]:n,prefix:h,name:i};return a&&!X(g)?null:g}const c=o[0],s=c.split("-");if(s.length>1){const i={provider:n,prefix:s.shift(),name:s.join("-")};return a&&!X(i)?null:i}if(l&&n===""){const i={provider:n,prefix:"",name:c};return a&&!X(i,l)?null:i}return null},X=(t,a)=>t?!!((a&&t.prefix===""||t.prefix)&&t.name):!1,me=Object.freeze({left:0,top:0,width:16,height:16}),D=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),R=Object.freeze({...me,...D}),W=Object.freeze({...R,body:"",hidden:!1});function Pe(t,a){const l={};!t.hFlip!=!a.hFlip&&(l.hFlip=!0),!t.vFlip!=!a.vFlip&&(l.vFlip=!0);const n=((t.rotate||0)+(a.rotate||0))%4;return n&&(l.rotate=n),l}function ee(t,a){const l=Pe(t,a);for(const n in W)n in D?n in t&&!(n in l)&&(l[n]=D[n]):n in a?l[n]=a[n]:n in t&&(l[n]=t[n]);return l}function je(t,a){const l=t.icons,n=t.aliases||Object.create(null),o=Object.create(null);function c(s){if(l[s])return o[s]=[];if(!(s in o)){o[s]=null;const i=n[s]&&n[s].parent,h=i&&c(i);h&&(o[s]=[i].concat(h))}return o[s]}return Object.keys(l).concat(Object.keys(n)).forEach(c),o}function Me(t,a,l){const n=t.icons,o=t.aliases||Object.create(null);let c={};function s(i){c=ee(n[i]||o[i],c)}return s(a),l.forEach(s),ee(t,c)}function pe(t,a){const l=[];if(typeof t!="object"||typeof t.icons!="object")return l;t.not_found instanceof Array&&t.not_found.forEach(o=>{a(o,null),l.push(o)});const n=je(t);for(const o in n){const c=n[o];c&&(a(o,Me(t,o,c)),l.push(o))}return l}const Be={provider:"",aliases:{},not_found:{},...me};function G(t,a){for(const l in a)if(l in t&&typeof t[l]!=typeof a[l])return!1;return!0}function he(t){if(typeof t!="object"||t===null)return null;const a=t;if(typeof a.prefix!="string"||!t.icons||typeof t.icons!="object"||!G(t,Be))return null;const l=a.icons;for(const o in l){const c=l[o];if(!o||typeof c.body!="string"||!G(c,W))return null}const n=a.aliases||Object.create(null);for(const o in n){const c=n[o],s=c.parent;if(!o||typeof s!="string"||!l[s]&&!n[s]||!G(c,W))return null}return a}const te=Object.create(null);function Ae(t,a){return{provider:t,prefix:a,icons:Object.create(null),missing:new Set}}function I(t,a){const l=te[t]||(te[t]=Object.create(null));return l[a]||(l[a]=Ae(t,a))}function ue(t,a){return he(a)?pe(a,(l,n)=>{n?t.icons[l]=n:t.missing.add(l)}):[]}function Ve(t,a,l){try{if(typeof l.body=="string")return t.icons[a]={...l},!0}catch{}return!1}let $=!1;function ve(t){return typeof t=="boolean"&&($=t),$}function Ie(t){const a=typeof t=="string"?O(t,!0,$):t;if(a){const l=I(a.provider,a.prefix),n=a.name;return l.icons[n]||(l.missing.has(n)?null:void 0)}}function Ne(t,a){const l=O(t,!0,$);if(!l)return!1;const n=I(l.provider,l.prefix);return a?Ve(n,l.name,a):(n.missing.add(l.name),!0)}function Te(t,a){if(typeof t!="object")return!1;if(typeof a!="string"&&(a=t.provider||""),$&&!a&&!t.prefix){let o=!1;return he(t)&&(t.prefix="",pe(t,(c,s)=>{Ne(c,s)&&(o=!0)})),o}const l=t.prefix;if(!X({prefix:l,name:"a"}))return!1;const n=I(a,l);return!!ue(n,t)}const be=Object.freeze({width:null,height:null}),we=Object.freeze({...be,...D}),$e=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Le=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function ne(t,a,l){if(a===1)return t;if(l=l||100,typeof t=="number")return Math.ceil(t*a*l)/l;if(typeof t!="string")return t;const n=t.split($e);if(n===null||!n.length)return t;const o=[];let c=n.shift(),s=Le.test(c);for(;;){if(s){const i=parseFloat(c);isNaN(i)?o.push(c):o.push(Math.ceil(i*a*l)/l)}else o.push(c);if(c=n.shift(),c===void 0)return o.join("");s=!s}}function Xe(t,a="defs"){let l="";const n=t.indexOf("<"+a);for(;n>=0;){const o=t.indexOf(">",n),c=t.indexOf("</"+a);if(o===-1||c===-1)break;const s=t.indexOf(">",c);if(s===-1)break;l+=t.slice(o+1,c).trim(),t=t.slice(0,n).trim()+t.slice(s+1)}return{defs:l,content:t}}function ze(t,a){return t?"<defs>"+t+"</defs>"+a:a}function Fe(t,a,l){const n=Xe(t);return ze(n.defs,a+n.content+l)}const De=t=>t==="unset"||t==="undefined"||t==="none";function Oe(t,a){const l={...R,...t},n={...we,...a},o={left:l.left,top:l.top,width:l.width,height:l.height};let c=l.body;[l,n].forEach(m=>{const f=[],y=m.hFlip,S=m.vFlip;let w=m.rotate;y?S?w+=2:(f.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),f.push("scale(-1 1)"),o.top=o.left=0):S&&(f.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),f.push("scale(1 -1)"),o.top=o.left=0);let b;switch(w<0&&(w-=Math.floor(w/4)*4),w=w%4,w){case 1:b=o.height/2+o.top,f.unshift("rotate(90 "+b.toString()+" "+b.toString()+")");break;case 2:f.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:b=o.width/2+o.left,f.unshift("rotate(-90 "+b.toString()+" "+b.toString()+")");break}w%2===1&&(o.left!==o.top&&(b=o.left,o.left=o.top,o.top=b),o.width!==o.height&&(b=o.width,o.width=o.height,o.height=b)),f.length&&(c=Fe(c,'<g transform="'+f.join(" ")+'">',"</g>"))});const s=n.width,i=n.height,h=o.width,g=o.height;let d,p;s===null?(p=i===null?"1em":i==="auto"?g:i,d=ne(p,h/g)):(d=s==="auto"?h:s,p=i===null?ne(d,g/h):i==="auto"?g:i);const v={},r=(m,f)=>{De(f)||(v[m]=f.toString())};r("width",d),r("height",p);const k=[o.left,o.top,h,g];return v.viewBox=k.join(" "),{attributes:v,viewBox:k,body:c}}const Re=/\sid="(\S+)"/g,_e="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let Ge=0;function Ke(t,a=_e){const l=[];let n;for(;n=Re.exec(t);)l.push(n[1]);if(!l.length)return t;const o="suffix"+(Math.random()*16777216|Date.now()).toString(16);return l.forEach(c=>{const s=typeof a=="function"?a(c):a+(Ge++).toString(),i=c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(new RegExp('([#;"])('+i+')([")]|\\.[a-z])',"g"),"$1"+s+o+"$3")}),t=t.replace(new RegExp(o,"g"),""),t}const H=Object.create(null);function We(t,a){H[t]=a}function q(t){return H[t]||H[""]}function Q(t){let a;if(typeof t.resources=="string")a=[t.resources];else if(a=t.resources,!(a instanceof Array)||!a.length)return null;return{resources:a,path:t.path||"/",maxURL:t.maxURL||500,rotate:t.rotate||750,timeout:t.timeout||5e3,random:t.random===!0,index:t.index||0,dataAfterTimeout:t.dataAfterTimeout!==!1}}const Z=Object.create(null),N=["https://api.simplesvg.com","https://api.unisvg.com"],z=[];for(;N.length>0;)N.length===1||Math.random()>.5?z.push(N.shift()):z.push(N.pop());Z[""]=Q({resources:["https://api.iconify.design"].concat(z)});function He(t,a){const l=Q(a);return l===null?!1:(Z[t]=l,!0)}function J(t){return Z[t]}const qe=()=>{let t;try{if(t=fetch,typeof t=="function")return t}catch{}};let oe=qe();function Ue(t,a){const l=J(t);if(!l)return 0;let n;if(!l.maxURL)n=0;else{let o=0;l.resources.forEach(s=>{o=Math.max(o,s.length)});const c=a+".json?icons=";n=l.maxURL-o-l.path.length-c.length}return n}function Ye(t){return t===404}const Qe=(t,a,l)=>{const n=[],o=Ue(t,a),c="icons";let s={type:c,provider:t,prefix:a,icons:[]},i=0;return l.forEach((h,g)=>{i+=h.length+1,i>=o&&g>0&&(n.push(s),s={type:c,provider:t,prefix:a,icons:[]},i=h.length),s.icons.push(h)}),n.push(s),n};function Ze(t){if(typeof t=="string"){const a=J(t);if(a)return a.path}return"/"}const Je=(t,a,l)=>{if(!oe){l("abort",424);return}let n=Ze(a.provider);switch(a.type){case"icons":{const c=a.prefix,i=a.icons.join(","),h=new URLSearchParams({icons:i});n+=c+".json?"+h.toString();break}case"custom":{const c=a.uri;n+=c.slice(0,1)==="/"?c.slice(1):c;break}default:l("abort",400);return}let o=503;oe(t+n).then(c=>{const s=c.status;if(s!==200){setTimeout(()=>{l(Ye(s)?"abort":"next",s)});return}return o=501,c.json()}).then(c=>{if(typeof c!="object"||c===null){setTimeout(()=>{c===404?l("abort",c):l("next",o)});return}setTimeout(()=>{l("success",c)})}).catch(()=>{l("next",o)})},et={prepare:Qe,send:Je};function tt(t){const a={loaded:[],missing:[],pending:[]},l=Object.create(null);t.sort((o,c)=>o.provider!==c.provider?o.provider.localeCompare(c.provider):o.prefix!==c.prefix?o.prefix.localeCompare(c.prefix):o.name.localeCompare(c.name));let n={provider:"",prefix:"",name:""};return t.forEach(o=>{if(n.name===o.name&&n.prefix===o.prefix&&n.provider===o.provider)return;n=o;const c=o.provider,s=o.prefix,i=o.name,h=l[c]||(l[c]=Object.create(null)),g=h[s]||(h[s]=I(c,s));let d;i in g.icons?d=a.loaded:s===""||g.missing.has(i)?d=a.missing:d=a.pending;const p={provider:c,prefix:s,name:i};d.push(p)}),a}function ye(t,a){t.forEach(l=>{const n=l.loaderCallbacks;n&&(l.loaderCallbacks=n.filter(o=>o.id!==a))})}function nt(t){t.pendingCallbacksFlag||(t.pendingCallbacksFlag=!0,setTimeout(()=>{t.pendingCallbacksFlag=!1;const a=t.loaderCallbacks?t.loaderCallbacks.slice(0):[];if(!a.length)return;let l=!1;const n=t.provider,o=t.prefix;a.forEach(c=>{const s=c.icons,i=s.pending.length;s.pending=s.pending.filter(h=>{if(h.prefix!==o)return!0;const g=h.name;if(t.icons[g])s.loaded.push({provider:n,prefix:o,name:g});else if(t.missing.has(g))s.missing.push({provider:n,prefix:o,name:g});else return l=!0,!0;return!1}),s.pending.length!==i&&(l||ye([t],c.id),c.callback(s.loaded.slice(0),s.missing.slice(0),s.pending.slice(0),c.abort))})}))}let ot=0;function at(t,a,l){const n=ot++,o=ye.bind(null,l,n);if(!a.pending.length)return o;const c={id:n,icons:a,callback:t,abort:o};return l.forEach(s=>{(s.loaderCallbacks||(s.loaderCallbacks=[])).push(c)}),o}function lt(t,a=!0,l=!1){const n=[];return t.forEach(o=>{const c=typeof o=="string"?O(o,a,l):o;c&&n.push(c)}),n}var ct={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function st(t,a,l,n){const o=t.resources.length,c=t.random?Math.floor(Math.random()*o):t.index;let s;if(t.random){let x=t.resources.slice(0);for(s=[];x.length>1;){const M=Math.floor(Math.random()*x.length);s.push(x[M]),x=x.slice(0,M).concat(x.slice(M+1))}s=s.concat(x)}else s=t.resources.slice(c).concat(t.resources.slice(0,c));const i=Date.now();let h="pending",g=0,d,p=null,v=[],r=[];typeof n=="function"&&r.push(n);function k(){p&&(clearTimeout(p),p=null)}function m(){h==="pending"&&(h="aborted"),k(),v.forEach(x=>{x.status==="pending"&&(x.status="aborted")}),v=[]}function f(x,M){M&&(r=[]),typeof x=="function"&&r.push(x)}function y(){return{startTime:i,payload:a,status:h,queriesSent:g,queriesPending:v.length,subscribe:f,abort:m}}function S(){h="failed",r.forEach(x=>{x(void 0,d)})}function w(){v.forEach(x=>{x.status==="pending"&&(x.status="aborted")}),v=[]}function b(x,M,u){const E=M!=="success";switch(v=v.filter(C=>C!==x),h){case"pending":break;case"failed":if(E||!t.dataAfterTimeout)return;break;default:return}if(M==="abort"){d=u,S();return}if(E){d=u,v.length||(s.length?j():S());return}if(k(),w(),!t.random){const C=t.resources.indexOf(x.resource);C!==-1&&C!==t.index&&(t.index=C)}h="completed",r.forEach(C=>{C(u)})}function j(){if(h!=="pending")return;k();const x=s.shift();if(x===void 0){if(v.length){p=setTimeout(()=>{k(),h==="pending"&&(w(),S())},t.timeout);return}S();return}const M={status:"pending",resource:x,callback:(u,E)=>{b(M,u,E)}};v.push(M),g++,p=setTimeout(j,t.rotate),l(x,a,M.callback)}return setTimeout(j),y}function Ce(t){const a={...ct,...t};let l=[];function n(){l=l.filter(i=>i().status==="pending")}function o(i,h,g){const d=st(a,i,h,(p,v)=>{n(),g&&g(p,v)});return l.push(d),d}function c(i){return l.find(h=>i(h))||null}return{query:o,find:c,setIndex:i=>{a.index=i},getIndex:()=>a.index,cleanup:n}}function ae(){}const K=Object.create(null);function gt(t){if(!K[t]){const a=J(t);if(!a)return;const l=Ce(a),n={config:a,redundancy:l};K[t]=n}return K[t]}function it(t,a,l){let n,o;if(typeof t=="string"){const c=q(t);if(!c)return l(void 0,424),ae;o=c.send;const s=gt(t);s&&(n=s.redundancy)}else{const c=Q(t);if(c){n=Ce(c);const s=t.resources?t.resources[0]:"",i=q(s);i&&(o=i.send)}}return!n||!o?(l(void 0,424),ae):n.query(a,o,l)().abort}function le(){}function dt(t){t.iconsLoaderFlag||(t.iconsLoaderFlag=!0,setTimeout(()=>{t.iconsLoaderFlag=!1,nt(t)}))}function rt(t){const a=[],l=[];return t.forEach(n=>{(n.match(fe)?a:l).push(n)}),{valid:a,invalid:l}}function T(t,a,l){function n(){const o=t.pendingIcons;a.forEach(c=>{o&&o.delete(c),t.icons[c]||t.missing.add(c)})}if(l&&typeof l=="object")try{if(!ue(t,l).length){n();return}}catch(o){console.error(o)}n(),dt(t)}function ce(t,a){t instanceof Promise?t.then(l=>{a(l)}).catch(()=>{a(null)}):a(t)}function ft(t,a){t.iconsToLoad?t.iconsToLoad=t.iconsToLoad.concat(a).sort():t.iconsToLoad=a,t.iconsQueueFlag||(t.iconsQueueFlag=!0,setTimeout(()=>{t.iconsQueueFlag=!1;const{provider:l,prefix:n}=t,o=t.iconsToLoad;if(delete t.iconsToLoad,!o||!o.length)return;const c=t.loadIcon;if(t.loadIcons&&(o.length>1||!c)){ce(t.loadIcons(o,n,l),d=>{T(t,o,d)});return}if(c){o.forEach(d=>{const p=c(d,n,l);ce(p,v=>{const r=v?{prefix:n,icons:{[d]:v}}:null;T(t,[d],r)})});return}const{valid:s,invalid:i}=rt(o);if(i.length&&T(t,i,null),!s.length)return;const h=n.match(fe)?q(l):null;if(!h){T(t,s,null);return}h.prepare(l,n,s).forEach(d=>{it(l,d,p=>{T(t,d.icons,p)})})}))}const mt=(t,a)=>{const l=lt(t,!0,ve()),n=tt(l);if(!n.pending.length){let h=!0;return a&&setTimeout(()=>{h&&a(n.loaded,n.missing,n.pending,le)}),()=>{h=!1}}const o=Object.create(null),c=[];let s,i;return n.pending.forEach(h=>{const{provider:g,prefix:d}=h;if(d===i&&g===s)return;s=g,i=d,c.push(I(g,d));const p=o[g]||(o[g]=Object.create(null));p[d]||(p[d]=[])}),n.pending.forEach(h=>{const{provider:g,prefix:d,name:p}=h,v=I(g,d),r=v.pendingIcons||(v.pendingIcons=new Set);r.has(p)||(r.add(p),o[g][d].push(p))}),c.forEach(h=>{const g=o[h.provider][h.prefix];g.length&&ft(h,g)}),a?at(a,n,c):le};function pt(t,a){const l={...t};for(const n in a){const o=a[n],c=typeof o;n in be?(o===null||o&&(c==="string"||c==="number"))&&(l[n]=o):c===typeof l[n]&&(l[n]=n==="rotate"?o%4:o)}return l}const ht=/[\s,]+/;function ut(t,a){a.split(ht).forEach(l=>{switch(l.trim()){case"horizontal":t.hFlip=!0;break;case"vertical":t.vFlip=!0;break}})}function vt(t,a=0){const l=t.replace(/^-?[0-9.]*/,"");function n(o){for(;o<0;)o+=4;return o%4}if(l===""){const o=parseInt(t);return isNaN(o)?0:n(o)}else if(l!==t){let o=0;switch(l){case"%":o=25;break;case"deg":o=90}if(o){let c=parseFloat(t.slice(0,t.length-l.length));return isNaN(c)?0:(c=c/o,c%1===0?n(c):0)}}return a}function bt(t,a){let l=t.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const n in a)l+=" "+n+'="'+a[n]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+l+">"+t+"</svg>"}function wt(t){return t.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function yt(t){return"data:image/svg+xml,"+wt(t)}function Ct(t){return'url("'+yt(t)+'")'}const se={...we,inline:!1},Et={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},St={display:"inline-block"},U={backgroundColor:"currentColor"},Ee={backgroundColor:"transparent"},ge={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},ie={webkitMask:U,mask:U,background:Ee};for(const t in ie){const a=ie[t];for(const l in ge)a[t+l]=ge[l]}const F={};["horizontal","vertical"].forEach(t=>{const a=t.slice(0,1)+"Flip";F[t+"-flip"]=a,F[t.slice(0,1)+"-flip"]=a,F[t+"Flip"]=a});function de(t){return t+(t.match(/^[-0-9.]+$/)?"px":"")}const re=(t,a)=>{const l=pt(se,a),n={...Et},o=a.mode||"svg",c={},s=a.style,i=typeof s=="object"&&!(s instanceof Array)?s:{};for(let m in a){const f=a[m];if(f!==void 0)switch(m){case"icon":case"style":case"onLoad":case"mode":case"ssr":break;case"inline":case"hFlip":case"vFlip":l[m]=f===!0||f==="true"||f===1;break;case"flip":typeof f=="string"&&ut(l,f);break;case"color":c.color=f;break;case"rotate":typeof f=="string"?l[m]=vt(f):typeof f=="number"&&(l[m]=f);break;case"ariaHidden":case"aria-hidden":f!==!0&&f!=="true"&&delete n["aria-hidden"];break;default:{const y=F[m];y?(f===!0||f==="true"||f===1)&&(l[y]=!0):se[m]===void 0&&(n[m]=f)}}}const h=Oe(t,l),g=h.attributes;if(l.inline&&(c.verticalAlign="-0.125em"),o==="svg"){n.style={...c,...i},Object.assign(n,g);let m=0,f=a.id;return typeof f=="string"&&(f=f.replace(/-/g,"_")),n.innerHTML=Ke(h.body,f?()=>f+"ID"+m++:"iconifyVue"),e.h("svg",n)}const{body:d,width:p,height:v}=t,r=o==="mask"||(o==="bg"?!1:d.indexOf("currentColor")!==-1),k=bt(d,{...g,width:p+"",height:v+""});return n.style={...c,"--svg":Ct(k),width:de(g.width),height:de(g.height),...St,...r?U:Ee,...i},e.h("span",n)};ve(!0);We("",et);if(typeof document<"u"&&typeof window<"u"){const t=window;if(t.IconifyPreload!==void 0){const a=t.IconifyPreload,l="Invalid IconifyPreload syntax.";typeof a=="object"&&a!==null&&(a instanceof Array?a:[a]).forEach(n=>{try{(typeof n!="object"||n===null||n instanceof Array||typeof n.icons!="object"||typeof n.prefix!="string"||!Te(n))&&console.error(l)}catch{console.error(l)}})}if(t.IconifyProviders!==void 0){const a=t.IconifyProviders;if(typeof a=="object"&&a!==null)for(let l in a){const n="IconifyProviders["+l+"] is invalid.";try{const o=a[l];if(typeof o!="object"||!o||o.resources===void 0)continue;He(l,o)||console.error(n)}catch{console.error(n)}}}}const kt={...R,body:""},V=e.defineComponent({inheritAttrs:!1,data(){return{_name:"",_loadingIcon:null,iconMounted:!1,counter:0}},mounted(){this.iconMounted=!0},unmounted(){this.abortLoading()},methods:{abortLoading(){this._loadingIcon&&(this._loadingIcon.abort(),this._loadingIcon=null)},getIcon(t,a,l){if(typeof t=="object"&&t!==null&&typeof t.body=="string")return this._name="",this.abortLoading(),{data:t};let n;if(typeof t!="string"||(n=O(t,!1,!0))===null)return this.abortLoading(),null;let o=Ie(n);if(!o)return(!this._loadingIcon||this._loadingIcon.name!==t)&&(this.abortLoading(),this._name="",o!==null&&(this._loadingIcon={name:t,abort:mt([n],()=>{this.counter++})})),null;if(this.abortLoading(),this._name!==t&&(this._name=t,a&&a(t)),l){o=Object.assign({},o);const s=l(o.body,n.name,n.prefix,n.provider);typeof s=="string"&&(o.body=s)}const c=["iconify"];return n.prefix!==""&&c.push("iconify--"+n.prefix),n.provider!==""&&c.push("iconify--"+n.provider),{data:o,classes:c}}},render(){this.counter;const t=this.$attrs,a=this.iconMounted||t.ssr?this.getIcon(t.icon,t.onLoad,t.customise):null;if(!a)return re(kt,t);let l=t;return a.classes&&(l={...t,class:(typeof t.class=="string"?t.class+" ":"")+a.classes.join(" ")}),re({...R,...a.data},l)}}),xt=["disabled"],Pt={key:0,class:"x-btn-icon"},jt={key:1,class:"x-btn-loading"},Mt={class:"x-btn-content"},Bt={key:2,class:"x-btn-icon"},At=e.defineComponent({__name:"index",props:{type:{default:"default"},size:{default:"medium"},icon:{},iconRight:{},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},block:{type:Boolean,default:!1},round:{type:Boolean,default:!1},plain:{type:Boolean,default:!1}},emits:["click"],setup(t,{emit:a}){const l=t,n=a,o=e.ref(),c=e.ref([]);let s=0;const i=e.computed(()=>["x-btn",`x-btn-${l.type}`,`x-btn-${l.size}`,{"x-btn-disabled":l.disabled,"x-btn-loading":l.loading,"x-btn-block":l.block,"x-btn-round":l.round,"x-btn-plain":l.plain}]);function h(d){!l.disabled&&!l.loading&&n("click",d)}function g(d){if(l.disabled||l.loading)return;const p=o.value;if(!p)return;const v=p.getBoundingClientRect(),r={id:s++,style:{left:`${d.clientX-v.left}px`,top:`${d.clientY-v.top}px`}};c.value.push(r),setTimeout(()=>{const k=c.value.findIndex(m=>m.id===r.id);k>-1&&c.value.splice(k,1)},600)}return(d,p)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(i.value),disabled:t.disabled||t.loading,onClick:h,onMousedown:g,ref_key:"buttonRef",ref:o},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,v=>(e.openBlock(),e.createElementBlock("span",{key:v.id,class:"x-btn-ripple",style:e.normalizeStyle(v.style)},null,4))),128)),t.icon&&!t.loading?(e.openBlock(),e.createElementBlock("span",Pt,[e.createVNode(e.unref(V),{icon:t.icon},null,8,["icon"])])):e.createCommentVNode("",!0),t.loading?(e.openBlock(),e.createElementBlock("span",jt,[e.createVNode(e.unref(V),{icon:"eos-icons:loading"})])):e.createCommentVNode("",!0),e.createElementVNode("span",Mt,[e.renderSlot(d.$slots,"default",{},void 0,!0)]),t.iconRight&&!t.loading?(e.openBlock(),e.createElementBlock("span",Bt,[e.createVNode(e.unref(V),{icon:t.iconRight},null,8,["icon"])])):e.createCommentVNode("",!0)],42,xt))}}),B=(t,a)=>{const l=t.__vccOpts||t;for(const[n,o]of a)l[n]=o;return l},Y=B(At,[["__scopeId","data-v-e1b43d39"]]),Vt={class:"x-card-container"},It=["onClick"],Nt={class:"relative p-2"},Tt=["src","alt"],$t={key:0,class:"absolute top-3 left-3"},Lt={class:"label-badge"},Xt={class:"product-info p-5 ml-5"},zt={class:"text-sm lg:text-base text-gray-700 leading-relaxed line-clamp-2 mb-3"},Ft={class:"flex items-center justify-between gap-2"},Dt={class:"text-base lg:text-lg font-bold text-[var(--x-color-primary)]"},Ot={key:0,class:"bi bi-heart text-gray-500"},Rt={key:1,class:"bi bi-heart-fill text-[#FE374F]"},_t=["onClick"],Gt={class:"relative flex-shrink-0 p-2"},Kt={class:"aspect-square bg-gray-100 rounded-lg overflow-hidden"},Wt=["src","alt"],Ht={key:0,class:"absolute top-3 left-3"},qt={class:"label-badge"},Ut={class:"flex-1 flex flex-col justify-between product-info p-5 ml-5"},Yt={class:"text-sm lg:text-base text-gray-700 font-medium line-clamp-2 leading-relaxed mb-3"},Qt={class:"flex items-center justify-between gap-2 mt-auto"},Zt={class:"text-base lg:text-lg font-bold text-[var(--x-color-primary)]"},Jt=e.defineComponent({__name:"index",props:{layout:{default:"grid"},products:{default:()=>[]},useMockData:{type:Boolean,default:!0},columns:{default:4}},emits:["productClick","like"],setup(t,{emit:a}){const l=t,n=a,o=[{id:"1",name:"北欧风简约陶瓷花瓶",image:"https://images.unsplash.com/photo-1578500494198-246f612d3b3d?w=400",price:"¥299",label:"热卖",isWish:!1},{id:"2",name:"手工编织棉麻抱枕套",image:"https://images.unsplash.com/photo-1584100936595-c0654b55a2e2?w=400",price:"¥89",label:"新品",isWish:!0},{id:"3",name:"实木原木置物架收纳架",image:"https://images.unsplash.com/photo-1595428774223-ef52624120d2?w=400",price:"¥459",label:"",isWish:!1},{id:"4",name:"ins风格桌面装饰摆件",image:"https://images.unsplash.com/photo-1513506003901-1e6a229e2d15?w=400",price:"¥129",label:"特价",isWish:!1},{id:"5",name:"现代简约台灯护眼学习灯",image:"https://images.unsplash.com/photo-1507473885765-e6ed057f782c?w=400",price:"¥399",label:"",isWish:!0},{id:"6",name:"北欧风格装饰画挂画",image:"https://images.unsplash.com/photo-1561214115-f2f134cc4912?w=400",price:"¥199",label:"热卖",isWish:!1},{id:"7",name:"多功能收纳盒桌面整理",image:"https://images.unsplash.com/photo-1586023492125-27b2c045efd7?w=400",price:"¥68",label:"",isWish:!1},{id:"8",name:"创意陶瓷马克杯咖啡杯",image:"https://images.unsplash.com/photo-1514228742587-6b1558fcca3d?w=400",price:"¥59",label:"新品",isWish:!1},{id:"9",name:"手工玻璃花瓶透明花器",image:"https://images.unsplash.com/photo-1523293182086-7651a899d37f?w=400",price:"¥179",label:"",isWish:!0},{id:"10",name:"日式和风招财猫摆件",image:"https://images.unsplash.com/photo-1615529182904-14819c35db37?w=400",price:"¥149",label:"热卖",isWish:!1},{id:"11",name:"北欧风木质挂钟客厅",image:"https://images.unsplash.com/photo-1563861826100-9cb868fdbe1c?w=400",price:"¥259",label:"",isWish:!1},{id:"12",name:"现代简约落地花架",image:"https://images.unsplash.com/photo-1545127398-14699f92334b?w=400",price:"¥329",label:"特价",isWish:!1}],c=e.ref([]),s=e.computed(()=>l.products&&l.products.length>0?l.products:c.value),i=e.computed(()=>{const p=Math.min(Math.max(l.columns||4,1),4),v={1:"grid-cols-1",2:"grid-cols-1 md:grid-cols-2",3:"grid-cols-1 md:grid-cols-2 lg:grid-cols-3",4:"grid-cols-2 md:grid-cols-3 lg:grid-cols-4"};return v[p]||v[4]}),h=e.computed(()=>{const p=Math.min(Math.max(l.columns||4,1),4),v={1:"columns-1",2:"columns-1 md:columns-2",3:"columns-2 md:columns-2 lg:columns-3",4:"columns-2 sm:columns-2 md:columns-3 lg:columns-4"};return v[p]||v[4]});e.onMounted(()=>{l.useMockData&&(!l.products||l.products.length===0)&&(c.value=o)});const g=p=>{n("productClick",p)},d=p=>{p.isWish=!p.isWish,n("like",p)};return(p,v)=>(e.openBlock(),e.createElementBlock("div",Vt,[t.layout==="masonry"?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["masonry-layout",h.value,"gap-4 sm:gap-6"])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,r=>(e.openBlock(),e.createElementBlock("div",{key:r.id+"-masonry",class:"mb-4 sm:mb-6 break-inside-avoid group cursor-pointer product-card",onClick:k=>g(r.id)},[e.createElementVNode("div",Nt,[e.createElementVNode("img",{src:r.image,alt:r.name,loading:"lazy",class:"w-full h-auto rounded-lg bg-gray-100 object-cover transition-transform duration-300 group-hover:scale-[1.01]"},null,8,Tt),r.label?(e.openBlock(),e.createElementBlock("div",$t,[e.createElementVNode("span",Lt,e.toDisplayString(r.label),1)])):e.createCommentVNode("",!0)]),e.createElementVNode("div",Xt,[e.createElementVNode("h3",zt,e.toDisplayString(r.name),1),e.createElementVNode("div",Ft,[e.createElementVNode("span",Dt,e.toDisplayString(r.price),1),e.createVNode(Y,{onClick:e.withModifiers(k=>d(r),["stop"]),type:"text",size:"small",class:"like-button !min-w-0 !p-1"},{default:e.withCtx(()=>[r.isWish?(e.openBlock(),e.createElementBlock("i",Rt)):(e.openBlock(),e.createElementBlock("i",Ot))]),_:2},1032,["onClick"])])])],8,It))),128))],2)):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["grid",i.value,"gap-4 lg:gap-6"])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,r=>(e.openBlock(),e.createElementBlock("div",{key:r.id+"-grid",class:"h-full"},[e.createElementVNode("div",{class:"group cursor-pointer product-card h-full flex flex-col",onClick:k=>g(r.id)},[e.createElementVNode("div",Gt,[e.createElementVNode("div",Kt,[e.createElementVNode("img",{src:r.image,alt:r.name,class:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-300",loading:"lazy"},null,8,Wt)]),r.label?(e.openBlock(),e.createElementBlock("div",Ht,[e.createElementVNode("span",qt,e.toDisplayString(r.label),1)])):e.createCommentVNode("",!0)]),e.createElementVNode("div",Ut,[e.createElementVNode("h3",Yt,e.toDisplayString(r.name),1),e.createElementVNode("div",Qt,[e.createElementVNode("span",Zt,e.toDisplayString(r.price),1),e.createVNode(Y,{onClick:e.withModifiers(k=>d(r),["stop"]),type:"text",size:"small",class:"like-button !min-w-0 !p-1"},{default:e.withCtx(()=>[r.isWish?(e.openBlock(),e.createBlock(e.unref(V),{key:1,icon:"bi:heart-fill",class:"bi bi-heart-fill text-[#FE374F]"})):(e.openBlock(),e.createBlock(e.unref(V),{key:0,icon:"bi:heart",class:"bi bi-heart text-gray-500"}))]),_:2},1032,["onClick"])])])],8,_t)]))),128))],2))]))}}),en=B(Jt,[["__scopeId","data-v-aec5fd31"]]),tn=[{name:"Afghanistan",code:"AF",flagEmoji:"🇦🇫",flagSvg:"https://flagcdn.com/af.svg",flagPng:"https://flagcdn.com/w40/af.png",phoneCode:"+93",phonelengthMAX:10},{name:"Åland Islands",code:"AX",flagEmoji:"🇦🇽",flagSvg:"https://flagcdn.com/ax.svg",flagPng:"https://flagcdn.com/w40/ax.png",phoneCode:"+358",phonelengthMAX:10},{name:"Albania",code:"AL",flagEmoji:"🇦🇱",flagSvg:"https://flagcdn.com/al.svg",flagPng:"https://flagcdn.com/w40/al.png",phoneCode:"+355",phonelengthMAX:10},{name:"Algeria",code:"DZ",flagEmoji:"🇩🇿",flagSvg:"https://flagcdn.com/dz.svg",flagPng:"https://flagcdn.com/w40/dz.png",phoneCode:"+213",phonelengthMAX:10},{name:"American Samoa",code:"AS",flagEmoji:"🇦🇸",flagSvg:"https://flagcdn.com/as.svg",flagPng:"https://flagcdn.com/w40/as.png",phoneCode:"+1684",phonelengthMAX:10},{name:"Andorra",code:"AD",flagEmoji:"🇦🇩",flagSvg:"https://flagcdn.com/ad.svg",flagPng:"https://flagcdn.com/w40/ad.png",phoneCode:"+376",phonelengthMAX:10},{name:"Angola",code:"AO",flagEmoji:"🇦🇴",flagSvg:"https://flagcdn.com/ao.svg",flagPng:"https://flagcdn.com/w40/ao.png",phoneCode:"+244",phonelengthMAX:10},{name:"Anguilla",code:"AI",flagEmoji:"🇦🇮",flagSvg:"https://flagcdn.com/ai.svg",flagPng:"https://flagcdn.com/w40/ai.png",phoneCode:"+1264",phonelengthMAX:10},{name:"Antarctica",code:"AQ",flagEmoji:"🇦🇶",flagSvg:"https://flagcdn.com/aq.svg",flagPng:"https://flagcdn.com/w40/aq.png",phoneCode:"+672",phonelengthMAX:10},{name:"Antigua and Barbuda",code:"AG",flagEmoji:"🇦🇬",flagSvg:"https://flagcdn.com/ag.svg",flagPng:"https://flagcdn.com/w40/ag.png",phoneCode:"+1268",phonelengthMAX:10},{name:"Argentina",code:"AR",flagEmoji:"🇦🇷",flagSvg:"https://flagcdn.com/ar.svg",flagPng:"https://flagcdn.com/w40/ar.png",phoneCode:"+54",phonelengthMAX:10},{name:"Armenia",code:"AM",flagEmoji:"🇦🇲",flagSvg:"https://flagcdn.com/am.svg",flagPng:"https://flagcdn.com/w40/am.png",phoneCode:"+374",phonelengthMAX:10},{name:"Aruba",code:"AW",flagEmoji:"🇦🇼",flagSvg:"https://flagcdn.com/aw.svg",flagPng:"https://flagcdn.com/w40/aw.png",phoneCode:"+297",phonelengthMAX:10},{name:"Australia",code:"AU",flagEmoji:"🇦🇺",flagSvg:"https://flagcdn.com/au.svg",flagPng:"https://flagcdn.com/w40/au.png",phoneCode:"+61",phonelengthMAX:10},{name:"Austria",code:"AT",flagEmoji:"🇦🇹",flagSvg:"https://flagcdn.com/at.svg",flagPng:"https://flagcdn.com/w40/at.png",phoneCode:"+43",phonelengthMAX:10},{name:"Azerbaijan",code:"AZ",flagEmoji:"🇦🇿",flagSvg:"https://flagcdn.com/az.svg",flagPng:"https://flagcdn.com/w40/az.png",phoneCode:"+994",phonelengthMAX:10},{name:"Bahamas",code:"BS",flagEmoji:"🇧🇸",flagSvg:"https://flagcdn.com/bs.svg",flagPng:"https://flagcdn.com/w40/bs.png",phoneCode:"+1242",phonelengthMAX:10},{name:"Bahrain",code:"BH",flagEmoji:"🇧🇭",flagSvg:"https://flagcdn.com/bh.svg",flagPng:"https://flagcdn.com/w40/bh.png",phoneCode:"+973",phonelengthMAX:10},{name:"Bangladesh",code:"BD",flagEmoji:"🇧🇩",flagSvg:"https://flagcdn.com/bd.svg",flagPng:"https://flagcdn.com/w40/bd.png",phoneCode:"+880",phonelengthMAX:10},{name:"Barbados",code:"BB",flagEmoji:"🇧🇧",flagSvg:"https://flagcdn.com/bb.svg",flagPng:"https://flagcdn.com/w40/bb.png",phoneCode:"+1246",phonelengthMAX:10},{name:"Belarus",code:"BY",flagEmoji:"🇧🇾",flagSvg:"https://flagcdn.com/by.svg",flagPng:"https://flagcdn.com/w40/by.png",phoneCode:"+375",phonelengthMAX:10},{name:"Belgium",code:"BE",flagEmoji:"🇧🇪",flagSvg:"https://flagcdn.com/be.svg",flagPng:"https://flagcdn.com/w40/be.png",phoneCode:"+32",phonelengthMAX:10},{name:"Belize",code:"BZ",flagEmoji:"🇧🇿",flagSvg:"https://flagcdn.com/bz.svg",flagPng:"https://flagcdn.com/w40/bz.png",phoneCode:"+501",phonelengthMAX:10},{name:"Benin",code:"BJ",flagEmoji:"🇧🇯",flagSvg:"https://flagcdn.com/bj.svg",flagPng:"https://flagcdn.com/w40/bj.png",phoneCode:"+229",phonelengthMAX:10},{name:"Bermuda",code:"BM",flagEmoji:"🇧🇲",flagSvg:"https://flagcdn.com/bm.svg",flagPng:"https://flagcdn.com/w40/bm.png",phoneCode:"+1441",phonelengthMAX:10},{name:"Bhutan",code:"BT",flagEmoji:"🇧🇹",flagSvg:"https://flagcdn.com/bt.svg",flagPng:"https://flagcdn.com/w40/bt.png",phoneCode:"+975",phonelengthMAX:10},{name:"Bolivia (Plurinational State of)",code:"BO",flagEmoji:"🇧🇴",flagSvg:"https://flagcdn.com/bo.svg",flagPng:"https://flagcdn.com/w40/bo.png",phoneCode:"+591",phonelengthMAX:10},{name:"Bonaire, Sint Eustatius and Saba",code:"BQ",flagEmoji:"🇧🇶",flagSvg:"https://flagcdn.com/bq.svg",flagPng:"https://flagcdn.com/w40/bq.png",phoneCode:"+5997",phonelengthMAX:10},{name:"Bosnia and Herzegovina",code:"BA",flagEmoji:"🇧🇦",flagSvg:"https://flagcdn.com/ba.svg",flagPng:"https://flagcdn.com/w40/ba.png",phoneCode:"+387",phonelengthMAX:10},{name:"Botswana",code:"BW",flagEmoji:"🇧🇼",flagSvg:"https://flagcdn.com/bw.svg",flagPng:"https://flagcdn.com/w40/bw.png",phoneCode:"+267",phonelengthMAX:10},{name:"Bouvet Island",code:"BV",flagEmoji:"🇧🇻",flagSvg:"https://flagcdn.com/bv.svg",flagPng:"https://flagcdn.com/w40/bv.png",phoneCode:"+55",phonelengthMAX:10},{name:"Brazil",code:"BR",flagEmoji:"🇧🇷",flagSvg:"https://flagcdn.com/br.svg",flagPng:"https://flagcdn.com/w40/br.png",phoneCode:"+55",phonelengthMAX:10},{name:"British Indian Ocean Territory",code:"IO",flagEmoji:"🇮🇴",flagSvg:"https://flagcdn.com/io.svg",flagPng:"https://flagcdn.com/w40/io.png",phoneCode:"+246",phonelengthMAX:10},{name:"Brunei Darussalam",code:"BN",flagEmoji:"🇧🇳",flagSvg:"https://flagcdn.com/bn.svg",flagPng:"https://flagcdn.com/w40/bn.png",phoneCode:"+673",phonelengthMAX:10},{name:"Bulgaria",code:"BG",flagEmoji:"🇧🇬",flagSvg:"https://flagcdn.com/bg.svg",flagPng:"https://flagcdn.com/w40/bg.png",phoneCode:"+359",phonelengthMAX:10},{name:"Burkina Faso",code:"BF",flagEmoji:"🇧🇫",flagSvg:"https://flagcdn.com/bf.svg",flagPng:"https://flagcdn.com/w40/bf.png",phoneCode:"+226",phonelengthMAX:10},{name:"Burundi",code:"BI",flagEmoji:"🇧🇮",flagSvg:"https://flagcdn.com/bi.svg",flagPng:"https://flagcdn.com/w40/bi.png",phoneCode:"+257",phonelengthMAX:10},{name:"Cabo Verde",code:"CV",flagEmoji:"🇨🇻",flagSvg:"https://flagcdn.com/cv.svg",flagPng:"https://flagcdn.com/w40/cv.png",phoneCode:"+238",phonelengthMAX:10},{name:"Cambodia",code:"KH",flagEmoji:"🇰🇭",flagSvg:"https://flagcdn.com/kh.svg",flagPng:"https://flagcdn.com/w40/kh.png",phoneCode:"+855",phonelengthMAX:10},{name:"Cameroon",code:"CM",flagEmoji:"🇨🇲",flagSvg:"https://flagcdn.com/cm.svg",flagPng:"https://flagcdn.com/w40/cm.png",phoneCode:"+237",phonelengthMAX:10},{name:"Canada",code:"CA",flagEmoji:"🇨🇦",flagSvg:"https://flagcdn.com/ca.svg",flagPng:"https://flagcdn.com/w40/ca.png",phoneCode:"+1",phonelengthMAX:10},{name:"Cayman Islands",code:"KY",flagEmoji:"🇰🇾",flagSvg:"https://flagcdn.com/ky.svg",flagPng:"https://flagcdn.com/w40/ky.png",phoneCode:"+1345",phonelengthMAX:10},{name:"Central African Republic",code:"CF",flagEmoji:"🇨🇫",flagSvg:"https://flagcdn.com/cf.svg",flagPng:"https://flagcdn.com/w40/cf.png",phoneCode:"+236",phonelengthMAX:10},{name:"Chad",code:"TD",flagEmoji:"🇹🇩",flagSvg:"https://flagcdn.com/td.svg",flagPng:"https://flagcdn.com/w40/td.png",phoneCode:"+235",phonelengthMAX:10},{name:"Chile",code:"CL",flagEmoji:"🇨🇱",flagSvg:"https://flagcdn.com/cl.svg",flagPng:"https://flagcdn.com/w40/cl.png",phoneCode:"+56",phonelengthMAX:10},{name:"China",code:"CN",flagEmoji:"🇨🇳",flagSvg:"https://flagcdn.com/cn.svg",flagPng:"https://flagcdn.com/w40/cn.png",phoneCode:"+86",phonelengthMAX:11},{name:"Christmas Island",code:"CX",flagEmoji:"🇨🇽",flagSvg:"https://flagcdn.com/cx.svg",flagPng:"https://flagcdn.com/w40/cx.png",phoneCode:"+61",phonelengthMAX:10},{name:"Cocos (Keeling) Islands",code:"CC",flagEmoji:"🇨🇨",flagSvg:"https://flagcdn.com/cc.svg",flagPng:"https://flagcdn.com/w40/cc.png",phoneCode:"+61",phonelengthMAX:10},{name:"Colombia",code:"CO",flagEmoji:"🇨🇴",flagSvg:"https://flagcdn.com/co.svg",flagPng:"https://flagcdn.com/w40/co.png",phoneCode:"+57",phonelengthMAX:10},{name:"Comoros",code:"KM",flagEmoji:"🇰🇲",flagSvg:"https://flagcdn.com/km.svg",flagPng:"https://flagcdn.com/w40/km.png",phoneCode:"+269",phonelengthMAX:10},{name:"Congo",code:"CG",flagEmoji:"🇨🇬",flagSvg:"https://flagcdn.com/cg.svg",flagPng:"https://flagcdn.com/w40/cg.png",phoneCode:"+242",phonelengthMAX:10},{name:"Congo, Democratic Republic of the",code:"CD",flagEmoji:"🇨🇩",flagSvg:"https://flagcdn.com/cd.svg",flagPng:"https://flagcdn.com/w40/cd.png",phoneCode:"+243",phonelengthMAX:10},{name:"Cook Islands",code:"CK",flagEmoji:"🇨🇰",flagSvg:"https://flagcdn.com/ck.svg",flagPng:"https://flagcdn.com/w40/ck.png",phoneCode:"+682",phonelengthMAX:10},{name:"Costa Rica",code:"CR",flagEmoji:"🇨🇷",flagSvg:"https://flagcdn.com/cr.svg",flagPng:"https://flagcdn.com/w40/cr.png",phoneCode:"+506",phonelengthMAX:10},{name:"Croatia",code:"HR",flagEmoji:"🇭🇷",flagSvg:"https://flagcdn.com/hr.svg",flagPng:"https://flagcdn.com/w40/hr.png",phoneCode:"+385",phonelengthMAX:10},{name:"Cuba",code:"CU",flagEmoji:"🇨🇺",flagSvg:"https://flagcdn.com/cu.svg",flagPng:"https://flagcdn.com/w40/cu.png",phoneCode:"+53",phonelengthMAX:10},{name:"Curaçao",code:"CW",flagEmoji:"🇨🇼",flagSvg:"https://flagcdn.com/cw.svg",flagPng:"https://flagcdn.com/w40/cw.png",phoneCode:"+5999",phonelengthMAX:10},{name:"Cyprus",code:"CY",flagEmoji:"🇨🇾",flagSvg:"https://flagcdn.com/cy.svg",flagPng:"https://flagcdn.com/w40/cy.png",phoneCode:"+357",phonelengthMAX:10},{name:"Czechia",code:"CZ",flagEmoji:"🇨🇿",flagSvg:"https://flagcdn.com/cz.svg",flagPng:"https://flagcdn.com/w40/cz.png",phoneCode:"+420",phonelengthMAX:10},{name:"Denmark",code:"DK",flagEmoji:"🇩🇰",flagSvg:"https://flagcdn.com/dk.svg",flagPng:"https://flagcdn.com/w40/dk.png",phoneCode:"+45",phonelengthMAX:10},{name:"Djibouti",code:"DJ",flagEmoji:"🇩🇯",flagSvg:"https://flagcdn.com/dj.svg",flagPng:"https://flagcdn.com/w40/dj.png",phoneCode:"+253",phonelengthMAX:10},{name:"Dominica",code:"DM",flagEmoji:"🇩🇲",flagSvg:"https://flagcdn.com/dm.svg",flagPng:"https://flagcdn.com/w40/dm.png",phoneCode:"+1767",phonelengthMAX:10},{name:"Dominican Republic",code:"DO",flagEmoji:"🇩🇴",flagSvg:"https://flagcdn.com/do.svg",flagPng:"https://flagcdn.com/w40/do.png",phoneCode:"+1809",phonelengthMAX:10},{name:"Ecuador",code:"EC",flagEmoji:"🇪🇨",flagSvg:"https://flagcdn.com/ec.svg",flagPng:"https://flagcdn.com/w40/ec.png",phoneCode:"+593",phonelengthMAX:10},{name:"Egypt",code:"EG",flagEmoji:"🇪🇬",flagSvg:"https://flagcdn.com/eg.svg",flagPng:"https://flagcdn.com/w40/eg.png",phoneCode:"+20",phonelengthMAX:10},{name:"El Salvador",code:"SV",flagEmoji:"🇸🇻",flagSvg:"https://flagcdn.com/sv.svg",flagPng:"https://flagcdn.com/w40/sv.png",phoneCode:"+503",phonelengthMAX:10},{name:"Equatorial Guinea",code:"GQ",flagEmoji:"🇬🇶",flagSvg:"https://flagcdn.com/gq.svg",flagPng:"https://flagcdn.com/w40/gq.png",phoneCode:"+240",phonelengthMAX:10},{name:"Eritrea",code:"ER",flagEmoji:"🇪🇷",flagSvg:"https://flagcdn.com/er.svg",flagPng:"https://flagcdn.com/w40/er.png",phoneCode:"+291",phonelengthMAX:10},{name:"Estonia",code:"EE",flagEmoji:"🇪🇪",flagSvg:"https://flagcdn.com/ee.svg",flagPng:"https://flagcdn.com/w40/ee.png",phoneCode:"+372",phonelengthMAX:10},{name:"Eswatini",code:"SZ",flagEmoji:"🇸🇿",flagSvg:"https://flagcdn.com/sz.svg",flagPng:"https://flagcdn.com/w40/sz.png",phoneCode:"+268",phonelengthMAX:10},{name:"Ethiopia",code:"ET",flagEmoji:"🇪🇹",flagSvg:"https://flagcdn.com/et.svg",flagPng:"https://flagcdn.com/w40/et.png",phoneCode:"+251",phonelengthMAX:10},{name:"Falkland Islands (Malvinas)",code:"FK",flagEmoji:"🇫🇰",flagSvg:"https://flagcdn.com/fk.svg",flagPng:"https://flagcdn.com/w40/fk.png",phoneCode:"+500",phonelengthMAX:10},{name:"Faroe Islands",code:"FO",flagEmoji:"🇫🇴",flagSvg:"https://flagcdn.com/fo.svg",flagPng:"https://flagcdn.com/w40/fo.png",phoneCode:"+298",phonelengthMAX:10},{name:"Fiji",code:"FJ",flagEmoji:"🇫🇯",flagSvg:"https://flagcdn.com/fj.svg",flagPng:"https://flagcdn.com/w40/fj.png",phoneCode:"+679",phonelengthMAX:10},{name:"Finland",code:"FI",flagEmoji:"🇫🇮",flagSvg:"https://flagcdn.com/fi.svg",flagPng:"https://flagcdn.com/w40/fi.png",phoneCode:"+358",phonelengthMAX:10},{name:"France",code:"FR",flagEmoji:"🇫🇷",flagSvg:"https://flagcdn.com/fr.svg",flagPng:"https://flagcdn.com/w40/fr.png",phoneCode:"+33",phonelengthMAX:10},{name:"French Guiana",code:"GF",flagEmoji:"🇬🇫",flagSvg:"https://flagcdn.com/gf.svg",flagPng:"https://flagcdn.com/w40/gf.png",phoneCode:"+594",phonelengthMAX:10},{name:"French Polynesia",code:"PF",flagEmoji:"🇵🇫",flagSvg:"https://flagcdn.com/pf.svg",flagPng:"https://flagcdn.com/w40/pf.png",phoneCode:"+689",phonelengthMAX:10},{name:"French Southern Territories",code:"TF",flagEmoji:"🇹🇫",flagSvg:"https://flagcdn.com/tf.svg",flagPng:"https://flagcdn.com/w40/tf.png",phoneCode:"+262",phonelengthMAX:10},{name:"Gabon",code:"GA",flagEmoji:"🇬🇦",flagSvg:"https://flagcdn.com/ga.svg",flagPng:"https://flagcdn.com/w40/ga.png",phoneCode:"+241",phonelengthMAX:10},{name:"Gambia",code:"GM",flagEmoji:"🇬🇲",flagSvg:"https://flagcdn.com/gm.svg",flagPng:"https://flagcdn.com/w40/gm.png",phoneCode:"+220",phonelengthMAX:10},{name:"Georgia",code:"GE",flagEmoji:"🇬🇪",flagSvg:"https://flagcdn.com/ge.svg",flagPng:"https://flagcdn.com/w40/ge.png",phoneCode:"+995",phonelengthMAX:10},{name:"Germany",code:"DE",flagEmoji:"🇩🇪",flagSvg:"https://flagcdn.com/de.svg",flagPng:"https://flagcdn.com/w40/de.png",phoneCode:"+49",phonelengthMAX:10},{name:"Ghana",code:"GH",flagEmoji:"🇬🇭",flagSvg:"https://flagcdn.com/gh.svg",flagPng:"https://flagcdn.com/w40/gh.png",phoneCode:"+233",phonelengthMAX:10},{name:"Gibraltar",code:"GI",flagEmoji:"🇬🇮",flagSvg:"https://flagcdn.com/gi.svg",flagPng:"https://flagcdn.com/w40/gi.png",phoneCode:"+350",phonelengthMAX:10},{name:"Greece",code:"GR",flagEmoji:"🇬🇷",flagSvg:"https://flagcdn.com/gr.svg",flagPng:"https://flagcdn.com/w40/gr.png",phoneCode:"+30",phonelengthMAX:10},{name:"Greenland",code:"GL",flagEmoji:"🇬🇱",flagSvg:"https://flagcdn.com/gl.svg",flagPng:"https://flagcdn.com/w40/gl.png",phoneCode:"+299",phonelengthMAX:10},{name:"Grenada",code:"GD",flagEmoji:"🇬🇩",flagSvg:"https://flagcdn.com/gd.svg",flagPng:"https://flagcdn.com/w40/gd.png",phoneCode:"+1473",phonelengthMAX:10},{name:"Guadeloupe",code:"GP",flagEmoji:"🇬🇵",flagSvg:"https://flagcdn.com/gp.svg",flagPng:"https://flagcdn.com/w40/gp.png",phoneCode:"+590",phonelengthMAX:10},{name:"Guam",code:"GU",flagEmoji:"🇬🇺",flagSvg:"https://flagcdn.com/gu.svg",flagPng:"https://flagcdn.com/w40/gu.png",phoneCode:"+1671",phonelengthMAX:10},{name:"Guatemala",code:"GT",flagEmoji:"🇬🇹",flagSvg:"https://flagcdn.com/gt.svg",flagPng:"https://flagcdn.com/w40/gt.png",phoneCode:"+502",phonelengthMAX:10},{name:"Guernsey",code:"GG",flagEmoji:"🇬🇬",flagSvg:"https://flagcdn.com/gg.svg",flagPng:"https://flagcdn.com/w40/gg.png",phoneCode:"+44",phonelengthMAX:10},{name:"Guinea",code:"GN",flagEmoji:"🇬🇳",flagSvg:"https://flagcdn.com/gn.svg",flagPng:"https://flagcdn.com/w40/gn.png",phoneCode:"+224",phonelengthMAX:10},{name:"Guinea-Bissau",code:"GW",flagEmoji:"🇬🇼",flagSvg:"https://flagcdn.com/gw.svg",flagPng:"https://flagcdn.com/w40/gw.png",phoneCode:"+245",phonelengthMAX:10},{name:"Guyana",code:"GY",flagEmoji:"🇬🇾",flagSvg:"https://flagcdn.com/gy.svg",flagPng:"https://flagcdn.com/w40/gy.png",phoneCode:"+592",phonelengthMAX:10},{name:"Haiti",code:"HT",flagEmoji:"🇭🇹",flagSvg:"https://flagcdn.com/ht.svg",flagPng:"https://flagcdn.com/w40/ht.png",phoneCode:"+509",phonelengthMAX:10},{name:"Heard Island and McDonald Islands",code:"HM",flagEmoji:"🇭🇲",flagSvg:"https://flagcdn.com/hm.svg",flagPng:"https://flagcdn.com/w40/hm.png",phoneCode:"+672"},{name:"Holy See",code:"VA",flagEmoji:"🇻🇦",flagSvg:"https://flagcdn.com/va.svg",flagPng:"https://flagcdn.com/w40/va.png",phoneCode:"+39"},{name:"Honduras",code:"HN",flagEmoji:"🇭🇳",flagSvg:"https://flagcdn.com/hn.svg",flagPng:"https://flagcdn.com/w40/hn.png",phoneCode:"+504"},{name:"Hong Kong",code:"HK",flagEmoji:"🇭🇰",flagSvg:"https://flagcdn.com/hk.svg",flagPng:"https://flagcdn.com/w40/hk.png",phoneCode:"+852"},{name:"Hungary",code:"HU",flagEmoji:"🇭🇺",flagSvg:"https://flagcdn.com/hu.svg",flagPng:"https://flagcdn.com/w40/hu.png",phoneCode:"+36"},{name:"Iceland",code:"IS",flagEmoji:"🇮🇸",flagSvg:"https://flagcdn.com/is.svg",flagPng:"https://flagcdn.com/w40/is.png",phoneCode:"+354"},{name:"India",code:"IN",flagEmoji:"🇮🇳",flagSvg:"https://flagcdn.com/in.svg",flagPng:"https://flagcdn.com/w40/in.png",phoneCode:"+91"},{name:"Indonesia",code:"ID",flagEmoji:"🇮🇩",flagSvg:"https://flagcdn.com/id.svg",flagPng:"https://flagcdn.com/w40/id.png",phoneCode:"+62"},{name:"Iran (Islamic Republic of)",code:"IR",flagEmoji:"🇮🇷",flagSvg:"https://flagcdn.com/ir.svg",flagPng:"https://flagcdn.com/w40/ir.png",phoneCode:"+98"},{name:"Iraq",code:"IQ",flagEmoji:"🇮🇶",flagSvg:"https://flagcdn.com/iq.svg",flagPng:"https://flagcdn.com/w40/iq.png",phoneCode:"+964"},{name:"Ireland",code:"IE",flagEmoji:"🇮🇪",flagSvg:"https://flagcdn.com/ie.svg",flagPng:"https://flagcdn.com/w40/ie.png",phoneCode:"+353"},{name:"Isle of Man",code:"IM",flagEmoji:"🇮🇲",flagSvg:"https://flagcdn.com/im.svg",flagPng:"https://flagcdn.com/w40/im.png",phoneCode:"+44"},{name:"Israel",code:"IL",flagEmoji:"🇮🇱",flagSvg:"https://flagcdn.com/il.svg",flagPng:"https://flagcdn.com/w40/il.png",phoneCode:"+972"},{name:"Italy",code:"IT",flagEmoji:"🇮🇹",flagSvg:"https://flagcdn.com/it.svg",flagPng:"https://flagcdn.com/w40/it.png",phoneCode:"+39"},{name:"Jamaica",code:"JM",flagEmoji:"🇯🇲",flagSvg:"https://flagcdn.com/jm.svg",flagPng:"https://flagcdn.com/w40/jm.png",phoneCode:"+1876"},{name:"Japan",code:"JP",flagEmoji:"🇯🇵",flagSvg:"https://flagcdn.com/jp.svg",flagPng:"https://flagcdn.com/w40/jp.png",phoneCode:"+81"},{name:"Jersey",code:"JE",flagEmoji:"🇯🇪",flagSvg:"https://flagcdn.com/je.svg",flagPng:"https://flagcdn.com/w40/je.png",phoneCode:"+44"},{name:"Jordan",code:"JO",flagEmoji:"🇯🇴",flagSvg:"https://flagcdn.com/jo.svg",flagPng:"https://flagcdn.com/w40/jo.png",phoneCode:"+962"},{name:"Kazakhstan",code:"KZ",flagEmoji:"🇰🇿",flagSvg:"https://flagcdn.com/kz.svg",flagPng:"https://flagcdn.com/w40/kz.png",phoneCode:"+7"},{name:"Kenya",code:"KE",flagEmoji:"🇰🇪",flagSvg:"https://flagcdn.com/ke.svg",flagPng:"https://flagcdn.com/w40/ke.png",phoneCode:"+254"},{name:"Kiribati",code:"KI",flagEmoji:"🇰🇮",flagSvg:"https://flagcdn.com/ki.svg",flagPng:"https://flagcdn.com/w40/ki.png",phoneCode:"+686"},{name:"Korea (Democratic People's Republic of)",code:"KP",flagEmoji:"🇰🇵",flagSvg:"https://flagcdn.com/kp.svg",flagPng:"https://flagcdn.com/w40/kp.png",phoneCode:"+850"},{name:"Korea, Republic of",code:"KR",flagEmoji:"🇰🇷",flagSvg:"https://flagcdn.com/kr.svg",flagPng:"https://flagcdn.com/w40/kr.png",phoneCode:"+82"},{name:"Kuwait",code:"KW",flagEmoji:"🇰🇼",flagSvg:"https://flagcdn.com/kw.svg",flagPng:"https://flagcdn.com/w40/kw.png",phoneCode:"+965"},{name:"Kyrgyzstan",code:"KG",flagEmoji:"🇰🇬",flagSvg:"https://flagcdn.com/kg.svg",flagPng:"https://flagcdn.com/w40/kg.png",phoneCode:"+996"},{name:"Lao People's Democratic Republic",code:"LA",flagEmoji:"🇱🇦",flagSvg:"https://flagcdn.com/la.svg",flagPng:"https://flagcdn.com/w40/la.png",phoneCode:"+856"},{name:"Latvia",code:"LV",flagEmoji:"🇱🇻",flagSvg:"https://flagcdn.com/lv.svg",flagPng:"https://flagcdn.com/w40/lv.png",phoneCode:"+371"},{name:"Lebanon",code:"LB",flagEmoji:"🇱🇧",flagSvg:"https://flagcdn.com/lb.svg",flagPng:"https://flagcdn.com/w40/lb.png",phoneCode:"+961"},{name:"Lesotho",code:"LS",flagEmoji:"🇱🇸",flagSvg:"https://flagcdn.com/ls.svg",flagPng:"https://flagcdn.com/w40/ls.png",phoneCode:"+266"},{name:"Liberia",code:"LR",flagEmoji:"🇱🇷",flagSvg:"https://flagcdn.com/lr.svg",flagPng:"https://flagcdn.com/w40/lr.png",phoneCode:"+231"},{name:"Libya",code:"LY",flagEmoji:"🇱🇾",flagSvg:"https://flagcdn.com/ly.svg",flagPng:"https://flagcdn.com/w40/ly.png",phoneCode:"+218"},{name:"Liechtenstein",code:"LI",flagEmoji:"🇱🇮",flagSvg:"https://flagcdn.com/li.svg",flagPng:"https://flagcdn.com/w40/li.png",phoneCode:"+423"},{name:"Lithuania",code:"LT",flagEmoji:"🇱🇹",flagSvg:"https://flagcdn.com/lt.svg",flagPng:"https://flagcdn.com/w40/lt.png",phoneCode:"+370"},{name:"Luxembourg",code:"LU",flagEmoji:"🇱🇺",flagSvg:"https://flagcdn.com/lu.svg",flagPng:"https://flagcdn.com/w40/lu.png",phoneCode:"+352"},{name:"Macao",code:"MO",flagEmoji:"🇲🇴",flagSvg:"https://flagcdn.com/mo.svg",flagPng:"https://flagcdn.com/w40/mo.png",phoneCode:"+853"},{name:"Madagascar",code:"MG",flagEmoji:"🇲🇬",flagSvg:"https://flagcdn.com/mg.svg",flagPng:"https://flagcdn.com/w40/mg.png",phoneCode:"+261"},{name:"Malawi",code:"MW",flagEmoji:"🇲🇼",flagSvg:"https://flagcdn.com/mw.svg",flagPng:"https://flagcdn.com/w40/mw.png",phoneCode:"+265"},{name:"Malaysia",code:"MY",flagEmoji:"🇲🇾",flagSvg:"https://flagcdn.com/my.svg",flagPng:"https://flagcdn.com/w40/my.png",phoneCode:"+60"},{name:"Maldives",code:"MV",flagEmoji:"🇲🇻",flagSvg:"https://flagcdn.com/mv.svg",flagPng:"https://flagcdn.com/w40/mv.png",phoneCode:"+960"},{name:"Mali",code:"ML",flagEmoji:"🇲🇱",flagSvg:"https://flagcdn.com/ml.svg",flagPng:"https://flagcdn.com/w40/ml.png",phoneCode:"+223"},{name:"Malta",code:"MT",flagEmoji:"🇲🇹",flagSvg:"https://flagcdn.com/mt.svg",flagPng:"https://flagcdn.com/w40/mt.png",phoneCode:"+356"},{name:"Marshall Islands",code:"MH",flagEmoji:"🇲🇭",flagSvg:"https://flagcdn.com/mh.svg",flagPng:"https://flagcdn.com/w40/mh.png",phoneCode:"+692"},{name:"Martinique",code:"MQ",flagEmoji:"🇲🇶",flagSvg:"https://flagcdn.com/mq.svg",flagPng:"https://flagcdn.com/w40/mq.png",phoneCode:"+596"},{name:"Mauritania",code:"MR",flagEmoji:"🇲🇷",flagSvg:"https://flagcdn.com/mr.svg",flagPng:"https://flagcdn.com/w40/mr.png",phoneCode:"+222"},{name:"Mauritius",code:"MU",flagEmoji:"🇲🇺",flagSvg:"https://flagcdn.com/mu.svg",flagPng:"https://flagcdn.com/w40/mu.png",phoneCode:"+230"},{name:"Mayotte",code:"YT",flagEmoji:"🇾🇹",flagSvg:"https://flagcdn.com/yt.svg",flagPng:"https://flagcdn.com/w40/yt.png",phoneCode:"+262"},{name:"Mexico",code:"MX",flagEmoji:"🇲🇽",flagSvg:"https://flagcdn.com/mx.svg",flagPng:"https://flagcdn.com/w40/mx.png",phoneCode:"+52"},{name:"Micronesia (Federated States of)",code:"FM",flagEmoji:"🇫🇲",flagSvg:"https://flagcdn.com/fm.svg",flagPng:"https://flagcdn.com/w40/fm.png",phoneCode:"+691"},{name:"Moldova, Republic of",code:"MD",flagEmoji:"🇲🇩",flagSvg:"https://flagcdn.com/md.svg",flagPng:"https://flagcdn.com/w40/md.png",phoneCode:"+373"},{name:"Monaco",code:"MC",flagEmoji:"🇲🇨",flagSvg:"https://flagcdn.com/mc.svg",flagPng:"https://flagcdn.com/w40/mc.png",phoneCode:"+377",phonelengthMAX:10},{name:"Mongolia",code:"MN",flagEmoji:"🇲🇳",flagSvg:"https://flagcdn.com/mn.svg",flagPng:"https://flagcdn.com/w40/mn.png",phoneCode:"+976"},{name:"Montenegro",code:"ME",flagEmoji:"🇲🇪",flagSvg:"https://flagcdn.com/me.svg",flagPng:"https://flagcdn.com/w40/me.png",phoneCode:"+382"},{name:"Montserrat",code:"MS",flagEmoji:"🇲🇸",flagSvg:"https://flagcdn.com/ms.svg",flagPng:"https://flagcdn.com/w40/ms.png",phoneCode:"+1664"},{name:"Morocco",code:"MA",flagEmoji:"🇲🇦",flagSvg:"https://flagcdn.com/ma.svg",flagPng:"https://flagcdn.com/w40/ma.png",phoneCode:"+212"},{name:"Mozambique",code:"MZ",flagEmoji:"🇲🇿",flagSvg:"https://flagcdn.com/mz.svg",flagPng:"https://flagcdn.com/w40/mz.png",phoneCode:"+258"},{name:"Myanmar",code:"MM",flagEmoji:"🇲🇲",flagSvg:"https://flagcdn.com/mm.svg",flagPng:"https://flagcdn.com/w40/mm.png",phoneCode:"+95"},{name:"Namibia",code:"NA",flagEmoji:"🇳🇦",flagSvg:"https://flagcdn.com/na.svg",flagPng:"https://flagcdn.com/w40/na.png",phoneCode:"+264"},{name:"Nauru",code:"NR",flagEmoji:"🇳🇷",flagSvg:"https://flagcdn.com/nr.svg",flagPng:"https://flagcdn.com/w40/nr.png",phoneCode:"+674"},{name:"Nepal",code:"NP",flagEmoji:"🇳🇵",flagSvg:"https://flagcdn.com/np.svg",flagPng:"https://flagcdn.com/w40/np.png",phoneCode:"+977"},{name:"Netherlands",code:"NL",flagEmoji:"🇳🇱",flagSvg:"https://flagcdn.com/nl.svg",flagPng:"https://flagcdn.com/w40/nl.png",phoneCode:"+31"},{name:"New Caledonia",code:"NC",flagEmoji:"🇳🇨",flagSvg:"https://flagcdn.com/nc.svg",flagPng:"https://flagcdn.com/w40/nc.png",phoneCode:"+687"},{name:"New Zealand",code:"NZ",flagEmoji:"🇳🇿",flagSvg:"https://flagcdn.com/nz.svg",flagPng:"https://flagcdn.com/w40/nz.png",phoneCode:"+64"},{name:"Nicaragua",code:"NI",flagEmoji:"🇳🇮",flagSvg:"https://flagcdn.com/ni.svg",flagPng:"https://flagcdn.com/w40/ni.png",phoneCode:"+505"},{name:"Niger",code:"NE",flagEmoji:"🇳🇪",flagSvg:"https://flagcdn.com/ne.svg",flagPng:"https://flagcdn.com/w40/ne.png",phoneCode:"+227"},{name:"Nigeria",code:"NG",flagEmoji:"🇳🇬",flagSvg:"https://flagcdn.com/ng.svg",flagPng:"https://flagcdn.com/w40/ng.png",phoneCode:"+234"},{name:"Niue",code:"NU",flagEmoji:"🇳🇺",flagSvg:"https://flagcdn.com/nu.svg",flagPng:"https://flagcdn.com/w40/nu.png",phoneCode:"+683"},{name:"Norfolk Island",code:"NF",flagEmoji:"🇳🇫",flagSvg:"https://flagcdn.com/nf.svg",flagPng:"https://flagcdn.com/w40/nf.png",phoneCode:"+672"},{name:"North Macedonia",code:"MK",flagEmoji:"🇲🇰",flagSvg:"https://flagcdn.com/mk.svg",flagPng:"https://flagcdn.com/w40/mk.png",phoneCode:"+389"},{name:"Northern Mariana Islands",code:"MP",flagEmoji:"🇲🇵",flagSvg:"https://flagcdn.com/mp.svg",flagPng:"https://flagcdn.com/w40/mp.png",phoneCode:"+1670"},{name:"Norway",code:"NO",flagEmoji:"🇳🇴",flagSvg:"https://flagcdn.com/no.svg",flagPng:"https://flagcdn.com/w40/no.png",phoneCode:"+47"},{name:"Oman",code:"OM",flagEmoji:"🇴🇲",flagSvg:"https://flagcdn.com/om.svg",flagPng:"https://flagcdn.com/w40/om.png",phoneCode:"+968"},{name:"Pakistan",code:"PK",flagEmoji:"🇵🇰",flagSvg:"https://flagcdn.com/pk.svg",flagPng:"https://flagcdn.com/w40/pk.png",phoneCode:"+92"},{name:"Palau",code:"PW",flagEmoji:"🇵🇼",flagSvg:"https://flagcdn.com/pw.svg",flagPng:"https://flagcdn.com/w40/pw.png",phoneCode:"+680"},{name:"Palestine, State of",code:"PS",flagEmoji:"🇵🇸",flagSvg:"https://flagcdn.com/ps.svg",flagPng:"https://flagcdn.com/w40/ps.png",phoneCode:"+970"},{name:"Panama",code:"PA",flagEmoji:"🇵🇦",flagSvg:"https://flagcdn.com/pa.svg",flagPng:"https://flagcdn.com/w40/pa.png",phoneCode:"+507"},{name:"Papua New Guinea",code:"PG",flagEmoji:"🇵🇬",flagSvg:"https://flagcdn.com/pg.svg",flagPng:"https://flagcdn.com/w40/pg.png",phoneCode:"+675"},{name:"Paraguay",code:"PY",flagEmoji:"🇵🇾",flagSvg:"https://flagcdn.com/py.svg",flagPng:"https://flagcdn.com/w40/py.png",phoneCode:"+595"},{name:"Peru",code:"PE",flagEmoji:"🇵🇪",flagSvg:"https://flagcdn.com/pe.svg",flagPng:"https://flagcdn.com/w40/pe.png",phoneCode:"+51"},{name:"Philippines",code:"PH",flagEmoji:"🇵🇭",flagSvg:"https://flagcdn.com/ph.svg",flagPng:"https://flagcdn.com/w40/ph.png",phoneCode:"+63"},{name:"Pitcairn",code:"PN",flagEmoji:"🇵🇳",flagSvg:"https://flagcdn.com/pn.svg",flagPng:"https://flagcdn.com/w40/pn.png",phoneCode:"+64"},{name:"Poland",code:"PL",flagEmoji:"🇵🇱",flagSvg:"https://flagcdn.com/pl.svg",flagPng:"https://flagcdn.com/w40/pl.png",phoneCode:"+48"},{name:"Portugal",code:"PT",flagEmoji:"🇵🇹",flagSvg:"https://flagcdn.com/pt.svg",flagPng:"https://flagcdn.com/w40/pt.png",phoneCode:"+351"},{name:"Puerto Rico",code:"PR",flagEmoji:"🇵🇷",flagSvg:"https://flagcdn.com/pr.svg",flagPng:"https://flagcdn.com/w40/pr.png",phoneCode:"+1787"},{name:"Qatar",code:"QA",flagEmoji:"🇶🇦",flagSvg:"https://flagcdn.com/qa.svg",flagPng:"https://flagcdn.com/w40/qa.png",phoneCode:"+974"},{name:"Réunion",code:"RE",flagEmoji:"🇷🇪",flagSvg:"https://flagcdn.com/re.svg",flagPng:"https://flagcdn.com/w40/re.png",phoneCode:"+262"},{name:"Romania",code:"RO",flagEmoji:"🇷🇴",flagSvg:"https://flagcdn.com/ro.svg",flagPng:"https://flagcdn.com/w40/ro.png",phoneCode:"+40"},{name:"Russian Federation",code:"RU",flagEmoji:"🇷🇺",flagSvg:"https://flagcdn.com/ru.svg",flagPng:"https://flagcdn.com/w40/ru.png",phoneCode:"+7"},{name:"Rwanda",code:"RW",flagEmoji:"🇷🇼",flagSvg:"https://flagcdn.com/rw.svg",flagPng:"https://flagcdn.com/w40/rw.png",phoneCode:"+250"},{name:"Saint Barthélemy",code:"BL",flagEmoji:"🇧🇱",flagSvg:"https://flagcdn.com/bl.svg",flagPng:"https://flagcdn.com/w40/bl.png",phoneCode:"+590"},{name:"Saint Helena, Ascension and Tristan da Cunha",code:"SH",flagEmoji:"🇸🇭",flagSvg:"https://flagcdn.com/sh.svg",flagPng:"https://flagcdn.com/w40/sh.png",phoneCode:"+290"},{name:"Saint Kitts and Nevis",code:"KN",flagEmoji:"🇰🇳",flagSvg:"https://flagcdn.com/kn.svg",flagPng:"https://flagcdn.com/w40/kn.png",phoneCode:"+1869"},{name:"Saint Lucia",code:"LC",flagEmoji:"🇱🇨",flagSvg:"https://flagcdn.com/lc.svg",flagPng:"https://flagcdn.com/w40/lc.png",phoneCode:"+1758"},{name:"Saint Martin (French part)",code:"MF",flagEmoji:"🇲🇫",flagSvg:"https://flagcdn.com/mf.svg",flagPng:"https://flagcdn.com/w40/mf.png",phoneCode:"+590"},{name:"Saint Pierre and Miquelon",code:"PM",flagEmoji:"🇵🇲",flagSvg:"https://flagcdn.com/pm.svg",flagPng:"https://flagcdn.com/w40/pm.png",phoneCode:"+508"},{name:"Saint Vincent and the Grenadines",code:"VC",flagEmoji:"🇻🇨",flagSvg:"https://flagcdn.com/vc.svg",flagPng:"https://flagcdn.com/w40/vc.png",phoneCode:"+1784"},{name:"Samoa",code:"WS",flagEmoji:"🇼🇸",flagSvg:"https://flagcdn.com/ws.svg",flagPng:"https://flagcdn.com/w40/ws.png",phoneCode:"+685"},{name:"San Marino",code:"SM",flagEmoji:"🇸🇲",flagSvg:"https://flagcdn.com/sm.svg",flagPng:"https://flagcdn.com/w40/sm.png",phoneCode:"+378"},{name:"Sao Tome and Principe",code:"ST",flagEmoji:"🇸🇹",flagSvg:"https://flagcdn.com/st.svg",flagPng:"https://flagcdn.com/w40/st.png",phoneCode:"+239"},{name:"Saudi Arabia",code:"SA",flagEmoji:"🇸🇦",flagSvg:"https://flagcdn.com/sa.svg",flagPng:"https://flagcdn.com/w40/sa.png",phoneCode:"+966"},{name:"Senegal",code:"SN",flagEmoji:"🇸🇳",flagSvg:"https://flagcdn.com/sn.svg",flagPng:"https://flagcdn.com/w40/sn.png",phoneCode:"+221"},{name:"Serbia",code:"RS",flagEmoji:"🇷🇸",flagSvg:"https://flagcdn.com/rs.svg",flagPng:"https://flagcdn.com/w40/rs.png",phoneCode:"+381"},{name:"Seychelles",code:"SC",flagEmoji:"🇸🇨",flagSvg:"https://flagcdn.com/sc.svg",flagPng:"https://flagcdn.com/w40/sc.png",phoneCode:"+248"},{name:"Sierra Leone",code:"SL",flagEmoji:"🇸🇱",flagSvg:"https://flagcdn.com/sl.svg",flagPng:"https://flagcdn.com/w40/sl.png",phoneCode:"+232"},{name:"Singapore",code:"SG",flagEmoji:"🇸🇬",flagSvg:"https://flagcdn.com/sg.svg",flagPng:"https://flagcdn.com/w40/sg.png",phoneCode:"+65"},{name:"Sint Maarten (Dutch part)",code:"SX",flagEmoji:"🇸🇽",flagSvg:"https://flagcdn.com/sx.svg",flagPng:"https://flagcdn.com/w40/sx.png",phoneCode:"+1721"},{name:"Slovakia",code:"SK",flagEmoji:"🇸🇰",flagSvg:"https://flagcdn.com/sk.svg",flagPng:"https://flagcdn.com/w40/sk.png",phoneCode:"+421"},{name:"Slovenia",code:"SI",flagEmoji:"🇸🇮",flagSvg:"https://flagcdn.com/si.svg",flagPng:"https://flagcdn.com/w40/si.png",phoneCode:"+386"},{name:"Solomon Islands",code:"SB",flagEmoji:"🇸🇧",flagSvg:"https://flagcdn.com/sb.svg",flagPng:"https://flagcdn.com/w40/sb.png",phoneCode:"+677"},{name:"Somalia",code:"SO",flagEmoji:"🇸🇴",flagSvg:"https://flagcdn.com/so.svg",flagPng:"https://flagcdn.com/w40/so.png",phoneCode:"+252"},{name:"South Africa",code:"ZA",flagEmoji:"🇿🇦",flagSvg:"https://flagcdn.com/za.svg",flagPng:"https://flagcdn.com/w40/za.png",phoneCode:"+27"},{name:"South Georgia and the South Sandwich Islands",code:"GS",flagEmoji:"🇬🇸",flagSvg:"https://flagcdn.com/gs.svg",flagPng:"https://flagcdn.com/w40/gs.png",phoneCode:"+500"},{name:"South Sudan",code:"SS",flagEmoji:"🇸🇸",flagSvg:"https://flagcdn.com/ss.svg",flagPng:"https://flagcdn.com/w40/ss.png",phoneCode:"+211"},{name:"Spain",code:"ES",flagEmoji:"🇪🇸",flagSvg:"https://flagcdn.com/es.svg",flagPng:"https://flagcdn.com/w40/es.png",phoneCode:"+34"},{name:"Sri Lanka",code:"LK",flagEmoji:"🇱🇰",flagSvg:"https://flagcdn.com/lk.svg",flagPng:"https://flagcdn.com/w40/lk.png",phoneCode:"+94"},{name:"Sudan",code:"SD",flagEmoji:"🇸🇩",flagSvg:"https://flagcdn.com/sd.svg",flagPng:"https://flagcdn.com/w40/sd.png",phoneCode:"+249"},{name:"Suriname",code:"SR",flagEmoji:"🇸🇷",flagSvg:"https://flagcdn.com/sr.svg",flagPng:"https://flagcdn.com/w40/sr.png",phoneCode:"+597"},{name:"Svalbard and Jan Mayen",code:"SJ",flagEmoji:"🇸🇯",flagSvg:"https://flagcdn.com/sj.svg",flagPng:"https://flagcdn.com/w40/sj.png",phoneCode:"+47"},{name:"Sweden",code:"SE",flagEmoji:"🇸🇪",flagSvg:"https://flagcdn.com/se.svg",flagPng:"https://flagcdn.com/w40/se.png",phoneCode:"+46"},{name:"Switzerland",code:"CH",flagEmoji:"🇨🇭",flagSvg:"https://flagcdn.com/ch.svg",flagPng:"https://flagcdn.com/w40/ch.png",phoneCode:"+41"},{name:"Syrian Arab Republic",code:"SY",flagEmoji:"🇸🇾",flagSvg:"https://flagcdn.com/sy.svg",flagPng:"https://flagcdn.com/w40/sy.png",phoneCode:"+963"},{name:"Taiwan, Province of China",code:"TW",flagEmoji:"🇹🇼",flagSvg:"https://flagcdn.com/tw.svg",flagPng:"https://flagcdn.com/w40/tw.png",phoneCode:"+886"},{name:"Tajikistan",code:"TJ",flagEmoji:"🇹🇯",flagSvg:"https://flagcdn.com/tj.svg",flagPng:"https://flagcdn.com/w40/tj.png",phoneCode:"+992"},{name:"Tanzania, United Republic of",code:"TZ",flagEmoji:"🇹🇿",flagSvg:"https://flagcdn.com/tz.svg",flagPng:"https://flagcdn.com/w40/tz.png",phoneCode:"+255"},{name:"Thailand",code:"TH",flagEmoji:"🇹🇭",flagSvg:"https://flagcdn.com/th.svg",flagPng:"https://flagcdn.com/w40/th.png",phoneCode:"+66"},{name:"Timor-Leste",code:"TL",flagEmoji:"🇹🇱",flagSvg:"https://flagcdn.com/tl.svg",flagPng:"https://flagcdn.com/w40/tl.png",phoneCode:"+670"},{name:"Togo",code:"TG",flagEmoji:"🇹🇬",flagSvg:"https://flagcdn.com/tg.svg",flagPng:"https://flagcdn.com/w40/tg.png",phoneCode:"+228"},{name:"Tokelau",code:"TK",flagEmoji:"🇹🇰",flagSvg:"https://flagcdn.com/tk.svg",flagPng:"https://flagcdn.com/w40/tk.png",phoneCode:"+690"},{name:"Tonga",code:"TO",flagEmoji:"🇹🇴",flagSvg:"https://flagcdn.com/to.svg",flagPng:"https://flagcdn.com/w40/to.png",phoneCode:"+676"},{name:"Trinidad and Tobago",code:"TT",flagEmoji:"🇹🇹",flagSvg:"https://flagcdn.com/tt.svg",flagPng:"https://flagcdn.com/w40/tt.png",phoneCode:"+1868"},{name:"Tunisia",code:"TN",flagEmoji:"🇹🇳",flagSvg:"https://flagcdn.com/tn.svg",flagPng:"https://flagcdn.com/w40/tn.png",phoneCode:"+216"},{name:"Turkey",code:"TR",flagEmoji:"🇹🇷",flagSvg:"https://flagcdn.com/tr.svg",flagPng:"https://flagcdn.com/w40/tr.png",phoneCode:"+90"},{name:"Turkmenistan",code:"TM",flagEmoji:"🇹🇲",flagSvg:"https://flagcdn.com/tm.svg",flagPng:"https://flagcdn.com/w40/tm.png",phoneCode:"+993"},{name:"Turks and Caicos Islands",code:"TC",flagEmoji:"🇹🇨",flagSvg:"https://flagcdn.com/tc.svg",flagPng:"https://flagcdn.com/w40/tc.png",phoneCode:"+1649"},{name:"Tuvalu",code:"TV",flagEmoji:"🇹🇻",flagSvg:"https://flagcdn.com/tv.svg",flagPng:"https://flagcdn.com/w40/tv.png",phoneCode:"+688"},{name:"Uganda",code:"UG",flagEmoji:"🇺🇬",flagSvg:"https://flagcdn.com/ug.svg",flagPng:"https://flagcdn.com/w40/ug.png",phoneCode:"+256"},{name:"Ukraine",code:"UA",flagEmoji:"🇺🇦",flagSvg:"https://flagcdn.com/ua.svg",flagPng:"https://flagcdn.com/w40/ua.png",phoneCode:"+380"},{name:"United Arab Emirates",code:"AE",flagEmoji:"🇦🇪",flagSvg:"https://flagcdn.com/ae.svg",flagPng:"https://flagcdn.com/w40/ae.png",phoneCode:"+971"},{name:"United Kingdom of Great Britain and Northern Ireland",code:"GB",flagEmoji:"🇬🇧",flagSvg:"https://flagcdn.com/gb.svg",flagPng:"https://flagcdn.com/w40/gb.png",phoneCode:"+44"},{name:"United States",code:"US",flagEmoji:"🇺🇸",flagSvg:"https://flagcdn.com/us.svg",flagPng:"https://flagcdn.com/w40/us.png",phoneCode:"+1"},{name:"United States Minor Outlying Islands",code:"UM",flagEmoji:"🇺🇲",flagSvg:"https://flagcdn.com/um.svg",flagPng:"https://flagcdn.com/w40/um.png",phoneCode:"+1"},{name:"Uruguay",code:"UY",flagEmoji:"🇺🇾",flagSvg:"https://flagcdn.com/uy.svg",flagPng:"https://flagcdn.com/w40/uy.png",phoneCode:"+598"},{name:"Uzbekistan",code:"UZ",flagEmoji:"🇺🇿",flagSvg:"https://flagcdn.com/uz.svg",flagPng:"https://flagcdn.com/w40/uz.png",phoneCode:"+998"},{name:"Vanuatu",code:"VU",flagEmoji:"🇻🇺",flagSvg:"https://flagcdn.com/vu.svg",flagPng:"https://flagcdn.com/w40/vu.png",phoneCode:"+678"},{name:"Venezuela (Bolivarian Republic of)",code:"VE",flagEmoji:"🇻🇪",flagSvg:"https://flagcdn.com/ve.svg",flagPng:"https://flagcdn.com/w40/ve.png",phoneCode:"+58"},{name:"Viet Nam",code:"VN",flagEmoji:"🇻🇳",flagSvg:"https://flagcdn.com/vn.svg",flagPng:"https://flagcdn.com/w40/vn.png",phoneCode:"+84"},{name:"Virgin Islands (British)",code:"VG",flagEmoji:"🇻🇬",flagSvg:"https://flagcdn.com/vg.svg",flagPng:"https://flagcdn.com/w40/vg.png",phoneCode:"+1284"},{name:"Virgin Islands (U.S.)",code:"VI",flagEmoji:"🇻🇮",flagSvg:"https://flagcdn.com/vi.svg",flagPng:"https://flagcdn.com/w40/vi.png",phoneCode:"+1340"},{name:"Wallis and Futuna",code:"WF",flagEmoji:"🇼🇫",flagSvg:"https://flagcdn.com/wf.svg",flagPng:"https://flagcdn.com/w40/wf.png",phoneCode:"+681"},{name:"Western Sahara",code:"EH",flagEmoji:"🇪🇭",flagSvg:"https://flagcdn.com/eh.svg",flagPng:"https://flagcdn.com/w40/eh.png",phoneCode:"+212"},{name:"Yemen",code:"YE",flagEmoji:"🇾🇪",flagSvg:"https://flagcdn.com/ye.svg",flagPng:"https://flagcdn.com/w40/ye.png",phoneCode:"+967"},{name:"Zambia",code:"ZM",flagEmoji:"🇿🇲",flagSvg:"https://flagcdn.com/zm.svg",flagPng:"https://flagcdn.com/w40/zm.png",phoneCode:"+260"},{name:"Zimbabwe",code:"ZW",flagEmoji:"🇿🇼",flagSvg:"https://flagcdn.com/zw.svg",flagPng:"https://flagcdn.com/w40/zw.png",phoneCode:"+263"}],nn=["tabindex"],on={class:"flex items-center gap-2"},an=["src","alt"],ln={key:0,class:"absolute z-[9999] w-full mt-1 bg-white border border-gray-300 rounded-md shadow-lg max-h-60 overflow-y-auto",style:{position:"absolute"}},cn=["onClick"],sn=["src","alt","onError"],gn=e.defineComponent({__name:"index",props:{modelValue:{default:""},placeholder:{default:""},disabled:{type:Boolean,default:!1},required:{type:Boolean,default:!1},customClass:{default:""},autoDetectFromIp:{type:Boolean,default:!0},returnType:{default:"name"},priorityCountries:{default:()=>["US","CA","GB","DE","FR","JP","CN","AU"]},ipDetectUrl:{default:"https://ipinfo.io/json"},ipDetectMethod:{default:"GET"},ipDetectHeaders:{},ipDetectResponseParser:{}},emits:["update:modelValue","change","ip-detect-start","ip-detect-success","ip-detect-error"],setup(t,{expose:a,emit:l}){const n=t,o=l,c=e.ref(!1),s=e.ref(tn),i=e.computed(()=>n.modelValue?s.value.find(m=>n.returnType==="code"?m.code===n.modelValue:m.name===n.modelValue):null),h=e.computed(()=>{const m=s.value.filter(w=>n.priorityCountries.includes(w.code)),f=s.value.filter(w=>!n.priorityCountries.includes(w.code)),y=m.sort((w,b)=>{const j=n.priorityCountries.indexOf(w.code),x=n.priorityCountries.indexOf(b.code);return j-x}),S=f.sort((w,b)=>w.name.localeCompare(b.name));return[...y,...S]}),g=()=>{n.disabled||(c.value=!c.value)},d=()=>{c.value=!1},p=m=>{if(m){const f=n.returnType==="code"?m.code:m.name;o("update:modelValue",f),o("change",f,m)}else o("update:modelValue","");d()},v=(m,f)=>{const y=m.target;f&&y.src===f.flagSvg?y.src=f.flagPng:i.value&&y.src===i.value.flagSvg&&(y.src=i.value.flagPng)},r=async()=>{if(!(!n.autoDetectFromIp||n.modelValue)){o("ip-detect-start");try{const m={method:n.ipDetectMethod,headers:{"Content-Type":"application/json",...n.ipDetectHeaders}},f=await fetch(n.ipDetectUrl,m);if(!f.ok)throw new Error(`HTTP error! status: ${f.status}`);const y=await f.json();let S;if(n.ipDetectResponseParser?S=n.ipDetectResponseParser(y):S=y.country||y.countryCode||y.country_code||"",S=S.toUpperCase(),!S)throw new Error("Country code not found in response");console.log("Auto-detected country from IP:",S),o("ip-detect-success",S);const w=s.value.find(b=>b.code===S);if(w){const b=n.returnType==="code"?w.code:w.name;o("update:modelValue",b),o("change",b,w)}else console.warn("Detected country code not found in country list:",S)}catch(m){const f=m instanceof Error?m:new Error(String(m));console.warn("Failed to detect country from IP:",f),o("ip-detect-error",f)}}},k=e.ref();return e.onMounted(async()=>{await e.nextTick(),n.autoDetectFromIp&&!n.modelValue&&await r();const m=f=>{k.value&&!k.value.contains(f.target)&&d()};document.addEventListener("click",m),e.onUnmounted(()=>{document.removeEventListener("click",m)})}),a({detectCountryFromIp:r,allCountries:e.readonly(s),sortedCountries:e.readonly(h)}),(m,f)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"containerRef",ref:k,class:"country-select-container relative"},[e.createElementVNode("div",{onClick:g,class:e.normalizeClass(["w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-[#1a1a1a] focus:border-[#1a1a1a] transition-colors duration-200 cursor-pointer bg-white flex items-center justify-between",t.customClass,{"opacity-60 cursor-not-allowed":t.disabled}]),tabindex:t.disabled?-1:0,onKeydown:[e.withKeys(g,["enter"]),e.withKeys(g,["space"]),e.withKeys(d,["escape"])]},[e.createElementVNode("div",on,[i.value?(e.openBlock(),e.createElementBlock("img",{key:0,src:i.value.flagSvg,alt:i.value.name,class:"w-5 h-4 object-cover rounded-sm",onError:v},null,40,an)):e.createCommentVNode("",!0),e.createElementVNode("span",{class:e.normalizeClass({"text-gray-500":!i.value&&t.placeholder})},e.toDisplayString(i.value?i.value.name:t.placeholder||"选择国家"),3)]),(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["w-5 h-5 text-gray-400 transition-transform duration-200",{"rotate-180":c.value}]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...f[0]||(f[0]=[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 9l-7 7-7-7"},null,-1)])],2))],42,nn),c.value&&!t.disabled?(e.openBlock(),e.createElementBlock("div",ln,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,y=>{var S;return e.openBlock(),e.createElementBlock("div",{key:y.code,onClick:w=>p(y),class:e.normalizeClass(["px-3 py-2 hover:bg-gray-50 cursor-pointer flex items-center gap-2 transition-colors",{"bg-gray-100":((S=i.value)==null?void 0:S.code)===y.code}])},[e.createElementVNode("img",{src:y.flagSvg,alt:y.name,class:"w-5 h-4 object-cover rounded-sm flex-shrink-0",onError:w=>v(w,y)},null,40,sn),e.createElementVNode("span",null,e.toDisplayString(y.name),1)],10,cn)}),128))])):e.createCommentVNode("",!0),c.value&&!t.disabled?(e.openBlock(),e.createElementBlock("div",{key:1,class:"fixed inset-0 z-[9998]",onClick:d})):e.createCommentVNode("",!0)],512))}}),dn=B(gn,[["__scopeId","data-v-08b31f1b"]]),rn=["tabindex","aria-expanded","aria-labelledby"],fn={class:"flex items-center gap-2 min-h-0 flex-1"},mn={key:0,class:"text-gray-500"},pn={key:1,class:"flex flex-wrap gap-1"},hn={key:0,class:"text-gray-900"},un=["onClick"],vn={key:0,class:"absolute z-[9999] w-full mt-2 bg-white rounded-xl shadow-xl border border-gray-100/50 max-h-60 overflow-auto backdrop-blur-sm",role:"listbox"},bn={key:0,class:"p-3 border-b border-gray-50/80"},wn={class:"py-1"},yn={key:0,class:"px-4 py-3 text-sm text-gray-400 text-center"},Cn=["onClick","onKeydown","aria-selected"],En={class:"flex items-center gap-3"},Sn={key:0,class:"flex items-center"},kn={key:0,class:"bi bi-check text-[#1a1a1a] text-xs"},xn={key:1,class:"flex items-center"},Pn={key:0,class:"w-1.5 h-1.5 bg-white rounded-full"},jn={class:"flex-1"},Mn=e.defineComponent({__name:"index",props:{modelValue:{},options:{},placeholder:{default:"请选择..."},multiple:{type:Boolean,default:!1},searchable:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},labelKey:{default:"label"},valueKey:{default:"value"},noOptionsText:{default:"暂无选项"},clearable:{type:Boolean,default:!1},borderless:{type:Boolean,default:!1},width:{default:"200px"}},emits:["update:modelValue","change","open","close"],setup(t,{expose:a,emit:l}){const n=t,o=l,c=e.ref(!1),s=e.ref(""),i=e.ref(),h=e.ref(),g=e.computed(()=>!n.searchable||!s.value?n.options:n.options.filter(u=>k(u).toLowerCase().includes(s.value.toLowerCase()))),d=e.computed(()=>n.multiple?null:n.options.find(u=>m(u)===n.modelValue)||null),p=e.computed(()=>n.multiple?Array.isArray(n.modelValue)?n.options.filter(u=>n.modelValue.includes(m(u))):[]:[]),v=e.computed(()=>n.multiple?p.value.length>0:d.value!==null),r=e.computed(()=>`select-label-${Math.random().toString(36).substr(2,9)}`),k=u=>typeof u=="object"?u[n.labelKey]:u,m=u=>typeof u=="object"?u[n.valueKey]:u,f=u=>{const E=m(u);return n.multiple?Array.isArray(n.modelValue)&&n.modelValue.includes(E):n.modelValue===E},y=u=>{if(u.disabled)return;const E=m(u);if(n.multiple){const C=Array.isArray(n.modelValue)?[...n.modelValue]:[],P=C.indexOf(E);P>-1?C.splice(P,1):C.push(E),o("update:modelValue",C),o("change",C)}else o("update:modelValue",E),o("change",E),j()},S=u=>{if(!n.multiple)return;const E=m(u),C=Array.isArray(n.modelValue)?[...n.modelValue]:[],P=C.indexOf(E);P>-1&&(C.splice(P,1),o("update:modelValue",C),o("change",C))},w=()=>{n.disabled||(c.value?j():b())},b=()=>{c.value=!0,o("open"),e.nextTick(()=>{n.searchable&&h.value&&h.value.focus()})},j=()=>{c.value=!1,s.value="",o("close")},x=u=>{i.value&&!i.value.contains(u.target)&&j()},M=u=>{if(!c.value)return;const E=g.value,C=E.findIndex(P=>f(P));switch(u.key){case"ArrowDown":u.preventDefault();break;case"ArrowUp":u.preventDefault();break;case"Enter":case" ":u.preventDefault(),C>=0&&E[C]&&y(E[C]);break}};return e.onMounted(()=>{document.addEventListener("click",x),document.addEventListener("keydown",M)}),e.onUnmounted(()=>{document.removeEventListener("click",x),document.removeEventListener("keydown",M)}),a({open:b,close:j,toggle:w}),(u,E)=>(e.openBlock(),e.createElementBlock("div",{class:"relative",style:e.normalizeStyle({width:t.width}),ref_key:"selectContainer",ref:i},[e.createElementVNode("div",{onClick:w,onKeydown:[e.withKeys(w,["enter"]),e.withKeys(w,["space"]),e.withKeys(j,["escape"])],class:e.normalizeClass(["flex items-center justify-between w-full px-4 py-1.5 text-sm bg-white rounded-md cursor-pointer transition-all duration-200 border ","focus:outline-none focus:ring-2 focus:ring-[#1a1a1a]/50 focus:ring-offset-1",{"shadow-sm hover:shadow-md border border-gray-200/60 hover:border-gray-300/80":!t.disabled&&!t.borderless,"shadow-sm hover:shadow-md":!t.disabled&&t.borderless,"bg-gray-50/50 cursor-not-allowed border border-gray-100":t.disabled,"ring-1 ring-[#1a1a1a]/50 border-[#1a1a1a]/50 shadow-md":c.value&&!t.borderless,"ring-1 ring-[#1a1a1a]/50 shadow-md":c.value&&t.borderless}]),tabindex:t.disabled?-1:0,role:"combobox","aria-expanded":c.value,"aria-haspopup":!0,"aria-labelledby":r.value},[e.createElementVNode("div",fn,[t.placeholder&&!v.value?(e.openBlock(),e.createElementBlock("span",mn,e.toDisplayString(t.placeholder),1)):(e.openBlock(),e.createElementBlock("div",pn,[t.multiple?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(p.value,C=>(e.openBlock(),e.createElementBlock("span",{key:m(C),class:"inline-flex items-center gap-1.5 px-2.5 py-1 text-xs bg-[#FFF] text-[#1a1a1a] rounded-full border border-[#1a1a1a]/50"},[e.createTextVNode(e.toDisplayString(k(C))+" ",1),e.createElementVNode("button",{onClick:e.withModifiers(P=>S(C),["stop"]),class:"rounded-full p-0.5 transition-colors duration-150",type:"button"},[...E[1]||(E[1]=[e.createElementVNode("i",{class:"bi bi-x text-xs text-[#1a1a1a]"},null,-1)])],8,un)]))),128)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[d.value?(e.openBlock(),e.createElementBlock("span",hn,e.toDisplayString(k(d.value)),1)):e.createCommentVNode("",!0)],64))]))]),e.createElementVNode("i",{class:e.normalizeClass(["bi text-gray-400 transition-transform duration-200 text-lg",{"bi-chevron-down":!c.value,"bi-chevron-up":c.value}])},null,2)],42,rn),e.createVNode(e.Transition,{"enter-active-class":"transition ease-out duration-200","enter-from-class":"opacity-0 scale-95","enter-to-class":"opacity-100 scale-100","leave-active-class":"transition ease-in duration-150","leave-from-class":"opacity-100 scale-100","leave-to-class":"opacity-0 scale-95"},{default:e.withCtx(()=>[c.value?(e.openBlock(),e.createElementBlock("div",vn,[t.searchable?(e.openBlock(),e.createElementBlock("div",bn,[e.withDirectives(e.createElementVNode("input",{ref_key:"searchInput",ref:h,"onUpdate:modelValue":E[0]||(E[0]=C=>s.value=C),type:"text",class:"w-full px-3 py-2 text-sm bg-gray-50/50 border border-gray-200/60 rounded-lg focus:outline-none focus:ring-1 focus:ring-[#1a1a1a]/50 focus:border-[#1a1a1a]/50 transition-all duration-200",placeholder:"搜索...",onKeydown:e.withKeys(j,["escape"])},null,544),[[e.vModelText,s.value]])])):e.createCommentVNode("",!0),e.createElementVNode("div",wn,[g.value.length===0?(e.openBlock(),e.createElementBlock("div",yn,e.toDisplayString(t.noOptionsText),1)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,C=>(e.openBlock(),e.createElementBlock("div",{key:m(C),onClick:P=>y(C),onKeydown:[e.withKeys(P=>y(C),["enter"]),e.withKeys(P=>y(C),["space"])],class:e.normalizeClass(["px-4 py-3 text-sm cursor-pointer transition-all duration-150",{"bg-[#f2f2f2] text-[#1a1a1a] font-medium":f(C),"hover:bg-[#f2f2f2] text-gray-700":!f(C)}]),role:"option","aria-selected":f(C),tabindex:0},[e.createElementVNode("div",En,[t.multiple?(e.openBlock(),e.createElementBlock("div",Sn,[e.createElementVNode("div",{class:e.normalizeClass(["w-4 h-4 rounded border flex items-center justify-center transition-all duration-150",{"border-[#1a1a1a] text-white":f(C),"border-gray-300 bg-white":!f(C)}])},[f(C)?(e.openBlock(),e.createElementBlock("i",kn)):e.createCommentVNode("",!0)],2)])):(e.openBlock(),e.createElementBlock("div",xn,[e.createElementVNode("div",{class:e.normalizeClass(["w-4 h-4 rounded-full border-2 flex items-center justify-center transition-all duration-150",{"border-[#1a1a1a] bg-[#1a1a1a]":f(C),"border-gray-300 bg-white":!f(C)}])},[f(C)?(e.openBlock(),e.createElementBlock("div",Pn)):e.createCommentVNode("",!0)],2)])),e.createElementVNode("span",jn,e.toDisplayString(k(C)),1)])],42,Cn))),128))])])):e.createCommentVNode("",!0)]),_:1})],4))}}),Bn=B(Mn,[["__scopeId","data-v-1f7381d8"]]),An=["type","value","placeholder","disabled","readonly","required","maxlength","minlength","autocomplete"],Vn={key:2,class:"x-input-count"},In=e.defineComponent({__name:"index",props:{modelValue:{},type:{default:"text"},placeholder:{default:""},label:{default:""},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},showWordLimit:{type:Boolean,default:!1},maxlength:{},minlength:{},autocomplete:{default:"off"},error:{type:Boolean,default:!1},width:{default:"100%"}},emits:["update:modelValue","input","change","blur","focus","clear","keydown","keyup"],setup(t,{expose:a,emit:l}){const n=t,o=l,c=e.ref(),s=e.ref(!1),i=e.computed(()=>!!n.label),h=e.computed(()=>{const b=n.modelValue;return b!=null&&b!==""}),g=e.computed(()=>String(n.modelValue||"").length),d=b=>{const x=b.target.value;o("update:modelValue",x),o("input",x,b)},p=b=>{const x=b.target.value;o("change",x,b)},v=b=>{s.value=!1,o("blur",b)},r=b=>{s.value=!0,o("focus",b)},k=b=>{o("keydown",b)},m=b=>{o("keyup",b)},f=()=>{var b;o("update:modelValue",""),o("clear"),(b=c.value)==null||b.focus()};return a({focus:()=>{var b;(b=c.value)==null||b.focus()},blur:()=>{var b;(b=c.value)==null||b.blur()},select:()=>{var b;(b=c.value)==null||b.select()},ref:c}),(b,j)=>(e.openBlock(),e.createElementBlock("div",{class:"x-input-group",style:e.normalizeStyle({width:t.width})},[e.createElementVNode("input",{ref_key:"inputRef",ref:c,type:t.type,value:t.modelValue,placeholder:i.value?"":t.placeholder,disabled:t.disabled,readonly:t.readonly,required:t.required,maxlength:t.maxlength,minlength:t.minlength,autocomplete:t.autocomplete,class:e.normalizeClass(["x-input",{"x-input--disabled":t.disabled,"x-input--error":t.error,"x-input--clearable":t.clearable&&t.modelValue,"x-input--with-label":i.value}]),onInput:d,onBlur:v,onFocus:r,onKeydown:k,onKeyup:m,onChange:p},null,42,An),t.label?(e.openBlock(),e.createElementBlock("label",{key:0,class:e.normalizeClass(["x-input-label",{"x-input-label--active":s.value||h.value,"x-input-label--error":t.error}])},e.toDisplayString(t.label),3)):e.createCommentVNode("",!0),t.clearable&&t.modelValue&&!t.disabled?(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:"x-input-clear",onClick:f,onMousedown:j[0]||(j[0]=e.withModifiers(()=>{},["prevent"]))},[e.createVNode(e.unref(V),{icon:"bi:x-circle"})],32)):e.createCommentVNode("",!0),t.showWordLimit&&t.maxlength?(e.openBlock(),e.createElementBlock("div",Vn,e.toDisplayString(g.value)+" / "+e.toDisplayString(t.maxlength),1)):e.createCommentVNode("",!0)],4))}}),Nn=B(In,[["__scopeId","data-v-d7d149e3"]]),Tn={class:"x-checkboxes"},$n=["onClick"],Ln={class:"checkbox-wrapper"},Xn=["checked","disabled","onChange"],zn={class:"checkbox-custom"},Fn={key:0,class:"check-icon",viewBox:"0 0 24 24"},Dn={class:"option-label"},On=e.defineComponent({__name:"index",props:{options:{},modelValue:{default:()=>[]},placeholder:{default:"请选择选项"},maxSelections:{default:0},disabled:{type:Boolean,default:!1},layout:{default:"vertical"},columns:{default:3}},emits:["update:modelValue","change"],setup(t,{expose:a,emit:l}){const n=t,o=l,c=p=>n.modelValue&&n.modelValue.includes(p),s=p=>{if(n.disabled)return;const v=n.options.find(m=>m.value===p);if(v!=null&&v.disabled)return;const r=[...n.modelValue],k=r.indexOf(p);if(k>-1)r.splice(k,1);else{if(n.maxSelections>0&&r.length>=n.maxSelections)return;r.push(p)}o("update:modelValue",r),o("change",r)},i=p=>{!n.disabled&&!p.disabled&&s(p.value)};return a({clearAll:()=>{n.disabled||(o("update:modelValue",[]),o("change",[]))},selectAll:()=>{if(n.disabled)return;const v=n.options.filter(r=>!r.disabled).map(r=>r.value);n.maxSelections>0?(o("update:modelValue",v.slice(0,n.maxSelections)),o("change",v.slice(0,n.maxSelections))):(o("update:modelValue",v),o("change",v))},removeOption:p=>{s(p)}}),(p,v)=>(e.openBlock(),e.createElementBlock("div",Tn,[e.createElementVNode("div",{class:e.normalizeClass(["options-container",[`options-container--${t.layout}`,{"options-container--disabled":t.disabled}]]),style:e.normalizeStyle(t.layout==="grid"?{gridTemplateColumns:`repeat(${t.columns}, 1fr)`}:{})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.options,r=>(e.openBlock(),e.createElementBlock("div",{key:r.value,class:e.normalizeClass(["option-item",{"option-selected":c(r.value),"option-disabled":t.disabled||r.disabled}]),onClick:k=>i(r)},[e.createElementVNode("div",Ln,[e.createElementVNode("input",{type:"checkbox",checked:c(r.value),disabled:t.disabled||r.disabled,onChange:e.withModifiers(k=>s(r.value),["stop"]),class:"checkbox-input"},null,40,Xn),e.createElementVNode("div",zn,[c(r.value)?(e.openBlock(),e.createElementBlock("svg",Fn,[...v[0]||(v[0]=[e.createElementVNode("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"},null,-1)])])):e.createCommentVNode("",!0)])]),e.createElementVNode("span",Dn,e.toDisplayString(r.label),1)],10,$n))),128))],6)]))}}),Rn=B(On,[["__scopeId","data-v-05984fcf"]]),_n=["onClick","disabled","aria-expanded","aria-controls"],Gn={class:"accordion-title"},Kn={class:"accordion-icon"},Wn=["id"],Hn={class:"accordion-body"},qn=e.defineComponent({__name:"index",props:{items:{},allowMultiple:{type:Boolean,default:!1},defaultOpen:{default:()=>[]},bordered:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1}},emits:["change","item-click"],setup(t,{expose:a,emit:l}){const n=t,o=l,c=e.ref(new Set(n.defaultOpen)),s=e.ref({}),i=e.ref({}),h=(m,f)=>{m&&(i.value[f]=m,e.nextTick(()=>{const y=m.querySelector(".accordion-body");y&&(s.value[f]=y.scrollHeight)}))},g=m=>{var y;if(n.disabled||(y=n.items[m])!=null&&y.disabled)return;const f=c.value.has(m);n.allowMultiple?f?c.value.delete(m):c.value.add(m):f?c.value.clear():(c.value.clear(),c.value.add(m)),o("item-click",m,!f),o("change",Array.from(c.value))},d=m=>c.value.has(m);return e.watch(()=>n.defaultOpen,m=>{c.value=new Set(m)},{deep:!0}),e.watch(()=>n.items,()=>{e.nextTick(()=>{Object.keys(i.value).forEach(m=>{const f=parseInt(m),y=i.value[f];if(y){const S=y.querySelector(".accordion-body");S&&(s.value[f]=S.scrollHeight)}})})},{deep:!0}),a({openItem:m=>{var f;!n.disabled&&!((f=n.items[m])!=null&&f.disabled)&&(c.value.has(m)||(n.allowMultiple||c.value.clear(),c.value.add(m),o("change",Array.from(c.value))))},closeItem:m=>{c.value.has(m)&&(c.value.delete(m),o("change",Array.from(c.value)))},openAll:()=>{n.allowMultiple&&!n.disabled&&(n.items.forEach((m,f)=>{m.disabled||c.value.add(f)}),o("change",Array.from(c.value)))},closeAll:()=>{c.value.clear(),o("change",[])},toggle:g}),(m,f)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["accordion-container",{"accordion-container--bordered":t.bordered}])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,(y,S)=>(e.openBlock(),e.createElementBlock("div",{key:y.id||S,class:e.normalizeClass(["accordion-item",{"is-open":d(S),"is-disabled":t.disabled||y.disabled}])},[e.createElementVNode("button",{onClick:w=>g(S),class:"accordion-header",disabled:t.disabled||y.disabled,"aria-expanded":d(S),"aria-controls":`accordion-content-${S}`},[e.createElementVNode("span",Gn,e.toDisplayString(y.title),1),e.createElementVNode("div",Kn,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["accordion-arrow",{"accordion-arrow--rotate":d(S)}]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:"2"},[...f[0]||(f[0]=[e.createElementVNode("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"},null,-1)])],2))])],8,_n),e.createElementVNode("div",{id:`accordion-content-${S}`,class:"accordion-content",style:e.normalizeStyle({maxHeight:d(S)?`${s.value[S]}px`:"0px"}),ref_for:!0,ref:w=>h(w,S)},[e.createElementVNode("div",Hn,e.toDisplayString(y.content),1)],12,Wn)],2))),128))],2))}}),Un=B(qn,[["__scopeId","data-v-ff064eef"]]),Yn={class:"thumbnail-container-wrapper relative"},Qn=["onMouseenter","onClick"],Zn=["src","alt"],Jn={class:"thumbnail-index"},eo=e.defineComponent({__name:"index",props:{images:{default:()=>[]},modelValue:{default:0},autoScroll:{type:Boolean,default:!0},showIndex:{type:Boolean,default:!0}},emits:["update:modelValue","change","hover"],setup(t,{expose:a,emit:l}){const n=t,o=l,c=e.ref(n.modelValue),s=e.ref(null),i=e.ref([]),h=e.ref(!1),g=e.ref(!1),d=e.ref(0),p=e.ref(!1),v=e.ref(!1),r=()=>{j()},k=(u,E)=>{u&&u instanceof HTMLElement&&(i.value[E]=u)},m=u=>{o("hover",u)},f=()=>{},y=u=>{c.value=u,o("update:modelValue",u),o("change",u),n.autoScroll&&e.nextTick(()=>{b(u),setTimeout(()=>{j()},300)})},S=()=>{if(!s.value)return;const u=s.value,E=u.clientWidth*.8;u.scrollBy({left:-E,behavior:"smooth"})},w=()=>{if(!s.value)return;const u=s.value,E=u.clientWidth*.8;u.scrollBy({left:E,behavior:"smooth"})},b=u=>{if(!s.value||i.value.length===0)return;const E=s.value,C=i.value[u];if(!C)return;const P=2,ke=C.offsetWidth+8;let L=0;u>=P&&(L=(u-P)*ke);const xe=E.scrollWidth-E.clientWidth;L=Math.max(0,Math.min(L,xe)),E.scrollTo({left:L,behavior:"smooth"})},j=()=>{if(!s.value)return;const u=s.value,E=u.scrollLeft,C=u.scrollWidth-u.clientWidth;h.value=E>0,g.value=E<C,C>0?d.value=E/C*100:d.value=0;const P=x();p.value=n.images.length>P&&h.value,v.value=n.images.length>P&&g.value},x=()=>{var _;if(!s.value||i.value.length===0)return 4;const E=s.value.clientWidth-32,A=(((_=i.value[0])==null?void 0:_.offsetWidth)||80)+12;return Math.floor(E/A)},M=u=>{u>=0&&u<n.images.length&&y(u)};return e.watch(()=>n.modelValue,u=>{u!==void 0&&u!==c.value&&(c.value=u,n.autoScroll&&e.nextTick(()=>{b(u)}))}),e.watch(()=>n.images,()=>{e.nextTick(()=>{j()})},{deep:!0}),e.onMounted(()=>{e.nextTick(()=>{j()})}),a({setCurrentIndex:M,scrollLeft:S,scrollRight:w,updateScrollState:j}),(u,E)=>(e.openBlock(),e.createElementBlock("div",Yn,[p.value?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:S,class:"scroll-arrow scroll-arrow-left","aria-label":"向左滚动"},[...E[1]||(E[1]=[e.createElementVNode("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e.createElementVNode("path",{d:"M15 18l-6-6 6-6"})],-1)])])):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"thumbnailContainer",ref:s,onScroll:r,class:"thumbnail-scroll-container"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.images,(C,P)=>(e.openBlock(),e.createElementBlock("div",{key:P,ref_for:!0,ref:A=>k(A,P),onMouseenter:A=>m(P),onMouseleave:E[0]||(E[0]=A=>f()),onClick:A=>y(P),class:e.normalizeClass(["thumbnail-item",{"thumbnail-item--active":c.value===P,"thumbnail-item--inactive":c.value!==P}])},[e.createElementVNode("img",{src:C,alt:`缩略图 ${P+1}`,class:e.normalizeClass(["thumbnail-image",{"thumbnail-image--active":c.value===P,"thumbnail-image--inactive":c.value!==P}])},null,10,Zn),e.createElementVNode("div",Jn,e.toDisplayString(P+1),1)],42,Qn))),128))],544),v.value?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:w,class:"scroll-arrow scroll-arrow-right","aria-label":"向右滚动"},[...E[2]||(E[2]=[e.createElementVNode("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e.createElementVNode("path",{d:"M9 18l6-6-6-6"})],-1)])])):e.createCommentVNode("",!0)]))}}),to=B(eo,[["__scopeId","data-v-809b97a6"]]),no=e.defineComponent({__name:"index",props:{width:{default:"100%"},height:{default:"1rem"},shape:{default:"rectangle"},animated:{type:Boolean,default:!0},loading:{type:Boolean,default:!0},class:{default:""},style:{default:()=>({})}},setup(t){const a=t,l=e.computed(()=>typeof a.width=="string"?a.width.includes("%")||a.width.includes("px")||a.width.includes("rem")?"":`w-${a.width}`:""),n=e.computed(()=>typeof a.height=="string"?a.height.includes("%")||a.height.includes("px")||a.height.includes("rem")?"":`h-${a.height}`:""),o=e.computed(()=>{switch(a.shape){case"circle":return"rounded-full";case"rounded":return"rounded-lg";default:return"rounded"}}),c=e.computed(()=>a.class),s=e.computed(()=>{const i={...a.style};return typeof a.width=="string"&&(a.width.includes("%")||a.width.includes("px")||a.width.includes("rem"))?i.width=a.width:typeof a.width=="number"&&(i.width=`${a.width}px`),typeof a.height=="string"&&(a.height.includes("%")||a.height.includes("px")||a.height.includes("rem"))?i.height=a.height:typeof a.height=="number"&&(i.height=`${a.height}px`),i});return(i,h)=>t.loading?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["bg-gray-200",[l.value,n.value,o.value,c.value,{"animate-pulse":t.animated}]]),style:e.normalizeStyle(s.value)},null,6)):e.renderSlot(i.$slots,"default",{key:1},void 0,!0)}}),oo=B(no,[["__scopeId","data-v-db4a4465"]]),ao={key:0,class:"modal-header"},lo={class:"modal-title"},co={class:"modal-body"},so={key:1,class:"modal-footer"},go=["disabled"],io={key:0,class:"loading-spinner"},ro=e.defineComponent({__name:"index",props:{visible:{type:Boolean,default:!1},title:{default:"提示"},width:{},size:{default:"medium"},fullscreen:{type:Boolean,default:!1},showHeader:{type:Boolean,default:!0},showFooter:{type:Boolean,default:!0},showClose:{type:Boolean,default:!0},showCancel:{type:Boolean,default:!0},showConfirm:{type:Boolean,default:!0},cancelText:{default:"取消"},confirmText:{default:"确定"},confirmLoading:{type:Boolean,default:!1},maskClosable:{type:Boolean,default:!0},escClosable:{type:Boolean,default:!0}},emits:["update:visible","close","cancel","confirm","opened","closed"],setup(t,{expose:a,emit:l}){const n=t,o=l,c=()=>{o("update:visible",!1),o("close")},s=()=>{o("cancel"),o("update:visible",!1)},i=()=>{o("confirm")},h=()=>{n.maskClosable&&c()},g=d=>{d.key==="Escape"&&n.escClosable&&n.visible&&c()};return e.watch(()=>n.visible,d=>{d?(document.addEventListener("keydown",g),document.body.style.overflow="hidden",o("opened")):(document.removeEventListener("keydown",g),document.body.style.overflow="",o("closed"))}),a({close:c}),(d,p)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{"enter-active-class":"transition-opacity duration-300","enter-from-class":"opacity-0","enter-to-class":"opacity-100","leave-active-class":"transition-opacity duration-300","leave-from-class":"opacity-100","leave-to-class":"opacity-0"},{default:e.withCtx(()=>[t.visible?(e.openBlock(),e.createElementBlock("div",{key:0,class:"modal-mask",onClick:h},[e.createVNode(e.Transition,{"enter-active-class":"transition-all duration-300","enter-from-class":"opacity-0 scale-95","enter-to-class":"opacity-100 scale-100","leave-active-class":"transition-all duration-300","leave-from-class":"opacity-100 scale-100","leave-to-class":"opacity-0 scale-95"},{default:e.withCtx(()=>[t.visible?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["modal-container",[`modal-container--${t.size}`,{"modal-container--fullscreen":t.fullscreen}]]),style:e.normalizeStyle({width:t.width}),onClick:p[0]||(p[0]=e.withModifiers(()=>{},["stop"]))},[t.showHeader?(e.openBlock(),e.createElementBlock("div",ao,[e.renderSlot(d.$slots,"header",{},()=>[e.createElementVNode("h3",lo,e.toDisplayString(t.title),1)],!0),t.showClose?(e.openBlock(),e.createElementBlock("button",{key:0,class:"modal-close",onClick:c,"aria-label":"关闭"},[...p[1]||(p[1]=[e.createElementVNode("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e.createElementVNode("path",{d:"M18 6L6 18M6 6l12 12"})],-1)])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",co,[e.renderSlot(d.$slots,"default",{},void 0,!0)]),t.showFooter?(e.openBlock(),e.createElementBlock("div",so,[e.renderSlot(d.$slots,"footer",{},()=>[t.showCancel?(e.openBlock(),e.createElementBlock("button",{key:0,class:"modal-btn modal-btn--cancel",onClick:s},e.toDisplayString(t.cancelText),1)):e.createCommentVNode("",!0),t.showConfirm?(e.openBlock(),e.createElementBlock("button",{key:1,class:"modal-btn modal-btn--confirm",onClick:i,disabled:t.confirmLoading},[t.confirmLoading?(e.openBlock(),e.createElementBlock("span",io)):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(t.confirmText),1)],8,go)):e.createCommentVNode("",!0)],!0)])):e.createCommentVNode("",!0)],6)):e.createCommentVNode("",!0)]),_:3})])):e.createCommentVNode("",!0)]),_:3})]))}}),fo=B(ro,[["__scopeId","data-v-e43c9a70"]]),Se=()=>{const t=()=>{let g=document.getElementById("xl-message-container");return g||(g=document.createElement("div"),g.id="xl-message-container",g.style.cssText=`
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),fe=/^[a-z0-9]+(-[a-z0-9]+)*$/,O=(t,a,l,n="")=>{const o=t.split(":");if(t.slice(0,1)==="@"){if(o.length<2||o.length>3)return null;n=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){const r=o.pop(),f=o.pop(),g={provider:o.length>0?o[0]:n,prefix:f,name:r};return a&&!z(g)?null:g}const c=o[0],s=c.split("-");if(s.length>1){const r={provider:n,prefix:s.shift(),name:s.join("-")};return a&&!z(r)?null:r}if(l&&n===""){const r={provider:n,prefix:"",name:c};return a&&!z(r,l)?null:r}return null},z=(t,a)=>t?!!((a&&t.prefix===""||t.prefix)&&t.name):!1,me=Object.freeze({left:0,top:0,width:16,height:16}),F=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),R=Object.freeze({...me,...F}),W=Object.freeze({...R,body:"",hidden:!1});function je(t,a){const l={};!t.hFlip!=!a.hFlip&&(l.hFlip=!0),!t.vFlip!=!a.vFlip&&(l.vFlip=!0);const n=((t.rotate||0)+(a.rotate||0))%4;return n&&(l.rotate=n),l}function ee(t,a){const l=je(t,a);for(const n in W)n in F?n in t&&!(n in l)&&(l[n]=F[n]):n in a?l[n]=a[n]:n in t&&(l[n]=t[n]);return l}function Be(t,a){const l=t.icons,n=t.aliases||Object.create(null),o=Object.create(null);function c(s){if(l[s])return o[s]=[];if(!(s in o)){o[s]=null;const r=n[s]&&n[s].parent,f=r&&c(r);f&&(o[s]=[r].concat(f))}return o[s]}return Object.keys(l).concat(Object.keys(n)).forEach(c),o}function Me(t,a,l){const n=t.icons,o=t.aliases||Object.create(null);let c={};function s(r){c=ee(n[r]||o[r],c)}return s(a),l.forEach(s),ee(t,c)}function pe(t,a){const l=[];if(typeof t!="object"||typeof t.icons!="object")return l;t.not_found instanceof Array&&t.not_found.forEach(o=>{a(o,null),l.push(o)});const n=Be(t);for(const o in n){const c=n[o];c&&(a(o,Me(t,o,c)),l.push(o))}return l}const Ae={provider:"",aliases:{},not_found:{},...me};function G(t,a){for(const l in a)if(l in t&&typeof t[l]!=typeof a[l])return!1;return!0}function he(t){if(typeof t!="object"||t===null)return null;const a=t;if(typeof a.prefix!="string"||!t.icons||typeof t.icons!="object"||!G(t,Ae))return null;const l=a.icons;for(const o in l){const c=l[o];if(!o||typeof c.body!="string"||!G(c,W))return null}const n=a.aliases||Object.create(null);for(const o in n){const c=n[o],s=c.parent;if(!o||typeof s!="string"||!l[s]&&!n[s]||!G(c,W))return null}return a}const te=Object.create(null);function Ve(t,a){return{provider:t,prefix:a,icons:Object.create(null),missing:new Set}}function I(t,a){const l=te[t]||(te[t]=Object.create(null));return l[a]||(l[a]=Ve(t,a))}function ue(t,a){return he(a)?pe(a,(l,n)=>{n?t.icons[l]=n:t.missing.add(l)}):[]}function Ie(t,a,l){try{if(typeof l.body=="string")return t.icons[a]={...l},!0}catch{}return!1}let $=!1;function ve(t){return typeof t=="boolean"&&($=t),$}function Ne(t){const a=typeof t=="string"?O(t,!0,$):t;if(a){const l=I(a.provider,a.prefix),n=a.name;return l.icons[n]||(l.missing.has(n)?null:void 0)}}function Te(t,a){const l=O(t,!0,$);if(!l)return!1;const n=I(l.provider,l.prefix);return a?Ie(n,l.name,a):(n.missing.add(l.name),!0)}function $e(t,a){if(typeof t!="object")return!1;if(typeof a!="string"&&(a=t.provider||""),$&&!a&&!t.prefix){let o=!1;return he(t)&&(t.prefix="",pe(t,(c,s)=>{Te(c,s)&&(o=!0)})),o}const l=t.prefix;if(!z({prefix:l,name:"a"}))return!1;const n=I(a,l);return!!ue(n,t)}const be=Object.freeze({width:null,height:null}),we=Object.freeze({...be,...F}),Le=/(-?[0-9.]*[0-9]+[0-9.]*)/g,ze=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function ne(t,a,l){if(a===1)return t;if(l=l||100,typeof t=="number")return Math.ceil(t*a*l)/l;if(typeof t!="string")return t;const n=t.split(Le);if(n===null||!n.length)return t;const o=[];let c=n.shift(),s=ze.test(c);for(;;){if(s){const r=parseFloat(c);isNaN(r)?o.push(c):o.push(Math.ceil(r*a*l)/l)}else o.push(c);if(c=n.shift(),c===void 0)return o.join("");s=!s}}function Xe(t,a="defs"){let l="";const n=t.indexOf("<"+a);for(;n>=0;){const o=t.indexOf(">",n),c=t.indexOf("</"+a);if(o===-1||c===-1)break;const s=t.indexOf(">",c);if(s===-1)break;l+=t.slice(o+1,c).trim(),t=t.slice(0,n).trim()+t.slice(s+1)}return{defs:l,content:t}}function De(t,a){return t?"<defs>"+t+"</defs>"+a:a}function Fe(t,a,l){const n=Xe(t);return De(n.defs,a+n.content+l)}const Oe=t=>t==="unset"||t==="undefined"||t==="none";function Re(t,a){const l={...R,...t},n={...we,...a},o={left:l.left,top:l.top,width:l.width,height:l.height};let c=l.body;[l,n].forEach(p=>{const i=[],y=p.hFlip,x=p.vFlip;let w=p.rotate;y?x?w+=2:(i.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),i.push("scale(-1 1)"),o.top=o.left=0):x&&(i.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),i.push("scale(1 -1)"),o.top=o.left=0);let b;switch(w<0&&(w-=Math.floor(w/4)*4),w=w%4,w){case 1:b=o.height/2+o.top,i.unshift("rotate(90 "+b.toString()+" "+b.toString()+")");break;case 2:i.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:b=o.width/2+o.left,i.unshift("rotate(-90 "+b.toString()+" "+b.toString()+")");break}w%2===1&&(o.left!==o.top&&(b=o.left,o.left=o.top,o.top=b),o.width!==o.height&&(b=o.width,o.width=o.height,o.height=b)),i.length&&(c=Fe(c,'<g transform="'+i.join(" ")+'">',"</g>"))});const s=n.width,r=n.height,f=o.width,g=o.height;let m,h;s===null?(h=r===null?"1em":r==="auto"?g:r,m=ne(h,f/g)):(m=s==="auto"?f:s,h=r===null?ne(m,g/f):r==="auto"?g:r);const v={},d=(p,i)=>{Oe(i)||(v[p]=i.toString())};d("width",m),d("height",h);const k=[o.left,o.top,f,g];return v.viewBox=k.join(" "),{attributes:v,viewBox:k,body:c}}const _e=/\sid="(\S+)"/g,Ge="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let Ke=0;function We(t,a=Ge){const l=[];let n;for(;n=_e.exec(t);)l.push(n[1]);if(!l.length)return t;const o="suffix"+(Math.random()*16777216|Date.now()).toString(16);return l.forEach(c=>{const s=typeof a=="function"?a(c):a+(Ke++).toString(),r=c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(new RegExp('([#;"])('+r+')([")]|\\.[a-z])',"g"),"$1"+s+o+"$3")}),t=t.replace(new RegExp(o,"g"),""),t}const H=Object.create(null);function He(t,a){H[t]=a}function q(t){return H[t]||H[""]}function Q(t){let a;if(typeof t.resources=="string")a=[t.resources];else if(a=t.resources,!(a instanceof Array)||!a.length)return null;return{resources:a,path:t.path||"/",maxURL:t.maxURL||500,rotate:t.rotate||750,timeout:t.timeout||5e3,random:t.random===!0,index:t.index||0,dataAfterTimeout:t.dataAfterTimeout!==!1}}const Z=Object.create(null),N=["https://api.simplesvg.com","https://api.unisvg.com"],X=[];for(;N.length>0;)N.length===1||Math.random()>.5?X.push(N.shift()):X.push(N.pop());Z[""]=Q({resources:["https://api.iconify.design"].concat(X)});function qe(t,a){const l=Q(a);return l===null?!1:(Z[t]=l,!0)}function J(t){return Z[t]}const Ue=()=>{let t;try{if(t=fetch,typeof t=="function")return t}catch{}};let oe=Ue();function Ye(t,a){const l=J(t);if(!l)return 0;let n;if(!l.maxURL)n=0;else{let o=0;l.resources.forEach(s=>{o=Math.max(o,s.length)});const c=a+".json?icons=";n=l.maxURL-o-l.path.length-c.length}return n}function Qe(t){return t===404}const Ze=(t,a,l)=>{const n=[],o=Ye(t,a),c="icons";let s={type:c,provider:t,prefix:a,icons:[]},r=0;return l.forEach((f,g)=>{r+=f.length+1,r>=o&&g>0&&(n.push(s),s={type:c,provider:t,prefix:a,icons:[]},r=f.length),s.icons.push(f)}),n.push(s),n};function Je(t){if(typeof t=="string"){const a=J(t);if(a)return a.path}return"/"}const et=(t,a,l)=>{if(!oe){l("abort",424);return}let n=Je(a.provider);switch(a.type){case"icons":{const c=a.prefix,r=a.icons.join(","),f=new URLSearchParams({icons:r});n+=c+".json?"+f.toString();break}case"custom":{const c=a.uri;n+=c.slice(0,1)==="/"?c.slice(1):c;break}default:l("abort",400);return}let o=503;oe(t+n).then(c=>{const s=c.status;if(s!==200){setTimeout(()=>{l(Qe(s)?"abort":"next",s)});return}return o=501,c.json()}).then(c=>{if(typeof c!="object"||c===null){setTimeout(()=>{c===404?l("abort",c):l("next",o)});return}setTimeout(()=>{l("success",c)})}).catch(()=>{l("next",o)})},tt={prepare:Ze,send:et};function nt(t){const a={loaded:[],missing:[],pending:[]},l=Object.create(null);t.sort((o,c)=>o.provider!==c.provider?o.provider.localeCompare(c.provider):o.prefix!==c.prefix?o.prefix.localeCompare(c.prefix):o.name.localeCompare(c.name));let n={provider:"",prefix:"",name:""};return t.forEach(o=>{if(n.name===o.name&&n.prefix===o.prefix&&n.provider===o.provider)return;n=o;const c=o.provider,s=o.prefix,r=o.name,f=l[c]||(l[c]=Object.create(null)),g=f[s]||(f[s]=I(c,s));let m;r in g.icons?m=a.loaded:s===""||g.missing.has(r)?m=a.missing:m=a.pending;const h={provider:c,prefix:s,name:r};m.push(h)}),a}function ye(t,a){t.forEach(l=>{const n=l.loaderCallbacks;n&&(l.loaderCallbacks=n.filter(o=>o.id!==a))})}function ot(t){t.pendingCallbacksFlag||(t.pendingCallbacksFlag=!0,setTimeout(()=>{t.pendingCallbacksFlag=!1;const a=t.loaderCallbacks?t.loaderCallbacks.slice(0):[];if(!a.length)return;let l=!1;const n=t.provider,o=t.prefix;a.forEach(c=>{const s=c.icons,r=s.pending.length;s.pending=s.pending.filter(f=>{if(f.prefix!==o)return!0;const g=f.name;if(t.icons[g])s.loaded.push({provider:n,prefix:o,name:g});else if(t.missing.has(g))s.missing.push({provider:n,prefix:o,name:g});else return l=!0,!0;return!1}),s.pending.length!==r&&(l||ye([t],c.id),c.callback(s.loaded.slice(0),s.missing.slice(0),s.pending.slice(0),c.abort))})}))}let at=0;function lt(t,a,l){const n=at++,o=ye.bind(null,l,n);if(!a.pending.length)return o;const c={id:n,icons:a,callback:t,abort:o};return l.forEach(s=>{(s.loaderCallbacks||(s.loaderCallbacks=[])).push(c)}),o}function ct(t,a=!0,l=!1){const n=[];return t.forEach(o=>{const c=typeof o=="string"?O(o,a,l):o;c&&n.push(c)}),n}var st={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function gt(t,a,l,n){const o=t.resources.length,c=t.random?Math.floor(Math.random()*o):t.index;let s;if(t.random){let S=t.resources.slice(0);for(s=[];S.length>1;){const B=Math.floor(Math.random()*S.length);s.push(S[B]),S=S.slice(0,B).concat(S.slice(B+1))}s=s.concat(S)}else s=t.resources.slice(c).concat(t.resources.slice(0,c));const r=Date.now();let f="pending",g=0,m,h=null,v=[],d=[];typeof n=="function"&&d.push(n);function k(){h&&(clearTimeout(h),h=null)}function p(){f==="pending"&&(f="aborted"),k(),v.forEach(S=>{S.status==="pending"&&(S.status="aborted")}),v=[]}function i(S,B){B&&(d=[]),typeof S=="function"&&d.push(S)}function y(){return{startTime:r,payload:a,status:f,queriesSent:g,queriesPending:v.length,subscribe:i,abort:p}}function x(){f="failed",d.forEach(S=>{S(void 0,m)})}function w(){v.forEach(S=>{S.status==="pending"&&(S.status="aborted")}),v=[]}function b(S,B,u){const E=B!=="success";switch(v=v.filter(C=>C!==S),f){case"pending":break;case"failed":if(E||!t.dataAfterTimeout)return;break;default:return}if(B==="abort"){m=u,x();return}if(E){m=u,v.length||(s.length?j():x());return}if(k(),w(),!t.random){const C=t.resources.indexOf(S.resource);C!==-1&&C!==t.index&&(t.index=C)}f="completed",d.forEach(C=>{C(u)})}function j(){if(f!=="pending")return;k();const S=s.shift();if(S===void 0){if(v.length){h=setTimeout(()=>{k(),f==="pending"&&(w(),x())},t.timeout);return}x();return}const B={status:"pending",resource:S,callback:(u,E)=>{b(B,u,E)}};v.push(B),g++,h=setTimeout(j,t.rotate),l(S,a,B.callback)}return setTimeout(j),y}function Ce(t){const a={...st,...t};let l=[];function n(){l=l.filter(r=>r().status==="pending")}function o(r,f,g){const m=gt(a,r,f,(h,v)=>{n(),g&&g(h,v)});return l.push(m),m}function c(r){return l.find(f=>r(f))||null}return{query:o,find:c,setIndex:r=>{a.index=r},getIndex:()=>a.index,cleanup:n}}function ae(){}const K=Object.create(null);function it(t){if(!K[t]){const a=J(t);if(!a)return;const l=Ce(a),n={config:a,redundancy:l};K[t]=n}return K[t]}function rt(t,a,l){let n,o;if(typeof t=="string"){const c=q(t);if(!c)return l(void 0,424),ae;o=c.send;const s=it(t);s&&(n=s.redundancy)}else{const c=Q(t);if(c){n=Ce(c);const s=t.resources?t.resources[0]:"",r=q(s);r&&(o=r.send)}}return!n||!o?(l(void 0,424),ae):n.query(a,o,l)().abort}function le(){}function dt(t){t.iconsLoaderFlag||(t.iconsLoaderFlag=!0,setTimeout(()=>{t.iconsLoaderFlag=!1,ot(t)}))}function ft(t){const a=[],l=[];return t.forEach(n=>{(n.match(fe)?a:l).push(n)}),{valid:a,invalid:l}}function T(t,a,l){function n(){const o=t.pendingIcons;a.forEach(c=>{o&&o.delete(c),t.icons[c]||t.missing.add(c)})}if(l&&typeof l=="object")try{if(!ue(t,l).length){n();return}}catch(o){console.error(o)}n(),dt(t)}function ce(t,a){t instanceof Promise?t.then(l=>{a(l)}).catch(()=>{a(null)}):a(t)}function mt(t,a){t.iconsToLoad?t.iconsToLoad=t.iconsToLoad.concat(a).sort():t.iconsToLoad=a,t.iconsQueueFlag||(t.iconsQueueFlag=!0,setTimeout(()=>{t.iconsQueueFlag=!1;const{provider:l,prefix:n}=t,o=t.iconsToLoad;if(delete t.iconsToLoad,!o||!o.length)return;const c=t.loadIcon;if(t.loadIcons&&(o.length>1||!c)){ce(t.loadIcons(o,n,l),m=>{T(t,o,m)});return}if(c){o.forEach(m=>{const h=c(m,n,l);ce(h,v=>{const d=v?{prefix:n,icons:{[m]:v}}:null;T(t,[m],d)})});return}const{valid:s,invalid:r}=ft(o);if(r.length&&T(t,r,null),!s.length)return;const f=n.match(fe)?q(l):null;if(!f){T(t,s,null);return}f.prepare(l,n,s).forEach(m=>{rt(l,m,h=>{T(t,m.icons,h)})})}))}const pt=(t,a)=>{const l=ct(t,!0,ve()),n=nt(l);if(!n.pending.length){let f=!0;return a&&setTimeout(()=>{f&&a(n.loaded,n.missing,n.pending,le)}),()=>{f=!1}}const o=Object.create(null),c=[];let s,r;return n.pending.forEach(f=>{const{provider:g,prefix:m}=f;if(m===r&&g===s)return;s=g,r=m,c.push(I(g,m));const h=o[g]||(o[g]=Object.create(null));h[m]||(h[m]=[])}),n.pending.forEach(f=>{const{provider:g,prefix:m,name:h}=f,v=I(g,m),d=v.pendingIcons||(v.pendingIcons=new Set);d.has(h)||(d.add(h),o[g][m].push(h))}),c.forEach(f=>{const g=o[f.provider][f.prefix];g.length&&mt(f,g)}),a?lt(a,n,c):le};function ht(t,a){const l={...t};for(const n in a){const o=a[n],c=typeof o;n in be?(o===null||o&&(c==="string"||c==="number"))&&(l[n]=o):c===typeof l[n]&&(l[n]=n==="rotate"?o%4:o)}return l}const ut=/[\s,]+/;function vt(t,a){a.split(ut).forEach(l=>{switch(l.trim()){case"horizontal":t.hFlip=!0;break;case"vertical":t.vFlip=!0;break}})}function bt(t,a=0){const l=t.replace(/^-?[0-9.]*/,"");function n(o){for(;o<0;)o+=4;return o%4}if(l===""){const o=parseInt(t);return isNaN(o)?0:n(o)}else if(l!==t){let o=0;switch(l){case"%":o=25;break;case"deg":o=90}if(o){let c=parseFloat(t.slice(0,t.length-l.length));return isNaN(c)?0:(c=c/o,c%1===0?n(c):0)}}return a}function wt(t,a){let l=t.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const n in a)l+=" "+n+'="'+a[n]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+l+">"+t+"</svg>"}function yt(t){return t.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function Ct(t){return"data:image/svg+xml,"+yt(t)}function xt(t){return'url("'+Ct(t)+'")'}const se={...we,inline:!1},kt={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},Et={display:"inline-block"},U={backgroundColor:"currentColor"},xe={backgroundColor:"transparent"},ge={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},ie={webkitMask:U,mask:U,background:xe};for(const t in ie){const a=ie[t];for(const l in ge)a[t+l]=ge[l]}const D={};["horizontal","vertical"].forEach(t=>{const a=t.slice(0,1)+"Flip";D[t+"-flip"]=a,D[t.slice(0,1)+"-flip"]=a,D[t+"Flip"]=a});function re(t){return t+(t.match(/^[-0-9.]+$/)?"px":"")}const de=(t,a)=>{const l=ht(se,a),n={...kt},o=a.mode||"svg",c={},s=a.style,r=typeof s=="object"&&!(s instanceof Array)?s:{};for(let p in a){const i=a[p];if(i!==void 0)switch(p){case"icon":case"style":case"onLoad":case"mode":case"ssr":break;case"inline":case"hFlip":case"vFlip":l[p]=i===!0||i==="true"||i===1;break;case"flip":typeof i=="string"&&vt(l,i);break;case"color":c.color=i;break;case"rotate":typeof i=="string"?l[p]=bt(i):typeof i=="number"&&(l[p]=i);break;case"ariaHidden":case"aria-hidden":i!==!0&&i!=="true"&&delete n["aria-hidden"];break;default:{const y=D[p];y?(i===!0||i==="true"||i===1)&&(l[y]=!0):se[p]===void 0&&(n[p]=i)}}}const f=Re(t,l),g=f.attributes;if(l.inline&&(c.verticalAlign="-0.125em"),o==="svg"){n.style={...c,...r},Object.assign(n,g);let p=0,i=a.id;return typeof i=="string"&&(i=i.replace(/-/g,"_")),n.innerHTML=We(f.body,i?()=>i+"ID"+p++:"iconifyVue"),e.h("svg",n)}const{body:m,width:h,height:v}=t,d=o==="mask"||(o==="bg"?!1:m.indexOf("currentColor")!==-1),k=wt(m,{...g,width:h+"",height:v+""});return n.style={...c,"--svg":xt(k),width:re(g.width),height:re(g.height),...Et,...d?U:xe,...r},e.h("span",n)};ve(!0);He("",tt);if(typeof document<"u"&&typeof window<"u"){const t=window;if(t.IconifyPreload!==void 0){const a=t.IconifyPreload,l="Invalid IconifyPreload syntax.";typeof a=="object"&&a!==null&&(a instanceof Array?a:[a]).forEach(n=>{try{(typeof n!="object"||n===null||n instanceof Array||typeof n.icons!="object"||typeof n.prefix!="string"||!$e(n))&&console.error(l)}catch{console.error(l)}})}if(t.IconifyProviders!==void 0){const a=t.IconifyProviders;if(typeof a=="object"&&a!==null)for(let l in a){const n="IconifyProviders["+l+"] is invalid.";try{const o=a[l];if(typeof o!="object"||!o||o.resources===void 0)continue;qe(l,o)||console.error(n)}catch{console.error(n)}}}}const St={...R,body:""},V=e.defineComponent({inheritAttrs:!1,data(){return{_name:"",_loadingIcon:null,iconMounted:!1,counter:0}},mounted(){this.iconMounted=!0},unmounted(){this.abortLoading()},methods:{abortLoading(){this._loadingIcon&&(this._loadingIcon.abort(),this._loadingIcon=null)},getIcon(t,a,l){if(typeof t=="object"&&t!==null&&typeof t.body=="string")return this._name="",this.abortLoading(),{data:t};let n;if(typeof t!="string"||(n=O(t,!1,!0))===null)return this.abortLoading(),null;let o=Ne(n);if(!o)return(!this._loadingIcon||this._loadingIcon.name!==t)&&(this.abortLoading(),this._name="",o!==null&&(this._loadingIcon={name:t,abort:pt([n],()=>{this.counter++})})),null;if(this.abortLoading(),this._name!==t&&(this._name=t,a&&a(t)),l){o=Object.assign({},o);const s=l(o.body,n.name,n.prefix,n.provider);typeof s=="string"&&(o.body=s)}const c=["iconify"];return n.prefix!==""&&c.push("iconify--"+n.prefix),n.provider!==""&&c.push("iconify--"+n.provider),{data:o,classes:c}}},render(){this.counter;const t=this.$attrs,a=this.iconMounted||t.ssr?this.getIcon(t.icon,t.onLoad,t.customise):null;if(!a)return de(St,t);let l=t;return a.classes&&(l={...t,class:(typeof t.class=="string"?t.class+" ":"")+a.classes.join(" ")}),de({...R,...a.data},l)}}),Pt=["disabled"],jt={key:0,class:"x-btn-icon"},Bt={key:1,class:"x-btn-loading"},Mt={class:"x-btn-content"},At={key:2,class:"x-btn-icon"},Vt=e.defineComponent({__name:"index",props:{type:{default:"default"},size:{default:"medium"},icon:{},iconRight:{},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},block:{type:Boolean,default:!1},round:{type:Boolean,default:!1},ghost:{type:Boolean,default:!1}},emits:["click"],setup(t,{emit:a}){const l=t,n=a,o=e.ref(),c=e.ref([]);let s=0;const r=e.computed(()=>["x-btn",`x-btn-${l.type}`,`x-btn-${l.size}`,{"x-btn-disabled":l.disabled,"x-btn-loading":l.loading,"x-btn-block":l.block,"x-btn-round":l.round,"x-btn-ghost":l.ghost}]);function f(m){!l.disabled&&!l.loading&&n("click",m)}function g(m){if(l.disabled||l.loading)return;const h=o.value;if(!h)return;const v=h.getBoundingClientRect(),d={id:s++,style:{left:`${m.clientX-v.left}px`,top:`${m.clientY-v.top}px`}};c.value.push(d),setTimeout(()=>{const k=c.value.findIndex(p=>p.id===d.id);k>-1&&c.value.splice(k,1)},600)}return(m,h)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(r.value),disabled:t.disabled||t.loading,onClick:f,onMousedown:g,ref_key:"buttonRef",ref:o},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,v=>(e.openBlock(),e.createElementBlock("span",{key:v.id,class:"x-btn-ripple",style:e.normalizeStyle(v.style)},null,4))),128)),t.icon&&!t.loading?(e.openBlock(),e.createElementBlock("span",jt,[e.createVNode(e.unref(V),{icon:t.icon},null,8,["icon"])])):e.createCommentVNode("",!0),t.loading?(e.openBlock(),e.createElementBlock("span",Bt,[e.createVNode(e.unref(V),{icon:"eos-icons:loading"})])):e.createCommentVNode("",!0),e.createElementVNode("span",Mt,[e.renderSlot(m.$slots,"default",{},void 0,!0)]),t.iconRight&&!t.loading?(e.openBlock(),e.createElementBlock("span",At,[e.createVNode(e.unref(V),{icon:t.iconRight},null,8,["icon"])])):e.createCommentVNode("",!0)],42,Pt))}}),M=(t,a)=>{const l=t.__vccOpts||t;for(const[n,o]of a)l[n]=o;return l},Y=M(Vt,[["__scopeId","data-v-4ae56e67"]]),It={class:"x-card-container"},Nt=["onClick"],Tt={class:"relative p-2"},$t=["src","alt"],Lt={key:0,class:"absolute top-3 left-3"},zt={class:"label-badge"},Xt={class:"product-info p-5 ml-5"},Dt={class:"text-sm lg:text-base text-gray-700 leading-relaxed line-clamp-2 mb-3"},Ft={class:"flex items-center justify-between gap-2"},Ot={class:"text-base lg:text-lg font-bold text-[var(--x-color-primary)]"},Rt={key:0,class:"bi bi-heart text-gray-500"},_t={key:1,class:"bi bi-heart-fill text-[#FE374F]"},Gt=["onClick"],Kt={class:"relative flex-shrink-0 p-2"},Wt={class:"aspect-square bg-gray-100 rounded-lg overflow-hidden"},Ht=["src","alt"],qt={key:0,class:"absolute top-3 left-3"},Ut={class:"label-badge"},Yt={class:"flex-1 flex flex-col justify-between product-info p-5 ml-5"},Qt={class:"text-sm lg:text-base text-gray-700 font-medium line-clamp-2 leading-relaxed mb-3"},Zt={class:"flex items-center justify-between gap-2 mt-auto"},Jt={class:"text-base lg:text-lg font-bold text-[var(--x-color-primary)]"},en=e.defineComponent({__name:"index",props:{layout:{default:"grid"},products:{default:()=>[]},useMockData:{type:Boolean,default:!0},columns:{default:4}},emits:["productClick","like"],setup(t,{emit:a}){const l=t,n=a,o=[{id:"1",name:"北欧风简约陶瓷花瓶",image:"https://images.unsplash.com/photo-1578500494198-246f612d3b3d?w=400",price:"¥299",label:"热卖",isWish:!1},{id:"2",name:"手工编织棉麻抱枕套",image:"https://images.unsplash.com/photo-1584100936595-c0654b55a2e2?w=400",price:"¥89",label:"新品",isWish:!0},{id:"3",name:"实木原木置物架收纳架",image:"https://images.unsplash.com/photo-1595428774223-ef52624120d2?w=400",price:"¥459",label:"",isWish:!1},{id:"4",name:"ins风格桌面装饰摆件",image:"https://images.unsplash.com/photo-1513506003901-1e6a229e2d15?w=400",price:"¥129",label:"特价",isWish:!1},{id:"5",name:"现代简约台灯护眼学习灯",image:"https://images.unsplash.com/photo-1507473885765-e6ed057f782c?w=400",price:"¥399",label:"",isWish:!0},{id:"6",name:"北欧风格装饰画挂画",image:"https://images.unsplash.com/photo-1561214115-f2f134cc4912?w=400",price:"¥199",label:"热卖",isWish:!1},{id:"7",name:"多功能收纳盒桌面整理",image:"https://images.unsplash.com/photo-1586023492125-27b2c045efd7?w=400",price:"¥68",label:"",isWish:!1},{id:"8",name:"创意陶瓷马克杯咖啡杯",image:"https://images.unsplash.com/photo-1514228742587-6b1558fcca3d?w=400",price:"¥59",label:"新品",isWish:!1},{id:"9",name:"手工玻璃花瓶透明花器",image:"https://images.unsplash.com/photo-1523293182086-7651a899d37f?w=400",price:"¥179",label:"",isWish:!0},{id:"10",name:"日式和风招财猫摆件",image:"https://images.unsplash.com/photo-1615529182904-14819c35db37?w=400",price:"¥149",label:"热卖",isWish:!1},{id:"11",name:"北欧风木质挂钟客厅",image:"https://images.unsplash.com/photo-1563861826100-9cb868fdbe1c?w=400",price:"¥259",label:"",isWish:!1},{id:"12",name:"现代简约落地花架",image:"https://images.unsplash.com/photo-1545127398-14699f92334b?w=400",price:"¥329",label:"特价",isWish:!1}],c=e.ref([]),s=e.computed(()=>l.products&&l.products.length>0?l.products:c.value),r=e.computed(()=>{const h=Math.min(Math.max(l.columns||4,1),4),v={1:"grid-cols-1",2:"grid-cols-1 md:grid-cols-2",3:"grid-cols-1 md:grid-cols-2 lg:grid-cols-3",4:"grid-cols-2 md:grid-cols-3 lg:grid-cols-4"};return v[h]||v[4]}),f=e.computed(()=>{const h=Math.min(Math.max(l.columns||4,1),4),v={1:"columns-1",2:"columns-1 md:columns-2",3:"columns-2 md:columns-2 lg:columns-3",4:"columns-2 sm:columns-2 md:columns-3 lg:columns-4"};return v[h]||v[4]});e.onMounted(()=>{l.useMockData&&(!l.products||l.products.length===0)&&(c.value=o)});const g=h=>{n("productClick",h)},m=h=>{h.isWish=!h.isWish,n("like",h)};return(h,v)=>(e.openBlock(),e.createElementBlock("div",It,[t.layout==="masonry"?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["masonry-layout",f.value,"gap-4 sm:gap-6"])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,d=>(e.openBlock(),e.createElementBlock("div",{key:d.id+"-masonry",class:"mb-4 sm:mb-6 break-inside-avoid group cursor-pointer product-card",onClick:k=>g(d.id)},[e.createElementVNode("div",Tt,[e.createElementVNode("img",{src:d.image,alt:d.name,loading:"lazy",class:"w-full h-auto rounded-lg bg-gray-100 object-cover transition-transform duration-300 group-hover:scale-[1.01]"},null,8,$t),d.label?(e.openBlock(),e.createElementBlock("div",Lt,[e.createElementVNode("span",zt,e.toDisplayString(d.label),1)])):e.createCommentVNode("",!0)]),e.createElementVNode("div",Xt,[e.createElementVNode("h3",Dt,e.toDisplayString(d.name),1),e.createElementVNode("div",Ft,[e.createElementVNode("span",Ot,e.toDisplayString(d.price),1),e.createVNode(Y,{onClick:e.withModifiers(k=>m(d),["stop"]),type:"text",size:"small",class:"like-button !min-w-0 !p-1"},{default:e.withCtx(()=>[d.isWish?(e.openBlock(),e.createElementBlock("i",_t)):(e.openBlock(),e.createElementBlock("i",Rt))]),_:2},1032,["onClick"])])])],8,Nt))),128))],2)):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["grid",r.value,"gap-4 lg:gap-6"])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,d=>(e.openBlock(),e.createElementBlock("div",{key:d.id+"-grid",class:"h-full"},[e.createElementVNode("div",{class:"group cursor-pointer product-card h-full flex flex-col",onClick:k=>g(d.id)},[e.createElementVNode("div",Kt,[e.createElementVNode("div",Wt,[e.createElementVNode("img",{src:d.image,alt:d.name,class:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-300",loading:"lazy"},null,8,Ht)]),d.label?(e.openBlock(),e.createElementBlock("div",qt,[e.createElementVNode("span",Ut,e.toDisplayString(d.label),1)])):e.createCommentVNode("",!0)]),e.createElementVNode("div",Yt,[e.createElementVNode("h3",Qt,e.toDisplayString(d.name),1),e.createElementVNode("div",Zt,[e.createElementVNode("span",Jt,e.toDisplayString(d.price),1),e.createVNode(Y,{onClick:e.withModifiers(k=>m(d),["stop"]),type:"text",size:"small",class:"like-button !min-w-0 !p-1"},{default:e.withCtx(()=>[d.isWish?(e.openBlock(),e.createBlock(e.unref(V),{key:1,icon:"bi:heart-fill",class:"bi bi-heart-fill text-[#FE374F]"})):(e.openBlock(),e.createBlock(e.unref(V),{key:0,icon:"bi:heart",class:"bi bi-heart text-gray-500"}))]),_:2},1032,["onClick"])])])],8,Gt)]))),128))],2))]))}}),tn=M(en,[["__scopeId","data-v-aec5fd31"]]),nn=[{name:"Afghanistan",code:"AF",flagEmoji:"🇦🇫",flagSvg:"https://flagcdn.com/af.svg",flagPng:"https://flagcdn.com/w40/af.png",phoneCode:"+93",phonelengthMAX:10},{name:"Åland Islands",code:"AX",flagEmoji:"🇦🇽",flagSvg:"https://flagcdn.com/ax.svg",flagPng:"https://flagcdn.com/w40/ax.png",phoneCode:"+358",phonelengthMAX:10},{name:"Albania",code:"AL",flagEmoji:"🇦🇱",flagSvg:"https://flagcdn.com/al.svg",flagPng:"https://flagcdn.com/w40/al.png",phoneCode:"+355",phonelengthMAX:10},{name:"Algeria",code:"DZ",flagEmoji:"🇩🇿",flagSvg:"https://flagcdn.com/dz.svg",flagPng:"https://flagcdn.com/w40/dz.png",phoneCode:"+213",phonelengthMAX:10},{name:"American Samoa",code:"AS",flagEmoji:"🇦🇸",flagSvg:"https://flagcdn.com/as.svg",flagPng:"https://flagcdn.com/w40/as.png",phoneCode:"+1684",phonelengthMAX:10},{name:"Andorra",code:"AD",flagEmoji:"🇦🇩",flagSvg:"https://flagcdn.com/ad.svg",flagPng:"https://flagcdn.com/w40/ad.png",phoneCode:"+376",phonelengthMAX:10},{name:"Angola",code:"AO",flagEmoji:"🇦🇴",flagSvg:"https://flagcdn.com/ao.svg",flagPng:"https://flagcdn.com/w40/ao.png",phoneCode:"+244",phonelengthMAX:10},{name:"Anguilla",code:"AI",flagEmoji:"🇦🇮",flagSvg:"https://flagcdn.com/ai.svg",flagPng:"https://flagcdn.com/w40/ai.png",phoneCode:"+1264",phonelengthMAX:10},{name:"Antarctica",code:"AQ",flagEmoji:"🇦🇶",flagSvg:"https://flagcdn.com/aq.svg",flagPng:"https://flagcdn.com/w40/aq.png",phoneCode:"+672",phonelengthMAX:10},{name:"Antigua and Barbuda",code:"AG",flagEmoji:"🇦🇬",flagSvg:"https://flagcdn.com/ag.svg",flagPng:"https://flagcdn.com/w40/ag.png",phoneCode:"+1268",phonelengthMAX:10},{name:"Argentina",code:"AR",flagEmoji:"🇦🇷",flagSvg:"https://flagcdn.com/ar.svg",flagPng:"https://flagcdn.com/w40/ar.png",phoneCode:"+54",phonelengthMAX:10},{name:"Armenia",code:"AM",flagEmoji:"🇦🇲",flagSvg:"https://flagcdn.com/am.svg",flagPng:"https://flagcdn.com/w40/am.png",phoneCode:"+374",phonelengthMAX:10},{name:"Aruba",code:"AW",flagEmoji:"🇦🇼",flagSvg:"https://flagcdn.com/aw.svg",flagPng:"https://flagcdn.com/w40/aw.png",phoneCode:"+297",phonelengthMAX:10},{name:"Australia",code:"AU",flagEmoji:"🇦🇺",flagSvg:"https://flagcdn.com/au.svg",flagPng:"https://flagcdn.com/w40/au.png",phoneCode:"+61",phonelengthMAX:10},{name:"Austria",code:"AT",flagEmoji:"🇦🇹",flagSvg:"https://flagcdn.com/at.svg",flagPng:"https://flagcdn.com/w40/at.png",phoneCode:"+43",phonelengthMAX:10},{name:"Azerbaijan",code:"AZ",flagEmoji:"🇦🇿",flagSvg:"https://flagcdn.com/az.svg",flagPng:"https://flagcdn.com/w40/az.png",phoneCode:"+994",phonelengthMAX:10},{name:"Bahamas",code:"BS",flagEmoji:"🇧🇸",flagSvg:"https://flagcdn.com/bs.svg",flagPng:"https://flagcdn.com/w40/bs.png",phoneCode:"+1242",phonelengthMAX:10},{name:"Bahrain",code:"BH",flagEmoji:"🇧🇭",flagSvg:"https://flagcdn.com/bh.svg",flagPng:"https://flagcdn.com/w40/bh.png",phoneCode:"+973",phonelengthMAX:10},{name:"Bangladesh",code:"BD",flagEmoji:"🇧🇩",flagSvg:"https://flagcdn.com/bd.svg",flagPng:"https://flagcdn.com/w40/bd.png",phoneCode:"+880",phonelengthMAX:10},{name:"Barbados",code:"BB",flagEmoji:"🇧🇧",flagSvg:"https://flagcdn.com/bb.svg",flagPng:"https://flagcdn.com/w40/bb.png",phoneCode:"+1246",phonelengthMAX:10},{name:"Belarus",code:"BY",flagEmoji:"🇧🇾",flagSvg:"https://flagcdn.com/by.svg",flagPng:"https://flagcdn.com/w40/by.png",phoneCode:"+375",phonelengthMAX:10},{name:"Belgium",code:"BE",flagEmoji:"🇧🇪",flagSvg:"https://flagcdn.com/be.svg",flagPng:"https://flagcdn.com/w40/be.png",phoneCode:"+32",phonelengthMAX:10},{name:"Belize",code:"BZ",flagEmoji:"🇧🇿",flagSvg:"https://flagcdn.com/bz.svg",flagPng:"https://flagcdn.com/w40/bz.png",phoneCode:"+501",phonelengthMAX:10},{name:"Benin",code:"BJ",flagEmoji:"🇧🇯",flagSvg:"https://flagcdn.com/bj.svg",flagPng:"https://flagcdn.com/w40/bj.png",phoneCode:"+229",phonelengthMAX:10},{name:"Bermuda",code:"BM",flagEmoji:"🇧🇲",flagSvg:"https://flagcdn.com/bm.svg",flagPng:"https://flagcdn.com/w40/bm.png",phoneCode:"+1441",phonelengthMAX:10},{name:"Bhutan",code:"BT",flagEmoji:"🇧🇹",flagSvg:"https://flagcdn.com/bt.svg",flagPng:"https://flagcdn.com/w40/bt.png",phoneCode:"+975",phonelengthMAX:10},{name:"Bolivia (Plurinational State of)",code:"BO",flagEmoji:"🇧🇴",flagSvg:"https://flagcdn.com/bo.svg",flagPng:"https://flagcdn.com/w40/bo.png",phoneCode:"+591",phonelengthMAX:10},{name:"Bonaire, Sint Eustatius and Saba",code:"BQ",flagEmoji:"🇧🇶",flagSvg:"https://flagcdn.com/bq.svg",flagPng:"https://flagcdn.com/w40/bq.png",phoneCode:"+5997",phonelengthMAX:10},{name:"Bosnia and Herzegovina",code:"BA",flagEmoji:"🇧🇦",flagSvg:"https://flagcdn.com/ba.svg",flagPng:"https://flagcdn.com/w40/ba.png",phoneCode:"+387",phonelengthMAX:10},{name:"Botswana",code:"BW",flagEmoji:"🇧🇼",flagSvg:"https://flagcdn.com/bw.svg",flagPng:"https://flagcdn.com/w40/bw.png",phoneCode:"+267",phonelengthMAX:10},{name:"Bouvet Island",code:"BV",flagEmoji:"🇧🇻",flagSvg:"https://flagcdn.com/bv.svg",flagPng:"https://flagcdn.com/w40/bv.png",phoneCode:"+55",phonelengthMAX:10},{name:"Brazil",code:"BR",flagEmoji:"🇧🇷",flagSvg:"https://flagcdn.com/br.svg",flagPng:"https://flagcdn.com/w40/br.png",phoneCode:"+55",phonelengthMAX:10},{name:"British Indian Ocean Territory",code:"IO",flagEmoji:"🇮🇴",flagSvg:"https://flagcdn.com/io.svg",flagPng:"https://flagcdn.com/w40/io.png",phoneCode:"+246",phonelengthMAX:10},{name:"Brunei Darussalam",code:"BN",flagEmoji:"🇧🇳",flagSvg:"https://flagcdn.com/bn.svg",flagPng:"https://flagcdn.com/w40/bn.png",phoneCode:"+673",phonelengthMAX:10},{name:"Bulgaria",code:"BG",flagEmoji:"🇧🇬",flagSvg:"https://flagcdn.com/bg.svg",flagPng:"https://flagcdn.com/w40/bg.png",phoneCode:"+359",phonelengthMAX:10},{name:"Burkina Faso",code:"BF",flagEmoji:"🇧🇫",flagSvg:"https://flagcdn.com/bf.svg",flagPng:"https://flagcdn.com/w40/bf.png",phoneCode:"+226",phonelengthMAX:10},{name:"Burundi",code:"BI",flagEmoji:"🇧🇮",flagSvg:"https://flagcdn.com/bi.svg",flagPng:"https://flagcdn.com/w40/bi.png",phoneCode:"+257",phonelengthMAX:10},{name:"Cabo Verde",code:"CV",flagEmoji:"🇨🇻",flagSvg:"https://flagcdn.com/cv.svg",flagPng:"https://flagcdn.com/w40/cv.png",phoneCode:"+238",phonelengthMAX:10},{name:"Cambodia",code:"KH",flagEmoji:"🇰🇭",flagSvg:"https://flagcdn.com/kh.svg",flagPng:"https://flagcdn.com/w40/kh.png",phoneCode:"+855",phonelengthMAX:10},{name:"Cameroon",code:"CM",flagEmoji:"🇨🇲",flagSvg:"https://flagcdn.com/cm.svg",flagPng:"https://flagcdn.com/w40/cm.png",phoneCode:"+237",phonelengthMAX:10},{name:"Canada",code:"CA",flagEmoji:"🇨🇦",flagSvg:"https://flagcdn.com/ca.svg",flagPng:"https://flagcdn.com/w40/ca.png",phoneCode:"+1",phonelengthMAX:10},{name:"Cayman Islands",code:"KY",flagEmoji:"🇰🇾",flagSvg:"https://flagcdn.com/ky.svg",flagPng:"https://flagcdn.com/w40/ky.png",phoneCode:"+1345",phonelengthMAX:10},{name:"Central African Republic",code:"CF",flagEmoji:"🇨🇫",flagSvg:"https://flagcdn.com/cf.svg",flagPng:"https://flagcdn.com/w40/cf.png",phoneCode:"+236",phonelengthMAX:10},{name:"Chad",code:"TD",flagEmoji:"🇹🇩",flagSvg:"https://flagcdn.com/td.svg",flagPng:"https://flagcdn.com/w40/td.png",phoneCode:"+235",phonelengthMAX:10},{name:"Chile",code:"CL",flagEmoji:"🇨🇱",flagSvg:"https://flagcdn.com/cl.svg",flagPng:"https://flagcdn.com/w40/cl.png",phoneCode:"+56",phonelengthMAX:10},{name:"China",code:"CN",flagEmoji:"🇨🇳",flagSvg:"https://flagcdn.com/cn.svg",flagPng:"https://flagcdn.com/w40/cn.png",phoneCode:"+86",phonelengthMAX:11},{name:"Christmas Island",code:"CX",flagEmoji:"🇨🇽",flagSvg:"https://flagcdn.com/cx.svg",flagPng:"https://flagcdn.com/w40/cx.png",phoneCode:"+61",phonelengthMAX:10},{name:"Cocos (Keeling) Islands",code:"CC",flagEmoji:"🇨🇨",flagSvg:"https://flagcdn.com/cc.svg",flagPng:"https://flagcdn.com/w40/cc.png",phoneCode:"+61",phonelengthMAX:10},{name:"Colombia",code:"CO",flagEmoji:"🇨🇴",flagSvg:"https://flagcdn.com/co.svg",flagPng:"https://flagcdn.com/w40/co.png",phoneCode:"+57",phonelengthMAX:10},{name:"Comoros",code:"KM",flagEmoji:"🇰🇲",flagSvg:"https://flagcdn.com/km.svg",flagPng:"https://flagcdn.com/w40/km.png",phoneCode:"+269",phonelengthMAX:10},{name:"Congo",code:"CG",flagEmoji:"🇨🇬",flagSvg:"https://flagcdn.com/cg.svg",flagPng:"https://flagcdn.com/w40/cg.png",phoneCode:"+242",phonelengthMAX:10},{name:"Congo, Democratic Republic of the",code:"CD",flagEmoji:"🇨🇩",flagSvg:"https://flagcdn.com/cd.svg",flagPng:"https://flagcdn.com/w40/cd.png",phoneCode:"+243",phonelengthMAX:10},{name:"Cook Islands",code:"CK",flagEmoji:"🇨🇰",flagSvg:"https://flagcdn.com/ck.svg",flagPng:"https://flagcdn.com/w40/ck.png",phoneCode:"+682",phonelengthMAX:10},{name:"Costa Rica",code:"CR",flagEmoji:"🇨🇷",flagSvg:"https://flagcdn.com/cr.svg",flagPng:"https://flagcdn.com/w40/cr.png",phoneCode:"+506",phonelengthMAX:10},{name:"Croatia",code:"HR",flagEmoji:"🇭🇷",flagSvg:"https://flagcdn.com/hr.svg",flagPng:"https://flagcdn.com/w40/hr.png",phoneCode:"+385",phonelengthMAX:10},{name:"Cuba",code:"CU",flagEmoji:"🇨🇺",flagSvg:"https://flagcdn.com/cu.svg",flagPng:"https://flagcdn.com/w40/cu.png",phoneCode:"+53",phonelengthMAX:10},{name:"Curaçao",code:"CW",flagEmoji:"🇨🇼",flagSvg:"https://flagcdn.com/cw.svg",flagPng:"https://flagcdn.com/w40/cw.png",phoneCode:"+5999",phonelengthMAX:10},{name:"Cyprus",code:"CY",flagEmoji:"🇨🇾",flagSvg:"https://flagcdn.com/cy.svg",flagPng:"https://flagcdn.com/w40/cy.png",phoneCode:"+357",phonelengthMAX:10},{name:"Czechia",code:"CZ",flagEmoji:"🇨🇿",flagSvg:"https://flagcdn.com/cz.svg",flagPng:"https://flagcdn.com/w40/cz.png",phoneCode:"+420",phonelengthMAX:10},{name:"Denmark",code:"DK",flagEmoji:"🇩🇰",flagSvg:"https://flagcdn.com/dk.svg",flagPng:"https://flagcdn.com/w40/dk.png",phoneCode:"+45",phonelengthMAX:10},{name:"Djibouti",code:"DJ",flagEmoji:"🇩🇯",flagSvg:"https://flagcdn.com/dj.svg",flagPng:"https://flagcdn.com/w40/dj.png",phoneCode:"+253",phonelengthMAX:10},{name:"Dominica",code:"DM",flagEmoji:"🇩🇲",flagSvg:"https://flagcdn.com/dm.svg",flagPng:"https://flagcdn.com/w40/dm.png",phoneCode:"+1767",phonelengthMAX:10},{name:"Dominican Republic",code:"DO",flagEmoji:"🇩🇴",flagSvg:"https://flagcdn.com/do.svg",flagPng:"https://flagcdn.com/w40/do.png",phoneCode:"+1809",phonelengthMAX:10},{name:"Ecuador",code:"EC",flagEmoji:"🇪🇨",flagSvg:"https://flagcdn.com/ec.svg",flagPng:"https://flagcdn.com/w40/ec.png",phoneCode:"+593",phonelengthMAX:10},{name:"Egypt",code:"EG",flagEmoji:"🇪🇬",flagSvg:"https://flagcdn.com/eg.svg",flagPng:"https://flagcdn.com/w40/eg.png",phoneCode:"+20",phonelengthMAX:10},{name:"El Salvador",code:"SV",flagEmoji:"🇸🇻",flagSvg:"https://flagcdn.com/sv.svg",flagPng:"https://flagcdn.com/w40/sv.png",phoneCode:"+503",phonelengthMAX:10},{name:"Equatorial Guinea",code:"GQ",flagEmoji:"🇬🇶",flagSvg:"https://flagcdn.com/gq.svg",flagPng:"https://flagcdn.com/w40/gq.png",phoneCode:"+240",phonelengthMAX:10},{name:"Eritrea",code:"ER",flagEmoji:"🇪🇷",flagSvg:"https://flagcdn.com/er.svg",flagPng:"https://flagcdn.com/w40/er.png",phoneCode:"+291",phonelengthMAX:10},{name:"Estonia",code:"EE",flagEmoji:"🇪🇪",flagSvg:"https://flagcdn.com/ee.svg",flagPng:"https://flagcdn.com/w40/ee.png",phoneCode:"+372",phonelengthMAX:10},{name:"Eswatini",code:"SZ",flagEmoji:"🇸🇿",flagSvg:"https://flagcdn.com/sz.svg",flagPng:"https://flagcdn.com/w40/sz.png",phoneCode:"+268",phonelengthMAX:10},{name:"Ethiopia",code:"ET",flagEmoji:"🇪🇹",flagSvg:"https://flagcdn.com/et.svg",flagPng:"https://flagcdn.com/w40/et.png",phoneCode:"+251",phonelengthMAX:10},{name:"Falkland Islands (Malvinas)",code:"FK",flagEmoji:"🇫🇰",flagSvg:"https://flagcdn.com/fk.svg",flagPng:"https://flagcdn.com/w40/fk.png",phoneCode:"+500",phonelengthMAX:10},{name:"Faroe Islands",code:"FO",flagEmoji:"🇫🇴",flagSvg:"https://flagcdn.com/fo.svg",flagPng:"https://flagcdn.com/w40/fo.png",phoneCode:"+298",phonelengthMAX:10},{name:"Fiji",code:"FJ",flagEmoji:"🇫🇯",flagSvg:"https://flagcdn.com/fj.svg",flagPng:"https://flagcdn.com/w40/fj.png",phoneCode:"+679",phonelengthMAX:10},{name:"Finland",code:"FI",flagEmoji:"🇫🇮",flagSvg:"https://flagcdn.com/fi.svg",flagPng:"https://flagcdn.com/w40/fi.png",phoneCode:"+358",phonelengthMAX:10},{name:"France",code:"FR",flagEmoji:"🇫🇷",flagSvg:"https://flagcdn.com/fr.svg",flagPng:"https://flagcdn.com/w40/fr.png",phoneCode:"+33",phonelengthMAX:10},{name:"French Guiana",code:"GF",flagEmoji:"🇬🇫",flagSvg:"https://flagcdn.com/gf.svg",flagPng:"https://flagcdn.com/w40/gf.png",phoneCode:"+594",phonelengthMAX:10},{name:"French Polynesia",code:"PF",flagEmoji:"🇵🇫",flagSvg:"https://flagcdn.com/pf.svg",flagPng:"https://flagcdn.com/w40/pf.png",phoneCode:"+689",phonelengthMAX:10},{name:"French Southern Territories",code:"TF",flagEmoji:"🇹🇫",flagSvg:"https://flagcdn.com/tf.svg",flagPng:"https://flagcdn.com/w40/tf.png",phoneCode:"+262",phonelengthMAX:10},{name:"Gabon",code:"GA",flagEmoji:"🇬🇦",flagSvg:"https://flagcdn.com/ga.svg",flagPng:"https://flagcdn.com/w40/ga.png",phoneCode:"+241",phonelengthMAX:10},{name:"Gambia",code:"GM",flagEmoji:"🇬🇲",flagSvg:"https://flagcdn.com/gm.svg",flagPng:"https://flagcdn.com/w40/gm.png",phoneCode:"+220",phonelengthMAX:10},{name:"Georgia",code:"GE",flagEmoji:"🇬🇪",flagSvg:"https://flagcdn.com/ge.svg",flagPng:"https://flagcdn.com/w40/ge.png",phoneCode:"+995",phonelengthMAX:10},{name:"Germany",code:"DE",flagEmoji:"🇩🇪",flagSvg:"https://flagcdn.com/de.svg",flagPng:"https://flagcdn.com/w40/de.png",phoneCode:"+49",phonelengthMAX:10},{name:"Ghana",code:"GH",flagEmoji:"🇬🇭",flagSvg:"https://flagcdn.com/gh.svg",flagPng:"https://flagcdn.com/w40/gh.png",phoneCode:"+233",phonelengthMAX:10},{name:"Gibraltar",code:"GI",flagEmoji:"🇬🇮",flagSvg:"https://flagcdn.com/gi.svg",flagPng:"https://flagcdn.com/w40/gi.png",phoneCode:"+350",phonelengthMAX:10},{name:"Greece",code:"GR",flagEmoji:"🇬🇷",flagSvg:"https://flagcdn.com/gr.svg",flagPng:"https://flagcdn.com/w40/gr.png",phoneCode:"+30",phonelengthMAX:10},{name:"Greenland",code:"GL",flagEmoji:"🇬🇱",flagSvg:"https://flagcdn.com/gl.svg",flagPng:"https://flagcdn.com/w40/gl.png",phoneCode:"+299",phonelengthMAX:10},{name:"Grenada",code:"GD",flagEmoji:"🇬🇩",flagSvg:"https://flagcdn.com/gd.svg",flagPng:"https://flagcdn.com/w40/gd.png",phoneCode:"+1473",phonelengthMAX:10},{name:"Guadeloupe",code:"GP",flagEmoji:"🇬🇵",flagSvg:"https://flagcdn.com/gp.svg",flagPng:"https://flagcdn.com/w40/gp.png",phoneCode:"+590",phonelengthMAX:10},{name:"Guam",code:"GU",flagEmoji:"🇬🇺",flagSvg:"https://flagcdn.com/gu.svg",flagPng:"https://flagcdn.com/w40/gu.png",phoneCode:"+1671",phonelengthMAX:10},{name:"Guatemala",code:"GT",flagEmoji:"🇬🇹",flagSvg:"https://flagcdn.com/gt.svg",flagPng:"https://flagcdn.com/w40/gt.png",phoneCode:"+502",phonelengthMAX:10},{name:"Guernsey",code:"GG",flagEmoji:"🇬🇬",flagSvg:"https://flagcdn.com/gg.svg",flagPng:"https://flagcdn.com/w40/gg.png",phoneCode:"+44",phonelengthMAX:10},{name:"Guinea",code:"GN",flagEmoji:"🇬🇳",flagSvg:"https://flagcdn.com/gn.svg",flagPng:"https://flagcdn.com/w40/gn.png",phoneCode:"+224",phonelengthMAX:10},{name:"Guinea-Bissau",code:"GW",flagEmoji:"🇬🇼",flagSvg:"https://flagcdn.com/gw.svg",flagPng:"https://flagcdn.com/w40/gw.png",phoneCode:"+245",phonelengthMAX:10},{name:"Guyana",code:"GY",flagEmoji:"🇬🇾",flagSvg:"https://flagcdn.com/gy.svg",flagPng:"https://flagcdn.com/w40/gy.png",phoneCode:"+592",phonelengthMAX:10},{name:"Haiti",code:"HT",flagEmoji:"🇭🇹",flagSvg:"https://flagcdn.com/ht.svg",flagPng:"https://flagcdn.com/w40/ht.png",phoneCode:"+509",phonelengthMAX:10},{name:"Heard Island and McDonald Islands",code:"HM",flagEmoji:"🇭🇲",flagSvg:"https://flagcdn.com/hm.svg",flagPng:"https://flagcdn.com/w40/hm.png",phoneCode:"+672"},{name:"Holy See",code:"VA",flagEmoji:"🇻🇦",flagSvg:"https://flagcdn.com/va.svg",flagPng:"https://flagcdn.com/w40/va.png",phoneCode:"+39"},{name:"Honduras",code:"HN",flagEmoji:"🇭🇳",flagSvg:"https://flagcdn.com/hn.svg",flagPng:"https://flagcdn.com/w40/hn.png",phoneCode:"+504"},{name:"Hong Kong",code:"HK",flagEmoji:"🇭🇰",flagSvg:"https://flagcdn.com/hk.svg",flagPng:"https://flagcdn.com/w40/hk.png",phoneCode:"+852"},{name:"Hungary",code:"HU",flagEmoji:"🇭🇺",flagSvg:"https://flagcdn.com/hu.svg",flagPng:"https://flagcdn.com/w40/hu.png",phoneCode:"+36"},{name:"Iceland",code:"IS",flagEmoji:"🇮🇸",flagSvg:"https://flagcdn.com/is.svg",flagPng:"https://flagcdn.com/w40/is.png",phoneCode:"+354"},{name:"India",code:"IN",flagEmoji:"🇮🇳",flagSvg:"https://flagcdn.com/in.svg",flagPng:"https://flagcdn.com/w40/in.png",phoneCode:"+91"},{name:"Indonesia",code:"ID",flagEmoji:"🇮🇩",flagSvg:"https://flagcdn.com/id.svg",flagPng:"https://flagcdn.com/w40/id.png",phoneCode:"+62"},{name:"Iran (Islamic Republic of)",code:"IR",flagEmoji:"🇮🇷",flagSvg:"https://flagcdn.com/ir.svg",flagPng:"https://flagcdn.com/w40/ir.png",phoneCode:"+98"},{name:"Iraq",code:"IQ",flagEmoji:"🇮🇶",flagSvg:"https://flagcdn.com/iq.svg",flagPng:"https://flagcdn.com/w40/iq.png",phoneCode:"+964"},{name:"Ireland",code:"IE",flagEmoji:"🇮🇪",flagSvg:"https://flagcdn.com/ie.svg",flagPng:"https://flagcdn.com/w40/ie.png",phoneCode:"+353"},{name:"Isle of Man",code:"IM",flagEmoji:"🇮🇲",flagSvg:"https://flagcdn.com/im.svg",flagPng:"https://flagcdn.com/w40/im.png",phoneCode:"+44"},{name:"Israel",code:"IL",flagEmoji:"🇮🇱",flagSvg:"https://flagcdn.com/il.svg",flagPng:"https://flagcdn.com/w40/il.png",phoneCode:"+972"},{name:"Italy",code:"IT",flagEmoji:"🇮🇹",flagSvg:"https://flagcdn.com/it.svg",flagPng:"https://flagcdn.com/w40/it.png",phoneCode:"+39"},{name:"Jamaica",code:"JM",flagEmoji:"🇯🇲",flagSvg:"https://flagcdn.com/jm.svg",flagPng:"https://flagcdn.com/w40/jm.png",phoneCode:"+1876"},{name:"Japan",code:"JP",flagEmoji:"🇯🇵",flagSvg:"https://flagcdn.com/jp.svg",flagPng:"https://flagcdn.com/w40/jp.png",phoneCode:"+81"},{name:"Jersey",code:"JE",flagEmoji:"🇯🇪",flagSvg:"https://flagcdn.com/je.svg",flagPng:"https://flagcdn.com/w40/je.png",phoneCode:"+44"},{name:"Jordan",code:"JO",flagEmoji:"🇯🇴",flagSvg:"https://flagcdn.com/jo.svg",flagPng:"https://flagcdn.com/w40/jo.png",phoneCode:"+962"},{name:"Kazakhstan",code:"KZ",flagEmoji:"🇰🇿",flagSvg:"https://flagcdn.com/kz.svg",flagPng:"https://flagcdn.com/w40/kz.png",phoneCode:"+7"},{name:"Kenya",code:"KE",flagEmoji:"🇰🇪",flagSvg:"https://flagcdn.com/ke.svg",flagPng:"https://flagcdn.com/w40/ke.png",phoneCode:"+254"},{name:"Kiribati",code:"KI",flagEmoji:"🇰🇮",flagSvg:"https://flagcdn.com/ki.svg",flagPng:"https://flagcdn.com/w40/ki.png",phoneCode:"+686"},{name:"Korea (Democratic People's Republic of)",code:"KP",flagEmoji:"🇰🇵",flagSvg:"https://flagcdn.com/kp.svg",flagPng:"https://flagcdn.com/w40/kp.png",phoneCode:"+850"},{name:"Korea, Republic of",code:"KR",flagEmoji:"🇰🇷",flagSvg:"https://flagcdn.com/kr.svg",flagPng:"https://flagcdn.com/w40/kr.png",phoneCode:"+82"},{name:"Kuwait",code:"KW",flagEmoji:"🇰🇼",flagSvg:"https://flagcdn.com/kw.svg",flagPng:"https://flagcdn.com/w40/kw.png",phoneCode:"+965"},{name:"Kyrgyzstan",code:"KG",flagEmoji:"🇰🇬",flagSvg:"https://flagcdn.com/kg.svg",flagPng:"https://flagcdn.com/w40/kg.png",phoneCode:"+996"},{name:"Lao People's Democratic Republic",code:"LA",flagEmoji:"🇱🇦",flagSvg:"https://flagcdn.com/la.svg",flagPng:"https://flagcdn.com/w40/la.png",phoneCode:"+856"},{name:"Latvia",code:"LV",flagEmoji:"🇱🇻",flagSvg:"https://flagcdn.com/lv.svg",flagPng:"https://flagcdn.com/w40/lv.png",phoneCode:"+371"},{name:"Lebanon",code:"LB",flagEmoji:"🇱🇧",flagSvg:"https://flagcdn.com/lb.svg",flagPng:"https://flagcdn.com/w40/lb.png",phoneCode:"+961"},{name:"Lesotho",code:"LS",flagEmoji:"🇱🇸",flagSvg:"https://flagcdn.com/ls.svg",flagPng:"https://flagcdn.com/w40/ls.png",phoneCode:"+266"},{name:"Liberia",code:"LR",flagEmoji:"🇱🇷",flagSvg:"https://flagcdn.com/lr.svg",flagPng:"https://flagcdn.com/w40/lr.png",phoneCode:"+231"},{name:"Libya",code:"LY",flagEmoji:"🇱🇾",flagSvg:"https://flagcdn.com/ly.svg",flagPng:"https://flagcdn.com/w40/ly.png",phoneCode:"+218"},{name:"Liechtenstein",code:"LI",flagEmoji:"🇱🇮",flagSvg:"https://flagcdn.com/li.svg",flagPng:"https://flagcdn.com/w40/li.png",phoneCode:"+423"},{name:"Lithuania",code:"LT",flagEmoji:"🇱🇹",flagSvg:"https://flagcdn.com/lt.svg",flagPng:"https://flagcdn.com/w40/lt.png",phoneCode:"+370"},{name:"Luxembourg",code:"LU",flagEmoji:"🇱🇺",flagSvg:"https://flagcdn.com/lu.svg",flagPng:"https://flagcdn.com/w40/lu.png",phoneCode:"+352"},{name:"Macao",code:"MO",flagEmoji:"🇲🇴",flagSvg:"https://flagcdn.com/mo.svg",flagPng:"https://flagcdn.com/w40/mo.png",phoneCode:"+853"},{name:"Madagascar",code:"MG",flagEmoji:"🇲🇬",flagSvg:"https://flagcdn.com/mg.svg",flagPng:"https://flagcdn.com/w40/mg.png",phoneCode:"+261"},{name:"Malawi",code:"MW",flagEmoji:"🇲🇼",flagSvg:"https://flagcdn.com/mw.svg",flagPng:"https://flagcdn.com/w40/mw.png",phoneCode:"+265"},{name:"Malaysia",code:"MY",flagEmoji:"🇲🇾",flagSvg:"https://flagcdn.com/my.svg",flagPng:"https://flagcdn.com/w40/my.png",phoneCode:"+60"},{name:"Maldives",code:"MV",flagEmoji:"🇲🇻",flagSvg:"https://flagcdn.com/mv.svg",flagPng:"https://flagcdn.com/w40/mv.png",phoneCode:"+960"},{name:"Mali",code:"ML",flagEmoji:"🇲🇱",flagSvg:"https://flagcdn.com/ml.svg",flagPng:"https://flagcdn.com/w40/ml.png",phoneCode:"+223"},{name:"Malta",code:"MT",flagEmoji:"🇲🇹",flagSvg:"https://flagcdn.com/mt.svg",flagPng:"https://flagcdn.com/w40/mt.png",phoneCode:"+356"},{name:"Marshall Islands",code:"MH",flagEmoji:"🇲🇭",flagSvg:"https://flagcdn.com/mh.svg",flagPng:"https://flagcdn.com/w40/mh.png",phoneCode:"+692"},{name:"Martinique",code:"MQ",flagEmoji:"🇲🇶",flagSvg:"https://flagcdn.com/mq.svg",flagPng:"https://flagcdn.com/w40/mq.png",phoneCode:"+596"},{name:"Mauritania",code:"MR",flagEmoji:"🇲🇷",flagSvg:"https://flagcdn.com/mr.svg",flagPng:"https://flagcdn.com/w40/mr.png",phoneCode:"+222"},{name:"Mauritius",code:"MU",flagEmoji:"🇲🇺",flagSvg:"https://flagcdn.com/mu.svg",flagPng:"https://flagcdn.com/w40/mu.png",phoneCode:"+230"},{name:"Mayotte",code:"YT",flagEmoji:"🇾🇹",flagSvg:"https://flagcdn.com/yt.svg",flagPng:"https://flagcdn.com/w40/yt.png",phoneCode:"+262"},{name:"Mexico",code:"MX",flagEmoji:"🇲🇽",flagSvg:"https://flagcdn.com/mx.svg",flagPng:"https://flagcdn.com/w40/mx.png",phoneCode:"+52"},{name:"Micronesia (Federated States of)",code:"FM",flagEmoji:"🇫🇲",flagSvg:"https://flagcdn.com/fm.svg",flagPng:"https://flagcdn.com/w40/fm.png",phoneCode:"+691"},{name:"Moldova, Republic of",code:"MD",flagEmoji:"🇲🇩",flagSvg:"https://flagcdn.com/md.svg",flagPng:"https://flagcdn.com/w40/md.png",phoneCode:"+373"},{name:"Monaco",code:"MC",flagEmoji:"🇲🇨",flagSvg:"https://flagcdn.com/mc.svg",flagPng:"https://flagcdn.com/w40/mc.png",phoneCode:"+377",phonelengthMAX:10},{name:"Mongolia",code:"MN",flagEmoji:"🇲🇳",flagSvg:"https://flagcdn.com/mn.svg",flagPng:"https://flagcdn.com/w40/mn.png",phoneCode:"+976"},{name:"Montenegro",code:"ME",flagEmoji:"🇲🇪",flagSvg:"https://flagcdn.com/me.svg",flagPng:"https://flagcdn.com/w40/me.png",phoneCode:"+382"},{name:"Montserrat",code:"MS",flagEmoji:"🇲🇸",flagSvg:"https://flagcdn.com/ms.svg",flagPng:"https://flagcdn.com/w40/ms.png",phoneCode:"+1664"},{name:"Morocco",code:"MA",flagEmoji:"🇲🇦",flagSvg:"https://flagcdn.com/ma.svg",flagPng:"https://flagcdn.com/w40/ma.png",phoneCode:"+212"},{name:"Mozambique",code:"MZ",flagEmoji:"🇲🇿",flagSvg:"https://flagcdn.com/mz.svg",flagPng:"https://flagcdn.com/w40/mz.png",phoneCode:"+258"},{name:"Myanmar",code:"MM",flagEmoji:"🇲🇲",flagSvg:"https://flagcdn.com/mm.svg",flagPng:"https://flagcdn.com/w40/mm.png",phoneCode:"+95"},{name:"Namibia",code:"NA",flagEmoji:"🇳🇦",flagSvg:"https://flagcdn.com/na.svg",flagPng:"https://flagcdn.com/w40/na.png",phoneCode:"+264"},{name:"Nauru",code:"NR",flagEmoji:"🇳🇷",flagSvg:"https://flagcdn.com/nr.svg",flagPng:"https://flagcdn.com/w40/nr.png",phoneCode:"+674"},{name:"Nepal",code:"NP",flagEmoji:"🇳🇵",flagSvg:"https://flagcdn.com/np.svg",flagPng:"https://flagcdn.com/w40/np.png",phoneCode:"+977"},{name:"Netherlands",code:"NL",flagEmoji:"🇳🇱",flagSvg:"https://flagcdn.com/nl.svg",flagPng:"https://flagcdn.com/w40/nl.png",phoneCode:"+31"},{name:"New Caledonia",code:"NC",flagEmoji:"🇳🇨",flagSvg:"https://flagcdn.com/nc.svg",flagPng:"https://flagcdn.com/w40/nc.png",phoneCode:"+687"},{name:"New Zealand",code:"NZ",flagEmoji:"🇳🇿",flagSvg:"https://flagcdn.com/nz.svg",flagPng:"https://flagcdn.com/w40/nz.png",phoneCode:"+64"},{name:"Nicaragua",code:"NI",flagEmoji:"🇳🇮",flagSvg:"https://flagcdn.com/ni.svg",flagPng:"https://flagcdn.com/w40/ni.png",phoneCode:"+505"},{name:"Niger",code:"NE",flagEmoji:"🇳🇪",flagSvg:"https://flagcdn.com/ne.svg",flagPng:"https://flagcdn.com/w40/ne.png",phoneCode:"+227"},{name:"Nigeria",code:"NG",flagEmoji:"🇳🇬",flagSvg:"https://flagcdn.com/ng.svg",flagPng:"https://flagcdn.com/w40/ng.png",phoneCode:"+234"},{name:"Niue",code:"NU",flagEmoji:"🇳🇺",flagSvg:"https://flagcdn.com/nu.svg",flagPng:"https://flagcdn.com/w40/nu.png",phoneCode:"+683"},{name:"Norfolk Island",code:"NF",flagEmoji:"🇳🇫",flagSvg:"https://flagcdn.com/nf.svg",flagPng:"https://flagcdn.com/w40/nf.png",phoneCode:"+672"},{name:"North Macedonia",code:"MK",flagEmoji:"🇲🇰",flagSvg:"https://flagcdn.com/mk.svg",flagPng:"https://flagcdn.com/w40/mk.png",phoneCode:"+389"},{name:"Northern Mariana Islands",code:"MP",flagEmoji:"🇲🇵",flagSvg:"https://flagcdn.com/mp.svg",flagPng:"https://flagcdn.com/w40/mp.png",phoneCode:"+1670"},{name:"Norway",code:"NO",flagEmoji:"🇳🇴",flagSvg:"https://flagcdn.com/no.svg",flagPng:"https://flagcdn.com/w40/no.png",phoneCode:"+47"},{name:"Oman",code:"OM",flagEmoji:"🇴🇲",flagSvg:"https://flagcdn.com/om.svg",flagPng:"https://flagcdn.com/w40/om.png",phoneCode:"+968"},{name:"Pakistan",code:"PK",flagEmoji:"🇵🇰",flagSvg:"https://flagcdn.com/pk.svg",flagPng:"https://flagcdn.com/w40/pk.png",phoneCode:"+92"},{name:"Palau",code:"PW",flagEmoji:"🇵🇼",flagSvg:"https://flagcdn.com/pw.svg",flagPng:"https://flagcdn.com/w40/pw.png",phoneCode:"+680"},{name:"Palestine, State of",code:"PS",flagEmoji:"🇵🇸",flagSvg:"https://flagcdn.com/ps.svg",flagPng:"https://flagcdn.com/w40/ps.png",phoneCode:"+970"},{name:"Panama",code:"PA",flagEmoji:"🇵🇦",flagSvg:"https://flagcdn.com/pa.svg",flagPng:"https://flagcdn.com/w40/pa.png",phoneCode:"+507"},{name:"Papua New Guinea",code:"PG",flagEmoji:"🇵🇬",flagSvg:"https://flagcdn.com/pg.svg",flagPng:"https://flagcdn.com/w40/pg.png",phoneCode:"+675"},{name:"Paraguay",code:"PY",flagEmoji:"🇵🇾",flagSvg:"https://flagcdn.com/py.svg",flagPng:"https://flagcdn.com/w40/py.png",phoneCode:"+595"},{name:"Peru",code:"PE",flagEmoji:"🇵🇪",flagSvg:"https://flagcdn.com/pe.svg",flagPng:"https://flagcdn.com/w40/pe.png",phoneCode:"+51"},{name:"Philippines",code:"PH",flagEmoji:"🇵🇭",flagSvg:"https://flagcdn.com/ph.svg",flagPng:"https://flagcdn.com/w40/ph.png",phoneCode:"+63"},{name:"Pitcairn",code:"PN",flagEmoji:"🇵🇳",flagSvg:"https://flagcdn.com/pn.svg",flagPng:"https://flagcdn.com/w40/pn.png",phoneCode:"+64"},{name:"Poland",code:"PL",flagEmoji:"🇵🇱",flagSvg:"https://flagcdn.com/pl.svg",flagPng:"https://flagcdn.com/w40/pl.png",phoneCode:"+48"},{name:"Portugal",code:"PT",flagEmoji:"🇵🇹",flagSvg:"https://flagcdn.com/pt.svg",flagPng:"https://flagcdn.com/w40/pt.png",phoneCode:"+351"},{name:"Puerto Rico",code:"PR",flagEmoji:"🇵🇷",flagSvg:"https://flagcdn.com/pr.svg",flagPng:"https://flagcdn.com/w40/pr.png",phoneCode:"+1787"},{name:"Qatar",code:"QA",flagEmoji:"🇶🇦",flagSvg:"https://flagcdn.com/qa.svg",flagPng:"https://flagcdn.com/w40/qa.png",phoneCode:"+974"},{name:"Réunion",code:"RE",flagEmoji:"🇷🇪",flagSvg:"https://flagcdn.com/re.svg",flagPng:"https://flagcdn.com/w40/re.png",phoneCode:"+262"},{name:"Romania",code:"RO",flagEmoji:"🇷🇴",flagSvg:"https://flagcdn.com/ro.svg",flagPng:"https://flagcdn.com/w40/ro.png",phoneCode:"+40"},{name:"Russian Federation",code:"RU",flagEmoji:"🇷🇺",flagSvg:"https://flagcdn.com/ru.svg",flagPng:"https://flagcdn.com/w40/ru.png",phoneCode:"+7"},{name:"Rwanda",code:"RW",flagEmoji:"🇷🇼",flagSvg:"https://flagcdn.com/rw.svg",flagPng:"https://flagcdn.com/w40/rw.png",phoneCode:"+250"},{name:"Saint Barthélemy",code:"BL",flagEmoji:"🇧🇱",flagSvg:"https://flagcdn.com/bl.svg",flagPng:"https://flagcdn.com/w40/bl.png",phoneCode:"+590"},{name:"Saint Helena, Ascension and Tristan da Cunha",code:"SH",flagEmoji:"🇸🇭",flagSvg:"https://flagcdn.com/sh.svg",flagPng:"https://flagcdn.com/w40/sh.png",phoneCode:"+290"},{name:"Saint Kitts and Nevis",code:"KN",flagEmoji:"🇰🇳",flagSvg:"https://flagcdn.com/kn.svg",flagPng:"https://flagcdn.com/w40/kn.png",phoneCode:"+1869"},{name:"Saint Lucia",code:"LC",flagEmoji:"🇱🇨",flagSvg:"https://flagcdn.com/lc.svg",flagPng:"https://flagcdn.com/w40/lc.png",phoneCode:"+1758"},{name:"Saint Martin (French part)",code:"MF",flagEmoji:"🇲🇫",flagSvg:"https://flagcdn.com/mf.svg",flagPng:"https://flagcdn.com/w40/mf.png",phoneCode:"+590"},{name:"Saint Pierre and Miquelon",code:"PM",flagEmoji:"🇵🇲",flagSvg:"https://flagcdn.com/pm.svg",flagPng:"https://flagcdn.com/w40/pm.png",phoneCode:"+508"},{name:"Saint Vincent and the Grenadines",code:"VC",flagEmoji:"🇻🇨",flagSvg:"https://flagcdn.com/vc.svg",flagPng:"https://flagcdn.com/w40/vc.png",phoneCode:"+1784"},{name:"Samoa",code:"WS",flagEmoji:"🇼🇸",flagSvg:"https://flagcdn.com/ws.svg",flagPng:"https://flagcdn.com/w40/ws.png",phoneCode:"+685"},{name:"San Marino",code:"SM",flagEmoji:"🇸🇲",flagSvg:"https://flagcdn.com/sm.svg",flagPng:"https://flagcdn.com/w40/sm.png",phoneCode:"+378"},{name:"Sao Tome and Principe",code:"ST",flagEmoji:"🇸🇹",flagSvg:"https://flagcdn.com/st.svg",flagPng:"https://flagcdn.com/w40/st.png",phoneCode:"+239"},{name:"Saudi Arabia",code:"SA",flagEmoji:"🇸🇦",flagSvg:"https://flagcdn.com/sa.svg",flagPng:"https://flagcdn.com/w40/sa.png",phoneCode:"+966"},{name:"Senegal",code:"SN",flagEmoji:"🇸🇳",flagSvg:"https://flagcdn.com/sn.svg",flagPng:"https://flagcdn.com/w40/sn.png",phoneCode:"+221"},{name:"Serbia",code:"RS",flagEmoji:"🇷🇸",flagSvg:"https://flagcdn.com/rs.svg",flagPng:"https://flagcdn.com/w40/rs.png",phoneCode:"+381"},{name:"Seychelles",code:"SC",flagEmoji:"🇸🇨",flagSvg:"https://flagcdn.com/sc.svg",flagPng:"https://flagcdn.com/w40/sc.png",phoneCode:"+248"},{name:"Sierra Leone",code:"SL",flagEmoji:"🇸🇱",flagSvg:"https://flagcdn.com/sl.svg",flagPng:"https://flagcdn.com/w40/sl.png",phoneCode:"+232"},{name:"Singapore",code:"SG",flagEmoji:"🇸🇬",flagSvg:"https://flagcdn.com/sg.svg",flagPng:"https://flagcdn.com/w40/sg.png",phoneCode:"+65"},{name:"Sint Maarten (Dutch part)",code:"SX",flagEmoji:"🇸🇽",flagSvg:"https://flagcdn.com/sx.svg",flagPng:"https://flagcdn.com/w40/sx.png",phoneCode:"+1721"},{name:"Slovakia",code:"SK",flagEmoji:"🇸🇰",flagSvg:"https://flagcdn.com/sk.svg",flagPng:"https://flagcdn.com/w40/sk.png",phoneCode:"+421"},{name:"Slovenia",code:"SI",flagEmoji:"🇸🇮",flagSvg:"https://flagcdn.com/si.svg",flagPng:"https://flagcdn.com/w40/si.png",phoneCode:"+386"},{name:"Solomon Islands",code:"SB",flagEmoji:"🇸🇧",flagSvg:"https://flagcdn.com/sb.svg",flagPng:"https://flagcdn.com/w40/sb.png",phoneCode:"+677"},{name:"Somalia",code:"SO",flagEmoji:"🇸🇴",flagSvg:"https://flagcdn.com/so.svg",flagPng:"https://flagcdn.com/w40/so.png",phoneCode:"+252"},{name:"South Africa",code:"ZA",flagEmoji:"🇿🇦",flagSvg:"https://flagcdn.com/za.svg",flagPng:"https://flagcdn.com/w40/za.png",phoneCode:"+27"},{name:"South Georgia and the South Sandwich Islands",code:"GS",flagEmoji:"🇬🇸",flagSvg:"https://flagcdn.com/gs.svg",flagPng:"https://flagcdn.com/w40/gs.png",phoneCode:"+500"},{name:"South Sudan",code:"SS",flagEmoji:"🇸🇸",flagSvg:"https://flagcdn.com/ss.svg",flagPng:"https://flagcdn.com/w40/ss.png",phoneCode:"+211"},{name:"Spain",code:"ES",flagEmoji:"🇪🇸",flagSvg:"https://flagcdn.com/es.svg",flagPng:"https://flagcdn.com/w40/es.png",phoneCode:"+34"},{name:"Sri Lanka",code:"LK",flagEmoji:"🇱🇰",flagSvg:"https://flagcdn.com/lk.svg",flagPng:"https://flagcdn.com/w40/lk.png",phoneCode:"+94"},{name:"Sudan",code:"SD",flagEmoji:"🇸🇩",flagSvg:"https://flagcdn.com/sd.svg",flagPng:"https://flagcdn.com/w40/sd.png",phoneCode:"+249"},{name:"Suriname",code:"SR",flagEmoji:"🇸🇷",flagSvg:"https://flagcdn.com/sr.svg",flagPng:"https://flagcdn.com/w40/sr.png",phoneCode:"+597"},{name:"Svalbard and Jan Mayen",code:"SJ",flagEmoji:"🇸🇯",flagSvg:"https://flagcdn.com/sj.svg",flagPng:"https://flagcdn.com/w40/sj.png",phoneCode:"+47"},{name:"Sweden",code:"SE",flagEmoji:"🇸🇪",flagSvg:"https://flagcdn.com/se.svg",flagPng:"https://flagcdn.com/w40/se.png",phoneCode:"+46"},{name:"Switzerland",code:"CH",flagEmoji:"🇨🇭",flagSvg:"https://flagcdn.com/ch.svg",flagPng:"https://flagcdn.com/w40/ch.png",phoneCode:"+41"},{name:"Syrian Arab Republic",code:"SY",flagEmoji:"🇸🇾",flagSvg:"https://flagcdn.com/sy.svg",flagPng:"https://flagcdn.com/w40/sy.png",phoneCode:"+963"},{name:"Taiwan, Province of China",code:"TW",flagEmoji:"🇹🇼",flagSvg:"https://flagcdn.com/tw.svg",flagPng:"https://flagcdn.com/w40/tw.png",phoneCode:"+886"},{name:"Tajikistan",code:"TJ",flagEmoji:"🇹🇯",flagSvg:"https://flagcdn.com/tj.svg",flagPng:"https://flagcdn.com/w40/tj.png",phoneCode:"+992"},{name:"Tanzania, United Republic of",code:"TZ",flagEmoji:"🇹🇿",flagSvg:"https://flagcdn.com/tz.svg",flagPng:"https://flagcdn.com/w40/tz.png",phoneCode:"+255"},{name:"Thailand",code:"TH",flagEmoji:"🇹🇭",flagSvg:"https://flagcdn.com/th.svg",flagPng:"https://flagcdn.com/w40/th.png",phoneCode:"+66"},{name:"Timor-Leste",code:"TL",flagEmoji:"🇹🇱",flagSvg:"https://flagcdn.com/tl.svg",flagPng:"https://flagcdn.com/w40/tl.png",phoneCode:"+670"},{name:"Togo",code:"TG",flagEmoji:"🇹🇬",flagSvg:"https://flagcdn.com/tg.svg",flagPng:"https://flagcdn.com/w40/tg.png",phoneCode:"+228"},{name:"Tokelau",code:"TK",flagEmoji:"🇹🇰",flagSvg:"https://flagcdn.com/tk.svg",flagPng:"https://flagcdn.com/w40/tk.png",phoneCode:"+690"},{name:"Tonga",code:"TO",flagEmoji:"🇹🇴",flagSvg:"https://flagcdn.com/to.svg",flagPng:"https://flagcdn.com/w40/to.png",phoneCode:"+676"},{name:"Trinidad and Tobago",code:"TT",flagEmoji:"🇹🇹",flagSvg:"https://flagcdn.com/tt.svg",flagPng:"https://flagcdn.com/w40/tt.png",phoneCode:"+1868"},{name:"Tunisia",code:"TN",flagEmoji:"🇹🇳",flagSvg:"https://flagcdn.com/tn.svg",flagPng:"https://flagcdn.com/w40/tn.png",phoneCode:"+216"},{name:"Turkey",code:"TR",flagEmoji:"🇹🇷",flagSvg:"https://flagcdn.com/tr.svg",flagPng:"https://flagcdn.com/w40/tr.png",phoneCode:"+90"},{name:"Turkmenistan",code:"TM",flagEmoji:"🇹🇲",flagSvg:"https://flagcdn.com/tm.svg",flagPng:"https://flagcdn.com/w40/tm.png",phoneCode:"+993"},{name:"Turks and Caicos Islands",code:"TC",flagEmoji:"🇹🇨",flagSvg:"https://flagcdn.com/tc.svg",flagPng:"https://flagcdn.com/w40/tc.png",phoneCode:"+1649"},{name:"Tuvalu",code:"TV",flagEmoji:"🇹🇻",flagSvg:"https://flagcdn.com/tv.svg",flagPng:"https://flagcdn.com/w40/tv.png",phoneCode:"+688"},{name:"Uganda",code:"UG",flagEmoji:"🇺🇬",flagSvg:"https://flagcdn.com/ug.svg",flagPng:"https://flagcdn.com/w40/ug.png",phoneCode:"+256"},{name:"Ukraine",code:"UA",flagEmoji:"🇺🇦",flagSvg:"https://flagcdn.com/ua.svg",flagPng:"https://flagcdn.com/w40/ua.png",phoneCode:"+380"},{name:"United Arab Emirates",code:"AE",flagEmoji:"🇦🇪",flagSvg:"https://flagcdn.com/ae.svg",flagPng:"https://flagcdn.com/w40/ae.png",phoneCode:"+971"},{name:"United Kingdom of Great Britain and Northern Ireland",code:"GB",flagEmoji:"🇬🇧",flagSvg:"https://flagcdn.com/gb.svg",flagPng:"https://flagcdn.com/w40/gb.png",phoneCode:"+44"},{name:"United States",code:"US",flagEmoji:"🇺🇸",flagSvg:"https://flagcdn.com/us.svg",flagPng:"https://flagcdn.com/w40/us.png",phoneCode:"+1"},{name:"United States Minor Outlying Islands",code:"UM",flagEmoji:"🇺🇲",flagSvg:"https://flagcdn.com/um.svg",flagPng:"https://flagcdn.com/w40/um.png",phoneCode:"+1"},{name:"Uruguay",code:"UY",flagEmoji:"🇺🇾",flagSvg:"https://flagcdn.com/uy.svg",flagPng:"https://flagcdn.com/w40/uy.png",phoneCode:"+598"},{name:"Uzbekistan",code:"UZ",flagEmoji:"🇺🇿",flagSvg:"https://flagcdn.com/uz.svg",flagPng:"https://flagcdn.com/w40/uz.png",phoneCode:"+998"},{name:"Vanuatu",code:"VU",flagEmoji:"🇻🇺",flagSvg:"https://flagcdn.com/vu.svg",flagPng:"https://flagcdn.com/w40/vu.png",phoneCode:"+678"},{name:"Venezuela (Bolivarian Republic of)",code:"VE",flagEmoji:"🇻🇪",flagSvg:"https://flagcdn.com/ve.svg",flagPng:"https://flagcdn.com/w40/ve.png",phoneCode:"+58"},{name:"Viet Nam",code:"VN",flagEmoji:"🇻🇳",flagSvg:"https://flagcdn.com/vn.svg",flagPng:"https://flagcdn.com/w40/vn.png",phoneCode:"+84"},{name:"Virgin Islands (British)",code:"VG",flagEmoji:"🇻🇬",flagSvg:"https://flagcdn.com/vg.svg",flagPng:"https://flagcdn.com/w40/vg.png",phoneCode:"+1284"},{name:"Virgin Islands (U.S.)",code:"VI",flagEmoji:"🇻🇮",flagSvg:"https://flagcdn.com/vi.svg",flagPng:"https://flagcdn.com/w40/vi.png",phoneCode:"+1340"},{name:"Wallis and Futuna",code:"WF",flagEmoji:"🇼🇫",flagSvg:"https://flagcdn.com/wf.svg",flagPng:"https://flagcdn.com/w40/wf.png",phoneCode:"+681"},{name:"Western Sahara",code:"EH",flagEmoji:"🇪🇭",flagSvg:"https://flagcdn.com/eh.svg",flagPng:"https://flagcdn.com/w40/eh.png",phoneCode:"+212"},{name:"Yemen",code:"YE",flagEmoji:"🇾🇪",flagSvg:"https://flagcdn.com/ye.svg",flagPng:"https://flagcdn.com/w40/ye.png",phoneCode:"+967"},{name:"Zambia",code:"ZM",flagEmoji:"🇿🇲",flagSvg:"https://flagcdn.com/zm.svg",flagPng:"https://flagcdn.com/w40/zm.png",phoneCode:"+260"},{name:"Zimbabwe",code:"ZW",flagEmoji:"🇿🇼",flagSvg:"https://flagcdn.com/zw.svg",flagPng:"https://flagcdn.com/w40/zw.png",phoneCode:"+263"}],on=["tabindex"],an={class:"flex items-center gap-2"},ln=["src","alt"],cn={key:0,class:"absolute z-[9999] w-full mt-1 bg-white border border-gray-300 rounded-md shadow-lg max-h-60 overflow-y-auto",style:{position:"absolute"}},sn=["onClick"],gn=["src","alt","onError"],rn=e.defineComponent({__name:"index",props:{modelValue:{default:""},placeholder:{default:""},disabled:{type:Boolean,default:!1},required:{type:Boolean,default:!1},customClass:{default:""},autoDetectFromIp:{type:Boolean,default:!0},returnType:{default:"name"},priorityCountries:{default:()=>["US","CA","GB","DE","FR","JP","CN","AU"]},ipDetectUrl:{default:"https://ipinfo.io/json"},ipDetectMethod:{default:"GET"},ipDetectHeaders:{},ipDetectResponseParser:{}},emits:["update:modelValue","change","ip-detect-start","ip-detect-success","ip-detect-error"],setup(t,{expose:a,emit:l}){const n=t,o=l,c=e.ref(!1),s=e.ref(nn),r=e.computed(()=>n.modelValue?s.value.find(p=>n.returnType==="code"?p.code===n.modelValue:p.name===n.modelValue):null),f=e.computed(()=>{const p=s.value.filter(w=>n.priorityCountries.includes(w.code)),i=s.value.filter(w=>!n.priorityCountries.includes(w.code)),y=p.sort((w,b)=>{const j=n.priorityCountries.indexOf(w.code),S=n.priorityCountries.indexOf(b.code);return j-S}),x=i.sort((w,b)=>w.name.localeCompare(b.name));return[...y,...x]}),g=()=>{n.disabled||(c.value=!c.value)},m=()=>{c.value=!1},h=p=>{if(p){const i=n.returnType==="code"?p.code:p.name;o("update:modelValue",i),o("change",i,p)}else o("update:modelValue","");m()},v=(p,i)=>{const y=p.target;i&&y.src===i.flagSvg?y.src=i.flagPng:r.value&&y.src===r.value.flagSvg&&(y.src=r.value.flagPng)},d=async()=>{if(!(!n.autoDetectFromIp||n.modelValue)){o("ip-detect-start");try{const p={method:n.ipDetectMethod,headers:{"Content-Type":"application/json",...n.ipDetectHeaders}},i=await fetch(n.ipDetectUrl,p);if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);const y=await i.json();let x;if(n.ipDetectResponseParser?x=n.ipDetectResponseParser(y):x=y.country||y.countryCode||y.country_code||"",x=x.toUpperCase(),!x)throw new Error("Country code not found in response");console.log("Auto-detected country from IP:",x),o("ip-detect-success",x);const w=s.value.find(b=>b.code===x);if(w){const b=n.returnType==="code"?w.code:w.name;o("update:modelValue",b),o("change",b,w)}else console.warn("Detected country code not found in country list:",x)}catch(p){const i=p instanceof Error?p:new Error(String(p));console.warn("Failed to detect country from IP:",i),o("ip-detect-error",i)}}},k=e.ref();return e.onMounted(async()=>{await e.nextTick(),n.autoDetectFromIp&&!n.modelValue&&await d();const p=i=>{k.value&&!k.value.contains(i.target)&&m()};document.addEventListener("click",p),e.onUnmounted(()=>{document.removeEventListener("click",p)})}),a({detectCountryFromIp:d,allCountries:e.readonly(s),sortedCountries:e.readonly(f)}),(p,i)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"containerRef",ref:k,class:"country-select-container relative"},[e.createElementVNode("div",{onClick:g,class:e.normalizeClass(["w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-[#1a1a1a] focus:border-[#1a1a1a] transition-colors duration-200 cursor-pointer bg-white flex items-center justify-between",t.customClass,{"opacity-60 cursor-not-allowed":t.disabled}]),tabindex:t.disabled?-1:0,onKeydown:[e.withKeys(g,["enter"]),e.withKeys(g,["space"]),e.withKeys(m,["escape"])]},[e.createElementVNode("div",an,[r.value?(e.openBlock(),e.createElementBlock("img",{key:0,src:r.value.flagSvg,alt:r.value.name,class:"w-5 h-4 object-cover rounded-sm",onError:v},null,40,ln)):e.createCommentVNode("",!0),e.createElementVNode("span",{class:e.normalizeClass({"text-gray-500":!r.value&&t.placeholder})},e.toDisplayString(r.value?r.value.name:t.placeholder||"选择国家"),3)]),(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["w-5 h-5 text-gray-400 transition-transform duration-200",{"rotate-180":c.value}]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...i[0]||(i[0]=[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 9l-7 7-7-7"},null,-1)])],2))],42,on),c.value&&!t.disabled?(e.openBlock(),e.createElementBlock("div",cn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,y=>{var x;return e.openBlock(),e.createElementBlock("div",{key:y.code,onClick:w=>h(y),class:e.normalizeClass(["px-3 py-2 hover:bg-gray-50 cursor-pointer flex items-center gap-2 transition-colors",{"bg-gray-100":((x=r.value)==null?void 0:x.code)===y.code}])},[e.createElementVNode("img",{src:y.flagSvg,alt:y.name,class:"w-5 h-4 object-cover rounded-sm flex-shrink-0",onError:w=>v(w,y)},null,40,gn),e.createElementVNode("span",null,e.toDisplayString(y.name),1)],10,sn)}),128))])):e.createCommentVNode("",!0),c.value&&!t.disabled?(e.openBlock(),e.createElementBlock("div",{key:1,class:"fixed inset-0 z-[9998]",onClick:m})):e.createCommentVNode("",!0)],512))}}),dn=M(rn,[["__scopeId","data-v-08b31f1b"]]),fn=["tabindex","aria-expanded","aria-labelledby"],mn={class:"flex items-center gap-2 min-h-0 flex-1"},pn={key:0,class:"text-gray-500"},hn={key:1,class:"flex flex-wrap gap-1"},un={key:0,class:"text-gray-900"},vn=["onClick"],bn={key:0,class:"absolute z-[9999] w-full mt-2 bg-white rounded-xl shadow-xl border border-gray-100/50 max-h-60 overflow-auto backdrop-blur-sm",role:"listbox"},wn={key:0,class:"p-3 border-b border-gray-50/80"},yn={class:"py-1"},Cn={key:0,class:"px-4 py-3 text-sm text-gray-400 text-center"},xn=["onClick","onKeydown","aria-selected"],kn={class:"flex items-center gap-3"},En={key:0,class:"flex items-center"},Sn={key:0,class:"bi bi-check text-[#1a1a1a] text-xs"},Pn={key:1,class:"flex items-center"},jn={key:0,class:"w-1.5 h-1.5 bg-white rounded-full"},Bn={class:"flex-1"},Mn=e.defineComponent({__name:"index",props:{modelValue:{},options:{},placeholder:{default:"请选择..."},multiple:{type:Boolean,default:!1},searchable:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},labelKey:{default:"label"},valueKey:{default:"value"},noOptionsText:{default:"暂无选项"},clearable:{type:Boolean,default:!1},borderless:{type:Boolean,default:!1},width:{default:"200px"}},emits:["update:modelValue","change","open","close"],setup(t,{expose:a,emit:l}){const n=t,o=l,c=e.ref(!1),s=e.ref(""),r=e.ref(),f=e.ref(),g=e.computed(()=>!n.searchable||!s.value?n.options:n.options.filter(u=>k(u).toLowerCase().includes(s.value.toLowerCase()))),m=e.computed(()=>n.multiple?null:n.options.find(u=>p(u)===n.modelValue)||null),h=e.computed(()=>n.multiple?Array.isArray(n.modelValue)?n.options.filter(u=>n.modelValue.includes(p(u))):[]:[]),v=e.computed(()=>n.multiple?h.value.length>0:m.value!==null),d=e.computed(()=>`select-label-${Math.random().toString(36).substr(2,9)}`),k=u=>typeof u=="object"?u[n.labelKey]:u,p=u=>typeof u=="object"?u[n.valueKey]:u,i=u=>{const E=p(u);return n.multiple?Array.isArray(n.modelValue)&&n.modelValue.includes(E):n.modelValue===E},y=u=>{if(u.disabled)return;const E=p(u);if(n.multiple){const C=Array.isArray(n.modelValue)?[...n.modelValue]:[],P=C.indexOf(E);P>-1?C.splice(P,1):C.push(E),o("update:modelValue",C),o("change",C)}else o("update:modelValue",E),o("change",E),j()},x=u=>{if(!n.multiple)return;const E=p(u),C=Array.isArray(n.modelValue)?[...n.modelValue]:[],P=C.indexOf(E);P>-1&&(C.splice(P,1),o("update:modelValue",C),o("change",C))},w=()=>{n.disabled||(c.value?j():b())},b=()=>{c.value=!0,o("open"),e.nextTick(()=>{n.searchable&&f.value&&f.value.focus()})},j=()=>{c.value=!1,s.value="",o("close")},S=u=>{r.value&&!r.value.contains(u.target)&&j()},B=u=>{if(!c.value)return;const E=g.value,C=E.findIndex(P=>i(P));switch(u.key){case"ArrowDown":u.preventDefault();break;case"ArrowUp":u.preventDefault();break;case"Enter":case" ":u.preventDefault(),C>=0&&E[C]&&y(E[C]);break}};return e.onMounted(()=>{document.addEventListener("click",S),document.addEventListener("keydown",B)}),e.onUnmounted(()=>{document.removeEventListener("click",S),document.removeEventListener("keydown",B)}),a({open:b,close:j,toggle:w}),(u,E)=>(e.openBlock(),e.createElementBlock("div",{class:"relative",style:e.normalizeStyle({width:t.width}),ref_key:"selectContainer",ref:r},[e.createElementVNode("div",{onClick:w,onKeydown:[e.withKeys(w,["enter"]),e.withKeys(w,["space"]),e.withKeys(j,["escape"])],class:e.normalizeClass(["flex items-center justify-between w-full px-4 py-1.5 text-sm bg-white rounded-md cursor-pointer transition-all duration-200 border ","focus:outline-none focus:ring-2 focus:ring-[#1a1a1a]/50 focus:ring-offset-1",{"shadow-sm hover:shadow-md border border-gray-200/60 hover:border-gray-300/80":!t.disabled&&!t.borderless,"shadow-sm hover:shadow-md":!t.disabled&&t.borderless,"bg-gray-50/50 cursor-not-allowed border border-gray-100":t.disabled,"ring-1 ring-[#1a1a1a]/50 border-[#1a1a1a]/50 shadow-md":c.value&&!t.borderless,"ring-1 ring-[#1a1a1a]/50 shadow-md":c.value&&t.borderless}]),tabindex:t.disabled?-1:0,role:"combobox","aria-expanded":c.value,"aria-haspopup":!0,"aria-labelledby":d.value},[e.createElementVNode("div",mn,[t.placeholder&&!v.value?(e.openBlock(),e.createElementBlock("span",pn,e.toDisplayString(t.placeholder),1)):(e.openBlock(),e.createElementBlock("div",hn,[t.multiple?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(h.value,C=>(e.openBlock(),e.createElementBlock("span",{key:p(C),class:"inline-flex items-center gap-1.5 px-2.5 py-1 text-xs bg-[#FFF] text-[#1a1a1a] rounded-full border border-[#1a1a1a]/50"},[e.createTextVNode(e.toDisplayString(k(C))+" ",1),e.createElementVNode("button",{onClick:e.withModifiers(P=>x(C),["stop"]),class:"rounded-full p-0.5 transition-colors duration-150",type:"button"},[...E[1]||(E[1]=[e.createElementVNode("i",{class:"bi bi-x text-xs text-[#1a1a1a]"},null,-1)])],8,vn)]))),128)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[m.value?(e.openBlock(),e.createElementBlock("span",un,e.toDisplayString(k(m.value)),1)):e.createCommentVNode("",!0)],64))]))]),e.createElementVNode("i",{class:e.normalizeClass(["bi text-gray-400 transition-transform duration-200 text-lg",{"bi-chevron-down":!c.value,"bi-chevron-up":c.value}])},null,2)],42,fn),e.createVNode(e.Transition,{"enter-active-class":"transition ease-out duration-200","enter-from-class":"opacity-0 scale-95","enter-to-class":"opacity-100 scale-100","leave-active-class":"transition ease-in duration-150","leave-from-class":"opacity-100 scale-100","leave-to-class":"opacity-0 scale-95"},{default:e.withCtx(()=>[c.value?(e.openBlock(),e.createElementBlock("div",bn,[t.searchable?(e.openBlock(),e.createElementBlock("div",wn,[e.withDirectives(e.createElementVNode("input",{ref_key:"searchInput",ref:f,"onUpdate:modelValue":E[0]||(E[0]=C=>s.value=C),type:"text",class:"w-full px-3 py-2 text-sm bg-gray-50/50 border border-gray-200/60 rounded-lg focus:outline-none focus:ring-1 focus:ring-[#1a1a1a]/50 focus:border-[#1a1a1a]/50 transition-all duration-200",placeholder:"搜索...",onKeydown:e.withKeys(j,["escape"])},null,544),[[e.vModelText,s.value]])])):e.createCommentVNode("",!0),e.createElementVNode("div",yn,[g.value.length===0?(e.openBlock(),e.createElementBlock("div",Cn,e.toDisplayString(t.noOptionsText),1)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,C=>(e.openBlock(),e.createElementBlock("div",{key:p(C),onClick:P=>y(C),onKeydown:[e.withKeys(P=>y(C),["enter"]),e.withKeys(P=>y(C),["space"])],class:e.normalizeClass(["px-4 py-3 text-sm cursor-pointer transition-all duration-150",{"bg-[#f2f2f2] text-[#1a1a1a] font-medium":i(C),"hover:bg-[#f2f2f2] text-gray-700":!i(C)}]),role:"option","aria-selected":i(C),tabindex:0},[e.createElementVNode("div",kn,[t.multiple?(e.openBlock(),e.createElementBlock("div",En,[e.createElementVNode("div",{class:e.normalizeClass(["w-4 h-4 rounded border flex items-center justify-center transition-all duration-150",{"border-[#1a1a1a] text-white":i(C),"border-gray-300 bg-white":!i(C)}])},[i(C)?(e.openBlock(),e.createElementBlock("i",Sn)):e.createCommentVNode("",!0)],2)])):(e.openBlock(),e.createElementBlock("div",Pn,[e.createElementVNode("div",{class:e.normalizeClass(["w-4 h-4 rounded-full border-2 flex items-center justify-center transition-all duration-150",{"border-[#1a1a1a] bg-[#1a1a1a]":i(C),"border-gray-300 bg-white":!i(C)}])},[i(C)?(e.openBlock(),e.createElementBlock("div",jn)):e.createCommentVNode("",!0)],2)])),e.createElementVNode("span",Bn,e.toDisplayString(k(C)),1)])],42,xn))),128))])])):e.createCommentVNode("",!0)]),_:1})],4))}}),An=M(Mn,[["__scopeId","data-v-1f7381d8"]]),Vn=["type","value","placeholder","disabled","readonly","required","maxlength","minlength","autocomplete"],In={key:2,class:"x-input-count"},Nn=e.defineComponent({__name:"index",props:{modelValue:{},type:{default:"text"},placeholder:{default:""},label:{default:""},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},showWordLimit:{type:Boolean,default:!1},maxlength:{},minlength:{},autocomplete:{default:"off"},error:{type:Boolean,default:!1},width:{default:"100%"}},emits:["update:modelValue","input","change","blur","focus","clear","keydown","keyup"],setup(t,{expose:a,emit:l}){const n=t,o=l,c=e.ref(),s=e.ref(!1),r=e.computed(()=>!!n.label),f=e.computed(()=>{const b=n.modelValue;return b!=null&&b!==""}),g=e.computed(()=>String(n.modelValue||"").length),m=b=>{const S=b.target.value;o("update:modelValue",S),o("input",S,b)},h=b=>{const S=b.target.value;o("change",S,b)},v=b=>{s.value=!1,o("blur",b)},d=b=>{s.value=!0,o("focus",b)},k=b=>{o("keydown",b)},p=b=>{o("keyup",b)},i=()=>{var b;o("update:modelValue",""),o("clear"),(b=c.value)==null||b.focus()};return a({focus:()=>{var b;(b=c.value)==null||b.focus()},blur:()=>{var b;(b=c.value)==null||b.blur()},select:()=>{var b;(b=c.value)==null||b.select()},ref:c}),(b,j)=>(e.openBlock(),e.createElementBlock("div",{class:"x-input-group",style:e.normalizeStyle({width:t.width})},[e.createElementVNode("input",{ref_key:"inputRef",ref:c,type:t.type,value:t.modelValue,placeholder:r.value?"":t.placeholder,disabled:t.disabled,readonly:t.readonly,required:t.required,maxlength:t.maxlength,minlength:t.minlength,autocomplete:t.autocomplete,class:e.normalizeClass(["x-input",{"x-input--disabled":t.disabled,"x-input--error":t.error,"x-input--clearable":t.clearable&&t.modelValue,"x-input--with-label":r.value}]),onInput:m,onBlur:v,onFocus:d,onKeydown:k,onKeyup:p,onChange:h},null,42,Vn),t.label?(e.openBlock(),e.createElementBlock("label",{key:0,class:e.normalizeClass(["x-input-label",{"x-input-label--active":s.value||f.value,"x-input-label--error":t.error}])},e.toDisplayString(t.label),3)):e.createCommentVNode("",!0),t.clearable&&t.modelValue&&!t.disabled?(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:"x-input-clear",onClick:i,onMousedown:j[0]||(j[0]=e.withModifiers(()=>{},["prevent"]))},[e.createVNode(e.unref(V),{icon:"bi:x-circle"})],32)):e.createCommentVNode("",!0),t.showWordLimit&&t.maxlength?(e.openBlock(),e.createElementBlock("div",In,e.toDisplayString(g.value)+" / "+e.toDisplayString(t.maxlength),1)):e.createCommentVNode("",!0)],4))}}),Tn=M(Nn,[["__scopeId","data-v-d7d149e3"]]),$n={class:"x-checkboxes"},Ln=["onClick"],zn={class:"checkbox-wrapper"},Xn=["checked","disabled","onChange"],Dn={class:"checkbox-custom"},Fn={key:0,class:"check-icon",viewBox:"0 0 24 24"},On={class:"option-label"},Rn=e.defineComponent({__name:"index",props:{options:{},modelValue:{default:()=>[]},placeholder:{default:"请选择选项"},maxSelections:{default:0},disabled:{type:Boolean,default:!1},layout:{default:"vertical"},columns:{default:3}},emits:["update:modelValue","change"],setup(t,{expose:a,emit:l}){const n=t,o=l,c=h=>n.modelValue&&n.modelValue.includes(h),s=h=>{if(n.disabled)return;const v=n.options.find(p=>p.value===h);if(v!=null&&v.disabled)return;const d=[...n.modelValue],k=d.indexOf(h);if(k>-1)d.splice(k,1);else{if(n.maxSelections>0&&d.length>=n.maxSelections)return;d.push(h)}o("update:modelValue",d),o("change",d)},r=h=>{!n.disabled&&!h.disabled&&s(h.value)};return a({clearAll:()=>{n.disabled||(o("update:modelValue",[]),o("change",[]))},selectAll:()=>{if(n.disabled)return;const v=n.options.filter(d=>!d.disabled).map(d=>d.value);n.maxSelections>0?(o("update:modelValue",v.slice(0,n.maxSelections)),o("change",v.slice(0,n.maxSelections))):(o("update:modelValue",v),o("change",v))},removeOption:h=>{s(h)}}),(h,v)=>(e.openBlock(),e.createElementBlock("div",$n,[e.createElementVNode("div",{class:e.normalizeClass(["options-container",[`options-container--${t.layout}`,{"options-container--disabled":t.disabled}]]),style:e.normalizeStyle(t.layout==="grid"?{gridTemplateColumns:`repeat(${t.columns}, 1fr)`}:{})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.options,d=>(e.openBlock(),e.createElementBlock("div",{key:d.value,class:e.normalizeClass(["option-item",{"option-selected":c(d.value),"option-disabled":t.disabled||d.disabled}]),onClick:k=>r(d)},[e.createElementVNode("div",zn,[e.createElementVNode("input",{type:"checkbox",checked:c(d.value),disabled:t.disabled||d.disabled,onChange:e.withModifiers(k=>s(d.value),["stop"]),class:"checkbox-input"},null,40,Xn),e.createElementVNode("div",Dn,[c(d.value)?(e.openBlock(),e.createElementBlock("svg",Fn,[...v[0]||(v[0]=[e.createElementVNode("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"},null,-1)])])):e.createCommentVNode("",!0)])]),e.createElementVNode("span",On,e.toDisplayString(d.label),1)],10,Ln))),128))],6)]))}}),_n=M(Rn,[["__scopeId","data-v-05984fcf"]]),Gn=["onClick","disabled","aria-expanded","aria-controls"],Kn={class:"accordion-title"},Wn={class:"accordion-icon"},Hn=["id"],qn={class:"accordion-body"},Un=e.defineComponent({__name:"index",props:{items:{},allowMultiple:{type:Boolean,default:!1},defaultOpen:{default:()=>[]},bordered:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1}},emits:["change","item-click"],setup(t,{expose:a,emit:l}){const n=t,o=l,c=e.ref(new Set(n.defaultOpen)),s=e.ref({}),r=e.ref({}),f=(p,i)=>{p&&(r.value[i]=p,e.nextTick(()=>{const y=p.querySelector(".accordion-body");y&&(s.value[i]=y.scrollHeight)}))},g=p=>{var y;if(n.disabled||(y=n.items[p])!=null&&y.disabled)return;const i=c.value.has(p);n.allowMultiple?i?c.value.delete(p):c.value.add(p):i?c.value.clear():(c.value.clear(),c.value.add(p)),o("item-click",p,!i),o("change",Array.from(c.value))},m=p=>c.value.has(p);return e.watch(()=>n.defaultOpen,p=>{c.value=new Set(p)},{deep:!0}),e.watch(()=>n.items,()=>{e.nextTick(()=>{Object.keys(r.value).forEach(p=>{const i=parseInt(p),y=r.value[i];if(y){const x=y.querySelector(".accordion-body");x&&(s.value[i]=x.scrollHeight)}})})},{deep:!0}),a({openItem:p=>{var i;!n.disabled&&!((i=n.items[p])!=null&&i.disabled)&&(c.value.has(p)||(n.allowMultiple||c.value.clear(),c.value.add(p),o("change",Array.from(c.value))))},closeItem:p=>{c.value.has(p)&&(c.value.delete(p),o("change",Array.from(c.value)))},openAll:()=>{n.allowMultiple&&!n.disabled&&(n.items.forEach((p,i)=>{p.disabled||c.value.add(i)}),o("change",Array.from(c.value)))},closeAll:()=>{c.value.clear(),o("change",[])},toggle:g}),(p,i)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["accordion-container",{"accordion-container--bordered":t.bordered}])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,(y,x)=>(e.openBlock(),e.createElementBlock("div",{key:y.id||x,class:e.normalizeClass(["accordion-item",{"is-open":m(x),"is-disabled":t.disabled||y.disabled}])},[e.createElementVNode("button",{onClick:w=>g(x),class:"accordion-header",disabled:t.disabled||y.disabled,"aria-expanded":m(x),"aria-controls":`accordion-content-${x}`},[e.createElementVNode("span",Kn,e.toDisplayString(y.title),1),e.createElementVNode("div",Wn,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["accordion-arrow",{"accordion-arrow--rotate":m(x)}]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:"2"},[...i[0]||(i[0]=[e.createElementVNode("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"},null,-1)])],2))])],8,Gn),e.createElementVNode("div",{id:`accordion-content-${x}`,class:"accordion-content",style:e.normalizeStyle({maxHeight:m(x)?`${s.value[x]}px`:"0px"}),ref_for:!0,ref:w=>f(w,x)},[e.createElementVNode("div",qn,e.toDisplayString(y.content),1)],12,Hn)],2))),128))],2))}}),Yn=M(Un,[["__scopeId","data-v-c5fef037"]]),Qn={class:"thumbnail-container-wrapper relative"},Zn=["onMouseenter","onClick"],Jn=["src","alt"],eo={class:"thumbnail-index"},to=e.defineComponent({__name:"index",props:{images:{default:()=>[]},modelValue:{default:0},autoScroll:{type:Boolean,default:!0},showIndex:{type:Boolean,default:!0}},emits:["update:modelValue","change","hover"],setup(t,{expose:a,emit:l}){const n=t,o=l,c=e.ref(n.modelValue),s=e.ref(null),r=e.ref([]),f=e.ref(!1),g=e.ref(!1),m=e.ref(0),h=e.ref(!1),v=e.ref(!1),d=()=>{j()},k=(u,E)=>{u&&u instanceof HTMLElement&&(r.value[E]=u)},p=u=>{o("hover",u)},i=()=>{},y=u=>{c.value=u,o("update:modelValue",u),o("change",u),n.autoScroll&&e.nextTick(()=>{b(u),setTimeout(()=>{j()},300)})},x=()=>{if(!s.value)return;const u=s.value,E=u.clientWidth*.8;u.scrollBy({left:-E,behavior:"smooth"})},w=()=>{if(!s.value)return;const u=s.value,E=u.clientWidth*.8;u.scrollBy({left:E,behavior:"smooth"})},b=u=>{if(!s.value||r.value.length===0)return;const E=s.value,C=r.value[u];if(!C)return;const P=2,Se=C.offsetWidth+8;let L=0;u>=P&&(L=(u-P)*Se);const Pe=E.scrollWidth-E.clientWidth;L=Math.max(0,Math.min(L,Pe)),E.scrollTo({left:L,behavior:"smooth"})},j=()=>{if(!s.value)return;const u=s.value,E=u.scrollLeft,C=u.scrollWidth-u.clientWidth;f.value=E>0,g.value=E<C,C>0?m.value=E/C*100:m.value=0;const P=S();h.value=n.images.length>P&&f.value,v.value=n.images.length>P&&g.value},S=()=>{var _;if(!s.value||r.value.length===0)return 4;const E=s.value.clientWidth-32,A=(((_=r.value[0])==null?void 0:_.offsetWidth)||80)+12;return Math.floor(E/A)},B=u=>{u>=0&&u<n.images.length&&y(u)};return e.watch(()=>n.modelValue,u=>{u!==void 0&&u!==c.value&&(c.value=u,n.autoScroll&&e.nextTick(()=>{b(u)}))}),e.watch(()=>n.images,()=>{e.nextTick(()=>{j()})},{deep:!0}),e.onMounted(()=>{e.nextTick(()=>{j()})}),a({setCurrentIndex:B,scrollLeft:x,scrollRight:w,updateScrollState:j}),(u,E)=>(e.openBlock(),e.createElementBlock("div",Qn,[h.value?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:x,class:"scroll-arrow scroll-arrow-left","aria-label":"向左滚动"},[...E[1]||(E[1]=[e.createElementVNode("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e.createElementVNode("path",{d:"M15 18l-6-6 6-6"})],-1)])])):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"thumbnailContainer",ref:s,onScroll:d,class:"thumbnail-scroll-container"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.images,(C,P)=>(e.openBlock(),e.createElementBlock("div",{key:P,ref_for:!0,ref:A=>k(A,P),onMouseenter:A=>p(P),onMouseleave:E[0]||(E[0]=A=>i()),onClick:A=>y(P),class:e.normalizeClass(["thumbnail-item",{"thumbnail-item--active":c.value===P,"thumbnail-item--inactive":c.value!==P}])},[e.createElementVNode("img",{src:C,alt:`缩略图 ${P+1}`,class:e.normalizeClass(["thumbnail-image",{"thumbnail-image--active":c.value===P,"thumbnail-image--inactive":c.value!==P}])},null,10,Jn),e.createElementVNode("div",eo,e.toDisplayString(P+1),1)],42,Zn))),128))],544),v.value?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:w,class:"scroll-arrow scroll-arrow-right","aria-label":"向右滚动"},[...E[2]||(E[2]=[e.createElementVNode("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e.createElementVNode("path",{d:"M9 18l6-6-6-6"})],-1)])])):e.createCommentVNode("",!0)]))}}),no=M(to,[["__scopeId","data-v-809b97a6"]]),oo=e.defineComponent({__name:"index",props:{width:{default:"100%"},height:{default:"1rem"},shape:{default:"rectangle"},animated:{type:Boolean,default:!0},loading:{type:Boolean,default:!0},class:{default:""},style:{default:()=>({})}},setup(t){const a=t,l=e.computed(()=>typeof a.width=="string"?a.width.includes("%")||a.width.includes("px")||a.width.includes("rem")?"":`w-${a.width}`:""),n=e.computed(()=>typeof a.height=="string"?a.height.includes("%")||a.height.includes("px")||a.height.includes("rem")?"":`h-${a.height}`:""),o=e.computed(()=>{switch(a.shape){case"circle":return"rounded-full";case"rounded":return"rounded-lg";default:return"rounded"}}),c=e.computed(()=>a.class),s=e.computed(()=>{const r={...a.style};return typeof a.width=="string"&&(a.width.includes("%")||a.width.includes("px")||a.width.includes("rem"))?r.width=a.width:typeof a.width=="number"&&(r.width=`${a.width}px`),typeof a.height=="string"&&(a.height.includes("%")||a.height.includes("px")||a.height.includes("rem"))?r.height=a.height:typeof a.height=="number"&&(r.height=`${a.height}px`),r});return(r,f)=>t.loading?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["bg-gray-200",[l.value,n.value,o.value,c.value,{"animate-pulse":t.animated}]]),style:e.normalizeStyle(s.value)},null,6)):e.renderSlot(r.$slots,"default",{key:1},void 0,!0)}}),ao=M(oo,[["__scopeId","data-v-db4a4465"]]),lo={key:0,class:"modal-header"},co={class:"modal-title"},so={class:"modal-body"},go={key:1,class:"modal-footer"},io=["disabled"],ro={key:0,class:"loading-spinner"},fo=e.defineComponent({__name:"index",props:{visible:{type:Boolean,default:!1},title:{default:"提示"},width:{},size:{default:"medium"},fullscreen:{type:Boolean,default:!1},showHeader:{type:Boolean,default:!0},showFooter:{type:Boolean,default:!0},showClose:{type:Boolean,default:!0},showCancel:{type:Boolean,default:!0},showConfirm:{type:Boolean,default:!0},cancelText:{default:"取消"},confirmText:{default:"确定"},confirmLoading:{type:Boolean,default:!1},maskClosable:{type:Boolean,default:!0},escClosable:{type:Boolean,default:!0}},emits:["update:visible","close","cancel","confirm","opened","closed"],setup(t,{expose:a,emit:l}){const n=t,o=l,c=()=>{o("update:visible",!1),o("close")},s=()=>{o("cancel"),o("update:visible",!1)},r=()=>{o("confirm")},f=()=>{n.maskClosable&&c()},g=m=>{m.key==="Escape"&&n.escClosable&&n.visible&&c()};return e.watch(()=>n.visible,m=>{m?(document.addEventListener("keydown",g),document.body.style.overflow="hidden",o("opened")):(document.removeEventListener("keydown",g),document.body.style.overflow="",o("closed"))}),a({close:c}),(m,h)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{"enter-active-class":"transition-opacity duration-300","enter-from-class":"opacity-0","enter-to-class":"opacity-100","leave-active-class":"transition-opacity duration-300","leave-from-class":"opacity-100","leave-to-class":"opacity-0"},{default:e.withCtx(()=>[t.visible?(e.openBlock(),e.createElementBlock("div",{key:0,class:"modal-mask",onClick:f},[e.createVNode(e.Transition,{"enter-active-class":"transition-all duration-300","enter-from-class":"opacity-0 scale-95","enter-to-class":"opacity-100 scale-100","leave-active-class":"transition-all duration-300","leave-from-class":"opacity-100 scale-100","leave-to-class":"opacity-0 scale-95"},{default:e.withCtx(()=>[t.visible?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["modal-container",[`modal-container--${t.size}`,{"modal-container--fullscreen":t.fullscreen}]]),style:e.normalizeStyle({width:t.width}),onClick:h[0]||(h[0]=e.withModifiers(()=>{},["stop"]))},[t.showHeader?(e.openBlock(),e.createElementBlock("div",lo,[e.renderSlot(m.$slots,"header",{},()=>[e.createElementVNode("h3",co,e.toDisplayString(t.title),1)],!0),t.showClose?(e.openBlock(),e.createElementBlock("button",{key:0,class:"modal-close",onClick:c,"aria-label":"关闭"},[...h[1]||(h[1]=[e.createElementVNode("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e.createElementVNode("path",{d:"M18 6L6 18M6 6l12 12"})],-1)])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",so,[e.renderSlot(m.$slots,"default",{},void 0,!0)]),t.showFooter?(e.openBlock(),e.createElementBlock("div",go,[e.renderSlot(m.$slots,"footer",{},()=>[t.showCancel?(e.openBlock(),e.createElementBlock("button",{key:0,class:"modal-btn modal-btn--cancel",onClick:s},e.toDisplayString(t.cancelText),1)):e.createCommentVNode("",!0),t.showConfirm?(e.openBlock(),e.createElementBlock("button",{key:1,class:"modal-btn modal-btn--confirm",onClick:r,disabled:t.confirmLoading},[t.confirmLoading?(e.openBlock(),e.createElementBlock("span",ro)):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(t.confirmText),1)],8,io)):e.createCommentVNode("",!0)],!0)])):e.createCommentVNode("",!0)],6)):e.createCommentVNode("",!0)]),_:3})])):e.createCommentVNode("",!0)]),_:3})]))}}),mo=M(fo,[["__scopeId","data-v-e43c9a70"]]),po={class:"x-tooltip-trigger"},ho={class:"tooltip-label"},uo={class:"tooltip-text"},vo={class:"tooltip-hover-text"},bo=e.defineComponent({__name:"index",props:{content:{},placement:{default:"top"},variant:{default:"basic"},label:{default:"Hover"},hoverText:{default:""}},setup(t){return(a,l)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([t.variant==="basic"?"x-tooltip-wrapper":"x-tooltip-rich-wrapper",t.variant==="rich"&&`rich-${t.placement}`])},[t.variant==="basic"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",po,[e.renderSlot(a.$slots,"default",{},void 0,!0)]),e.createElementVNode("div",{class:e.normalizeClass(["x-tooltip",`tooltip-${t.placement}`])},[e.createTextVNode(e.toDisplayString(t.content)+" ",1),e.createElementVNode("div",{class:e.normalizeClass(["tooltip-arrow",`arrow-${t.placement}`])},null,2)],2)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("span",ho,e.toDisplayString(t.label),1),e.createElementVNode("span",uo,e.toDisplayString(t.content),1),e.createElementVNode("span",vo,e.toDisplayString(t.hoverText||t.label),1)],64))],2))}}),wo=M(bo,[["__scopeId","data-v-6d3b782b"]]),ke=()=>{const t=()=>{let g=document.getElementById("xl-message-container");return g||(g=document.createElement("div"),g.id="xl-message-container",g.style.cssText=`
|
2
2
|
position: fixed;
|
3
3
|
top: 20px;
|
4
4
|
right: 20px;
|
@@ -6,10 +6,10 @@
|
|
6
6
|
display: flex;
|
7
7
|
flex-direction: column;
|
8
8
|
gap: 10px;
|
9
|
-
`,document.body.appendChild(g)),g},a=g=>{const
|
10
|
-
background-color: ${
|
11
|
-
border: 1px solid ${
|
12
|
-
color: ${
|
9
|
+
`,document.body.appendChild(g)),g},a=g=>{const m={success:{bgColor:"#f0fdf4",borderColor:"#86efac",textColor:"#166534",iconColor:"#22c55e",iconSvg:'<svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/></svg>'},error:{bgColor:"#fef2f2",borderColor:"#fca5a5",textColor:"#991b1b",iconColor:"#ef4444",iconSvg:'<svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"/></svg>'},warning:{bgColor:"#fefce8",borderColor:"#fde047",textColor:"#854d0e",iconColor:"#eab308",iconSvg:'<svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor"><path d="M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"/></svg>'},info:{bgColor:"#f8fafc",borderColor:"#cbd5e1",textColor:"#1e293b",iconColor:"#64748b",iconSvg:'<svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"/></svg>'}};return m[g]||m.info},l=g=>{const m=t(),h=g.type||"info",v=g.duration!==void 0?g.duration:3e3,d=a(h),k=`xl-msg-${Date.now()}-${Math.random().toString(36).substr(2,9)}`,p=document.createElement("div");p.id=k,p.style.cssText=`
|
10
|
+
background-color: ${d.bgColor};
|
11
|
+
border: 1px solid ${d.borderColor};
|
12
|
+
color: ${d.textColor};
|
13
13
|
border-radius: 12px;
|
14
14
|
padding: 16px;
|
15
15
|
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
|
@@ -18,19 +18,19 @@
|
|
18
18
|
opacity: 0;
|
19
19
|
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
20
20
|
pointer-events: auto;
|
21
|
-
`,
|
21
|
+
`,p.innerHTML=`
|
22
22
|
<div style="display: flex; align-items: flex-start; gap: 12px;">
|
23
|
-
<div style="flex-shrink: 0; color: ${
|
24
|
-
${
|
23
|
+
<div style="flex-shrink: 0; color: ${d.iconColor}; margin-top: 2px;">
|
24
|
+
${d.iconSvg}
|
25
25
|
</div>
|
26
26
|
<div style="flex: 1; min-width: 0;">
|
27
|
-
<div style="font-size: 14px; font-weight: 500; line-height: 1.5; color: ${
|
27
|
+
<div style="font-size: 14px; font-weight: 500; line-height: 1.5; color: ${d.textColor};">
|
28
28
|
${g.title}
|
29
29
|
</div>
|
30
|
-
${g.content?`<div style="margin-top: 4px; font-size: 13px; line-height: 1.5; color: ${
|
30
|
+
${g.content?`<div style="margin-top: 4px; font-size: 13px; line-height: 1.5; color: ${d.textColor}; opacity: 0.8;">${g.content}</div>`:""}
|
31
31
|
</div>
|
32
32
|
<button
|
33
|
-
style="flex-shrink: 0; background: none; border: none; padding: 4px; cursor: pointer; color: ${
|
33
|
+
style="flex-shrink: 0; background: none; border: none; padding: 4px; cursor: pointer; color: ${d.textColor}; opacity: 0.5; border-radius: 4px; transition: all 0.15s; display: flex; align-items: center; justify-content: center;"
|
34
34
|
onmouseover="this.style.opacity='1'; this.style.backgroundColor='rgba(0,0,0,0.05)';"
|
35
35
|
onmouseout="this.style.opacity='0.5'; this.style.backgroundColor='transparent';"
|
36
36
|
onclick="document.getElementById('${k}')?.remove()"
|
@@ -40,7 +40,7 @@
|
|
40
40
|
</svg>
|
41
41
|
</button>
|
42
42
|
</div>
|
43
|
-
`,
|
43
|
+
`,m.appendChild(p),requestAnimationFrame(()=>{requestAnimationFrame(()=>{p.style.transform="translateX(0)",p.style.opacity="1"})}),v>0&&setTimeout(()=>{n(k)},v)},n=g=>{const m=document.getElementById(g);m&&(m.style.transform="translateX(100%)",m.style.opacity="0",setTimeout(()=>{m.parentNode&&m.parentNode.removeChild(m)},300))};return{show:l,confirm:g=>{const m=g.type||"info",h=a(m),v=`xl-confirm-${Date.now()}`,d=document.createElement("div");d.id=v,d.style.cssText=`
|
44
44
|
position: fixed;
|
45
45
|
inset: 0;
|
46
46
|
z-index: 9999;
|
@@ -65,8 +65,8 @@
|
|
65
65
|
">
|
66
66
|
<div style="padding: 24px;">
|
67
67
|
<div style="display: flex; align-items: flex-start; gap: 16px; margin-bottom: 20px;">
|
68
|
-
<div style="flex-shrink: 0; color: ${
|
69
|
-
${
|
68
|
+
<div style="flex-shrink: 0; color: ${h.iconColor}; margin-top: 2px;">
|
69
|
+
${h.iconSvg}
|
70
70
|
</div>
|
71
71
|
<div style="flex: 1;">
|
72
72
|
<h3 style="font-size: 18px; font-weight: 600; color: #1a1a1a; line-height: 1.5; margin: 0;">
|
@@ -125,4 +125,71 @@
|
|
125
125
|
</div>
|
126
126
|
</div>
|
127
127
|
</div>
|
128
|
-
`;
|
128
|
+
`;d.innerHTML=k,document.body.appendChild(d),requestAnimationFrame(()=>{d.style.opacity="1";const w=d.querySelector(".xl-confirm-dialog");w&&requestAnimationFrame(()=>{w.style.transform="scale(1)",w.style.opacity="1"})});const p=d.querySelector(".xl-confirm-ok"),i=d.querySelector(".xl-confirm-cancel"),y=()=>{const w=d.querySelector(".xl-confirm-dialog");w&&(w.style.transform="scale(0.95)",w.style.opacity="0"),d.style.opacity="0",setTimeout(()=>{d.parentNode&&d.parentNode.removeChild(d)},300)};p==null||p.addEventListener("click",()=>{var w;(w=g.onConfirm)==null||w.call(g),y()}),i==null||i.addEventListener("click",()=>{var w;(w=g.onCancel)==null||w.call(g),y()}),d.addEventListener("click",w=>{var b;w.target===d&&((b=g.onCancel)==null||b.call(g),y())});const x=w=>{var b;w.key==="Escape"&&((b=g.onCancel)==null||b.call(g),y(),document.removeEventListener("keydown",x))};document.addEventListener("keydown",x)},success:(g,m,h)=>{l({title:g,content:m,type:"success",duration:h})},error:(g,m,h)=>{l({title:g,content:m,type:"error",duration:h})},warning:(g,m,h)=>{l({title:g,content:m,type:"warning",duration:h})},info:(g,m,h)=>{l({title:g,content:m,type:"info",duration:h})},remove:n}},Ee=()=>{const t=()=>{let f=document.getElementById("xl-alert-container");return f||(f=document.createElement("div"),f.id="xl-alert-container",f.style.cssText=`
|
129
|
+
position: fixed;
|
130
|
+
top: 5%;
|
131
|
+
left: 50%;
|
132
|
+
transform: translate(-50%, -50%);
|
133
|
+
z-index: 10000;
|
134
|
+
display: flex;
|
135
|
+
flex-direction: column;
|
136
|
+
gap: 12px;
|
137
|
+
max-width: 90%;
|
138
|
+
width: 500px;
|
139
|
+
`,document.body.appendChild(f)),f},a=f=>{const g={success:{bgColor:"rgb(240, 253, 244)",darkBgColor:"rgb(20, 83, 45)",borderColor:"rgb(134, 239, 172)",darkBorderColor:"rgb(22, 101, 52)",textColor:"rgb(22, 101, 52)",darkTextColor:"rgb(187, 247, 208)",iconColor:"rgb(34, 197, 94)",iconSvg:`<svg stroke="currentColor" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
140
|
+
<path d="M13 16h-1v-4h1m0-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" stroke-width="2" stroke-linejoin="round" stroke-linecap="round"></path>
|
141
|
+
</svg>`},error:{bgColor:"rgb(254, 242, 242)",darkBgColor:"rgb(127, 29, 29)",borderColor:"rgb(252, 165, 165)",darkBorderColor:"rgb(153, 27, 27)",textColor:"rgb(153, 27, 27)",darkTextColor:"rgb(254, 202, 202)",iconColor:"rgb(239, 68, 68)",iconSvg:`<svg stroke="currentColor" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
142
|
+
<path d="M13 16h-1v-4h1m0-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" stroke-width="2" stroke-linejoin="round" stroke-linecap="round"></path>
|
143
|
+
</svg>`},warning:{bgColor:"rgb(254, 252, 232)",darkBgColor:"rgb(133, 77, 14)",borderColor:"rgb(253, 224, 71)",darkBorderColor:"rgb(161, 98, 7)",textColor:"rgb(133, 77, 14)",darkTextColor:"rgb(254, 240, 138)",iconColor:"rgb(234, 179, 8)",iconSvg:`<svg stroke="currentColor" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
144
|
+
<path d="M13 16h-1v-4h1m0-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" stroke-width="2" stroke-linejoin="round" stroke-linecap="round"></path>
|
145
|
+
</svg>`},info:{bgColor:"rgb(239, 246, 255)",darkBgColor:"rgb(30, 58, 138)",borderColor:"rgb(147, 197, 253)",darkBorderColor:"rgb(29, 78, 216)",textColor:"rgb(30, 64, 175)",darkTextColor:"rgb(191, 219, 254)",iconColor:"rgb(59, 130, 246)",iconSvg:`<svg stroke="currentColor" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
146
|
+
<path d="M13 16h-1v-4h1m0-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" stroke-width="2" stroke-linejoin="round" stroke-linecap="round"></path>
|
147
|
+
</svg>`}};return g[f]||g.info},l=()=>window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches,n=f=>{const g=t(),m=f.type||"info",h=f.duration!==void 0?f.duration:5e3,v=f.closable!==void 0?f.closable:!0,d=a(m),k=l(),p=`xl-alert-${Date.now()}-${Math.random().toString(36).substr(2,9)}`,i=document.createElement("div");i.id=p,i.setAttribute("role","alert"),i.style.cssText=`
|
148
|
+
background-color: ${k?d.darkBgColor:d.bgColor};
|
149
|
+
border-left: 4px solid ${k?d.darkBorderColor:d.borderColor};
|
150
|
+
color: ${k?d.darkTextColor:d.textColor};
|
151
|
+
padding: 16px;
|
152
|
+
border-radius: 12px;
|
153
|
+
display: flex;
|
154
|
+
align-items: center;
|
155
|
+
transition: all 0.3s ease-in-out;
|
156
|
+
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
|
157
|
+
transform: scale(0.8);
|
158
|
+
opacity: 0;
|
159
|
+
position: relative;
|
160
|
+
`;let y=`
|
161
|
+
<div style="color: ${d.iconColor}; width: 20px; height: 20px; flex-shrink: 0; margin-right: 12px;">
|
162
|
+
${d.iconSvg}
|
163
|
+
</div>
|
164
|
+
<div style="flex: 1;">
|
165
|
+
${f.title?`<p style="font-weight: 600; font-size: 14px; margin-bottom: 4px;">${f.title}</p>`:""}
|
166
|
+
<p style="font-size: ${f.title?"13px":"14px"}; font-weight: ${f.title?"400":"600"};">${f.content}</p>
|
167
|
+
</div>
|
168
|
+
`;v&&(y+=`
|
169
|
+
<button
|
170
|
+
class="xl-alert-close"
|
171
|
+
style="
|
172
|
+
background: transparent;
|
173
|
+
border: none;
|
174
|
+
color: ${k?d.darkTextColor:d.textColor};
|
175
|
+
cursor: pointer;
|
176
|
+
padding: 4px;
|
177
|
+
margin-left: 8px;
|
178
|
+
display: flex;
|
179
|
+
align-items: center;
|
180
|
+
justify-content: center;
|
181
|
+
opacity: 0.6;
|
182
|
+
transition: opacity 0.2s;
|
183
|
+
width: 20px;
|
184
|
+
height: 20px;
|
185
|
+
flex-shrink: 0;
|
186
|
+
"
|
187
|
+
onmouseover="this.style.opacity='1'"
|
188
|
+
onmouseout="this.style.opacity='0.6'"
|
189
|
+
>
|
190
|
+
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
191
|
+
<line x1="18" y1="6" x2="6" y2="18"></line>
|
192
|
+
<line x1="6" y1="6" x2="18" y2="18"></line>
|
193
|
+
</svg>
|
194
|
+
</button>
|
195
|
+
`),i.innerHTML=y;const x=()=>{i.style.transform="scale(0.8)",i.style.opacity="0",setTimeout(()=>{i.parentNode&&g.removeChild(i),g.children.length===0&&document.body.removeChild(g)},300)};if(v){const w=i.querySelector(".xl-alert-close");w&&w.addEventListener("click",x)}return g.appendChild(i),setTimeout(()=>{i.style.transform="scale(1)",i.style.opacity="1"},10),h>0&&setTimeout(x,h),{close:x}};return{show:n,success:(f,g)=>n({content:f,type:"success",...g}),error:(f,g)=>n({content:f,type:"error",...g}),warning:(f,g)=>n({content:f,type:"warning",...g}),info:(f,g)=>n({content:f,type:"info",...g})}};exports.XAccordion=Yn;exports.XButton=Y;exports.XCard=tn;exports.XCheckboxes=_n;exports.XCountrySelect=dn;exports.XInput=Tn;exports.XModal=mo;exports.XSelect=An;exports.XSkeleton=ao;exports.XThumbnailContainer=no;exports.XTooltips=wo;exports.useAlert=Ee;exports.useMsg=ke;exports.xlAlert=Ee;exports.xlMsg=ke;
|