min23asdw 597e7f33f7 fix: jsonata $base64decode/$base64encode in Web Worker
The jsonata library checks `typeof window !== 'undefined'` to decide
whether to use browser `atob`/`btoa` or Node.js `Buffer.from` for
base64 operations. Since CyberChef runs operations in a Web Worker
where `window` is undefined, it falls back to `global.Buffer` which
also does not exist, causing "Cannot read properties of undefined
(reading 'from')".

Fix by registering custom base64 functions on the expression that use
`atob`/`btoa` directly, which are available in both browser and Web
Worker scopes.

Closes #2063
2026-03-22 19:18:30 +07:00
..