1var e=Object.defineProperty,t=(t,n)=>e(t,`name`,{value:n,configurable:!0}),n=class{type=3;name=``;prefix=``;value=``;suffix=``;modifier=3;constructor(e,t,n,r,i,a){this.type=e,this.name=t,this.prefix=n,this.value=r,this.suffix=i,this.modifier=a}hasCustomName(){return this.name!==``&&typeof this.name!=`number`}};t(n,`Part`);var r=/[$_\p{ID_Start}]/u,i=/[$_\u200C\u200D\p{ID_Continue}]/u,a=`.*`;function o(e,t){return(t?/^[\x00-\xFF]*$/:/^[\x00-\x7F]*$/).test(e)}t(o,`isASCII`);function s(e,n=!1){let a=[],s=0;for(;s<e.length;){let c=e[s],l=t(function(t){if(!n)throw TypeError(t);a.push({type:`INVALID_CHAR`,index:s,value:e[s++]})},`ErrorOrInvalid`);if(c===`*`){a.push({type:`ASTERISK`,index:s,value:e[s++]});continue}if(c===`+`||c===`?`){a.push({type:`OTHER_MODIFIER`,index:s,value:e[s++]});continue}if(c===`\\`){a.push({type:`ESCAPED_CHAR`,index:s++,value:e[s++]});continue}if(c===`{`){a.push({type:`OPEN`,index:s,value:e[s++]});continue}if(c===`}`){a.push({type:`CLOSE`,index:s,value:e[s++]});continue}if(c===`:`){let t=``,n=s+1;for(;n<e.length;){let a=e.substr(n,1);if(n===s+1&&r.test(a)||n!==s+1&&i.test(a)){t+=e[n++];continue}break}if(!t){l(`Missing parameter name at ${s}`);continue}a.push({type:`NAME`,index:s,value:t}),s=n;continue}if(c===`(`){let t=1,n=``,r=s+1,i=!1;if(e[r]===`?`){l(`Pattern cannot start with "?" at ${r}`);continue}for(;r<e.length;){if(!o(e[r],!1)){l(`Invalid character '${e[r]}' at ${r}.`),i=!0;break}if(e[r]===`\\`){n+=e[r++]+e[r++];continue}if(e[r]===`)`){if(t--,t===0){r++;break}}else if(e[r]===`(`&&(t++,e[r+1]!==`?`)){l(`Capturing groups are not allowed at ${r}`),i=!0;break}n+=e[r++]}if(i)continue;if(t){l(`Unbalanced pattern at ${s}`);continue}if(!n){l(`Missing pattern at ${s}`);continue}a.push({type:`REGEX`,index:s,value:n}),s=r;continue}a.push({type:`CHAR`,index:s,value:e[s++]})}return a.push({type:`END`,index:s,value:``}),a}t(s,`lexer`);function c(e,r={}){let i=s(e);r.delimiter??=`/#?`,r.prefixes??=`./`;let o=`[^${l(r.delimiter)}]+?`,c=[],u=0,d=0,f=new Set,p=t(e=>{if(d<i.length&&i[d].type===e)return i[d++].value},`tryConsume`),m=t(()=>p(`OTHER_MODIFIER`)??p(`ASTERISK`),`tryConsumeModifier`),h=t(e=>{let t=p(e);if(t!==void 0)return t;let{type:n,index:r}=i[d];throw TypeError(`Unexpected ${n} at ${r}, expected ${e}`)},`mustConsume`),g=t(()=>{let e=``,t;for(;t=p(`CHAR`)??p(`ESCAPED_CHAR`);)e+=t;return e},`consumeText`),_=t(e=>e,`DefaultEncodePart`),v=r.encodePart||_,y=``,b=t(e=>{y+=e},`appendToPendingFixedValue`),x=t(()=>{y.length&&(c.push(new n(3,``,``,v(y),``,3)),y=``)},`maybeAddPartFromPendingFixedValue`),S=t((e,t,r,i,s)=>{let l=3;switch(s){case`?`:l=1;break;case`*`:l=0;break;case`+`:l=2}if(!t&&!r&&l===3){b(e);return}if(x(),!t&&!r){if(!e)return;c.push(new n(3,``,``,v(e),``,l));return}let d;d=r?r===`*`?a:r:o;let p=2;d===o?(p=1,d=``):d===a&&(p=0,d=``);let m;if(t?m=t:r&&(m=u++),f.has(m))throw TypeError(`Duplicate name '${m}'.`);f.add(m),c.push(new n(p,m,v(e),d,v(i),l))},`addPart`);for(;d<i.length;){let e=p(`CHAR`),t=p(`NAME`),n=p(`REGEX`);if(!t&&!n&&(n=p(`ASTERISK`)),t||n){let i=e??``;r.prefixes.indexOf(i)===-1&&(b(i),i=``),x();let a=m();S(i,t,n,``,a);continue}let i=e??p(`ESCAPED_CHAR`);if(i){b(i);continue}if(p(`OPEN`)){let e=g(),t=p(`NAME`),n=p(`REGEX`);!t&&!n&&(n=p(`ASTERISK`));let r=g();h(`CLOSE`);let i=m();S(e,t,n,r,i);continue}x(),h(`END`)}return c}t(c,`parse`);function l(e){return e.replace(/([.+*?^${}()[\]|/\\])/g,`\\$1`)}t(l,`escapeString`);function u(e){return e&&e.ignoreCase?`ui`:`u`}t(u,`flags`);function d(e,t,n){return p(c(e,n),t,n)}t(d,`stringToRegexp`);function f(e){switch(e){case 0:return`*`;case 1:return`?`;case 2:return`+`;case 3:return``}}t(f,`modifierToString`);function p(e,t,n={}){n.delimiter??=`/#?`,n.prefixes??=`./`,n.sensitive??=!1,n.strict??=!1,n.end??=!0,n.start??=!0,n.endsWith=``;let r=n.start?`^`:``;for(let i of e){if(i.type===3){i.modifier===3?r+=l(i.value):r+=`(?:${l(i.value)})${f(i.modifier)}`;continue}t&&t.push(i.name);let e=`[^${l(n.delimiter)}]+?`,o=i.value;if(i.type===1?o=e:i.type===0&&(o=a),!i.prefix.length&&!i.suffix.length){i.modifier===3||i.modifier===1?r+=`(${o})${f(i.modifier)}`:r+=`((?:${o})${f(i.modifier)})`;continue}if(i.modifier===3||i.modifier===1){r+=`(?:${l(i.prefix)}(${o}
1)${l(i.suffix)})`,r+=f(i.modifier);continue}r+=`(?:${l(i.prefix)}`,r+=`((?:${o})(?:`,r+=l(i.suffix),r+=l(i.prefix),r+=`(?:${o}))*)${l(i.suffix)})`,i.modifier===0&&(r+=`?`)}let i=`[${l(n.endsWith)}]|$`,o=`[${l(n.delimiter)}]`;if(n.end)return n.strict||(r+=`${o}?`),n.endsWith.length?r+=`(?=${i})`:r+=`$`,new RegExp(r,u(n));n.strict||(r+=`(?:${o}(?=${i}))?`);let s=!1;if(e.length){let t=e[e.length-1];t.type===3&&t.modifier===3&&(s=n.delimiter.indexOf(t)>-1)}return s||(r+=`(?=${o}|${i})`),new RegExp(r,u(n))}t(p,`partsToRegexp`);var m={delimiter:``,prefixes:``,sensitive:!0,strict:!0},h={delimiter:`.`,prefixes:``,sensitive:!0,strict:!0},g={delimiter:`/`,prefixes:`/`,sensitive:!0,strict:!0};function _(e,t){return e.length?e[0]===`/`?!0:!t||e.length<2?!1:(e[0]==`\\`||e[0]==`{`)&&e[1]==`/`:!1}t(_,`isAbsolutePathname`);function v(e,t){return e.startsWith(t)?e.substring(t.length,e.length):e}t(v,`maybeStripPrefix`);function y(e,t){return e.endsWith(t)?e.substr(0,e.length-t.length):e}t(y,`maybeStripSuffix`);function b(e){return!e||e.length<2?!1:e[0]===`[`||(e[0]===`\\`||e[0]===`{`)&&e[1]===`[`}t(b,`treatAsIPv6Hostname`);var x=[`ftp`,`file`,`http`,`https`,`ws`,`wss`];function S(e){if(!e)return!0;for(let t of x)if(e.test(t))return!0;return!1}t(S,`isSpecialScheme`);function ee(e,t){if(e=v(e,`#`),t||e===``)return e;let n=new URL(`https://example.com`);return n.hash=e,n.hash?n.hash.substring(1,n.hash.length):``}t(ee,`canonicalizeHash`);function te(e,t){if(e=v(e,`?`),t||e===``)return e;let n=new URL(`https://example.com`);return n.search=e,n.search?n.search.substring(1,n.search.length):``}t(te,`canonicalizeSearch`);function ne(e,t){return t||e===``?e:b(e)?E(e):T(e)}t(ne,`canonicalizeHostname`);function re(e,t){if(t||e===``)return e;let n=new URL(`https://example.com`);return n.password=e,n.password}t(re,`canonicalizePassword`);function ie(e,t){if(t||e===``)return e;let n=new URL(`https://example.com`);return n.username=e,n.username}t(ie,`canonicalizeUsername`);function ae(e,t,n){if(n||e===``)return e;if(t&&!x.includes(t))return new URL(`${t}:${e}`).pathname;let r=e[0]==`/`;return e=new URL(r?e:`/-`+e,`https://example.com`).pathname,r||(e=e.substring(2,e.length)),e}t(ae,`canonicalizePathname`);function oe(e,t,n){return C(t)===e&&(e=``),n||e===``?e:ue(e)}t(oe,`canonicalizePort`);function se(e,t){return e=y(e,`:`),t||e===``?e:w(e)}t(se,`canonicalizeProtocol`);function C(e){switch(e){case`ws`:case`http`:return`80`;case`wws`:case`https`:return`443`;case`ftp`:return`21`;default:return``}}t(C,`defaultPortForProtocol`);function w(e){if(e===``)return e;if(/^[-+.A-Za-z0-9]*$/.test(e))return e.toLowerCase();throw TypeError(`Invalid protocol '${e}'.`)}t(w,`protocolEncodeCallback`);function ce(e){if(e===``)return e;let t=new URL(`https://example.com`);return t.username=e,t.username}t(ce,`usernameEncodeCallback`);function le(e){if(e===``)return e;let t=new URL(`https://example.com`);return t.password=e,t.password}t(le,`passwordEncodeCallback`);function T(e){if(e===``)return e;if(/[\t\n\r #%/:<>?@[\]^\\|]/g.test(e))throw TypeError(`Invalid hostname '${e}'`);let t=new URL(`https://example.com`);return t.hostname=e,t.hostname}t(T,`hostnameEncodeCallback`);function E(e){if(e===``)return e;if(/[^0-9a-fA-F[\]:]/g.test(e))throw TypeError(`Invalid IPv6 hostname '${e}'`);return e.toLowerCase()}t(E,`ipv6HostnameEncodeCallback`);function ue(e){if(e===``||/^[0-9]*$/.test(e)&&parseInt(e)<=65535)return e;throw TypeError(`Invalid port '${e}'.`)}t(ue,`portEncodeCallback`);function de(e){if(e===``)return e;let t=new URL(`https://example.com`);return t.pathname=e[0]===`/`?e:`/-`+e,e[0]===`/`?t.pathname:t.pathname.substring(2,t.pathname.length)}t(de,`standardURLPathnameEncodeCallback`);function fe(e){return e===``?e:new URL(`data:${e}`).pathname}t(fe,`pathURLPathnameEncodeCallback`);function pe(e){if(e===``)return e;let t=new URL(`https://example.com`);return t.search=e,t.search.substring(1,t.search.length)}t(pe,`searchEncodeCallback`);function me(e){if(e===``)return e;let t=new URL(`https://example.com`);return t.hash=e,t.hash.substring(1,t.hash.length)}t(me,`hashEncodeCallback`);var he=class{#e;#t=[];#n={};#r=0;#i=1;#a=0;#o=0;#s=0;#c=0;#l=!1;constructor(e){this.#e=e}get result(){return this.#n}parse(){for(this.#t=s(this.#e,!0);this.#r<this.#t.length;this.#r+=this.#i){if(this.#i=1,this.#t[this.#r].type===`END`){if(this.#o===0){this.#f(),this.#C()?this.#u(9,1):this.#S()?this.#u(8,1):this.#u(7,0);continue}if(this.#o===2){this.#p(5);continue}this.#u(10,0);break}if(this.#s>0){if(this.#T())--this.#s;else continue}if(this.#w()){this.#s+=1;continue}switch(this.#o){case 0:this.#g()&&this.#p(1);break;case 1:if(this.#g()){this.#k();let e=7,t=1;this.#_()?(e=2,t=3):this.#l&&(e=2),this.#u(e,t)}break;case 2:this.#v()?this.#p(3):(this.#x()||this.#S()||this.#C())&&this.#p(5);break;case 3:this.#y()?this.#u(4,1):this.#v()&&this.#u(5,1);break;case 4:this.#v()&&this.#u(5,1);break;case 5:this.#E()?this.#c+=1:this.#D()&&--this.#c,this.#b()&&!this.#c?this.#u(6,1):this.#x()?this.#u(7,0):this.#S()?this.#u(8,1):this.#C()&&this.#u(9,1);break;case 6:this.#x()?this.#u(7,0):this.#S()?this.#u(8,1):this.#C()&&this.#u(9,1);break;case 7:this.#S()?this.#u(8,1):this.#C()&&this.#u(9,1);break;case 8:this.#C()&&this.#u(9,1)}}this.#n.hostname!==void 0&&this.#n.port===void 0&&(this.#n.port=``)}#u(e,t){switch(this.#o){case 0:break;case 1:this.#n.protocol=this.#O();break;case 2:break;case 3:this.#n.username=this.#O();break;case 4:this.#n.password=this.#O();break;case 5:this.#n.hostname=this.#O();break;case 6:this.#n.port=this.#O();break;case 7:this.#n.pathname=this.#O();break;case 8:this.#n.search=this.#O();break;case 9:this.#n.hash=this.#O()}this.#o!==0&&e!==10&&([1,2,3,4].includes(this.#o)&&[6,7,8,9].includes(e)&&(this.#n.hostname??=``),[1,2,3,4,5,6].includes(this.#o)&&[8,9].includes(e)&&(this.#n.pathname??=this.#l?`/`:``),[1,2,3,4,5,6,7].includes(this.#o)&&e===9&&(this.#n.search??=``)),this.#d(e,t)}#d(e,t){this.#o=e,this.#a=this.#r+t,this.#r+=t,this.#i=0}#f(){this.#r=this.#a,this.#i=0}#p(e){this.#f(),this.#o=e}#m(e){return e<0&&(e=this.#t.length-e),e<this.#t.length?this.#t[e]:this.#t[this.#t.length-1]}#h(e,t){let n=this.#m(e);return n.value===t&&(n.type===`CHAR`||n.type===`ESCAPED_CHAR`||n.type===`INVALID_CHAR`)}#g(){return this.#h(this.#r,`:`)}#_(){return this.#h(this.#r+1,`/`)&&this.#h(this.#r+2,`/`)}#v(){return this.#h(this.#r,`@`)}#y(){return this.#h(this.#r,`:`)}#b(){return this.#h(this.#r,`:`)}#x(){return this.#h(this.#r,`/`)}#S(){if(this.#h(this.#r,`?`))return!0;
1if(this.#t[this.#r].value!==`?`)return!1;let e=this.#m(this.#r-1);return e.type!==`NAME`&&e.type!==`REGEX`&&e.type!==`CLOSE`&&e.type!==`ASTERISK`}#C(){return this.#h(this.#r,`#`)}#w(){return this.#t[this.#r].type==`OPEN`}#T(){return this.#t[this.#r].type==`CLOSE`}#E(){return this.#h(this.#r,`[`)}#D(){return this.#h(this.#r,`]`)}#O(){let e=this.#t[this.#r],t=this.#m(this.#a).index;return this.#e.substring(t,e.index)}#k(){let e={};Object.assign(e,m),e.encodePart=w;let t=d(this.#O(),void 0,e);this.#l=S(t)}};t(he,`Parser`);var D=[`protocol`,`username`,`password`,`hostname`,`port`,`pathname`,`search`,`hash`],O=`*`;function k(e,t){if(typeof e!=`string`)throw TypeError(`parameter 1 is not of type 'string'.`);let n=new URL(e,t);return{protocol:n.protocol.substring(0,n.protocol.length-1),username:n.username,password:n.password,hostname:n.hostname,port:n.port,pathname:n.pathname,search:n.search===``?void 0:n.search.substring(1,n.search.length),hash:n.hash===``?void 0:n.hash.substring(1,n.hash.length)}}t(k,`extractValues`);function A(e,t){return t?M(e):e}t(A,`processBaseURLString`);function j(e,t,n){let r;if(typeof t.baseURL==`string`)try{r=new URL(t.baseURL),t.protocol===void 0&&(e.protocol=A(r.protocol.substring(0,r.protocol.length-1),n)),!n&&t.protocol===void 0&&t.hostname===void 0&&t.port===void 0&&t.username===void 0&&(e.username=A(r.username,n)),!n&&t.protocol===void 0&&t.hostname===void 0&&t.port===void 0&&t.username===void 0&&t.password===void 0&&(e.password=A(r.password,n)),t.protocol===void 0&&t.hostname===void 0&&(e.hostname=A(r.hostname,n)),t.protocol===void 0&&t.hostname===void 0&&t.port===void 0&&(e.port=A(r.port,n)),t.protocol===void 0&&t.hostname===void 0&&t.port===void 0&&t.pathname===void 0&&(e.pathname=A(r.pathname,n)),t.protocol===void 0&&t.hostname===void 0&&t.port===void 0&&t.pathname===void 0&&t.search===void 0&&(e.search=A(r.search.substring(1,r.search.length),n)),t.protocol===void 0&&t.hostname===void 0&&t.port===void 0&&t.pathname===void 0&&t.search===void 0&&t.hash===void 0&&(e.hash=A(r.hash.substring(1,r.hash.length),n))}catch{throw TypeError(`invalid baseURL '${t.baseURL}'.`)}if(typeof t.protocol==`string`&&(e.protocol=se(t.protocol,n)),typeof t.username==`string`&&(e.username=ie(t.username,n)),typeof t.password==`string`&&(e.password=re(t.password,n)),typeof t.hostname==`string`&&(e.hostname=ne(t.hostname,n)),typeof t.port==`string`&&(e.port=oe(t.port,e.protocol,n)),typeof t.pathname==`string`){if(e.pathname=t.pathname,r&&!_(e.pathname,n)){let t=r.pathname.lastIndexOf(`/`);t>=0&&(e.pathname=A(r.pathname.substring(0,t+1),n)+e.pathname)}e.pathname=ae(e.pathname,e.protocol,n)}return typeof t.search==`string`&&(e.search=te(t.search,n)),typeof t.hash==`string`&&(e.hash=ee(t.hash,n)),e}t(j,`applyInit`);function M(e){return e.replace(/([+*?:{}()\\])/g,`\\$1`)}t(M,`escapePatternString`);function ge(e){return e.replace(/([.+*?^${}()[\]|/\\])/g,`\\$1`)}t(ge,`escapeRegexpString`);function _e(e,t){t.delimiter??=`/#?`,t.prefixes??=`./`,t.sensitive??=!1,t.strict??=!1,t.end??=!0,t.start??=!0,t.endsWith=``;let n=`[^${ge(t.delimiter)}]+?`,r=/[$_\u200C\u200D\p{ID_Continue}]/u,i=``;for(let a=0;a<e.length;++a){let o=e[a];if(o.type===3){if(o.modifier===3){i+=M(o.value);continue}i+=`{${M(o.value)}}${f(o.modifier)}`;continue}let s=o.hasCustomName(),c=!!o.suffix.length||!!o.prefix.length&&(o.prefix.length!==1||!t.prefixes.includes(o.prefix)),l=a>0?e[a-1]:null,u=a<e.length-1?e[a+1]:null;if(!c&&s&&o.type===1&&o.modifier===3&&u&&!u.prefix.length&&!u.suffix.length){if(u.type===3){let e=u.value.length>0?u.value[0]:``;c=r.test(e)}else c=!u.hasCustomName()}if(!c&&!o.prefix.length&&l&&l.type===3){let e=l.value[l.value.length-1];c=t.prefixes.includes(e)}c&&(i+=`{`),i+=M(o.prefix),s&&(i+=`:${o.name}`),o.type===2?i+=`(${o.value})`:o.type===1?s||(i+=`(${n})`):o.type===0&&(!s&&(!l||l.type===3||l.modifier!==3||c||o.prefix!==``)?i+=`*`:i+=`(.*)`),o.type===1&&s&&o.suffix.length&&r.test(o.suffix[0])&&(i+=`\\`),i+=M(o.suffix),c&&(i+=`}`),o.modifier!==3&&(i+=f(o.modifier))}return i}t(_e,`partsToPattern`);var ve=class{#e;#t={};#n={};#r={};#i={};#a=!1;constructor(e={},t,n){try{let r;if(typeof t==`string`?r=t:n=t,typeof e==`string`){let t=new he(e);if(t.parse(),e=t.result,r===void 0&&typeof e.protocol!=`string`)throw TypeError(`A base URL must be provided for a relative constructor string.`);e.baseURL=r}else{if(!e||typeof e!=`object`)throw TypeError(`parameter 1 is not of type 'string' and cannot convert to dictionary.`);if(r)throw TypeError(`parameter 1 is not of type 'string'.`)}typeof n>`u`&&(n={ignoreCase:!1});let i={ignoreCase:n.ignoreCase===!0},a={pathname:O,protocol:O,username:O,password:O,hostname:O,port:O,search:O,hash:O};this.#e=j(a,e,!0),C(this.#e.protocol)===this.#e.port&&(this.#e.port=``);let o;for(o of D){if(!(o in this.#e))continue;let e={},t=this.#e[o];switch(this.#n[o]=[],o){case`protocol`:Object.assign(e,m),e.encodePart=w;break;case`username`:Object.assign(e,m),e.encodePart=ce;break;case`password`:Object.assign(e,m),e.encodePart=le;break;case`hostname`:Object.assign(e,h),e.encodePart=b(t)?E:T;break;case`port`:Object.assign(e,m),e.encodePart=ue;break;case`pathname`:S(this.#t.protocol)?(Object.assign(e,g,i),e.encodePart=de):(Object.assign(e,m,i),e.encodePart=fe);break;case`search`:Object.assign(e,m,i),e.encodePart=pe;break;case`hash`:Object.assign(e,m,i),e.encodePart=me}try{this.#i[o]=c(t,e),this.#t[o]=p(this.#i[o],this.#n[o],e),this.#r[o]=_e(this.#i[o],e),this.#a=this.#a||this.#i[o].some(e=>e.type===2)}catch{throw TypeError(`invalid ${o} pattern '${this.#e[o]}'.`)}}}catch(e){throw TypeError(`Failed to construct 'URLPattern': ${e.message}`)}}get[Symbol.toStringTag](){return`URLPattern`}test(e={},t){let n={pathname:``,protocol:``,username:``,password:``,hostname:``,port:``,search:``,hash:``};if(typeof e!=`string`&&t)throw TypeError(`parameter 1 is not of type 'string'.`);if(typeof e>`u`)return!1;try{n=typeof e==`object`?j(n,e,!1):j(n,k(e,t),!1)}catch{return!1}let r;for(r of D)if(!this.#t[r].exec(n[r]))return!1;return!0}exec(e={},t){let n={pathname:``,protocol:``,username:``,password:``,hostname:``,port:``,search:``,hash:``};if(typeof e!=`string`&&t)throw TypeError(`parameter 1 is not of type 'string'.`);if(typeof e>`u`)return;try{n=typeof e==`object`?j(n,e,!1):j(n,k(e,t),!1)}catch{return null}let r={};
1r.inputs=t?[e,t]:[e];let i;for(i of D){let e=this.#t[i].exec(n[i]);if(!e)return null;let t={};for(let[n,r]of this.#n[i].entries())(typeof r==`string`||typeof r==`number`)&&(t[r]=e[n+1]);r[i]={input:n[i]??``,groups:t}}return r}static compareComponent(e,r,i){let a=t((e,t)=>{for(let n of[`type`,`modifier`,`prefix`,`value`,`suffix`]){if(e[n]<t[n])return-1;if(e[n]!==t[n])return 1}return 0},`comparePart`),o=new n(3,``,``,``,``,3),s=new n(0,``,``,``,``,3),c=t((e,t)=>{let n=0;for(;n<Math.min(e.length,t.length);++n){let r=a(e[n],t[n]);if(r)return r}return e.length===t.length?0:a(e[n]??o,t[n]??o)},`comparePartList`);return!r.#r[e]&&!i.#r[e]?0:r.#r[e]&&!i.#r[e]?c(r.#i[e],[s]):!r.#r[e]&&i.#r[e]?c([s],i.#i[e]):c(r.#i[e],i.#i[e])}get protocol(){return this.#r.protocol}get username(){return this.#r.username}get password(){return this.#r.password}get hostname(){return this.#r.hostname}get port(){return this.#r.port}get pathname(){return this.#r.pathname}get search(){return this.#r.search}get hash(){return this.#r.hash}get hasRegExpGroups(){return this.#a}};t(ve,`URLPattern`),globalThis.URLPattern||(globalThis.URLPattern=ve);var N=[`en`,`es`],ye=`PARAGLIDE_LOCALE`,be=3456e4,P=[`url`,`cookie`,`preferredLanguage`,`baseLocale`],xe=[{match:`/app/*`,strategy:[`cookie`,`baseLocale`]},{match:`/api/*`,exclude:!0}],F=[{pattern:`/`,localized:[[`es`,`/es`],[`en`,`/`]]},{pattern:`/:path(.*)?`,localized:[[`es`,`/es/:path(.*)?`],[`en`,`/:path(.*)?`]]}];globalThis.__paraglide=globalThis.__paraglide??{},globalThis.__paraglide.ssr=globalThis.__paraglide.ssr??{};var Se=!1,I=()=>{let e=P;typeof window<`u`&&window.location?.href&&(e=Qe(window.location.href));let t=Ce(e,typeof window<`u`?window.location?.href:void 0);if(t)return Se||(Se=!0,Te(t,{reload:!1})),t;throw Error(`No locale found. Read the docs https://paraglidejs.com/errors#no-locale-found`)};function Ce(e,t){let n;for(let r of e){if(r===`cookie`)n=je();else if(r===`baseLocale`)n=`en`;else if(r===`url`&&typeof t==`string`)n=Fe(t);else if(r===`preferredLanguage`)n=Me();else if(et(r)&&$.has(r)){let e=$.get(r);if(e){let t=e.getLocale();if(t instanceof Promise)continue;if(t!==void 0)return De(t)}}let e=L(n);if(e)return e}}var we=e=>{e?window.location.href=e:window.location.reload()},Te=(e,t)=>
1{let n={reload:!0,...t},r;try{r=I()}catch{}let i=[],a,o=P;typeof window<`u`&&window.location?.href&&(o=Qe(window.location.href));for(let t of o)if(t===`cookie`){if(typeof document>`u`||typeof window>`u`)continue;let t=`${ye}=${e}; path=/; max-age=${be}`;document.cookie=t,H()}else if(t===`baseLocale`)continue;else if(t===`url`&&typeof window<`u`)a=U(window.location.href,{locale:e}).href;else if(et(t)&&$.has(t)){let n=$.get(t);if(n){let r=n.setLocale(e);r instanceof Promise&&(r=r.catch(e=>{throw Error(`Custom strategy "${t}" setLocale failed.`,{cause:e})}),i.push(r))}}let s=()=>{n.reload&&window.location&&e!==r&&we(a)};if(i.length)return Promise.all(i).then(()=>{s()});s()},Ee=()=>typeof window<`u`?window.location.origin:`http://fallback.com`;function L(e){if(typeof e!=`string`)return;let t=e.toLowerCase();for(let e of N)if(e.toLowerCase()===t)return e}function De(e){let t=L(e);if(t)return t;throw Error(`Invalid locale: ${e}. Expected one of: ${N.join(`, `)}`)}function R(e){return e}function z(e,t){return e.exec(t.href)}var Oe=ye.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`),ke=RegExp(`(?:^|;\\s*)${Oe}=([^;]*)`),B=Symbol(),V=B;function H(){V=B}function Ae(){typeof queueMicrotask==`function`?queueMicrotask(H):Promise.resolve().then(H)}function je(){if(typeof document>`u`)return;if(V!==B)return V;let e=document.cookie.match(ke)?.[1];return V=L(e),Ae(),V}function Me(){if(!navigator?.languages?.length)return;let e=navigator.languages.map(e=>({fullTag:e,baseTag:e.split(`-`)[0]}));for(let t of e){let e=L(t.fullTag);if(e)return e;let n=L(t.baseTag);if(n)return n}}var Ne,Pe;function Fe(e){let t=typeof e==`string`?e:e.href;if(Ne===t)return Pe;let n;{let t=R(new URL(e));for(let e of F){for(let[r,i]of e.localized)if(z(new URLPattern(i,t.href),t)){n=r;break}if(n)break}}return Ne=t,Pe=n,n}function U(e,t){let n=t?.locale?De(t?.locale):I(),r=typeof e==`string`?new URL(e):e,i=r;for(let e of F){let t=ze(i,n,e);if(t!==void 0)return t;for(let[,t]of e.localized){let r=z(J(t,i),i);if(!r)continue;let a=e.localized.find(([e])=>e===n)?.[1];if(a)return R(W(G(a,K(r),i.origin),r))}let r=z(J(e.pattern,i),i);if(r){let t=e.localized.find(([e])=>e===n)?.[1];if(t)return R(W(G(t,K(r),i.origin),r))}}return r}function Ie(e){let t=typeof e==`string`?new URL(e):e,n=t;for(let e of F){let t=Be(n,e);if(t!==void 0)return t;for(let[,t]of e.localized){let r=z(J(t,n),n);if(r){let t=K(r);return R(W(G(e.pattern,t,n.origin),r))}}let r=z(J(e.pattern,n),n);if(r)return R(W(G(e.pattern,K(r),n.origin),r))}return t}function W(e,t){return t.protocol.groups[0]&&(e.protocol=t.protocol.groups[0]??``),t.hostname.groups[0]&&(e.hostname=t.hostname.groups[0]??``),t.username.groups[0]&&(e.username=t.username.groups[0]??``),t.password.groups[0]&&(e.password=t.password.groups[0]??``),t.port.groups[0]&&(e.port=t.port.groups[0]??``),t.pathname.groups[0]&&(e.pathname=t.pathname.groups[0]??``),t.search.groups[0]&&(e.search=t.search.groups[0]??``),t.hash.groups[0]&&(e.hash=t.hash.groups[0]??``),e}function G(e,t,n){let r=e.replace(/(https?:\/\/[^:/]+):(\d+)(\/|$)/g,(e,t,n,r)=>`${t}#PORT-${n}#${r}`).replace(/\{([^{}]*)\}([?+*]?)/g,(e,t,n)=>t).replace(/(\/?):([a-zA-Z0-9_]+)(\([^)]*\))?([?+*]?)/g,(e,n,r,i,a)=>{let o=t[r];if(o===null)return``;if(a===`?`)return o===void 0?``:`${n}${o}`;if(a===`+`||a===`*`){if(o===void 0&&a===`+`)throw Error(`Missing value for "${r}" (one or more required)`);return o?`${n}${o}`:``}if(o===void 0)throw Error(`Missing value for "${r}"`);return`${n}${o}`});return r=r.replace(/#PORT-(\d+)#/g,`:$1`),new URL(r,n)}function K(e){return{...e.hash.groups,...e.hostname.groups,...e.password.groups,...e.pathname.groups,...e.port.groups,...e.protocol.groups,...e.search.groups,...e.username.groups}}var q=new Map,Le=128,Re=/^(?:[A-Za-z][A-Za-z\d+.-]*|:[A-Za-z][A-Za-z\d_-]*):\/\//;function J(e,t){let n=Re.test(e),r=e.startsWith(`/`);if(!n&&!r)return new URLPattern(e,t.href);let i=n?e:JSON.stringify([t.origin,e]),a=q.get(i);if(a!==void 0)return q.delete(i),q.set(i,a),a;let o=new URLPattern(e,t.href);if(q.size>=Le){let e=q.keys().next().value;e!==void 0&&q.delete(e)}return q.set(i,o),o}var Y=new WeakMap;function ze(e,t,n){let r=Ve(n);if(r===null)return;for(let n of r.localized){let i=Z(n.pattern,e);if(i===void 0)continue;let a=r.localized.find(e=>e.locale===t)?.pattern;if(a!==void 0)return Q(a,i,e)}let i=Z(r.base,e);if(i!==void 0){let n=r.localized.find(e=>e.locale===t)?.pattern;if(n!==void 0)return Q(n,i,e)}}function Be(e,t){let n=Ve(t);if(n===null)return;for(let t of n.localized){let r=Z(t.pattern,e);if(r!==void 0)return Q(n.base,r,e)}let r=Z(n.base,e);if(r!==void 0)return Q(n.base,r,e)}function Ve(e){let t=Y.get(e);if(t!==void 0)return t;let n=He(e.pattern);if(n===void 0)return Y.set(e,null),null;let r=[];for(let[t,i]of e.localized){let a=He(i);if(a===void 0||a.pathMode!==n.pathMode)return Y.set(e,null),null;r.push({locale:t,pattern:a})}let i={base:n,localized:r};return Y.set(e,i),i}function He(e){let t=e.match(/\/:path(?:\(\.\*\)(?:\?)?|\*)$/);if(t===null||t.index===void 0)return;let n=Ue(e.slice(0,t.index));if(n===void 0)return;let r=t[0].endsWith(`*`)?`segments`:t[0].endsWith(`?`)?`catch-all-optional`:`catch-all-required`;return{...n,pathMode:r}}function Ue(e){if(e===``||e.startsWith(`/`))return Ge(e)?void 0:{protocol:void 0,hostname:void 0,port:void 0,pathnamePrefix:X(e),pathMode:`catch-all-optional`};let t=e.match(/^:protocol:\/\/([^/]+)(\/.*)?$/),n=e.match(/^([A-Za-z][A-Za-z\d+.-]*):\/\/([^/]+)(\/.*)?$/);if(t!==null){let e=(t[1]??``).match(/^([^:(){}?*+]+)(?::(\d+))?$/);return e===null||t[2]!==void 0&&Ge(t[2])?void 0:{protocol:void 0,hostname:(e[1]??``).toLowerCase(),port:e[2],pathnamePrefix:X(t[2]??``),pathMode:`catch-all-optional`}}if(n===null)return;let r=n[2]??``,i=n[3],a=r.match(/^([^:(){}?*+]+)(?::(\d+))?$/);if(!(a===null||i!==void 0&&Ge(i)))return{protocol:`${n[1]}:`,hostname:(a[1]??``).toLowerCase(),port:We(a[2],`${n[1]}:`),pathnamePrefix:X(i??``),pathMode:`catch-all-optional`}}function We(e,t){return e===`80`&&t===`http:`||e===`443`&&t===`https:`?``:e}function Ge(e){return/[:(){}?*+]/.test(e)}function X(e){return e===``||e===`/`?`/`:e.endsWith(`/`)?e.slice(0,-1):e}function Z(e,t){if(e.protocol!==void 0&&e.protocol!==t.protocol||e.hostname!==void 0&&e.hostname!==t.hostname.toLowerCase()||e.hostname!==void 0&&(e.port??qe(e.protocol??t.protocol))!==t.port)return;let n=e.pathnamePrefix;if(n===`/`)return t.pathname.startsWith(`//`)?void 0:e.pathMode===`segments`?Ke(t.pathname)?t.pathname:void 0:t.pathname;if(t.pathname===n)return e.pathMode===`catch-all-required`?void 0:``;if(t.pathname.startsWith(`${n}/`)){let r=t.pathname.slice(n.length);return r.startsWith(`//`)||e.pathMode===`segments`&&!Ke(r)?void 0:r}}function Ke(e){return e.length>1&&!e.endsWith(`/`)&&!e.includes(`//`)}function qe(e){return``}function Q(e,t,n){let r=new URL(n.href);return e.protocol!==void 0&&(r.protocol=e.protocol),e.hostname!==void 0&&(r.hostname=e.hostname,r.port=e.port??qe(r.protocol)),r.pathname=Je(e.pathnamePrefix,t),r}function Je(e,t){return e===`/`?t===``?`/`:t:t===``?e:`${e}${t.startsWith(`/`)?t:`/${t}`}`}var Ye,Xe;function Ze(e){if(xe.length===0)return;let t=typeof e==`string`?e:e.href;if(Ye===t)return Xe;let n=R(new URL(t,`http://example.com`)),r=Ie(n),i=r.href===n.href?[n]:[n,r],a;
1for(let e of i){for(let t of xe)if(z(new URLPattern(t.match,e.href),e)){a=t;break}if(a)break}return Ye=t,Xe=a,a}function Qe(e){let t=Ze(e);return t&&t.exclude!==!0&&Array.isArray(t.strategy)?t.strategy:P}function $e(e,t){let n=I(),r=t?.locale??n,i=new URL(e,Ee()),a=U(i,{locale:r});return e.startsWith(`/`)&&i.origin===a.origin?r!==n&&U(i,{locale:n}).origin!==a.origin?a.href:a.pathname+a.search+a.hash:a.href}var $=new Map;function et(e){return typeof e==`string`&&/^custom-[A-Za-z0-9_-]+$/.test(e)}export{U as a,$e as i,I as n,Te as o,N as r,Ie as t}; 2//# sourceMappingURL=runtime-DiOawCOS.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.