1// The one auth seam for every Wix SDK call in this app. Copy as-is; do not rewrite.2//3// Two modes, switched by WIX_CLIENT_ID in ./config:4// null (ambient) — a Wix-managed Astro project: `@wix/astro` authenticates raw SDK module5// calls automatically, server-side AND in client islands. `wixModule()`6// returns the module untouched.7// string (manual) — any other React setup (Vite SPA, non-Astro): one shared client is built8// with OAuthStrategy, and `wixModule()` returns the module bound to it.9// The strategy self-manages visitor tokens on every call (mints on first10// use, renews on expiry) and persists them through the storage below.11//12// The visitor token IS the identity of the current cart / member session, so in manual mode13// tokens persist to localStorage — never re-minted per load (a fresh anonymous mint is a NEW