import{_ as e,a as t,h as n,v as r,y as i}from"./ChoK7rke.js";import{En as a,H as o,J as s,L as ee,Ut as c,an as l,it as u,nt as d,ot as f,un as p,vn as m}from"./CaODJcyn.js";var h=new Set([`link`,`style`,`script`,`noscript`]),g=new Set([`title`,`titleTemplate`,`script`,`style`,`noscript`]),_=new Set([`base`,`meta`,`link`,`style`,`script`,`noscript`]),te=new Set([`title`,`base`,`htmlAttrs`,`bodyAttrs`,`meta`,`link`,`style`,`script`,`noscript`]),v=new Set([`base`,`title`,`titleTemplate`,`bodyAttrs`,`htmlAttrs`,`templateParams`]),y=new Set([`key`,`tagPosition`,`tagPriority`,`tagDuplicateStrategy`,`innerHTML`,`textContent`,`processTemplateParams`]),b=new Set([`templateParams`,`htmlAttrs`,`bodyAttrs`]),x=new Set([`theme-color`,`google-site-verification`,`author`,`og:locale:alternate`,`og:image`,`og:video`,`og:audio`,`article:author`,`article:tag`,`book:author`,`book:tag`,`twitter:image`]),S={critical:-8,high:-1,low:2},C=e=>typeof e==`number`?Number.isFinite(e):e;function w(e){return e===`__proto__`||e===`constructor`||e===`prototype`}function T(e){let t=new n;for(let n in e||{})t.hook(n,e[n]);return t}function E(e,t,n){if(e.hooks?._hooks?.[t]?.length)return e.hooks?.callHook(t,n)}var D=/^(?:viewport|description|keywords|robots)$/,O=[`name`,`property`,`http-equiv`];function k(e){let t=e.indexOf(`:`);if(t===-1)return!1;let n=e.slice(t+1);return x.has(n)||n.startsWith(`og:image:`)||n.startsWith(`og:video:`)||n.startsWith(`og:audio:`)||n.startsWith(`twitter:image:`)}function A(e){let{props:t,tag:n,key:r}=e;if(v.has(n))return n;if(n===`link`){if(t.rel===`canonical`)return`canonical`;if(t.rel===`alternate`&&t.hreflang)return`alternate:${t.hreflang}`}if(t.charset)return`charset`;if(n===`meta`)for(let e of O){let n=t[e];if(n!==void 0)return`meta:${n}${(typeof n!=`string`||!n.includes(`:`))&&!D.test(n)&&r?`:key:${r}`:``}`}return r?`${n}:key:${r}`:t.id?`${n}:id:${t.id}`:n===`link`&&t.rel&&t.href?`link:${t.rel}:${t.href}`:g.has(n)&&(e.textContent||e.innerHTML)?`${n}:content:${e.textContent||e.innerHTML}`:void 0}function j(e){let t=e._h||e._d||e.textContent||e.innerHTML;if(t)return t;let n=Object.keys(e.props).sort(),r=`${e.tag}:`,i=``;for(let t of n)r+=`${i}${t}:${String(e.props[t])}`,i=`,`;return r}function M(e,t,n){if(n===`_resolver`)return e;typeof e==`function`&&(!n||n!==`titleTemplate`&&!n.startsWith(`on`))&&(e=e());let r=t?t(n,e):e;if(Array.isArray(r)){let e;for(let n=0;n/=\x00-\x1F\x7F]/;function P(e,t){let n=e===`style`,r=n?new Map:new Set,i=e=>{if(e){if(n){let t=e.indexOf(`:`);t>0&&r.set(e.slice(0,t).trim(),e.slice(t+1).trim())}else e.split(` `).forEach(e=>e&&r.add(e))}};if(typeof t==`string`)(n?t.split(`;`):[t]).forEach(i);else if(Array.isArray(t))t.forEach(i);else if(t&&typeof t==`object`)for(let e in t){let a=t[e];a&&a!==`false`&&(n?r.set(e.trim(),String(a)):i(e))}return r}function F(e,t){if(e.props=e.props||{},!t)return e;if(e.tag===`templateParams`)return e.props=t,e;let n=_.has(e.tag)||e.tag===`htmlAttrs`||e.tag===`bodyAttrs`;for(let r in t){if(w(r))continue;let i=r.startsWith(`data-`),a=n&&!y.has(r),o=a&&!i?r.toLowerCase():r;if(a&&(!o||N.test(o)))continue;let s=t[r];if(s===null)e.props[o]=null;else if(r===`class`||r===`style`)e.props[r]=P(r,s);else if(y.has(r)){if((r===`textContent`||r===`innerHTML`)&&typeof s==`object`){let n=t.type||`application/json`;(n.endsWith(`json`)||n===`speculationrules`||n===`importmap`)&&(e.props.type=n,e[r]=JSON.stringify(s))}else e[r]=s}else if(s!==void 0){let t=String(s),n=e.tag===`meta`&&o===`content`;e.props[o]=t===`true`||t===``?i||n?t:!0:!s&&i&&t===`false`?`false`:s}}return e}function I(e,t){let n;return t.length&&(n=(e,n)=>{for(let r=0;re._w===t._w?e._p-t._p:e._w-t._w,H=()=>100;function U(e){for(let t in e)return!1;return!0}var W=/^tags:|:render/;function G(e,t){let n=(t[`entries:resolve`]?.length||0)+(t[`entries:normalize`]?.length||0);if(e._h!==n){e._h=n;for(let t of e.entries.values())delete t._tags}}function K(e){for(let t=0;t>10==i._p>>10&&n.tag===`meta`&&k(r)?(e.tagMap.set(r,Object.assign([...Array.isArray(i)?i:[i],n],n)),t=!0):(n._w===i._w?n._p>i._p:n._wt?(typeof e==`string`?e:JSON.stringify(e)).replace(ne,`\\u003C`):typeof e==`string`?e.replace(B,`<\\/script`):e;n={...n},r&&(n.innerHTML=i(r)),n.textContent&&(n.textContent=i(n.textContent)),n._d=A(n)}e[t++]=n}}return e.length=t,e}function Z(e,t){let n=t?.tagWeight??e.resolvedOptions._tagWeight??H,r={tagMap:new Map,tags:[]},i=e.hooks?._hooks||{};G(e,i);for(let t of e.entries.values())t._pending!==void 0&&(t.input=t._pending,delete t._pending,delete t._tags,delete t._precomputedTags);let a;(i[`entries:resolve`]?.length||i[`entries:normalize`]?.length)&&(a=[...e.entries.values()],i[`entries:resolve`]?.length&&E(e,`entries:resolve`,{entries:a,...r})),G(e,i);for(let t of a||e.entries.values()){let a=t._tags;if(!a){if(t._precomputedTags&&n===e.resolvedOptions._tagWeight&&!i[`entries:normalize`]?.length&&!i[`entries:resolve`]?.length&&(!t.options||U(t.options)))a=t._precomputedTags;else{if(a=z(t.input,e.resolvedOptions.propResolvers||[]),t.options&&!U(t.options))for(let e of a)Object.assign(e,t.options);if(i[`entries:normalize`]?.length){let n={tags:a,entry:t};E(e,`entries:normalize`,n),a=n.tags}for(let e=0;ep(t)?a(t):t,{_static:!0});function oe(e,t={}){let n=t.head||re();return n.ssr?n.push(e||{},t):se(n,e,t)}function se(e,t,n={}){let r=l();if(r&&!r.active)return{patch(){},dispose(){},_i:-1};let i=m(!1);if(n.onRendered&&r){let e=n.onRendered;n={...n,onRendered:t=>r.run(()=>e(t))}}let a;return c(()=>{let r=i.value?{}:M(t,ae);a?a.patch(r):a=e.push(r,n)}),ee()&&(u(()=>{a.dispose()}),f(()=>{i.value=!0}),d(()=>{i.value=!1})),a}var ce=i({docsBase:e,reporters:r});function $(e){let n=e||t();return n.ssrContext?.head||n.runWithContext(()=>{if(o()){let e=s(`usehead`);if(!e)throw ce.NUXT_E6001();return e}})}function le(e,t={}){return oe(e,{head:t.head||$(t.nuxt),...t})}export{j as a,Z as c,_ as d,S as f,A as i,E as l,le as n,k as o,ie as r,F as s,$ as t,T as u};