You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2 lines
80 KiB

/*! For license information please see safari-notifications.js.LICENSE.txt */
var customModule;(()=>{var t={82:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createCurve=e.getHash=void 0;const n=r(569),o=r(89),i=r(551);function s(t){return{hash:t,hmac:(e,...r)=>(0,n.hmac)(t,e,(0,o.concatBytes)(...r)),randomBytes:o.randomBytes}}e.getHash=s,e.createCurve=function(t,e){const r=e=>(0,i.weierstrass)({...t,...s(e)});return Object.freeze({...r(e),create:r})}},525:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.validateBasic=e.wNAF=void 0;const n=r(632),o=r(219),i=BigInt(0),s=BigInt(1);e.wNAF=function(t,e){const r=(t,e)=>{const r=e.negate();return t?r:e},n=t=>({windows:Math.ceil(e/t)+1,windowSize:2**(t-1)});return{constTimeNegate:r,unsafeLadder(e,r){let n=t.ZERO,o=e;for(;r>i;)r&s&&(n=n.add(o)),o=o.double(),r>>=s;return n},precomputeWindow(t,e){const{windows:r,windowSize:o}=n(e),i=[];let s=t,a=s;for(let t=0;t<r;t++){a=s,i.push(a);for(let t=1;t<o;t++)a=a.add(s),i.push(a);s=a.double()}return i},wNAF(e,o,i){const{windows:a,windowSize:f}=n(e);let c=t.ZERO,u=t.BASE;const h=BigInt(2**e-1),l=2**e,d=BigInt(e);for(let t=0;t<a;t++){const e=t*f;let n=Number(i&h);i>>=d,n>f&&(n-=l,i+=s);const a=e,y=e+Math.abs(n)-1,p=t%2!=0,g=n<0;0===n?u=u.add(r(p,o[a])):c=c.add(r(g,o[y]))}return{p:c,f:u}},wNAFCached(t,e,r,n){const o=t._WINDOW_SIZE||1;let i=e.get(t);return i||(i=this.precomputeWindow(t,o),1!==o&&e.set(t,n(i))),this.wNAF(o,i,r)}}},e.validateBasic=function(t){return(0,n.validateField)(t.Fp),(0,o.validateObject)(t,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...(0,n.nLength)(t.n,t.nBitLength),...t,p:t.Fp.ORDER})}},134:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createHasher=e.isogenyMap=e.hash_to_field=e.expand_message_xof=e.expand_message_xmd=void 0;const n=r(632),o=r(219),i=o.bytesToNumberBE;function s(t,e){if(t<0||t>=1<<8*e)throw new Error(`bad I2OSP call: value=${t} length=${e}`);const r=Array.from({length:e}).fill(0);for(let n=e-1;n>=0;n--)r[n]=255&t,t>>>=8;return new Uint8Array(r)}function a(t,e){const r=new Uint8Array(t.length);for(let n=0;n<t.length;n++)r[n]=t[n]^e[n];return r}function f(t){if(!(t instanceof Uint8Array))throw new Error("Uint8Array expected")}function c(t){if(!Number.isSafeInteger(t))throw new Error("number expected")}function u(t,e,r,n){f(t),f(e),c(r),e.length>255&&(e=n((0,o.concatBytes)((0,o.utf8ToBytes)("H2C-OVERSIZE-DST-"),e)));const{outputLen:i,blockLen:u}=n,h=Math.ceil(r/i);if(h>255)throw new Error("Invalid xmd length");const l=(0,o.concatBytes)(e,s(e.length,1)),d=s(0,u),y=s(r,2),p=new Array(h),g=n((0,o.concatBytes)(d,t,y,s(0,1),l));p[0]=n((0,o.concatBytes)(g,s(1,1),l));for(let t=1;t<=h;t++){const e=[a(g,p[t-1]),s(t+1,1),l];p[t]=n((0,o.concatBytes)(...e))}return(0,o.concatBytes)(...p).slice(0,r)}function h(t,e,r,n,i){if(f(t),f(e),c(r),e.length>255){const t=Math.ceil(2*n/8);e=i.create({dkLen:t}).update((0,o.utf8ToBytes)("H2C-OVERSIZE-DST-")).update(e).digest()}if(r>65535||e.length>255)throw new Error("expand_message_xof: invalid lenInBytes");return i.create({dkLen:r}).update(t).update(s(r,2)).update(e).update(s(e.length,1)).digest()}function l(t,e,r){(0,o.validateObject)(r,{DST:"stringOrUint8Array",p:"bigint",m:"isSafeInteger",k:"isSafeInteger",hash:"hash"});const{p:s,k:a,m:l,hash:d,expand:y,DST:p}=r;f(t),c(e);const g=function(t){if(t instanceof Uint8Array)return t;if("string"==typeof t)return(0,o.utf8ToBytes)(t);throw new Error("DST must be Uint8Array or string")}(p),w=s.toString(2).length,b=Math.ceil((w+a)/8),m=e*l*b;let E;if("xmd"===y)E=u(t,g,m,d);else if("xof"===y)E=h(t,g,m,a,d);else{if("_internal_pass"!==y)throw new Error('expand must be "xmd" or "xof"');E=t}const v=new Array(e);for(let t=0;t<e;t++){const e=new Array(l);for(let r=0;r<l;r++){const o=b*(r+t*l),a=E.subarray(o,o+b);e[r]=(0,n.mod)(i(a),s)}v[t]=e}return v}e.expand_message_xmd=u,e.expand_message_xof=h,e.hash_to_field=l,e.isogenyMap=function(t,e){const r=e.map((t=>Array.from(t).reverse()));return(e,n)=>{const[o,i,s,a]=r.map((r=>r.reduce(((r,n)=>t.add(t.mul(r,e),n)))));return