@vuebro/runtime 1.4.9 → 1.4.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -14,4 +14,4 @@ import{c as Xn,r as Yn,g as Wt}from"./markdown-9kbgniO_.js";import{computed as n
14
14
  color: white;
15
15
  font-weight: bold;
16
16
  padding: 2px 0.5em;
17
- `,u=`%c${[f,o].filter(Boolean).join(":")}`;typeof t.args[0]=="string"?c(`${u}%c ${t.args[0]}`,m,"",...t.args.slice(1)):c(u,m,...t.args)}}function vo(e={}){return go({reporters:e.reporters||[new _o({})],prompt(c,o={}){return o.type==="confirm"?Promise.resolve(confirm(c)):Promise.resolve(prompt(c))},...e})}const $o=vo(),wo=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,bo=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,Eo=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function So(e,t){if(e==="__proto__"||e==="constructor"&&t&&typeof t=="object"&&"prototype"in t){Po(e);return}return t}function Po(e){console.warn(`[destr] Dropping "${e}" key to prevent prototype pollution.`)}function Ro(e,t={}){if(typeof e!="string")return e;if(e[0]==='"'&&e[e.length-1]==='"'&&e.indexOf("\\")===-1)return e.slice(1,-1);const c=e.trim();if(c.length<=9)switch(c.toLowerCase()){case"true":return!0;case"false":return!1;case"undefined":return;case"null":return null;case"nan":return Number.NaN;case"infinity":return Number.POSITIVE_INFINITY;case"-infinity":return Number.NEGATIVE_INFINITY}if(!Eo.test(e)){if(t.strict)throw new SyntaxError("[destr] Invalid JSON");return e}try{if(wo.test(e)||bo.test(e)){if(t.strict)throw new Error("[destr] Possible prototype pollution");return JSON.parse(e,So)}return JSON.parse(e)}catch(o){if(t.strict)throw o;return e}}const jo=/#/g,No=/&/g,Oo=/\//g,To=/=/g,Zt=/\+/g,ko=/%5e/gi,qo=/%60/gi,Io=/%7c/gi,Co=/%20/gi;function Ao(e){return encodeURI(""+e).replace(Io,"|")}function Ht(e){return Ao(typeof e=="string"?e:JSON.stringify(e)).replace(Zt,"%2B").replace(Co,"+").replace(jo,"%23").replace(No,"%26").replace(qo,"`").replace(ko,"^").replace(Oo,"%2F")}function Ut(e){return Ht(e).replace(To,"%3D")}function Ln(e=""){try{return decodeURIComponent(""+e)}catch{return""+e}}function Do(e){return Ln(e.replace(Zt," "))}function Mo(e){return Ln(e.replace(Zt," "))}function Vo(e=""){const t=Object.create(null);e[0]==="?"&&(e=e.slice(1));for(const c of e.split("&")){const o=c.match(/([^=]+)=?(.*)/)||[];if(o.length<2)continue;const f=Do(o[1]);if(f==="__proto__"||f==="constructor")continue;const n=Mo(o[2]||"");t[f]===void 0?t[f]=n:Array.isArray(t[f])?t[f].push(n):t[f]=[t[f],n]}return t}function Lo(e,t){return(typeof t=="number"||typeof t=="boolean")&&(t=String(t)),t?Array.isArray(t)?t.map(c=>`${Ut(e)}=${Ht(c)}`).join("&"):`${Ut(e)}=${Ht(t)}`:Ut(e)}function Fo(e){return Object.keys(e).filter(t=>e[t]!==void 0).map(t=>Lo(t,e[t])).filter(Boolean).join("&")}const Uo=/^[\s\w\0+.-]{2,}:([/\\]{1,2})/,zo=/^[\s\w\0+.-]{2,}:([/\\]{2})?/,Ko=/^([/\\]\s*){2,}[^/\\]/,Ho=/^\.?\//;function Fn(e,t={}){return typeof t=="boolean"&&(t={acceptRelative:t}),t.strict?Uo.test(e):zo.test(e)||(t.acceptRelative?Ko.test(e):!1)}function Go(e="",t){return e.endsWith("/")}function Jo(e="",t){return(Go(e)?e.slice(0,-1):e)||"/"}function Bo(e="",t){return e.endsWith("/")?e:e+"/"}function Wo(e,t){if(Xo(t)||Fn(e))return e;const c=Jo(t);return e.startsWith(c)?e:Zo(c,e)}function Qo(e,t){const c=xo(e),o={...Vo(c.search),...t};return c.search=Fo(o),ei(c)}function Xo(e){return!e||e==="/"}function Yo(e){return e&&e!=="/"}function Zo(e,...t){let c=e||"";for(const o of t.filter(f=>Yo(f)))if(c){const f=o.replace(Ho,"");c=Bo(c)+f}else c=o;return c}const Un=Symbol.for("ufo:protocolRelative");function xo(e="",t){const c=e.match(/^[\s\0]*(blob:|data:|javascript:|vbscript:)(.*)/i);if(c){const[,S,$=""]=c;return{protocol:S.toLowerCase(),pathname:$,href:S+$,auth:"",host:"",search:"",hash:""}}if(!Fn(e,{acceptRelative:!0}))return Sn(e);const[,o="",f,n=""]=e.replace(/\\/g,"/").match(/^[\s\0]*([\w+.-]{2,}:)?\/\/([^/@]+@)?(.*)/)||[];let[,m="",u=""]=n.match(/([^#/?]*)(.*)?/)||[];o==="file:"&&(u=u.replace(/\/(?=[A-Za-z]:)/,""));const{pathname:h,search:_,hash:s}=Sn(u);return{protocol:o.toLowerCase(),auth:f?f.slice(0,Math.max(0,f.length-1)):"",host:m,pathname:h,search:_,hash:s,[Un]:!o}}function Sn(e=""){const[t="",c="",o=""]=(e.match(/([^#?]*)(\?[^#]*)?(#.*)?/)||[]).splice(1);return{pathname:t,search:c,hash:o}}function ei(e){const t=e.pathname||"",c=e.search?(e.search.startsWith("?")?"":"?")+e.search:"",o=e.hash||"",f=e.auth?e.auth+"@":"",n=e.host||"";return(e.protocol||e[Un]?(e.protocol||"")+"//":"")+f+n+t+c+o}class zn extends Error{constructor(t,c){super(t,c),this.name="FetchError",c?.cause&&!this.cause&&(this.cause=c.cause)}}function Kn(e){const t=e.error?.message||e.error?.toString()||"",c=e.request?.method||e.options?.method||"GET",o=e.request?.url||String(e.request)||"/",f=`[${c}] ${JSON.stringify(o)}`,n=e.response?`${e.response.status} ${e.response.statusText}`:"<no response>",m=`${f}: ${n}${t?` ${t}`:""}`,u=new zn(m,e.error?{cause:e.error}:void 0);for(const h of["request","options","response"])Object.defineProperty(u,h,{get(){return e[h]}});for(const[h,_]of[["data","_data"],["status","status"],["statusCode","status"],["statusText","statusText"],["statusMessage","statusText"]])Object.defineProperty(u,h,{get(){return e.response&&e.response[_]}});return u}const ti=new Set(Object.freeze(["PATCH","POST","PUT","DELETE"]));function Pn(e="GET"){return ti.has(e.toUpperCase())}function ri(e){if(e===void 0)return!1;const t=typeof e;return t==="string"||t==="number"||t==="boolean"||t===null?!0:t!=="object"?!1:Array.isArray(e)?!0:e.buffer||e instanceof FormData||e instanceof URLSearchParams?!1:e.constructor&&e.constructor.name==="Object"||typeof e.toJSON=="function"}const ni=new Set(["image/svg","application/xml","application/xhtml","application/html"]),si=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function oi(e=""){if(!e)return"json";const t=e.split(";").shift()||"";return si.test(t)?"json":t==="text/event-stream"?"stream":ni.has(t)||t.startsWith("text/")?"text":"blob"}function ii(e,t,c,o){const f=ai(t?.headers??e?.headers,c?.headers,o);let n;return(c?.query||c?.params||t?.params||t?.query)&&(n={...c?.params,...c?.query,...t?.params,...t?.query}),{...c,...t,query:n,params:n,headers:f}}function ai(e,t,c){if(!t)return new c(e);const o=new c(t);if(e)for(const[f,n]of Symbol.iterator in e||Array.isArray(e)?e:new c(e))o.set(f,n);return o}async function yt(e,t){if(t)if(Array.isArray(t))for(const c of t)await c(e);else await t(e)}const ui=new Set([408,409,425,429,500,502,503,504]),ci=new Set([101,204,205,304]);function xt(e={}){const{fetch:t=globalThis.fetch,Headers:c=globalThis.Headers,AbortController:o=globalThis.AbortController}=e;async function f(u){const h=u.error&&u.error.name==="AbortError"&&!u.options.timeout||!1;if(u.options.retry!==!1&&!h){let s;typeof u.options.retry=="number"?s=u.options.retry:s=Pn(u.options.method)?0:1;const S=u.response&&u.response.status||500;if(s>0&&(Array.isArray(u.options.retryStatusCodes)?u.options.retryStatusCodes.includes(S):ui.has(S))){const $=typeof u.options.retryDelay=="function"?u.options.retryDelay(u):u.options.retryDelay||0;return $>0&&await new Promise(v=>setTimeout(v,$)),n(u.request,{...u.options,retry:s-1})}}const _=Kn(u);throw Error.captureStackTrace&&Error.captureStackTrace(_,n),_}const n=async function(h,_={}){const s={request:h,options:ii(h,_,e.defaults,c),response:void 0,error:void 0};if(s.options.method&&(s.options.method=s.options.method.toUpperCase()),s.options.onRequest&&(await yt(s,s.options.onRequest),s.options.headers instanceof c||(s.options.headers=new c(s.options.headers||{}))),typeof s.request=="string"&&(s.options.baseURL&&(s.request=Wo(s.request,s.options.baseURL)),s.options.query&&(s.request=Qo(s.request,s.options.query),delete s.options.query),"query"in s.options&&delete s.options.query,"params"in s.options&&delete s.options.params),s.options.body&&Pn(s.options.method))if(ri(s.options.body)){const v=s.options.headers.get("content-type");typeof s.options.body!="string"&&(s.options.body=v==="application/x-www-form-urlencoded"?new URLSearchParams(s.options.body).toString():JSON.stringify(s.options.body)),v||s.options.headers.set("content-type","application/json"),s.options.headers.has("accept")||s.options.headers.set("accept","application/json")}else("pipeTo"in s.options.body&&typeof s.options.body.pipeTo=="function"||typeof s.options.body.pipe=="function")&&("duplex"in s.options||(s.options.duplex="half"));let S;if(!s.options.signal&&s.options.timeout){const v=new o;S=setTimeout(()=>{const g=new Error("[TimeoutError]: The operation was aborted due to timeout");g.name="TimeoutError",g.code=23,v.abort(g)},s.options.timeout),s.options.signal=v.signal}try{s.response=await t(s.request,s.options)}catch(v){return s.error=v,s.options.onRequestError&&await yt(s,s.options.onRequestError),await f(s)}finally{S&&clearTimeout(S)}if((s.response.body||s.response._bodyInit)&&!ci.has(s.response.status)&&s.options.method!=="HEAD"){const v=(s.options.parseResponse?"json":s.options.responseType)||oi(s.response.headers.get("content-type")||"");switch(v){case"json":{const g=await s.response.text(),b=s.options.parseResponse||Ro;s.response._data=b(g);break}case"stream":{s.response._data=s.response.body||s.response._bodyInit;break}default:s.response._data=await s.response[v]()}}return s.options.onResponse&&await yt(s,s.options.onResponse),!s.options.ignoreResponseError&&s.response.status>=400&&s.response.status<600?(s.options.onResponseError&&await yt(s,s.options.onResponseError),await f(s)):s.response},m=async function(h,_){return(await n(h,_))._data};return m.raw=n,m.native=(...u)=>t(...u),m.create=(u={},h={})=>xt({...e,...h,defaults:{...e.defaults,...h.defaults,...u}}),m}const vt=(function(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")})(),Hn=vt.fetch?(...e)=>vt.fetch(...e):()=>Promise.reject(new Error("[ofetch] global.fetch is not supported!")),Gn=vt.Headers,Jn=vt.AbortController,er=xt({fetch:Hn,Headers:Gn,AbortController:Jn}),li=er,bi=Object.freeze(Object.defineProperty({__proto__:null,$fetch:li,AbortController:Jn,FetchError:zn,Headers:Gn,createFetch:xt,createFetchError:Kn,fetch:Hn,ofetch:er},Symbol.toStringTag,{value:"Module"})),di={$id:"credentials",additionalProperties:{properties:{accessKeyId:{default:null,nullable:!0,type:"string"},Bucket:{default:null,nullable:!0,type:"string"},endpoint:{default:null,nullable:!0,type:"string"},region:{default:null,nullable:!0,type:"string"},secretAccessKey:{default:null,nullable:!0,type:"string"}},type:"object"},type:"object"},fi={$id:"feed",additionalProperties:!1,properties:{feed_url:{type:"string"},home_page_url:{type:"string"},items:{default:[],items:{additionalProperties:!1,dynamicDefaults:{date_published:"datetime",id:"uuid"},properties:{attachments:{default:[],items:{additionalProperties:!1,properties:{mime_type:{default:"",type:"string"},url:{default:"",type:"string"}},type:"object"},type:"array"},content_html:{default:"",type:"string"},date_published:{type:"string"},id:{type:"string"},title:{default:"",type:"string"},url:{type:"string"}},type:"object"},type:"array"},title:{default:"",type:"string"},version:{default:"https://jsonfeed.org/version/1",enum:["https://jsonfeed.org/version/1","https://jsonfeed.org/version/1.1"],type:"string"}},type:"object"},hi={$id:"fonts",items:{type:"string"},type:"array"},pi={$id:"importmap",additionalProperties:!1,properties:{imports:{additionalProperties:{type:"string"},default:{},type:"object"},scopes:{additionalProperties:{additionalProperties:{type:"string"},type:"object"},type:"object"}},type:"object"},mi={$id:"log",additionalProperties:!1,properties:{messages:{default:[],items:{additionalProperties:!1,properties:{content:{default:[],items:{additionalProperties:!1,properties:{text:{default:"",type:"string"},type:{default:"text",type:"string"}},type:"object"},type:"array"},role:{default:"user",enum:["user","assistant","system"],type:"string"}},type:"object"},type:"array"},system:{default:"",type:"string"}},type:"object"},yi={$id:"nodes",items:{$ref:"page"},type:"array"},gi={$id:"page",additionalProperties:!1,dynamicDefaults:{id:"uuid"},properties:{changefreq:{default:null,enum:["always","hourly","daily","weekly","monthly","yearly","never",null],nullable:!0,type:"string"},children:{default:[],items:{type:"object"},type:"array"},class:{default:["prose","max-w-none"],items:{type:"string"},type:"array"},description:{default:null,nullable:!0,type:"string"},enabled:{default:!0,type:"boolean"},flat:{default:!0,type:"boolean"},head:{default:null,nullable:!0,type:"object"},header:{type:"string"},icon:{type:"string"},id:{type:"string"},images:{default:[],items:{additionalProperties:!1,properties:{alt:{type:"string"},url:{default:"",type:"string"}},type:"object"},type:"array"},keywords:{default:[],items:{type:"string"},type:"array"},lastmod:{default:null,nullable:!0,type:"string"},loc:{default:null,nullable:!0,type:"string"},name:{default:null,nullable:!0,type:"string"},priority:{default:null,maximum:1,minimum:0,nullable:!0,type:"number"},type:{default:null,enum:["article","book","profile","website","music.song","music.album","music.playlist","music.radio_station","video.movie","video.episode","video.tv_show","video.other",null],nullable:!0,type:"string"}},type:"object"};Vn.DEFAULTS.uuid=()=>zt;const Bn=[di,yi,gi,pi,fi,hi,mi],_i=new co({code:{esm:!0},coerceTypes:!0,keywords:[Vn()],removeAdditional:!0,schemas:Bn,useDefaults:!0}),Gt=Zn(On({credentials:{},feed:{},fonts:[],importmap:{},log:{}})),Wn=!0,Rn="nodes",jn={$children:{get(){return this.children.filter(({enabled:e})=>e)}},$index:{get(){return this.$siblings.findIndex(({id:e})=>this.id===e)}},$next:{get(){return this.$siblings[this.$index+1]}},$prev:{get(){return this.$siblings[this.$index-1]}},$siblings:{get(){return this.siblings.filter(({enabled:e})=>e)}},i:{get(){return this.icon&&`i-${this.icon}`}},path:{get(){const e=this.branch.slice(1);return e.some(({name:t})=>!t)?void 0:e.map(({name:t})=>t).join("/").replace(/ /g,"_")}},title:{get(){return["",void 0].includes(this.header)?this.name??"":this.header}},to:{get(){return this.path?.replace(/^\/?/,"/").replace(/\/?$/,"/")}}},Jt=xn([]),Bt=Object.fromEntries(Bn.map(({$id:e})=>[e,_i.getSchema(e)])),Ei=async e=>{try{return await er(e)}catch(t){$o.error(t)}},vi=On({...Gt,tree:Jt,...rs(Jt)});Object.keys(Gt).forEach(e=>{Bt[e]&&Tn(Gt[e],Bt[e],{immediate:Wn})});Tn(Nn(vi,Rn),async e=>{await Bt[Rn]?.(e)?e.forEach(t=>{Object.keys(jn).some(c=>!(c in t))&&Object.defineProperties(t,jn)}):Jt.value=[{}]},{immediate:Wn});export{$o as c,Ei as f,bi as i,er as o,vi as s};
17
+ `,u=`%c${[f,o].filter(Boolean).join(":")}`;typeof t.args[0]=="string"?c(`${u}%c ${t.args[0]}`,m,"",...t.args.slice(1)):c(u,m,...t.args)}}function vo(e={}){return go({reporters:e.reporters||[new _o({})],prompt(c,o={}){return o.type==="confirm"?Promise.resolve(confirm(c)):Promise.resolve(prompt(c))},...e})}const $o=vo(),wo=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,bo=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,Eo=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function So(e,t){if(e==="__proto__"||e==="constructor"&&t&&typeof t=="object"&&"prototype"in t){Po(e);return}return t}function Po(e){console.warn(`[destr] Dropping "${e}" key to prevent prototype pollution.`)}function Ro(e,t={}){if(typeof e!="string")return e;if(e[0]==='"'&&e[e.length-1]==='"'&&e.indexOf("\\")===-1)return e.slice(1,-1);const c=e.trim();if(c.length<=9)switch(c.toLowerCase()){case"true":return!0;case"false":return!1;case"undefined":return;case"null":return null;case"nan":return Number.NaN;case"infinity":return Number.POSITIVE_INFINITY;case"-infinity":return Number.NEGATIVE_INFINITY}if(!Eo.test(e)){if(t.strict)throw new SyntaxError("[destr] Invalid JSON");return e}try{if(wo.test(e)||bo.test(e)){if(t.strict)throw new Error("[destr] Possible prototype pollution");return JSON.parse(e,So)}return JSON.parse(e)}catch(o){if(t.strict)throw o;return e}}const jo=/#/g,No=/&/g,Oo=/\//g,To=/=/g,Zt=/\+/g,ko=/%5e/gi,qo=/%60/gi,Io=/%7c/gi,Co=/%20/gi;function Ao(e){return encodeURI(""+e).replace(Io,"|")}function Ht(e){return Ao(typeof e=="string"?e:JSON.stringify(e)).replace(Zt,"%2B").replace(Co,"+").replace(jo,"%23").replace(No,"%26").replace(qo,"`").replace(ko,"^").replace(Oo,"%2F")}function Ut(e){return Ht(e).replace(To,"%3D")}function Ln(e=""){try{return decodeURIComponent(""+e)}catch{return""+e}}function Do(e){return Ln(e.replace(Zt," "))}function Mo(e){return Ln(e.replace(Zt," "))}function Vo(e=""){const t=Object.create(null);e[0]==="?"&&(e=e.slice(1));for(const c of e.split("&")){const o=c.match(/([^=]+)=?(.*)/)||[];if(o.length<2)continue;const f=Do(o[1]);if(f==="__proto__"||f==="constructor")continue;const n=Mo(o[2]||"");t[f]===void 0?t[f]=n:Array.isArray(t[f])?t[f].push(n):t[f]=[t[f],n]}return t}function Lo(e,t){return(typeof t=="number"||typeof t=="boolean")&&(t=String(t)),t?Array.isArray(t)?t.map(c=>`${Ut(e)}=${Ht(c)}`).join("&"):`${Ut(e)}=${Ht(t)}`:Ut(e)}function Fo(e){return Object.keys(e).filter(t=>e[t]!==void 0).map(t=>Lo(t,e[t])).filter(Boolean).join("&")}const Uo=/^[\s\w\0+.-]{2,}:([/\\]{1,2})/,zo=/^[\s\w\0+.-]{2,}:([/\\]{2})?/,Ko=/^([/\\]\s*){2,}[^/\\]/,Ho=/^\.?\//;function Fn(e,t={}){return typeof t=="boolean"&&(t={acceptRelative:t}),t.strict?Uo.test(e):zo.test(e)||(t.acceptRelative?Ko.test(e):!1)}function Go(e="",t){return e.endsWith("/")}function Jo(e="",t){return(Go(e)?e.slice(0,-1):e)||"/"}function Bo(e="",t){return e.endsWith("/")?e:e+"/"}function Wo(e,t){if(Xo(t)||Fn(e))return e;const c=Jo(t);return e.startsWith(c)?e:Zo(c,e)}function Qo(e,t){const c=xo(e),o={...Vo(c.search),...t};return c.search=Fo(o),ei(c)}function Xo(e){return!e||e==="/"}function Yo(e){return e&&e!=="/"}function Zo(e,...t){let c=e||"";for(const o of t.filter(f=>Yo(f)))if(c){const f=o.replace(Ho,"");c=Bo(c)+f}else c=o;return c}const Un=Symbol.for("ufo:protocolRelative");function xo(e="",t){const c=e.match(/^[\s\0]*(blob:|data:|javascript:|vbscript:)(.*)/i);if(c){const[,S,$=""]=c;return{protocol:S.toLowerCase(),pathname:$,href:S+$,auth:"",host:"",search:"",hash:""}}if(!Fn(e,{acceptRelative:!0}))return Sn(e);const[,o="",f,n=""]=e.replace(/\\/g,"/").match(/^[\s\0]*([\w+.-]{2,}:)?\/\/([^/@]+@)?(.*)/)||[];let[,m="",u=""]=n.match(/([^#/?]*)(.*)?/)||[];o==="file:"&&(u=u.replace(/\/(?=[A-Za-z]:)/,""));const{pathname:h,search:_,hash:s}=Sn(u);return{protocol:o.toLowerCase(),auth:f?f.slice(0,Math.max(0,f.length-1)):"",host:m,pathname:h,search:_,hash:s,[Un]:!o}}function Sn(e=""){const[t="",c="",o=""]=(e.match(/([^#?]*)(\?[^#]*)?(#.*)?/)||[]).splice(1);return{pathname:t,search:c,hash:o}}function ei(e){const t=e.pathname||"",c=e.search?(e.search.startsWith("?")?"":"?")+e.search:"",o=e.hash||"",f=e.auth?e.auth+"@":"",n=e.host||"";return(e.protocol||e[Un]?(e.protocol||"")+"//":"")+f+n+t+c+o}class zn extends Error{constructor(t,c){super(t,c),this.name="FetchError",c?.cause&&!this.cause&&(this.cause=c.cause)}}function Kn(e){const t=e.error?.message||e.error?.toString()||"",c=e.request?.method||e.options?.method||"GET",o=e.request?.url||String(e.request)||"/",f=`[${c}] ${JSON.stringify(o)}`,n=e.response?`${e.response.status} ${e.response.statusText}`:"<no response>",m=`${f}: ${n}${t?` ${t}`:""}`,u=new zn(m,e.error?{cause:e.error}:void 0);for(const h of["request","options","response"])Object.defineProperty(u,h,{get(){return e[h]}});for(const[h,_]of[["data","_data"],["status","status"],["statusCode","status"],["statusText","statusText"],["statusMessage","statusText"]])Object.defineProperty(u,h,{get(){return e.response&&e.response[_]}});return u}const ti=new Set(Object.freeze(["PATCH","POST","PUT","DELETE"]));function Pn(e="GET"){return ti.has(e.toUpperCase())}function ri(e){if(e===void 0)return!1;const t=typeof e;return t==="string"||t==="number"||t==="boolean"||t===null?!0:t!=="object"?!1:Array.isArray(e)?!0:e.buffer||e instanceof FormData||e instanceof URLSearchParams?!1:e.constructor&&e.constructor.name==="Object"||typeof e.toJSON=="function"}const ni=new Set(["image/svg","application/xml","application/xhtml","application/html"]),si=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function oi(e=""){if(!e)return"json";const t=e.split(";").shift()||"";return si.test(t)?"json":t==="text/event-stream"?"stream":ni.has(t)||t.startsWith("text/")?"text":"blob"}function ii(e,t,c,o){const f=ai(t?.headers??e?.headers,c?.headers,o);let n;return(c?.query||c?.params||t?.params||t?.query)&&(n={...c?.params,...c?.query,...t?.params,...t?.query}),{...c,...t,query:n,params:n,headers:f}}function ai(e,t,c){if(!t)return new c(e);const o=new c(t);if(e)for(const[f,n]of Symbol.iterator in e||Array.isArray(e)?e:new c(e))o.set(f,n);return o}async function yt(e,t){if(t)if(Array.isArray(t))for(const c of t)await c(e);else await t(e)}const ui=new Set([408,409,425,429,500,502,503,504]),ci=new Set([101,204,205,304]);function xt(e={}){const{fetch:t=globalThis.fetch,Headers:c=globalThis.Headers,AbortController:o=globalThis.AbortController}=e;async function f(u){const h=u.error&&u.error.name==="AbortError"&&!u.options.timeout||!1;if(u.options.retry!==!1&&!h){let s;typeof u.options.retry=="number"?s=u.options.retry:s=Pn(u.options.method)?0:1;const S=u.response&&u.response.status||500;if(s>0&&(Array.isArray(u.options.retryStatusCodes)?u.options.retryStatusCodes.includes(S):ui.has(S))){const $=typeof u.options.retryDelay=="function"?u.options.retryDelay(u):u.options.retryDelay||0;return $>0&&await new Promise(v=>setTimeout(v,$)),n(u.request,{...u.options,retry:s-1})}}const _=Kn(u);throw Error.captureStackTrace&&Error.captureStackTrace(_,n),_}const n=async function(h,_={}){const s={request:h,options:ii(h,_,e.defaults,c),response:void 0,error:void 0};if(s.options.method&&(s.options.method=s.options.method.toUpperCase()),s.options.onRequest&&(await yt(s,s.options.onRequest),s.options.headers instanceof c||(s.options.headers=new c(s.options.headers||{}))),typeof s.request=="string"&&(s.options.baseURL&&(s.request=Wo(s.request,s.options.baseURL)),s.options.query&&(s.request=Qo(s.request,s.options.query),delete s.options.query),"query"in s.options&&delete s.options.query,"params"in s.options&&delete s.options.params),s.options.body&&Pn(s.options.method))if(ri(s.options.body)){const v=s.options.headers.get("content-type");typeof s.options.body!="string"&&(s.options.body=v==="application/x-www-form-urlencoded"?new URLSearchParams(s.options.body).toString():JSON.stringify(s.options.body)),v||s.options.headers.set("content-type","application/json"),s.options.headers.has("accept")||s.options.headers.set("accept","application/json")}else("pipeTo"in s.options.body&&typeof s.options.body.pipeTo=="function"||typeof s.options.body.pipe=="function")&&("duplex"in s.options||(s.options.duplex="half"));let S;if(!s.options.signal&&s.options.timeout){const v=new o;S=setTimeout(()=>{const g=new Error("[TimeoutError]: The operation was aborted due to timeout");g.name="TimeoutError",g.code=23,v.abort(g)},s.options.timeout),s.options.signal=v.signal}try{s.response=await t(s.request,s.options)}catch(v){return s.error=v,s.options.onRequestError&&await yt(s,s.options.onRequestError),await f(s)}finally{S&&clearTimeout(S)}if((s.response.body||s.response._bodyInit)&&!ci.has(s.response.status)&&s.options.method!=="HEAD"){const v=(s.options.parseResponse?"json":s.options.responseType)||oi(s.response.headers.get("content-type")||"");switch(v){case"json":{const g=await s.response.text(),b=s.options.parseResponse||Ro;s.response._data=b(g);break}case"stream":{s.response._data=s.response.body||s.response._bodyInit;break}default:s.response._data=await s.response[v]()}}return s.options.onResponse&&await yt(s,s.options.onResponse),!s.options.ignoreResponseError&&s.response.status>=400&&s.response.status<600?(s.options.onResponseError&&await yt(s,s.options.onResponseError),await f(s)):s.response},m=async function(h,_){return(await n(h,_))._data};return m.raw=n,m.native=(...u)=>t(...u),m.create=(u={},h={})=>xt({...e,...h,defaults:{...e.defaults,...h.defaults,...u}}),m}const vt=(function(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")})(),Hn=vt.fetch?(...e)=>vt.fetch(...e):()=>Promise.reject(new Error("[ofetch] global.fetch is not supported!")),Gn=vt.Headers,Jn=vt.AbortController,er=xt({fetch:Hn,Headers:Gn,AbortController:Jn}),li=er,bi=Object.freeze(Object.defineProperty({__proto__:null,$fetch:li,AbortController:Jn,FetchError:zn,Headers:Gn,createFetch:xt,createFetchError:Kn,fetch:Hn,ofetch:er},Symbol.toStringTag,{value:"Module"})),di={$id:"credentials",additionalProperties:{properties:{accessKeyId:{default:null,nullable:!0,type:"string"},Bucket:{default:null,nullable:!0,type:"string"},endpoint:{default:null,nullable:!0,type:"string"},region:{default:null,nullable:!0,type:"string"},secretAccessKey:{default:null,nullable:!0,type:"string"}},type:"object"},type:"object"},fi={$id:"feed",additionalProperties:!1,properties:{feed_url:{type:"string"},home_page_url:{type:"string"},items:{default:[],items:{additionalProperties:!1,dynamicDefaults:{date_published:"datetime",id:"uuid"},properties:{attachments:{default:[],items:{additionalProperties:!1,properties:{mime_type:{default:"",type:"string"},url:{default:"",type:"string"}},type:"object"},type:"array"},content_html:{default:"",type:"string"},date_published:{type:"string"},id:{type:"string"},title:{default:"",type:"string"},url:{type:"string"}},type:"object"},type:"array"},title:{default:"",type:"string"},version:{default:"https://jsonfeed.org/version/1",enum:["https://jsonfeed.org/version/1","https://jsonfeed.org/version/1.1"],type:"string"}},type:"object"},hi={$id:"fonts",items:{type:"string"},type:"array"},pi={$id:"importmap",additionalProperties:!1,properties:{imports:{additionalProperties:{type:"string"},default:{},type:"object"},scopes:{additionalProperties:{additionalProperties:{type:"string"},type:"object"},type:"object"}},type:"object"},mi={$id:"log",additionalProperties:!1,properties:{messages:{default:[],items:{additionalProperties:!1,properties:{content:{default:[],items:{additionalProperties:!1,properties:{text:{default:"",type:"string"},type:{default:"text",type:"string"}},type:"object"},type:"array"},role:{default:"user",enum:["user","assistant","system"],type:"string"}},type:"object"},type:"array"},system:{default:"",type:"string"}},type:"object"},yi={$id:"nodes",items:{$ref:"page"},type:"array"},gi={$id:"page",additionalProperties:!1,dynamicDefaults:{id:"uuid"},properties:{changefreq:{default:null,enum:["always","hourly","daily","weekly","monthly","yearly","never",null],nullable:!0,type:"string"},children:{default:[],items:{type:"object"},type:"array"},class:{default:["prose","max-w-none"],items:{type:"string"},type:"array"},description:{default:null,nullable:!0,type:"string"},enabled:{default:!0,type:"boolean"},flat:{default:!0,type:"boolean"},head:{default:{},type:"object"},header:{type:"string"},icon:{type:"string"},id:{type:"string"},images:{default:[],items:{additionalProperties:!1,properties:{alt:{type:"string"},url:{default:"",type:"string"}},type:"object"},type:"array"},keywords:{default:[],items:{type:"string"},type:"array"},lastmod:{default:null,nullable:!0,type:"string"},loc:{default:null,nullable:!0,type:"string"},name:{default:null,nullable:!0,type:"string"},priority:{default:null,maximum:1,minimum:0,nullable:!0,type:"number"},type:{default:null,enum:["article","book","profile","website","music.song","music.album","music.playlist","music.radio_station","video.movie","video.episode","video.tv_show","video.other",null],nullable:!0,type:"string"}},type:"object"};Vn.DEFAULTS.uuid=()=>zt;const Bn=[di,yi,gi,pi,fi,hi,mi],_i=new co({code:{esm:!0},coerceTypes:!0,keywords:[Vn()],removeAdditional:!0,schemas:Bn,useDefaults:!0}),Gt=Zn(On({credentials:{},feed:{},fonts:[],importmap:{},log:{}})),Wn=!0,Rn="nodes",jn={$children:{get(){return this.children.filter(({enabled:e})=>e)}},$index:{get(){return this.$siblings.findIndex(({id:e})=>this.id===e)}},$next:{get(){return this.$siblings[this.$index+1]}},$prev:{get(){return this.$siblings[this.$index-1]}},$siblings:{get(){return this.siblings.filter(({enabled:e})=>e)}},i:{get(){return this.icon&&`i-${this.icon}`}},path:{get(){const e=this.branch.slice(1);return e.some(({name:t})=>!t)?void 0:e.map(({name:t})=>t).join("/").replace(/ /g,"_")}},title:{get(){return["",void 0].includes(this.header)?this.name??"":this.header}},to:{get(){return this.path?.replace(/^\/?/,"/").replace(/\/?$/,"/")}}},Jt=xn([]),Bt=Object.fromEntries(Bn.map(({$id:e})=>[e,_i.getSchema(e)])),Ei=async e=>{try{return await er(e)}catch(t){$o.error(t)}},vi=On({...Gt,tree:Jt,...rs(Jt)});Object.keys(Gt).forEach(e=>{Bt[e]&&Tn(Gt[e],Bt[e],{immediate:Wn})});Tn(Nn(vi,Rn),async e=>{await Bt[Rn]?.(e)?e.forEach(t=>{Object.keys(jn).some(c=>!(c in t))&&Object.defineProperties(t,jn)}):Jt.value=[{}]},{immediate:Wn});export{$o as c,Ei as f,bi as i,er as o,vi as s};
package/dist/index.html CHANGED
@@ -6,11 +6,11 @@
6
6
  <base href="" />
7
7
  <link rel="preload" crossorigin href="./index.json" as="fetch" />
8
8
  <link rel="preload" crossorigin href="./fonts.json" as="fetch" />
9
- <script type="module" crossorigin src="./assets/index-CtzIV-1H.js"></script>
9
+ <script type="module" crossorigin src="./assets/index-C8cbS4bt.js"></script>
10
10
  <link rel="modulepreload" crossorigin href="./assets/mermaid-BQWZaxT1.js">
11
11
  <link rel="modulepreload" crossorigin href="./assets/katex-B59jf8CD.js">
12
12
  <link rel="modulepreload" crossorigin href="./assets/markdown-9kbgniO_.js">
13
- <link rel="modulepreload" crossorigin href="./assets/shared-rtmh2X3o.js">
13
+ <link rel="modulepreload" crossorigin href="./assets/shared-L1pI3rwf.js">
14
14
  <link rel="stylesheet" crossorigin href="./assets/index-vGiKZPT9.css">
15
15
  </head>
16
16
  <body>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://www.schemastore.org/package",
3
3
  "name": "@vuebro/runtime",
4
- "version": "1.4.9",
4
+ "version": "1.4.10",
5
5
  "description": "Vue.js-based runtime for VueBro applications with dynamic loading, SEO optimization, and intersection observer tracking.",
6
6
  "keywords": [
7
7
  "vue",
@@ -54,7 +54,7 @@
54
54
  "@unhead/vue": "^2.0.19",
55
55
  "@unocss/runtime": "^66.5.10",
56
56
  "@vuebro/loader-sfc": "^2.4.4",
57
- "@vuebro/shared": "^1.2.16",
57
+ "@vuebro/shared": "^1.2.17",
58
58
  "@vueuse/components": "^14.1.0",
59
59
  "@vueuse/core": "^14.1.0",
60
60
  "consola": "^3.4.2",