import{c as st}from"./earcut.b6f90e68.js";import{q as ct}from"./querystring.776b9ab3.js";var ht={exports:{}};/*! https://mths.be/punycode v1.3.2 by @mathias */(function(s,a){(function(t){var g=a&&!a.nodeType&&a,p=s&&!s.nodeType&&s,d=typeof st=="object"&&st;(d.global===d||d.window===d||d.self===d)&&(t=d);var m,h=2147483647,x=36,y=1,j=26,G=38,b=700,f=72,T=128,k="-",q=/^xn--/,Z=/[^\x20-\x7E]/,r=/[\x2E\u3002\uFF0E\uFF61]/g,c={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},F=x-y,u=Math.floor,v=String.fromCharCode,z;function O(e){throw RangeError(c[e])}function I(e,o){for(var n=e.length,i=[];n--;)i[n]=o(e[n]);return i}function S(e,o){var n=e.split("@"),i="";n.length>1&&(i=n[0]+"@",e=n[1]),e=e.replace(r,".");var l=e.split("."),w=I(l,o).join(".");return i+w}function K(e){for(var o=[],n=0,i=e.length,l,w;n=55296&&l<=56319&&n65535&&(o-=65536,n+=v(o>>>10&1023|55296),o=56320|o&1023),n+=v(o),n}).join("")}function _(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:x}function W(e,o){return e+22+75*(e<26)-((o!=0)<<5)}function X(e,o,n){var i=0;for(e=n?u(e/b):e>>1,e+=u(e/o);e>F*j>>1;i+=x)e=u(e/F);return u(i+(F+1)*e/(e+G))}function V(e){var o=[],n=e.length,i,l=0,w=T,C=f,M,P,D,$,A,N,U,B,J;for(M=e.lastIndexOf(k),M<0&&(M=0),P=0;P=128&&O("not-basic"),o.push(e.charCodeAt(P));for(D=M>0?M+1:0;D=n&&O("invalid-input"),U=_(e.charCodeAt(D++)),(U>=x||U>u((h-l)/A))&&O("overflow"),l+=U*A,B=N<=C?y:N>=C+j?j:N-C,!(Uu(h/J)&&O("overflow"),A*=J;i=o.length+1,C=X(l-$,i,$==0),u(l/i)>h-w&&O("overflow"),w+=u(l/i),l%=i,o.splice(l++,0,w)}return E(o)}function H(e){var o,n,i,l,w,C,M,P,D,$,A,N=[],U,B,J,tt;for(e=K(e),U=e.length,o=T,n=0,w=f,C=0;C=o&&Au((h-n)/B)&&O("overflow"),n+=(M-o)*B,o=M,C=0;Ch&&O("overflow"),A==o){for(P=n,D=x;$=D<=w?y:D>=w+j?j:D-w,!(P<$);D+=x)tt=P-$,J=x-$,N.push(v(W($+tt%J,0))),P=u(tt/J);N.push(v(W(P,0))),w=X(n,B,i==l),n=0,++i}++n,++o}return N.join("")}function ft(e){return S(e,function(o){return q.test(o)?V(o.slice(4).toLowerCase()):o})}function ut(e){return S(e,function(o){return Z.test(o)?"xn--"+H(o):o})}if(m={version:"1.3.2",ucs2:{decode:K,encode:E},decode:V,encode:H,toASCII:ut,toUnicode:ft},g&&p)if(s.exports==g)p.exports=m;else for(z in m)m.hasOwnProperty(z)&&(g[z]=m[z]);else t.punycode=m})(st)})(ht,ht.exports);var lt={isString:function(s){return typeof s=="string"},isObject:function(s){return typeof s=="object"&&s!==null},isNull:function(s){return s===null},isNullOrUndefined:function(s){return s==null}},pt=ht.exports,L=lt,Ft=Q,jt=Ot,It=qt;function R(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var mt=/^([a-z0-9.+-]+:)/i,xt=/:[0-9]*$/,gt=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,dt=["<",">",'"',"`"," ","\r",` `," "],yt=["{","}","|","\\","^","`"].concat(dt),et=["'"].concat(yt),nt=["%","/","?",";","#"].concat(et),at=["/","?","#"],bt=255,it=/^[+a-z0-9A-Z_-]{0,63}$/,vt=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Ct={javascript:!0,"javascript:":!0},rt={javascript:!0,"javascript:":!0},Y={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},ot=ct;function Q(s,a,t){if(s&&L.isObject(s)&&s instanceof R)return s;var g=new R;return g.parse(s,a,t),g}R.prototype.parse=function(s,a,t){if(!L.isString(s))throw new TypeError("Parameter 'url' must be a string, not "+typeof s);var g=s.indexOf("?"),p=g!==-1&&g127?u+="x":u+=F[v];if(!u.match(it)){var O=r.slice(0,f),I=r.slice(f+1),S=F.match(vt);S&&(O.push(S[1]),I.unshift(S[2])),I.length&&(h="/"+I.join(".")+h),this.hostname=O.join(".");break}}}this.hostname.length>bt?this.hostname="":this.hostname=this.hostname.toLowerCase(),Z||(this.hostname=pt.toASCII(this.hostname));var K=this.port?":"+this.port:"",E=this.hostname||"";this.host=E+K,this.href+=this.host,Z&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),h[0]!=="/"&&(h="/"+h))}if(!Ct[j])for(var f=0,c=et.length;f0?t.host.split("@"):!1;u&&(t.auth=u.shift(),t.host=t.hostname=u.shift())}return t.search=s.search,t.query=s.query,(!L.isNull(t.pathname)||!L.isNull(t.search))&&(t.path=(t.pathname?t.pathname:"")+(t.search?t.search:"")),t.href=t.format(),t}if(!r.length)return t.pathname=null,t.search?t.path="/"+t.search:t.path=null,t.href=t.format(),t;for(var v=r.slice(-1)[0],z=(t.host||s.host||r.length>1)&&(v==="."||v==="..")||v==="",O=0,I=r.length;I>=0;I--)v=r[I],v==="."?r.splice(I,1):v===".."?(r.splice(I,1),O++):O&&(r.splice(I,1),O--);if(!q&&!Z)for(;O--;O)r.unshift("..");q&&r[0]!==""&&(!r[0]||r[0].charAt(0)!=="/")&&r.unshift(""),z&&r.join("/").substr(-1)!=="/"&&r.push("");var S=r[0]===""||r[0]&&r[0].charAt(0)==="/";if(F){t.hostname=t.host=S?"":r.length?r.shift():"";var u=t.host&&t.host.indexOf("@")>0?t.host.split("@"):!1;u&&(t.auth=u.shift(),t.host=t.hostname=u.shift())}return q=q||t.host&&r.length,q&&!S&&r.unshift(""),r.length?t.pathname=r.join("/"):(t.pathname=null,t.path=null),(!L.isNull(t.pathname)||!L.isNull(t.search))&&(t.path=(t.pathname?t.pathname:"")+(t.search?t.search:"")),t.auth=s.auth||t.auth,t.slashes=t.slashes||s.slashes,t.href=t.format(),t};R.prototype.parseHost=function(){var s=this.host,a=xt.exec(s);a&&(a=a[0],a!==":"&&(this.port=a.substr(1)),s=s.substr(0,s.length-a.length)),s&&(this.hostname=s)};export{It as f,Ft as p,jt as r};