let e;function i(){return e||(e=new TextDecoder),e}const c="[object Uint8Array]";function a(t){if(!f(t))throw new TypeError(`Expected \`Uint8Array\`, got \`${typeof t}\``)}function f(t){return t?t.constructor===Uint8Array?!0:Object.prototype.toString.call(t)===c:!1}function s(t){return a(t),i().decode(t)}function o(t){if(typeof t!="string")throw new TypeError(`Expected \`string\`, got \`${typeof t}\``)}function u(t){let r=t.replace(/-/g,"+").replace(/_/g,"/");const n=r.length%4;return n!==0&&(r+="=".repeat(4-n)),r}function p(t){return o(t),Uint8Array.from(globalThis.atob(u(t)),r=>r.codePointAt(0))}function y(t){return o(t),s(p(t))}export{y as a,u as b};
