import{t as e}from"./als-registry-BxXlcmpy.js";import{Q as t,Z as n,nt as r}from"./cookie-serialize-CgV1qMZJ.js";var i=e(`vinext.requestContext.als`),a=Symbol.for(`__cloudflare-context__`),o;function s(){let e=Object.getOwnPropertyDescriptor(globalThis,a);e&&!e.configurable||(o=e&&`value`in e?e.value:e?.get?.call(globalThis),Object.defineProperty(globalThis,a,{configurable:!0,get(){let e=l();return e?{ctx:e}:o},set(e){o=e}}))}s();function c(e,n){return t()?r(t=>{t.executionContext=e},n):i.run(e,n)}function l(){return t()?n().executionContext:i.getStore()??null}export{c as n,l as t};