1import{a as O,b5 as f,y as D,aX as B,aa as M,$ as z,b6 as P,b7 as E,b8 as H,i as b,b9 as R,aY as S,ba as V}from"./BvtBTwS-.js";const K=e=>e==="defer"||e===!1;function j(...e){var g;const n=typeof e[e.length-1]=="string"?e.pop():void 0;typeof e[0]!="string"&&e.unshift(n);let[t,o,a={}]=e;if(typeof t!="string")throw new TypeError("[nuxt] [asyncData] key must be a string.");if(typeof o!="function")throw new TypeError("[nuxt] [asyncData] handler must be a function.");const s=O(),p=o,w=()=>f.value,C=()=>s.isHydrating?s.payload.data[t]:s.static.data[t];a.server??(a.server=!0),a.default??(a.default=w),a.getCachedData??(a.getCachedData=C),a.lazy??(a.lazy=!1),a.immediate??(a.immediate=!0),a.deep??(a.deep=f.deep),a.dedupe??(a.dedupe="cancel");const d=a.getCachedData(t,s),h=d!=null;if(!s._asyncData[t]||!a.immediate){(g=s.payload._errors)[t]??(g[t]=f.errorValue);const c=a.deep?D:B;s._asyncData[t]={data:c(h?d:a.default()),pending:D(!h),error:M(s.payload._errors,t),status:D("idle"),_default:a.default}}const r={...s._asyncData[t]};delete r._default,r.refresh=r.execute=(c={})=>{if(s._asyncDataPromises[t]){if(K(c.dedupe??a.dedupe))return s._asyncDataPromises[t];s._asyncDataPromises[t].cancelled=!0}if(c._initial||s.isHydrating&&c._initial!==!1){const l=c._initial?d:a.getCachedData(t,s);if(l!=null)return Promise.resolve(l)}r.pending.value=!0,r.status.value="pending";const u=new Promise((l,i)=>{try{l(p(s))}catch(y){i(y)}}).then(async l=>{if(u.cancelled)return s._asyncDataPromises[t];let i=l;a.transform&&(i=await a.transform(l)),a.pick&&(i=T(i,a.pick)),s.payload.data[t]=i,r.data.value=i,r.error.value=f.errorValue,r.status.value="success"}).catch(l=>{if(u.cancelled)return s._asyncDataPromises[t];r.error.value=H(l),r.data.value=b(a.default()),r.status.value="error"}).finally(()=>{u.cancelled||(r.pending.value=!1,delete s._asyncDataPromises[t])});return s._asyncDataPromises[t]=u,s._asyncDataPromises[t]},r.clear=()=>N(s,t);const _=()=>r.refresh({_initial:!0}),m=a.server!==!1&&s.payload.serverRendered;{const c=R();if(c&&m&&a.immediate&&!c.sp&&(c.sp=[]),c&&!c._nuxtOnBeforeMountCbs){c._nuxtOnBeforeMountCbs=[];const i=c._nuxtOnBeforeMountCbs;S(()=>{i.forEach(y=>{y()}),i.splice(0,i.length)}),V(()=>i.splice(0,i.length))}m&&s.isHydrating&&(r.error.value||d!=null)?(r.pending.value=!1,r.status.value=r.error.value?"error":"success"):c&&(s.payload.serverRendered&&s.isHydrating||a.lazy)&&a.immediate?c._nuxtOnBeforeMountCbs.push(_):a.immediate&&_();const u=E();if(a.watch){const i=z(a.watch,()=>r.refresh());u&&P(i)}const l=s.hook("app:data:refresh",async i=>{(!i||i.includes(t))&&await r.refresh()});u&&P(l)}const v=Promise.resolve(s._asyncDataPromises[t]).then(()=>r);return Object.assign(v,r),v}function I(...e){const n=typeof e[e.length-1]=="string"?e.pop():void 0;typeof e[0]!="string"&&e.unshift(n);const[t,o,a={}]=e;return j(t,o,{...a,lazy:!0},null)}function N(e,n){n in e.payload.data&&(e.payload.data[n]=void 0),n in e.payload._errors&&(e.payload._errors[n]=f.errorValue),e._asyncData[n]&&(e._asyncData[n].data.value=b(e._asyncData[n]._default()),e._asyncData[n].error.value=f.errorValue,e._asyncData[n].pending.value=!1,e._asyncData[n].status.value="idle"),n in e._asyncDataPromises&&(e._asyncDataPromises[n]&&(e._asyncDataPromises[n].cancelled=!0),e._asyncDataPromises[n]=void 0)}function T(e,n){const t={};for(const o of n)t[o]=e[o];return t}export{I as a,j as u}; 2//# sourceMappingURL=i_r_It7r.js.map
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.