var n=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;var c=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!c)throw new Error("Non little-endian hardware is not supported");var u={}.toString;function o(e=32){if(n&&typeof n.getRandomValues=="function")return n.getRandomValues(new Uint8Array(e));throw new Error("crypto.getRandomValues must be defined")}function l(e){if(!e||e.property===void 0||e.inObject===void 0)throw new TypeError("One or more required parameters missing: 'property, properties'");let{property:t,inObject:r}=e;if(!(t in r))throw new TypeError(`Required parameter missing: '${t}'`)}function y(e){if(!e||e.property===void 0||e.allowedProperties===void 0)throw new TypeError("One or more required parameters missing: 'property, allowedProperties'");let{property:t,allowedProperties:r}=e;if(Array.isArray(r)&&!r.includes(t)||r instanceof Set&&!r.has(t)||r instanceof Map&&!r.has(t)){let i=Array.from(r instanceof Map?r.keys():r).join(", ");throw new TypeError(`Out of range: '${t}'. Must be one of '${i}'`)}}function g(e){let t={Ed25519:"EdDSA","P-256":"ES256","P-384":"ES384","P-521":"ES512",secp256k1:"ES256K"};if(e.alg&&Object.values(t).includes(e.alg))return e.alg;if(e.crv&&Object.keys(t).includes(e.crv))return t[e.crv];throw new Error(`Unable to determine algorithm based on provided input: alg=${e.alg}, crv=${e.crv}. Supported 'alg' values: ${Object.values(t).join(", ")}. Supported 'crv' values: ${Object.keys(t).join(", ")}.`)}function w(){return!!(globalThis.crypto&&globalThis.crypto.subtle)}function x(e){return o(e)}function b(){return n.randomUUID()}export{l as checkRequiredProperty,y as checkValidProperty,g as getJoseSignatureAlgorithmFromPublicKey,w as isWebCryptoSupported,x as randomBytes,b as randomUuid}; /*! Bundled license information: @noble/hashes/esm/utils.js: (*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) *) */ //# sourceMappingURL=utils.js.map