mirror of
https://github.com/wahyd4/cdnjs.git
synced 2026-08-22 11:16:12 +10:00
1 line
2.7 KiB
JavaScript
1 line
2.7 KiB
JavaScript
!function(o){function e(o){throw RangeError(T[o])}function n(o,e){for(var n=o.length,r=[];n--;)r[n]=e(o[n]);return r}function r(o,e){var r=o.split(S);return n(r,function(o){var r=o.split("@");return n(r,e).join("@")}).join(".")}function t(o){for(var e,n,r=[],t=0,u=o.length;u>t;)e=o.charCodeAt(t++),e>=55296&&56319>=e&&u>t?(n=o.charCodeAt(t++),56320==(64512&n)?r.push(((1023&e)<<10)+(1023&n)+65536):(r.push(e),t--)):r.push(e);return r}function u(o){return n(o,function(o){var e="";return o>65535&&(o-=65536,e+=P(o>>>10&1023|55296),o=56320|1023&o),e+=P(o)}).join("")}function i(o){return 10>o-48?o-22:26>o-65?o-65:26>o-97?o-97:b}function f(o,e){return o+22+75*(26>o)-((0!=e)<<5)}function c(o,e,n){var r=0;for(o=n?M(o/m):o>>1,o+=M(o/e);o>L*C>>1;r+=b)o=M(o/L);return M(r+(L+1)*o/(o+j))}function l(o){var n,r,t,f,l,s,d,a,p,h,v=[],g=o.length,w=0,j=I,m=A;for(r=o.lastIndexOf(E),0>r&&(r=0),t=0;r>t;++t)o.charCodeAt(t)>=128&&e("not-basic"),v.push(o.charCodeAt(t));for(f=r>0?r+1:0;g>f;){for(l=w,s=1,d=b;f>=g&&e("invalid-input"),a=i(o.charCodeAt(f++)),(a>=b||a>M((x-w)/s))&&e("overflow"),w+=a*s,p=m>=d?y:d>=m+C?C:d-m,!(p>a);d+=b)h=b-p,s>M(x/h)&&e("overflow"),s*=h;n=v.length+1,m=c(w-l,n,0==l),M(w/n)>x-j&&e("overflow"),j+=M(w/n),w%=n,v.splice(w++,0,j)}return u(v)}function s(o){var n,r,u,i,l,s,d,a,p,h,v,g,w,j,m,F=[];for(o=t(o),g=o.length,n=I,r=0,l=A,s=0;g>s;++s)v=o[s],128>v&&F.push(P(v));for(u=i=F.length,i&&F.push(E);g>u;){for(d=x,s=0;g>s;++s)v=o[s],v>=n&&d>v&&(d=v);for(w=u+1,d-n>M((x-r)/w)&&e("overflow"),r+=(d-n)*w,n=d,s=0;g>s;++s)if(v=o[s],n>v&&++r>x&&e("overflow"),v==n){for(a=r,p=b;h=l>=p?y:p>=l+C?C:p-l,!(h>a);p+=b)m=a-h,j=b-h,F.push(P(f(h+m%j,0))),a=M(m/j);F.push(P(f(a,0))),l=c(r,w,u==i),r=0,++u}++r,++n}return F.join("")}function d(o){return r(o,function(o){return F.test(o)?l(o.slice(4).toLowerCase()):o})}function a(o){return r(o,function(o){return O.test(o)?"xn--"+s(o):o})}var p="object"==typeof exports&&exports&&!exports.nodeType&&exports,h="object"==typeof module&&module&&!module.nodeType&&module,v="object"==typeof global&&global;(v.global===v||v.window===v||v.self===v)&&(o=v);var g,w,x=2147483647,b=36,y=1,C=26,j=38,m=700,A=72,I=128,E="-",F=/^xn--/,O=/[^\x20-\x7E]/,S=/[\x2E\u3002\uFF0E\uFF61]/g,T={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},L=b-y,M=Math.floor,P=String.fromCharCode;if(g={version:"1.3.0",ucs2:{decode:t,encode:u},decode:l,encode:s,toASCII:a,toUnicode:d},"function"==typeof define&&"object"==typeof define.amd&&define.amd)define("punycode",function(){return g});else if(p&&h)if(module.exports==p)h.exports=g;else for(w in g)g.hasOwnProperty(w)&&(p[w]=g[w]);else o.punycode=g}(this); |