import{g as j,j as f,r as p,s as E,k as M,l as S,m as H,n as N,p as R,q as B,v as z,x as T,y,z as F,A as K,c as m,o as h,a as D,t as O,d as q}from"./DeO-9ZMU.js";const I=s=>s==="defer"||s===!1;function L(...s){var x;const r=typeof s[s.length-1]=="string"?s.pop():void 0;typeof s[0]!="string"&&s.unshift(r);let[t,l,e={}]=s;if(typeof t!="string")throw new TypeError("[nuxt] [asyncData] key must be a string.");if(typeof l!="function")throw new TypeError("[nuxt] [asyncData] handler must be a function.");const a=j(),v=l,u=()=>f.value,V=()=>a.isHydrating?a.payload.data[t]:a.static.data[t];e.server??(e.server=!0),e.default??(e.default=u),e.getCachedData??(e.getCachedData=V),e.lazy??(e.lazy=!1),e.immediate??(e.immediate=!0),e.deep??(e.deep=f.deep),e.dedupe??(e.dedupe="cancel");const _=e.getCachedData(t,a),b=_!=null;if(!a._asyncData[t]||!e.immediate){(x=a.payload._errors)[t]??(x[t]=f.errorValue);const o=e.deep?p:E;a._asyncData[t]={data:o(b?_:e.default()),pending:p(!b),error:M(a.payload._errors,t),status:p("idle"),_default:e.default}}const n={...a._asyncData[t]};delete n._default,n.refresh=n.execute=(o={})=>{if(a._asyncDataPromises[t]){if(I(o.dedupe??e.dedupe))return a._asyncDataPromises[t];a._asyncDataPromises[t].cancelled=!0}if(o._initial||a.isHydrating&&o._initial!==!1){const c=o._initial?_:e.getCachedData(t,a);if(c!=null)return Promise.resolve(c)}n.pending.value=!0,n.status.value="pending";const d=new Promise((c,i)=>{try{c(v(a))}catch(g){i(g)}}).then(async c=>{if(d.cancelled)return a._asyncDataPromises[t];let i=c;e.transform&&(i=await e.transform(c)),e.pick&&(i=$(i,e.pick)),a.payload.data[t]=i,n.data.value=i,n.error.value=f.errorValue,n.status.value="success"}).catch(c=>{if(d.cancelled)return a._asyncDataPromises[t];n.error.value=T(c),n.data.value=y(e.default()),n.status.value="error"}).finally(()=>{d.cancelled||(n.pending.value=!1,delete a._asyncDataPromises[t])});return a._asyncDataPromises[t]=d,a._asyncDataPromises[t]},n.clear=()=>U(a,t);const w=()=>n.refresh({_initial:!0}),P=e.server!==!1&&a.payload.serverRendered;{const o=S();if(o&&P&&e.immediate&&!o.sp&&(o.sp=[]),o&&!o._nuxtOnBeforeMountCbs){o._nuxtOnBeforeMountCbs=[];const i=o._nuxtOnBeforeMountCbs;H(()=>{i.forEach(g=>{g()}),i.splice(0,i.length)}),N(()=>i.splice(0,i.length))}P&&a.isHydrating&&(n.error.value||_!=null)?(n.pending.value=!1,n.status.value=n.error.value?"error":"success"):o&&(a.payload.serverRendered&&a.isHydrating||e.lazy)&&e.immediate?o._nuxtOnBeforeMountCbs.push(w):e.immediate&&w();const d=z();if(e.watch){const i=R(e.watch,()=>n.refresh());d&&B(i)}const c=a.hook("app:data:refresh",async i=>{(!i||i.includes(t))&&await n.refresh()});d&&B(c)}const C=Promise.resolve(a._asyncDataPromises[t]).then(()=>n);return Object.assign(C,n),C}function U(s,r){r in s.payload.data&&(s.payload.data[r]=void 0),r in s.payload._errors&&(s.payload._errors[r]=f.errorValue),s._asyncData[r]&&(s._asyncData[r].data.value=void 0,s._asyncData[r].error.value=f.errorValue,s._asyncData[r].pending.value=!1,s._asyncData[r].status.value="idle"),r in s._asyncDataPromises&&(s._asyncDataPromises[r]&&(s._asyncDataPromises[r].cancelled=!0),s._asyncDataPromises[r]=void 0)}function $(s,r){const t={};for(const l of r)t[l]=s[l];return t}const k={style:{display:"flex","justify-content":"center","align-items":"center","min-height":"60vh"}},G={style:{"max-width":"400px",border:"1px solid #eee","border-radius":"8px",padding:"2rem","box-shadow":"0 2px 8px rgba(0,0,0,0.03)"}},J={key:0},Q={key:1},W={key:2},Y=F({__name:"about",async setup(s){let r,t;const{data:l,pending:e,error:a}=([r,t]=K(async()=>L("about",async()=>(await $fetch("https://api.chucknorris.io/jokes/random")).value)),r=await r,t(),r);return(v,u)=>(h(),m("div",k,[D("div",G,[u[1]||(u[1]=D("h2",{style:{"margin-bottom":"1rem"}},"About",-1)),D("div",null,[y(e)?(h(),m("div",J,"Loading dynamic content...")):y(a)?(h(),m("div",Q,"Failed to load content: "+O(y(a).message),1)):(h(),m("div",W,[u[0]||(u[0]=D("strong",null,"Dynamic Data:",-1)),q(" "+O(y(l)),1)]))])])]))}});export{Y as default};