import { A as MissingMediaQueryDirective, F as NoMatchingImport, I as NoMatchingRenderer, M as NoClientOnlyHint, R as OnlyResponseCanBeReturned, W as ResponseSentError, Z as AstroError, o as EndpointDidNotReturnAResponse, q as UnavailableAstroGlobal } from "./errors-data_zYnyWRO_.mjs"; import { decodeBase64, decodeHex, encodeBase64, encodeHexUpperCase } from "@oslojs/encoding"; import * as z from "zod/v4"; import colors from "piccolore"; import { escape } from "html-escaper"; import { clsx } from "clsx"; //#region node_modules/astro/dist/core/csp/config.js var ALGORITHMS = { "SHA-256": "sha256-", "SHA-384": "sha384-", "SHA-512": "sha512-" }; var ALGORITHM_VALUES = Object.values(ALGORITHMS); z.enum(Object.keys(ALGORITHMS)).optional().default("SHA-256"); var cspHashSchema = z.custom((value) => { if (typeof value !== "string") return false; return ALGORITHM_VALUES.some((allowedValue) => { return value.startsWith(allowedValue); }); }); var cspKindSchema = z.enum([ "element", "attribute", "default" ]); var ATTRIBUTE_ALLOWED_RESOURCES = [ "'none'", "'unsafe-hashes'", "'unsafe-inline'", "'report-sample'" ]; z.union([z.string(), z.object({ resource: z.string(), kind: cspKindSchema })]).superRefine((value, ctx) => { const resource = typeof value === "string" ? value : value.resource; const kind = typeof value === "string" ? "default" : value.kind; if (kind === "element" && resource === "'unsafe-hashes'") ctx.addIssue({ code: z.ZodIssueCode.custom, message: `The source \`'unsafe-hashes'\` is not valid for \`element\` resources (it is rejected by \`script-src-elem\`/\`style-src-elem\`).`, fatal: true }); else if (kind === "attribute" && !ATTRIBUTE_ALLOWED_RESOURCES.includes(resource)) ctx.addIssue({ code: z.ZodIssueCode.custom, message: `The source \`${resource}\` is not valid for \`attribute\` resources. \`script-src-attr\`/\`style-src-attr\` only accept: ${ATTRIBUTE_ALLOWED_RESOURCES.join(", ")}.`, fatal: true }); }); z.union([cspHashSchema, z.object({ hash: cspHashSchema, kind: cspKindSchema })]); var ALLOWED_DIRECTIVES = [ "base-uri", "child-src", "connect-src", "default-src", "fenced-frame-src", "font-src", "form-action", "frame-ancestors", "frame-src", "img-src", "manifest-src", "media-src", "object-src", "referrer", "report-to", "report-uri", "require-trusted-types-for", "sandbox", "trusted-types", "upgrade-insecure-requests", "worker-src" ]; z.custom((v) => typeof v === "string").superRefine((value, ctx) => { if (!ALLOWED_DIRECTIVES.some((allowedValue) => { return value.startsWith(allowedValue); })) { if (value.startsWith("script-src") || value.startsWith("style-src")) ctx.addIssue({ code: z.ZodIssueCode.custom, message: `Directives \`script-src\` and \`style-src\` (including their \`-elem\`/\`-attr\` variants) are not allowed in \`security.csp.directives\`. Please use \`security.csp.scriptDirective\` and \`security.csp.styleDirective\` instead, scoping resources/hashes to the more specific directives with the \`kind\` option (\`"element"\` or \`"attribute"\`).`, fatal: true }); else ctx.addIssue({ code: z.ZodIssueCode.custom, message: `Invalid directive: "${value}". Allowed directives are: ${ALLOWED_DIRECTIVES.join(", ")}`, fatal: true }); } }); //#endregion //#region node_modules/astro/dist/core/encryption.js var ALGORITHM = "AES-GCM"; async function decodeKey(encoded) { const bytes = decodeBase64(encoded); return crypto.subtle.importKey("raw", bytes.buffer, ALGORITHM, true, ["encrypt", "decrypt"]); } var encoder$1 = new TextEncoder(); var decoder$1 = new TextDecoder(); var IV_LENGTH = 24; async function encryptString(key, raw, additionalData) { const iv = crypto.getRandomValues(new Uint8Array(IV_LENGTH / 2)); const data = encoder$1.encode(raw); const params = { name: ALGORITHM, iv }; if (additionalData) params.additionalData = encoder$1.encode(additionalData); const buffer = await crypto.subtle.encrypt(params, key, data); return encodeHexUpperCase(iv) + encodeBase64(new Uint8Array(buffer)); } async function decryptString(key, encoded, additionalData) { const iv = decodeHex(encoded.slice(0, IV_LENGTH)); const dataArray = decodeBase64(encoded.slice(IV_LENGTH)); const params = { name: ALGORITHM, iv }; if (additionalData) params.additionalData = encoder$1.encode(additionalData); const decryptedBuffer = await crypto.subtle.decrypt(params, key, dataArray); return decoder$1.decode(decryptedBuffer); } async function generateCspDigest(data, algorithm) { const hashBuffer = await crypto.subtle.digest(algorithm, encoder$1.encode(data)); const hash = encodeBase64(new Uint8Array(hashBuffer)); return `${ALGORITHMS[algorithm]}${hash}`; } var ASTRO_GENERATOR = `Astro v7.2.10`; var ASTRO_ERROR_HEADER = "X-Astro-Error"; var DEFAULT_404_COMPONENT = "astro-default-404.astro"; var REDIRECT_STATUS_CODES = [ 301, 302, 303, 307, 308, 300, 304 ]; var REROUTABLE_STATUS_CODES = [404, 500]; var clientAddressSymbol = /* @__PURE__ */ Symbol.for("astro.clientAddress"); var originPathnameSymbol = /* @__PURE__ */ Symbol.for("astro.originPathname"); var fetchStateSymbol = /* @__PURE__ */ Symbol.for("astro.fetchState"); var responseSentSymbol = /* @__PURE__ */ Symbol.for("astro.responseSent"); //#endregion //#region node_modules/astro/dist/runtime/server/astro-global.js function createError(name) { return new AstroError({ ...UnavailableAstroGlobal, message: UnavailableAstroGlobal.message(name) }); } function createAstro(site) { return { get site() { console.warn(`Astro.site inside getStaticPaths is deprecated and will be removed in a future major version of Astro. Use import.meta.env.SITE instead`); return site ? new URL(site) : void 0; }, get generator() { console.warn(`Astro.generator inside getStaticPaths is deprecated and will be removed in a future major version of Astro.`); return ASTRO_GENERATOR; }, get callAction() { throw createError("callAction"); }, get clientAddress() { throw createError("clientAddress"); }, get cookies() { throw createError("cookies"); }, get csp() { throw createError("csp"); }, get currentLocale() { throw createError("currentLocale"); }, get getActionResult() { throw createError("getActionResult"); }, get isPrerendered() { throw createError("isPrerendered"); }, get locals() { throw createError("locals"); }, get originPathname() { throw createError("originPathname"); }, get params() { throw createError("params"); }, get preferredLocale() { throw createError("preferredLocale"); }, get preferredLocaleList() { throw createError("preferredLocaleList"); }, get props() { throw createError("props"); }, get redirect() { throw createError("redirect"); }, get request() { throw createError("request"); }, get response() { throw createError("response"); }, get rewrite() { throw createError("rewrite"); }, get routePattern() { throw createError("routePattern"); }, get self() { throw createError("self"); }, get slots() { throw createError("slots"); }, get url() { throw createError("url"); }, get session() { throw createError("session"); }, get cache() { throw createError("cache"); }, get logger() { throw createError("logger"); } }; } //#endregion //#region node_modules/astro/dist/runtime/server/endpoint.js async function renderEndpoint(mod, context, isPrerendered, logger, state) { const { request, url } = context; const method = request.method.toUpperCase(); let handler = mod[method] ?? mod["ALL"]; if (!handler && method === "HEAD" && mod["GET"]) handler = mod["GET"]; if (isPrerendered && !["GET", "HEAD"].includes(method)) logger.warn("router", `${url.pathname} ${colors.bold(method)} requests are not available in static endpoints. Mark this page as server-rendered (\`export const prerender = false;\`) or update your config to \`output: 'server'\` to make all your pages server-rendered by default.`); if (handler === void 0) { logger.warn("router", `No API Route handler exists for the method "${method}" for the route "${url.pathname}". Found handlers: ${Object.keys(mod).map((exp) => JSON.stringify(exp)).join(", ")} ` + ("all" in mod ? `One of the exported handlers is "all" (lowercase), did you mean to export 'ALL'? ` : "")); return new Response(null, { status: 404 }); } if (typeof handler !== "function") { logger.error("router", `The route "${url.pathname}" exports a value for the method "${method}", but it is of the type ${typeof handler} instead of a function.`); return new Response(null, { status: 500 }); } let response = await handler.call(mod, context); if (!response || response instanceof Response === false) throw new AstroError(EndpointDidNotReturnAResponse); if (state && REROUTABLE_STATUS_CODES.includes(response.status)) state.skipErrorReroute = true; if (method === "HEAD") return new Response(null, response); return response; } //#endregion //#region node_modules/astro/dist/runtime/server/util.js function isPromise(value) { return !!value && typeof value === "object" && "then" in value && typeof value.then === "function"; } async function* streamAsyncIterator(stream) { const reader = stream.getReader(); try { while (true) { const { done, value } = await reader.read(); if (done) return; yield value; } } finally { reader.releaseLock(); } } //#endregion //#region node_modules/astro/dist/runtime/server/escape.js var escapeHTML = escape; function stringifyForScript(value) { return JSON.stringify(value)?.replace(/ { if (isHTMLString(value)) return value; if (typeof value === "string") return new HTMLString(value); return value; }; function isHTMLString(value) { return !!value?.[htmlStringSymbol]; } function markHTMLBytes(bytes) { return new HTMLBytes(bytes); } function hasGetReader(obj) { return typeof obj.getReader === "function"; } async function* unescapeChunksAsync(iterable) { if (hasGetReader(iterable)) for await (const chunk of streamAsyncIterator(iterable)) yield unescapeHTML(chunk); else for await (const chunk of iterable) yield unescapeHTML(chunk); } function* unescapeChunks(iterable) { for (const chunk of iterable) yield unescapeHTML(chunk); } function unescapeHTML(str) { if (!!str && typeof str === "object") { if (str instanceof Uint8Array) return markHTMLBytes(str); else if (str instanceof Response && str.body) { const body = str.body; return unescapeChunksAsync(body); } else if (typeof str.then === "function") return Promise.resolve(str).then((value) => { return unescapeHTML(value); }); else if (str[/* @__PURE__ */ Symbol.for("astro:slot-string")]) return str; else if (Symbol.iterator in str) return unescapeChunks(str); else if (Symbol.asyncIterator in str || hasGetReader(str)) return unescapeChunksAsync(str); } return markHTMLString(str); } //#endregion //#region node_modules/astro/dist/core/head-propagation/resolver.js function isPropagatingHint(hint) { return hint === "self" || hint === "in-tree"; } //#endregion //#region node_modules/astro/dist/runtime/server/render/astro/factory.js function isAstroComponentFactory(obj) { return obj == null ? false : obj.isAstroComponentFactory === true; } //#endregion //#region node_modules/astro/dist/runtime/server/serialize.js var PROP_TYPE = { Value: 0, JSON: 1, RegExp: 2, Date: 3, Map: 4, Set: 5, BigInt: 6, URL: 7, Uint8Array: 8, Uint16Array: 9, Uint32Array: 10, Infinity: 11 }; function serializeArray(value, metadata = {}, parents = /* @__PURE__ */ new WeakSet()) { if (parents.has(value)) throw new Error(`Cyclic reference detected while serializing props for <${metadata.displayName} client:${metadata.hydrate}>! Cyclic references cannot be safely serialized for client-side usage. Please remove the cyclic reference.`); parents.add(value); const serialized = value.map((v) => { return convertToSerializedForm(v, metadata, parents); }); parents.delete(value); return serialized; } function serializeObject(value, metadata = {}, parents = /* @__PURE__ */ new WeakSet()) { if (parents.has(value)) throw new Error(`Cyclic reference detected while serializing props for <${metadata.displayName} client:${metadata.hydrate}>! Cyclic references cannot be safely serialized for client-side usage. Please remove the cyclic reference.`); parents.add(value); const serialized = Object.fromEntries(Object.entries(value).map(([k, v]) => { return [k, convertToSerializedForm(v, metadata, parents)]; })); parents.delete(value); return serialized; } function convertToSerializedForm(value, metadata = {}, parents = /* @__PURE__ */ new WeakSet()) { switch (Object.prototype.toString.call(value)) { case "[object Date]": return [PROP_TYPE.Date, value.toISOString()]; case "[object RegExp]": return [PROP_TYPE.RegExp, value.source]; case "[object Map]": return [PROP_TYPE.Map, serializeArray(Array.from(value), metadata, parents)]; case "[object Set]": return [PROP_TYPE.Set, serializeArray(Array.from(value), metadata, parents)]; case "[object BigInt]": return [PROP_TYPE.BigInt, value.toString()]; case "[object URL]": return [PROP_TYPE.URL, value.toString()]; case "[object Array]": return [PROP_TYPE.JSON, serializeArray(value, metadata, parents)]; case "[object Uint8Array]": return [PROP_TYPE.Uint8Array, Array.from(value)]; case "[object Uint16Array]": return [PROP_TYPE.Uint16Array, Array.from(value)]; case "[object Uint32Array]": return [PROP_TYPE.Uint32Array, Array.from(value)]; default: if (value !== null && typeof value === "object") return [PROP_TYPE.Value, serializeObject(value, metadata, parents)]; if (value === Number.POSITIVE_INFINITY) return [PROP_TYPE.Infinity, 1]; if (value === Number.NEGATIVE_INFINITY) return [PROP_TYPE.Infinity, -1]; if (value === void 0) return [PROP_TYPE.Value]; return [PROP_TYPE.Value, value]; } } function serializeProps(props, metadata) { return JSON.stringify(serializeObject(props, metadata)); } //#endregion //#region node_modules/astro/dist/runtime/server/hydration.js var transitionDirectivesToCopyOnIsland = Object.freeze([ "data-astro-transition-scope", "data-astro-transition-persist", "data-astro-transition-persist-props" ]); function extractDirectives(inputProps, clientDirectives) { let extracted = { isPage: false, hydration: null, props: {}, propsWithoutTransitionAttributes: {} }; for (const [key, value] of Object.entries(inputProps)) { if (key.startsWith("server:")) { if (key === "server:root") extracted.isPage = true; } if (key.startsWith("client:")) { if (!extracted.hydration) extracted.hydration = { directive: "", value: "", componentUrl: "", componentExport: { value: "" } }; switch (key) { case "client:component-path": extracted.hydration.componentUrl = value; break; case "client:component-export": extracted.hydration.componentExport.value = value; break; case "client:component-hydration": break; case "client:display-name": break; default: extracted.hydration.directive = key.split(":")[1]; extracted.hydration.value = value; if (!clientDirectives.has(extracted.hydration.directive)) { const hydrationMethods = Array.from(clientDirectives.keys()).map((d) => `client:${d}`).join(", "); throw new Error(`Error: invalid hydration directive "${key}". Supported hydration methods: ${hydrationMethods}`); } if (extracted.hydration.directive === "media" && typeof extracted.hydration.value !== "string") throw new AstroError(MissingMediaQueryDirective); } } else { extracted.props[key] = value; if (!transitionDirectivesToCopyOnIsland.includes(key)) extracted.propsWithoutTransitionAttributes[key] = value; } } for (const sym of Object.getOwnPropertySymbols(inputProps)) { extracted.props[sym] = inputProps[sym]; extracted.propsWithoutTransitionAttributes[sym] = inputProps[sym]; } return extracted; } async function generateHydrateScript(scriptOptions, metadata) { const { renderer, result, astroId, props, attrs } = scriptOptions; const { hydrate, componentUrl, componentExport } = metadata; if (!componentExport.value) throw new AstroError({ ...NoMatchingImport, message: NoMatchingImport.message(metadata.displayName) }); const island = { children: "", props: { uid: astroId } }; if (attrs) for (const [key, value] of Object.entries(attrs)) island.props[key] = escapeHTML(value); island.props["component-url"] = await result.resolve(decodeURI(componentUrl)); if (renderer.clientEntrypoint) { island.props["component-export"] = componentExport.value; island.props["renderer-url"] = await result.resolve(decodeURI(renderer.clientEntrypoint.toString())); island.props["props"] = escapeHTML(serializeProps(props, metadata)); } island.props["ssr"] = ""; island.props["client"] = hydrate; let beforeHydrationUrl = await result.resolve("astro:scripts/before-hydration.js"); if (beforeHydrationUrl.length) island.props["before-hydration-url"] = beforeHydrationUrl; island.props["opts"] = escapeHTML(JSON.stringify({ name: metadata.displayName, value: metadata.hydrateArgs || "" })); transitionDirectivesToCopyOnIsland.forEach((name) => { if (typeof props[name] !== "undefined") island.props[name] = escapeHTML(String(props[name])); }); return island; } //#endregion //#region node_modules/astro/dist/runtime/server/shorthash.js /** * shortdash - https://github.com/bibig/node-shorthash * * @license * * (The MIT License) * * Copyright (c) 2013 Bibig * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation * files (the "Software"), to deal in the Software without * restriction, including without limitation the rights to use, * copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following * conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE. */ var dictionary = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXY"; var binary = 61; function bitwise(str) { let hash = 0; if (str.length === 0) return hash; for (let i = 0; i < str.length; i++) { const ch = str.charCodeAt(i); hash = (hash << 5) - hash + ch; hash = hash & hash; } return hash; } function shorthash(text) { let num; let result = ""; let integer = bitwise(text); const sign = integer < 0 ? "Z" : ""; integer = Math.abs(integer); while (integer >= binary) { num = integer % binary; integer = Math.floor(integer / binary); result = dictionary[num] + result; } if (integer > 0) result = dictionary[integer] + result; return sign + result; } //#endregion //#region node_modules/astro/dist/runtime/server/render/astro/head-and-content.js var headAndContentSym = /* @__PURE__ */ Symbol.for("astro.headAndContent"); function isHeadAndContent(obj) { return typeof obj === "object" && obj !== null && !!obj[headAndContentSym]; } function createThinHead() { return { [headAndContentSym]: true }; } //#endregion //#region node_modules/astro/dist/runtime/server/astro-island.prebuilt.js var astro_island_prebuilt_default = `(()=>{var g=Object.defineProperty;var w=(a,s,c)=>s in a?g(a,s,{enumerable:!0,configurable:!0,writable:!0,value:c}):a[s]=c;var l=(a,s,c)=>w(a,typeof s!="symbol"?s+"":s,c);var E=new Set(["__proto__","constructor","prototype"]);{let a={0:t=>y(t),1:t=>c(t),2:t=>new RegExp(t),3:t=>new Date(t),4:t=>new Map(c(t)),5:t=>new Set(c(t)),6:t=>BigInt(t),7:t=>new URL(t),8:t=>new Uint8Array(t),9:t=>new Uint16Array(t),10:t=>new Uint32Array(t),11:t=>Number.POSITIVE_INFINITY*t},s=t=>{let[p,e]=t;return p in a?a[p](e):void 0},c=t=>t.map(s),y=t=>typeof t!="object"||t===null?t:Object.fromEntries(Object.entries(t).map(([p,e])=>[p,s(e)]));class f extends HTMLElement{constructor(){super(...arguments);l(this,"Component");l(this,"hydrator");l(this,"hydrate",async()=>{var b;if(!this.hydrator||!this.isConnected)return;let e=(b=this.parentElement)==null?void 0:b.closest("astro-island[ssr]");if(e){e.addEventListener("astro:hydrate",this.hydrate,{once:!0});return}let r=this.querySelectorAll("astro-slot"),n={},d=this.querySelectorAll("template[data-astro-template]");for(let o of d){let i=o.closest(this.tagName);i!=null&&i.isSameNode(this)&&(n[o.getAttribute("data-astro-template")||"default"]=o.innerHTML,o.remove())}for(let o of r){let i=o.closest(this.tagName);i!=null&&i.isSameNode(this)&&(n[o.getAttribute("name")||"default"]=o.innerHTML)}let u;try{u=this.hasAttribute("props")?y(JSON.parse(this.getAttribute("props"))):{}}catch(o){let i=this.getAttribute("component-url")||"",v=this.getAttribute("component-export");throw v&&(i+=\` (export \${v})\`),console.error(\`[hydrate] Error parsing props for component \${i}\`,this.getAttribute("props"),o),o}let h;await this.hydrator(this)(this.Component,u,n,{client:this.getAttribute("client")}),this.removeAttribute("ssr"),this.dispatchEvent(new CustomEvent("astro:hydrate"))});l(this,"unmount",()=>{this.isConnected||this.dispatchEvent(new CustomEvent("astro:unmount"))})}disconnectedCallback(){document.removeEventListener("astro:after-swap",this.unmount),document.addEventListener("astro:after-swap",this.unmount,{once:!0})}connectedCallback(){if(!this.hasAttribute("await-children")||document.readyState==="interactive"||document.readyState==="complete")this.childrenConnectedCallback();else{let e=()=>{document.removeEventListener("DOMContentLoaded",e),r.disconnect(),this.childrenConnectedCallback()},r=new MutationObserver(()=>{var n;((n=this.lastChild)==null?void 0:n.nodeType)===Node.COMMENT_NODE&&this.lastChild.nodeValue==="astro:end"&&(this.lastChild.remove(),e())});r.observe(this,{childList:!0}),document.addEventListener("DOMContentLoaded",e)}}async childrenConnectedCallback(){let e=this.getAttribute("before-hydration-url");e&&await import(e),this.start()}getRetryImportUrl(e){let r=new URL(e,document.baseURI);return r.searchParams.set("astro-retry",Date.now().toString()),r.toString()}async importWithRetry(e){try{return await import(e)}catch(r){return await new Promise(n=>setTimeout(n,1e3)),import(this.getRetryImportUrl(e))}}handleHydrationError(e){let r=this.getAttribute("component-url"),n=new CustomEvent("astro:hydration-error",{cancelable:!0,bubbles:!0,composed:!0,detail:{error:e,componentUrl:r}});this.dispatchEvent(n)&&console.error(\`[astro-island] Error hydrating \${r}\`,e)}async start(){let e=JSON.parse(this.getAttribute("opts")),r=this.getAttribute("client");if(Astro[r]===void 0){window.addEventListener(\`astro:\${r}\`,()=>this.start(),{once:!0});return}try{await Astro[r](async()=>{let n=this.getAttribute("renderer-url");try{let[d,{default:u}]=await Promise.all([this.importWithRetry(this.getAttribute("component-url")),n?this.importWithRetry(n):Promise.resolve({default:()=>()=>{}})]),h=this.getAttribute("component-export")||"default";if(h.includes(".")){this.Component=d;for(let m of h.split(".")){if(E.has(m)||!this.Component||typeof this.Component!="object"&&typeof this.Component!="function"||!Object.hasOwn(this.Component,m))throw new Error(\`Invalid component export path: \${h}\`);this.Component=this.Component[m]}}else{if(E.has(h))throw new Error(\`Invalid component export path: \${h}\`);this.Component=d[h]}return this.hydrator=u,this.hydrate}catch(d){return this.handleHydrationError(d),()=>{}}},e,this)}catch(n){this.handleHydrationError(n)}}attributeChangedCallback(){this.hydrate()}}l(f,"observedAttributes",["props"]),customElements.get("astro-island")||customElements.define("astro-island",f)}})();`; //#endregion //#region node_modules/astro/dist/runtime/server/astro-island.prebuilt-dev.js var astro_island_prebuilt_dev_default = `(()=>{var g=Object.defineProperty;var w=(c,s,d)=>s in c?g(c,s,{enumerable:!0,configurable:!0,writable:!0,value:d}):c[s]=d;var l=(c,s,d)=>w(c,typeof s!="symbol"?s+"":s,d);var E=new Set(["__proto__","constructor","prototype"]);{let c={0:t=>y(t),1:t=>d(t),2:t=>new RegExp(t),3:t=>new Date(t),4:t=>new Map(d(t)),5:t=>new Set(d(t)),6:t=>BigInt(t),7:t=>new URL(t),8:t=>new Uint8Array(t),9:t=>new Uint16Array(t),10:t=>new Uint32Array(t),11:t=>Number.POSITIVE_INFINITY*t},s=t=>{let[p,e]=t;return p in c?c[p](e):void 0},d=t=>t.map(s),y=t=>typeof t!="object"||t===null?t:Object.fromEntries(Object.entries(t).map(([p,e])=>[p,s(e)]));class f extends HTMLElement{constructor(){super(...arguments);l(this,"Component");l(this,"hydrator");l(this,"hydrate",async()=>{var b;if(!this.hydrator||!this.isConnected)return;let e=(b=this.parentElement)==null?void 0:b.closest("astro-island[ssr]");if(e){e.addEventListener("astro:hydrate",this.hydrate,{once:!0});return}let r=this.querySelectorAll("astro-slot"),n={},h=this.querySelectorAll("template[data-astro-template]");for(let o of h){let a=o.closest(this.tagName);a!=null&&a.isSameNode(this)&&(n[o.getAttribute("data-astro-template")||"default"]=o.innerHTML,o.remove())}for(let o of r){let a=o.closest(this.tagName);a!=null&&a.isSameNode(this)&&(n[o.getAttribute("name")||"default"]=o.innerHTML)}let m;try{m=this.hasAttribute("props")?y(JSON.parse(this.getAttribute("props"))):{}}catch(o){let a=this.getAttribute("component-url")||"",v=this.getAttribute("component-export");throw v&&(a+=\` (export \${v})\`),console.error(\`[hydrate] Error parsing props for component \${a}\`,this.getAttribute("props"),o),o}let i,u=this.hydrator(this);i=performance.now(),await u(this.Component,m,n,{client:this.getAttribute("client")}),i&&this.setAttribute("client-render-time",(performance.now()-i).toString()),this.removeAttribute("ssr"),this.dispatchEvent(new CustomEvent("astro:hydrate"))});l(this,"unmount",()=>{this.isConnected||this.dispatchEvent(new CustomEvent("astro:unmount"))})}disconnectedCallback(){document.removeEventListener("astro:after-swap",this.unmount),document.addEventListener("astro:after-swap",this.unmount,{once:!0})}connectedCallback(){if(!this.hasAttribute("await-children")||document.readyState==="interactive"||document.readyState==="complete")this.childrenConnectedCallback();else{let e=()=>{document.removeEventListener("DOMContentLoaded",e),r.disconnect(),this.childrenConnectedCallback()},r=new MutationObserver(()=>{var n;((n=this.lastChild)==null?void 0:n.nodeType)===Node.COMMENT_NODE&&this.lastChild.nodeValue==="astro:end"&&(this.lastChild.remove(),e())});r.observe(this,{childList:!0}),document.addEventListener("DOMContentLoaded",e)}}async childrenConnectedCallback(){let e=this.getAttribute("before-hydration-url");e&&await import(e),this.start()}getRetryImportUrl(e){let r=new URL(e,document.baseURI);return r.searchParams.set("astro-retry",Date.now().toString()),r.toString()}async importWithRetry(e){try{return await import(e)}catch(r){return await new Promise(n=>setTimeout(n,1e3)),import(this.getRetryImportUrl(e))}}handleHydrationError(e){let r=this.getAttribute("component-url"),n=new CustomEvent("astro:hydration-error",{cancelable:!0,bubbles:!0,composed:!0,detail:{error:e,componentUrl:r}});this.dispatchEvent(n)&&console.error(\`[astro-island] Error hydrating \${r}\`,e)}async start(){let e=JSON.parse(this.getAttribute("opts")),r=this.getAttribute("client");if(Astro[r]===void 0){window.addEventListener(\`astro:\${r}\`,()=>this.start(),{once:!0});return}try{await Astro[r](async()=>{let n=this.getAttribute("renderer-url");try{let[h,{default:m}]=await Promise.all([this.importWithRetry(this.getAttribute("component-url")),n?this.importWithRetry(n):Promise.resolve({default:()=>()=>{}})]),i=this.getAttribute("component-export")||"default";if(i.includes(".")){this.Component=h;for(let u of i.split(".")){if(E.has(u)||!this.Component||typeof this.Component!="object"&&typeof this.Component!="function"||!Object.hasOwn(this.Component,u))throw new Error(\`Invalid component export path: \${i}\`);this.Component=this.Component[u]}}else{if(E.has(i))throw new Error(\`Invalid component export path: \${i}\`);this.Component=h[i]}return this.hydrator=m,this.hydrate}catch(h){return this.handleHydrationError(h),()=>{}}},e,this)}catch(n){this.handleHydrationError(n)}}attributeChangedCallback(){this.hydrate()}}l(f,"observedAttributes",["props"]),customElements.get("astro-island")||customElements.define("astro-island",f)}})();`; //#endregion //#region node_modules/astro/dist/runtime/server/astro-island-styles.js var ISLAND_STYLES = "astro-island,astro-slot,astro-static-slot{display:contents}"; //#endregion //#region node_modules/astro/dist/runtime/server/scripts.js function determineIfNeedsHydrationScript(result) { if (result._metadata.templateDepth > 0) return !result._metadata.hasHydrationScript; if (result._metadata.hasHydrationScript) return false; return result._metadata.hasHydrationScript = true; } function determinesIfNeedsDirectiveScript(result, directive) { if (result._metadata.templateDepth > 0) return !result._metadata.hasDirectives.has(directive); if (result._metadata.hasDirectives.has(directive)) return false; result._metadata.hasDirectives.add(directive); return true; } function getDirectiveScriptText(result, directive) { const clientDirective = result.clientDirectives.get(directive); if (!clientDirective) throw new Error(`Unknown directive: ${directive}`); return clientDirective; } function getPrescripts(result, type, directive) { switch (type) { case "both": return `