From 376806bb57dbbfa37130aaa535b12b15dc1f38fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Molinero=20Fern=C3=A1ndez?= Date: Thu, 18 Jan 2024 19:58:13 +0100 Subject: [PATCH] 9.2.2 --- dist/otpauth.esm.js | 2 +- dist/otpauth.esm.min.js | 2 +- dist/otpauth.node.cjs | 2 +- dist/otpauth.node.min.cjs | 2 +- dist/otpauth.node.min.mjs | 2 +- dist/otpauth.node.mjs | 2 +- dist/otpauth.umd.js | 2 +- dist/otpauth.umd.min.js | 2 +- docs/assets/main.js | 4 +-- docs/assets/style.css | 50 ++++++++++++++++++++++++++----------- docs/classes/HOTP.html | 30 +++++++++++----------- docs/classes/Secret.html | 26 +++++++++---------- docs/classes/TOTP.html | 30 +++++++++++----------- docs/classes/URI.html | 6 ++--- docs/index.html | 2 +- docs/variables/version.html | 2 +- package-lock.json | 4 +-- package.json | 2 +- 18 files changed, 96 insertions(+), 76 deletions(-) diff --git a/dist/otpauth.esm.js b/dist/otpauth.esm.js index 4cda3da6..3bfa899a 100644 --- a/dist/otpauth.esm.js +++ b/dist/otpauth.esm.js @@ -1650,6 +1650,6 @@ class URI { * Library version. * @type {string} */ -const version = "9.2.1"; +const version = "9.2.2"; export { HOTP, Secret, TOTP, URI, version }; diff --git a/dist/otpauth.esm.min.js b/dist/otpauth.esm.min.js index eb9b0ce8..da7e8d67 100644 --- a/dist/otpauth.esm.min.js +++ b/dist/otpauth.esm.min.js @@ -1,3 +1,3 @@ /// -const Ie=r=>{const e=new ArrayBuffer(8),n=new Uint8Array(e);let t=r;for(let i=7;i>=0&&t!==0;i--)n[i]=t&255,t-=n[i],t/=256;return e},ht=void 0,at=void 0,ct=void 0;var q=Object.freeze({__proto__:null,createHmac:void 0,randomBytes:void 0,timingSafeEqual:void 0});const J="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Q="ARRAYBUFFER not supported by this environment",W="UINT8ARRAY not supported by this environment";function _(r,e,n,t){let i,s,u;const c=e||[0],a=(n=n||0)>>>3,l=t===-1?3:0;for(i=0;i>>2,c.length<=s&&c.push(0),c[s]|=r[i]<<8*(l+t*(u%4));return{value:c,binLen:8*r.length+n}}function B(r,e,n){switch(e){case"UTF8":case"UTF16BE":case"UTF16LE":break;default:throw new Error("encoding must be UTF8, UTF16BE, or UTF16LE")}switch(r){case"HEX":return function(t,i,s){return function(u,c,a,l){let d,h,f,g;if(u.length%2!=0)throw new Error("String of HEX type must be in byte increments");const p=c||[0],m=(a=a||0)>>>3,A=l===-1?3:0;for(d=0;d>>1)+m,f=g>>>2;p.length<=f;)p.push(0);p[f]|=h<<8*(A+l*(g%4))}return{value:p,binLen:4*u.length+a}}(t,i,s,n)};case"TEXT":return function(t,i,s){return function(u,c,a,l,d){let h,f,g,p,m,A,y,b,v=0;const H=a||[0],S=(l=l||0)>>>3;if(c==="UTF8")for(y=d===-1?3:0,g=0;gh?f.push(h):2048>h?(f.push(192|h>>>6),f.push(128|63&h)):55296>h||57344<=h?f.push(224|h>>>12,128|h>>>6&63,128|63&h):(g+=1,h=65536+((1023&h)<<10|1023&u.charCodeAt(g)),f.push(240|h>>>18,128|h>>>12&63,128|h>>>6&63,128|63&h)),p=0;p>>2;H.length<=m;)H.push(0);H[m]|=f[p]<<8*(y+d*(A%4)),v+=1}else for(y=d===-1?2:0,b=c==="UTF16LE"&&d!==1||c!=="UTF16LE"&&d===1,g=0;g>>8),A=v+S,m=A>>>2;H.length<=m;)H.push(0);H[m]|=h<<8*(y+d*(A%4)),v+=2}return{value:H,binLen:8*v+l}}(t,e,i,s,n)};case"B64":return function(t,i,s){return function(u,c,a,l){let d,h,f,g,p,m,A,y=0;const b=c||[0],v=(a=a||0)>>>3,H=l===-1?3:0,S=u.indexOf("=");if(u.search(/^[a-zA-Z0-9=+/]+$/)===-1)throw new Error("Invalid character in base-64 string");if(u=u.replace(/=/g,""),S!==-1&&S{const e=new ArrayBuffer(8),n=new Uint8Array(e);let t=r;for(let i=7;i>=0&&t!==0;i--)n[i]=t&255,t-=n[i],t/=256;return e},ht=void 0,at=void 0,ct=void 0;var q=Object.freeze({__proto__:null,createHmac:void 0,randomBytes:void 0,timingSafeEqual:void 0});const J="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Q="ARRAYBUFFER not supported by this environment",W="UINT8ARRAY not supported by this environment";function _(r,e,n,t){let i,s,u;const c=e||[0],a=(n=n||0)>>>3,l=t===-1?3:0;for(i=0;i>>2,c.length<=s&&c.push(0),c[s]|=r[i]<<8*(l+t*(u%4));return{value:c,binLen:8*r.length+n}}function B(r,e,n){switch(e){case"UTF8":case"UTF16BE":case"UTF16LE":break;default:throw new Error("encoding must be UTF8, UTF16BE, or UTF16LE")}switch(r){case"HEX":return function(t,i,s){return function(u,c,a,l){let d,h,f,g;if(u.length%2!=0)throw new Error("String of HEX type must be in byte increments");const p=c||[0],m=(a=a||0)>>>3,A=l===-1?3:0;for(d=0;d>>1)+m,f=g>>>2;p.length<=f;)p.push(0);p[f]|=h<<8*(A+l*(g%4))}return{value:p,binLen:4*u.length+a}}(t,i,s,n)};case"TEXT":return function(t,i,s){return function(u,c,a,l,d){let h,f,g,p,m,A,y,b,v=0;const H=a||[0],S=(l=l||0)>>>3;if(c==="UTF8")for(y=d===-1?3:0,g=0;gh?f.push(h):2048>h?(f.push(192|h>>>6),f.push(128|63&h)):55296>h||57344<=h?f.push(224|h>>>12,128|h>>>6&63,128|63&h):(g+=1,h=65536+((1023&h)<<10|1023&u.charCodeAt(g)),f.push(240|h>>>18,128|h>>>12&63,128|h>>>6&63,128|63&h)),p=0;p>>2;H.length<=m;)H.push(0);H[m]|=f[p]<<8*(y+d*(A%4)),v+=1}else for(y=d===-1?2:0,b=c==="UTF16LE"&&d!==1||c!=="UTF16LE"&&d===1,g=0;g>>8),A=v+S,m=A>>>2;H.length<=m;)H.push(0);H[m]|=h<<8*(y+d*(A%4)),v+=2}return{value:H,binLen:8*v+l}}(t,e,i,s,n)};case"B64":return function(t,i,s){return function(u,c,a,l){let d,h,f,g,p,m,A,y=0;const b=c||[0],v=(a=a||0)>>>3,H=l===-1?3:0,S=u.indexOf("=");if(u.search(/^[a-zA-Z0-9=+/]+$/)===-1)throw new Error("Invalid character in base-64 string");if(u=u.replace(/=/g,""),S!==-1&&S -"use strict";var H=require("node:crypto");function T(s){var e=Object.create(null);return s&&Object.keys(s).forEach(function(r){if(r!=="default"){var t=Object.getOwnPropertyDescriptor(s,r);Object.defineProperty(e,r,t.get?t:{enumerable:!0,get:function(){return s[r]}})}}),e.default=s,Object.freeze(e)}var c=T(H);const v=s=>{const e=new ArrayBuffer(8),r=new Uint8Array(e);let t=s;for(let n=7;n>=0&&t!==0;n--)r[n]=t&255,t-=r[n],t/=256;return e};var U=void 0;const d=(()=>{if(typeof globalThis=="object")return globalThis;Object.defineProperty(Object.prototype,"__GLOBALTHIS__",{get(){return this},configurable:!0});try{if(typeof __GLOBALTHIS__!="undefined")return __GLOBALTHIS__}finally{delete Object.prototype.__GLOBALTHIS__}if(typeof self!="undefined")return self;if(typeof window!="undefined")return window;if(typeof global!="undefined")return global})(),E={SHA1:"SHA-1",SHA224:"SHA-224",SHA256:"SHA-256",SHA384:"SHA-384",SHA512:"SHA-512","SHA3-224":"SHA3-224","SHA3-256":"SHA3-256","SHA3-384":"SHA3-384","SHA3-512":"SHA3-512"},O=(s,e,r)=>{if(c!=null&&c.createHmac){const t=c.createHmac(s,d.Buffer.from(e));return t.update(d.Buffer.from(r)),t.digest().buffer}else{const t=E[s.toUpperCase()];if(typeof t=="undefined")throw new TypeError("Unknown hash function");const n=new U(t,"ARRAYBUFFER");return n.setHMACKey(e,"ARRAYBUFFER"),n.update(r),n.getHMAC("ARRAYBUFFER")}},m="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",L=s=>{let e=s.length;for(;s[e-1]==="=";)--e;const r=(e=8&&(i-=8,n[o++]=a>>>i)}return t},B=s=>{const e=new Uint8Array(s);let r=0,t=0,n="";for(let i=0;i=5;)n+=m[t>>>r-5&31],r-=5;return r>0&&(n+=m[t<<5-r&31]),n},C=s=>{const e=new ArrayBuffer(s.length/2),r=new Uint8Array(e);for(let t=0;t{const e=new Uint8Array(s);let r="";for(let t=0;t{const e=new ArrayBuffer(s.length),r=new Uint8Array(e);for(let t=0;t{const e=new Uint8Array(s);let r="";for(let t=0;t{if(!y)throw new Error("Encoding API not available");return y.encode(s).buffer},D=s=>{if(!A)throw new Error("Encoding API not available");return A.decode(s)},F=s=>{var e;if(c!=null&&c.randomBytes)return c.randomBytes(s).buffer;if(!((e=d.crypto)!=null&&e.getRandomValues))throw new Error("Cryptography API not available");return d.crypto.getRandomValues(new Uint8Array(s)).buffer};class h{constructor({buffer:e,size:r=20}={}){this.buffer=typeof e=="undefined"?F(r):e}static fromLatin1(e){return new h({buffer:P(e)})}static fromUTF8(e){return new h({buffer:x(e)})}static fromBase32(e){return new h({buffer:L(e)})}static fromHex(e){return new h({buffer:C(e)})}get latin1(){return Object.defineProperty(this,"latin1",{enumerable:!0,value:j(this.buffer)}),this.latin1}get utf8(){return Object.defineProperty(this,"utf8",{enumerable:!0,value:D(this.buffer)}),this.utf8}get base32(){return Object.defineProperty(this,"base32",{enumerable:!0,value:B(this.buffer)}),this.base32}get hex(){return Object.defineProperty(this,"hex",{enumerable:!0,value:R(this.buffer)}),this.hex}}const M=(s,e)=>{if(c!=null&&c.timingSafeEqual)return c.timingSafeEqual(d.Buffer.from(s),d.Buffer.from(e));{if(s.length!==e.length)throw new TypeError("Input strings must have the same length");let r=-1,t=0;for(;++r0?this.issuerInLabel?`${e(this.issuer)}:${e(this.label)}?issuer=${e(this.issuer)}&`:`${e(this.label)}?issuer=${e(this.issuer)}&`:`${e(this.label)}?`}secret=${e(this.secret.base32)}&algorithm=${e(this.algorithm)}&digits=${e(this.digits)}&counter=${e(this.counter)}`}};class u{static get defaults(){return{issuer:"",label:"OTPAuth",issuerInLabel:!0,algorithm:"SHA1",digits:6,period:30,window:1}}constructor({issuer:e=u.defaults.issuer,label:r=u.defaults.label,issuerInLabel:t=u.defaults.issuerInLabel,secret:n=new h,algorithm:i=u.defaults.algorithm,digits:a=u.defaults.digits,period:o=u.defaults.period}={}){this.issuer=e,this.label=r,this.issuerInLabel=t,this.secret=typeof n=="string"?h.fromBase32(n):n,this.algorithm=i.toUpperCase(),this.digits=a,this.period=o}static generate({secret:e,algorithm:r,digits:t,period:n=u.defaults.period,timestamp:i=Date.now()}){return p.generate({secret:e,algorithm:r,digits:t,counter:Math.floor(i/1e3/n)})}generate({timestamp:e=Date.now()}={}){return u.generate({secret:this.secret,algorithm:this.algorithm,digits:this.digits,period:this.period,timestamp:e})}static validate({token:e,secret:r,algorithm:t,digits:n,period:i=u.defaults.period,timestamp:a=Date.now(),window:o}){return p.validate({token:e,secret:r,algorithm:t,digits:n,counter:Math.floor(a/1e3/i),window:o})}validate({token:e,timestamp:r,window:t}){return u.validate({token:e,secret:this.secret,algorithm:this.algorithm,digits:this.digits,period:this.period,timestamp:r,window:t})}toString(){const e=encodeURIComponent;return`otpauth://totp/${this.issuer.length>0?this.issuerInLabel?`${e(this.issuer)}:${e(this.label)}?issuer=${e(this.issuer)}&`:`${e(this.label)}?issuer=${e(this.issuer)}&`:`${e(this.label)}?`}secret=${e(this.secret.base32)}&algorithm=${e(this.algorithm)}&digits=${e(this.digits)}&period=${e(this.period)}`}}const G=/^otpauth:\/\/([ht]otp)\/(.+)\?([A-Z0-9.~_-]+=[^?&]*(?:&[A-Z0-9.~_-]+=[^?&]*)*)$/i,Y=/^[2-7A-Z]+=*$/i,Z=/^SHA(?:1|224|256|384|512|3-224|3-256|3-384|3-512)$/i,q=/^[+-]?\d+$/,$=/^\+?[1-9]\d*$/;class V{static parse(e){let r;try{r=e.match(G)}catch(f){}if(!Array.isArray(r))throw new URIError("Invalid URI format");const t=r[1].toLowerCase(),n=r[2].split(/(?::|%3A) *(.+)/i,2).map(decodeURIComponent),i=r[3].split("&").reduce((f,g)=>{const w=g.split(/=(.*)/,2).map(decodeURIComponent),I=w[0].toLowerCase(),S=w[1],b=f;return b[I]=S,b},{});let a;const o={};if(t==="hotp")if(a=p,typeof i.counter!="undefined"&&q.test(i.counter))o.counter=parseInt(i.counter,10);else throw new TypeError("Missing or invalid 'counter' parameter");else if(t==="totp"){if(a=u,typeof i.period!="undefined")if($.test(i.period))o.period=parseInt(i.period,10);else throw new TypeError("Invalid 'period' parameter")}else throw new TypeError("Unknown OTP type");if(typeof i.issuer!="undefined"&&(o.issuer=i.issuer),n.length===2?(o.label=n[1],typeof o.issuer=="undefined"||o.issuer===""?o.issuer=n[0]:n[0]===""&&(o.issuerInLabel=!1)):(o.label=n[0],typeof o.issuer!="undefined"&&o.issuer!==""&&(o.issuerInLabel=!1)),typeof i.secret!="undefined"&&Y.test(i.secret))o.secret=i.secret;else throw new TypeError("Missing or invalid 'secret' parameter");if(typeof i.algorithm!="undefined")if(Z.test(i.algorithm))o.algorithm=i.algorithm;else throw new TypeError("Invalid 'algorithm' parameter");if(typeof i.digits!="undefined")if($.test(i.digits))o.digits=parseInt(i.digits,10);else throw new TypeError("Invalid 'digits' parameter");return new a(o)}static stringify(e){if(e instanceof p||e instanceof u)return e.toString();throw new TypeError("Invalid 'HOTP/TOTP' object")}}const z="9.2.1";exports.HOTP=p,exports.Secret=h,exports.TOTP=u,exports.URI=V,exports.version=z; +"use strict";var H=require("node:crypto");function T(s){var e=Object.create(null);return s&&Object.keys(s).forEach(function(r){if(r!=="default"){var t=Object.getOwnPropertyDescriptor(s,r);Object.defineProperty(e,r,t.get?t:{enumerable:!0,get:function(){return s[r]}})}}),e.default=s,Object.freeze(e)}var c=T(H);const v=s=>{const e=new ArrayBuffer(8),r=new Uint8Array(e);let t=s;for(let n=7;n>=0&&t!==0;n--)r[n]=t&255,t-=r[n],t/=256;return e};var U=void 0;const d=(()=>{if(typeof globalThis=="object")return globalThis;Object.defineProperty(Object.prototype,"__GLOBALTHIS__",{get(){return this},configurable:!0});try{if(typeof __GLOBALTHIS__!="undefined")return __GLOBALTHIS__}finally{delete Object.prototype.__GLOBALTHIS__}if(typeof self!="undefined")return self;if(typeof window!="undefined")return window;if(typeof global!="undefined")return global})(),E={SHA1:"SHA-1",SHA224:"SHA-224",SHA256:"SHA-256",SHA384:"SHA-384",SHA512:"SHA-512","SHA3-224":"SHA3-224","SHA3-256":"SHA3-256","SHA3-384":"SHA3-384","SHA3-512":"SHA3-512"},O=(s,e,r)=>{if(c!=null&&c.createHmac){const t=c.createHmac(s,d.Buffer.from(e));return t.update(d.Buffer.from(r)),t.digest().buffer}else{const t=E[s.toUpperCase()];if(typeof t=="undefined")throw new TypeError("Unknown hash function");const n=new U(t,"ARRAYBUFFER");return n.setHMACKey(e,"ARRAYBUFFER"),n.update(r),n.getHMAC("ARRAYBUFFER")}},m="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",L=s=>{let e=s.length;for(;s[e-1]==="=";)--e;const r=(e=8&&(i-=8,n[o++]=a>>>i)}return t},B=s=>{const e=new Uint8Array(s);let r=0,t=0,n="";for(let i=0;i=5;)n+=m[t>>>r-5&31],r-=5;return r>0&&(n+=m[t<<5-r&31]),n},C=s=>{const e=new ArrayBuffer(s.length/2),r=new Uint8Array(e);for(let t=0;t{const e=new Uint8Array(s);let r="";for(let t=0;t{const e=new ArrayBuffer(s.length),r=new Uint8Array(e);for(let t=0;t{const e=new Uint8Array(s);let r="";for(let t=0;t{if(!y)throw new Error("Encoding API not available");return y.encode(s).buffer},D=s=>{if(!A)throw new Error("Encoding API not available");return A.decode(s)},F=s=>{var e;if(c!=null&&c.randomBytes)return c.randomBytes(s).buffer;if(!((e=d.crypto)!=null&&e.getRandomValues))throw new Error("Cryptography API not available");return d.crypto.getRandomValues(new Uint8Array(s)).buffer};class h{constructor({buffer:e,size:r=20}={}){this.buffer=typeof e=="undefined"?F(r):e}static fromLatin1(e){return new h({buffer:P(e)})}static fromUTF8(e){return new h({buffer:x(e)})}static fromBase32(e){return new h({buffer:L(e)})}static fromHex(e){return new h({buffer:C(e)})}get latin1(){return Object.defineProperty(this,"latin1",{enumerable:!0,value:j(this.buffer)}),this.latin1}get utf8(){return Object.defineProperty(this,"utf8",{enumerable:!0,value:D(this.buffer)}),this.utf8}get base32(){return Object.defineProperty(this,"base32",{enumerable:!0,value:B(this.buffer)}),this.base32}get hex(){return Object.defineProperty(this,"hex",{enumerable:!0,value:R(this.buffer)}),this.hex}}const M=(s,e)=>{if(c!=null&&c.timingSafeEqual)return c.timingSafeEqual(d.Buffer.from(s),d.Buffer.from(e));{if(s.length!==e.length)throw new TypeError("Input strings must have the same length");let r=-1,t=0;for(;++r0?this.issuerInLabel?`${e(this.issuer)}:${e(this.label)}?issuer=${e(this.issuer)}&`:`${e(this.label)}?issuer=${e(this.issuer)}&`:`${e(this.label)}?`}secret=${e(this.secret.base32)}&algorithm=${e(this.algorithm)}&digits=${e(this.digits)}&counter=${e(this.counter)}`}};class u{static get defaults(){return{issuer:"",label:"OTPAuth",issuerInLabel:!0,algorithm:"SHA1",digits:6,period:30,window:1}}constructor({issuer:e=u.defaults.issuer,label:r=u.defaults.label,issuerInLabel:t=u.defaults.issuerInLabel,secret:n=new h,algorithm:i=u.defaults.algorithm,digits:a=u.defaults.digits,period:o=u.defaults.period}={}){this.issuer=e,this.label=r,this.issuerInLabel=t,this.secret=typeof n=="string"?h.fromBase32(n):n,this.algorithm=i.toUpperCase(),this.digits=a,this.period=o}static generate({secret:e,algorithm:r,digits:t,period:n=u.defaults.period,timestamp:i=Date.now()}){return p.generate({secret:e,algorithm:r,digits:t,counter:Math.floor(i/1e3/n)})}generate({timestamp:e=Date.now()}={}){return u.generate({secret:this.secret,algorithm:this.algorithm,digits:this.digits,period:this.period,timestamp:e})}static validate({token:e,secret:r,algorithm:t,digits:n,period:i=u.defaults.period,timestamp:a=Date.now(),window:o}){return p.validate({token:e,secret:r,algorithm:t,digits:n,counter:Math.floor(a/1e3/i),window:o})}validate({token:e,timestamp:r,window:t}){return u.validate({token:e,secret:this.secret,algorithm:this.algorithm,digits:this.digits,period:this.period,timestamp:r,window:t})}toString(){const e=encodeURIComponent;return`otpauth://totp/${this.issuer.length>0?this.issuerInLabel?`${e(this.issuer)}:${e(this.label)}?issuer=${e(this.issuer)}&`:`${e(this.label)}?issuer=${e(this.issuer)}&`:`${e(this.label)}?`}secret=${e(this.secret.base32)}&algorithm=${e(this.algorithm)}&digits=${e(this.digits)}&period=${e(this.period)}`}}const G=/^otpauth:\/\/([ht]otp)\/(.+)\?([A-Z0-9.~_-]+=[^?&]*(?:&[A-Z0-9.~_-]+=[^?&]*)*)$/i,Y=/^[2-7A-Z]+=*$/i,Z=/^SHA(?:1|224|256|384|512|3-224|3-256|3-384|3-512)$/i,q=/^[+-]?\d+$/,$=/^\+?[1-9]\d*$/;class V{static parse(e){let r;try{r=e.match(G)}catch(f){}if(!Array.isArray(r))throw new URIError("Invalid URI format");const t=r[1].toLowerCase(),n=r[2].split(/(?::|%3A) *(.+)/i,2).map(decodeURIComponent),i=r[3].split("&").reduce((f,g)=>{const w=g.split(/=(.*)/,2).map(decodeURIComponent),I=w[0].toLowerCase(),S=w[1],b=f;return b[I]=S,b},{});let a;const o={};if(t==="hotp")if(a=p,typeof i.counter!="undefined"&&q.test(i.counter))o.counter=parseInt(i.counter,10);else throw new TypeError("Missing or invalid 'counter' parameter");else if(t==="totp"){if(a=u,typeof i.period!="undefined")if($.test(i.period))o.period=parseInt(i.period,10);else throw new TypeError("Invalid 'period' parameter")}else throw new TypeError("Unknown OTP type");if(typeof i.issuer!="undefined"&&(o.issuer=i.issuer),n.length===2?(o.label=n[1],typeof o.issuer=="undefined"||o.issuer===""?o.issuer=n[0]:n[0]===""&&(o.issuerInLabel=!1)):(o.label=n[0],typeof o.issuer!="undefined"&&o.issuer!==""&&(o.issuerInLabel=!1)),typeof i.secret!="undefined"&&Y.test(i.secret))o.secret=i.secret;else throw new TypeError("Missing or invalid 'secret' parameter");if(typeof i.algorithm!="undefined")if(Z.test(i.algorithm))o.algorithm=i.algorithm;else throw new TypeError("Invalid 'algorithm' parameter");if(typeof i.digits!="undefined")if($.test(i.digits))o.digits=parseInt(i.digits,10);else throw new TypeError("Invalid 'digits' parameter");return new a(o)}static stringify(e){if(e instanceof p||e instanceof u)return e.toString();throw new TypeError("Invalid 'HOTP/TOTP' object")}}const z="9.2.2";exports.HOTP=p,exports.Secret=h,exports.TOTP=u,exports.URI=V,exports.version=z; //# sourceMappingURL=otpauth.node.min.cjs.map diff --git a/dist/otpauth.node.min.mjs b/dist/otpauth.node.min.mjs index a5a77479..d0b97a28 100644 --- a/dist/otpauth.node.min.mjs +++ b/dist/otpauth.node.min.mjs @@ -1,3 +1,3 @@ /// -import*as c from"node:crypto";const H=n=>{const e=new ArrayBuffer(8),r=new Uint8Array(e);let t=n;for(let s=7;s>=0&&t!==0;s--)r[s]=t&255,t-=r[s],t/=256;return e};var T=void 0;const d=(()=>{if(typeof globalThis=="object")return globalThis;Object.defineProperty(Object.prototype,"__GLOBALTHIS__",{get(){return this},configurable:!0});try{if(typeof __GLOBALTHIS__!="undefined")return __GLOBALTHIS__}finally{delete Object.prototype.__GLOBALTHIS__}if(typeof self!="undefined")return self;if(typeof window!="undefined")return window;if(typeof global!="undefined")return global})(),U={SHA1:"SHA-1",SHA224:"SHA-224",SHA256:"SHA-256",SHA384:"SHA-384",SHA512:"SHA-512","SHA3-224":"SHA3-224","SHA3-256":"SHA3-256","SHA3-384":"SHA3-384","SHA3-512":"SHA3-512"},v=(n,e,r)=>{if(c!=null&&c.createHmac){const t=c.createHmac(n,d.Buffer.from(e));return t.update(d.Buffer.from(r)),t.digest().buffer}else{const t=U[n.toUpperCase()];if(typeof t=="undefined")throw new TypeError("Unknown hash function");const s=new T(t,"ARRAYBUFFER");return s.setHMACKey(e,"ARRAYBUFFER"),s.update(r),s.getHMAC("ARRAYBUFFER")}},m="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",E=n=>{let e=n.length;for(;n[e-1]==="=";)--e;const r=(e=8&&(i-=8,s[o++]=a>>>i)}return t},L=n=>{const e=new Uint8Array(n);let r=0,t=0,s="";for(let i=0;i=5;)s+=m[t>>>r-5&31],r-=5;return r>0&&(s+=m[t<<5-r&31]),s},B=n=>{const e=new ArrayBuffer(n.length/2),r=new Uint8Array(e);for(let t=0;t{const e=new Uint8Array(n);let r="";for(let t=0;t{const e=new ArrayBuffer(n.length),r=new Uint8Array(e);for(let t=0;t{const e=new Uint8Array(n);let r="";for(let t=0;t{if(!y)throw new Error("Encoding API not available");return y.encode(n).buffer},x=n=>{if(!A)throw new Error("Encoding API not available");return A.decode(n)},j=n=>{var e;if(c!=null&&c.randomBytes)return c.randomBytes(n).buffer;if(!((e=d.crypto)!=null&&e.getRandomValues))throw new Error("Cryptography API not available");return d.crypto.getRandomValues(new Uint8Array(n)).buffer};class h{constructor({buffer:e,size:r=20}={}){this.buffer=typeof e=="undefined"?j(r):e}static fromLatin1(e){return new h({buffer:O(e)})}static fromUTF8(e){return new h({buffer:P(e)})}static fromBase32(e){return new h({buffer:E(e)})}static fromHex(e){return new h({buffer:B(e)})}get latin1(){return Object.defineProperty(this,"latin1",{enumerable:!0,value:R(this.buffer)}),this.latin1}get utf8(){return Object.defineProperty(this,"utf8",{enumerable:!0,value:x(this.buffer)}),this.utf8}get base32(){return Object.defineProperty(this,"base32",{enumerable:!0,value:L(this.buffer)}),this.base32}get hex(){return Object.defineProperty(this,"hex",{enumerable:!0,value:C(this.buffer)}),this.hex}}const k=(n,e)=>{if(c!=null&&c.timingSafeEqual)return c.timingSafeEqual(d.Buffer.from(n),d.Buffer.from(e));{if(n.length!==e.length)throw new TypeError("Input strings must have the same length");let r=-1,t=0;for(;++r0?this.issuerInLabel?`${e(this.issuer)}:${e(this.label)}?issuer=${e(this.issuer)}&`:`${e(this.label)}?issuer=${e(this.issuer)}&`:`${e(this.label)}?`}secret=${e(this.secret.base32)}&algorithm=${e(this.algorithm)}&digits=${e(this.digits)}&counter=${e(this.counter)}`}};class u{static get defaults(){return{issuer:"",label:"OTPAuth",issuerInLabel:!0,algorithm:"SHA1",digits:6,period:30,window:1}}constructor({issuer:e=u.defaults.issuer,label:r=u.defaults.label,issuerInLabel:t=u.defaults.issuerInLabel,secret:s=new h,algorithm:i=u.defaults.algorithm,digits:a=u.defaults.digits,period:o=u.defaults.period}={}){this.issuer=e,this.label=r,this.issuerInLabel=t,this.secret=typeof s=="string"?h.fromBase32(s):s,this.algorithm=i.toUpperCase(),this.digits=a,this.period=o}static generate({secret:e,algorithm:r,digits:t,period:s=u.defaults.period,timestamp:i=Date.now()}){return p.generate({secret:e,algorithm:r,digits:t,counter:Math.floor(i/1e3/s)})}generate({timestamp:e=Date.now()}={}){return u.generate({secret:this.secret,algorithm:this.algorithm,digits:this.digits,period:this.period,timestamp:e})}static validate({token:e,secret:r,algorithm:t,digits:s,period:i=u.defaults.period,timestamp:a=Date.now(),window:o}){return p.validate({token:e,secret:r,algorithm:t,digits:s,counter:Math.floor(a/1e3/i),window:o})}validate({token:e,timestamp:r,window:t}){return u.validate({token:e,secret:this.secret,algorithm:this.algorithm,digits:this.digits,period:this.period,timestamp:r,window:t})}toString(){const e=encodeURIComponent;return`otpauth://totp/${this.issuer.length>0?this.issuerInLabel?`${e(this.issuer)}:${e(this.label)}?issuer=${e(this.issuer)}&`:`${e(this.label)}?issuer=${e(this.issuer)}&`:`${e(this.label)}?`}secret=${e(this.secret.base32)}&algorithm=${e(this.algorithm)}&digits=${e(this.digits)}&period=${e(this.period)}`}}const M=/^otpauth:\/\/([ht]otp)\/(.+)\?([A-Z0-9.~_-]+=[^?&]*(?:&[A-Z0-9.~_-]+=[^?&]*)*)$/i,D=/^[2-7A-Z]+=*$/i,G=/^SHA(?:1|224|256|384|512|3-224|3-256|3-384|3-512)$/i,Y=/^[+-]?\d+$/,$=/^\+?[1-9]\d*$/;class Z{static parse(e){let r;try{r=e.match(M)}catch(f){}if(!Array.isArray(r))throw new URIError("Invalid URI format");const t=r[1].toLowerCase(),s=r[2].split(/(?::|%3A) *(.+)/i,2).map(decodeURIComponent),i=r[3].split("&").reduce((f,g)=>{const w=g.split(/=(.*)/,2).map(decodeURIComponent),I=w[0].toLowerCase(),S=w[1],b=f;return b[I]=S,b},{});let a;const o={};if(t==="hotp")if(a=p,typeof i.counter!="undefined"&&Y.test(i.counter))o.counter=parseInt(i.counter,10);else throw new TypeError("Missing or invalid 'counter' parameter");else if(t==="totp"){if(a=u,typeof i.period!="undefined")if($.test(i.period))o.period=parseInt(i.period,10);else throw new TypeError("Invalid 'period' parameter")}else throw new TypeError("Unknown OTP type");if(typeof i.issuer!="undefined"&&(o.issuer=i.issuer),s.length===2?(o.label=s[1],typeof o.issuer=="undefined"||o.issuer===""?o.issuer=s[0]:s[0]===""&&(o.issuerInLabel=!1)):(o.label=s[0],typeof o.issuer!="undefined"&&o.issuer!==""&&(o.issuerInLabel=!1)),typeof i.secret!="undefined"&&D.test(i.secret))o.secret=i.secret;else throw new TypeError("Missing or invalid 'secret' parameter");if(typeof i.algorithm!="undefined")if(G.test(i.algorithm))o.algorithm=i.algorithm;else throw new TypeError("Invalid 'algorithm' parameter");if(typeof i.digits!="undefined")if($.test(i.digits))o.digits=parseInt(i.digits,10);else throw new TypeError("Invalid 'digits' parameter");return new a(o)}static stringify(e){if(e instanceof p||e instanceof u)return e.toString();throw new TypeError("Invalid 'HOTP/TOTP' object")}}const V="9.2.1";export{p as HOTP,h as Secret,u as TOTP,Z as URI,V as version}; +import*as c from"node:crypto";const H=n=>{const e=new ArrayBuffer(8),r=new Uint8Array(e);let t=n;for(let s=7;s>=0&&t!==0;s--)r[s]=t&255,t-=r[s],t/=256;return e};var T=void 0;const d=(()=>{if(typeof globalThis=="object")return globalThis;Object.defineProperty(Object.prototype,"__GLOBALTHIS__",{get(){return this},configurable:!0});try{if(typeof __GLOBALTHIS__!="undefined")return __GLOBALTHIS__}finally{delete Object.prototype.__GLOBALTHIS__}if(typeof self!="undefined")return self;if(typeof window!="undefined")return window;if(typeof global!="undefined")return global})(),U={SHA1:"SHA-1",SHA224:"SHA-224",SHA256:"SHA-256",SHA384:"SHA-384",SHA512:"SHA-512","SHA3-224":"SHA3-224","SHA3-256":"SHA3-256","SHA3-384":"SHA3-384","SHA3-512":"SHA3-512"},v=(n,e,r)=>{if(c!=null&&c.createHmac){const t=c.createHmac(n,d.Buffer.from(e));return t.update(d.Buffer.from(r)),t.digest().buffer}else{const t=U[n.toUpperCase()];if(typeof t=="undefined")throw new TypeError("Unknown hash function");const s=new T(t,"ARRAYBUFFER");return s.setHMACKey(e,"ARRAYBUFFER"),s.update(r),s.getHMAC("ARRAYBUFFER")}},m="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",E=n=>{let e=n.length;for(;n[e-1]==="=";)--e;const r=(e=8&&(i-=8,s[o++]=a>>>i)}return t},L=n=>{const e=new Uint8Array(n);let r=0,t=0,s="";for(let i=0;i=5;)s+=m[t>>>r-5&31],r-=5;return r>0&&(s+=m[t<<5-r&31]),s},B=n=>{const e=new ArrayBuffer(n.length/2),r=new Uint8Array(e);for(let t=0;t{const e=new Uint8Array(n);let r="";for(let t=0;t{const e=new ArrayBuffer(n.length),r=new Uint8Array(e);for(let t=0;t{const e=new Uint8Array(n);let r="";for(let t=0;t{if(!y)throw new Error("Encoding API not available");return y.encode(n).buffer},x=n=>{if(!A)throw new Error("Encoding API not available");return A.decode(n)},j=n=>{var e;if(c!=null&&c.randomBytes)return c.randomBytes(n).buffer;if(!((e=d.crypto)!=null&&e.getRandomValues))throw new Error("Cryptography API not available");return d.crypto.getRandomValues(new Uint8Array(n)).buffer};class h{constructor({buffer:e,size:r=20}={}){this.buffer=typeof e=="undefined"?j(r):e}static fromLatin1(e){return new h({buffer:O(e)})}static fromUTF8(e){return new h({buffer:P(e)})}static fromBase32(e){return new h({buffer:E(e)})}static fromHex(e){return new h({buffer:B(e)})}get latin1(){return Object.defineProperty(this,"latin1",{enumerable:!0,value:R(this.buffer)}),this.latin1}get utf8(){return Object.defineProperty(this,"utf8",{enumerable:!0,value:x(this.buffer)}),this.utf8}get base32(){return Object.defineProperty(this,"base32",{enumerable:!0,value:L(this.buffer)}),this.base32}get hex(){return Object.defineProperty(this,"hex",{enumerable:!0,value:C(this.buffer)}),this.hex}}const k=(n,e)=>{if(c!=null&&c.timingSafeEqual)return c.timingSafeEqual(d.Buffer.from(n),d.Buffer.from(e));{if(n.length!==e.length)throw new TypeError("Input strings must have the same length");let r=-1,t=0;for(;++r0?this.issuerInLabel?`${e(this.issuer)}:${e(this.label)}?issuer=${e(this.issuer)}&`:`${e(this.label)}?issuer=${e(this.issuer)}&`:`${e(this.label)}?`}secret=${e(this.secret.base32)}&algorithm=${e(this.algorithm)}&digits=${e(this.digits)}&counter=${e(this.counter)}`}};class u{static get defaults(){return{issuer:"",label:"OTPAuth",issuerInLabel:!0,algorithm:"SHA1",digits:6,period:30,window:1}}constructor({issuer:e=u.defaults.issuer,label:r=u.defaults.label,issuerInLabel:t=u.defaults.issuerInLabel,secret:s=new h,algorithm:i=u.defaults.algorithm,digits:a=u.defaults.digits,period:o=u.defaults.period}={}){this.issuer=e,this.label=r,this.issuerInLabel=t,this.secret=typeof s=="string"?h.fromBase32(s):s,this.algorithm=i.toUpperCase(),this.digits=a,this.period=o}static generate({secret:e,algorithm:r,digits:t,period:s=u.defaults.period,timestamp:i=Date.now()}){return p.generate({secret:e,algorithm:r,digits:t,counter:Math.floor(i/1e3/s)})}generate({timestamp:e=Date.now()}={}){return u.generate({secret:this.secret,algorithm:this.algorithm,digits:this.digits,period:this.period,timestamp:e})}static validate({token:e,secret:r,algorithm:t,digits:s,period:i=u.defaults.period,timestamp:a=Date.now(),window:o}){return p.validate({token:e,secret:r,algorithm:t,digits:s,counter:Math.floor(a/1e3/i),window:o})}validate({token:e,timestamp:r,window:t}){return u.validate({token:e,secret:this.secret,algorithm:this.algorithm,digits:this.digits,period:this.period,timestamp:r,window:t})}toString(){const e=encodeURIComponent;return`otpauth://totp/${this.issuer.length>0?this.issuerInLabel?`${e(this.issuer)}:${e(this.label)}?issuer=${e(this.issuer)}&`:`${e(this.label)}?issuer=${e(this.issuer)}&`:`${e(this.label)}?`}secret=${e(this.secret.base32)}&algorithm=${e(this.algorithm)}&digits=${e(this.digits)}&period=${e(this.period)}`}}const M=/^otpauth:\/\/([ht]otp)\/(.+)\?([A-Z0-9.~_-]+=[^?&]*(?:&[A-Z0-9.~_-]+=[^?&]*)*)$/i,D=/^[2-7A-Z]+=*$/i,G=/^SHA(?:1|224|256|384|512|3-224|3-256|3-384|3-512)$/i,Y=/^[+-]?\d+$/,$=/^\+?[1-9]\d*$/;class Z{static parse(e){let r;try{r=e.match(M)}catch(f){}if(!Array.isArray(r))throw new URIError("Invalid URI format");const t=r[1].toLowerCase(),s=r[2].split(/(?::|%3A) *(.+)/i,2).map(decodeURIComponent),i=r[3].split("&").reduce((f,g)=>{const w=g.split(/=(.*)/,2).map(decodeURIComponent),I=w[0].toLowerCase(),S=w[1],b=f;return b[I]=S,b},{});let a;const o={};if(t==="hotp")if(a=p,typeof i.counter!="undefined"&&Y.test(i.counter))o.counter=parseInt(i.counter,10);else throw new TypeError("Missing or invalid 'counter' parameter");else if(t==="totp"){if(a=u,typeof i.period!="undefined")if($.test(i.period))o.period=parseInt(i.period,10);else throw new TypeError("Invalid 'period' parameter")}else throw new TypeError("Unknown OTP type");if(typeof i.issuer!="undefined"&&(o.issuer=i.issuer),s.length===2?(o.label=s[1],typeof o.issuer=="undefined"||o.issuer===""?o.issuer=s[0]:s[0]===""&&(o.issuerInLabel=!1)):(o.label=s[0],typeof o.issuer!="undefined"&&o.issuer!==""&&(o.issuerInLabel=!1)),typeof i.secret!="undefined"&&D.test(i.secret))o.secret=i.secret;else throw new TypeError("Missing or invalid 'secret' parameter");if(typeof i.algorithm!="undefined")if(G.test(i.algorithm))o.algorithm=i.algorithm;else throw new TypeError("Invalid 'algorithm' parameter");if(typeof i.digits!="undefined")if($.test(i.digits))o.digits=parseInt(i.digits,10);else throw new TypeError("Invalid 'digits' parameter");return new a(o)}static stringify(e){if(e instanceof p||e instanceof u)return e.toString();throw new TypeError("Invalid 'HOTP/TOTP' object")}}const V="9.2.2";export{p as HOTP,h as Secret,u as TOTP,Z as URI,V as version}; //# sourceMappingURL=otpauth.node.min.mjs.map diff --git a/dist/otpauth.node.mjs b/dist/otpauth.node.mjs index fea46601..ff658f05 100644 --- a/dist/otpauth.node.mjs +++ b/dist/otpauth.node.mjs @@ -938,6 +938,6 @@ class URI { * Library version. * @type {string} */ -const version = "9.2.1"; +const version = "9.2.2"; export { HOTP, Secret, TOTP, URI, version }; diff --git a/dist/otpauth.umd.js b/dist/otpauth.umd.js index 78b9584f..23818741 100644 --- a/dist/otpauth.umd.js +++ b/dist/otpauth.umd.js @@ -1656,7 +1656,7 @@ * Library version. * @type {string} */ - const version = "9.2.1"; + const version = "9.2.2"; exports.HOTP = HOTP; exports.Secret = Secret; diff --git a/dist/otpauth.umd.min.js b/dist/otpauth.umd.min.js index 0c511148..401c8899 100644 --- a/dist/otpauth.umd.min.js +++ b/dist/otpauth.umd.min.js @@ -1,3 +1,3 @@ /// -(function(C,P){typeof exports=="object"&&typeof module!="undefined"?P(exports):typeof define=="function"&&define.amd?define(["exports"],P):(C=typeof globalThis!="undefined"?globalThis:C||self,P(C.OTPAuth={}))})(this,function(C){"use strict";const P=r=>{const e=new ArrayBuffer(8),n=new Uint8Array(e);let t=r;for(let i=7;i>=0&&t!==0;i--)n[i]=t&255,t-=n[i],t/=256;return e};var Z=Object.freeze({__proto__:null,createHmac:void 0,randomBytes:void 0,timingSafeEqual:void 0});const W="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",_="ARRAYBUFFER not supported by this environment",ee="UINT8ARRAY not supported by this environment";function te(r,e,n,t){let i,s,u;const c=e||[0],a=(n=n||0)>>>3,l=t===-1?3:0;for(i=0;i>>2,c.length<=s&&c.push(0),c[s]|=r[i]<<8*(l+t*(u%4));return{value:c,binLen:8*r.length+n}}function F(r,e,n){switch(e){case"UTF8":case"UTF16BE":case"UTF16LE":break;default:throw new Error("encoding must be UTF8, UTF16BE, or UTF16LE")}switch(r){case"HEX":return function(t,i,s){return function(u,c,a,l){let d,h,f,g;if(u.length%2!=0)throw new Error("String of HEX type must be in byte increments");const p=c||[0],m=(a=a||0)>>>3,A=l===-1?3:0;for(d=0;d>>1)+m,f=g>>>2;p.length<=f;)p.push(0);p[f]|=h<<8*(A+l*(g%4))}return{value:p,binLen:4*u.length+a}}(t,i,s,n)};case"TEXT":return function(t,i,s){return function(u,c,a,l,d){let h,f,g,p,m,A,y,b,S=0;const H=a||[0],U=(l=l||0)>>>3;if(c==="UTF8")for(y=d===-1?3:0,g=0;gh?f.push(h):2048>h?(f.push(192|h>>>6),f.push(128|63&h)):55296>h||57344<=h?f.push(224|h>>>12,128|h>>>6&63,128|63&h):(g+=1,h=65536+((1023&h)<<10|1023&u.charCodeAt(g)),f.push(240|h>>>18,128|h>>>12&63,128|h>>>6&63,128|63&h)),p=0;p>>2;H.length<=m;)H.push(0);H[m]|=f[p]<<8*(y+d*(A%4)),S+=1}else for(y=d===-1?2:0,b=c==="UTF16LE"&&d!==1||c!=="UTF16LE"&&d===1,g=0;g>>8),A=S+U,m=A>>>2;H.length<=m;)H.push(0);H[m]|=h<<8*(y+d*(A%4)),S+=2}return{value:H,binLen:8*S+l}}(t,e,i,s,n)};case"B64":return function(t,i,s){return function(u,c,a,l){let d,h,f,g,p,m,A,y=0;const b=c||[0],S=(a=a||0)>>>3,H=l===-1?3:0,U=u.indexOf("=");if(u.search(/^[a-zA-Z0-9=+/]+$/)===-1)throw new Error("Invalid character in base-64 string");if(u=u.replace(/=/g,""),U!==-1&&U{const e=new ArrayBuffer(8),n=new Uint8Array(e);let t=r;for(let i=7;i>=0&&t!==0;i--)n[i]=t&255,t-=n[i],t/=256;return e};var Z=Object.freeze({__proto__:null,createHmac:void 0,randomBytes:void 0,timingSafeEqual:void 0});const W="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",_="ARRAYBUFFER not supported by this environment",ee="UINT8ARRAY not supported by this environment";function te(r,e,n,t){let i,s,u;const c=e||[0],a=(n=n||0)>>>3,l=t===-1?3:0;for(i=0;i>>2,c.length<=s&&c.push(0),c[s]|=r[i]<<8*(l+t*(u%4));return{value:c,binLen:8*r.length+n}}function F(r,e,n){switch(e){case"UTF8":case"UTF16BE":case"UTF16LE":break;default:throw new Error("encoding must be UTF8, UTF16BE, or UTF16LE")}switch(r){case"HEX":return function(t,i,s){return function(u,c,a,l){let d,h,f,g;if(u.length%2!=0)throw new Error("String of HEX type must be in byte increments");const p=c||[0],m=(a=a||0)>>>3,A=l===-1?3:0;for(d=0;d>>1)+m,f=g>>>2;p.length<=f;)p.push(0);p[f]|=h<<8*(A+l*(g%4))}return{value:p,binLen:4*u.length+a}}(t,i,s,n)};case"TEXT":return function(t,i,s){return function(u,c,a,l,d){let h,f,g,p,m,A,y,b,S=0;const H=a||[0],U=(l=l||0)>>>3;if(c==="UTF8")for(y=d===-1?3:0,g=0;gh?f.push(h):2048>h?(f.push(192|h>>>6),f.push(128|63&h)):55296>h||57344<=h?f.push(224|h>>>12,128|h>>>6&63,128|63&h):(g+=1,h=65536+((1023&h)<<10|1023&u.charCodeAt(g)),f.push(240|h>>>18,128|h>>>12&63,128|h>>>6&63,128|63&h)),p=0;p>>2;H.length<=m;)H.push(0);H[m]|=f[p]<<8*(y+d*(A%4)),S+=1}else for(y=d===-1?2:0,b=c==="UTF16LE"&&d!==1||c!=="UTF16LE"&&d===1,g=0;g>>8),A=S+U,m=A>>>2;H.length<=m;)H.push(0);H[m]|=h<<8*(y+d*(A%4)),S+=2}return{value:H,binLen:8*S+l}}(t,e,i,s,n)};case"B64":return function(t,i,s){return function(u,c,a,l){let d,h,f,g,p,m,A,y=0;const b=c||[0],S=(a=a||0)>>>3,H=l===-1?3:0,U=u.indexOf("=");if(u.search(/^[a-zA-Z0-9=+/]+$/)===-1)throw new Error("Invalid character in base-64 string");if(u=u.replace(/=/g,""),U!==-1&&U{var Pe=Object.create;var ne=Object.defineProperty;var Ie=Object.getOwnPropertyDescriptor;var Oe=Object.getOwnPropertyNames;var _e=Object.getPrototypeOf,Re=Object.prototype.hasOwnProperty;var Me=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Fe=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Oe(e))!Re.call(t,i)&&i!==n&&ne(t,i,{get:()=>e[i],enumerable:!(r=Ie(e,i))||r.enumerable});return t};var De=(t,e,n)=>(n=t!=null?Pe(_e(t)):{},Fe(e||!t||!t.__esModule?ne(n,"default",{value:t,enumerable:!0}):n,t));var ae=Me((se,oe)=>{(function(){var t=function(e){var n=new t.Builder;return n.pipeline.add(t.trimmer,t.stopWordFilter,t.stemmer),n.searchPipeline.add(t.stemmer),e.call(n,n),n.build()};t.version="2.3.9";t.utils={},t.utils.warn=function(e){return function(n){e.console&&console.warn&&console.warn(n)}}(this),t.utils.asString=function(e){return e==null?"":e.toString()},t.utils.clone=function(e){if(e==null)return e;for(var n=Object.create(null),r=Object.keys(e),i=0;i0){var d=t.utils.clone(n)||{};d.position=[a,u],d.index=s.length,s.push(new t.Token(r.slice(a,o),d))}a=o+1}}return s},t.tokenizer.separator=/[\s\-]+/;t.Pipeline=function(){this._stack=[]},t.Pipeline.registeredFunctions=Object.create(null),t.Pipeline.registerFunction=function(e,n){n in this.registeredFunctions&&t.utils.warn("Overwriting existing registered function: "+n),e.label=n,t.Pipeline.registeredFunctions[e.label]=e},t.Pipeline.warnIfFunctionNotRegistered=function(e){var n=e.label&&e.label in this.registeredFunctions;n||t.utils.warn(`Function is not registered with pipeline. This may cause problems when serialising the index. `,e)},t.Pipeline.load=function(e){var n=new t.Pipeline;return e.forEach(function(r){var i=t.Pipeline.registeredFunctions[r];if(i)n.add(i);else throw new Error("Cannot load unregistered function: "+r)}),n},t.Pipeline.prototype.add=function(){var e=Array.prototype.slice.call(arguments);e.forEach(function(n){t.Pipeline.warnIfFunctionNotRegistered(n),this._stack.push(n)},this)},t.Pipeline.prototype.after=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var r=this._stack.indexOf(e);if(r==-1)throw new Error("Cannot find existingFn");r=r+1,this._stack.splice(r,0,n)},t.Pipeline.prototype.before=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var r=this._stack.indexOf(e);if(r==-1)throw new Error("Cannot find existingFn");this._stack.splice(r,0,n)},t.Pipeline.prototype.remove=function(e){var n=this._stack.indexOf(e);n!=-1&&this._stack.splice(n,1)},t.Pipeline.prototype.run=function(e){for(var n=this._stack.length,r=0;r1&&(oe&&(r=s),o!=e);)i=r-n,s=n+Math.floor(i/2),o=this.elements[s*2];if(o==e||o>e)return s*2;if(ol?d+=2:a==l&&(n+=r[u+1]*i[d+1],u+=2,d+=2);return n},t.Vector.prototype.similarity=function(e){return this.dot(e)/this.magnitude()||0},t.Vector.prototype.toArray=function(){for(var e=new Array(this.elements.length/2),n=1,r=0;n0){var o=s.str.charAt(0),a;o in s.node.edges?a=s.node.edges[o]:(a=new t.TokenSet,s.node.edges[o]=a),s.str.length==1&&(a.final=!0),i.push({node:a,editsRemaining:s.editsRemaining,str:s.str.slice(1)})}if(s.editsRemaining!=0){if("*"in s.node.edges)var l=s.node.edges["*"];else{var l=new t.TokenSet;s.node.edges["*"]=l}if(s.str.length==0&&(l.final=!0),i.push({node:l,editsRemaining:s.editsRemaining-1,str:s.str}),s.str.length>1&&i.push({node:s.node,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)}),s.str.length==1&&(s.node.final=!0),s.str.length>=1){if("*"in s.node.edges)var u=s.node.edges["*"];else{var u=new t.TokenSet;s.node.edges["*"]=u}s.str.length==1&&(u.final=!0),i.push({node:u,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)})}if(s.str.length>1){var d=s.str.charAt(0),v=s.str.charAt(1),f;v in s.node.edges?f=s.node.edges[v]:(f=new t.TokenSet,s.node.edges[v]=f),s.str.length==1&&(f.final=!0),i.push({node:f,editsRemaining:s.editsRemaining-1,str:d+s.str.slice(2)})}}}return r},t.TokenSet.fromString=function(e){for(var n=new t.TokenSet,r=n,i=0,s=e.length;i=e;n--){var r=this.uncheckedNodes[n],i=r.child.toString();i in this.minimizedNodes?r.parent.edges[r.char]=this.minimizedNodes[i]:(r.child._str=i,this.minimizedNodes[i]=r.child),this.uncheckedNodes.pop()}};t.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline},t.Index.prototype.search=function(e){return this.query(function(n){var r=new t.QueryParser(e,n);r.parse()})},t.Index.prototype.query=function(e){for(var n=new t.Query(this.fields),r=Object.create(null),i=Object.create(null),s=Object.create(null),o=Object.create(null),a=Object.create(null),l=0;l1?this._b=1:this._b=e},t.Builder.prototype.k1=function(e){this._k1=e},t.Builder.prototype.add=function(e,n){var r=e[this._ref],i=Object.keys(this._fields);this._documents[r]=n||{},this.documentCount+=1;for(var s=0;s=this.length)return t.QueryLexer.EOS;var e=this.str.charAt(this.pos);return this.pos+=1,e},t.QueryLexer.prototype.width=function(){return this.pos-this.start},t.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},t.QueryLexer.prototype.backup=function(){this.pos-=1},t.QueryLexer.prototype.acceptDigitRun=function(){var e,n;do e=this.next(),n=e.charCodeAt(0);while(n>47&&n<58);e!=t.QueryLexer.EOS&&this.backup()},t.QueryLexer.prototype.more=function(){return this.pos1&&(e.backup(),e.emit(t.QueryLexer.TERM)),e.ignore(),e.more())return t.QueryLexer.lexText},t.QueryLexer.lexEditDistance=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(t.QueryLexer.EDIT_DISTANCE),t.QueryLexer.lexText},t.QueryLexer.lexBoost=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(t.QueryLexer.BOOST),t.QueryLexer.lexText},t.QueryLexer.lexEOS=function(e){e.width()>0&&e.emit(t.QueryLexer.TERM)},t.QueryLexer.termSeparator=t.tokenizer.separator,t.QueryLexer.lexText=function(e){for(;;){var n=e.next();if(n==t.QueryLexer.EOS)return t.QueryLexer.lexEOS;if(n.charCodeAt(0)==92){e.escapeCharacter();continue}if(n==":")return t.QueryLexer.lexField;if(n=="~")return e.backup(),e.width()>0&&e.emit(t.QueryLexer.TERM),t.QueryLexer.lexEditDistance;if(n=="^")return e.backup(),e.width()>0&&e.emit(t.QueryLexer.TERM),t.QueryLexer.lexBoost;if(n=="+"&&e.width()===1||n=="-"&&e.width()===1)return e.emit(t.QueryLexer.PRESENCE),t.QueryLexer.lexText;if(n.match(t.QueryLexer.termSeparator))return t.QueryLexer.lexTerm}},t.QueryParser=function(e,n){this.lexer=new t.QueryLexer(e),this.query=n,this.currentClause={},this.lexemeIdx=0},t.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var e=t.QueryParser.parseClause;e;)e=e(this);return this.query},t.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},t.QueryParser.prototype.consumeLexeme=function(){var e=this.peekLexeme();return this.lexemeIdx+=1,e},t.QueryParser.prototype.nextClause=function(){var e=this.currentClause;this.query.clause(e),this.currentClause={}},t.QueryParser.parseClause=function(e){var n=e.peekLexeme();if(n!=null)switch(n.type){case t.QueryLexer.PRESENCE:return t.QueryParser.parsePresence;case t.QueryLexer.FIELD:return t.QueryParser.parseField;case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var r="expected either a field or a term, found "+n.type;throw n.str.length>=1&&(r+=" with value '"+n.str+"'"),new t.QueryParseError(r,n.start,n.end)}},t.QueryParser.parsePresence=function(e){var n=e.consumeLexeme();if(n!=null){switch(n.str){case"-":e.currentClause.presence=t.Query.presence.PROHIBITED;break;case"+":e.currentClause.presence=t.Query.presence.REQUIRED;break;default:var r="unrecognised presence operator'"+n.str+"'";throw new t.QueryParseError(r,n.start,n.end)}var i=e.peekLexeme();if(i==null){var r="expecting term or field, found nothing";throw new t.QueryParseError(r,n.start,n.end)}switch(i.type){case t.QueryLexer.FIELD:return t.QueryParser.parseField;case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var r="expecting term or field, found '"+i.type+"'";throw new t.QueryParseError(r,i.start,i.end)}}},t.QueryParser.parseField=function(e){var n=e.consumeLexeme();if(n!=null){if(e.query.allFields.indexOf(n.str)==-1){var r=e.query.allFields.map(function(o){return"'"+o+"'"}).join(", "),i="unrecognised field '"+n.str+"', possible fields: "+r;throw new t.QueryParseError(i,n.start,n.end)}e.currentClause.fields=[n.str];var s=e.peekLexeme();if(s==null){var i="expecting term, found nothing";throw new t.QueryParseError(i,n.start,n.end)}switch(s.type){case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var i="expecting term, found '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},t.QueryParser.parseTerm=function(e){var n=e.consumeLexeme();if(n!=null){e.currentClause.term=n.str.toLowerCase(),n.str.indexOf("*")!=-1&&(e.currentClause.usePipeline=!1);var r=e.peekLexeme();if(r==null){e.nextClause();return}switch(r.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+r.type+"'";throw new t.QueryParseError(i,r.start,r.end)}}},t.QueryParser.parseEditDistance=function(e){var n=e.consumeLexeme();if(n!=null){var r=parseInt(n.str,10);if(isNaN(r)){var i="edit distance must be numeric";throw new t.QueryParseError(i,n.start,n.end)}e.currentClause.editDistance=r;var s=e.peekLexeme();if(s==null){e.nextClause();return}switch(s.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},t.QueryParser.parseBoost=function(e){var n=e.consumeLexeme();if(n!=null){var r=parseInt(n.str,10);if(isNaN(r)){var i="boost must be numeric";throw new t.QueryParseError(i,n.start,n.end)}e.currentClause.boost=r;var s=e.peekLexeme();if(s==null){e.nextClause();return}switch(s.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},function(e,n){typeof define=="function"&&define.amd?define(n):typeof se=="object"?oe.exports=n():e.lunr=n()}(this,function(){return t})})()});var re=[];function G(t,e){re.push({selector:e,constructor:t})}var U=class{constructor(){this.alwaysVisibleMember=null;this.createComponents(document.body),this.ensureActivePageVisible(),this.ensureFocusedElementVisible(),this.listenForCodeCopies(),window.addEventListener("hashchange",()=>this.ensureFocusedElementVisible())}createComponents(e){re.forEach(n=>{e.querySelectorAll(n.selector).forEach(r=>{r.dataset.hasInstance||(new n.constructor({el:r,app:this}),r.dataset.hasInstance=String(!0))})})}filterChanged(){this.ensureFocusedElementVisible()}ensureActivePageVisible(){let e=document.querySelector(".tsd-navigation .current"),n=e?.parentElement;for(;n&&!n.classList.contains(".tsd-navigation");)n instanceof HTMLDetailsElement&&(n.open=!0),n=n.parentElement;if(e){let r=e.getBoundingClientRect().top-document.documentElement.clientHeight/4;document.querySelector(".site-menu").scrollTop=r}}ensureFocusedElementVisible(){if(this.alwaysVisibleMember&&(this.alwaysVisibleMember.classList.remove("always-visible"),this.alwaysVisibleMember.firstElementChild.remove(),this.alwaysVisibleMember=null),!location.hash)return;let e=document.getElementById(location.hash.substring(1));if(!e)return;let n=e.parentElement;for(;n&&n.tagName!=="SECTION";)n=n.parentElement;if(n&&n.offsetParent==null){this.alwaysVisibleMember=n,n.classList.add("always-visible");let r=document.createElement("p");r.classList.add("warning"),r.textContent="This member is normally hidden due to your filter settings.",n.prepend(r)}}listenForCodeCopies(){document.querySelectorAll("pre > button").forEach(e=>{let n;e.addEventListener("click",()=>{e.previousElementSibling instanceof HTMLElement&&navigator.clipboard.writeText(e.previousElementSibling.innerText.trim()),e.textContent="Copied!",e.classList.add("visible"),clearTimeout(n),n=setTimeout(()=>{e.classList.remove("visible"),n=setTimeout(()=>{e.textContent="Copy"},100)},1e3)})})}};var ie=(t,e=100)=>{let n;return()=>{clearTimeout(n),n=setTimeout(()=>t(),e)}};var de=De(ae());async function le(t,e){if(!window.searchData)return;let n=await fetch(window.searchData),r=new Blob([await n.arrayBuffer()]).stream().pipeThrough(new DecompressionStream("gzip")),i=await new Response(r).json();t.data=i,t.index=de.Index.load(i.index),e.classList.remove("loading"),e.classList.add("ready")}function he(){let t=document.getElementById("tsd-search");if(!t)return;let e={base:t.dataset.base+"/"},n=document.getElementById("tsd-search-script");t.classList.add("loading"),n&&(n.addEventListener("error",()=>{t.classList.remove("loading"),t.classList.add("failure")}),n.addEventListener("load",()=>{le(e,t)}),le(e,t));let r=document.querySelector("#tsd-search input"),i=document.querySelector("#tsd-search .results");if(!r||!i)throw new Error("The input field or the result list wrapper was not found");let s=!1;i.addEventListener("mousedown",()=>s=!0),i.addEventListener("mouseup",()=>{s=!1,t.classList.remove("has-focus")}),r.addEventListener("focus",()=>t.classList.add("has-focus")),r.addEventListener("blur",()=>{s||(s=!1,t.classList.remove("has-focus"))}),Ae(t,i,r,e)}function Ae(t,e,n,r){n.addEventListener("input",ie(()=>{Ne(t,e,n,r)},200));let i=!1;n.addEventListener("keydown",s=>{i=!0,s.key=="Enter"?Ve(e,n):s.key=="Escape"?n.blur():s.key=="ArrowUp"?ue(e,-1):s.key==="ArrowDown"?ue(e,1):i=!1}),n.addEventListener("keypress",s=>{i&&s.preventDefault()}),document.body.addEventListener("keydown",s=>{s.altKey||s.ctrlKey||s.metaKey||!n.matches(":focus")&&s.key==="/"&&(n.focus(),s.preventDefault())})}function Ne(t,e,n,r){if(!r.index||!r.data)return;e.textContent="";let i=n.value.trim(),s;if(i){let o=i.split(" ").map(a=>a.length?`*${a}*`:"").join(" ");s=r.index.search(o)}else s=[];for(let o=0;oa.score-o.score);for(let o=0,a=Math.min(10,s.length);o`,d=ce(l.name,i);globalThis.DEBUG_SEARCH_WEIGHTS&&(d+=` (score: ${s[o].score.toFixed(2)})`),l.parent&&(d=` - ${ce(l.parent,i)}.${d}`);let v=document.createElement("li");v.classList.value=l.classes??"";let f=document.createElement("a");f.href=r.base+l.url,f.innerHTML=u+d,v.append(f),e.appendChild(v)}}function ue(t,e){let n=t.querySelector(".current");if(!n)n=t.querySelector(e==1?"li:first-child":"li:last-child"),n&&n.classList.add("current");else{let r=n;if(e===1)do r=r.nextElementSibling??void 0;while(r instanceof HTMLElement&&r.offsetParent==null);else do r=r.previousElementSibling??void 0;while(r instanceof HTMLElement&&r.offsetParent==null);r&&(n.classList.remove("current"),r.classList.add("current"))}}function Ve(t,e){let n=t.querySelector(".current");if(n||(n=t.querySelector("li:first-child")),n){let r=n.querySelector("a");r&&(window.location.href=r.href),e.blur()}}function ce(t,e){if(e==="")return t;let n=t.toLocaleLowerCase(),r=e.toLocaleLowerCase(),i=[],s=0,o=n.indexOf(r);for(;o!=-1;)i.push(K(t.substring(s,o)),`${K(t.substring(o,o+r.length))}`),s=o+r.length,o=n.indexOf(r,s);return i.push(K(t.substring(s))),i.join("")}var Be={"&":"&","<":"<",">":">","'":"'",'"':"""};function K(t){return t.replace(/[&<>"'"]/g,e=>Be[e])}var C=class{constructor(e){this.el=e.el,this.app=e.app}};var F="mousedown",pe="mousemove",B="mouseup",J={x:0,y:0},fe=!1,ee=!1,He=!1,D=!1,me=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);document.documentElement.classList.add(me?"is-mobile":"not-mobile");me&&"ontouchstart"in document.documentElement&&(He=!0,F="touchstart",pe="touchmove",B="touchend");document.addEventListener(F,t=>{ee=!0,D=!1;let e=F=="touchstart"?t.targetTouches[0]:t;J.y=e.pageY||0,J.x=e.pageX||0});document.addEventListener(pe,t=>{if(ee&&!D){let e=F=="touchstart"?t.targetTouches[0]:t,n=J.x-(e.pageX||0),r=J.y-(e.pageY||0);D=Math.sqrt(n*n+r*r)>10}});document.addEventListener(B,()=>{ee=!1});document.addEventListener("click",t=>{fe&&(t.preventDefault(),t.stopImmediatePropagation(),fe=!1)});var X=class extends C{constructor(n){super(n);this.className=this.el.dataset.toggle||"",this.el.addEventListener(B,r=>this.onPointerUp(r)),this.el.addEventListener("click",r=>r.preventDefault()),document.addEventListener(F,r=>this.onDocumentPointerDown(r)),document.addEventListener(B,r=>this.onDocumentPointerUp(r))}setActive(n){if(this.active==n)return;this.active=n,document.documentElement.classList.toggle("has-"+this.className,n),this.el.classList.toggle("active",n);let r=(this.active?"to-has-":"from-has-")+this.className;document.documentElement.classList.add(r),setTimeout(()=>document.documentElement.classList.remove(r),500)}onPointerUp(n){D||(this.setActive(!0),n.preventDefault())}onDocumentPointerDown(n){if(this.active){if(n.target.closest(".col-sidebar, .tsd-filter-group"))return;this.setActive(!1)}}onDocumentPointerUp(n){if(!D&&this.active&&n.target.closest(".col-sidebar")){let r=n.target.closest("a");if(r){let i=window.location.href;i.indexOf("#")!=-1&&(i=i.substring(0,i.indexOf("#"))),r.href.substring(0,i.length)==i&&setTimeout(()=>this.setActive(!1),250)}}}};var te;try{te=localStorage}catch{te={getItem(){return null},setItem(){}}}var Q=te;var ve=document.head.appendChild(document.createElement("style"));ve.dataset.for="filters";var Y=class extends C{constructor(n){super(n);this.key=`filter-${this.el.name}`,this.value=this.el.checked,this.el.addEventListener("change",()=>{this.setLocalStorage(this.el.checked)}),this.setLocalStorage(this.fromLocalStorage()),ve.innerHTML+=`html:not(.${this.key}) .tsd-is-${this.el.name} { display: none; } -`}fromLocalStorage(){let n=Q.getItem(this.key);return n?n==="true":this.el.checked}setLocalStorage(n){Q.setItem(this.key,n.toString()),this.value=n,this.handleValueChange()}handleValueChange(){this.el.checked=this.value,document.documentElement.classList.toggle(this.key,this.value),this.app.filterChanged(),document.querySelectorAll(".tsd-index-section").forEach(n=>{n.style.display="block";let r=Array.from(n.querySelectorAll(".tsd-index-link")).every(i=>i.offsetParent==null);n.style.display=r?"none":"block"})}};var Z=class extends C{constructor(n){super(n);this.summary=this.el.querySelector(".tsd-accordion-summary"),this.icon=this.summary.querySelector("svg"),this.key=`tsd-accordion-${this.summary.dataset.key??this.summary.textContent.trim().replace(/\s+/g,"-").toLowerCase()}`;let r=Q.getItem(this.key);this.el.open=r?r==="true":this.el.open,this.el.addEventListener("toggle",()=>this.update());let i=this.summary.querySelector("a");i&&i.addEventListener("click",()=>{location.assign(i.href)}),this.update()}update(){this.icon.style.transform=`rotate(${this.el.open?0:-90}deg)`,Q.setItem(this.key,this.el.open.toString())}};function ge(t){let e=Q.getItem("tsd-theme")||"os";t.value=e,ye(e),t.addEventListener("change",()=>{Q.setItem("tsd-theme",t.value),ye(t.value)})}function ye(t){document.documentElement.dataset.theme=t}var Le;function be(){let t=document.getElementById("tsd-nav-script");t&&(t.addEventListener("load",xe),xe())}async function xe(){let t=document.getElementById("tsd-nav-container");if(!t||!window.navigationData)return;let n=await(await fetch(window.navigationData)).arrayBuffer(),r=new Blob([n]).stream().pipeThrough(new DecompressionStream("gzip")),i=await new Response(r).json();Le=t.dataset.base+"/",t.innerHTML="";for(let s of i)we(s,t,[]);window.app.createComponents(t),window.app.ensureActivePageVisible()}function we(t,e,n){let r=e.appendChild(document.createElement("li"));if(t.children){let i=[...n,t.text],s=r.appendChild(document.createElement("details"));s.className=t.class?`${t.class} tsd-index-accordion`:"tsd-index-accordion",s.dataset.key=i.join("$");let o=s.appendChild(document.createElement("summary"));o.className="tsd-accordion-summary",o.innerHTML='',Ee(t,o);let a=s.appendChild(document.createElement("div"));a.className="tsd-accordion-details";let l=a.appendChild(document.createElement("ul"));l.className="tsd-nested-navigation";for(let u of t.children)we(u,l,i)}else Ee(t,r,t.class)}function Ee(t,e,n){if(t.path){let r=e.appendChild(document.createElement("a"));r.href=Le+t.path,n&&(r.className=n),location.href===r.href&&r.classList.add("current"),t.kind&&(r.innerHTML=``),r.appendChild(document.createElement("span")).textContent=t.text}else e.appendChild(document.createElement("span")).textContent=t.text}G(X,"a[data-toggle]");G(Z,".tsd-index-accordion");G(Y,".tsd-filter-item input[type=checkbox]");var Se=document.getElementById("tsd-theme");Se&&ge(Se);var je=new U;Object.defineProperty(window,"app",{value:je});he();be();})(); + ${ce(l.parent,i)}.${d}`);let v=document.createElement("li");v.classList.value=l.classes??"";let f=document.createElement("a");f.href=r.base+l.url,f.innerHTML=u+d,v.append(f),e.appendChild(v)}}function ue(t,e){let n=t.querySelector(".current");if(!n)n=t.querySelector(e==1?"li:first-child":"li:last-child"),n&&n.classList.add("current");else{let r=n;if(e===1)do r=r.nextElementSibling??void 0;while(r instanceof HTMLElement&&r.offsetParent==null);else do r=r.previousElementSibling??void 0;while(r instanceof HTMLElement&&r.offsetParent==null);r&&(n.classList.remove("current"),r.classList.add("current"))}}function Ve(t,e){let n=t.querySelector(".current");if(n||(n=t.querySelector("li:first-child")),n){let r=n.querySelector("a");r&&(window.location.href=r.href),e.blur()}}function ce(t,e){if(e==="")return t;let n=t.toLocaleLowerCase(),r=e.toLocaleLowerCase(),i=[],s=0,o=n.indexOf(r);for(;o!=-1;)i.push(K(t.substring(s,o)),`${K(t.substring(o,o+r.length))}`),s=o+r.length,o=n.indexOf(r,s);return i.push(K(t.substring(s))),i.join("")}var Be={"&":"&","<":"<",">":">","'":"'",'"':"""};function K(t){return t.replace(/[&<>"'"]/g,e=>Be[e])}var C=class{constructor(e){this.el=e.el,this.app=e.app}};var F="mousedown",pe="mousemove",B="mouseup",J={x:0,y:0},fe=!1,ee=!1,He=!1,D=!1,me=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);document.documentElement.classList.add(me?"is-mobile":"not-mobile");me&&"ontouchstart"in document.documentElement&&(He=!0,F="touchstart",pe="touchmove",B="touchend");document.addEventListener(F,t=>{ee=!0,D=!1;let e=F=="touchstart"?t.targetTouches[0]:t;J.y=e.pageY||0,J.x=e.pageX||0});document.addEventListener(pe,t=>{if(ee&&!D){let e=F=="touchstart"?t.targetTouches[0]:t,n=J.x-(e.pageX||0),r=J.y-(e.pageY||0);D=Math.sqrt(n*n+r*r)>10}});document.addEventListener(B,()=>{ee=!1});document.addEventListener("click",t=>{fe&&(t.preventDefault(),t.stopImmediatePropagation(),fe=!1)});var X=class extends C{constructor(e){super(e),this.className=this.el.dataset.toggle||"",this.el.addEventListener(B,n=>this.onPointerUp(n)),this.el.addEventListener("click",n=>n.preventDefault()),document.addEventListener(F,n=>this.onDocumentPointerDown(n)),document.addEventListener(B,n=>this.onDocumentPointerUp(n))}setActive(e){if(this.active==e)return;this.active=e,document.documentElement.classList.toggle("has-"+this.className,e),this.el.classList.toggle("active",e);let n=(this.active?"to-has-":"from-has-")+this.className;document.documentElement.classList.add(n),setTimeout(()=>document.documentElement.classList.remove(n),500)}onPointerUp(e){D||(this.setActive(!0),e.preventDefault())}onDocumentPointerDown(e){if(this.active){if(e.target.closest(".col-sidebar, .tsd-filter-group"))return;this.setActive(!1)}}onDocumentPointerUp(e){if(!D&&this.active&&e.target.closest(".col-sidebar")){let n=e.target.closest("a");if(n){let r=window.location.href;r.indexOf("#")!=-1&&(r=r.substring(0,r.indexOf("#"))),n.href.substring(0,r.length)==r&&setTimeout(()=>this.setActive(!1),250)}}}};var te;try{te=localStorage}catch{te={getItem(){return null},setItem(){}}}var Q=te;var ve=document.head.appendChild(document.createElement("style"));ve.dataset.for="filters";var Y=class extends C{constructor(e){super(e),this.key=`filter-${this.el.name}`,this.value=this.el.checked,this.el.addEventListener("change",()=>{this.setLocalStorage(this.el.checked)}),this.setLocalStorage(this.fromLocalStorage()),ve.innerHTML+=`html:not(.${this.key}) .tsd-is-${this.el.name} { display: none; } +`,this.handleValueChange()}fromLocalStorage(){let e=Q.getItem(this.key);return e?e==="true":this.el.checked}setLocalStorage(e){Q.setItem(this.key,e.toString()),this.value=e,this.handleValueChange()}handleValueChange(){this.el.checked=this.value,document.documentElement.classList.toggle(this.key,this.value),this.app.filterChanged(),document.querySelectorAll(".tsd-index-section").forEach(e=>{e.style.display="block";let n=Array.from(e.querySelectorAll(".tsd-index-link")).every(r=>r.offsetParent==null);e.style.display=n?"none":"block"})}};var Z=class extends C{constructor(e){super(e),this.summary=this.el.querySelector(".tsd-accordion-summary"),this.icon=this.summary.querySelector("svg"),this.key=`tsd-accordion-${this.summary.dataset.key??this.summary.textContent.trim().replace(/\s+/g,"-").toLowerCase()}`;let n=Q.getItem(this.key);this.el.open=n?n==="true":this.el.open,this.el.addEventListener("toggle",()=>this.update());let r=this.summary.querySelector("a");r&&r.addEventListener("click",()=>{location.assign(r.href)}),this.update()}update(){this.icon.style.transform=`rotate(${this.el.open?0:-90}deg)`,Q.setItem(this.key,this.el.open.toString())}};function ge(t){let e=Q.getItem("tsd-theme")||"os";t.value=e,ye(e),t.addEventListener("change",()=>{Q.setItem("tsd-theme",t.value),ye(t.value)})}function ye(t){document.documentElement.dataset.theme=t}var Le;function be(){let t=document.getElementById("tsd-nav-script");t&&(t.addEventListener("load",xe),xe())}async function xe(){let t=document.getElementById("tsd-nav-container");if(!t||!window.navigationData)return;let n=await(await fetch(window.navigationData)).arrayBuffer(),r=new Blob([n]).stream().pipeThrough(new DecompressionStream("gzip")),i=await new Response(r).json();Le=t.dataset.base+"/",t.innerHTML="";for(let s of i)we(s,t,[]);window.app.createComponents(t),window.app.ensureActivePageVisible()}function we(t,e,n){let r=e.appendChild(document.createElement("li"));if(t.children){let i=[...n,t.text],s=r.appendChild(document.createElement("details"));s.className=t.class?`${t.class} tsd-index-accordion`:"tsd-index-accordion",s.dataset.key=i.join("$");let o=s.appendChild(document.createElement("summary"));o.className="tsd-accordion-summary",o.innerHTML='',Ee(t,o);let a=s.appendChild(document.createElement("div"));a.className="tsd-accordion-details";let l=a.appendChild(document.createElement("ul"));l.className="tsd-nested-navigation";for(let u of t.children)we(u,l,i)}else Ee(t,r,t.class)}function Ee(t,e,n){if(t.path){let r=e.appendChild(document.createElement("a"));r.href=Le+t.path,n&&(r.className=n),location.href===r.href&&r.classList.add("current"),t.kind&&(r.innerHTML=``),r.appendChild(document.createElement("span")).textContent=t.text}else e.appendChild(document.createElement("span")).textContent=t.text}G(X,"a[data-toggle]");G(Z,".tsd-index-accordion");G(Y,".tsd-filter-item input[type=checkbox]");var Se=document.getElementById("tsd-theme");Se&&ge(Se);var je=new U;Object.defineProperty(window,"app",{value:je});he();be();})(); /*! Bundled license information: lunr/lunr.js: diff --git a/docs/assets/style.css b/docs/assets/style.css index 07a385b7..98a43779 100644 --- a/docs/assets/style.css +++ b/docs/assets/style.css @@ -29,7 +29,7 @@ --light-color-ts-constructor-signature: var(--light-color-ts-constructor); --light-color-ts-parameter: var(--light-color-ts-variable); /* type literal not included as links will never be generated to it */ - --light-color-ts-type-parameter: var(--light-color-ts-type-alias); + --light-color-ts-type-parameter: #a55c0e; --light-color-ts-accessor: var(--light-color-ts-property); --light-color-ts-get-signature: var(--light-color-ts-accessor); --light-color-ts-set-signature: var(--light-color-ts-accessor); @@ -69,7 +69,7 @@ --dark-color-ts-constructor-signature: var(--dark-color-ts-constructor); --dark-color-ts-parameter: var(--dark-color-ts-variable); /* type literal not included as links will never be generated to it */ - --dark-color-ts-type-parameter: var(--dark-color-ts-type-alias); + --dark-color-ts-type-parameter: #e07d13; --dark-color-ts-accessor: var(--dark-color-ts-property); --dark-color-ts-get-signature: var(--dark-color-ts-accessor); --dark-color-ts-set-signature: var(--dark-color-ts-accessor); @@ -266,12 +266,12 @@ h6 { line-height: 1.2; } -h1 > a, -h2 > a, -h3 > a, -h4 > a, -h5 > a, -h6 > a { +h1 > a:not(.link), +h2 > a:not(.link), +h3 > a:not(.link), +h4 > a:not(.link), +h5 > a:not(.link), +h6 > a:not(.link) { text-decoration: none; color: var(--color-text); } @@ -649,6 +649,28 @@ input[type="checkbox"]:checked ~ svg .tsd-checkbox-checkmark { font-weight: bold; } +.tsd-full-hierarchy:not(:last-child) { + margin-bottom: 1em; + padding-bottom: 1em; + border-bottom: 1px solid var(--color-accent); +} +.tsd-full-hierarchy, +.tsd-full-hierarchy ul { + list-style: none; + margin: 0; + padding: 0; +} +.tsd-full-hierarchy ul { + padding-left: 1.5rem; +} +.tsd-full-hierarchy a { + padding: 0.25rem 0 !important; + font-size: 1rem; + display: inline-flex; + align-items: center; + color: var(--color-text); +} + .tsd-panel-group.tsd-index-group { margin-bottom: 0; } @@ -714,12 +736,15 @@ input[type="checkbox"]:checked ~ svg .tsd-checkbox-checkmark { } .tsd-navigation > a, .tsd-navigation .tsd-accordion-summary { - width: calc(100% - 0.5rem); + width: calc(100% - 0.25rem); + display: flex; + align-items: center; } .tsd-navigation a, .tsd-navigation summary > span, .tsd-page-navigation a { - display: inline-flex; + display: flex; + width: calc(100% - 0.25rem); align-items: center; padding: 0.25rem; color: var(--color-text); @@ -759,11 +784,6 @@ input[type="checkbox"]:checked ~ svg .tsd-checkbox-checkmark { margin-left: -1.5rem; } -.tsd-nested-navigation > li > a, -.tsd-nested-navigation > li > span { - width: calc(100% - 1.75rem - 0.5rem); -} - .tsd-page-navigation ul { padding-left: 1.75rem; } diff --git a/docs/classes/HOTP.html b/docs/classes/HOTP.html index 4b4e9583..db65800f 100644 --- a/docs/classes/HOTP.html +++ b/docs/classes/HOTP.html @@ -1,6 +1,6 @@ HOTP | otpauth

Class HOTP

HOTP: An HMAC-based One-time Password Algorithm.

Constructors

Constructors

Properties

algorithm counter digits @@ -23,34 +23,34 @@
  • issuerInLabel: undefined | boolean

    Include issuer prefix in label.

  • label: undefined | string

    Account label.

  • secret: undefined | string | Secret

    Secret key.

    -
  • Returns HOTP

    Properties

    algorithm: string

    HMAC hashing algorithm.

    -
    counter: number

    Initial counter value.

    -
    digits: number

    Token length.

    -
    issuer: string

    Account provider.

    -
    issuerInLabel: boolean

    Include issuer prefix in label.

    -
    label: string

    Account label.

    -
    secret: Secret

    Secret key.

    -

    Accessors

    • get defaults(): {
          algorithm: string;
          counter: number;
          digits: number;
          issuer: string;
          issuerInLabel: boolean;
          label: string;
          window: number;
      }
    • Default configuration.

      -

      Returns {
          algorithm: string;
          counter: number;
          digits: number;
          issuer: string;
          issuerInLabel: boolean;
          label: string;
          window: number;
      }

      • algorithm: string
      • counter: number
      • digits: number
      • issuer: string
      • issuerInLabel: boolean
      • label: string
      • window: number

    Methods

    • Generates an HOTP token.

      +

    Returns HOTP

    Properties

    algorithm: string

    HMAC hashing algorithm.

    +
    counter: number

    Initial counter value.

    +
    digits: number

    Token length.

    +
    issuer: string

    Account provider.

    +
    issuerInLabel: boolean

    Include issuer prefix in label.

    +
    label: string

    Account label.

    +
    secret: Secret

    Secret key.

    +

    Accessors

    • get defaults(): {
          algorithm: string;
          counter: number;
          digits: number;
          issuer: string;
          issuerInLabel: boolean;
          label: string;
          window: number;
      }
    • Default configuration.

      +

      Returns {
          algorithm: string;
          counter: number;
          digits: number;
          issuer: string;
          issuerInLabel: boolean;
          label: string;
          window: number;
      }

      • algorithm: string
      • counter: number
      • digits: number
      • issuer: string
      • issuerInLabel: boolean
      • label: string
      • window: number

    Methods

    • Generates an HOTP token.

      Parameters

      • Optional config: {
            counter: undefined | number;
        } = {}

        Configuration options.

        • counter: undefined | number

          Counter value.

      Returns string

      Token.

      -
    • Returns a Google Authenticator key URI.

      +
    • Returns a Google Authenticator key URI.

      Returns string

      URI.

      -
    • Validates an HOTP token.

      +
    • Validates an HOTP token.

      Parameters

      • config: {
            counter: undefined | number;
            token: string;
            window: undefined | number;
        }

        Configuration options.

        • counter: undefined | number

          Counter value.

        • token: string

          Token value.

        • window: undefined | number

          Window of counter values to test.

      Returns null | number

      Token delta or null if it is not found in the search window, in which case it should be considered invalid.

      -
    • Generates an HOTP token.

      +
    • Generates an HOTP token.

      Parameters

      • config: {
            algorithm: undefined | string;
            counter: undefined | number;
            digits: undefined | number;
            secret: Secret;
        }

        Configuration options.

        • algorithm: undefined | string

          HMAC hashing algorithm.

        • counter: undefined | number

          Counter value.

        • digits: undefined | number

          Token length.

        • secret: Secret

          Secret key.

      Returns string

      Token.

      -
    • Validates an HOTP token.

      +
    • Validates an HOTP token.

      Parameters

      • config: {
            algorithm: undefined | string;
            counter: undefined | number;
            digits: number;
            secret: Secret;
            token: string;
            window: undefined | number;
        }

        Configuration options.

        • algorithm: undefined | string

          HMAC hashing algorithm.

        • counter: undefined | number

          Counter value.

          @@ -59,4 +59,4 @@
        • token: string

          Token value.

        • window: undefined | number

          Window of counter values to test.

      Returns null | number

      Token delta or null if it is not found in the search window, in which case it should be considered invalid.

      -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/classes/Secret.html b/docs/classes/Secret.html index 45eea517..3375e2ed 100644 --- a/docs/classes/Secret.html +++ b/docs/classes/Secret.html @@ -1,5 +1,5 @@ Secret | otpauth

    Class Secret

    OTP secret key.

    -

    Constructors

    Constructors

    Properties

    Accessors

    base32 hex @@ -10,24 +10,24 @@ fromLatin1 fromUTF8

    Constructors

    • Creates a secret key object.

      -

      Parameters

      • Optional config: {
            buffer: undefined | ArrayBuffer;
            size: undefined | number;
        } = {}

        Configuration options.

        -
        • buffer: undefined | ArrayBuffer

          Secret key.

          +

          Parameters

          • Optional config: {
                buffer: undefined | ArrayBuffer;
                size: undefined | number;
            } = {}

            Configuration options.

            +
            • buffer: undefined | ArrayBuffer

              Secret key.

            • size: undefined | number

              Number of random bytes to generate, ignored if 'buffer' is provided.

              -

          Returns Secret

    Properties

    buffer: ArrayBuffer

    Secret key.

    -

    Accessors

    • get base32(): string
    • Base32 string representation of secret key.

      -

      Returns string

    • get hex(): string
    • Hexadecimal string representation of secret key.

      -

      Returns string

    • get latin1(): string
    • Latin-1 string representation of secret key.

      -

      Returns string

    • get utf8(): string
    • UTF-8 string representation of secret key.

      -

      Returns string

    Methods

    • Converts a base32 string to a Secret object.

      +

    Returns Secret

    Properties

    buffer: ArrayBuffer

    Secret key.

    +

    Accessors

    • get base32(): string
    • Base32 string representation of secret key.

      +

      Returns string

    • get hex(): string
    • Hexadecimal string representation of secret key.

      +

      Returns string

    • get latin1(): string
    • Latin-1 string representation of secret key.

      +

      Returns string

    • get utf8(): string
    • UTF-8 string representation of secret key.

      +

      Returns string

    Methods

    • Converts a base32 string to a Secret object.

      Parameters

      • str: string

        Base32 string.

      Returns Secret

      Secret object.

      -
    • Converts a hexadecimal string to a Secret object.

      +
    • Converts a hexadecimal string to a Secret object.

      Parameters

      • str: string

        Hexadecimal string.

      Returns Secret

      Secret object.

      -
    • Converts a Latin-1 string to a Secret object.

      +
    • Converts a Latin-1 string to a Secret object.

      Parameters

      • str: string

        Latin-1 string.

      Returns Secret

      Secret object.

      -
    • Converts an UTF-8 string to a Secret object.

      +
    • Converts an UTF-8 string to a Secret object.

      Parameters

      • str: string

        UTF-8 string.

      Returns Secret

      Secret object.

      -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/classes/TOTP.html b/docs/classes/TOTP.html index 30a99dfd..f3776ebf 100644 --- a/docs/classes/TOTP.html +++ b/docs/classes/TOTP.html @@ -1,6 +1,6 @@ TOTP | otpauth

    Class TOTP

    TOTP: Time-Based One-Time Password Algorithm.

    Constructors

    Constructors

    Properties

    algorithm digits issuer @@ -23,27 +23,27 @@
  • label: undefined | string

    Account label.

  • period: undefined | number

    Token time-step duration.

  • secret: undefined | string | Secret

    Secret key.

    -
  • Returns TOTP

    Properties

    algorithm: string

    HMAC hashing algorithm.

    -
    digits: number

    Token length.

    -
    issuer: string

    Account provider.

    -
    issuerInLabel: boolean

    Include issuer prefix in label.

    -
    label: string

    Account label.

    -
    period: number

    Token time-step duration.

    -
    secret: Secret

    Secret key.

    -

    Accessors

    • get defaults(): {
          algorithm: string;
          digits: number;
          issuer: string;
          issuerInLabel: boolean;
          label: string;
          period: number;
          window: number;
      }
    • Default configuration.

      -

      Returns {
          algorithm: string;
          digits: number;
          issuer: string;
          issuerInLabel: boolean;
          label: string;
          period: number;
          window: number;
      }

      • algorithm: string
      • digits: number
      • issuer: string
      • issuerInLabel: boolean
      • label: string
      • period: number
      • window: number

    Methods

    • Generates a TOTP token.

      +

    Returns TOTP

    Properties

    algorithm: string

    HMAC hashing algorithm.

    +
    digits: number

    Token length.

    +
    issuer: string

    Account provider.

    +
    issuerInLabel: boolean

    Include issuer prefix in label.

    +
    label: string

    Account label.

    +
    period: number

    Token time-step duration.

    +
    secret: Secret

    Secret key.

    +

    Accessors

    • get defaults(): {
          algorithm: string;
          digits: number;
          issuer: string;
          issuerInLabel: boolean;
          label: string;
          period: number;
          window: number;
      }
    • Default configuration.

      +

      Returns {
          algorithm: string;
          digits: number;
          issuer: string;
          issuerInLabel: boolean;
          label: string;
          period: number;
          window: number;
      }

      • algorithm: string
      • digits: number
      • issuer: string
      • issuerInLabel: boolean
      • label: string
      • period: number
      • window: number

    Methods

    • Generates a TOTP token.

      Parameters

      • Optional config: {
            timestamp: undefined | number;
        } = {}

        Configuration options.

        • timestamp: undefined | number

          Timestamp value in milliseconds.

      Returns string

      Token.

      -
    • Returns a Google Authenticator key URI.

      +
    • Returns a Google Authenticator key URI.

      Returns string

      URI.

      -
    • Validates a TOTP token.

      +
    • Validates a TOTP token.

      Parameters

      • config: {
            timestamp: undefined | number;
            token: string;
            window: undefined | number;
        }

        Configuration options.

        • timestamp: undefined | number

          Timestamp value in milliseconds.

        • token: string

          Token value.

        • window: undefined | number

          Window of counter values to test.

      Returns null | number

      Token delta or null if it is not found in the search window, in which case it should be considered invalid.

      -
    • Generates a TOTP token.

      +
    • Generates a TOTP token.

      Parameters

      • config: {
            algorithm: undefined | string;
            digits: undefined | number;
            period: undefined | number;
            secret: Secret;
            timestamp: undefined | number;
        }

        Configuration options.

        • algorithm: undefined | string

          HMAC hashing algorithm.

        • digits: undefined | number

          Token length.

          @@ -51,7 +51,7 @@
        • secret: Secret

          Secret key.

        • timestamp: undefined | number

          Timestamp value in milliseconds.

      Returns string

      Token.

      -
    • Validates a TOTP token.

      +
    • Validates a TOTP token.

      Parameters

      • config: {
            algorithm: undefined | string;
            digits: number;
            period: undefined | number;
            secret: Secret;
            timestamp: undefined | number;
            token: string;
            window: undefined | number;
        }

        Configuration options.

        • algorithm: undefined | string

          HMAC hashing algorithm.

        • digits: number

          Token length.

          @@ -61,4 +61,4 @@
        • token: string

          Token value.

        • window: undefined | number

          Window of counter values to test.

      Returns null | number

      Token delta or null if it is not found in the search window, in which case it should be considered invalid.

      -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/classes/URI.html b/docs/classes/URI.html index 65fe0143..09598806 100644 --- a/docs/classes/URI.html +++ b/docs/classes/URI.html @@ -1,12 +1,12 @@ URI | otpauth

    Class URI

    HOTP/TOTP object/string conversion.

    Constructors

    Constructors

    Methods

    Constructors

    Methods

    • Parses a Google Authenticator key URI and returns an HOTP/TOTP object.

      Parameters

      • uri: string

        Google Authenticator Key URI.

      Returns HOTP | TOTP

      HOTP/TOTP object.

      -
    • Converts an HOTP/TOTP object to a Google Authenticator key URI.

      +
    • Converts an HOTP/TOTP object to a Google Authenticator key URI.

      Parameters

      Returns string

      Google Authenticator Key URI.

      -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/index.html b/docs/index.html index 0e2ed03c..f7e704f1 100644 --- a/docs/index.html +++ b/docs/index.html @@ -3,4 +3,4 @@ TOTP URI

    Variables

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/variables/version.html b/docs/variables/version.html index f3dccc9c..399e6886 100644 --- a/docs/variables/version.html +++ b/docs/variables/version.html @@ -1,2 +1,2 @@ version | otpauth

    Variable versionConst

    version: string = "__OTPAUTH_VERSION__"

    Library version.

    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index b753ef9d..cfacbefb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "otpauth", - "version": "9.2.1", + "version": "9.2.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "otpauth", - "version": "9.2.1", + "version": "9.2.2", "license": "MIT", "dependencies": { "jssha": "~3.3.1" diff --git a/package.json b/package.json index 32e5fe3c..05d1d6e2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "otpauth", - "version": "9.2.1", + "version": "9.2.2", "description": "One Time Password (HOTP/TOTP) library for Node.js, Deno, Bun and browsers", "keywords": [ "otp",