1import{A as e,Q as t,dt as n,it as r,lt as i,nt as a}from"./Bsvs8Lbu.js";import"./FCNe7aLS.js";function o(e){if(typeof e!=`object`)return e;var t,n,r=Object.prototype.toString.call(e);if(r===`[object Object]`){if(e.constructor!==Object&&typeof e.constructor==`function`)for(t in n=new e.constructor,e)e.hasOwnProperty(t)&&n[t]!==e[t]&&(n[t]=o(e[t]));else for(t in n={},e)t===`__proto__`?Object.defineProperty(n,t,{value:o(e[t]),configurable:!0,enumerable:!0,writable:!0}):n[t]=o(e[t]);return n}if(r===`[object Array]`){for(t=e.length,n=Array(t);t--;)n[t]=o(e[t]);return n}return r===`[object Set]`?(n=new Set,e.forEach(function(e){n.add(o(e))}),n):r===`[object Map]`?(n=new Map,e.forEach(function(e,t){n.set(o(t),o(e))}),n):r===`[object Date]`?new Date(+e):r===`[object RegExp]`?(n=new RegExp(e.source,e.flags),n.lastIndex=e.lastIndex,n):r===`[object DataView]`?new e.constructor(o(e.buffer)):r===`[object ArrayBuffer]`?e.slice(0):r.slice(-6)===`Array]`?new e.constructor(e):e}var s=3456e4;function c(e,t,n){let r=e.indexOf(`;`,t);return r===-1?n:r}function l(e,t,n){let r=e.indexOf(`=`,t);return r<n?r:-1}function u(e,t,n){if(t===n)return``;let r=t,i=n;do{let t=e.charCodeAt(r);if(t!==32&&t!==9)break}while(++r<i);for(;i>r;){let t=e.charCodeAt(i-1);if(t!==32&&t!==9)break;i--}return e.slice(r,i)}var d=(()=>{let e=function(){};return e.prototype=Object.create(null),e})();function f(e,t){let n=new d,r=e.length;if(r<2)return n;let i=t?.decode||p,a=t?.allowMultiple||!1,o=0;do{let s=l(e,o,r);if(s===-1)break;let d=c(e,o,r);if(s>d){o=e.lastIndexOf(`;`,s-1)+1;continue}let f=u(e,o,s);if(t?.filter&&!t.filter(f)){o=d+1;continue}let p=i(u(e,s+1,d));if(a){let e=n[f];e===void 0?n[f]=p:Array.isArray(e)?e.push(p):n[f]=[e,p]}else n[f]===void 0&&(n[f]=p);o=d+1}while(o<r);return n}function p(e){if(!e.includes(`%`))return e;try{return decodeURIComponent(e)}catch{return e}}var m=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,h=/^[\u0021-\u003A\u003C-\u007E]*$/,g=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,_=/^[\u0020-\u003A\u003C-\u007E]*$/,v=Object.prototype.toString;function y(e,t,n){let r=typeof e==`object`&&!!e,i=r?t:n,a=i?.stringify||JSON.stringify,o=r?e:{...n,name:e,value:t==null?``:typeof t==`string`?t:a(t)},c=i?.encode||encodeURIComponent;if(!m.test(o.name))throw TypeError(`argument name is invalid: ${o.name}`);let l=o.value?c(o.value):``;if(!h.test(l))throw TypeError(`argument val is invalid: ${o.value}`);if(!o.secure){if(o.partitioned)throw TypeError(`Partitioned cookies must have the Secure attribute`);if(o.sameSite&&String(o.sameSite).toLowerCase()===`none`)throw TypeError(`SameSite=None cookies must have the Secure attribute`);if(o.name.length>9&&o.name.charCodeAt(0)===95&&o.name.charCodeAt(1)===95){let e=o.name.toLowerCase();if(e.startsWith(`__secure-`)||e.startsWith(`__host-`))throw TypeError(`${o.name} cookies must have the Secure attribute`)}}if(o.name.length>7&&o.name.charCodeAt(0)===95&&o.name.charCodeAt(1)===95&&o.name.toLowerCase().startsWith(`__host-`)){if(o.path!==`/`)throw TypeError(`__Host- cookies must have Path=/`);if(o.domain)throw TypeError(`__Host- cookies must not have a Domain attribute`)}let u=o.name+`=`+l;if(o.maxAge!==void 0){if(!Number.isInteger(o.maxAge))throw TypeError(`option maxAge is invalid: ${o.maxAge}`);u+=`; Max-Age=`+Math.max(0,Math.min(o.maxAge,s))}if(o.domain){if(!g.test(o.domain))throw TypeError(`option domain is invalid: ${o.domain}`);u+=`; Domain=`+o.domain}if(o.path){if(!_.test(o.path))throw TypeError(`option path is invalid: ${o.path}`);u+=`; Path=`+o.path}if(o.expires){if(!b(o.expires)||!Number.isFinite(o.expires.valueOf()))throw TypeError(`option expires is invali
1d: ${o.expires}`);u+=`; Expires=`+o.expires.toUTCString()}if(o.httpOnly&&(u+=`; HttpOnly`),o.secure&&(u+=`; Secure`),o.partitioned&&(u+=`; Partitioned`),o.priority)switch(typeof o.priority==`string`?o.priority.toLowerCase():void 0){case`low`:u+=`; Priority=Low`;break;case`medium`:u+=`; Priority=Medium`;break;case`high`:u+=`; Priority=High`;break;default:throw TypeError(`option priority is invalid: ${o.priority}`)}if(o.sameSite)switch(typeof o.sameSite==`string`?o.sameSite.toLowerCase():o.sameSite){case!0:case`strict`:u+=`; SameSite=Strict`;break;case`lax`:u+=`; SameSite=Lax`;break;case`none`:u+=`; SameSite=None`;break;default:throw TypeError(`option sameSite is invalid: ${o.sameSite}`)}return u}function b(e){return v.call(e)===`[object Date]`}function x(e){return typeof e==`string`?`'${e}'`:new S().serialize(e)}var S=function(){class e{#e=new Map;compare(e,t){let n=typeof e,r=typeof t;return n===`string`&&r===`string`?e.localeCompare(t):n===`number`&&r===`number`?e-t:String.prototype.localeCompare.call(this.serialize(e,!0),this.serialize(t,!0))}serialize(e,t){if(e===null)return`null`;switch(typeof e){case`string`:return t?e:`'${e}'`;case`bigint`:return`${e}n`;case`object`:return this.$object(e);case`function`:return this.$function(e)}return String(e)}serializeObject(e){let t=Object.prototype.toString.call(e);if(t!==`[object Object]`)return this.serializeBuiltInType(t.length<10?`unknown:${t}`:t.slice(8,-1),e);let n=e.constructor,r=n===Object||n===void 0?``:n.name;if(r!==``&&globalThis[r]===n)return this.serializeBuiltInType(r,e);if(typeof e.toJSON==`function`){let t=e.toJSON();return r+(typeof t==`object`&&t?this.$object(t):`(${this.serialize(t)})`)}return this.serializeObjectEntries(r,Object.entries(e))}serializeBuiltInType(e,t){let n=this[`$`+e];if(n)return n.call(this,t);if(typeof t?.entries==`function`)return this.serializeObjectEntries(e,t.entries());throw Error(`Cannot serialize ${e}`)}serializeObjectEntries(e,t){let n=Array.from(t).sort((e,t)=>this.compare(e[0],t[0])),r=`${e}{`;for(let e=0;e<n.length;e++){let[t,i]=n[e];r+=`${this.serialize(t,!0)}:${this.serialize(i)}`,e<n.length-1&&(r+=`,`)}return r+`}`}$object(e){let t=this.#e.get(e);return t===void 0&&(this.#e.set(e,`#${this.#e.size}`),t=this.serializeObject(e),this.#e.set(e,t)),t}$function(e){let t=Function.prototype.toString.call(e);return t.slice(-15)===`[native code] }`?`${e.name||``}()[native]`:`${e.name}(${e.length})${t.replace(/\s*\n\s*/g,``)}`}$Array(e){let t=`[`;for(let n=0;n<e.length;n++)t+=this.serialize(e[n]),n<e.length-1&&(t+=`,`);return t+`]`}$Date(e){try{return`Date(${e.toISOString()})`}catch{return`Date(null)`}}$ArrayBuffer(e){return`ArrayBuffer[${new Uint8Array(e).join(`,`)}]`}$Set(e){return`Set${this.$Array(Array.from(e).sort((e,t)=>this.compare(e,t)))}`}$Map(e){return this.serializeObjectEntries(`Map`,e.entries())}}for(let t of[`Error`,`RegExp`,`URL`])e.prototype[`$`+t]=function(e){return`${t}(${e})`};for(let t of[`Int8Array`,`Uint8Array`,`Uint8ClampedArray`,`Int16Array`,`Uint16Array`,`Int32Array`,`Uint32Array`,`Float32Array`,`Float64Array`])e.prototype[`$`+t]=function(e){return`${t}[${e.join(`,`)}]`};for(let t of[`BigInt64Array`,`BigUint64Array`])e.prototype[`$`+t]=function(e){return`${t}[${e.join(`n,`)}${e.length>0?`n`:``}]`};return e}();function C(e,t){return e===t||x(e)===x(t)}function w(e){if(e!==`undefined`)try{let t=JSON.parse(e);return typeof t==`number`&&String(t)!==e?e:t}catch{return e}}var T={path:`/`,watch:!0,decode:e=>e&&w(decodeURIComponent(e)),encode:e=>{if(typeof e!=`string`||e===`undefined`)return encodeURIComponent(JSON.stringify(e));try{if(typeof JSON.parse(e)!=`string`)return encodeURIComponent(JSON.stringify(e))}catch{}return encodeURIComponent(e)},refresh:!1},E=globalThis.cookieStore;function D(a,s){let c={...T,...s};c.filter??=e=>e===a;let l=O(c)||{},u;c.maxAge===void 0?c.expires&&(u=c.expires.getTime()-Date.now()):u=c.maxAge*1e3;let d=u!==void 0&&u<=0,f=d||l[a]===void 0||l[a]===null,p=o(d?void 0:l[a]??c.default?.()),m=u&&!d?P(p,u,c.watch&&c.watch!==`shallow`):n(p);{let n=null;try{!E&&typeof BroadcastChannel<`u`&&(n=new BroadcastChannel(`nuxt:cookies:${a}
1`))}catch{}let s=(e=!1)=>{!e&&(c.readonly||C(m.value,l[a]))||(M(a,m.value===null||m.value===void 0?void 0:c.encode(m.value),c),l[a]=o(m.value),n?.postMessage({value:c.encode(m.value)}))},u=t=>{let n=t.refresh?O(c)?.[a]:c.decode(t.value);d=!0,m.value=n,l[a]=o(n),e(()=>{d=!1})},d=!1,p=!!r();if(p&&i(()=>{d=!0,s(),n?.close()}),E){let e=e=>{let t=e.changed.find(e=>e.name===a),n=e.deleted.find(e=>e.name===a);t&&u({value:t.value}),n&&u({value:null})};E.addEventListener(`change`,e),p&&i(()=>E.removeEventListener(`change`,e))}else n&&(n.onmessage=({data:e})=>u(e));c.watch&&t(m,()=>{d||s(c.refresh)},{deep:c.watch!==`shallow`}),f&&s(f)}return m}function O(e={}){return f(document.cookie,e)}var k=e=>e;function A(e){let{encode:t,decode:n,...r}=e;return{...r,encode:k}}function j(e,t,n={}){let r=A(n);return t===void 0?y(e,``,{...r,maxAge:-1}):y(e,t,r)}function M(e,t,n={}){document.cookie=j(e,t,n)}var N=2147483647;function P(e,o,s){let c,l,u=0,d=s?n(e):{value:e};return r()&&i(()=>{l?.(),clearTimeout(c)}),a((e,n)=>{s&&(l=t(d,n));function r(){let e=o-u,t=e<N?e:N;c=setTimeout(()=>{if(u+=t,u<o)return r();d.value=void 0,n()},t)}function i(){u=0,clearTimeout(c),r()}return{get(){return e(),d.value},set(e){i(),d.value=e,n()}}})}var F=`GTA_WEBSITE`,I=`sso.state`,L=`/auth/callback`,R=[`limitReached`,`magicLinkError`],z=e=>typeof e==`string`&&e.startsWith(`/`)&&!e.startsWith(`//`),B=(e,t,n=!0)=>{if(n)try{let t=new URL(e);if([`http:`,`https:`].includes(t.protocol))return t.origin}catch{}return new URL(t).origin},V=()=>{if(globalThis.crypto?.getRandomValues){let e=new Uint8Array(16);return globalThis.crypto.getRandomValues(e),Array.from(e,e=>e.toString(16).padStart(2,`0`)).join(``)}return`${Date.now().toString(36)}${Math.random().toString(36).slice(2)}`},H=({portalUrl:e,origin:t,state:n,next:r})=>{let i=new URL(`/auth/sign-in`,e);return i.searchParams.set(`app`,F),i.searchParams.set(`redirect_uri`,`${t}${L}`),i.searchParams.set(`state`,n),z(r)&&i.searchParams.set(`next`,r),i.toString()};export{V as a,D as c,H as i,F as n,z as o,I as r,B as s,R as t};
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.