1import{a as P,u as v}from"./BLgEGyUv.js";import{q as I,s as O,W as w}from"./D-nGNtiX.js";const u="ezier:post-login-return",a="ezier:pending-context";function q(){const{isAuthenticated:f,showLoginModal:c}=w(),o=I(),r=O();function d(){if(f.value)return!0;if(typeof sessionStorage<"u")try{sessionStorage.setItem(u,o.fullPath)}catch{}return c.value=!0,!1}function l(e){if(f.value)return;const s=!!e.fields&&Object.keys(e.fields).length>0;if(!(!e.prompt&&!s||typeof sessionStorage>"u"))try{sessionStorage.setItem(a,JSON.stringify(e))}catch{}}function p(e){l({prompt:e})}function i(){if(typeof sessionStorage>"u")return null;const e=sessionStorage.getItem(a);if(sessionStorage.removeItem(a),!e)return null;try{return JSON.parse(e)}catch{return null}}function g(){return i()?.prompt||null}async function m(e="/"){if(typeof sessionStorage>"u")return;const s=sessionStorage.getItem(u);sessionStorage.removeItem(u);const t=i();if(t&&(t.prompt||t.fields&&Object.keys(t.fields).length>0)){const n=v();if(n.prompt.value=t.prompt||"",t.mode&&n.setMode(t.mode),t.ratio&&n.setAspectRatio(t.ratio),t.fields)for(const[y,S]of Object.entries(t.fields))n.setFieldValue(y,S);t.quality&&P(n.setFieldValue,n.selectedModel.value,t.quality);const h=s||o.fullPath||e;await r.push(h)}else s&&s!==o.fullPath?await r.push(s):(o.fullPath==="/"||e!=="/")&&await r.push(e)}return{require:d,savePendingPrompt:p,savePendingContext:l,consumePendingPrompt:g,consumePendingContext:i,returnToContext:m}}export{q as u};
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.