import{b as B}from"/vendor/chunk-Z7XRVN22.js";var U=B((y,k)=>{"use strict";var S=/^xn--/,T=/[^\0-\x7F]/,D=/[\x2E\u3002\uFF0E\uFF61]/g,E={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},C=35,u=Math.floor,g=String.fromCharCode;function d(t){throw new RangeError(E[t])}function L(t,n){let o=[],e=t.length;for(;e--;)o[e]=n(t[e]);return o}function I(t,n){let o=t.split("@"),e="";o.length>1&&(e=o[0]+"@",t=o[1]),t=t.replace(D,".");let s=t.split("."),i=L(s,n).join(".");return e+i}function M(t){let n=[],o=0,e=t.length;for(;o<e;){let s=t.charCodeAt(o++);if(s>=55296&&s<=56319&&o<e){let i=t.charCodeAt(o++);(i&64512)==56320?n.push(((s&1023)<<10)+(i&1023)+65536):(n.push(s),o--)}else n.push(s)}return n}var N=t=>String.fromCodePoint(...t),j=function(t){return t>=48&&t<58?26+(t-48):t>=65&&t<91?t-65:t>=97&&t<123?t-97:36},m=function(t,n){return t+22+75*(t<26)-((n!=0)<<5)},v=function(t,n,o){let e=0;for(t=o?u(t/700):t>>1,t+=u(t/n);t>C*26>>1;e+=36)t=u(t/C);return u(e+(C+1)*t/(t+38))},F=function(t){let n=[],o=t.length,e=0,s=128,i=72,l=t.lastIndexOf("-");l<0&&(l=0);for(let c=0;c<l;++c)t.charCodeAt(c)>=128&&d("not-basic"),n.push(t.charCodeAt(c));for(let c=l>0?l+1:0;c<o;){let r=e;for(let a=1,f=36;;f+=36){c>=o&&d("invalid-input");let x=j(t.charCodeAt(c++));x>=36&&d("invalid-input"),x>u((2147483647-e)/a)&&d("overflow"),e+=x*a;let b=f<=i?1:f>=i+26?26:f-i;if(x<b)break;let p=36-b;a>u(2147483647/p)&&d("overflow"),a*=p}let h=n.length+1;i=v(e-r,h,r==0),u(e/h)>2147483647-s&&d("overflow"),s+=u(e/h),e%=h,n.splice(e++,0,s)}return String.fromCodePoint(...n)},A=function(t){let n=[];t=M(t);let o=t.length,e=128,s=0,i=72;for(let r of t)r<128&&n.push(g(r));let l=n.length,c=l;for(l&&n.push("-");c<o;){let r=2147483647;for(let a of t)a>=e&&a<r&&(r=a);let h=c+1;r-e>u((2147483647-s)/h)&&d("overflow"),s+=(r-e)*h,e=r;for(let a of t)if(a<e&&++s>2147483647&&d("overflow"),a===e){let f=s;for(let x=36;;x+=36){let b=x<=i?1:x>=i+26?26:x-i;if(f<b)break;let p=f-b,w=36-b;n.push(g(m(b+p%w,0))),f=u(p/w)}n.push(g(m(f,0))),i=v(s,h,c===l),s=0,++c}++s,++e}return n.join("")},O=function(t){return I(t,function(n){return S.test(n)?F(n.slice(4).toLowerCase()):n})},V=function(t){return I(t,function(n){return T.test(n)?"xn--"+A(n):n})},q={version:"2.3.1",ucs2:{decode:M,encode:N},decode:F,encode:A,toASCII:V,toUnicode:O};k.exports=q});export{U as a};
