nfets 0.0.97 → 0.0.98
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-6Q55WART.mjs → chunk-4YDKSLI2.mjs} +1 -1
- package/dist/chunk-PCA4Z35I.mjs +259 -0
- package/dist/core/index.cjs +91 -110
- package/dist/core/index.d.cts +3 -0
- package/dist/core/index.d.ts +3 -0
- package/dist/core/index.mjs +1 -1
- package/dist/index.cjs +104 -123
- package/dist/index.mjs +1 -1
- package/dist/nfe/index.cjs +104 -123
- package/dist/nfe/index.mjs +1 -1
- package/package.json +3 -3
- package/dist/chunk-IJON6HO5.mjs +0 -278
package/dist/chunk-IJON6HO5.mjs
DELETED
|
@@ -1,278 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as o,b as Ge,d as te,e as vY,f as Xl}from"./chunk-W6MRGYXP.mjs";var zt=te((Fve,Ck)=>{"use strict";Ck.exports={options:{usePureJavaScript:!1}}});var Ik=te((Mve,Tk)=>{"use strict";var HN={};Tk.exports=HN;var Nk={};HN.encode=function(r,e,t){if(typeof e!="string")throw new TypeError('"alphabet" must be a string.');if(t!==void 0&&typeof t!="number")throw new TypeError('"maxline" must be a number.');var n="";if(!(r instanceof Uint8Array))n=dQ(r,e);else{var s=0,i=e.length,a=e.charAt(0),u=[0];for(s=0;s<r.length;++s){for(var c=0,l=r[s];c<u.length;++c)l+=u[c]<<8,u[c]=l%i,l=l/i|0;for(;l>0;)u.push(l%i),l=l/i|0}for(s=0;r[s]===0&&s<r.length-1;++s)n+=a;for(s=u.length-1;s>=0;--s)n+=e[u[s]]}if(t){var h=new RegExp(".{1,"+t+"}","g");n=n.match(h).join(`\r
|
|
3
|
-
`)}return n};HN.decode=function(r,e){if(typeof r!="string")throw new TypeError('"input" must be a string.');if(typeof e!="string")throw new TypeError('"alphabet" must be a string.');var t=Nk[e];if(!t){t=Nk[e]=[];for(var n=0;n<e.length;++n)t[e.charCodeAt(n)]=n}r=r.replace(/\s/g,"");for(var s=e.length,i=e.charAt(0),a=[0],n=0;n<r.length;n++){var u=t[r.charCodeAt(n)];if(u===void 0)return;for(var c=0,l=u;c<a.length;++c)l+=a[c]*s,a[c]=l&255,l>>=8;for(;l>0;)a.push(l&255),l>>=8}for(var h=0;r[h]===i&&h<r.length-1;++h)a.push(0);return typeof Buffer<"u"?Buffer.from(a.reverse()):new Uint8Array(a.reverse())};function dQ(r,e){var t=0,n=e.length,s=e.charAt(0),i=[0];for(t=0;t<r.length();++t){for(var a=0,u=r.at(t);a<i.length;++a)u+=i[a]<<8,i[a]=u%n,u=u/n|0;for(;u>0;)i.push(u%n),u=u/n|0}var c="";for(t=0;r.at(t)===0&&t<r.length()-1;++t)c+=s;for(t=i.length-1;t>=0;--t)c+=e[i[t]];return c}o(dQ,"_encodeWithByteBuffer")});var pr=te((Hve,Rk)=>{"use strict";var _k=zt(),Dk=Ik(),oe=Rk.exports=_k.util=_k.util||{};(function(){if(typeof process<"u"&&process.nextTick&&!process.browser){oe.nextTick=process.nextTick,typeof setImmediate=="function"?oe.setImmediate=setImmediate:oe.setImmediate=oe.nextTick;return}if(typeof setImmediate=="function"){oe.setImmediate=function(){return setImmediate.apply(void 0,arguments)},oe.nextTick=function(u){return setImmediate(u)};return}if(oe.setImmediate=function(u){setTimeout(u,0)},typeof window<"u"&&typeof window.postMessage=="function"){let u=function(c){if(c.source===window&&c.data===r){c.stopPropagation();var l=e.slice();e.length=0,l.forEach(function(h){h()})}};var a=u;o(u,"handler");var r="forge.setImmediate",e=[];oe.setImmediate=function(c){e.push(c),e.length===1&&window.postMessage(r,"*")},window.addEventListener("message",u,!0)}if(typeof MutationObserver<"u"){var t=Date.now(),n=!0,s=document.createElement("div"),e=[];new MutationObserver(function(){var c=e.slice();e.length=0,c.forEach(function(l){l()})}).observe(s,{attributes:!0});var i=oe.setImmediate;oe.setImmediate=function(c){Date.now()-t>15?(t=Date.now(),i(c)):(e.push(c),e.length===1&&s.setAttribute("a",n=!n))}}oe.nextTick=oe.setImmediate})();oe.isNodejs=typeof process<"u"&&process.versions&&process.versions.node;oe.globalScope=(function(){return oe.isNodejs?global:typeof self>"u"?window:self})();oe.isArray=Array.isArray||function(r){return Object.prototype.toString.call(r)==="[object Array]"};oe.isArrayBuffer=function(r){return typeof ArrayBuffer<"u"&&r instanceof ArrayBuffer};oe.isArrayBufferView=function(r){return r&&oe.isArrayBuffer(r.buffer)&&r.byteLength!==void 0};function Cg(r){if(!(r===8||r===16||r===24||r===32))throw new Error("Only 8, 16, 24, or 32 bits supported: "+r)}o(Cg,"_checkBitsParam");oe.ByteBuffer=KN;function KN(r){if(this.data="",this.read=0,typeof r=="string")this.data=r;else if(oe.isArrayBuffer(r)||oe.isArrayBufferView(r))if(typeof Buffer<"u"&&r instanceof Buffer)this.data=r.toString("binary");else{var e=new Uint8Array(r);try{this.data=String.fromCharCode.apply(null,e)}catch{for(var t=0;t<e.length;++t)this.putByte(e[t])}}else(r instanceof KN||typeof r=="object"&&typeof r.data=="string"&&typeof r.read=="number")&&(this.data=r.data,this.read=r.read);this._constructedStringLength=0}o(KN,"ByteStringBuffer");oe.ByteStringBuffer=KN;var mQ=4096;oe.ByteStringBuffer.prototype._optimizeConstructedString=function(r){this._constructedStringLength+=r,this._constructedStringLength>mQ&&(this.data.substr(0,1),this._constructedStringLength=0)};oe.ByteStringBuffer.prototype.length=function(){return this.data.length-this.read};oe.ByteStringBuffer.prototype.isEmpty=function(){return this.length()<=0};oe.ByteStringBuffer.prototype.putByte=function(r){return this.putBytes(String.fromCharCode(r))};oe.ByteStringBuffer.prototype.fillWithByte=function(r,e){r=String.fromCharCode(r);for(var t=this.data;e>0;)e&1&&(t+=r),e>>>=1,e>0&&(r+=r);return this.data=t,this._optimizeConstructedString(e),this};oe.ByteStringBuffer.prototype.putBytes=function(r){return this.data+=r,this._optimizeConstructedString(r.length),this};oe.ByteStringBuffer.prototype.putString=function(r){return this.putBytes(oe.encodeUtf8(r))};oe.ByteStringBuffer.prototype.putInt16=function(r){return this.putBytes(String.fromCharCode(r>>8&255)+String.fromCharCode(r&255))};oe.ByteStringBuffer.prototype.putInt24=function(r){return this.putBytes(String.fromCharCode(r>>16&255)+String.fromCharCode(r>>8&255)+String.fromCharCode(r&255))};oe.ByteStringBuffer.prototype.putInt32=function(r){return this.putBytes(String.fromCharCode(r>>24&255)+String.fromCharCode(r>>16&255)+String.fromCharCode(r>>8&255)+String.fromCharCode(r&255))};oe.ByteStringBuffer.prototype.putInt16Le=function(r){return this.putBytes(String.fromCharCode(r&255)+String.fromCharCode(r>>8&255))};oe.ByteStringBuffer.prototype.putInt24Le=function(r){return this.putBytes(String.fromCharCode(r&255)+String.fromCharCode(r>>8&255)+String.fromCharCode(r>>16&255))};oe.ByteStringBuffer.prototype.putInt32Le=function(r){return this.putBytes(String.fromCharCode(r&255)+String.fromCharCode(r>>8&255)+String.fromCharCode(r>>16&255)+String.fromCharCode(r>>24&255))};oe.ByteStringBuffer.prototype.putInt=function(r,e){Cg(e);var t="";do e-=8,t+=String.fromCharCode(r>>e&255);while(e>0);return this.putBytes(t)};oe.ByteStringBuffer.prototype.putSignedInt=function(r,e){return r<0&&(r+=2<<e-1),this.putInt(r,e)};oe.ByteStringBuffer.prototype.putBuffer=function(r){return this.putBytes(r.getBytes())};oe.ByteStringBuffer.prototype.getByte=function(){return this.data.charCodeAt(this.read++)};oe.ByteStringBuffer.prototype.getInt16=function(){var r=this.data.charCodeAt(this.read)<<8^this.data.charCodeAt(this.read+1);return this.read+=2,r};oe.ByteStringBuffer.prototype.getInt24=function(){var r=this.data.charCodeAt(this.read)<<16^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2);return this.read+=3,r};oe.ByteStringBuffer.prototype.getInt32=function(){var r=this.data.charCodeAt(this.read)<<24^this.data.charCodeAt(this.read+1)<<16^this.data.charCodeAt(this.read+2)<<8^this.data.charCodeAt(this.read+3);return this.read+=4,r};oe.ByteStringBuffer.prototype.getInt16Le=function(){var r=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8;return this.read+=2,r};oe.ByteStringBuffer.prototype.getInt24Le=function(){var r=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16;return this.read+=3,r};oe.ByteStringBuffer.prototype.getInt32Le=function(){var r=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16^this.data.charCodeAt(this.read+3)<<24;return this.read+=4,r};oe.ByteStringBuffer.prototype.getInt=function(r){Cg(r);var e=0;do e=(e<<8)+this.data.charCodeAt(this.read++),r-=8;while(r>0);return e};oe.ByteStringBuffer.prototype.getSignedInt=function(r){var e=this.getInt(r),t=2<<r-2;return e>=t&&(e-=t<<1),e};oe.ByteStringBuffer.prototype.getBytes=function(r){var e;return r?(r=Math.min(this.length(),r),e=this.data.slice(this.read,this.read+r),this.read+=r):r===0?e="":(e=this.read===0?this.data:this.data.slice(this.read),this.clear()),e};oe.ByteStringBuffer.prototype.bytes=function(r){return typeof r>"u"?this.data.slice(this.read):this.data.slice(this.read,this.read+r)};oe.ByteStringBuffer.prototype.at=function(r){return this.data.charCodeAt(this.read+r)};oe.ByteStringBuffer.prototype.setAt=function(r,e){return this.data=this.data.substr(0,this.read+r)+String.fromCharCode(e)+this.data.substr(this.read+r+1),this};oe.ByteStringBuffer.prototype.last=function(){return this.data.charCodeAt(this.data.length-1)};oe.ByteStringBuffer.prototype.copy=function(){var r=oe.createBuffer(this.data);return r.read=this.read,r};oe.ByteStringBuffer.prototype.compact=function(){return this.read>0&&(this.data=this.data.slice(this.read),this.read=0),this};oe.ByteStringBuffer.prototype.clear=function(){return this.data="",this.read=0,this};oe.ByteStringBuffer.prototype.truncate=function(r){var e=Math.max(0,this.length()-r);return this.data=this.data.substr(this.read,e),this.read=0,this};oe.ByteStringBuffer.prototype.toHex=function(){for(var r="",e=this.read;e<this.data.length;++e){var t=this.data.charCodeAt(e);t<16&&(r+="0"),r+=t.toString(16)}return r};oe.ByteStringBuffer.prototype.toString=function(){return oe.decodeUtf8(this.bytes())};function gQ(r,e){e=e||{},this.read=e.readOffset||0,this.growSize=e.growSize||1024;var t=oe.isArrayBuffer(r),n=oe.isArrayBufferView(r);if(t||n){t?this.data=new DataView(r):this.data=new DataView(r.buffer,r.byteOffset,r.byteLength),this.write="writeOffset"in e?e.writeOffset:this.data.byteLength;return}this.data=new DataView(new ArrayBuffer(0)),this.write=0,r!=null&&this.putBytes(r),"writeOffset"in e&&(this.write=e.writeOffset)}o(gQ,"DataBuffer");oe.DataBuffer=gQ;oe.DataBuffer.prototype.length=function(){return this.write-this.read};oe.DataBuffer.prototype.isEmpty=function(){return this.length()<=0};oe.DataBuffer.prototype.accommodate=function(r,e){if(this.length()>=r)return this;e=Math.max(e||this.growSize,r);var t=new Uint8Array(this.data.buffer,this.data.byteOffset,this.data.byteLength),n=new Uint8Array(this.length()+e);return n.set(t),this.data=new DataView(n.buffer),this};oe.DataBuffer.prototype.putByte=function(r){return this.accommodate(1),this.data.setUint8(this.write++,r),this};oe.DataBuffer.prototype.fillWithByte=function(r,e){this.accommodate(e);for(var t=0;t<e;++t)this.data.setUint8(r);return this};oe.DataBuffer.prototype.putBytes=function(r,e){if(oe.isArrayBufferView(r)){var t=new Uint8Array(r.buffer,r.byteOffset,r.byteLength),n=t.byteLength-t.byteOffset;this.accommodate(n);var s=new Uint8Array(this.data.buffer,this.write);return s.set(t),this.write+=n,this}if(oe.isArrayBuffer(r)){var t=new Uint8Array(r);this.accommodate(t.byteLength);var s=new Uint8Array(this.data.buffer);return s.set(t,this.write),this.write+=t.byteLength,this}if(r instanceof oe.DataBuffer||typeof r=="object"&&typeof r.read=="number"&&typeof r.write=="number"&&oe.isArrayBufferView(r.data)){var t=new Uint8Array(r.data.byteLength,r.read,r.length());this.accommodate(t.byteLength);var s=new Uint8Array(r.data.byteLength,this.write);return s.set(t),this.write+=t.byteLength,this}if(r instanceof oe.ByteStringBuffer&&(r=r.data,e="binary"),e=e||"binary",typeof r=="string"){var i;if(e==="hex")return this.accommodate(Math.ceil(r.length/2)),i=new Uint8Array(this.data.buffer,this.write),this.write+=oe.binary.hex.decode(r,i,this.write),this;if(e==="base64")return this.accommodate(Math.ceil(r.length/4)*3),i=new Uint8Array(this.data.buffer,this.write),this.write+=oe.binary.base64.decode(r,i,this.write),this;if(e==="utf8"&&(r=oe.encodeUtf8(r),e="binary"),e==="binary"||e==="raw")return this.accommodate(r.length),i=new Uint8Array(this.data.buffer,this.write),this.write+=oe.binary.raw.decode(i),this;if(e==="utf16")return this.accommodate(r.length*2),i=new Uint16Array(this.data.buffer,this.write),this.write+=oe.text.utf16.encode(i),this;throw new Error("Invalid encoding: "+e)}throw Error("Invalid parameter: "+r)};oe.DataBuffer.prototype.putBuffer=function(r){return this.putBytes(r),r.clear(),this};oe.DataBuffer.prototype.putString=function(r){return this.putBytes(r,"utf16")};oe.DataBuffer.prototype.putInt16=function(r){return this.accommodate(2),this.data.setInt16(this.write,r),this.write+=2,this};oe.DataBuffer.prototype.putInt24=function(r){return this.accommodate(3),this.data.setInt16(this.write,r>>8&65535),this.data.setInt8(this.write,r>>16&255),this.write+=3,this};oe.DataBuffer.prototype.putInt32=function(r){return this.accommodate(4),this.data.setInt32(this.write,r),this.write+=4,this};oe.DataBuffer.prototype.putInt16Le=function(r){return this.accommodate(2),this.data.setInt16(this.write,r,!0),this.write+=2,this};oe.DataBuffer.prototype.putInt24Le=function(r){return this.accommodate(3),this.data.setInt8(this.write,r>>16&255),this.data.setInt16(this.write,r>>8&65535,!0),this.write+=3,this};oe.DataBuffer.prototype.putInt32Le=function(r){return this.accommodate(4),this.data.setInt32(this.write,r,!0),this.write+=4,this};oe.DataBuffer.prototype.putInt=function(r,e){Cg(e),this.accommodate(e/8);do e-=8,this.data.setInt8(this.write++,r>>e&255);while(e>0);return this};oe.DataBuffer.prototype.putSignedInt=function(r,e){return Cg(e),this.accommodate(e/8),r<0&&(r+=2<<e-1),this.putInt(r,e)};oe.DataBuffer.prototype.getByte=function(){return this.data.getInt8(this.read++)};oe.DataBuffer.prototype.getInt16=function(){var r=this.data.getInt16(this.read);return this.read+=2,r};oe.DataBuffer.prototype.getInt24=function(){var r=this.data.getInt16(this.read)<<8^this.data.getInt8(this.read+2);return this.read+=3,r};oe.DataBuffer.prototype.getInt32=function(){var r=this.data.getInt32(this.read);return this.read+=4,r};oe.DataBuffer.prototype.getInt16Le=function(){var r=this.data.getInt16(this.read,!0);return this.read+=2,r};oe.DataBuffer.prototype.getInt24Le=function(){var r=this.data.getInt8(this.read)^this.data.getInt16(this.read+1,!0)<<8;return this.read+=3,r};oe.DataBuffer.prototype.getInt32Le=function(){var r=this.data.getInt32(this.read,!0);return this.read+=4,r};oe.DataBuffer.prototype.getInt=function(r){Cg(r);var e=0;do e=(e<<8)+this.data.getInt8(this.read++),r-=8;while(r>0);return e};oe.DataBuffer.prototype.getSignedInt=function(r){var e=this.getInt(r),t=2<<r-2;return e>=t&&(e-=t<<1),e};oe.DataBuffer.prototype.getBytes=function(r){var e;return r?(r=Math.min(this.length(),r),e=this.data.slice(this.read,this.read+r),this.read+=r):r===0?e="":(e=this.read===0?this.data:this.data.slice(this.read),this.clear()),e};oe.DataBuffer.prototype.bytes=function(r){return typeof r>"u"?this.data.slice(this.read):this.data.slice(this.read,this.read+r)};oe.DataBuffer.prototype.at=function(r){return this.data.getUint8(this.read+r)};oe.DataBuffer.prototype.setAt=function(r,e){return this.data.setUint8(r,e),this};oe.DataBuffer.prototype.last=function(){return this.data.getUint8(this.write-1)};oe.DataBuffer.prototype.copy=function(){return new oe.DataBuffer(this)};oe.DataBuffer.prototype.compact=function(){if(this.read>0){var r=new Uint8Array(this.data.buffer,this.read),e=new Uint8Array(r.byteLength);e.set(r),this.data=new DataView(e),this.write-=this.read,this.read=0}return this};oe.DataBuffer.prototype.clear=function(){return this.data=new DataView(new ArrayBuffer(0)),this.read=this.write=0,this};oe.DataBuffer.prototype.truncate=function(r){return this.write=Math.max(0,this.length()-r),this.read=Math.min(this.read,this.write),this};oe.DataBuffer.prototype.toHex=function(){for(var r="",e=this.read;e<this.data.byteLength;++e){var t=this.data.getUint8(e);t<16&&(r+="0"),r+=t.toString(16)}return r};oe.DataBuffer.prototype.toString=function(r){var e=new Uint8Array(this.data,this.read,this.length());if(r=r||"utf8",r==="binary"||r==="raw")return oe.binary.raw.encode(e);if(r==="hex")return oe.binary.hex.encode(e);if(r==="base64")return oe.binary.base64.encode(e);if(r==="utf8")return oe.text.utf8.decode(e);if(r==="utf16")return oe.text.utf16.decode(e);throw new Error("Invalid encoding: "+r)};oe.createBuffer=function(r,e){return e=e||"raw",r!==void 0&&e==="utf8"&&(r=oe.encodeUtf8(r)),new oe.ByteBuffer(r)};oe.fillString=function(r,e){for(var t="";e>0;)e&1&&(t+=r),e>>>=1,e>0&&(r+=r);return t};oe.xorBytes=function(r,e,t){for(var n="",s="",i="",a=0,u=0;t>0;--t,++a)s=r.charCodeAt(a)^e.charCodeAt(a),u>=10&&(n+=i,i="",u=0),i+=String.fromCharCode(s),++u;return n+=i,n};oe.hexToBytes=function(r){var e="",t=0;for(r.length&!0&&(t=1,e+=String.fromCharCode(parseInt(r[0],16)));t<r.length;t+=2)e+=String.fromCharCode(parseInt(r.substr(t,2),16));return e};oe.bytesToHex=function(r){return oe.createBuffer(r).toHex()};oe.int32ToBytes=function(r){return String.fromCharCode(r>>24&255)+String.fromCharCode(r>>16&255)+String.fromCharCode(r>>8&255)+String.fromCharCode(r&255)};var $u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",Gu=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],Bk="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";oe.encode64=function(r,e){for(var t="",n="",s,i,a,u=0;u<r.length;)s=r.charCodeAt(u++),i=r.charCodeAt(u++),a=r.charCodeAt(u++),t+=$u.charAt(s>>2),t+=$u.charAt((s&3)<<4|i>>4),isNaN(i)?t+="==":(t+=$u.charAt((i&15)<<2|a>>6),t+=isNaN(a)?"=":$u.charAt(a&63)),e&&t.length>e&&(n+=t.substr(0,e)+`\r
|
|
4
|
-
`,t=t.substr(e));return n+=t,n};oe.decode64=function(r){r=r.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var e="",t,n,s,i,a=0;a<r.length;)t=Gu[r.charCodeAt(a++)-43],n=Gu[r.charCodeAt(a++)-43],s=Gu[r.charCodeAt(a++)-43],i=Gu[r.charCodeAt(a++)-43],e+=String.fromCharCode(t<<2|n>>4),s!==64&&(e+=String.fromCharCode((n&15)<<4|s>>2),i!==64&&(e+=String.fromCharCode((s&3)<<6|i)));return e};oe.encodeUtf8=function(r){return unescape(encodeURIComponent(r))};oe.decodeUtf8=function(r){return decodeURIComponent(escape(r))};oe.binary={raw:{},hex:{},base64:{},base58:{},baseN:{encode:Dk.encode,decode:Dk.decode}};oe.binary.raw.encode=function(r){return String.fromCharCode.apply(null,r)};oe.binary.raw.decode=function(r,e,t){var n=e;n||(n=new Uint8Array(r.length)),t=t||0;for(var s=t,i=0;i<r.length;++i)n[s++]=r.charCodeAt(i);return e?s-t:n};oe.binary.hex.encode=oe.bytesToHex;oe.binary.hex.decode=function(r,e,t){var n=e;n||(n=new Uint8Array(Math.ceil(r.length/2))),t=t||0;var s=0,i=t;for(r.length&1&&(s=1,n[i++]=parseInt(r[0],16));s<r.length;s+=2)n[i++]=parseInt(r.substr(s,2),16);return e?i-t:n};oe.binary.base64.encode=function(r,e){for(var t="",n="",s,i,a,u=0;u<r.byteLength;)s=r[u++],i=r[u++],a=r[u++],t+=$u.charAt(s>>2),t+=$u.charAt((s&3)<<4|i>>4),isNaN(i)?t+="==":(t+=$u.charAt((i&15)<<2|a>>6),t+=isNaN(a)?"=":$u.charAt(a&63)),e&&t.length>e&&(n+=t.substr(0,e)+`\r
|
|
5
|
-
`,t=t.substr(e));return n+=t,n};oe.binary.base64.decode=function(r,e,t){var n=e;n||(n=new Uint8Array(Math.ceil(r.length/4)*3)),r=r.replace(/[^A-Za-z0-9\+\/\=]/g,""),t=t||0;for(var s,i,a,u,c=0,l=t;c<r.length;)s=Gu[r.charCodeAt(c++)-43],i=Gu[r.charCodeAt(c++)-43],a=Gu[r.charCodeAt(c++)-43],u=Gu[r.charCodeAt(c++)-43],n[l++]=s<<2|i>>4,a!==64&&(n[l++]=(i&15)<<4|a>>2,u!==64&&(n[l++]=(a&3)<<6|u));return e?l-t:n.subarray(0,l)};oe.binary.base58.encode=function(r,e){return oe.binary.baseN.encode(r,Bk,e)};oe.binary.base58.decode=function(r,e){return oe.binary.baseN.decode(r,Bk,e)};oe.text={utf8:{},utf16:{}};oe.text.utf8.encode=function(r,e,t){r=oe.encodeUtf8(r);var n=e;n||(n=new Uint8Array(r.length)),t=t||0;for(var s=t,i=0;i<r.length;++i)n[s++]=r.charCodeAt(i);return e?s-t:n};oe.text.utf8.decode=function(r){return oe.decodeUtf8(String.fromCharCode.apply(null,r))};oe.text.utf16.encode=function(r,e,t){var n=e;n||(n=new Uint8Array(r.length*2));var s=new Uint16Array(n.buffer);t=t||0;for(var i=t,a=t,u=0;u<r.length;++u)s[a++]=r.charCodeAt(u),i+=2;return e?i-t:n};oe.text.utf16.decode=function(r){return String.fromCharCode.apply(null,new Uint16Array(r.buffer))};oe.deflate=function(r,e,t){if(e=oe.decode64(r.deflate(oe.encode64(e)).rval),t){var n=2,s=e.charCodeAt(1);s&32&&(n=6),e=e.substring(n,e.length-4)}return e};oe.inflate=function(r,e,t){var n=r.inflate(oe.encode64(e)).rval;return n===null?null:oe.decode64(n)};var $N=o(function(r,e,t){if(!r)throw new Error("WebStorage not available.");var n;if(t===null?n=r.removeItem(e):(t=oe.encode64(JSON.stringify(t)),n=r.setItem(e,t)),typeof n<"u"&&n.rval!==!0){var s=new Error(n.error.message);throw s.id=n.error.id,s.name=n.error.name,s}},"_setStorageObject"),GN=o(function(r,e){if(!r)throw new Error("WebStorage not available.");var t=r.getItem(e);if(r.init)if(t.rval===null){if(t.error){var n=new Error(t.error.message);throw n.id=t.error.id,n.name=t.error.name,n}t=null}else t=t.rval;return t!==null&&(t=JSON.parse(oe.decode64(t))),t},"_getStorageObject"),vQ=o(function(r,e,t,n){var s=GN(r,e);s===null&&(s={}),s[t]=n,$N(r,e,s)},"_setItem"),yQ=o(function(r,e,t){var n=GN(r,e);return n!==null&&(n=t in n?n[t]:null),n},"_getItem"),xQ=o(function(r,e,t){var n=GN(r,e);if(n!==null&&t in n){delete n[t];var s=!0;for(var i in n){s=!1;break}s&&(n=null),$N(r,e,n)}},"_removeItem"),wQ=o(function(r,e){$N(r,e,null)},"_clearItems"),Qw=o(function(r,e,t){var n=null;typeof t>"u"&&(t=["web","flash"]);var s,i=!1,a=null;for(var u in t){s=t[u];try{if(s==="flash"||s==="both"){if(e[0]===null)throw new Error("Flash local storage not available.");n=r.apply(this,e),i=s==="flash"}(s==="web"||s==="both")&&(e[0]=localStorage,n=r.apply(this,e),i=!0)}catch(c){a=c}if(i)break}if(!i)throw a;return n},"_callStorageFunction");oe.setItem=function(r,e,t,n,s){Qw(vQ,arguments,s)};oe.getItem=function(r,e,t,n){return Qw(yQ,arguments,n)};oe.removeItem=function(r,e,t,n){Qw(xQ,arguments,n)};oe.clearItems=function(r,e,t){Qw(wQ,arguments,t)};oe.isEmpty=function(r){for(var e in r)if(r.hasOwnProperty(e))return!1;return!0};oe.format=function(r){for(var e=/%./g,t,n,s=0,i=[],a=0;t=e.exec(r);){n=r.substring(a,e.lastIndex-2),n.length>0&&i.push(n),a=e.lastIndex;var u=t[0][1];switch(u){case"s":case"o":s<arguments.length?i.push(arguments[s+++1]):i.push("<?>");break;case"%":i.push("%");break;default:i.push("<%"+u+"?>")}}return i.push(r.substring(a)),i.join("")};oe.formatNumber=function(r,e,t,n){var s=r,i=isNaN(e=Math.abs(e))?2:e,a=t===void 0?",":t,u=n===void 0?".":n,c=s<0?"-":"",l=parseInt(s=Math.abs(+s||0).toFixed(i),10)+"",h=l.length>3?l.length%3:0;return c+(h?l.substr(0,h)+u:"")+l.substr(h).replace(/(\d{3})(?=\d)/g,"$1"+u)+(i?a+Math.abs(s-l).toFixed(i).slice(2):"")};oe.formatSize=function(r){return r>=1073741824?r=oe.formatNumber(r/1073741824,2,".","")+" GiB":r>=1048576?r=oe.formatNumber(r/1048576,2,".","")+" MiB":r>=1024?r=oe.formatNumber(r/1024,0)+" KiB":r=oe.formatNumber(r,0)+" bytes",r};oe.bytesFromIP=function(r){return r.indexOf(".")!==-1?oe.bytesFromIPv4(r):r.indexOf(":")!==-1?oe.bytesFromIPv6(r):null};oe.bytesFromIPv4=function(r){if(r=r.split("."),r.length!==4)return null;for(var e=oe.createBuffer(),t=0;t<r.length;++t){var n=parseInt(r[t],10);if(isNaN(n))return null;e.putByte(n)}return e.getBytes()};oe.bytesFromIPv6=function(r){var e=0;r=r.split(":").filter(function(a){return a.length===0&&++e,!0});for(var t=(8-r.length+e)*2,n=oe.createBuffer(),s=0;s<8;++s){if(!r[s]||r[s].length===0){n.fillWithByte(0,t),t=0;continue}var i=oe.hexToBytes(r[s]);i.length<2&&n.putByte(0),n.putBytes(i)}return n.getBytes()};oe.bytesToIP=function(r){return r.length===4?oe.bytesToIPv4(r):r.length===16?oe.bytesToIPv6(r):null};oe.bytesToIPv4=function(r){if(r.length!==4)return null;for(var e=[],t=0;t<r.length;++t)e.push(r.charCodeAt(t));return e.join(".")};oe.bytesToIPv6=function(r){if(r.length!==16)return null;for(var e=[],t=[],n=0,s=0;s<r.length;s+=2){for(var i=oe.bytesToHex(r[s]+r[s+1]);i[0]==="0"&&i!=="0";)i=i.substr(1);if(i==="0"){var a=t[t.length-1],u=e.length;!a||u!==a.end+1?t.push({start:u,end:u}):(a.end=u,a.end-a.start>t[n].end-t[n].start&&(n=t.length-1))}e.push(i)}if(t.length>0){var c=t[n];c.end-c.start>0&&(e.splice(c.start,c.end-c.start+1,""),c.start===0&&e.unshift(""),c.end===7&&e.push(""))}return e.join(":")};oe.estimateCores=function(r,e){if(typeof r=="function"&&(e=r,r={}),r=r||{},"cores"in oe&&!r.update)return e(null,oe.cores);if(typeof navigator<"u"&&"hardwareConcurrency"in navigator&&navigator.hardwareConcurrency>0)return oe.cores=navigator.hardwareConcurrency,e(null,oe.cores);if(typeof Worker>"u")return oe.cores=1,e(null,oe.cores);if(typeof Blob>"u")return oe.cores=2,e(null,oe.cores);var t=URL.createObjectURL(new Blob(["(",(function(){self.addEventListener("message",function(a){for(var u=Date.now(),c=u+4;Date.now()<c;);self.postMessage({st:u,et:c})})}).toString(),")()"],{type:"application/javascript"}));n([],5,16);function n(a,u,c){if(u===0){var l=Math.floor(a.reduce(function(h,m){return h+m},0)/a.length);return oe.cores=Math.max(1,l),URL.revokeObjectURL(t),e(null,oe.cores)}s(c,function(h,m){a.push(i(c,m)),n(a,u-1,c)})}o(n,"sample");function s(a,u){for(var c=[],l=[],h=0;h<a;++h){var m=new Worker(t);m.addEventListener("message",function(g){if(l.push(g.data),l.length===a){for(var y=0;y<a;++y)c[y].terminate();u(null,l)}}),c.push(m)}for(var h=0;h<a;++h)c[h].postMessage(h)}o(s,"map");function i(a,u){for(var c=[],l=0;l<a;++l)for(var h=u[l],m=c[l]=[],g=0;g<a;++g)if(l!==g){var y=u[g];(h.st>y.st&&h.st<y.et||y.st>h.st&&y.st<h.et)&&m.push(g)}return c.reduce(function(v,E){return Math.max(v,E.length)},0)}o(i,"reduce")}});var Zw=te(($ve,Ok)=>{"use strict";var kn=zt();pr();Ok.exports=kn.cipher=kn.cipher||{};kn.cipher.algorithms=kn.cipher.algorithms||{};kn.cipher.createCipher=function(r,e){var t=r;if(typeof t=="string"&&(t=kn.cipher.getAlgorithm(t),t&&(t=t())),!t)throw new Error("Unsupported algorithm: "+r);return new kn.cipher.BlockCipher({algorithm:t,key:e,decrypt:!1})};kn.cipher.createDecipher=function(r,e){var t=r;if(typeof t=="string"&&(t=kn.cipher.getAlgorithm(t),t&&(t=t())),!t)throw new Error("Unsupported algorithm: "+r);return new kn.cipher.BlockCipher({algorithm:t,key:e,decrypt:!0})};kn.cipher.registerAlgorithm=function(r,e){r=r.toUpperCase(),kn.cipher.algorithms[r]=e};kn.cipher.getAlgorithm=function(r){return r=r.toUpperCase(),r in kn.cipher.algorithms?kn.cipher.algorithms[r]:null};var XN=kn.cipher.BlockCipher=function(r){this.algorithm=r.algorithm,this.mode=this.algorithm.mode,this.blockSize=this.mode.blockSize,this._finish=!1,this._input=null,this.output=null,this._op=r.decrypt?this.mode.decrypt:this.mode.encrypt,this._decrypt=r.decrypt,this.algorithm.initialize(r)};XN.prototype.start=function(r){r=r||{};var e={};for(var t in r)e[t]=r[t];e.decrypt=this._decrypt,this._finish=!1,this._input=kn.util.createBuffer(),this.output=r.output||kn.util.createBuffer(),this.mode.start(e)};XN.prototype.update=function(r){for(r&&this._input.putBuffer(r);!this._op.call(this.mode,this._input,this.output,this._finish)&&!this._finish;);this._input.compact()};XN.prototype.finish=function(r){r&&(this.mode.name==="ECB"||this.mode.name==="CBC")&&(this.mode.pad=function(t){return r(this.blockSize,t,!1)},this.mode.unpad=function(t){return r(this.blockSize,t,!0)});var e={};return e.decrypt=this._decrypt,e.overflow=this._input.length()%this.blockSize,!(!this._decrypt&&this.mode.pad&&!this.mode.pad(this._input,e)||(this._finish=!0,this.update(),this._decrypt&&this.mode.unpad&&!this.mode.unpad(this.output,e))||this.mode.afterFinish&&!this.mode.afterFinish(this.output,e))}});var zN=te((Gve,Pk)=>{"use strict";var Ln=zt();pr();Ln.cipher=Ln.cipher||{};var er=Pk.exports=Ln.cipher.modes=Ln.cipher.modes||{};er.ecb=function(r){r=r||{},this.name="ECB",this.cipher=r.cipher,this.blockSize=r.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints)};er.ecb.prototype.start=function(r){};er.ecb.prototype.encrypt=function(r,e,t){if(r.length()<this.blockSize&&!(t&&r.length()>0))return!0;for(var n=0;n<this._ints;++n)this._inBlock[n]=r.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(var n=0;n<this._ints;++n)e.putInt32(this._outBlock[n])};er.ecb.prototype.decrypt=function(r,e,t){if(r.length()<this.blockSize&&!(t&&r.length()>0))return!0;for(var n=0;n<this._ints;++n)this._inBlock[n]=r.getInt32();this.cipher.decrypt(this._inBlock,this._outBlock);for(var n=0;n<this._ints;++n)e.putInt32(this._outBlock[n])};er.ecb.prototype.pad=function(r,e){var t=r.length()===this.blockSize?this.blockSize:this.blockSize-r.length();return r.fillWithByte(t,t),!0};er.ecb.prototype.unpad=function(r,e){if(e.overflow>0)return!1;var t=r.length(),n=r.at(t-1);return n>this.blockSize<<2?!1:(r.truncate(n),!0)};er.cbc=function(r){r=r||{},this.name="CBC",this.cipher=r.cipher,this.blockSize=r.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints)};er.cbc.prototype.start=function(r){if(r.iv===null){if(!this._prev)throw new Error("Invalid IV parameter.");this._iv=this._prev.slice(0)}else if("iv"in r)this._iv=eE(r.iv,this.blockSize),this._prev=this._iv.slice(0);else throw new Error("Invalid IV parameter.")};er.cbc.prototype.encrypt=function(r,e,t){if(r.length()<this.blockSize&&!(t&&r.length()>0))return!0;for(var n=0;n<this._ints;++n)this._inBlock[n]=this._prev[n]^r.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(var n=0;n<this._ints;++n)e.putInt32(this._outBlock[n]);this._prev=this._outBlock};er.cbc.prototype.decrypt=function(r,e,t){if(r.length()<this.blockSize&&!(t&&r.length()>0))return!0;for(var n=0;n<this._ints;++n)this._inBlock[n]=r.getInt32();this.cipher.decrypt(this._inBlock,this._outBlock);for(var n=0;n<this._ints;++n)e.putInt32(this._prev[n]^this._outBlock[n]);this._prev=this._inBlock.slice(0)};er.cbc.prototype.pad=function(r,e){var t=r.length()===this.blockSize?this.blockSize:this.blockSize-r.length();return r.fillWithByte(t,t),!0};er.cbc.prototype.unpad=function(r,e){if(e.overflow>0)return!1;var t=r.length(),n=r.at(t-1);return n>this.blockSize<<2?!1:(r.truncate(n),!0)};er.cfb=function(r){r=r||{},this.name="CFB",this.cipher=r.cipher,this.blockSize=r.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialBlock=new Array(this._ints),this._partialOutput=Ln.util.createBuffer(),this._partialBytes=0};er.cfb.prototype.start=function(r){if(!("iv"in r))throw new Error("Invalid IV parameter.");this._iv=eE(r.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0};er.cfb.prototype.encrypt=function(r,e,t){var n=r.length();if(n===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&n>=this.blockSize){for(var s=0;s<this._ints;++s)this._inBlock[s]=r.getInt32()^this._outBlock[s],e.putInt32(this._inBlock[s]);return}var i=(this.blockSize-n)%this.blockSize;i>0&&(i=this.blockSize-i),this._partialOutput.clear();for(var s=0;s<this._ints;++s)this._partialBlock[s]=r.getInt32()^this._outBlock[s],this._partialOutput.putInt32(this._partialBlock[s]);if(i>0)r.read-=this.blockSize;else for(var s=0;s<this._ints;++s)this._inBlock[s]=this._partialBlock[s];if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),i>0&&!t)return e.putBytes(this._partialOutput.getBytes(i-this._partialBytes)),this._partialBytes=i,!0;e.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0};er.cfb.prototype.decrypt=function(r,e,t){var n=r.length();if(n===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&n>=this.blockSize){for(var s=0;s<this._ints;++s)this._inBlock[s]=r.getInt32(),e.putInt32(this._inBlock[s]^this._outBlock[s]);return}var i=(this.blockSize-n)%this.blockSize;i>0&&(i=this.blockSize-i),this._partialOutput.clear();for(var s=0;s<this._ints;++s)this._partialBlock[s]=r.getInt32(),this._partialOutput.putInt32(this._partialBlock[s]^this._outBlock[s]);if(i>0)r.read-=this.blockSize;else for(var s=0;s<this._ints;++s)this._inBlock[s]=this._partialBlock[s];if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),i>0&&!t)return e.putBytes(this._partialOutput.getBytes(i-this._partialBytes)),this._partialBytes=i,!0;e.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0};er.ofb=function(r){r=r||{},this.name="OFB",this.cipher=r.cipher,this.blockSize=r.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialOutput=Ln.util.createBuffer(),this._partialBytes=0};er.ofb.prototype.start=function(r){if(!("iv"in r))throw new Error("Invalid IV parameter.");this._iv=eE(r.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0};er.ofb.prototype.encrypt=function(r,e,t){var n=r.length();if(r.length()===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&n>=this.blockSize){for(var s=0;s<this._ints;++s)e.putInt32(r.getInt32()^this._outBlock[s]),this._inBlock[s]=this._outBlock[s];return}var i=(this.blockSize-n)%this.blockSize;i>0&&(i=this.blockSize-i),this._partialOutput.clear();for(var s=0;s<this._ints;++s)this._partialOutput.putInt32(r.getInt32()^this._outBlock[s]);if(i>0)r.read-=this.blockSize;else for(var s=0;s<this._ints;++s)this._inBlock[s]=this._outBlock[s];if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),i>0&&!t)return e.putBytes(this._partialOutput.getBytes(i-this._partialBytes)),this._partialBytes=i,!0;e.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0};er.ofb.prototype.decrypt=er.ofb.prototype.encrypt;er.ctr=function(r){r=r||{},this.name="CTR",this.cipher=r.cipher,this.blockSize=r.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialOutput=Ln.util.createBuffer(),this._partialBytes=0};er.ctr.prototype.start=function(r){if(!("iv"in r))throw new Error("Invalid IV parameter.");this._iv=eE(r.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0};er.ctr.prototype.encrypt=function(r,e,t){var n=r.length();if(n===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&n>=this.blockSize)for(var s=0;s<this._ints;++s)e.putInt32(r.getInt32()^this._outBlock[s]);else{var i=(this.blockSize-n)%this.blockSize;i>0&&(i=this.blockSize-i),this._partialOutput.clear();for(var s=0;s<this._ints;++s)this._partialOutput.putInt32(r.getInt32()^this._outBlock[s]);if(i>0&&(r.read-=this.blockSize),this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),i>0&&!t)return e.putBytes(this._partialOutput.getBytes(i-this._partialBytes)),this._partialBytes=i,!0;e.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}tE(this._inBlock)};er.ctr.prototype.decrypt=er.ctr.prototype.encrypt;er.gcm=function(r){r=r||{},this.name="GCM",this.cipher=r.cipher,this.blockSize=r.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints),this._partialOutput=Ln.util.createBuffer(),this._partialBytes=0,this._R=3774873600};er.gcm.prototype.start=function(r){if(!("iv"in r))throw new Error("Invalid IV parameter.");var e=Ln.util.createBuffer(r.iv);this._cipherLength=0;var t;if("additionalData"in r?t=Ln.util.createBuffer(r.additionalData):t=Ln.util.createBuffer(),"tagLength"in r?this._tagLength=r.tagLength:this._tagLength=128,this._tag=null,r.decrypt&&(this._tag=Ln.util.createBuffer(r.tag).getBytes(),this._tag.length!==this._tagLength/8))throw new Error("Authentication tag does not match tag length.");this._hashBlock=new Array(this._ints),this.tag=null,this._hashSubkey=new Array(this._ints),this.cipher.encrypt([0,0,0,0],this._hashSubkey),this.componentBits=4,this._m=this.generateHashTable(this._hashSubkey,this.componentBits);var n=e.length();if(n===12)this._j0=[e.getInt32(),e.getInt32(),e.getInt32(),1];else{for(this._j0=[0,0,0,0];e.length()>0;)this._j0=this.ghash(this._hashSubkey,this._j0,[e.getInt32(),e.getInt32(),e.getInt32(),e.getInt32()]);this._j0=this.ghash(this._hashSubkey,this._j0,[0,0].concat(WN(n*8)))}this._inBlock=this._j0.slice(0),tE(this._inBlock),this._partialBytes=0,t=Ln.util.createBuffer(t),this._aDataLength=WN(t.length()*8);var s=t.length()%this.blockSize;for(s&&t.fillWithByte(0,this.blockSize-s),this._s=[0,0,0,0];t.length()>0;)this._s=this.ghash(this._hashSubkey,this._s,[t.getInt32(),t.getInt32(),t.getInt32(),t.getInt32()])};er.gcm.prototype.encrypt=function(r,e,t){var n=r.length();if(n===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&n>=this.blockSize){for(var s=0;s<this._ints;++s)e.putInt32(this._outBlock[s]^=r.getInt32());this._cipherLength+=this.blockSize}else{var i=(this.blockSize-n)%this.blockSize;i>0&&(i=this.blockSize-i),this._partialOutput.clear();for(var s=0;s<this._ints;++s)this._partialOutput.putInt32(r.getInt32()^this._outBlock[s]);if(i<=0||t){if(t){var a=n%this.blockSize;this._cipherLength+=a,this._partialOutput.truncate(this.blockSize-a)}else this._cipherLength+=this.blockSize;for(var s=0;s<this._ints;++s)this._outBlock[s]=this._partialOutput.getInt32();this._partialOutput.read-=this.blockSize}if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),i>0&&!t)return r.read-=this.blockSize,e.putBytes(this._partialOutput.getBytes(i-this._partialBytes)),this._partialBytes=i,!0;e.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock),tE(this._inBlock)};er.gcm.prototype.decrypt=function(r,e,t){var n=r.length();if(n<this.blockSize&&!(t&&n>0))return!0;this.cipher.encrypt(this._inBlock,this._outBlock),tE(this._inBlock),this._hashBlock[0]=r.getInt32(),this._hashBlock[1]=r.getInt32(),this._hashBlock[2]=r.getInt32(),this._hashBlock[3]=r.getInt32(),this._s=this.ghash(this._hashSubkey,this._s,this._hashBlock);for(var s=0;s<this._ints;++s)e.putInt32(this._outBlock[s]^this._hashBlock[s]);n<this.blockSize?this._cipherLength+=n%this.blockSize:this._cipherLength+=this.blockSize};er.gcm.prototype.afterFinish=function(r,e){var t=!0;e.decrypt&&e.overflow&&r.truncate(this.blockSize-e.overflow),this.tag=Ln.util.createBuffer();var n=this._aDataLength.concat(WN(this._cipherLength*8));this._s=this.ghash(this._hashSubkey,this._s,n);var s=[];this.cipher.encrypt(this._j0,s);for(var i=0;i<this._ints;++i)this.tag.putInt32(this._s[i]^s[i]);return this.tag.truncate(this.tag.length()%(this._tagLength/8)),e.decrypt&&this.tag.bytes()!==this._tag&&(t=!1),t};er.gcm.prototype.multiply=function(r,e){for(var t=[0,0,0,0],n=e.slice(0),s=0;s<128;++s){var i=r[s/32|0]&1<<31-s%32;i&&(t[0]^=n[0],t[1]^=n[1],t[2]^=n[2],t[3]^=n[3]),this.pow(n,n)}return t};er.gcm.prototype.pow=function(r,e){for(var t=r[3]&1,n=3;n>0;--n)e[n]=r[n]>>>1|(r[n-1]&1)<<31;e[0]=r[0]>>>1,t&&(e[0]^=this._R)};er.gcm.prototype.tableMultiply=function(r){for(var e=[0,0,0,0],t=0;t<32;++t){var n=t/8|0,s=r[n]>>>(7-t%8)*4&15,i=this._m[t][s];e[0]^=i[0],e[1]^=i[1],e[2]^=i[2],e[3]^=i[3]}return e};er.gcm.prototype.ghash=function(r,e,t){return e[0]^=t[0],e[1]^=t[1],e[2]^=t[2],e[3]^=t[3],this.tableMultiply(e)};er.gcm.prototype.generateHashTable=function(r,e){for(var t=8/e,n=4*t,s=16*t,i=new Array(s),a=0;a<s;++a){var u=[0,0,0,0],c=a/n|0,l=(n-1-a%n)*e;u[c]=1<<e-1<<l,i[a]=this.generateSubHashTable(this.multiply(u,r),e)}return i};er.gcm.prototype.generateSubHashTable=function(r,e){var t=1<<e,n=t>>>1,s=new Array(t);s[n]=r.slice(0);for(var i=n>>>1;i>0;)this.pow(s[2*i],s[i]=[]),i>>=1;for(i=2;i<n;){for(var a=1;a<i;++a){var u=s[i],c=s[a];s[i+a]=[u[0]^c[0],u[1]^c[1],u[2]^c[2],u[3]^c[3]]}i*=2}for(s[0]=[0,0,0,0],i=n+1;i<t;++i){var l=s[i^n];s[i]=[r[0]^l[0],r[1]^l[1],r[2]^l[2],r[3]^l[3]]}return s};function eE(r,e){if(typeof r=="string"&&(r=Ln.util.createBuffer(r)),Ln.util.isArray(r)&&r.length>4){var t=r;r=Ln.util.createBuffer();for(var n=0;n<t.length;++n)r.putByte(t[n])}if(r.length()<e)throw new Error("Invalid IV length; got "+r.length()+" bytes and expected "+e+" bytes.");if(!Ln.util.isArray(r)){for(var s=[],i=e/4,n=0;n<i;++n)s.push(r.getInt32());r=s}return r}o(eE,"transformIV");function tE(r){r[r.length-1]=r[r.length-1]+1&4294967295}o(tE,"inc32");function WN(r){return[r/4294967296|0,r&4294967295]}o(WN,"from64To32")});var Xu=te((Wve,Uk)=>{"use strict";var Lr=zt();Zw();zN();pr();Uk.exports=Lr.aes=Lr.aes||{};Lr.aes.startEncrypting=function(r,e,t,n){var s=rE({key:r,output:t,decrypt:!1,mode:n});return s.start(e),s};Lr.aes.createEncryptionCipher=function(r,e){return rE({key:r,output:null,decrypt:!1,mode:e})};Lr.aes.startDecrypting=function(r,e,t,n){var s=rE({key:r,output:t,decrypt:!0,mode:n});return s.start(e),s};Lr.aes.createDecryptionCipher=function(r,e){return rE({key:r,output:null,decrypt:!0,mode:e})};Lr.aes.Algorithm=function(r,e){QN||Lk();var t=this;t.name=r,t.mode=new e({blockSize:16,cipher:{encrypt:o(function(n,s){return YN(t._w,n,s,!1)},"encrypt"),decrypt:o(function(n,s){return YN(t._w,n,s,!0)},"decrypt")}}),t._init=!1};Lr.aes.Algorithm.prototype.initialize=function(r){if(!this._init){var e=r.key,t;if(typeof e=="string"&&(e.length===16||e.length===24||e.length===32))e=Lr.util.createBuffer(e);else if(Lr.util.isArray(e)&&(e.length===16||e.length===24||e.length===32)){t=e,e=Lr.util.createBuffer();for(var n=0;n<t.length;++n)e.putByte(t[n])}if(!Lr.util.isArray(e)){t=e,e=[];var s=t.length();if(s===16||s===24||s===32){s=s>>>2;for(var n=0;n<s;++n)e.push(t.getInt32())}}if(!Lr.util.isArray(e)||!(e.length===4||e.length===6||e.length===8))throw new Error("Invalid key parameter.");var i=this.mode.name,a=["CFB","OFB","CTR","GCM"].indexOf(i)!==-1;this._w=Vk(e,r.decrypt&&!a),this._init=!0}};Lr.aes._expandKey=function(r,e){return QN||Lk(),Vk(r,e)};Lr.aes._updateBlock=YN;Bp("AES-ECB",Lr.cipher.modes.ecb);Bp("AES-CBC",Lr.cipher.modes.cbc);Bp("AES-CFB",Lr.cipher.modes.cfb);Bp("AES-OFB",Lr.cipher.modes.ofb);Bp("AES-CTR",Lr.cipher.modes.ctr);Bp("AES-GCM",Lr.cipher.modes.gcm);function Bp(r,e){var t=o(function(){return new Lr.aes.Algorithm(r,e)},"factory");Lr.cipher.registerAlgorithm(r,t)}o(Bp,"registerAlgorithm");var QN=!1,Dp=4,As,JN,kk,Wl,ca;function Lk(){QN=!0,kk=[0,1,2,4,8,16,32,64,128,27,54];for(var r=new Array(256),e=0;e<128;++e)r[e]=e<<1,r[e+128]=e+128<<1^283;As=new Array(256),JN=new Array(256),Wl=new Array(4),ca=new Array(4);for(var e=0;e<4;++e)Wl[e]=new Array(256),ca[e]=new Array(256);for(var t=0,n=0,s,i,a,u,c,l,h,e=0;e<256;++e){u=n^n<<1^n<<2^n<<3^n<<4,u=u>>8^u&255^99,As[t]=u,JN[u]=t,c=r[u],s=r[t],i=r[s],a=r[i],l=c<<24^u<<16^u<<8^(u^c),h=(s^i^a)<<24^(t^a)<<16^(t^i^a)<<8^(t^s^a);for(var m=0;m<4;++m)Wl[m][t]=l,ca[m][u]=h,l=l<<24|l>>>8,h=h<<24|h>>>8;t===0?t=n=1:(t=s^r[r[r[s^a]]],n^=r[r[n]])}}o(Lk,"initialize");function Vk(r,e){for(var t=r.slice(0),n,s=1,i=t.length,a=i+6+1,u=Dp*a,c=i;c<u;++c)n=t[c-1],c%i===0?(n=As[n>>>16&255]<<24^As[n>>>8&255]<<16^As[n&255]<<8^As[n>>>24]^kk[s]<<24,s++):i>6&&c%i===4&&(n=As[n>>>24]<<24^As[n>>>16&255]<<16^As[n>>>8&255]<<8^As[n&255]),t[c]=t[c-i]^n;if(e){var l,h=ca[0],m=ca[1],g=ca[2],y=ca[3],v=t.slice(0);u=t.length;for(var c=0,E=u-Dp;c<u;c+=Dp,E-=Dp)if(c===0||c===u-Dp)v[c]=t[E],v[c+1]=t[E+3],v[c+2]=t[E+2],v[c+3]=t[E+1];else for(var w=0;w<Dp;++w)l=t[E+w],v[c+(3&-w)]=h[As[l>>>24]]^m[As[l>>>16&255]]^g[As[l>>>8&255]]^y[As[l&255]];t=v}return t}o(Vk,"_expandKey");function YN(r,e,t,n){var s=r.length/4-1,i,a,u,c,l;n?(i=ca[0],a=ca[1],u=ca[2],c=ca[3],l=JN):(i=Wl[0],a=Wl[1],u=Wl[2],c=Wl[3],l=As);var h,m,g,y,v,E,w;h=e[0]^r[0],m=e[n?3:1]^r[1],g=e[2]^r[2],y=e[n?1:3]^r[3];for(var C=3,_=1;_<s;++_)v=i[h>>>24]^a[m>>>16&255]^u[g>>>8&255]^c[y&255]^r[++C],E=i[m>>>24]^a[g>>>16&255]^u[y>>>8&255]^c[h&255]^r[++C],w=i[g>>>24]^a[y>>>16&255]^u[h>>>8&255]^c[m&255]^r[++C],y=i[y>>>24]^a[h>>>16&255]^u[m>>>8&255]^c[g&255]^r[++C],h=v,m=E,g=w;t[0]=l[h>>>24]<<24^l[m>>>16&255]<<16^l[g>>>8&255]<<8^l[y&255]^r[++C],t[n?3:1]=l[m>>>24]<<24^l[g>>>16&255]<<16^l[y>>>8&255]<<8^l[h&255]^r[++C],t[2]=l[g>>>24]<<24^l[y>>>16&255]<<16^l[h>>>8&255]<<8^l[m&255]^r[++C],t[n?1:3]=l[y>>>24]<<24^l[h>>>16&255]<<16^l[m>>>8&255]<<8^l[g&255]^r[++C]}o(YN,"_updateBlock");function rE(r){r=r||{};var e=(r.mode||"CBC").toUpperCase(),t="AES-"+e,n;r.decrypt?n=Lr.cipher.createDecipher(t,r.key):n=Lr.cipher.createCipher(t,r.key);var s=n.start;return n.start=function(i,a){var u=null;a instanceof Lr.util.ByteBuffer&&(u=a,a={}),a=a||{},a.output=u,a.iv=i,s.call(n,a)},n}o(rE,"_createCipher")});var Wu=te((Jve,jk)=>{"use strict";var Ng=zt();Ng.pki=Ng.pki||{};var ZN=jk.exports=Ng.pki.oids=Ng.oids=Ng.oids||{};function Ke(r,e){ZN[r]=e,ZN[e]=r}o(Ke,"_IN");function br(r,e){ZN[r]=e}o(br,"_I_");Ke("1.2.840.113549.1.1.1","rsaEncryption");Ke("1.2.840.113549.1.1.4","md5WithRSAEncryption");Ke("1.2.840.113549.1.1.5","sha1WithRSAEncryption");Ke("1.2.840.113549.1.1.7","RSAES-OAEP");Ke("1.2.840.113549.1.1.8","mgf1");Ke("1.2.840.113549.1.1.9","pSpecified");Ke("1.2.840.113549.1.1.10","RSASSA-PSS");Ke("1.2.840.113549.1.1.11","sha256WithRSAEncryption");Ke("1.2.840.113549.1.1.12","sha384WithRSAEncryption");Ke("1.2.840.113549.1.1.13","sha512WithRSAEncryption");Ke("1.3.101.112","EdDSA25519");Ke("1.2.840.10040.4.3","dsa-with-sha1");Ke("1.3.14.3.2.7","desCBC");Ke("1.3.14.3.2.26","sha1");Ke("1.3.14.3.2.29","sha1WithRSASignature");Ke("2.16.840.1.101.3.4.2.1","sha256");Ke("2.16.840.1.101.3.4.2.2","sha384");Ke("2.16.840.1.101.3.4.2.3","sha512");Ke("2.16.840.1.101.3.4.2.4","sha224");Ke("2.16.840.1.101.3.4.2.5","sha512-224");Ke("2.16.840.1.101.3.4.2.6","sha512-256");Ke("1.2.840.113549.2.2","md2");Ke("1.2.840.113549.2.5","md5");Ke("1.2.840.113549.1.7.1","data");Ke("1.2.840.113549.1.7.2","signedData");Ke("1.2.840.113549.1.7.3","envelopedData");Ke("1.2.840.113549.1.7.4","signedAndEnvelopedData");Ke("1.2.840.113549.1.7.5","digestedData");Ke("1.2.840.113549.1.7.6","encryptedData");Ke("1.2.840.113549.1.9.1","emailAddress");Ke("1.2.840.113549.1.9.2","unstructuredName");Ke("1.2.840.113549.1.9.3","contentType");Ke("1.2.840.113549.1.9.4","messageDigest");Ke("1.2.840.113549.1.9.5","signingTime");Ke("1.2.840.113549.1.9.6","counterSignature");Ke("1.2.840.113549.1.9.7","challengePassword");Ke("1.2.840.113549.1.9.8","unstructuredAddress");Ke("1.2.840.113549.1.9.14","extensionRequest");Ke("1.2.840.113549.1.9.20","friendlyName");Ke("1.2.840.113549.1.9.21","localKeyId");Ke("1.2.840.113549.1.9.22.1","x509Certificate");Ke("1.2.840.113549.1.12.10.1.1","keyBag");Ke("1.2.840.113549.1.12.10.1.2","pkcs8ShroudedKeyBag");Ke("1.2.840.113549.1.12.10.1.3","certBag");Ke("1.2.840.113549.1.12.10.1.4","crlBag");Ke("1.2.840.113549.1.12.10.1.5","secretBag");Ke("1.2.840.113549.1.12.10.1.6","safeContentsBag");Ke("1.2.840.113549.1.5.13","pkcs5PBES2");Ke("1.2.840.113549.1.5.12","pkcs5PBKDF2");Ke("1.2.840.113549.1.12.1.1","pbeWithSHAAnd128BitRC4");Ke("1.2.840.113549.1.12.1.2","pbeWithSHAAnd40BitRC4");Ke("1.2.840.113549.1.12.1.3","pbeWithSHAAnd3-KeyTripleDES-CBC");Ke("1.2.840.113549.1.12.1.4","pbeWithSHAAnd2-KeyTripleDES-CBC");Ke("1.2.840.113549.1.12.1.5","pbeWithSHAAnd128BitRC2-CBC");Ke("1.2.840.113549.1.12.1.6","pbewithSHAAnd40BitRC2-CBC");Ke("1.2.840.113549.2.7","hmacWithSHA1");Ke("1.2.840.113549.2.8","hmacWithSHA224");Ke("1.2.840.113549.2.9","hmacWithSHA256");Ke("1.2.840.113549.2.10","hmacWithSHA384");Ke("1.2.840.113549.2.11","hmacWithSHA512");Ke("1.2.840.113549.3.7","des-EDE3-CBC");Ke("2.16.840.1.101.3.4.1.2","aes128-CBC");Ke("2.16.840.1.101.3.4.1.22","aes192-CBC");Ke("2.16.840.1.101.3.4.1.42","aes256-CBC");Ke("2.5.4.3","commonName");Ke("2.5.4.4","surname");Ke("2.5.4.5","serialNumber");Ke("2.5.4.6","countryName");Ke("2.5.4.7","localityName");Ke("2.5.4.8","stateOrProvinceName");Ke("2.5.4.9","streetAddress");Ke("2.5.4.10","organizationName");Ke("2.5.4.11","organizationalUnitName");Ke("2.5.4.12","title");Ke("2.5.4.13","description");Ke("2.5.4.15","businessCategory");Ke("2.5.4.17","postalCode");Ke("2.5.4.42","givenName");Ke("1.3.6.1.4.1.311.60.2.1.2","jurisdictionOfIncorporationStateOrProvinceName");Ke("1.3.6.1.4.1.311.60.2.1.3","jurisdictionOfIncorporationCountryName");Ke("2.16.840.1.113730.1.1","nsCertType");Ke("2.16.840.1.113730.1.13","nsComment");br("2.5.29.1","authorityKeyIdentifier");br("2.5.29.2","keyAttributes");br("2.5.29.3","certificatePolicies");br("2.5.29.4","keyUsageRestriction");br("2.5.29.5","policyMapping");br("2.5.29.6","subtreesConstraint");br("2.5.29.7","subjectAltName");br("2.5.29.8","issuerAltName");br("2.5.29.9","subjectDirectoryAttributes");br("2.5.29.10","basicConstraints");br("2.5.29.11","nameConstraints");br("2.5.29.12","policyConstraints");br("2.5.29.13","basicConstraints");Ke("2.5.29.14","subjectKeyIdentifier");Ke("2.5.29.15","keyUsage");br("2.5.29.16","privateKeyUsagePeriod");Ke("2.5.29.17","subjectAltName");Ke("2.5.29.18","issuerAltName");Ke("2.5.29.19","basicConstraints");br("2.5.29.20","cRLNumber");br("2.5.29.21","cRLReason");br("2.5.29.22","expirationDate");br("2.5.29.23","instructionCode");br("2.5.29.24","invalidityDate");br("2.5.29.25","cRLDistributionPoints");br("2.5.29.26","issuingDistributionPoint");br("2.5.29.27","deltaCRLIndicator");br("2.5.29.28","issuingDistributionPoint");br("2.5.29.29","certificateIssuer");br("2.5.29.30","nameConstraints");Ke("2.5.29.31","cRLDistributionPoints");Ke("2.5.29.32","certificatePolicies");br("2.5.29.33","policyMappings");br("2.5.29.34","policyConstraints");Ke("2.5.29.35","authorityKeyIdentifier");br("2.5.29.36","policyConstraints");Ke("2.5.29.37","extKeyUsage");br("2.5.29.46","freshestCRL");br("2.5.29.54","inhibitAnyPolicy");Ke("1.3.6.1.4.1.11129.2.4.2","timestampList");Ke("1.3.6.1.5.5.7.1.1","authorityInfoAccess");Ke("1.3.6.1.5.5.7.3.1","serverAuth");Ke("1.3.6.1.5.5.7.3.2","clientAuth");Ke("1.3.6.1.5.5.7.3.3","codeSigning");Ke("1.3.6.1.5.5.7.3.4","emailProtection");Ke("1.3.6.1.5.5.7.3.8","timeStamping")});var la=te((Qve,Mk)=>{"use strict";var Kr=zt();pr();Wu();var tt=Mk.exports=Kr.asn1=Kr.asn1||{};tt.Class={UNIVERSAL:0,APPLICATION:64,CONTEXT_SPECIFIC:128,PRIVATE:192};tt.Type={NONE:0,BOOLEAN:1,INTEGER:2,BITSTRING:3,OCTETSTRING:4,NULL:5,OID:6,ODESC:7,EXTERNAL:8,REAL:9,ENUMERATED:10,EMBEDDED:11,UTF8:12,ROID:13,SEQUENCE:16,SET:17,PRINTABLESTRING:19,IA5STRING:22,UTCTIME:23,GENERALIZEDTIME:24,BMPSTRING:30};tt.maxDepth=256;tt.create=function(r,e,t,n,s){if(Kr.util.isArray(n)){for(var i=[],a=0;a<n.length;++a)n[a]!==void 0&&i.push(n[a]);n=i}var u={tagClass:r,type:e,constructed:t,composed:t||Kr.util.isArray(n),value:n};return s&&"bitStringContents"in s&&(u.bitStringContents=s.bitStringContents,u.original=tt.copy(u)),u};tt.copy=function(r,e){var t;if(Kr.util.isArray(r)){t=[];for(var n=0;n<r.length;++n)t.push(tt.copy(r[n],e));return t}return typeof r=="string"?r:(t={tagClass:r.tagClass,type:r.type,constructed:r.constructed,composed:r.composed,value:tt.copy(r.value,e)},e&&!e.excludeBitStringContents&&(t.bitStringContents=r.bitStringContents),t)};tt.equals=function(r,e,t){if(Kr.util.isArray(r)){if(!Kr.util.isArray(e)||r.length!==e.length)return!1;for(var n=0;n<r.length;++n)if(!tt.equals(r[n],e[n]))return!1;return!0}if(typeof r!=typeof e)return!1;if(typeof r=="string")return r===e;var s=r.tagClass===e.tagClass&&r.type===e.type&&r.constructed===e.constructed&&r.composed===e.composed&&tt.equals(r.value,e.value);return t&&t.includeBitStringContents&&(s=s&&r.bitStringContents===e.bitStringContents),s};tt.getBerValueLength=function(r){var e=r.getByte();if(e!==128){var t,n=e&128;return n?t=r.getInt((e&127)<<3):t=e,t}};function Tg(r,e,t){if(t>e){var n=new Error("Too few bytes to parse DER.");throw n.available=r.length(),n.remaining=e,n.requested=t,n}}o(Tg,"_checkBufferLength");var EQ=o(function(r,e){var t=r.getByte();if(e--,t!==128){var n,s=t&128;if(!s)n=t;else{var i=t&127;Tg(r,e,i),n=r.getInt(i<<3)}if(n<0)throw new Error("Negative length: "+n);return n}},"_getValueLength");tt.fromDer=function(r,e){e===void 0&&(e={strict:!0,parseAllBytes:!0,decodeBitStrings:!0}),typeof e=="boolean"&&(e={strict:e,parseAllBytes:!0,decodeBitStrings:!0}),"strict"in e||(e.strict=!0),"parseAllBytes"in e||(e.parseAllBytes=!0),"decodeBitStrings"in e||(e.decodeBitStrings=!0),"maxDepth"in e||(e.maxDepth=tt.maxDepth),typeof r=="string"&&(r=Kr.util.createBuffer(r));var t=r.length(),n=nE(r,r.length(),0,e);if(e.parseAllBytes&&r.length()!==0){var s=new Error("Unparsed DER bytes remain after ASN.1 parsing.");throw s.byteCount=t,s.remaining=r.length(),s}return n};function nE(r,e,t,n){if(t>=n.maxDepth)throw new Error("ASN.1 parsing error: Max depth exceeded.");var s;Tg(r,e,2);var i=r.getByte();e--;var a=i&192,u=i&31;s=r.length();var c=EQ(r,e);if(e-=s-r.length(),c!==void 0&&c>e){if(n.strict){var l=new Error("Too few bytes to read ASN.1 value.");throw l.available=r.length(),l.remaining=e,l.requested=c,l}c=e}var h,m,g=(i&32)===32;if(g)if(h=[],c===void 0)for(;;){if(Tg(r,e,2),r.bytes(2)==="\0\0"){r.getBytes(2),e-=2;break}s=r.length(),h.push(nE(r,e,t+1,n)),e-=s-r.length()}else for(;c>0;)s=r.length(),h.push(nE(r,c,t+1,n)),e-=s-r.length(),c-=s-r.length();if(h===void 0&&a===tt.Class.UNIVERSAL&&u===tt.Type.BITSTRING&&(m=r.bytes(c)),h===void 0&&n.decodeBitStrings&&a===tt.Class.UNIVERSAL&&u===tt.Type.BITSTRING&&c>1){var y=r.read,v=e,E=0;if(u===tt.Type.BITSTRING&&(Tg(r,e,1),E=r.getByte(),e--),E===0)try{s=r.length();var w={strict:!0,decodeBitStrings:!0},C=nE(r,e,t+1,w),_=s-r.length();e-=_,u==tt.Type.BITSTRING&&_++;var b=C.tagClass;_===c&&(b===tt.Class.UNIVERSAL||b===tt.Class.CONTEXT_SPECIFIC)&&(h=[C])}catch{}h===void 0&&(r.read=y,e=v)}if(h===void 0){if(c===void 0){if(n.strict)throw new Error("Non-constructed ASN.1 object of indefinite length.");c=e}if(u===tt.Type.BMPSTRING)for(h="";c>0;c-=2)Tg(r,e,2),h+=String.fromCharCode(r.getInt16()),e-=2;else h=r.getBytes(c),e-=c}var A=m===void 0?null:{bitStringContents:m};return tt.create(a,u,g,h,A)}o(nE,"_fromDer");tt.toDer=function(r){var e=Kr.util.createBuffer(),t=r.tagClass|r.type,n=Kr.util.createBuffer(),s=!1;if("bitStringContents"in r&&(s=!0,r.original&&(s=tt.equals(r,r.original))),s)n.putBytes(r.bitStringContents);else if(r.composed){r.constructed?t|=32:n.putByte(0);for(var i=0;i<r.value.length;++i)r.value[i]!==void 0&&n.putBuffer(tt.toDer(r.value[i]))}else if(r.type===tt.Type.BMPSTRING)for(var i=0;i<r.value.length;++i)n.putInt16(r.value.charCodeAt(i));else r.type===tt.Type.INTEGER&&r.value.length>1&&(r.value.charCodeAt(0)===0&&(r.value.charCodeAt(1)&128)===0||r.value.charCodeAt(0)===255&&(r.value.charCodeAt(1)&128)===128)?n.putBytes(r.value.substr(1)):n.putBytes(r.value);if(e.putByte(t),n.length()<=127)e.putByte(n.length()&127);else{var a=n.length(),u="";do u+=String.fromCharCode(a&255),a=a>>>8;while(a>0);e.putByte(u.length|128);for(var i=u.length-1;i>=0;--i)e.putByte(u.charCodeAt(i))}return e.putBuffer(n),e};tt.oidToDer=function(r){var e=r.split("."),t=Kr.util.createBuffer();t.putByte(40*parseInt(e[0],10)+parseInt(e[1],10));for(var n,s,i,a,u=2;u<e.length;++u){if(n=!0,s=[],i=parseInt(e[u],10),i>4294967295)throw new Error("OID value too large; max is 32-bits.");do a=i&127,i=i>>>7,n||(a|=128),s.push(a),n=!1;while(i>0);for(var c=s.length-1;c>=0;--c)t.putByte(s[c])}return t};tt.derToOid=function(r){var e;typeof r=="string"&&(r=Kr.util.createBuffer(r));var t=r.getByte();e=Math.floor(t/40)+"."+t%40;for(var n=0;r.length()>0;){if(n>70368744177663)throw new Error("OID value too large; max is 53-bits.");t=r.getByte(),n=n*128,t&128?n+=t&127:(e+="."+(n+t),n=0)}return e};tt.utcTimeToDate=function(r){var e=new Date,t=parseInt(r.substr(0,2),10);t=t>=50?1900+t:2e3+t;var n=parseInt(r.substr(2,2),10)-1,s=parseInt(r.substr(4,2),10),i=parseInt(r.substr(6,2),10),a=parseInt(r.substr(8,2),10),u=0;if(r.length>11){var c=r.charAt(10),l=10;c!=="+"&&c!=="-"&&(u=parseInt(r.substr(10,2),10),l+=2)}if(e.setUTCFullYear(t,n,s),e.setUTCHours(i,a,u,0),l&&(c=r.charAt(l),c==="+"||c==="-")){var h=parseInt(r.substr(l+1,2),10),m=parseInt(r.substr(l+4,2),10),g=h*60+m;g*=6e4,c==="+"?e.setTime(+e-g):e.setTime(+e+g)}return e};tt.generalizedTimeToDate=function(r){var e=new Date,t=parseInt(r.substr(0,4),10),n=parseInt(r.substr(4,2),10)-1,s=parseInt(r.substr(6,2),10),i=parseInt(r.substr(8,2),10),a=parseInt(r.substr(10,2),10),u=parseInt(r.substr(12,2),10),c=0,l=0,h=!1;r.charAt(r.length-1)==="Z"&&(h=!0);var m=r.length-5,g=r.charAt(m);if(g==="+"||g==="-"){var y=parseInt(r.substr(m+1,2),10),v=parseInt(r.substr(m+4,2),10);l=y*60+v,l*=6e4,g==="+"&&(l*=-1),h=!0}return r.charAt(14)==="."&&(c=parseFloat(r.substr(14),10)*1e3),h?(e.setUTCFullYear(t,n,s),e.setUTCHours(i,a,u,c),e.setTime(+e+l)):(e.setFullYear(t,n,s),e.setHours(i,a,u,c)),e};tt.dateToUtcTime=function(r){if(typeof r=="string")return r;var e="",t=[];t.push((""+r.getUTCFullYear()).substr(2)),t.push(""+(r.getUTCMonth()+1)),t.push(""+r.getUTCDate()),t.push(""+r.getUTCHours()),t.push(""+r.getUTCMinutes()),t.push(""+r.getUTCSeconds());for(var n=0;n<t.length;++n)t[n].length<2&&(e+="0"),e+=t[n];return e+="Z",e};tt.dateToGeneralizedTime=function(r){if(typeof r=="string")return r;var e="",t=[];t.push(""+r.getUTCFullYear()),t.push(""+(r.getUTCMonth()+1)),t.push(""+r.getUTCDate()),t.push(""+r.getUTCHours()),t.push(""+r.getUTCMinutes()),t.push(""+r.getUTCSeconds());for(var n=0;n<t.length;++n)t[n].length<2&&(e+="0"),e+=t[n];return e+="Z",e};tt.integerToDer=function(r){var e=Kr.util.createBuffer();if(r>=-128&&r<128)return e.putSignedInt(r,8);if(r>=-32768&&r<32768)return e.putSignedInt(r,16);if(r>=-8388608&&r<8388608)return e.putSignedInt(r,24);if(r>=-2147483648&&r<2147483648)return e.putSignedInt(r,32);var t=new Error("Integer too large; max is 32-bits.");throw t.integer=r,t};tt.derToInteger=function(r){typeof r=="string"&&(r=Kr.util.createBuffer(r));var e=r.length()*8;if(e>32)throw new Error("Integer too large; max is 32-bits.");return r.getSignedInt(e)};tt.validate=function(r,e,t,n){var s=!1;if((r.tagClass===e.tagClass||typeof e.tagClass>"u")&&(r.type===e.type||typeof e.type>"u"))if(r.constructed===e.constructed||typeof e.constructed>"u"){if(s=!0,e.value&&Kr.util.isArray(e.value))for(var i=0,a=0;s&&a<e.value.length;++a){var u=e.value[a];s=!!u.optional;var c=r.value[i];if(!c){u.optional||(s=!1,n&&n.push("["+e.name+'] Missing required element. Expected tag class "'+u.tagClass+'", type "'+u.type+'"'));continue}var l=typeof u.tagClass<"u"&&typeof u.type<"u";if(l&&(c.tagClass!==u.tagClass||c.type!==u.type))if(u.optional){s=!0;continue}else{s=!1,n&&n.push("["+e.name+"] Tag mismatch. Expected ("+u.tagClass+","+u.type+"), got ("+c.tagClass+","+c.type+")");break}var h=tt.validate(c,u,t,n);if(h)++i,s=!0;else if(u.optional)s=!0;else{s=!1;break}}if(s&&t&&(e.capture&&(t[e.capture]=r.value),e.captureAsn1&&(t[e.captureAsn1]=r),e.captureBitStringContents&&"bitStringContents"in r&&(t[e.captureBitStringContents]=r.bitStringContents),e.captureBitStringValue&&"bitStringContents"in r)){var m;if(r.bitStringContents.length<2)t[e.captureBitStringValue]="";else{var g=r.bitStringContents.charCodeAt(0);if(g!==0)throw new Error("captureBitStringValue only supported for zero unused bits");t[e.captureBitStringValue]=r.bitStringContents.slice(1)}}}else n&&n.push("["+e.name+'] Expected constructed "'+e.constructed+'", got "'+r.constructed+'"');else n&&(r.tagClass!==e.tagClass&&n.push("["+e.name+'] Expected tag class "'+e.tagClass+'", got "'+r.tagClass+'"'),r.type!==e.type&&n.push("["+e.name+'] Expected type "'+e.type+'", got "'+r.type+'"'));return s};var Fk=/[^\\u0000-\\u00ff]/;tt.prettyPrint=function(r,e,t){var n="";e=e||0,t=t||2,e>0&&(n+=`
|
|
6
|
-
`);for(var s="",i=0;i<e*t;++i)s+=" ";switch(n+=s+"Tag: ",r.tagClass){case tt.Class.UNIVERSAL:n+="Universal:";break;case tt.Class.APPLICATION:n+="Application:";break;case tt.Class.CONTEXT_SPECIFIC:n+="Context-Specific:";break;case tt.Class.PRIVATE:n+="Private:";break}if(r.tagClass===tt.Class.UNIVERSAL)switch(n+=r.type,r.type){case tt.Type.NONE:n+=" (None)";break;case tt.Type.BOOLEAN:n+=" (Boolean)";break;case tt.Type.INTEGER:n+=" (Integer)";break;case tt.Type.BITSTRING:n+=" (Bit string)";break;case tt.Type.OCTETSTRING:n+=" (Octet string)";break;case tt.Type.NULL:n+=" (Null)";break;case tt.Type.OID:n+=" (Object Identifier)";break;case tt.Type.ODESC:n+=" (Object Descriptor)";break;case tt.Type.EXTERNAL:n+=" (External or Instance of)";break;case tt.Type.REAL:n+=" (Real)";break;case tt.Type.ENUMERATED:n+=" (Enumerated)";break;case tt.Type.EMBEDDED:n+=" (Embedded PDV)";break;case tt.Type.UTF8:n+=" (UTF8)";break;case tt.Type.ROID:n+=" (Relative Object Identifier)";break;case tt.Type.SEQUENCE:n+=" (Sequence)";break;case tt.Type.SET:n+=" (Set)";break;case tt.Type.PRINTABLESTRING:n+=" (Printable String)";break;case tt.Type.IA5String:n+=" (IA5String (ASCII))";break;case tt.Type.UTCTIME:n+=" (UTC time)";break;case tt.Type.GENERALIZEDTIME:n+=" (Generalized time)";break;case tt.Type.BMPSTRING:n+=" (BMP String)";break}else n+=r.type;if(n+=`
|
|
7
|
-
`,n+=s+"Constructed: "+r.constructed+`
|
|
8
|
-
`,r.composed){for(var a=0,u="",i=0;i<r.value.length;++i)r.value[i]!==void 0&&(a+=1,u+=tt.prettyPrint(r.value[i],e+1,t),i+1<r.value.length&&(u+=","));n+=s+"Sub values: "+a+u}else{if(n+=s+"Value: ",r.type===tt.Type.OID){var c=tt.derToOid(r.value);n+=c,Kr.pki&&Kr.pki.oids&&c in Kr.pki.oids&&(n+=" ("+Kr.pki.oids[c]+") ")}if(r.type===tt.Type.INTEGER)try{n+=tt.derToInteger(r.value)}catch{n+="0x"+Kr.util.bytesToHex(r.value)}else if(r.type===tt.Type.BITSTRING){if(r.value.length>1?n+="0x"+Kr.util.bytesToHex(r.value.slice(1)):n+="(none)",r.value.length>0){var l=r.value.charCodeAt(0);l==1?n+=" (1 unused bit shown)":l>1&&(n+=" ("+l+" unused bits shown)")}}else if(r.type===tt.Type.OCTETSTRING)Fk.test(r.value)||(n+="("+r.value+") "),n+="0x"+Kr.util.bytesToHex(r.value);else if(r.type===tt.Type.UTF8)try{n+=Kr.util.decodeUtf8(r.value)}catch(h){if(h.message==="URI malformed")n+="0x"+Kr.util.bytesToHex(r.value)+" (malformed UTF8)";else throw h}else r.type===tt.Type.PRINTABLESTRING||r.type===tt.Type.IA5String?n+=r.value:Fk.test(r.value)?n+="0x"+Kr.util.bytesToHex(r.value):r.value.length===0?n+="[null]":n+=r.value}return n}});var Ma=te((eye,qk)=>{"use strict";var sE=zt();qk.exports=sE.md=sE.md||{};sE.md.algorithms=sE.md.algorithms||{}});var Rp=te((tye,Hk)=>{"use strict";var jo=zt();Ma();pr();var SQ=Hk.exports=jo.hmac=jo.hmac||{};SQ.create=function(){var r=null,e=null,t=null,n=null,s={};return s.start=function(i,a){if(i!==null)if(typeof i=="string")if(i=i.toLowerCase(),i in jo.md.algorithms)e=jo.md.algorithms[i].create();else throw new Error('Unknown hash algorithm "'+i+'"');else e=i;if(a===null)a=r;else{if(typeof a=="string")a=jo.util.createBuffer(a);else if(jo.util.isArray(a)){var u=a;a=jo.util.createBuffer();for(var c=0;c<u.length;++c)a.putByte(u[c])}var l=a.length();l>e.blockLength&&(e.start(),e.update(a.bytes()),a=e.digest()),t=jo.util.createBuffer(),n=jo.util.createBuffer(),l=a.length();for(var c=0;c<l;++c){var u=a.at(c);t.putByte(54^u),n.putByte(92^u)}if(l<e.blockLength)for(var u=e.blockLength-l,c=0;c<u;++c)t.putByte(54),n.putByte(92);r=a,t=t.bytes(),n=n.bytes()}e.start(),e.update(t)},s.update=function(i){e.update(i)},s.getMac=function(){var i=e.digest().bytes();return e.start(),e.update(n),e.update(i),e.digest()},s.digest=s.getMac,s}});var aE=te((rye,Xk)=>{"use strict";var qa=zt();Ma();pr();var $k=Xk.exports=qa.md5=qa.md5||{};qa.md.md5=qa.md.algorithms.md5=$k;$k.create=function(){Gk||bQ();var r=null,e=qa.util.createBuffer(),t=new Array(16),n={algorithm:"md5",blockLength:64,digestLength:16,messageLength:0,fullMessageLength:null,messageLengthSize:8};return n.start=function(){n.messageLength=0,n.fullMessageLength=n.messageLength64=[];for(var s=n.messageLengthSize/4,i=0;i<s;++i)n.fullMessageLength.push(0);return e=qa.util.createBuffer(),r={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878},n},n.start(),n.update=function(s,i){i==="utf8"&&(s=qa.util.encodeUtf8(s));var a=s.length;n.messageLength+=a,a=[a/4294967296>>>0,a>>>0];for(var u=n.fullMessageLength.length-1;u>=0;--u)n.fullMessageLength[u]+=a[1],a[1]=a[0]+(n.fullMessageLength[u]/4294967296>>>0),n.fullMessageLength[u]=n.fullMessageLength[u]>>>0,a[0]=a[1]/4294967296>>>0;return e.putBytes(s),Kk(r,t,e),(e.read>2048||e.length()===0)&&e.compact(),n},n.digest=function(){var s=qa.util.createBuffer();s.putBytes(e.bytes());var i=n.fullMessageLength[n.fullMessageLength.length-1]+n.messageLengthSize,a=i&n.blockLength-1;s.putBytes(eT.substr(0,n.blockLength-a));for(var u,c=0,l=n.fullMessageLength.length-1;l>=0;--l)u=n.fullMessageLength[l]*8+c,c=u/4294967296>>>0,s.putInt32Le(u>>>0);var h={h0:r.h0,h1:r.h1,h2:r.h2,h3:r.h3};Kk(h,t,s);var m=qa.util.createBuffer();return m.putInt32Le(h.h0),m.putInt32Le(h.h1),m.putInt32Le(h.h2),m.putInt32Le(h.h3),m},n};var eT=null,iE=null,Ig=null,Op=null,Gk=!1;function bQ(){eT="\x80",eT+=qa.util.fillString("\0",64),iE=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,1,6,11,0,5,10,15,4,9,14,3,8,13,2,7,12,5,8,11,14,1,4,7,10,13,0,3,6,9,12,15,2,0,7,14,5,12,3,10,1,8,15,6,13,4,11,2,9],Ig=[7,12,17,22,7,12,17,22,7,12,17,22,7,12,17,22,5,9,14,20,5,9,14,20,5,9,14,20,5,9,14,20,4,11,16,23,4,11,16,23,4,11,16,23,4,11,16,23,6,10,15,21,6,10,15,21,6,10,15,21,6,10,15,21],Op=new Array(64);for(var r=0;r<64;++r)Op[r]=Math.floor(Math.abs(Math.sin(r+1))*4294967296);Gk=!0}o(bQ,"_init");function Kk(r,e,t){for(var n,s,i,a,u,c,l,h,m=t.length();m>=64;){for(s=r.h0,i=r.h1,a=r.h2,u=r.h3,h=0;h<16;++h)e[h]=t.getInt32Le(),c=u^i&(a^u),n=s+c+Op[h]+e[h],l=Ig[h],s=u,u=a,a=i,i+=n<<l|n>>>32-l;for(;h<32;++h)c=a^u&(i^a),n=s+c+Op[h]+e[iE[h]],l=Ig[h],s=u,u=a,a=i,i+=n<<l|n>>>32-l;for(;h<48;++h)c=i^a^u,n=s+c+Op[h]+e[iE[h]],l=Ig[h],s=u,u=a,a=i,i+=n<<l|n>>>32-l;for(;h<64;++h)c=a^(i|~u),n=s+c+Op[h]+e[iE[h]],l=Ig[h],s=u,u=a,a=i,i+=n<<l|n>>>32-l;r.h0=r.h0+s|0,r.h1=r.h1+i|0,r.h2=r.h2+a|0,r.h3=r.h3+u|0,m-=64}}o(Kk,"_update")});var zl=te((sye,zk)=>{"use strict";var uE=zt();pr();var Wk=zk.exports=uE.pem=uE.pem||{};Wk.encode=function(r,e){e=e||{};var t="-----BEGIN "+r.type+`-----\r
|
|
9
|
-
`,n;if(r.procType&&(n={name:"Proc-Type",values:[String(r.procType.version),r.procType.type]},t+=oE(n)),r.contentDomain&&(n={name:"Content-Domain",values:[r.contentDomain]},t+=oE(n)),r.dekInfo&&(n={name:"DEK-Info",values:[r.dekInfo.algorithm]},r.dekInfo.parameters&&n.values.push(r.dekInfo.parameters),t+=oE(n)),r.headers)for(var s=0;s<r.headers.length;++s)t+=oE(r.headers[s]);return r.procType&&(t+=`\r
|
|
10
|
-
`),t+=uE.util.encode64(r.body,e.maxline||64)+`\r
|
|
11
|
-
`,t+="-----END "+r.type+`-----\r
|
|
12
|
-
`,t};Wk.decode=function(r){for(var e=[],t=/\s*-----BEGIN ([A-Z0-9- ]+)-----\r?\n?([\x21-\x7e\s]+?(?:\r?\n\r?\n))?([:A-Za-z0-9+\/=\s]+?)-----END \1-----/g,n=/([\x21-\x7e]+):\s*([\x21-\x7e\s^:]+)/,s=/\r?\n/,i;i=t.exec(r),!!i;){var a=i[1];a==="NEW CERTIFICATE REQUEST"&&(a="CERTIFICATE REQUEST");var u={type:a,procType:null,contentDomain:null,dekInfo:null,headers:[],body:uE.util.decode64(i[3])};if(e.push(u),!!i[2]){for(var c=i[2].split(s),l=0;i&&l<c.length;){for(var h=c[l].replace(/\s+$/,""),m=l+1;m<c.length;++m){var g=c[m];if(!/\s/.test(g[0]))break;h+=g,l=m}if(i=h.match(n),i){for(var y={name:i[1],values:[]},v=i[2].split(","),E=0;E<v.length;++E)y.values.push(AQ(v[E]));if(u.procType)if(!u.contentDomain&&y.name==="Content-Domain")u.contentDomain=v[0]||"";else if(!u.dekInfo&&y.name==="DEK-Info"){if(y.values.length===0)throw new Error('Invalid PEM formatted message. The "DEK-Info" header must have at least one subfield.');u.dekInfo={algorithm:v[0],parameters:v[1]||null}}else u.headers.push(y);else{if(y.name!=="Proc-Type")throw new Error('Invalid PEM formatted message. The first encapsulated header must be "Proc-Type".');if(y.values.length!==2)throw new Error('Invalid PEM formatted message. The "Proc-Type" header must have two subfields.');u.procType={version:v[0],type:v[1]}}}++l}if(u.procType==="ENCRYPTED"&&!u.dekInfo)throw new Error('Invalid PEM formatted message. The "DEK-Info" header must be present if "Proc-Type" is "ENCRYPTED".')}}if(e.length===0)throw new Error("Invalid PEM formatted message.");return e};function oE(r){for(var e=r.name+": ",t=[],n=o(function(c,l){return" "+l},"insertSpace"),s=0;s<r.values.length;++s)t.push(r.values[s].replace(/^(\S+\r\n)/,n));e+=t.join(",")+`\r
|
|
13
|
-
`;for(var i=0,a=-1,s=0;s<e.length;++s,++i)if(i>65&&a!==-1){var u=e[a];u===","?(++a,e=e.substr(0,a)+`\r
|
|
14
|
-
`+e.substr(a)):e=e.substr(0,a)+`\r
|
|
15
|
-
`+u+e.substr(a+1),i=s-a-1,a=-1,++s}else(e[s]===" "||e[s]===" "||e[s]===",")&&(a=s);return e}o(oE,"foldHeader");function AQ(r){return r.replace(/^\s+/,"")}o(AQ,"ltrim")});var _g=te((aye,Yk)=>{"use strict";var zr=zt();Zw();zN();pr();Yk.exports=zr.des=zr.des||{};zr.des.startEncrypting=function(r,e,t,n){var s=cE({key:r,output:t,decrypt:!1,mode:n||(e===null?"ECB":"CBC")});return s.start(e),s};zr.des.createEncryptionCipher=function(r,e){return cE({key:r,output:null,decrypt:!1,mode:e})};zr.des.startDecrypting=function(r,e,t,n){var s=cE({key:r,output:t,decrypt:!0,mode:n||(e===null?"ECB":"CBC")});return s.start(e),s};zr.des.createDecryptionCipher=function(r,e){return cE({key:r,output:null,decrypt:!0,mode:e})};zr.des.Algorithm=function(r,e){var t=this;t.name=r,t.mode=new e({blockSize:8,cipher:{encrypt:o(function(n,s){return Jk(t._keys,n,s,!1)},"encrypt"),decrypt:o(function(n,s){return Jk(t._keys,n,s,!0)},"decrypt")}}),t._init=!1};zr.des.Algorithm.prototype.initialize=function(r){if(!this._init){var e=zr.util.createBuffer(r.key);if(this.name.indexOf("3DES")===0&&e.length()!==24)throw new Error("Invalid Triple-DES key size: "+e.length()*8);this._keys=OQ(e),this._init=!0}};Ha("DES-ECB",zr.cipher.modes.ecb);Ha("DES-CBC",zr.cipher.modes.cbc);Ha("DES-CFB",zr.cipher.modes.cfb);Ha("DES-OFB",zr.cipher.modes.ofb);Ha("DES-CTR",zr.cipher.modes.ctr);Ha("3DES-ECB",zr.cipher.modes.ecb);Ha("3DES-CBC",zr.cipher.modes.cbc);Ha("3DES-CFB",zr.cipher.modes.cfb);Ha("3DES-OFB",zr.cipher.modes.ofb);Ha("3DES-CTR",zr.cipher.modes.ctr);function Ha(r,e){var t=o(function(){return new zr.des.Algorithm(r,e)},"factory");zr.cipher.registerAlgorithm(r,t)}o(Ha,"registerAlgorithm");var CQ=[16843776,0,65536,16843780,16842756,66564,4,65536,1024,16843776,16843780,1024,16778244,16842756,16777216,4,1028,16778240,16778240,66560,66560,16842752,16842752,16778244,65540,16777220,16777220,65540,0,1028,66564,16777216,65536,16843780,4,16842752,16843776,16777216,16777216,1024,16842756,65536,66560,16777220,1024,4,16778244,66564,16843780,65540,16842752,16778244,16777220,1028,66564,16843776,1028,16778240,16778240,0,65540,66560,0,16842756],NQ=[-2146402272,-2147450880,32768,1081376,1048576,32,-2146435040,-2147450848,-2147483616,-2146402272,-2146402304,-2147483648,-2147450880,1048576,32,-2146435040,1081344,1048608,-2147450848,0,-2147483648,32768,1081376,-2146435072,1048608,-2147483616,0,1081344,32800,-2146402304,-2146435072,32800,0,1081376,-2146435040,1048576,-2147450848,-2146435072,-2146402304,32768,-2146435072,-2147450880,32,-2146402272,1081376,32,32768,-2147483648,32800,-2146402304,1048576,-2147483616,1048608,-2147450848,-2147483616,1048608,1081344,0,-2147450880,32800,-2147483648,-2146435040,-2146402272,1081344],TQ=[520,134349312,0,134348808,134218240,0,131592,134218240,131080,134217736,134217736,131072,134349320,131080,134348800,520,134217728,8,134349312,512,131584,134348800,134348808,131592,134218248,131584,131072,134218248,8,134349320,512,134217728,134349312,134217728,131080,520,131072,134349312,134218240,0,512,131080,134349320,134218240,134217736,512,0,134348808,134218248,131072,134217728,134349320,8,131592,131584,134217736,134348800,134218248,520,134348800,131592,8,134348808,131584],IQ=[8396801,8321,8321,128,8396928,8388737,8388609,8193,0,8396800,8396800,8396929,129,0,8388736,8388609,1,8192,8388608,8396801,128,8388608,8193,8320,8388737,1,8320,8388736,8192,8396928,8396929,129,8388736,8388609,8396800,8396929,129,0,0,8396800,8320,8388736,8388737,1,8396801,8321,8321,128,8396929,129,1,8192,8388609,8193,8396928,8388737,8193,8320,8388608,8396801,128,8388608,8192,8396928],_Q=[256,34078976,34078720,1107296512,524288,256,1073741824,34078720,1074266368,524288,33554688,1074266368,1107296512,1107820544,524544,1073741824,33554432,1074266112,1074266112,0,1073742080,1107820800,1107820800,33554688,1107820544,1073742080,0,1107296256,34078976,33554432,1107296256,524544,524288,1107296512,256,33554432,1073741824,34078720,1107296512,1074266368,33554688,1073741824,1107820544,34078976,1074266368,256,33554432,1107820544,1107820800,524544,1107296256,1107820800,34078720,0,1074266112,1107296256,524544,33554688,1073742080,524288,0,1074266112,34078976,1073742080],DQ=[536870928,541065216,16384,541081616,541065216,16,541081616,4194304,536887296,4210704,4194304,536870928,4194320,536887296,536870912,16400,0,4194320,536887312,16384,4210688,536887312,16,541065232,541065232,0,4210704,541081600,16400,4210688,541081600,536870912,536887296,16,541065232,4210688,541081616,4194304,16400,536870928,4194304,536887296,536870912,16400,536870928,541081616,4210688,541065216,4210704,541081600,0,541065232,16,16384,541065216,4210704,16384,4194320,536887312,0,541081600,536870912,4194320,536887312],BQ=[2097152,69206018,67110914,0,2048,67110914,2099202,69208064,69208066,2097152,0,67108866,2,67108864,69206018,2050,67110912,2099202,2097154,67110912,67108866,69206016,69208064,2097154,69206016,2048,2050,69208066,2099200,2,67108864,2099200,67108864,2099200,2097152,67110914,67110914,69206018,69206018,2,2097154,67108864,67110912,2097152,69208064,2050,2099202,69208064,2050,67108866,69208066,69206016,2099200,0,2,69208066,0,2099202,69206016,2048,67108866,67110912,2048,2097154],RQ=[268439616,4096,262144,268701760,268435456,268439616,64,268435456,262208,268697600,268701760,266240,268701696,266304,4096,64,268697600,268435520,268439552,4160,266240,262208,268697664,268701696,4160,0,0,268697664,268435520,268439552,266304,262144,266304,262144,268701696,4096,64,268697664,4096,266304,268439552,64,268435520,268697600,268697664,268435456,262144,268439616,0,268701760,262208,268435520,268697600,268439552,268439616,0,268701760,266240,266240,4160,4160,262208,268435456,268701696];function OQ(r){for(var e=[0,4,536870912,536870916,65536,65540,536936448,536936452,512,516,536871424,536871428,66048,66052,536936960,536936964],t=[0,1,1048576,1048577,67108864,67108865,68157440,68157441,256,257,1048832,1048833,67109120,67109121,68157696,68157697],n=[0,8,2048,2056,16777216,16777224,16779264,16779272,0,8,2048,2056,16777216,16777224,16779264,16779272],s=[0,2097152,134217728,136314880,8192,2105344,134225920,136323072,131072,2228224,134348800,136445952,139264,2236416,134356992,136454144],i=[0,262144,16,262160,0,262144,16,262160,4096,266240,4112,266256,4096,266240,4112,266256],a=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488],u=[0,268435456,524288,268959744,2,268435458,524290,268959746,0,268435456,524288,268959744,2,268435458,524290,268959746],c=[0,65536,2048,67584,536870912,536936448,536872960,536938496,131072,196608,133120,198656,537001984,537067520,537004032,537069568],l=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],h=[0,268435456,8,268435464,0,268435456,8,268435464,1024,268436480,1032,268436488,1024,268436480,1032,268436488],m=[0,32,0,32,1048576,1048608,1048576,1048608,8192,8224,8192,8224,1056768,1056800,1056768,1056800],g=[0,16777216,512,16777728,2097152,18874368,2097664,18874880,67108864,83886080,67109376,83886592,69206016,85983232,69206528,85983744],y=[0,4096,134217728,134221824,524288,528384,134742016,134746112,16,4112,134217744,134221840,524304,528400,134742032,134746128],v=[0,4,256,260,0,4,256,260,1,5,257,261,1,5,257,261],E=r.length()>8?3:1,w=[],C=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0],_=0,b,A=0;A<E;A++){var T=r.getInt32(),B=r.getInt32();b=(T>>>4^B)&252645135,B^=b,T^=b<<4,b=(B>>>-16^T)&65535,T^=b,B^=b<<-16,b=(T>>>2^B)&858993459,B^=b,T^=b<<2,b=(B>>>-16^T)&65535,T^=b,B^=b<<-16,b=(T>>>1^B)&1431655765,B^=b,T^=b<<1,b=(B>>>8^T)&16711935,T^=b,B^=b<<8,b=(T>>>1^B)&1431655765,B^=b,T^=b<<1,b=T<<8|B>>>20&240,T=B<<24|B<<8&16711680|B>>>8&65280|B>>>24&240,B=b;for(var M=0;M<C.length;++M){C[M]?(T=T<<2|T>>>26,B=B<<2|B>>>26):(T=T<<1|T>>>27,B=B<<1|B>>>27),T&=-15,B&=-15;var I=e[T>>>28]|t[T>>>24&15]|n[T>>>20&15]|s[T>>>16&15]|i[T>>>12&15]|a[T>>>8&15]|u[T>>>4&15],H=c[B>>>28]|l[B>>>24&15]|h[B>>>20&15]|m[B>>>16&15]|g[B>>>12&15]|y[B>>>8&15]|v[B>>>4&15];b=(H>>>16^I)&65535,w[_++]=I^b,w[_++]=H^b<<16}}return w}o(OQ,"_createKeys");function Jk(r,e,t,n){var s=r.length===32?3:9,i;s===3?i=n?[30,-2,-2]:[0,32,2]:i=n?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2];var a,u=e[0],c=e[1];a=(u>>>4^c)&252645135,c^=a,u^=a<<4,a=(u>>>16^c)&65535,c^=a,u^=a<<16,a=(c>>>2^u)&858993459,u^=a,c^=a<<2,a=(c>>>8^u)&16711935,u^=a,c^=a<<8,a=(u>>>1^c)&1431655765,c^=a,u^=a<<1,u=u<<1|u>>>31,c=c<<1|c>>>31;for(var l=0;l<s;l+=3){for(var h=i[l+1],m=i[l+2],g=i[l];g!=h;g+=m){var y=c^r[g],v=(c>>>4|c<<28)^r[g+1];a=u,u=c,c=a^(NQ[y>>>24&63]|IQ[y>>>16&63]|DQ[y>>>8&63]|RQ[y&63]|CQ[v>>>24&63]|TQ[v>>>16&63]|_Q[v>>>8&63]|BQ[v&63])}a=u,u=c,c=a}u=u>>>1|u<<31,c=c>>>1|c<<31,a=(u>>>1^c)&1431655765,c^=a,u^=a<<1,a=(c>>>8^u)&16711935,u^=a,c^=a<<8,a=(c>>>2^u)&858993459,u^=a,c^=a<<2,a=(u>>>16^c)&65535,c^=a,u^=a<<16,a=(u>>>4^c)&252645135,c^=a,u^=a<<4,t[0]=u,t[1]=c}o(Jk,"_updateBlock");function cE(r){r=r||{};var e=(r.mode||"CBC").toUpperCase(),t="DES-"+e,n;r.decrypt?n=zr.cipher.createDecipher(t,r.key):n=zr.cipher.createCipher(t,r.key);var s=n.start;return n.start=function(i,a){var u=null;a instanceof zr.util.ByteBuffer&&(u=a,a={}),a=a||{},a.output=u,a.iv=i,s.call(n,a)},n}o(cE,"_createCipher")});var lE=te((uye,Qk)=>{"use strict";var Cs=zt();Rp();Ma();pr();var PQ=Cs.pkcs5=Cs.pkcs5||{},Fo;Cs.util.isNodejs&&!Cs.options.usePureJavaScript&&(Fo=Ge("crypto"));Qk.exports=Cs.pbkdf2=PQ.pbkdf2=function(r,e,t,n,s,i){if(typeof s=="function"&&(i=s,s=null),Cs.util.isNodejs&&!Cs.options.usePureJavaScript&&Fo.pbkdf2&&(s===null||typeof s!="object")&&(Fo.pbkdf2Sync.length>4||!s||s==="sha1"))return typeof s!="string"&&(s="sha1"),r=Buffer.from(r,"binary"),e=Buffer.from(e,"binary"),i?Fo.pbkdf2Sync.length===4?Fo.pbkdf2(r,e,t,n,function(b,A){if(b)return i(b);i(null,A.toString("binary"))}):Fo.pbkdf2(r,e,t,n,s,function(b,A){if(b)return i(b);i(null,A.toString("binary"))}):Fo.pbkdf2Sync.length===4?Fo.pbkdf2Sync(r,e,t,n).toString("binary"):Fo.pbkdf2Sync(r,e,t,n,s).toString("binary");if((typeof s>"u"||s===null)&&(s="sha1"),typeof s=="string"){if(!(s in Cs.md.algorithms))throw new Error("Unknown hash algorithm: "+s);s=Cs.md[s].create()}var a=s.digestLength;if(n>4294967295*a){var u=new Error("Derived key is too long.");if(i)return i(u);throw u}var c=Math.ceil(n/a),l=n-(c-1)*a,h=Cs.hmac.create();h.start(s,r);var m="",g,y,v;if(!i){for(var E=1;E<=c;++E){h.start(null,null),h.update(e),h.update(Cs.util.int32ToBytes(E)),g=v=h.digest().getBytes();for(var w=2;w<=t;++w)h.start(null,null),h.update(v),y=h.digest().getBytes(),g=Cs.util.xorBytes(g,y,a),v=y;m+=E<c?g:g.substr(0,l)}return m}var E=1,w;function C(){if(E>c)return i(null,m);h.start(null,null),h.update(e),h.update(Cs.util.int32ToBytes(E)),g=v=h.digest().getBytes(),w=2,_()}o(C,"outer");function _(){if(w<=t)return h.start(null,null),h.update(v),y=h.digest().getBytes(),g=Cs.util.xorBytes(g,y,a),v=y,++w,Cs.util.setImmediate(_);m+=E<c?g:g.substr(0,l),++E,C()}o(_,"inner"),C()}});var rT=te((lye,n4)=>{"use strict";var Ka=zt();Ma();pr();var e4=n4.exports=Ka.sha256=Ka.sha256||{};Ka.md.sha256=Ka.md.algorithms.sha256=e4;e4.create=function(){t4||kQ();var r=null,e=Ka.util.createBuffer(),t=new Array(64),n={algorithm:"sha256",blockLength:64,digestLength:32,messageLength:0,fullMessageLength:null,messageLengthSize:8};return n.start=function(){n.messageLength=0,n.fullMessageLength=n.messageLength64=[];for(var s=n.messageLengthSize/4,i=0;i<s;++i)n.fullMessageLength.push(0);return e=Ka.util.createBuffer(),r={h0:1779033703,h1:3144134277,h2:1013904242,h3:2773480762,h4:1359893119,h5:2600822924,h6:528734635,h7:1541459225},n},n.start(),n.update=function(s,i){i==="utf8"&&(s=Ka.util.encodeUtf8(s));var a=s.length;n.messageLength+=a,a=[a/4294967296>>>0,a>>>0];for(var u=n.fullMessageLength.length-1;u>=0;--u)n.fullMessageLength[u]+=a[1],a[1]=a[0]+(n.fullMessageLength[u]/4294967296>>>0),n.fullMessageLength[u]=n.fullMessageLength[u]>>>0,a[0]=a[1]/4294967296>>>0;return e.putBytes(s),Zk(r,t,e),(e.read>2048||e.length()===0)&&e.compact(),n},n.digest=function(){var s=Ka.util.createBuffer();s.putBytes(e.bytes());var i=n.fullMessageLength[n.fullMessageLength.length-1]+n.messageLengthSize,a=i&n.blockLength-1;s.putBytes(tT.substr(0,n.blockLength-a));for(var u,c,l=n.fullMessageLength[0]*8,h=0;h<n.fullMessageLength.length-1;++h)u=n.fullMessageLength[h+1]*8,c=u/4294967296>>>0,l+=c,s.putInt32(l>>>0),l=u>>>0;s.putInt32(l);var m={h0:r.h0,h1:r.h1,h2:r.h2,h3:r.h3,h4:r.h4,h5:r.h5,h6:r.h6,h7:r.h7};Zk(m,t,s);var g=Ka.util.createBuffer();return g.putInt32(m.h0),g.putInt32(m.h1),g.putInt32(m.h2),g.putInt32(m.h3),g.putInt32(m.h4),g.putInt32(m.h5),g.putInt32(m.h6),g.putInt32(m.h7),g},n};var tT=null,t4=!1,r4=null;function kQ(){tT="\x80",tT+=Ka.util.fillString("\0",64),r4=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],t4=!0}o(kQ,"_init");function Zk(r,e,t){for(var n,s,i,a,u,c,l,h,m,g,y,v,E,w,C,_=t.length();_>=64;){for(l=0;l<16;++l)e[l]=t.getInt32();for(;l<64;++l)n=e[l-2],n=(n>>>17|n<<15)^(n>>>19|n<<13)^n>>>10,s=e[l-15],s=(s>>>7|s<<25)^(s>>>18|s<<14)^s>>>3,e[l]=n+e[l-7]+s+e[l-16]|0;for(h=r.h0,m=r.h1,g=r.h2,y=r.h3,v=r.h4,E=r.h5,w=r.h6,C=r.h7,l=0;l<64;++l)a=(v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7),u=w^v&(E^w),i=(h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10),c=h&m|g&(h^m),n=C+a+u+r4[l]+e[l],s=i+c,C=w,w=E,E=v,v=y+n>>>0,y=g,g=m,m=h,h=n+s>>>0;r.h0=r.h0+h|0,r.h1=r.h1+m|0,r.h2=r.h2+g|0,r.h3=r.h3+y|0,r.h4=r.h4+v|0,r.h5=r.h5+E|0,r.h6=r.h6+w|0,r.h7=r.h7+C|0,_-=64}}o(Zk,"_update")});var nT=te((hye,s4)=>{"use strict";var $a=zt();pr();var fE=null;$a.util.isNodejs&&!$a.options.usePureJavaScript&&!process.versions["node-webkit"]&&(fE=Ge("crypto"));var LQ=s4.exports=$a.prng=$a.prng||{};LQ.create=function(r){for(var e={plugin:r,key:null,seed:null,time:null,reseeds:0,generated:0,keyBytes:""},t=r.md,n=new Array(32),s=0;s<32;++s)n[s]=t.create();e.pools=n,e.pool=0,e.generate=function(l,h){if(!h)return e.generateSync(l);var m=e.plugin.cipher,g=e.plugin.increment,y=e.plugin.formatKey,v=e.plugin.formatSeed,E=$a.util.createBuffer();e.key=null,w();function w(C){if(C)return h(C);if(E.length()>=l)return h(null,E.getBytes(l));if(e.generated>1048575&&(e.key=null),e.key===null)return $a.util.nextTick(function(){i(w)});var _=m(e.key,e.seed);e.generated+=_.length,E.putBytes(_),e.key=y(m(e.key,g(e.seed))),e.seed=v(m(e.key,e.seed)),$a.util.setImmediate(w)}o(w,"generate")},e.generateSync=function(l){var h=e.plugin.cipher,m=e.plugin.increment,g=e.plugin.formatKey,y=e.plugin.formatSeed;e.key=null;for(var v=$a.util.createBuffer();v.length()<l;){e.generated>1048575&&(e.key=null),e.key===null&&a();var E=h(e.key,e.seed);e.generated+=E.length,v.putBytes(E),e.key=g(h(e.key,m(e.seed))),e.seed=y(h(e.key,e.seed))}return v.getBytes(l)};function i(l){if(e.pools[0].messageLength>=32)return u(),l();var h=32-e.pools[0].messageLength<<5;e.seedFile(h,function(m,g){if(m)return l(m);e.collect(g),u(),l()})}o(i,"_reseed");function a(){if(e.pools[0].messageLength>=32)return u();var l=32-e.pools[0].messageLength<<5;e.collect(e.seedFileSync(l)),u()}o(a,"_reseedSync");function u(){e.reseeds=e.reseeds===4294967295?0:e.reseeds+1;var l=e.plugin.md.create();l.update(e.keyBytes);for(var h=1,m=0;m<32;++m)e.reseeds%h===0&&(l.update(e.pools[m].digest().getBytes()),e.pools[m].start()),h=h<<1;e.keyBytes=l.digest().getBytes(),l.start(),l.update(e.keyBytes);var g=l.digest().getBytes();e.key=e.plugin.formatKey(e.keyBytes),e.seed=e.plugin.formatSeed(g),e.generated=0}o(u,"_seed");function c(l){var h=null,m=$a.util.globalScope,g=m.crypto||m.msCrypto;g&&g.getRandomValues&&(h=o(function(T){return g.getRandomValues(T)},"getRandomValues"));var y=$a.util.createBuffer();if(h)for(;y.length()<l;){var v=Math.max(1,Math.min(l-y.length(),65536)/4),E=new Uint32Array(Math.floor(v));try{h(E);for(var w=0;w<E.length;++w)y.putInt32(E[w])}catch(T){if(!(typeof QuotaExceededError<"u"&&T instanceof QuotaExceededError))throw T}}if(y.length()<l)for(var C,_,b,A=Math.floor(Math.random()*65536);y.length()<l;){_=16807*(A&65535),C=16807*(A>>16),_+=(C&32767)<<16,_+=C>>15,_=(_&2147483647)+(_>>31),A=_&4294967295;for(var w=0;w<3;++w)b=A>>>(w<<3),b^=Math.floor(Math.random()*256),y.putByte(b&255)}return y.getBytes(l)}return o(c,"defaultSeedFile"),fE?(e.seedFile=function(l,h){fE.randomBytes(l,function(m,g){if(m)return h(m);h(null,g.toString())})},e.seedFileSync=function(l){return fE.randomBytes(l).toString()}):(e.seedFile=function(l,h){try{h(null,c(l))}catch(m){h(m)}},e.seedFileSync=c),e.collect=function(l){for(var h=l.length,m=0;m<h;++m)e.pools[e.pool].update(l.substr(m,1)),e.pool=e.pool===31?0:e.pool+1},e.collectInt=function(l,h){for(var m="",g=0;g<h;g+=8)m+=String.fromCharCode(l>>g&255);e.collect(m)},e.registerWorker=function(l){if(l===self)e.seedFile=function(m,g){function y(v){var E=v.data;E.forge&&E.forge.prng&&(self.removeEventListener("message",y),g(E.forge.prng.err,E.forge.prng.bytes))}o(y,"listener"),self.addEventListener("message",y),self.postMessage({forge:{prng:{needed:m}}})};else{var h=o(function(m){var g=m.data;g.forge&&g.forge.prng&&e.seedFile(g.forge.prng.needed,function(y,v){l.postMessage({forge:{prng:{err:y,bytes:v}}})})},"listener");l.addEventListener("message",h)}},e}});var Ri=te((dye,sT)=>{"use strict";var Vn=zt();Xu();rT();nT();pr();(function(){if(Vn.random&&Vn.random.getBytes){sT.exports=Vn.random;return}(function(r){var e={},t=new Array(4),n=Vn.util.createBuffer();e.formatKey=function(m){var g=Vn.util.createBuffer(m);return m=new Array(4),m[0]=g.getInt32(),m[1]=g.getInt32(),m[2]=g.getInt32(),m[3]=g.getInt32(),Vn.aes._expandKey(m,!1)},e.formatSeed=function(m){var g=Vn.util.createBuffer(m);return m=new Array(4),m[0]=g.getInt32(),m[1]=g.getInt32(),m[2]=g.getInt32(),m[3]=g.getInt32(),m},e.cipher=function(m,g){return Vn.aes._updateBlock(m,g,t,!1),n.putInt32(t[0]),n.putInt32(t[1]),n.putInt32(t[2]),n.putInt32(t[3]),n.getBytes()},e.increment=function(m){return++m[3],m},e.md=Vn.md.sha256;function s(){var m=Vn.prng.create(e);return m.getBytes=function(g,y){return m.generate(g,y)},m.getBytesSync=function(g){return m.generate(g)},m}o(s,"spawnPrng");var i=s(),a=null,u=Vn.util.globalScope,c=u.crypto||u.msCrypto;if(c&&c.getRandomValues&&(a=o(function(m){return c.getRandomValues(m)},"getRandomValues")),Vn.options.usePureJavaScript||!Vn.util.isNodejs&&!a){if(typeof window>"u"||window.document,i.collectInt(+new Date,32),typeof navigator<"u"){var l="";for(var h in navigator)try{typeof navigator[h]=="string"&&(l+=navigator[h])}catch{}i.collect(l),l=null}r&&(r().mousemove(function(m){i.collectInt(m.clientX,16),i.collectInt(m.clientY,16)}),r().keypress(function(m){i.collectInt(m.charCode,8)}))}if(!Vn.random)Vn.random=i;else for(var h in i)Vn.random[h]=i[h];Vn.random.createInstance=s,sT.exports=Vn.random})(typeof jQuery<"u"?jQuery:null)})()});var aT=te((gye,o4)=>{"use strict";var Vs=zt();pr();var iT=[217,120,249,196,25,221,181,237,40,233,253,121,74,160,216,157,198,126,55,131,43,118,83,142,98,76,100,136,68,139,251,162,23,154,89,245,135,179,79,19,97,69,109,141,9,129,125,50,189,143,64,235,134,183,123,11,240,149,33,34,92,107,78,130,84,214,101,147,206,96,178,28,115,86,192,20,167,140,241,220,18,117,202,31,59,190,228,209,66,61,212,48,163,60,182,38,111,191,14,218,70,105,7,87,39,242,29,155,188,148,67,3,248,17,199,246,144,239,62,231,6,195,213,47,200,102,30,215,8,232,234,222,128,82,238,247,132,170,114,172,53,77,106,42,150,26,210,113,90,21,73,116,75,159,208,94,4,24,164,236,194,224,65,110,15,81,203,204,36,145,175,80,161,244,112,57,153,124,58,133,35,184,180,122,252,2,54,91,37,85,151,49,45,93,250,152,227,138,146,174,5,223,41,16,103,108,186,201,211,0,230,207,225,158,168,44,99,22,1,63,88,226,137,169,13,56,52,27,171,51,255,176,187,72,12,95,185,177,205,46,197,243,219,71,229,165,156,119,10,166,32,104,254,127,193,173],i4=[1,2,3,5],VQ=o(function(r,e){return r<<e&65535|(r&65535)>>16-e},"rol"),UQ=o(function(r,e){return(r&65535)>>e|r<<16-e&65535},"ror");o4.exports=Vs.rc2=Vs.rc2||{};Vs.rc2.expandKey=function(r,e){typeof r=="string"&&(r=Vs.util.createBuffer(r)),e=e||128;var t=r,n=r.length(),s=e,i=Math.ceil(s/8),a=255>>(s&7),u;for(u=n;u<128;u++)t.putByte(iT[t.at(u-1)+t.at(u-n)&255]);for(t.setAt(128-i,iT[t.at(128-i)&a]),u=127-i;u>=0;u--)t.setAt(u,iT[t.at(u+1)^t.at(u+i)]);return t};var a4=o(function(r,e,t){var n=!1,s=null,i=null,a=null,u,c,l,h,m=[];for(r=Vs.rc2.expandKey(r,e),l=0;l<64;l++)m.push(r.getInt16Le());t?(u=o(function(v){for(l=0;l<4;l++)v[l]+=m[h]+(v[(l+3)%4]&v[(l+2)%4])+(~v[(l+3)%4]&v[(l+1)%4]),v[l]=VQ(v[l],i4[l]),h++},"mixRound"),c=o(function(v){for(l=0;l<4;l++)v[l]+=m[v[(l+3)%4]&63]},"mashRound")):(u=o(function(v){for(l=3;l>=0;l--)v[l]=UQ(v[l],i4[l]),v[l]-=m[h]+(v[(l+3)%4]&v[(l+2)%4])+(~v[(l+3)%4]&v[(l+1)%4]),h--},"mixRound"),c=o(function(v){for(l=3;l>=0;l--)v[l]-=m[v[(l+3)%4]&63]},"mashRound"));var g=o(function(v){var E=[];for(l=0;l<4;l++){var w=s.getInt16Le();a!==null&&(t?w^=a.getInt16Le():a.putInt16Le(w)),E.push(w&65535)}h=t?0:63;for(var C=0;C<v.length;C++)for(var _=0;_<v[C][0];_++)v[C][1](E);for(l=0;l<4;l++)a!==null&&(t?a.putInt16Le(E[l]):E[l]^=a.getInt16Le()),i.putInt16Le(E[l])},"runPlan"),y=null;return y={start:o(function(v,E){v&&typeof v=="string"&&(v=Vs.util.createBuffer(v)),n=!1,s=Vs.util.createBuffer(),i=E||new Vs.util.createBuffer,a=v,y.output=i},"start"),update:o(function(v){for(n||s.putBuffer(v);s.length()>=8;)g([[5,u],[1,c],[6,u],[1,c],[5,u]])},"update"),finish:o(function(v){var E=!0;if(t)if(v)E=v(8,s,!t);else{var w=s.length()===8?8:8-s.length();s.fillWithByte(w,w)}if(E&&(n=!0,y.update()),!t&&(E=s.length()===0,E))if(v)E=v(8,i,!t);else{var C=i.length(),_=i.at(C-1);_>C?E=!1:i.truncate(_)}return E},"finish")},y},"createCipher");Vs.rc2.startEncrypting=function(r,e,t){var n=Vs.rc2.createEncryptionCipher(r,128);return n.start(e,t),n};Vs.rc2.createEncryptionCipher=function(r,e){return a4(r,e,!0)};Vs.rc2.startDecrypting=function(r,e,t){var n=Vs.rc2.createDecryptionCipher(r,128);return n.start(e,t),n};Vs.rc2.createDecryptionCipher=function(r,e){return a4(r,e,!1)}});var Bg=te((yye,m4)=>{"use strict";var oT=zt();m4.exports=oT.jsbn=oT.jsbn||{};var Mo,jQ=0xdeadbeefcafe,u4=(jQ&16777215)==15715070;function Ue(r,e,t){this.data=[],r!=null&&(typeof r=="number"?this.fromNumber(r,e,t):e==null&&typeof r!="string"?this.fromString(r,256):this.fromString(r,e))}o(Ue,"BigInteger");oT.jsbn.BigInteger=Ue;function dr(){return new Ue(null)}o(dr,"nbi");function FQ(r,e,t,n,s,i){for(;--i>=0;){var a=e*this.data[r++]+t.data[n]+s;s=Math.floor(a/67108864),t.data[n++]=a&67108863}return s}o(FQ,"am1");function MQ(r,e,t,n,s,i){for(var a=e&32767,u=e>>15;--i>=0;){var c=this.data[r]&32767,l=this.data[r++]>>15,h=u*c+l*a;c=a*c+((h&32767)<<15)+t.data[n]+(s&1073741823),s=(c>>>30)+(h>>>15)+u*l+(s>>>30),t.data[n++]=c&1073741823}return s}o(MQ,"am2");function c4(r,e,t,n,s,i){for(var a=e&16383,u=e>>14;--i>=0;){var c=this.data[r]&16383,l=this.data[r++]>>14,h=u*c+l*a;c=a*c+((h&16383)<<14)+t.data[n]+s,s=(c>>28)+(h>>14)+u*l,t.data[n++]=c&268435455}return s}o(c4,"am3");typeof navigator>"u"?(Ue.prototype.am=c4,Mo=28):u4&&navigator.appName=="Microsoft Internet Explorer"?(Ue.prototype.am=MQ,Mo=30):u4&&navigator.appName!="Netscape"?(Ue.prototype.am=FQ,Mo=26):(Ue.prototype.am=c4,Mo=28);Ue.prototype.DB=Mo;Ue.prototype.DM=(1<<Mo)-1;Ue.prototype.DV=1<<Mo;var uT=52;Ue.prototype.FV=Math.pow(2,uT);Ue.prototype.F1=uT-Mo;Ue.prototype.F2=2*Mo-uT;var qQ="0123456789abcdefghijklmnopqrstuvwxyz",hE=new Array,Pp,Oi;Pp=48;for(Oi=0;Oi<=9;++Oi)hE[Pp++]=Oi;Pp=97;for(Oi=10;Oi<36;++Oi)hE[Pp++]=Oi;Pp=65;for(Oi=10;Oi<36;++Oi)hE[Pp++]=Oi;function l4(r){return qQ.charAt(r)}o(l4,"int2char");function f4(r,e){var t=hE[r.charCodeAt(e)];return t??-1}o(f4,"intAt");function HQ(r){for(var e=this.t-1;e>=0;--e)r.data[e]=this.data[e];r.t=this.t,r.s=this.s}o(HQ,"bnpCopyTo");function KQ(r){this.t=1,this.s=r<0?-1:0,r>0?this.data[0]=r:r<-1?this.data[0]=r+this.DV:this.t=0}o(KQ,"bnpFromInt");function zu(r){var e=dr();return e.fromInt(r),e}o(zu,"nbv");function $Q(r,e){var t;if(e==16)t=4;else if(e==8)t=3;else if(e==256)t=8;else if(e==2)t=1;else if(e==32)t=5;else if(e==4)t=2;else{this.fromRadix(r,e);return}this.t=0,this.s=0;for(var n=r.length,s=!1,i=0;--n>=0;){var a=t==8?r[n]&255:f4(r,n);if(a<0){r.charAt(n)=="-"&&(s=!0);continue}s=!1,i==0?this.data[this.t++]=a:i+t>this.DB?(this.data[this.t-1]|=(a&(1<<this.DB-i)-1)<<i,this.data[this.t++]=a>>this.DB-i):this.data[this.t-1]|=a<<i,i+=t,i>=this.DB&&(i-=this.DB)}t==8&&(r[0]&128)!=0&&(this.s=-1,i>0&&(this.data[this.t-1]|=(1<<this.DB-i)-1<<i)),this.clamp(),s&&Ue.ZERO.subTo(this,this)}o($Q,"bnpFromString");function GQ(){for(var r=this.s&this.DM;this.t>0&&this.data[this.t-1]==r;)--this.t}o(GQ,"bnpClamp");function XQ(r){if(this.s<0)return"-"+this.negate().toString(r);var e;if(r==16)e=4;else if(r==8)e=3;else if(r==2)e=1;else if(r==32)e=5;else if(r==4)e=2;else return this.toRadix(r);var t=(1<<e)-1,n,s=!1,i="",a=this.t,u=this.DB-a*this.DB%e;if(a-- >0)for(u<this.DB&&(n=this.data[a]>>u)>0&&(s=!0,i=l4(n));a>=0;)u<e?(n=(this.data[a]&(1<<u)-1)<<e-u,n|=this.data[--a]>>(u+=this.DB-e)):(n=this.data[a]>>(u-=e)&t,u<=0&&(u+=this.DB,--a)),n>0&&(s=!0),s&&(i+=l4(n));return s?i:"0"}o(XQ,"bnToString");function WQ(){var r=dr();return Ue.ZERO.subTo(this,r),r}o(WQ,"bnNegate");function zQ(){return this.s<0?this.negate():this}o(zQ,"bnAbs");function JQ(r){var e=this.s-r.s;if(e!=0)return e;var t=this.t;if(e=t-r.t,e!=0)return this.s<0?-e:e;for(;--t>=0;)if((e=this.data[t]-r.data[t])!=0)return e;return 0}o(JQ,"bnCompareTo");function pE(r){var e=1,t;return(t=r>>>16)!=0&&(r=t,e+=16),(t=r>>8)!=0&&(r=t,e+=8),(t=r>>4)!=0&&(r=t,e+=4),(t=r>>2)!=0&&(r=t,e+=2),(t=r>>1)!=0&&(r=t,e+=1),e}o(pE,"nbits");function YQ(){return this.t<=0?0:this.DB*(this.t-1)+pE(this.data[this.t-1]^this.s&this.DM)}o(YQ,"bnBitLength");function QQ(r,e){var t;for(t=this.t-1;t>=0;--t)e.data[t+r]=this.data[t];for(t=r-1;t>=0;--t)e.data[t]=0;e.t=this.t+r,e.s=this.s}o(QQ,"bnpDLShiftTo");function ZQ(r,e){for(var t=r;t<this.t;++t)e.data[t-r]=this.data[t];e.t=Math.max(this.t-r,0),e.s=this.s}o(ZQ,"bnpDRShiftTo");function eZ(r,e){var t=r%this.DB,n=this.DB-t,s=(1<<n)-1,i=Math.floor(r/this.DB),a=this.s<<t&this.DM,u;for(u=this.t-1;u>=0;--u)e.data[u+i+1]=this.data[u]>>n|a,a=(this.data[u]&s)<<t;for(u=i-1;u>=0;--u)e.data[u]=0;e.data[i]=a,e.t=this.t+i+1,e.s=this.s,e.clamp()}o(eZ,"bnpLShiftTo");function tZ(r,e){e.s=this.s;var t=Math.floor(r/this.DB);if(t>=this.t){e.t=0;return}var n=r%this.DB,s=this.DB-n,i=(1<<n)-1;e.data[0]=this.data[t]>>n;for(var a=t+1;a<this.t;++a)e.data[a-t-1]|=(this.data[a]&i)<<s,e.data[a-t]=this.data[a]>>n;n>0&&(e.data[this.t-t-1]|=(this.s&i)<<s),e.t=this.t-t,e.clamp()}o(tZ,"bnpRShiftTo");function rZ(r,e){for(var t=0,n=0,s=Math.min(r.t,this.t);t<s;)n+=this.data[t]-r.data[t],e.data[t++]=n&this.DM,n>>=this.DB;if(r.t<this.t){for(n-=r.s;t<this.t;)n+=this.data[t],e.data[t++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;t<r.t;)n-=r.data[t],e.data[t++]=n&this.DM,n>>=this.DB;n-=r.s}e.s=n<0?-1:0,n<-1?e.data[t++]=this.DV+n:n>0&&(e.data[t++]=n),e.t=t,e.clamp()}o(rZ,"bnpSubTo");function nZ(r,e){var t=this.abs(),n=r.abs(),s=t.t;for(e.t=s+n.t;--s>=0;)e.data[s]=0;for(s=0;s<n.t;++s)e.data[s+t.t]=t.am(0,n.data[s],e,s,0,t.t);e.s=0,e.clamp(),this.s!=r.s&&Ue.ZERO.subTo(e,e)}o(nZ,"bnpMultiplyTo");function sZ(r){for(var e=this.abs(),t=r.t=2*e.t;--t>=0;)r.data[t]=0;for(t=0;t<e.t-1;++t){var n=e.am(t,e.data[t],r,2*t,0,1);(r.data[t+e.t]+=e.am(t+1,2*e.data[t],r,2*t+1,n,e.t-t-1))>=e.DV&&(r.data[t+e.t]-=e.DV,r.data[t+e.t+1]=1)}r.t>0&&(r.data[r.t-1]+=e.am(t,e.data[t],r,2*t,0,1)),r.s=0,r.clamp()}o(sZ,"bnpSquareTo");function iZ(r,e,t){var n=r.abs();if(!(n.t<=0)){var s=this.abs();if(s.t<n.t){e?.fromInt(0),t!=null&&this.copyTo(t);return}t==null&&(t=dr());var i=dr(),a=this.s,u=r.s,c=this.DB-pE(n.data[n.t-1]);c>0?(n.lShiftTo(c,i),s.lShiftTo(c,t)):(n.copyTo(i),s.copyTo(t));var l=i.t,h=i.data[l-1];if(h!=0){var m=h*(1<<this.F1)+(l>1?i.data[l-2]>>this.F2:0),g=this.FV/m,y=(1<<this.F1)/m,v=1<<this.F2,E=t.t,w=E-l,C=e??dr();for(i.dlShiftTo(w,C),t.compareTo(C)>=0&&(t.data[t.t++]=1,t.subTo(C,t)),Ue.ONE.dlShiftTo(l,C),C.subTo(i,i);i.t<l;)i.data[i.t++]=0;for(;--w>=0;){var _=t.data[--E]==h?this.DM:Math.floor(t.data[E]*g+(t.data[E-1]+v)*y);if((t.data[E]+=i.am(0,_,t,w,0,l))<_)for(i.dlShiftTo(w,C),t.subTo(C,t);t.data[E]<--_;)t.subTo(C,t)}e!=null&&(t.drShiftTo(l,e),a!=u&&Ue.ZERO.subTo(e,e)),t.t=l,t.clamp(),c>0&&t.rShiftTo(c,t),a<0&&Ue.ZERO.subTo(t,t)}}}o(iZ,"bnpDivRemTo");function aZ(r){var e=dr();return this.abs().divRemTo(r,null,e),this.s<0&&e.compareTo(Ue.ZERO)>0&&r.subTo(e,e),e}o(aZ,"bnMod");function Jl(r){this.m=r}o(Jl,"Classic");function oZ(r){return r.s<0||r.compareTo(this.m)>=0?r.mod(this.m):r}o(oZ,"cConvert");function uZ(r){return r}o(uZ,"cRevert");function cZ(r){r.divRemTo(this.m,null,r)}o(cZ,"cReduce");function lZ(r,e,t){r.multiplyTo(e,t),this.reduce(t)}o(lZ,"cMulTo");function fZ(r,e){r.squareTo(e),this.reduce(e)}o(fZ,"cSqrTo");Jl.prototype.convert=oZ;Jl.prototype.revert=uZ;Jl.prototype.reduce=cZ;Jl.prototype.mulTo=lZ;Jl.prototype.sqrTo=fZ;function hZ(){if(this.t<1)return 0;var r=this.data[0];if((r&1)==0)return 0;var e=r&3;return e=e*(2-(r&15)*e)&15,e=e*(2-(r&255)*e)&255,e=e*(2-((r&65535)*e&65535))&65535,e=e*(2-r*e%this.DV)%this.DV,e>0?this.DV-e:-e}o(hZ,"bnpInvDigit");function Yl(r){this.m=r,this.mp=r.invDigit(),this.mpl=this.mp&32767,this.mph=this.mp>>15,this.um=(1<<r.DB-15)-1,this.mt2=2*r.t}o(Yl,"Montgomery");function pZ(r){var e=dr();return r.abs().dlShiftTo(this.m.t,e),e.divRemTo(this.m,null,e),r.s<0&&e.compareTo(Ue.ZERO)>0&&this.m.subTo(e,e),e}o(pZ,"montConvert");function dZ(r){var e=dr();return r.copyTo(e),this.reduce(e),e}o(dZ,"montRevert");function mZ(r){for(;r.t<=this.mt2;)r.data[r.t++]=0;for(var e=0;e<this.m.t;++e){var t=r.data[e]&32767,n=t*this.mpl+((t*this.mph+(r.data[e]>>15)*this.mpl&this.um)<<15)&r.DM;for(t=e+this.m.t,r.data[t]+=this.m.am(0,n,r,e,0,this.m.t);r.data[t]>=r.DV;)r.data[t]-=r.DV,r.data[++t]++}r.clamp(),r.drShiftTo(this.m.t,r),r.compareTo(this.m)>=0&&r.subTo(this.m,r)}o(mZ,"montReduce");function gZ(r,e){r.squareTo(e),this.reduce(e)}o(gZ,"montSqrTo");function vZ(r,e,t){r.multiplyTo(e,t),this.reduce(t)}o(vZ,"montMulTo");Yl.prototype.convert=pZ;Yl.prototype.revert=dZ;Yl.prototype.reduce=mZ;Yl.prototype.mulTo=vZ;Yl.prototype.sqrTo=gZ;function yZ(){return(this.t>0?this.data[0]&1:this.s)==0}o(yZ,"bnpIsEven");function xZ(r,e){if(r>4294967295||r<1)return Ue.ONE;var t=dr(),n=dr(),s=e.convert(this),i=pE(r)-1;for(s.copyTo(t);--i>=0;)if(e.sqrTo(t,n),(r&1<<i)>0)e.mulTo(n,s,t);else{var a=t;t=n,n=a}return e.revert(t)}o(xZ,"bnpExp");function wZ(r,e){var t;return r<256||e.isEven()?t=new Jl(e):t=new Yl(e),this.exp(r,t)}o(wZ,"bnModPowInt");Ue.prototype.copyTo=HQ;Ue.prototype.fromInt=KQ;Ue.prototype.fromString=$Q;Ue.prototype.clamp=GQ;Ue.prototype.dlShiftTo=QQ;Ue.prototype.drShiftTo=ZQ;Ue.prototype.lShiftTo=eZ;Ue.prototype.rShiftTo=tZ;Ue.prototype.subTo=rZ;Ue.prototype.multiplyTo=nZ;Ue.prototype.squareTo=sZ;Ue.prototype.divRemTo=iZ;Ue.prototype.invDigit=hZ;Ue.prototype.isEven=yZ;Ue.prototype.exp=xZ;Ue.prototype.toString=XQ;Ue.prototype.negate=WQ;Ue.prototype.abs=zQ;Ue.prototype.compareTo=JQ;Ue.prototype.bitLength=YQ;Ue.prototype.mod=aZ;Ue.prototype.modPowInt=wZ;Ue.ZERO=zu(0);Ue.ONE=zu(1);function EZ(){var r=dr();return this.copyTo(r),r}o(EZ,"bnClone");function SZ(){if(this.s<0){if(this.t==1)return this.data[0]-this.DV;if(this.t==0)return-1}else{if(this.t==1)return this.data[0];if(this.t==0)return 0}return(this.data[1]&(1<<32-this.DB)-1)<<this.DB|this.data[0]}o(SZ,"bnIntValue");function bZ(){return this.t==0?this.s:this.data[0]<<24>>24}o(bZ,"bnByteValue");function AZ(){return this.t==0?this.s:this.data[0]<<16>>16}o(AZ,"bnShortValue");function CZ(r){return Math.floor(Math.LN2*this.DB/Math.log(r))}o(CZ,"bnpChunkSize");function NZ(){return this.s<0?-1:this.t<=0||this.t==1&&this.data[0]<=0?0:1}o(NZ,"bnSigNum");function TZ(r){if(r==null&&(r=10),this.signum()==0||r<2||r>36)return"0";var e=this.chunkSize(r),t=Math.pow(r,e),n=zu(t),s=dr(),i=dr(),a="";for(this.divRemTo(n,s,i);s.signum()>0;)a=(t+i.intValue()).toString(r).substr(1)+a,s.divRemTo(n,s,i);return i.intValue().toString(r)+a}o(TZ,"bnpToRadix");function IZ(r,e){this.fromInt(0),e==null&&(e=10);for(var t=this.chunkSize(e),n=Math.pow(e,t),s=!1,i=0,a=0,u=0;u<r.length;++u){var c=f4(r,u);if(c<0){r.charAt(u)=="-"&&this.signum()==0&&(s=!0);continue}a=e*a+c,++i>=t&&(this.dMultiply(n),this.dAddOffset(a,0),i=0,a=0)}i>0&&(this.dMultiply(Math.pow(e,i)),this.dAddOffset(a,0)),s&&Ue.ZERO.subTo(this,this)}o(IZ,"bnpFromRadix");function _Z(r,e,t){if(typeof e=="number")if(r<2)this.fromInt(1);else for(this.fromNumber(r,t),this.testBit(r-1)||this.bitwiseTo(Ue.ONE.shiftLeft(r-1),cT,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(e);)this.dAddOffset(2,0),this.bitLength()>r&&this.subTo(Ue.ONE.shiftLeft(r-1),this);else{var n=new Array,s=r&7;n.length=(r>>3)+1,e.nextBytes(n),s>0?n[0]&=(1<<s)-1:n[0]=0,this.fromString(n,256)}}o(_Z,"bnpFromNumber");function DZ(){var r=this.t,e=new Array;e[0]=this.s;var t=this.DB-r*this.DB%8,n,s=0;if(r-- >0)for(t<this.DB&&(n=this.data[r]>>t)!=(this.s&this.DM)>>t&&(e[s++]=n|this.s<<this.DB-t);r>=0;)t<8?(n=(this.data[r]&(1<<t)-1)<<8-t,n|=this.data[--r]>>(t+=this.DB-8)):(n=this.data[r]>>(t-=8)&255,t<=0&&(t+=this.DB,--r)),(n&128)!=0&&(n|=-256),s==0&&(this.s&128)!=(n&128)&&++s,(s>0||n!=this.s)&&(e[s++]=n);return e}o(DZ,"bnToByteArray");function BZ(r){return this.compareTo(r)==0}o(BZ,"bnEquals");function RZ(r){return this.compareTo(r)<0?this:r}o(RZ,"bnMin");function OZ(r){return this.compareTo(r)>0?this:r}o(OZ,"bnMax");function PZ(r,e,t){var n,s,i=Math.min(r.t,this.t);for(n=0;n<i;++n)t.data[n]=e(this.data[n],r.data[n]);if(r.t<this.t){for(s=r.s&this.DM,n=i;n<this.t;++n)t.data[n]=e(this.data[n],s);t.t=this.t}else{for(s=this.s&this.DM,n=i;n<r.t;++n)t.data[n]=e(s,r.data[n]);t.t=r.t}t.s=e(this.s,r.s),t.clamp()}o(PZ,"bnpBitwiseTo");function kZ(r,e){return r&e}o(kZ,"op_and");function LZ(r){var e=dr();return this.bitwiseTo(r,kZ,e),e}o(LZ,"bnAnd");function cT(r,e){return r|e}o(cT,"op_or");function VZ(r){var e=dr();return this.bitwiseTo(r,cT,e),e}o(VZ,"bnOr");function h4(r,e){return r^e}o(h4,"op_xor");function UZ(r){var e=dr();return this.bitwiseTo(r,h4,e),e}o(UZ,"bnXor");function p4(r,e){return r&~e}o(p4,"op_andnot");function jZ(r){var e=dr();return this.bitwiseTo(r,p4,e),e}o(jZ,"bnAndNot");function FZ(){for(var r=dr(),e=0;e<this.t;++e)r.data[e]=this.DM&~this.data[e];return r.t=this.t,r.s=~this.s,r}o(FZ,"bnNot");function MZ(r){var e=dr();return r<0?this.rShiftTo(-r,e):this.lShiftTo(r,e),e}o(MZ,"bnShiftLeft");function qZ(r){var e=dr();return r<0?this.lShiftTo(-r,e):this.rShiftTo(r,e),e}o(qZ,"bnShiftRight");function HZ(r){if(r==0)return-1;var e=0;return(r&65535)==0&&(r>>=16,e+=16),(r&255)==0&&(r>>=8,e+=8),(r&15)==0&&(r>>=4,e+=4),(r&3)==0&&(r>>=2,e+=2),(r&1)==0&&++e,e}o(HZ,"lbit");function KZ(){for(var r=0;r<this.t;++r)if(this.data[r]!=0)return r*this.DB+HZ(this.data[r]);return this.s<0?this.t*this.DB:-1}o(KZ,"bnGetLowestSetBit");function $Z(r){for(var e=0;r!=0;)r&=r-1,++e;return e}o($Z,"cbit");function GZ(){for(var r=0,e=this.s&this.DM,t=0;t<this.t;++t)r+=$Z(this.data[t]^e);return r}o(GZ,"bnBitCount");function XZ(r){var e=Math.floor(r/this.DB);return e>=this.t?this.s!=0:(this.data[e]&1<<r%this.DB)!=0}o(XZ,"bnTestBit");function WZ(r,e){var t=Ue.ONE.shiftLeft(r);return this.bitwiseTo(t,e,t),t}o(WZ,"bnpChangeBit");function zZ(r){return this.changeBit(r,cT)}o(zZ,"bnSetBit");function JZ(r){return this.changeBit(r,p4)}o(JZ,"bnClearBit");function YZ(r){return this.changeBit(r,h4)}o(YZ,"bnFlipBit");function QZ(r,e){for(var t=0,n=0,s=Math.min(r.t,this.t);t<s;)n+=this.data[t]+r.data[t],e.data[t++]=n&this.DM,n>>=this.DB;if(r.t<this.t){for(n+=r.s;t<this.t;)n+=this.data[t],e.data[t++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;t<r.t;)n+=r.data[t],e.data[t++]=n&this.DM,n>>=this.DB;n+=r.s}e.s=n<0?-1:0,n>0?e.data[t++]=n:n<-1&&(e.data[t++]=this.DV+n),e.t=t,e.clamp()}o(QZ,"bnpAddTo");function ZZ(r){var e=dr();return this.addTo(r,e),e}o(ZZ,"bnAdd");function eee(r){var e=dr();return this.subTo(r,e),e}o(eee,"bnSubtract");function tee(r){var e=dr();return this.multiplyTo(r,e),e}o(tee,"bnMultiply");function ree(r){var e=dr();return this.divRemTo(r,e,null),e}o(ree,"bnDivide");function nee(r){var e=dr();return this.divRemTo(r,null,e),e}o(nee,"bnRemainder");function see(r){var e=dr(),t=dr();return this.divRemTo(r,e,t),new Array(e,t)}o(see,"bnDivideAndRemainder");function iee(r){this.data[this.t]=this.am(0,r-1,this,0,0,this.t),++this.t,this.clamp()}o(iee,"bnpDMultiply");function aee(r,e){if(r!=0){for(;this.t<=e;)this.data[this.t++]=0;for(this.data[e]+=r;this.data[e]>=this.DV;)this.data[e]-=this.DV,++e>=this.t&&(this.data[this.t++]=0),++this.data[e]}}o(aee,"bnpDAddOffset");function Dg(){}o(Dg,"NullExp");function d4(r){return r}o(d4,"nNop");function oee(r,e,t){r.multiplyTo(e,t)}o(oee,"nMulTo");function uee(r,e){r.squareTo(e)}o(uee,"nSqrTo");Dg.prototype.convert=d4;Dg.prototype.revert=d4;Dg.prototype.mulTo=oee;Dg.prototype.sqrTo=uee;function cee(r){return this.exp(r,new Dg)}o(cee,"bnPow");function lee(r,e,t){var n=Math.min(this.t+r.t,e);for(t.s=0,t.t=n;n>0;)t.data[--n]=0;var s;for(s=t.t-this.t;n<s;++n)t.data[n+this.t]=this.am(0,r.data[n],t,n,0,this.t);for(s=Math.min(r.t,e);n<s;++n)this.am(0,r.data[n],t,n,0,e-n);t.clamp()}o(lee,"bnpMultiplyLowerTo");function fee(r,e,t){--e;var n=t.t=this.t+r.t-e;for(t.s=0;--n>=0;)t.data[n]=0;for(n=Math.max(e-this.t,0);n<r.t;++n)t.data[this.t+n-e]=this.am(e-n,r.data[n],t,0,0,this.t+n-e);t.clamp(),t.drShiftTo(1,t)}o(fee,"bnpMultiplyUpperTo");function kp(r){this.r2=dr(),this.q3=dr(),Ue.ONE.dlShiftTo(2*r.t,this.r2),this.mu=this.r2.divide(r),this.m=r}o(kp,"Barrett");function hee(r){if(r.s<0||r.t>2*this.m.t)return r.mod(this.m);if(r.compareTo(this.m)<0)return r;var e=dr();return r.copyTo(e),this.reduce(e),e}o(hee,"barrettConvert");function pee(r){return r}o(pee,"barrettRevert");function dee(r){for(r.drShiftTo(this.m.t-1,this.r2),r.t>this.m.t+1&&(r.t=this.m.t+1,r.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);r.compareTo(this.r2)<0;)r.dAddOffset(1,this.m.t+1);for(r.subTo(this.r2,r);r.compareTo(this.m)>=0;)r.subTo(this.m,r)}o(dee,"barrettReduce");function mee(r,e){r.squareTo(e),this.reduce(e)}o(mee,"barrettSqrTo");function gee(r,e,t){r.multiplyTo(e,t),this.reduce(t)}o(gee,"barrettMulTo");kp.prototype.convert=hee;kp.prototype.revert=pee;kp.prototype.reduce=dee;kp.prototype.mulTo=gee;kp.prototype.sqrTo=mee;function vee(r,e){var t=r.bitLength(),n,s=zu(1),i;if(t<=0)return s;t<18?n=1:t<48?n=3:t<144?n=4:t<768?n=5:n=6,t<8?i=new Jl(e):e.isEven()?i=new kp(e):i=new Yl(e);var a=new Array,u=3,c=n-1,l=(1<<n)-1;if(a[1]=i.convert(this),n>1){var h=dr();for(i.sqrTo(a[1],h);u<=l;)a[u]=dr(),i.mulTo(h,a[u-2],a[u]),u+=2}var m=r.t-1,g,y=!0,v=dr(),E;for(t=pE(r.data[m])-1;m>=0;){for(t>=c?g=r.data[m]>>t-c&l:(g=(r.data[m]&(1<<t+1)-1)<<c-t,m>0&&(g|=r.data[m-1]>>this.DB+t-c)),u=n;(g&1)==0;)g>>=1,--u;if((t-=u)<0&&(t+=this.DB,--m),y)a[g].copyTo(s),y=!1;else{for(;u>1;)i.sqrTo(s,v),i.sqrTo(v,s),u-=2;u>0?i.sqrTo(s,v):(E=s,s=v,v=E),i.mulTo(v,a[g],s)}for(;m>=0&&(r.data[m]&1<<t)==0;)i.sqrTo(s,v),E=s,s=v,v=E,--t<0&&(t=this.DB-1,--m)}return i.revert(s)}o(vee,"bnModPow");function yee(r){var e=this.s<0?this.negate():this.clone(),t=r.s<0?r.negate():r.clone();if(e.compareTo(t)<0){var n=e;e=t,t=n}var s=e.getLowestSetBit(),i=t.getLowestSetBit();if(i<0)return e;for(s<i&&(i=s),i>0&&(e.rShiftTo(i,e),t.rShiftTo(i,t));e.signum()>0;)(s=e.getLowestSetBit())>0&&e.rShiftTo(s,e),(s=t.getLowestSetBit())>0&&t.rShiftTo(s,t),e.compareTo(t)>=0?(e.subTo(t,e),e.rShiftTo(1,e)):(t.subTo(e,t),t.rShiftTo(1,t));return i>0&&t.lShiftTo(i,t),t}o(yee,"bnGCD");function xee(r){if(r<=0)return 0;var e=this.DV%r,t=this.s<0?r-1:0;if(this.t>0)if(e==0)t=this.data[0]%r;else for(var n=this.t-1;n>=0;--n)t=(e*t+this.data[n])%r;return t}o(xee,"bnpModInt");function wee(r){var e=r.isEven();if(this.isEven()&&e||r.signum()==0)return Ue.ZERO;for(var t=r.clone(),n=this.clone(),s=zu(1),i=zu(0),a=zu(0),u=zu(1);t.signum()!=0;){for(;t.isEven();)t.rShiftTo(1,t),e?((!s.isEven()||!i.isEven())&&(s.addTo(this,s),i.subTo(r,i)),s.rShiftTo(1,s)):i.isEven()||i.subTo(r,i),i.rShiftTo(1,i);for(;n.isEven();)n.rShiftTo(1,n),e?((!a.isEven()||!u.isEven())&&(a.addTo(this,a),u.subTo(r,u)),a.rShiftTo(1,a)):u.isEven()||u.subTo(r,u),u.rShiftTo(1,u);t.compareTo(n)>=0?(t.subTo(n,t),e&&s.subTo(a,s),i.subTo(u,i)):(n.subTo(t,n),e&&a.subTo(s,a),u.subTo(i,u))}if(n.compareTo(Ue.ONE)!=0)return Ue.ZERO;if(u.compareTo(r)>=0)return u.subtract(r);if(u.signum()<0)u.addTo(r,u);else return u;return u.signum()<0?u.add(r):u}o(wee,"bnModInverse");var fa=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509],Eee=(1<<26)/fa[fa.length-1];function See(r){var e,t=this.abs();if(t.t==1&&t.data[0]<=fa[fa.length-1]){for(e=0;e<fa.length;++e)if(t.data[0]==fa[e])return!0;return!1}if(t.isEven())return!1;for(e=1;e<fa.length;){for(var n=fa[e],s=e+1;s<fa.length&&n<Eee;)n*=fa[s++];for(n=t.modInt(n);e<s;)if(n%fa[e++]==0)return!1}return t.millerRabin(r)}o(See,"bnIsProbablePrime");function bee(r){var e=this.subtract(Ue.ONE),t=e.getLowestSetBit();if(t<=0)return!1;for(var n=e.shiftRight(t),s=Aee(),i,a=0;a<r;++a){do i=new Ue(this.bitLength(),s);while(i.compareTo(Ue.ONE)<=0||i.compareTo(e)>=0);var u=i.modPow(n,this);if(u.compareTo(Ue.ONE)!=0&&u.compareTo(e)!=0){for(var c=1;c++<t&&u.compareTo(e)!=0;)if(u=u.modPowInt(2,this),u.compareTo(Ue.ONE)==0)return!1;if(u.compareTo(e)!=0)return!1}}return!0}o(bee,"bnpMillerRabin");function Aee(){return{nextBytes:o(function(r){for(var e=0;e<r.length;++e)r[e]=Math.floor(Math.random()*256)},"nextBytes")}}o(Aee,"bnGetPrng");Ue.prototype.chunkSize=CZ;Ue.prototype.toRadix=TZ;Ue.prototype.fromRadix=IZ;Ue.prototype.fromNumber=_Z;Ue.prototype.bitwiseTo=PZ;Ue.prototype.changeBit=WZ;Ue.prototype.addTo=QZ;Ue.prototype.dMultiply=iee;Ue.prototype.dAddOffset=aee;Ue.prototype.multiplyLowerTo=lee;Ue.prototype.multiplyUpperTo=fee;Ue.prototype.modInt=xee;Ue.prototype.millerRabin=bee;Ue.prototype.clone=EZ;Ue.prototype.intValue=SZ;Ue.prototype.byteValue=bZ;Ue.prototype.shortValue=AZ;Ue.prototype.signum=NZ;Ue.prototype.toByteArray=DZ;Ue.prototype.equals=BZ;Ue.prototype.min=RZ;Ue.prototype.max=OZ;Ue.prototype.and=LZ;Ue.prototype.or=VZ;Ue.prototype.xor=UZ;Ue.prototype.andNot=jZ;Ue.prototype.not=FZ;Ue.prototype.shiftLeft=MZ;Ue.prototype.shiftRight=qZ;Ue.prototype.getLowestSetBit=KZ;Ue.prototype.bitCount=GZ;Ue.prototype.testBit=XZ;Ue.prototype.setBit=zZ;Ue.prototype.clearBit=JZ;Ue.prototype.flipBit=YZ;Ue.prototype.add=ZZ;Ue.prototype.subtract=eee;Ue.prototype.multiply=tee;Ue.prototype.divide=ree;Ue.prototype.remainder=nee;Ue.prototype.divideAndRemainder=see;Ue.prototype.modPow=vee;Ue.prototype.modInverse=wee;Ue.prototype.pow=cee;Ue.prototype.gcd=yee;Ue.prototype.isProbablePrime=See});var Lp=te((wye,x4)=>{"use strict";var Ga=zt();Ma();pr();var v4=x4.exports=Ga.sha1=Ga.sha1||{};Ga.md.sha1=Ga.md.algorithms.sha1=v4;v4.create=function(){y4||Cee();var r=null,e=Ga.util.createBuffer(),t=new Array(80),n={algorithm:"sha1",blockLength:64,digestLength:20,messageLength:0,fullMessageLength:null,messageLengthSize:8};return n.start=function(){n.messageLength=0,n.fullMessageLength=n.messageLength64=[];for(var s=n.messageLengthSize/4,i=0;i<s;++i)n.fullMessageLength.push(0);return e=Ga.util.createBuffer(),r={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878,h4:3285377520},n},n.start(),n.update=function(s,i){i==="utf8"&&(s=Ga.util.encodeUtf8(s));var a=s.length;n.messageLength+=a,a=[a/4294967296>>>0,a>>>0];for(var u=n.fullMessageLength.length-1;u>=0;--u)n.fullMessageLength[u]+=a[1],a[1]=a[0]+(n.fullMessageLength[u]/4294967296>>>0),n.fullMessageLength[u]=n.fullMessageLength[u]>>>0,a[0]=a[1]/4294967296>>>0;return e.putBytes(s),g4(r,t,e),(e.read>2048||e.length()===0)&&e.compact(),n},n.digest=function(){var s=Ga.util.createBuffer();s.putBytes(e.bytes());var i=n.fullMessageLength[n.fullMessageLength.length-1]+n.messageLengthSize,a=i&n.blockLength-1;s.putBytes(lT.substr(0,n.blockLength-a));for(var u,c,l=n.fullMessageLength[0]*8,h=0;h<n.fullMessageLength.length-1;++h)u=n.fullMessageLength[h+1]*8,c=u/4294967296>>>0,l+=c,s.putInt32(l>>>0),l=u>>>0;s.putInt32(l);var m={h0:r.h0,h1:r.h1,h2:r.h2,h3:r.h3,h4:r.h4};g4(m,t,s);var g=Ga.util.createBuffer();return g.putInt32(m.h0),g.putInt32(m.h1),g.putInt32(m.h2),g.putInt32(m.h3),g.putInt32(m.h4),g},n};var lT=null,y4=!1;function Cee(){lT="\x80",lT+=Ga.util.fillString("\0",64),y4=!0}o(Cee,"_init");function g4(r,e,t){for(var n,s,i,a,u,c,l,h,m=t.length();m>=64;){for(s=r.h0,i=r.h1,a=r.h2,u=r.h3,c=r.h4,h=0;h<16;++h)n=t.getInt32(),e[h]=n,l=u^i&(a^u),n=(s<<5|s>>>27)+l+c+1518500249+n,c=u,u=a,a=(i<<30|i>>>2)>>>0,i=s,s=n;for(;h<20;++h)n=e[h-3]^e[h-8]^e[h-14]^e[h-16],n=n<<1|n>>>31,e[h]=n,l=u^i&(a^u),n=(s<<5|s>>>27)+l+c+1518500249+n,c=u,u=a,a=(i<<30|i>>>2)>>>0,i=s,s=n;for(;h<32;++h)n=e[h-3]^e[h-8]^e[h-14]^e[h-16],n=n<<1|n>>>31,e[h]=n,l=i^a^u,n=(s<<5|s>>>27)+l+c+1859775393+n,c=u,u=a,a=(i<<30|i>>>2)>>>0,i=s,s=n;for(;h<40;++h)n=e[h-6]^e[h-16]^e[h-28]^e[h-32],n=n<<2|n>>>30,e[h]=n,l=i^a^u,n=(s<<5|s>>>27)+l+c+1859775393+n,c=u,u=a,a=(i<<30|i>>>2)>>>0,i=s,s=n;for(;h<60;++h)n=e[h-6]^e[h-16]^e[h-28]^e[h-32],n=n<<2|n>>>30,e[h]=n,l=i&a|u&(i^a),n=(s<<5|s>>>27)+l+c+2400959708+n,c=u,u=a,a=(i<<30|i>>>2)>>>0,i=s,s=n;for(;h<80;++h)n=e[h-6]^e[h-16]^e[h-28]^e[h-32],n=n<<2|n>>>30,e[h]=n,l=i^a^u,n=(s<<5|s>>>27)+l+c+3395469782+n,c=u,u=a,a=(i<<30|i>>>2)>>>0,i=s,s=n;r.h0=r.h0+s|0,r.h1=r.h1+i|0,r.h2=r.h2+a|0,r.h3=r.h3+u|0,r.h4=r.h4+c|0,m-=64}}o(g4,"_update")});var fT=te((Sye,E4)=>{"use strict";var Xa=zt();pr();Ri();Lp();var w4=E4.exports=Xa.pkcs1=Xa.pkcs1||{};w4.encode_rsa_oaep=function(r,e,t){var n,s,i,a;typeof t=="string"?(n=t,s=arguments[3]||void 0,i=arguments[4]||void 0):t&&(n=t.label||void 0,s=t.seed||void 0,i=t.md||void 0,t.mgf1&&t.mgf1.md&&(a=t.mgf1.md)),i?i.start():i=Xa.md.sha1.create(),a||(a=i);var u=Math.ceil(r.n.bitLength()/8),c=u-2*i.digestLength-2;if(e.length>c){var l=new Error("RSAES-OAEP input message length is too long.");throw l.length=e.length,l.maxLength=c,l}n||(n=""),i.update(n,"raw");for(var h=i.digest(),m="",g=c-e.length,y=0;y<g;y++)m+="\0";var v=h.getBytes()+m+""+e;if(!s)s=Xa.random.getBytes(i.digestLength);else if(s.length!==i.digestLength){var l=new Error("Invalid RSAES-OAEP seed. The seed length must match the digest length.");throw l.seedLength=s.length,l.digestLength=i.digestLength,l}var E=dE(s,u-i.digestLength-1,a),w=Xa.util.xorBytes(v,E,v.length),C=dE(w,i.digestLength,a),_=Xa.util.xorBytes(s,C,s.length);return"\0"+_+w};w4.decode_rsa_oaep=function(r,e,t){var n,s,i;typeof t=="string"?(n=t,s=arguments[3]||void 0):t&&(n=t.label||void 0,s=t.md||void 0,t.mgf1&&t.mgf1.md&&(i=t.mgf1.md));var a=Math.ceil(r.n.bitLength()/8);if(e.length!==a){var w=new Error("RSAES-OAEP encoded message length is invalid.");throw w.length=e.length,w.expectedLength=a,w}if(s===void 0?s=Xa.md.sha1.create():s.start(),i||(i=s),a<2*s.digestLength+2)throw new Error("RSAES-OAEP key is too short for the hash function.");n||(n=""),s.update(n,"raw");for(var u=s.digest().getBytes(),c=e.charAt(0),l=e.substring(1,s.digestLength+1),h=e.substring(1+s.digestLength),m=dE(h,s.digestLength,i),g=Xa.util.xorBytes(l,m,l.length),y=dE(g,a-s.digestLength-1,i),v=Xa.util.xorBytes(h,y,h.length),E=v.substring(0,s.digestLength),w=c!=="\0",C=0;C<s.digestLength;++C)w|=u.charAt(C)!==E.charAt(C);for(var _=1,b=s.digestLength,A=s.digestLength;A<v.length;A++){var T=v.charCodeAt(A),B=T&1^1,M=_?65534:0;w|=T&M,_=_&B,b+=_}if(w||v.charCodeAt(b)!==1)throw new Error("Invalid RSAES-OAEP padding.");return v.substring(b+1)};function dE(r,e,t){t||(t=Xa.md.sha1.create());for(var n="",s=Math.ceil(e/t.digestLength),i=0;i<s;++i){var a=String.fromCharCode(i>>24&255,i>>16&255,i>>8&255,i&255);t.start(),t.update(r+a),n+=t.digest().getBytes()}return n.substring(0,e)}o(dE,"rsa_mgf1")});var pT=te((Aye,hT)=>{"use strict";var Ju=zt();pr();Bg();Ri();(function(){if(Ju.prime){hT.exports=Ju.prime;return}var r=hT.exports=Ju.prime=Ju.prime||{},e=Ju.jsbn.BigInteger,t=[6,4,2,4,2,4,6,2],n=new e(null);n.fromInt(30);var s=o(function(m,g){return m|g},"op_or");r.generateProbablePrime=function(m,g,y){typeof g=="function"&&(y=g,g={}),g=g||{};var v=g.algorithm||"PRIMEINC";typeof v=="string"&&(v={name:v}),v.options=v.options||{};var E=g.prng||Ju.random,w={nextBytes:o(function(C){for(var _=E.getBytesSync(C.length),b=0;b<C.length;++b)C[b]=_.charCodeAt(b)},"nextBytes")};if(v.name==="PRIMEINC")return i(m,w,v.options,y);throw new Error("Invalid prime generation algorithm: "+v.name)};function i(m,g,y,v){return"workers"in y?c(m,g,y,v):a(m,g,y,v)}o(i,"primeincFindPrime");function a(m,g,y,v){var E=l(m,g),w=0,C=h(E.bitLength());"millerRabinTests"in y&&(C=y.millerRabinTests);var _=10;"maxBlockTime"in y&&(_=y.maxBlockTime),u(E,m,g,w,C,_,v)}o(a,"primeincFindPrimeWithoutWorkers");function u(m,g,y,v,E,w,C){var _=+new Date;do{if(m.bitLength()>g&&(m=l(g,y)),m.isProbablePrime(E))return C(null,m);m.dAddOffset(t[v++%8],0)}while(w<0||+new Date-_<w);Ju.util.setImmediate(function(){u(m,g,y,v,E,w,C)})}o(u,"_primeinc");function c(m,g,y,v){if(typeof Worker>"u")return a(m,g,y,v);var E=l(m,g),w=y.workers,C=y.workLoad||100,_=C*30/8,b=y.workerScript||"forge/prime.worker.js";if(w===-1)return Ju.util.estimateCores(function(T,B){T&&(B=2),w=B-1,A()});A();function A(){w=Math.max(1,w);for(var T=[],B=0;B<w;++B)T[B]=new Worker(b);for(var M=w,B=0;B<w;++B)T[B].addEventListener("message",H);var I=!1;function H(K){if(!I){--M;var q=K.data;if(q.found){for(var W=0;W<T.length;++W)T[W].terminate();return I=!0,v(null,new e(q.prime,16))}E.bitLength()>m&&(E=l(m,g));var he=E.toString(16);K.target.postMessage({hex:he,workLoad:C}),E.dAddOffset(_,0)}}o(H,"workerMessage")}o(A,"generate")}o(c,"primeincFindPrimeWithWorkers");function l(m,g){var y=new e(m,g),v=m-1;return y.testBit(v)||y.bitwiseTo(e.ONE.shiftLeft(v),s,y),y.dAddOffset(31-y.mod(n).byteValue(),0),y}o(l,"generateRandom");function h(m){return m<=100?27:m<=150?18:m<=200?15:m<=250?12:m<=300?9:m<=350?8:m<=400?7:m<=500?6:m<=600?5:m<=800?4:m<=1250?3:2}o(h,"getMillerRabinTests")})()});var Rg=te((Nye,I4)=>{"use strict";var wt=zt();la();Bg();Wu();fT();pT();Ri();pr();typeof ur>"u"&&(ur=wt.jsbn.BigInteger);var ur,dT=wt.util.isNodejs?Ge("crypto"):null,ge=wt.asn1,Pi=wt.util;wt.pki=wt.pki||{};I4.exports=wt.pki.rsa=wt.rsa=wt.rsa||{};var Mt=wt.pki,Nee=[6,4,2,4,2,4,6,2],Tee={name:"PrivateKeyInfo",tagClass:ge.Class.UNIVERSAL,type:ge.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:ge.Class.UNIVERSAL,type:ge.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:ge.Class.UNIVERSAL,type:ge.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:ge.Class.UNIVERSAL,type:ge.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:ge.Class.UNIVERSAL,type:ge.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},Iee={name:"RSAPrivateKey",tagClass:ge.Class.UNIVERSAL,type:ge.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPrivateKey.version",tagClass:ge.Class.UNIVERSAL,type:ge.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"RSAPrivateKey.modulus",tagClass:ge.Class.UNIVERSAL,type:ge.Type.INTEGER,constructed:!1,capture:"privateKeyModulus"},{name:"RSAPrivateKey.publicExponent",tagClass:ge.Class.UNIVERSAL,type:ge.Type.INTEGER,constructed:!1,capture:"privateKeyPublicExponent"},{name:"RSAPrivateKey.privateExponent",tagClass:ge.Class.UNIVERSAL,type:ge.Type.INTEGER,constructed:!1,capture:"privateKeyPrivateExponent"},{name:"RSAPrivateKey.prime1",tagClass:ge.Class.UNIVERSAL,type:ge.Type.INTEGER,constructed:!1,capture:"privateKeyPrime1"},{name:"RSAPrivateKey.prime2",tagClass:ge.Class.UNIVERSAL,type:ge.Type.INTEGER,constructed:!1,capture:"privateKeyPrime2"},{name:"RSAPrivateKey.exponent1",tagClass:ge.Class.UNIVERSAL,type:ge.Type.INTEGER,constructed:!1,capture:"privateKeyExponent1"},{name:"RSAPrivateKey.exponent2",tagClass:ge.Class.UNIVERSAL,type:ge.Type.INTEGER,constructed:!1,capture:"privateKeyExponent2"},{name:"RSAPrivateKey.coefficient",tagClass:ge.Class.UNIVERSAL,type:ge.Type.INTEGER,constructed:!1,capture:"privateKeyCoefficient"}]},_ee={name:"RSAPublicKey",tagClass:ge.Class.UNIVERSAL,type:ge.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPublicKey.modulus",tagClass:ge.Class.UNIVERSAL,type:ge.Type.INTEGER,constructed:!1,capture:"publicKeyModulus"},{name:"RSAPublicKey.exponent",tagClass:ge.Class.UNIVERSAL,type:ge.Type.INTEGER,constructed:!1,capture:"publicKeyExponent"}]},Dee=wt.pki.rsa.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:ge.Class.UNIVERSAL,type:ge.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:ge.Class.UNIVERSAL,type:ge.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:ge.Class.UNIVERSAL,type:ge.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{name:"SubjectPublicKeyInfo.subjectPublicKey",tagClass:ge.Class.UNIVERSAL,type:ge.Type.BITSTRING,constructed:!1,value:[{name:"SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey",tagClass:ge.Class.UNIVERSAL,type:ge.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"rsaPublicKey"}]}]},Bee={name:"DigestInfo",tagClass:ge.Class.UNIVERSAL,type:ge.Type.SEQUENCE,constructed:!0,value:[{name:"DigestInfo.DigestAlgorithm",tagClass:ge.Class.UNIVERSAL,type:ge.Type.SEQUENCE,constructed:!0,value:[{name:"DigestInfo.DigestAlgorithm.algorithmIdentifier",tagClass:ge.Class.UNIVERSAL,type:ge.Type.OID,constructed:!1,capture:"algorithmIdentifier"},{name:"DigestInfo.DigestAlgorithm.parameters",tagClass:ge.Class.UNIVERSAL,type:ge.Type.NULL,capture:"parameters",optional:!0,constructed:!1}]},{name:"DigestInfo.digest",tagClass:ge.Class.UNIVERSAL,type:ge.Type.OCTETSTRING,constructed:!1,capture:"digest"}]},Ree=o(function(r){var e;if(r.algorithm in Mt.oids)e=Mt.oids[r.algorithm];else{var t=new Error("Unknown message digest algorithm.");throw t.algorithm=r.algorithm,t}var n=ge.oidToDer(e).getBytes(),s=ge.create(ge.Class.UNIVERSAL,ge.Type.SEQUENCE,!0,[]),i=ge.create(ge.Class.UNIVERSAL,ge.Type.SEQUENCE,!0,[]);i.value.push(ge.create(ge.Class.UNIVERSAL,ge.Type.OID,!1,n)),i.value.push(ge.create(ge.Class.UNIVERSAL,ge.Type.NULL,!1,""));var a=ge.create(ge.Class.UNIVERSAL,ge.Type.OCTETSTRING,!1,r.digest().getBytes());return s.value.push(i),s.value.push(a),ge.toDer(s).getBytes()},"emsaPkcs1v15encode"),N4=o(function(r,e,t){if(t)return r.modPow(e.e,e.n);if(!e.p||!e.q)return r.modPow(e.d,e.n);e.dP||(e.dP=e.d.mod(e.p.subtract(ur.ONE))),e.dQ||(e.dQ=e.d.mod(e.q.subtract(ur.ONE))),e.qInv||(e.qInv=e.q.modInverse(e.p));var n;do n=new ur(wt.util.bytesToHex(wt.random.getBytes(e.n.bitLength()/8)),16);while(n.compareTo(e.n)>=0||!n.gcd(e.n).equals(ur.ONE));r=r.multiply(n.modPow(e.e,e.n)).mod(e.n);for(var s=r.mod(e.p).modPow(e.dP,e.p),i=r.mod(e.q).modPow(e.dQ,e.q);s.compareTo(i)<0;)s=s.add(e.p);var a=s.subtract(i).multiply(e.qInv).mod(e.p).multiply(e.q).add(i);return a=a.multiply(n.modInverse(e.n)).mod(e.n),a},"_modPow");Mt.rsa.encrypt=function(r,e,t){var n=t,s,i=Math.ceil(e.n.bitLength()/8);t!==!1&&t!==!0?(n=t===2,s=T4(r,e,t)):(s=wt.util.createBuffer(),s.putBytes(r));for(var a=new ur(s.toHex(),16),u=N4(a,e,n),c=u.toString(16),l=wt.util.createBuffer(),h=i-Math.ceil(c.length/2);h>0;)l.putByte(0),--h;return l.putBytes(wt.util.hexToBytes(c)),l.getBytes()};Mt.rsa.decrypt=function(r,e,t,n){var s=Math.ceil(e.n.bitLength()/8);if(r.length!==s){var i=new Error("Encrypted message length is invalid.");throw i.length=r.length,i.expected=s,i}var a=new ur(wt.util.createBuffer(r).toHex(),16);if(a.compareTo(e.n)>=0)throw new Error("Encrypted message is invalid.");for(var u=N4(a,e,t),c=u.toString(16),l=wt.util.createBuffer(),h=s-Math.ceil(c.length/2);h>0;)l.putByte(0),--h;return l.putBytes(wt.util.hexToBytes(c)),n!==!1?mE(l.getBytes(),e,t):l.getBytes()};Mt.rsa.createKeyPairGenerationState=function(r,e,t){typeof r=="string"&&(r=parseInt(r,10)),r=r||2048,t=t||{};var n=t.prng||wt.random,s={nextBytes:o(function(u){for(var c=n.getBytesSync(u.length),l=0;l<u.length;++l)u[l]=c.charCodeAt(l)},"nextBytes")},i=t.algorithm||"PRIMEINC",a;if(i==="PRIMEINC")a={algorithm:i,state:0,bits:r,rng:s,eInt:e||65537,e:new ur(null),p:null,q:null,qBits:r>>1,pBits:r-(r>>1),pqState:0,num:null,keys:null},a.e.fromInt(a.eInt);else throw new Error("Invalid key generation algorithm: "+i);return a};Mt.rsa.stepKeyPairGenerationState=function(r,e){"algorithm"in r||(r.algorithm="PRIMEINC");var t=new ur(null);t.fromInt(30);for(var n=0,s=o(function(m,g){return m|g},"op_or"),i=+new Date,a,u=0;r.keys===null&&(e<=0||u<e);){if(r.state===0){var c=r.p===null?r.pBits:r.qBits,l=c-1;r.pqState===0?(r.num=new ur(c,r.rng),r.num.testBit(l)||r.num.bitwiseTo(ur.ONE.shiftLeft(l),s,r.num),r.num.dAddOffset(31-r.num.mod(t).byteValue(),0),n=0,++r.pqState):r.pqState===1?r.num.bitLength()>c?r.pqState=0:r.num.isProbablePrime(Pee(r.num.bitLength()))?++r.pqState:r.num.dAddOffset(Nee[n++%8],0):r.pqState===2?r.pqState=r.num.subtract(ur.ONE).gcd(r.e).compareTo(ur.ONE)===0?3:0:r.pqState===3&&(r.pqState=0,r.p===null?r.p=r.num:r.q=r.num,r.p!==null&&r.q!==null&&++r.state,r.num=null)}else if(r.state===1)r.p.compareTo(r.q)<0&&(r.num=r.p,r.p=r.q,r.q=r.num),++r.state;else if(r.state===2)r.p1=r.p.subtract(ur.ONE),r.q1=r.q.subtract(ur.ONE),r.phi=r.p1.multiply(r.q1),++r.state;else if(r.state===3)r.phi.gcd(r.e).compareTo(ur.ONE)===0?++r.state:(r.p=null,r.q=null,r.state=0);else if(r.state===4)r.n=r.p.multiply(r.q),r.n.bitLength()===r.bits?++r.state:(r.q=null,r.state=0);else if(r.state===5){var h=r.e.modInverse(r.phi);r.keys={privateKey:Mt.rsa.setPrivateKey(r.n,r.e,h,r.p,r.q,h.mod(r.p1),h.mod(r.q1),r.q.modInverse(r.p)),publicKey:Mt.rsa.setPublicKey(r.n,r.e)}}a=+new Date,u+=a-i,i=a}return r.keys!==null};Mt.rsa.generateKeyPair=function(r,e,t,n){if(arguments.length===1?typeof r=="object"?(t=r,r=void 0):typeof r=="function"&&(n=r,r=void 0):arguments.length===2?typeof r=="number"?typeof e=="function"?(n=e,e=void 0):typeof e!="number"&&(t=e,e=void 0):(t=r,n=e,r=void 0,e=void 0):arguments.length===3&&(typeof e=="number"?typeof t=="function"&&(n=t,t=void 0):(n=t,t=e,e=void 0)),t=t||{},r===void 0&&(r=t.bits||2048),e===void 0&&(e=t.e||65537),!wt.options.usePureJavaScript&&!t.prng&&r>=256&&r<=16384&&(e===65537||e===3)){if(n){if(S4("generateKeyPair"))return dT.generateKeyPair("rsa",{modulusLength:r,publicExponent:e,publicKeyEncoding:{type:"spki",format:"pem"},privateKeyEncoding:{type:"pkcs8",format:"pem"}},function(u,c,l){if(u)return n(u);n(null,{privateKey:Mt.privateKeyFromPem(l),publicKey:Mt.publicKeyFromPem(c)})});if(b4("generateKey")&&b4("exportKey"))return Pi.globalScope.crypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:r,publicExponent:C4(e),hash:{name:"SHA-256"}},!0,["sign","verify"]).then(function(u){return Pi.globalScope.crypto.subtle.exportKey("pkcs8",u.privateKey)}).then(void 0,function(u){n(u)}).then(function(u){if(u){var c=Mt.privateKeyFromAsn1(ge.fromDer(wt.util.createBuffer(u)));n(null,{privateKey:c,publicKey:Mt.setRsaPublicKey(c.n,c.e)})}});if(A4("generateKey")&&A4("exportKey")){var s=Pi.globalScope.msCrypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:r,publicExponent:C4(e),hash:{name:"SHA-256"}},!0,["sign","verify"]);s.oncomplete=function(u){var c=u.target.result,l=Pi.globalScope.msCrypto.subtle.exportKey("pkcs8",c.privateKey);l.oncomplete=function(h){var m=h.target.result,g=Mt.privateKeyFromAsn1(ge.fromDer(wt.util.createBuffer(m)));n(null,{privateKey:g,publicKey:Mt.setRsaPublicKey(g.n,g.e)})},l.onerror=function(h){n(h)}},s.onerror=function(u){n(u)};return}}else if(S4("generateKeyPairSync")){var i=dT.generateKeyPairSync("rsa",{modulusLength:r,publicExponent:e,publicKeyEncoding:{type:"spki",format:"pem"},privateKeyEncoding:{type:"pkcs8",format:"pem"}});return{privateKey:Mt.privateKeyFromPem(i.privateKey),publicKey:Mt.publicKeyFromPem(i.publicKey)}}}var a=Mt.rsa.createKeyPairGenerationState(r,e,t);if(!n)return Mt.rsa.stepKeyPairGenerationState(a,0),a.keys;Oee(a,t,n)};Mt.setRsaPublicKey=Mt.rsa.setPublicKey=function(r,e){var t={n:r,e};return t.encrypt=function(n,s,i){if(typeof s=="string"?s=s.toUpperCase():s===void 0&&(s="RSAES-PKCS1-V1_5"),s==="RSAES-PKCS1-V1_5")s={encode:o(function(u,c,l){return T4(u,c,2).getBytes()},"encode")};else if(s==="RSA-OAEP"||s==="RSAES-OAEP")s={encode:o(function(u,c){return wt.pkcs1.encode_rsa_oaep(c,u,i)},"encode")};else if(["RAW","NONE","NULL",null].indexOf(s)!==-1)s={encode:o(function(u){return u},"encode")};else if(typeof s=="string")throw new Error('Unsupported encryption scheme: "'+s+'".');var a=s.encode(n,t,!0);return Mt.rsa.encrypt(a,t,!0)},t.verify=function(n,s,i,a){typeof i=="string"?i=i.toUpperCase():i===void 0&&(i="RSASSA-PKCS1-V1_5"),a===void 0&&(a={_parseAllDigestBytes:!0}),"_parseAllDigestBytes"in a||(a._parseAllDigestBytes=!0),i==="RSASSA-PKCS1-V1_5"?i={verify:o(function(c,l){l=mE(l,t,!0);var h=ge.fromDer(l,{parseAllBytes:a._parseAllDigestBytes}),m={},g=[];if(!ge.validate(h,Bee,m,g)){var y=new Error("ASN.1 object does not contain a valid RSASSA-PKCS1-v1_5 DigestInfo value.");throw y.errors=g,y}var v=ge.derToOid(m.algorithmIdentifier);if(!(v===wt.oids.md2||v===wt.oids.md5||v===wt.oids.sha1||v===wt.oids.sha224||v===wt.oids.sha256||v===wt.oids.sha384||v===wt.oids.sha512||v===wt.oids["sha512-224"]||v===wt.oids["sha512-256"])){var y=new Error("Unknown RSASSA-PKCS1-v1_5 DigestAlgorithm identifier.");throw y.oid=v,y}if((v===wt.oids.md2||v===wt.oids.md5)&&!("parameters"in m))throw new Error("ASN.1 object does not contain a valid RSASSA-PKCS1-v1_5 DigestInfo value. Missing algorithm identifier NULL parameters.");return c===m.digest},"verify")}:(i==="NONE"||i==="NULL"||i===null)&&(i={verify:o(function(c,l){return l=mE(l,t,!0),c===l},"verify")});var u=Mt.rsa.decrypt(s,t,!0,!1);return i.verify(n,u,t.n.bitLength())},t};Mt.setRsaPrivateKey=Mt.rsa.setPrivateKey=function(r,e,t,n,s,i,a,u){var c={n:r,e,d:t,p:n,q:s,dP:i,dQ:a,qInv:u};return c.decrypt=function(l,h,m){typeof h=="string"?h=h.toUpperCase():h===void 0&&(h="RSAES-PKCS1-V1_5");var g=Mt.rsa.decrypt(l,c,!1,!1);if(h==="RSAES-PKCS1-V1_5")h={decode:mE};else if(h==="RSA-OAEP"||h==="RSAES-OAEP")h={decode:o(function(y,v){return wt.pkcs1.decode_rsa_oaep(v,y,m)},"decode")};else if(["RAW","NONE","NULL",null].indexOf(h)!==-1)h={decode:o(function(y){return y},"decode")};else throw new Error('Unsupported encryption scheme: "'+h+'".');return h.decode(g,c,!1)},c.sign=function(l,h){var m=!1;typeof h=="string"&&(h=h.toUpperCase()),h===void 0||h==="RSASSA-PKCS1-V1_5"?(h={encode:Ree},m=1):(h==="NONE"||h==="NULL"||h===null)&&(h={encode:o(function(){return l},"encode")},m=1);var g=h.encode(l,c.n.bitLength());return Mt.rsa.encrypt(g,c,m)},c};Mt.wrapRsaPrivateKey=function(r){return ge.create(ge.Class.UNIVERSAL,ge.Type.SEQUENCE,!0,[ge.create(ge.Class.UNIVERSAL,ge.Type.INTEGER,!1,ge.integerToDer(0).getBytes()),ge.create(ge.Class.UNIVERSAL,ge.Type.SEQUENCE,!0,[ge.create(ge.Class.UNIVERSAL,ge.Type.OID,!1,ge.oidToDer(Mt.oids.rsaEncryption).getBytes()),ge.create(ge.Class.UNIVERSAL,ge.Type.NULL,!1,"")]),ge.create(ge.Class.UNIVERSAL,ge.Type.OCTETSTRING,!1,ge.toDer(r).getBytes())])};Mt.privateKeyFromAsn1=function(r){var e={},t=[];if(ge.validate(r,Tee,e,t)&&(r=ge.fromDer(wt.util.createBuffer(e.privateKey))),e={},t=[],!ge.validate(r,Iee,e,t)){var n=new Error("Cannot read private key. ASN.1 object does not contain an RSAPrivateKey.");throw n.errors=t,n}var s,i,a,u,c,l,h,m;return s=wt.util.createBuffer(e.privateKeyModulus).toHex(),i=wt.util.createBuffer(e.privateKeyPublicExponent).toHex(),a=wt.util.createBuffer(e.privateKeyPrivateExponent).toHex(),u=wt.util.createBuffer(e.privateKeyPrime1).toHex(),c=wt.util.createBuffer(e.privateKeyPrime2).toHex(),l=wt.util.createBuffer(e.privateKeyExponent1).toHex(),h=wt.util.createBuffer(e.privateKeyExponent2).toHex(),m=wt.util.createBuffer(e.privateKeyCoefficient).toHex(),Mt.setRsaPrivateKey(new ur(s,16),new ur(i,16),new ur(a,16),new ur(u,16),new ur(c,16),new ur(l,16),new ur(h,16),new ur(m,16))};Mt.privateKeyToAsn1=Mt.privateKeyToRSAPrivateKey=function(r){return ge.create(ge.Class.UNIVERSAL,ge.Type.SEQUENCE,!0,[ge.create(ge.Class.UNIVERSAL,ge.Type.INTEGER,!1,ge.integerToDer(0).getBytes()),ge.create(ge.Class.UNIVERSAL,ge.Type.INTEGER,!1,Wa(r.n)),ge.create(ge.Class.UNIVERSAL,ge.Type.INTEGER,!1,Wa(r.e)),ge.create(ge.Class.UNIVERSAL,ge.Type.INTEGER,!1,Wa(r.d)),ge.create(ge.Class.UNIVERSAL,ge.Type.INTEGER,!1,Wa(r.p)),ge.create(ge.Class.UNIVERSAL,ge.Type.INTEGER,!1,Wa(r.q)),ge.create(ge.Class.UNIVERSAL,ge.Type.INTEGER,!1,Wa(r.dP)),ge.create(ge.Class.UNIVERSAL,ge.Type.INTEGER,!1,Wa(r.dQ)),ge.create(ge.Class.UNIVERSAL,ge.Type.INTEGER,!1,Wa(r.qInv))])};Mt.publicKeyFromAsn1=function(r){var e={},t=[];if(ge.validate(r,Dee,e,t)){var n=ge.derToOid(e.publicKeyOid);if(n!==Mt.oids.rsaEncryption){var s=new Error("Cannot read public key. Unknown OID.");throw s.oid=n,s}r=e.rsaPublicKey}if(t=[],!ge.validate(r,_ee,e,t)){var s=new Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey.");throw s.errors=t,s}var i=wt.util.createBuffer(e.publicKeyModulus).toHex(),a=wt.util.createBuffer(e.publicKeyExponent).toHex();return Mt.setRsaPublicKey(new ur(i,16),new ur(a,16))};Mt.publicKeyToAsn1=Mt.publicKeyToSubjectPublicKeyInfo=function(r){return ge.create(ge.Class.UNIVERSAL,ge.Type.SEQUENCE,!0,[ge.create(ge.Class.UNIVERSAL,ge.Type.SEQUENCE,!0,[ge.create(ge.Class.UNIVERSAL,ge.Type.OID,!1,ge.oidToDer(Mt.oids.rsaEncryption).getBytes()),ge.create(ge.Class.UNIVERSAL,ge.Type.NULL,!1,"")]),ge.create(ge.Class.UNIVERSAL,ge.Type.BITSTRING,!1,[Mt.publicKeyToRSAPublicKey(r)])])};Mt.publicKeyToRSAPublicKey=function(r){return ge.create(ge.Class.UNIVERSAL,ge.Type.SEQUENCE,!0,[ge.create(ge.Class.UNIVERSAL,ge.Type.INTEGER,!1,Wa(r.n)),ge.create(ge.Class.UNIVERSAL,ge.Type.INTEGER,!1,Wa(r.e))])};function T4(r,e,t){var n=wt.util.createBuffer(),s=Math.ceil(e.n.bitLength()/8);if(r.length>s-11){var i=new Error("Message is too long for PKCS#1 v1.5 padding.");throw i.length=r.length,i.max=s-11,i}n.putByte(0),n.putByte(t);var a=s-3-r.length,u;if(t===0||t===1){u=t===0?0:255;for(var c=0;c<a;++c)n.putByte(u)}else for(;a>0;){for(var l=0,h=wt.random.getBytes(a),c=0;c<a;++c)u=h.charCodeAt(c),u===0?++l:n.putByte(u);a=l}return n.putByte(0),n.putBytes(r),n}o(T4,"_encodePkcs1_v1_5");function mE(r,e,t,n){var s=Math.ceil(e.n.bitLength()/8),i=wt.util.createBuffer(r),a=i.getByte(),u=i.getByte();if(a!==0||t&&u!==0&&u!==1||!t&&u!=2||t&&u===0&&typeof n>"u")throw new Error("Encryption block is invalid.");var c=0;if(u===0){c=s-3-n;for(var l=0;l<c;++l)if(i.getByte()!==0)throw new Error("Encryption block is invalid.")}else if(u===1)for(c=0;i.length()>1;){if(i.getByte()!==255){--i.read;break}++c}else if(u===2)for(c=0;i.length()>1;){if(i.getByte()===0){--i.read;break}++c}var h=i.getByte();if(h!==0||c!==s-3-i.length())throw new Error("Encryption block is invalid.");return i.getBytes()}o(mE,"_decodePkcs1_v1_5");function Oee(r,e,t){typeof e=="function"&&(t=e,e={}),e=e||{};var n={algorithm:{name:e.algorithm||"PRIMEINC",options:{workers:e.workers||2,workLoad:e.workLoad||100,workerScript:e.workerScript}}};"prng"in e&&(n.prng=e.prng),s();function s(){i(r.pBits,function(u,c){if(u)return t(u);if(r.p=c,r.q!==null)return a(u,r.q);i(r.qBits,a)})}o(s,"generate");function i(u,c){wt.prime.generateProbablePrime(u,n,c)}o(i,"getPrime");function a(u,c){if(u)return t(u);if(r.q=c,r.p.compareTo(r.q)<0){var l=r.p;r.p=r.q,r.q=l}if(r.p.subtract(ur.ONE).gcd(r.e).compareTo(ur.ONE)!==0){r.p=null,s();return}if(r.q.subtract(ur.ONE).gcd(r.e).compareTo(ur.ONE)!==0){r.q=null,i(r.qBits,a);return}if(r.p1=r.p.subtract(ur.ONE),r.q1=r.q.subtract(ur.ONE),r.phi=r.p1.multiply(r.q1),r.phi.gcd(r.e).compareTo(ur.ONE)!==0){r.p=r.q=null,s();return}if(r.n=r.p.multiply(r.q),r.n.bitLength()!==r.bits){r.q=null,i(r.qBits,a);return}var h=r.e.modInverse(r.phi);r.keys={privateKey:Mt.rsa.setPrivateKey(r.n,r.e,h,r.p,r.q,h.mod(r.p1),h.mod(r.q1),r.q.modInverse(r.p)),publicKey:Mt.rsa.setPublicKey(r.n,r.e)},t(null,r.keys)}o(a,"finish")}o(Oee,"_generateKeyPair");function Wa(r){var e=r.toString(16);e[0]>="8"&&(e="00"+e);var t=wt.util.hexToBytes(e);return t.length>1&&(t.charCodeAt(0)===0&&(t.charCodeAt(1)&128)===0||t.charCodeAt(0)===255&&(t.charCodeAt(1)&128)===128)?t.substr(1):t}o(Wa,"_bnToBytes");function Pee(r){return r<=100?27:r<=150?18:r<=200?15:r<=250?12:r<=300?9:r<=350?8:r<=400?7:r<=500?6:r<=600?5:r<=800?4:r<=1250?3:2}o(Pee,"_getMillerRabinTests");function S4(r){return wt.util.isNodejs&&typeof dT[r]=="function"}o(S4,"_detectNodeCrypto");function b4(r){return typeof Pi.globalScope<"u"&&typeof Pi.globalScope.crypto=="object"&&typeof Pi.globalScope.crypto.subtle=="object"&&typeof Pi.globalScope.crypto.subtle[r]=="function"}o(b4,"_detectSubtleCrypto");function A4(r){return typeof Pi.globalScope<"u"&&typeof Pi.globalScope.msCrypto=="object"&&typeof Pi.globalScope.msCrypto.subtle=="object"&&typeof Pi.globalScope.msCrypto.subtle[r]=="function"}o(A4,"_detectSubtleMsCrypto");function C4(r){for(var e=wt.util.hexToBytes(r.toString(16)),t=new Uint8Array(e.length),n=0;n<e.length;++n)t[n]=e.charCodeAt(n);return t}o(C4,"_intToUint8Array")});var mT=te((Iye,O4)=>{"use strict";var ct=zt();Xu();la();_g();Ma();Wu();lE();zl();Ri();aT();Rg();pr();typeof _4>"u"&&(_4=ct.jsbn.BigInteger);var _4,Ne=ct.asn1,$t=ct.pki=ct.pki||{};O4.exports=$t.pbe=ct.pbe=ct.pbe||{};var Ql=$t.oids,kee={name:"EncryptedPrivateKeyInfo",tagClass:Ne.Class.UNIVERSAL,type:Ne.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedPrivateKeyInfo.encryptionAlgorithm",tagClass:Ne.Class.UNIVERSAL,type:Ne.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:Ne.Class.UNIVERSAL,type:Ne.Type.OID,constructed:!1,capture:"encryptionOid"},{name:"AlgorithmIdentifier.parameters",tagClass:Ne.Class.UNIVERSAL,type:Ne.Type.SEQUENCE,constructed:!0,captureAsn1:"encryptionParams"}]},{name:"EncryptedPrivateKeyInfo.encryptedData",tagClass:Ne.Class.UNIVERSAL,type:Ne.Type.OCTETSTRING,constructed:!1,capture:"encryptedData"}]},Lee={name:"PBES2Algorithms",tagClass:Ne.Class.UNIVERSAL,type:Ne.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc",tagClass:Ne.Class.UNIVERSAL,type:Ne.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc.oid",tagClass:Ne.Class.UNIVERSAL,type:Ne.Type.OID,constructed:!1,capture:"kdfOid"},{name:"PBES2Algorithms.params",tagClass:Ne.Class.UNIVERSAL,type:Ne.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.params.salt",tagClass:Ne.Class.UNIVERSAL,type:Ne.Type.OCTETSTRING,constructed:!1,capture:"kdfSalt"},{name:"PBES2Algorithms.params.iterationCount",tagClass:Ne.Class.UNIVERSAL,type:Ne.Type.INTEGER,constructed:!1,capture:"kdfIterationCount"},{name:"PBES2Algorithms.params.keyLength",tagClass:Ne.Class.UNIVERSAL,type:Ne.Type.INTEGER,constructed:!1,optional:!0,capture:"keyLength"},{name:"PBES2Algorithms.params.prf",tagClass:Ne.Class.UNIVERSAL,type:Ne.Type.SEQUENCE,constructed:!0,optional:!0,value:[{name:"PBES2Algorithms.params.prf.algorithm",tagClass:Ne.Class.UNIVERSAL,type:Ne.Type.OID,constructed:!1,capture:"prfOid"}]}]}]},{name:"PBES2Algorithms.encryptionScheme",tagClass:Ne.Class.UNIVERSAL,type:Ne.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.encryptionScheme.oid",tagClass:Ne.Class.UNIVERSAL,type:Ne.Type.OID,constructed:!1,capture:"encOid"},{name:"PBES2Algorithms.encryptionScheme.iv",tagClass:Ne.Class.UNIVERSAL,type:Ne.Type.OCTETSTRING,constructed:!1,capture:"encIv"}]}]},Vee={name:"pkcs-12PbeParams",tagClass:Ne.Class.UNIVERSAL,type:Ne.Type.SEQUENCE,constructed:!0,value:[{name:"pkcs-12PbeParams.salt",tagClass:Ne.Class.UNIVERSAL,type:Ne.Type.OCTETSTRING,constructed:!1,capture:"salt"},{name:"pkcs-12PbeParams.iterations",tagClass:Ne.Class.UNIVERSAL,type:Ne.Type.INTEGER,constructed:!1,capture:"iterations"}]};$t.encryptPrivateKeyInfo=function(r,e,t){t=t||{},t.saltSize=t.saltSize||8,t.count=t.count||2048,t.algorithm=t.algorithm||"aes128",t.prfAlgorithm=t.prfAlgorithm||"sha1";var n=ct.random.getBytesSync(t.saltSize),s=t.count,i=Ne.integerToDer(s),a,u,c;if(t.algorithm.indexOf("aes")===0||t.algorithm==="des"){var l,h,m;switch(t.algorithm){case"aes128":a=16,l=16,h=Ql["aes128-CBC"],m=ct.aes.createEncryptionCipher;break;case"aes192":a=24,l=16,h=Ql["aes192-CBC"],m=ct.aes.createEncryptionCipher;break;case"aes256":a=32,l=16,h=Ql["aes256-CBC"],m=ct.aes.createEncryptionCipher;break;case"des":a=8,l=8,h=Ql.desCBC,m=ct.des.createEncryptionCipher;break;default:var g=new Error("Cannot encrypt private key. Unknown encryption algorithm.");throw g.algorithm=t.algorithm,g}var y="hmacWith"+t.prfAlgorithm.toUpperCase(),v=R4(y),E=ct.pkcs5.pbkdf2(e,n,s,a,v),w=ct.random.getBytesSync(l),C=m(E);C.start(w),C.update(Ne.toDer(r)),C.finish(),c=C.output.getBytes();var _=Uee(n,i,a,y);u=Ne.create(Ne.Class.UNIVERSAL,Ne.Type.SEQUENCE,!0,[Ne.create(Ne.Class.UNIVERSAL,Ne.Type.OID,!1,Ne.oidToDer(Ql.pkcs5PBES2).getBytes()),Ne.create(Ne.Class.UNIVERSAL,Ne.Type.SEQUENCE,!0,[Ne.create(Ne.Class.UNIVERSAL,Ne.Type.SEQUENCE,!0,[Ne.create(Ne.Class.UNIVERSAL,Ne.Type.OID,!1,Ne.oidToDer(Ql.pkcs5PBKDF2).getBytes()),_]),Ne.create(Ne.Class.UNIVERSAL,Ne.Type.SEQUENCE,!0,[Ne.create(Ne.Class.UNIVERSAL,Ne.Type.OID,!1,Ne.oidToDer(h).getBytes()),Ne.create(Ne.Class.UNIVERSAL,Ne.Type.OCTETSTRING,!1,w)])])])}else if(t.algorithm==="3des"){a=24;var b=new ct.util.ByteBuffer(n),E=$t.pbe.generatePkcs12Key(e,b,1,s,a),w=$t.pbe.generatePkcs12Key(e,b,2,s,a),C=ct.des.createEncryptionCipher(E);C.start(w),C.update(Ne.toDer(r)),C.finish(),c=C.output.getBytes(),u=Ne.create(Ne.Class.UNIVERSAL,Ne.Type.SEQUENCE,!0,[Ne.create(Ne.Class.UNIVERSAL,Ne.Type.OID,!1,Ne.oidToDer(Ql["pbeWithSHAAnd3-KeyTripleDES-CBC"]).getBytes()),Ne.create(Ne.Class.UNIVERSAL,Ne.Type.SEQUENCE,!0,[Ne.create(Ne.Class.UNIVERSAL,Ne.Type.OCTETSTRING,!1,n),Ne.create(Ne.Class.UNIVERSAL,Ne.Type.INTEGER,!1,i.getBytes())])])}else{var g=new Error("Cannot encrypt private key. Unknown encryption algorithm.");throw g.algorithm=t.algorithm,g}var A=Ne.create(Ne.Class.UNIVERSAL,Ne.Type.SEQUENCE,!0,[u,Ne.create(Ne.Class.UNIVERSAL,Ne.Type.OCTETSTRING,!1,c)]);return A};$t.decryptPrivateKeyInfo=function(r,e){var t=null,n={},s=[];if(!Ne.validate(r,kee,n,s)){var i=new Error("Cannot read encrypted private key. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw i.errors=s,i}var a=Ne.derToOid(n.encryptionOid),u=$t.pbe.getCipher(a,n.encryptionParams,e),c=ct.util.createBuffer(n.encryptedData);return u.update(c),u.finish()&&(t=Ne.fromDer(u.output)),t};$t.encryptedPrivateKeyToPem=function(r,e){var t={type:"ENCRYPTED PRIVATE KEY",body:Ne.toDer(r).getBytes()};return ct.pem.encode(t,{maxline:e})};$t.encryptedPrivateKeyFromPem=function(r){var e=ct.pem.decode(r)[0];if(e.type!=="ENCRYPTED PRIVATE KEY"){var t=new Error('Could not convert encrypted private key from PEM; PEM header type is "ENCRYPTED PRIVATE KEY".');throw t.headerType=e.type,t}if(e.procType&&e.procType.type==="ENCRYPTED")throw new Error("Could not convert encrypted private key from PEM; PEM is encrypted.");return Ne.fromDer(e.body)};$t.encryptRsaPrivateKey=function(r,e,t){if(t=t||{},!t.legacy){var n=$t.wrapRsaPrivateKey($t.privateKeyToAsn1(r));return n=$t.encryptPrivateKeyInfo(n,e,t),$t.encryptedPrivateKeyToPem(n)}var s,i,a,u;switch(t.algorithm){case"aes128":s="AES-128-CBC",a=16,i=ct.random.getBytesSync(16),u=ct.aes.createEncryptionCipher;break;case"aes192":s="AES-192-CBC",a=24,i=ct.random.getBytesSync(16),u=ct.aes.createEncryptionCipher;break;case"aes256":s="AES-256-CBC",a=32,i=ct.random.getBytesSync(16),u=ct.aes.createEncryptionCipher;break;case"3des":s="DES-EDE3-CBC",a=24,i=ct.random.getBytesSync(8),u=ct.des.createEncryptionCipher;break;case"des":s="DES-CBC",a=8,i=ct.random.getBytesSync(8),u=ct.des.createEncryptionCipher;break;default:var c=new Error('Could not encrypt RSA private key; unsupported encryption algorithm "'+t.algorithm+'".');throw c.algorithm=t.algorithm,c}var l=ct.pbe.opensslDeriveBytes(e,i.substr(0,8),a),h=u(l);h.start(i),h.update(Ne.toDer($t.privateKeyToAsn1(r))),h.finish();var m={type:"RSA PRIVATE KEY",procType:{version:"4",type:"ENCRYPTED"},dekInfo:{algorithm:s,parameters:ct.util.bytesToHex(i).toUpperCase()},body:h.output.getBytes()};return ct.pem.encode(m)};$t.decryptRsaPrivateKey=function(r,e){var t=null,n=ct.pem.decode(r)[0];if(n.type!=="ENCRYPTED PRIVATE KEY"&&n.type!=="PRIVATE KEY"&&n.type!=="RSA PRIVATE KEY"){var s=new Error('Could not convert private key from PEM; PEM header type is not "ENCRYPTED PRIVATE KEY", "PRIVATE KEY", or "RSA PRIVATE KEY".');throw s.headerType=s,s}if(n.procType&&n.procType.type==="ENCRYPTED"){var i,a;switch(n.dekInfo.algorithm){case"DES-CBC":i=8,a=ct.des.createDecryptionCipher;break;case"DES-EDE3-CBC":i=24,a=ct.des.createDecryptionCipher;break;case"AES-128-CBC":i=16,a=ct.aes.createDecryptionCipher;break;case"AES-192-CBC":i=24,a=ct.aes.createDecryptionCipher;break;case"AES-256-CBC":i=32,a=ct.aes.createDecryptionCipher;break;case"RC2-40-CBC":i=5,a=o(function(m){return ct.rc2.createDecryptionCipher(m,40)},"cipherFn");break;case"RC2-64-CBC":i=8,a=o(function(m){return ct.rc2.createDecryptionCipher(m,64)},"cipherFn");break;case"RC2-128-CBC":i=16,a=o(function(m){return ct.rc2.createDecryptionCipher(m,128)},"cipherFn");break;default:var s=new Error('Could not decrypt private key; unsupported encryption algorithm "'+n.dekInfo.algorithm+'".');throw s.algorithm=n.dekInfo.algorithm,s}var u=ct.util.hexToBytes(n.dekInfo.parameters),c=ct.pbe.opensslDeriveBytes(e,u.substr(0,8),i),l=a(c);if(l.start(u),l.update(ct.util.createBuffer(n.body)),l.finish())t=l.output.getBytes();else return t}else t=n.body;return n.type==="ENCRYPTED PRIVATE KEY"?t=$t.decryptPrivateKeyInfo(Ne.fromDer(t),e):t=Ne.fromDer(t),t!==null&&(t=$t.privateKeyFromAsn1(t)),t};$t.pbe.generatePkcs12Key=function(r,e,t,n,s,i){var a,u;if(typeof i>"u"||i===null){if(!("sha1"in ct.md))throw new Error('"sha1" hash algorithm unavailable.');i=ct.md.sha1.create()}var c=i.digestLength,l=i.blockLength,h=new ct.util.ByteBuffer,m=new ct.util.ByteBuffer;if(r!=null){for(u=0;u<r.length;u++)m.putInt16(r.charCodeAt(u));m.putInt16(0)}var g=m.length(),y=e.length(),v=new ct.util.ByteBuffer;v.fillWithByte(t,l);var E=l*Math.ceil(y/l),w=new ct.util.ByteBuffer;for(u=0;u<E;u++)w.putByte(e.at(u%y));var C=l*Math.ceil(g/l),_=new ct.util.ByteBuffer;for(u=0;u<C;u++)_.putByte(m.at(u%g));var b=w;b.putBuffer(_);for(var A=Math.ceil(s/c),T=1;T<=A;T++){var B=new ct.util.ByteBuffer;B.putBytes(v.bytes()),B.putBytes(b.bytes());for(var M=0;M<n;M++)i.start(),i.update(B.getBytes()),B=i.digest();var I=new ct.util.ByteBuffer;for(u=0;u<l;u++)I.putByte(B.at(u%c));var H=Math.ceil(y/l)+Math.ceil(g/l),K=new ct.util.ByteBuffer;for(a=0;a<H;a++){var q=new ct.util.ByteBuffer(b.getBytes(l)),W=511;for(u=I.length()-1;u>=0;u--)W=W>>8,W+=I.at(u)+q.at(u),q.setAt(u,W&255);K.putBuffer(q)}b=K,h.putBuffer(B)}return h.truncate(h.length()-s),h};$t.pbe.getCipher=function(r,e,t){switch(r){case $t.oids.pkcs5PBES2:return $t.pbe.getCipherForPBES2(r,e,t);case $t.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:case $t.oids["pbewithSHAAnd40BitRC2-CBC"]:return $t.pbe.getCipherForPKCS12PBE(r,e,t);default:var n=new Error("Cannot read encrypted PBE data block. Unsupported OID.");throw n.oid=r,n.supportedOids=["pkcs5PBES2","pbeWithSHAAnd3-KeyTripleDES-CBC","pbewithSHAAnd40BitRC2-CBC"],n}};$t.pbe.getCipherForPBES2=function(r,e,t){var n={},s=[];if(!Ne.validate(e,Lee,n,s)){var i=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw i.errors=s,i}if(r=Ne.derToOid(n.kdfOid),r!==$t.oids.pkcs5PBKDF2){var i=new Error("Cannot read encrypted private key. Unsupported key derivation function OID.");throw i.oid=r,i.supportedOids=["pkcs5PBKDF2"],i}if(r=Ne.derToOid(n.encOid),r!==$t.oids["aes128-CBC"]&&r!==$t.oids["aes192-CBC"]&&r!==$t.oids["aes256-CBC"]&&r!==$t.oids["des-EDE3-CBC"]&&r!==$t.oids.desCBC){var i=new Error("Cannot read encrypted private key. Unsupported encryption scheme OID.");throw i.oid=r,i.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],i}var a=n.kdfSalt,u=ct.util.createBuffer(n.kdfIterationCount);u=u.getInt(u.length()<<3);var c,l;switch($t.oids[r]){case"aes128-CBC":c=16,l=ct.aes.createDecryptionCipher;break;case"aes192-CBC":c=24,l=ct.aes.createDecryptionCipher;break;case"aes256-CBC":c=32,l=ct.aes.createDecryptionCipher;break;case"des-EDE3-CBC":c=24,l=ct.des.createDecryptionCipher;break;case"desCBC":c=8,l=ct.des.createDecryptionCipher;break}var h=B4(n.prfOid),m=ct.pkcs5.pbkdf2(t,a,u,c,h),g=n.encIv,y=l(m);return y.start(g),y};$t.pbe.getCipherForPKCS12PBE=function(r,e,t){var n={},s=[];if(!Ne.validate(e,Vee,n,s)){var i=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw i.errors=s,i}var a=ct.util.createBuffer(n.salt),u=ct.util.createBuffer(n.iterations);u=u.getInt(u.length()<<3);var c,l,h;switch(r){case $t.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:c=24,l=8,h=ct.des.startDecrypting;break;case $t.oids["pbewithSHAAnd40BitRC2-CBC"]:c=5,l=8,h=o(function(E,w){var C=ct.rc2.createDecryptionCipher(E,40);return C.start(w,null),C},"cipherFn");break;default:var i=new Error("Cannot read PKCS #12 PBE data block. Unsupported OID.");throw i.oid=r,i}var m=B4(n.prfOid),g=$t.pbe.generatePkcs12Key(t,a,1,u,c,m);m.start();var y=$t.pbe.generatePkcs12Key(t,a,2,u,l,m);return h(g,y)};$t.pbe.opensslDeriveBytes=function(r,e,t,n){if(typeof n>"u"||n===null){if(!("md5"in ct.md))throw new Error('"md5" hash algorithm unavailable.');n=ct.md.md5.create()}e===null&&(e="");for(var s=[D4(n,r+e)],i=16,a=1;i<t;++a,i+=16)s.push(D4(n,s[a-1]+r+e));return s.join("").substr(0,t)};function D4(r,e){return r.start().update(e).digest().getBytes()}o(D4,"hash");function B4(r){var e;if(!r)e="hmacWithSHA1";else if(e=$t.oids[Ne.derToOid(r)],!e){var t=new Error("Unsupported PRF OID.");throw t.oid=r,t.supported=["hmacWithSHA1","hmacWithSHA224","hmacWithSHA256","hmacWithSHA384","hmacWithSHA512"],t}return R4(e)}o(B4,"prfOidToMessageDigest");function R4(r){var e=ct.md;switch(r){case"hmacWithSHA224":e=ct.md.sha512;case"hmacWithSHA1":case"hmacWithSHA256":case"hmacWithSHA384":case"hmacWithSHA512":r=r.substr(8).toLowerCase();break;default:var t=new Error("Unsupported PRF algorithm.");throw t.algorithm=r,t.supported=["hmacWithSHA1","hmacWithSHA224","hmacWithSHA256","hmacWithSHA384","hmacWithSHA512"],t}if(!e||!(r in e))throw new Error("Unknown hash algorithm: "+r);return e[r].create()}o(R4,"prfAlgorithmToMessageDigest");function Uee(r,e,t,n){var s=Ne.create(Ne.Class.UNIVERSAL,Ne.Type.SEQUENCE,!0,[Ne.create(Ne.Class.UNIVERSAL,Ne.Type.OCTETSTRING,!1,r),Ne.create(Ne.Class.UNIVERSAL,Ne.Type.INTEGER,!1,e.getBytes())]);return n!=="hmacWithSHA1"&&s.value.push(Ne.create(Ne.Class.UNIVERSAL,Ne.Type.INTEGER,!1,ct.util.hexToBytes(t.toString(16))),Ne.create(Ne.Class.UNIVERSAL,Ne.Type.SEQUENCE,!0,[Ne.create(Ne.Class.UNIVERSAL,Ne.Type.OID,!1,Ne.oidToDer($t.oids[n]).getBytes()),Ne.create(Ne.Class.UNIVERSAL,Ne.Type.NULL,!1,"")])),s}o(Uee,"createPbkdf2Params")});var gT=te((Dye,L4)=>{"use strict";var Vp=zt();la();pr();var at=Vp.asn1,Up=L4.exports=Vp.pkcs7asn1=Vp.pkcs7asn1||{};Vp.pkcs7=Vp.pkcs7||{};Vp.pkcs7.asn1=Up;var P4={name:"ContentInfo",tagClass:at.Class.UNIVERSAL,type:at.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.ContentType",tagClass:at.Class.UNIVERSAL,type:at.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:at.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,captureAsn1:"content"}]};Up.contentInfoValidator=P4;var k4={name:"EncryptedContentInfo",tagClass:at.Class.UNIVERSAL,type:at.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentType",tagClass:at.Class.UNIVERSAL,type:at.Type.OID,constructed:!1,capture:"contentType"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm",tagClass:at.Class.UNIVERSAL,type:at.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentEncryptionAlgorithm.algorithm",tagClass:at.Class.UNIVERSAL,type:at.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm.parameter",tagClass:at.Class.UNIVERSAL,captureAsn1:"encParameter"}]},{name:"EncryptedContentInfo.encryptedContent",tagClass:at.Class.CONTEXT_SPECIFIC,type:0,capture:"encryptedContent",captureAsn1:"encryptedContentAsn1"}]};Up.envelopedDataValidator={name:"EnvelopedData",tagClass:at.Class.UNIVERSAL,type:at.Type.SEQUENCE,constructed:!0,value:[{name:"EnvelopedData.Version",tagClass:at.Class.UNIVERSAL,type:at.Type.INTEGER,constructed:!1,capture:"version"},{name:"EnvelopedData.RecipientInfos",tagClass:at.Class.UNIVERSAL,type:at.Type.SET,constructed:!0,captureAsn1:"recipientInfos"}].concat(k4)};Up.encryptedDataValidator={name:"EncryptedData",tagClass:at.Class.UNIVERSAL,type:at.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedData.Version",tagClass:at.Class.UNIVERSAL,type:at.Type.INTEGER,constructed:!1,capture:"version"}].concat(k4)};var jee={name:"SignerInfo",tagClass:at.Class.UNIVERSAL,type:at.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.version",tagClass:at.Class.UNIVERSAL,type:at.Type.INTEGER,constructed:!1},{name:"SignerInfo.issuerAndSerialNumber",tagClass:at.Class.UNIVERSAL,type:at.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.issuerAndSerialNumber.issuer",tagClass:at.Class.UNIVERSAL,type:at.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"SignerInfo.issuerAndSerialNumber.serialNumber",tagClass:at.Class.UNIVERSAL,type:at.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"SignerInfo.digestAlgorithm",tagClass:at.Class.UNIVERSAL,type:at.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.digestAlgorithm.algorithm",tagClass:at.Class.UNIVERSAL,type:at.Type.OID,constructed:!1,capture:"digestAlgorithm"},{name:"SignerInfo.digestAlgorithm.parameter",tagClass:at.Class.UNIVERSAL,constructed:!1,captureAsn1:"digestParameter",optional:!0}]},{name:"SignerInfo.authenticatedAttributes",tagClass:at.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"authenticatedAttributes"},{name:"SignerInfo.digestEncryptionAlgorithm",tagClass:at.Class.UNIVERSAL,type:at.Type.SEQUENCE,constructed:!0,capture:"signatureAlgorithm"},{name:"SignerInfo.encryptedDigest",tagClass:at.Class.UNIVERSAL,type:at.Type.OCTETSTRING,constructed:!1,capture:"signature"},{name:"SignerInfo.unauthenticatedAttributes",tagClass:at.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,capture:"unauthenticatedAttributes"}]};Up.signedDataValidator={name:"SignedData",tagClass:at.Class.UNIVERSAL,type:at.Type.SEQUENCE,constructed:!0,value:[{name:"SignedData.Version",tagClass:at.Class.UNIVERSAL,type:at.Type.INTEGER,constructed:!1,capture:"version"},{name:"SignedData.DigestAlgorithms",tagClass:at.Class.UNIVERSAL,type:at.Type.SET,constructed:!0,captureAsn1:"digestAlgorithms"},P4,{name:"SignedData.Certificates",tagClass:at.Class.CONTEXT_SPECIFIC,type:0,optional:!0,captureAsn1:"certificates"},{name:"SignedData.CertificateRevocationLists",tagClass:at.Class.CONTEXT_SPECIFIC,type:1,optional:!0,captureAsn1:"crls"},{name:"SignedData.SignerInfos",tagClass:at.Class.UNIVERSAL,type:at.Type.SET,capture:"signerInfos",optional:!0,value:[jee]}]};Up.recipientInfoValidator={name:"RecipientInfo",tagClass:at.Class.UNIVERSAL,type:at.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.version",tagClass:at.Class.UNIVERSAL,type:at.Type.INTEGER,constructed:!1,capture:"version"},{name:"RecipientInfo.issuerAndSerial",tagClass:at.Class.UNIVERSAL,type:at.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.issuerAndSerial.issuer",tagClass:at.Class.UNIVERSAL,type:at.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"RecipientInfo.issuerAndSerial.serialNumber",tagClass:at.Class.UNIVERSAL,type:at.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"RecipientInfo.keyEncryptionAlgorithm",tagClass:at.Class.UNIVERSAL,type:at.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.keyEncryptionAlgorithm.algorithm",tagClass:at.Class.UNIVERSAL,type:at.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"RecipientInfo.keyEncryptionAlgorithm.parameter",tagClass:at.Class.UNIVERSAL,constructed:!1,captureAsn1:"encParameter",optional:!0}]},{name:"RecipientInfo.encryptedKey",tagClass:at.Class.UNIVERSAL,type:at.Type.OCTETSTRING,constructed:!1,capture:"encKey"}]}});var vT=te((Bye,V4)=>{"use strict";var Zl=zt();pr();Zl.mgf=Zl.mgf||{};var Fee=V4.exports=Zl.mgf.mgf1=Zl.mgf1=Zl.mgf1||{};Fee.create=function(r){var e={generate:o(function(t,n){for(var s=new Zl.util.ByteBuffer,i=Math.ceil(n/r.digestLength),a=0;a<i;a++){var u=new Zl.util.ByteBuffer;u.putInt32(a),r.start(),r.update(t+u.getBytes()),s.putBuffer(r.digest())}return s.truncate(s.length()-n),s.getBytes()},"generate")};return e}});var j4=te((Oye,U4)=>{"use strict";var gE=zt();vT();U4.exports=gE.mgf=gE.mgf||{};gE.mgf.mgf1=gE.mgf1});var vE=te((Pye,F4)=>{"use strict";var ef=zt();Ri();pr();var Mee=F4.exports=ef.pss=ef.pss||{};Mee.create=function(r){arguments.length===3&&(r={md:arguments[0],mgf:arguments[1],saltLength:arguments[2]});var e=r.md,t=r.mgf,n=e.digestLength,s=r.salt||null;typeof s=="string"&&(s=ef.util.createBuffer(s));var i;if("saltLength"in r)i=r.saltLength;else if(s!==null)i=s.length();else throw new Error("Salt length not specified or specific salt not given.");if(s!==null&&s.length()!==i)throw new Error("Given salt length does not match length of given salt.");var a=r.prng||ef.random,u={};return u.encode=function(c,l){var h,m=l-1,g=Math.ceil(m/8),y=c.digest().getBytes();if(g<n+i+2)throw new Error("Message is too long to encrypt.");var v;s===null?v=a.getBytesSync(i):v=s.bytes();var E=new ef.util.ByteBuffer;E.fillWithByte(0,8),E.putBytes(y),E.putBytes(v),e.start(),e.update(E.getBytes());var w=e.digest().getBytes(),C=new ef.util.ByteBuffer;C.fillWithByte(0,g-i-n-2),C.putByte(1),C.putBytes(v);var _=C.getBytes(),b=g-n-1,A=t.generate(w,b),T="";for(h=0;h<b;h++)T+=String.fromCharCode(_.charCodeAt(h)^A.charCodeAt(h));var B=65280>>8*g-m&255;return T=String.fromCharCode(T.charCodeAt(0)&~B)+T.substr(1),T+w+"\xBC"},u.verify=function(c,l,h){var m,g=h-1,y=Math.ceil(g/8);if(l=l.substr(-y),y<n+i+2)throw new Error("Inconsistent parameters to PSS signature verification.");if(l.charCodeAt(y-1)!==188)throw new Error("Encoded message does not end in 0xBC.");var v=y-n-1,E=l.substr(0,v),w=l.substr(v,n),C=65280>>8*y-g&255;if((E.charCodeAt(0)&C)!==0)throw new Error("Bits beyond keysize not zero as expected.");var _=t.generate(w,v),b="";for(m=0;m<v;m++)b+=String.fromCharCode(E.charCodeAt(m)^_.charCodeAt(m));b=String.fromCharCode(b.charCodeAt(0)&~C)+b.substr(1);var A=y-n-i-2;for(m=0;m<A;m++)if(b.charCodeAt(m)!==0)throw new Error("Leftmost octets not zero as expected");if(b.charCodeAt(A)!==1)throw new Error("Inconsistent PSS signature, 0x01 marker not found");var T=b.substr(-i),B=new ef.util.ByteBuffer;B.fillWithByte(0,8),B.putBytes(c),B.putBytes(T),e.start(),e.update(B.getBytes());var M=e.digest().getBytes();return w===M},u}});var wE=te((kye,$4)=>{"use strict";var Et=zt();Xu();la();_g();Ma();j4();Wu();zl();vE();Rg();pr();var L=Et.asn1,ze=$4.exports=Et.pki=Et.pki||{},cr=ze.oids,on={};on.CN=cr.commonName;on.commonName="CN";on.C=cr.countryName;on.countryName="C";on.L=cr.localityName;on.localityName="L";on.ST=cr.stateOrProvinceName;on.stateOrProvinceName="ST";on.O=cr.organizationName;on.organizationName="O";on.OU=cr.organizationalUnitName;on.organizationalUnitName="OU";on.E=cr.emailAddress;on.emailAddress="E";var q4=Et.pki.rsa.publicKeyValidator,qee={name:"Certificate",tagClass:L.Class.UNIVERSAL,type:L.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate",tagClass:L.Class.UNIVERSAL,type:L.Type.SEQUENCE,constructed:!0,captureAsn1:"tbsCertificate",value:[{name:"Certificate.TBSCertificate.version",tagClass:L.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.version.integer",tagClass:L.Class.UNIVERSAL,type:L.Type.INTEGER,constructed:!1,capture:"certVersion"}]},{name:"Certificate.TBSCertificate.serialNumber",tagClass:L.Class.UNIVERSAL,type:L.Type.INTEGER,constructed:!1,capture:"certSerialNumber"},{name:"Certificate.TBSCertificate.signature",tagClass:L.Class.UNIVERSAL,type:L.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.signature.algorithm",tagClass:L.Class.UNIVERSAL,type:L.Type.OID,constructed:!1,capture:"certinfoSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:L.Class.UNIVERSAL,optional:!0,captureAsn1:"certinfoSignatureParams"}]},{name:"Certificate.TBSCertificate.issuer",tagClass:L.Class.UNIVERSAL,type:L.Type.SEQUENCE,constructed:!0,captureAsn1:"certIssuer"},{name:"Certificate.TBSCertificate.validity",tagClass:L.Class.UNIVERSAL,type:L.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.validity.notBefore (utc)",tagClass:L.Class.UNIVERSAL,type:L.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity1UTCTime"},{name:"Certificate.TBSCertificate.validity.notBefore (generalized)",tagClass:L.Class.UNIVERSAL,type:L.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity2GeneralizedTime"},{name:"Certificate.TBSCertificate.validity.notAfter (utc)",tagClass:L.Class.UNIVERSAL,type:L.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity3UTCTime"},{name:"Certificate.TBSCertificate.validity.notAfter (generalized)",tagClass:L.Class.UNIVERSAL,type:L.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity4GeneralizedTime"}]},{name:"Certificate.TBSCertificate.subject",tagClass:L.Class.UNIVERSAL,type:L.Type.SEQUENCE,constructed:!0,captureAsn1:"certSubject"},q4,{name:"Certificate.TBSCertificate.issuerUniqueID",tagClass:L.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.issuerUniqueID.id",tagClass:L.Class.UNIVERSAL,type:L.Type.BITSTRING,constructed:!1,captureBitStringValue:"certIssuerUniqueId"}]},{name:"Certificate.TBSCertificate.subjectUniqueID",tagClass:L.Class.CONTEXT_SPECIFIC,type:2,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.subjectUniqueID.id",tagClass:L.Class.UNIVERSAL,type:L.Type.BITSTRING,constructed:!1,captureBitStringValue:"certSubjectUniqueId"}]},{name:"Certificate.TBSCertificate.extensions",tagClass:L.Class.CONTEXT_SPECIFIC,type:3,constructed:!0,captureAsn1:"certExtensions",optional:!0}]},{name:"Certificate.signatureAlgorithm",tagClass:L.Class.UNIVERSAL,type:L.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.signatureAlgorithm.algorithm",tagClass:L.Class.UNIVERSAL,type:L.Type.OID,constructed:!1,capture:"certSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:L.Class.UNIVERSAL,optional:!0,captureAsn1:"certSignatureParams"}]},{name:"Certificate.signatureValue",tagClass:L.Class.UNIVERSAL,type:L.Type.BITSTRING,constructed:!1,captureBitStringValue:"certSignature"}]},Hee={name:"rsapss",tagClass:L.Class.UNIVERSAL,type:L.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.hashAlgorithm",tagClass:L.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier",tagClass:L.Class.UNIVERSAL,type:L.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier.algorithm",tagClass:L.Class.UNIVERSAL,type:L.Type.OID,constructed:!1,capture:"hashOid"}]}]},{name:"rsapss.maskGenAlgorithm",tagClass:L.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier",tagClass:L.Class.UNIVERSAL,type:L.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.algorithm",tagClass:L.Class.UNIVERSAL,type:L.Type.OID,constructed:!1,capture:"maskGenOid"},{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params",tagClass:L.Class.UNIVERSAL,type:L.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params.algorithm",tagClass:L.Class.UNIVERSAL,type:L.Type.OID,constructed:!1,capture:"maskGenHashOid"}]}]}]},{name:"rsapss.saltLength",tagClass:L.Class.CONTEXT_SPECIFIC,type:2,optional:!0,value:[{name:"rsapss.saltLength.saltLength",tagClass:L.Class.UNIVERSAL,type:L.Class.INTEGER,constructed:!1,capture:"saltLength"}]},{name:"rsapss.trailerField",tagClass:L.Class.CONTEXT_SPECIFIC,type:3,optional:!0,value:[{name:"rsapss.trailer.trailer",tagClass:L.Class.UNIVERSAL,type:L.Class.INTEGER,constructed:!1,capture:"trailer"}]}]},Kee={name:"CertificationRequestInfo",tagClass:L.Class.UNIVERSAL,type:L.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfo",value:[{name:"CertificationRequestInfo.integer",tagClass:L.Class.UNIVERSAL,type:L.Type.INTEGER,constructed:!1,capture:"certificationRequestInfoVersion"},{name:"CertificationRequestInfo.subject",tagClass:L.Class.UNIVERSAL,type:L.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfoSubject"},q4,{name:"CertificationRequestInfo.attributes",tagClass:L.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"certificationRequestInfoAttributes",value:[{name:"CertificationRequestInfo.attributes",tagClass:L.Class.UNIVERSAL,type:L.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequestInfo.attributes.type",tagClass:L.Class.UNIVERSAL,type:L.Type.OID,constructed:!1},{name:"CertificationRequestInfo.attributes.value",tagClass:L.Class.UNIVERSAL,type:L.Type.SET,constructed:!0}]}]}]},$ee={name:"CertificationRequest",tagClass:L.Class.UNIVERSAL,type:L.Type.SEQUENCE,constructed:!0,captureAsn1:"csr",value:[Kee,{name:"CertificationRequest.signatureAlgorithm",tagClass:L.Class.UNIVERSAL,type:L.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequest.signatureAlgorithm.algorithm",tagClass:L.Class.UNIVERSAL,type:L.Type.OID,constructed:!1,capture:"csrSignatureOid"},{name:"CertificationRequest.signatureAlgorithm.parameters",tagClass:L.Class.UNIVERSAL,optional:!0,captureAsn1:"csrSignatureParams"}]},{name:"CertificationRequest.signature",tagClass:L.Class.UNIVERSAL,type:L.Type.BITSTRING,constructed:!1,captureBitStringValue:"csrSignature"}]};ze.RDNAttributesAsArray=function(r,e){for(var t=[],n,s,i,a=0;a<r.value.length;++a){n=r.value[a];for(var u=0;u<n.value.length;++u)i={},s=n.value[u],i.type=L.derToOid(s.value[0].value),i.value=s.value[1].value,i.valueTagClass=s.value[1].type,i.type in cr&&(i.name=cr[i.type],i.name in on&&(i.shortName=on[i.name])),e&&(e.update(i.type),e.update(i.value)),t.push(i)}return t};ze.CRIAttributesAsArray=function(r){for(var e=[],t=0;t<r.length;++t)for(var n=r[t],s=L.derToOid(n.value[0].value),i=n.value[1].value,a=0;a<i.length;++a){var u={};if(u.type=s,u.value=i[a].value,u.valueTagClass=i[a].type,u.type in cr&&(u.name=cr[u.type],u.name in on&&(u.shortName=on[u.name])),u.type===cr.extensionRequest){u.extensions=[];for(var c=0;c<u.value.length;++c)u.extensions.push(ze.certificateExtensionFromAsn1(u.value[c]))}e.push(u)}return e};function Yu(r,e){typeof e=="string"&&(e={shortName:e});for(var t=null,n,s=0;t===null&&s<r.attributes.length;++s)n=r.attributes[s],(e.type&&e.type===n.type||e.name&&e.name===n.name||e.shortName&&e.shortName===n.shortName)&&(t=n);return t}o(Yu,"_getAttribute");var yE=o(function(r,e,t){var n={};if(r!==cr["RSASSA-PSS"])return n;t&&(n={hash:{algorithmOid:cr.sha1},mgf:{algorithmOid:cr.mgf1,hash:{algorithmOid:cr.sha1}},saltLength:20});var s={},i=[];if(!L.validate(e,Hee,s,i)){var a=new Error("Cannot read RSASSA-PSS parameter block.");throw a.errors=i,a}return s.hashOid!==void 0&&(n.hash=n.hash||{},n.hash.algorithmOid=L.derToOid(s.hashOid)),s.maskGenOid!==void 0&&(n.mgf=n.mgf||{},n.mgf.algorithmOid=L.derToOid(s.maskGenOid),n.mgf.hash=n.mgf.hash||{},n.mgf.hash.algorithmOid=L.derToOid(s.maskGenHashOid)),s.saltLength!==void 0&&(n.saltLength=s.saltLength.charCodeAt(0)),n},"_readSignatureParameters"),xE=o(function(r){switch(cr[r.signatureOid]){case"sha1WithRSAEncryption":case"sha1WithRSASignature":return Et.md.sha1.create();case"md5WithRSAEncryption":return Et.md.md5.create();case"sha256WithRSAEncryption":return Et.md.sha256.create();case"sha384WithRSAEncryption":return Et.md.sha384.create();case"sha512WithRSAEncryption":return Et.md.sha512.create();case"RSASSA-PSS":return Et.md.sha256.create();default:var e=new Error("Could not compute "+r.type+" digest. Unknown signature OID.");throw e.signatureOid=r.signatureOid,e}},"_createSignatureDigest"),H4=o(function(r){var e=r.certificate,t;switch(e.signatureOid){case cr.sha1WithRSAEncryption:case cr.sha1WithRSASignature:break;case cr["RSASSA-PSS"]:var n,s;if(n=cr[e.signatureParameters.mgf.hash.algorithmOid],n===void 0||Et.md[n]===void 0){var i=new Error("Unsupported MGF hash function.");throw i.oid=e.signatureParameters.mgf.hash.algorithmOid,i.name=n,i}if(s=cr[e.signatureParameters.mgf.algorithmOid],s===void 0||Et.mgf[s]===void 0){var i=new Error("Unsupported MGF function.");throw i.oid=e.signatureParameters.mgf.algorithmOid,i.name=s,i}if(s=Et.mgf[s].create(Et.md[n].create()),n=cr[e.signatureParameters.hash.algorithmOid],n===void 0||Et.md[n]===void 0){var i=new Error("Unsupported RSASSA-PSS hash function.");throw i.oid=e.signatureParameters.hash.algorithmOid,i.name=n,i}t=Et.pss.create(Et.md[n].create(),s,e.signatureParameters.saltLength);break}return e.publicKey.verify(r.md.digest().getBytes(),r.signature,t)},"_verifySignature");ze.certificateFromPem=function(r,e,t){var n=Et.pem.decode(r)[0];if(n.type!=="CERTIFICATE"&&n.type!=="X509 CERTIFICATE"&&n.type!=="TRUSTED CERTIFICATE"){var s=new Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');throw s.headerType=n.type,s}if(n.procType&&n.procType.type==="ENCRYPTED")throw new Error("Could not convert certificate from PEM; PEM is encrypted.");var i=L.fromDer(n.body,t);return ze.certificateFromAsn1(i,e)};ze.certificateToPem=function(r,e){var t={type:"CERTIFICATE",body:L.toDer(ze.certificateToAsn1(r)).getBytes()};return Et.pem.encode(t,{maxline:e})};ze.publicKeyFromPem=function(r){var e=Et.pem.decode(r)[0];if(e.type!=="PUBLIC KEY"&&e.type!=="RSA PUBLIC KEY"){var t=new Error('Could not convert public key from PEM; PEM header type is not "PUBLIC KEY" or "RSA PUBLIC KEY".');throw t.headerType=e.type,t}if(e.procType&&e.procType.type==="ENCRYPTED")throw new Error("Could not convert public key from PEM; PEM is encrypted.");var n=L.fromDer(e.body);return ze.publicKeyFromAsn1(n)};ze.publicKeyToPem=function(r,e){var t={type:"PUBLIC KEY",body:L.toDer(ze.publicKeyToAsn1(r)).getBytes()};return Et.pem.encode(t,{maxline:e})};ze.publicKeyToRSAPublicKeyPem=function(r,e){var t={type:"RSA PUBLIC KEY",body:L.toDer(ze.publicKeyToRSAPublicKey(r)).getBytes()};return Et.pem.encode(t,{maxline:e})};ze.getPublicKeyFingerprint=function(r,e){e=e||{};var t=e.md||Et.md.sha1.create(),n=e.type||"RSAPublicKey",s;switch(n){case"RSAPublicKey":s=L.toDer(ze.publicKeyToRSAPublicKey(r)).getBytes();break;case"SubjectPublicKeyInfo":s=L.toDer(ze.publicKeyToAsn1(r)).getBytes();break;default:throw new Error('Unknown fingerprint type "'+e.type+'".')}t.start(),t.update(s);var i=t.digest();if(e.encoding==="hex"){var a=i.toHex();return e.delimiter?a.match(/.{2}/g).join(e.delimiter):a}else{if(e.encoding==="binary")return i.getBytes();if(e.encoding)throw new Error('Unknown encoding "'+e.encoding+'".')}return i};ze.certificationRequestFromPem=function(r,e,t){var n=Et.pem.decode(r)[0];if(n.type!=="CERTIFICATE REQUEST"){var s=new Error('Could not convert certification request from PEM; PEM header type is not "CERTIFICATE REQUEST".');throw s.headerType=n.type,s}if(n.procType&&n.procType.type==="ENCRYPTED")throw new Error("Could not convert certification request from PEM; PEM is encrypted.");var i=L.fromDer(n.body,t);return ze.certificationRequestFromAsn1(i,e)};ze.certificationRequestToPem=function(r,e){var t={type:"CERTIFICATE REQUEST",body:L.toDer(ze.certificationRequestToAsn1(r)).getBytes()};return Et.pem.encode(t,{maxline:e})};ze.createCertificate=function(){var r={};return r.version=2,r.serialNumber="00",r.signatureOid=null,r.signature=null,r.siginfo={},r.siginfo.algorithmOid=null,r.validity={},r.validity.notBefore=new Date,r.validity.notAfter=new Date,r.issuer={},r.issuer.getField=function(e){return Yu(r.issuer,e)},r.issuer.addField=function(e){ki([e]),r.issuer.attributes.push(e)},r.issuer.attributes=[],r.issuer.hash=null,r.subject={},r.subject.getField=function(e){return Yu(r.subject,e)},r.subject.addField=function(e){ki([e]),r.subject.attributes.push(e)},r.subject.attributes=[],r.subject.hash=null,r.extensions=[],r.publicKey=null,r.md=null,r.setSubject=function(e,t){ki(e),r.subject.attributes=e,delete r.subject.uniqueId,t&&(r.subject.uniqueId=t),r.subject.hash=null},r.setIssuer=function(e,t){ki(e),r.issuer.attributes=e,delete r.issuer.uniqueId,t&&(r.issuer.uniqueId=t),r.issuer.hash=null},r.setExtensions=function(e){for(var t=0;t<e.length;++t)K4(e[t],{cert:r});r.extensions=e},r.getExtension=function(e){typeof e=="string"&&(e={name:e});for(var t=null,n,s=0;t===null&&s<r.extensions.length;++s)n=r.extensions[s],(e.id&&n.id===e.id||e.name&&n.name===e.name)&&(t=n);return t},r.sign=function(e,t){r.md=t||Et.md.sha1.create();var n=cr[r.md.algorithm+"WithRSAEncryption"];if(!n){var s=new Error("Could not compute certificate digest. Unknown message digest algorithm OID.");throw s.algorithm=r.md.algorithm,s}r.signatureOid=r.siginfo.algorithmOid=n,r.tbsCertificate=ze.getTBSCertificate(r);var i=L.toDer(r.tbsCertificate);r.md.update(i.getBytes()),r.signature=e.sign(r.md)},r.verify=function(e){var t=!1;if(!r.issued(e)){var n=e.issuer,s=r.subject,i=new Error("The parent certificate did not issue the given child certificate; the child certificate's issuer does not match the parent's subject.");throw i.expectedIssuer=s.attributes,i.actualIssuer=n.attributes,i}var a=e.md;if(a===null){a=xE({signatureOid:e.signatureOid,type:"certificate"});var u=e.tbsCertificate||ze.getTBSCertificate(e),c=L.toDer(u);a.update(c.getBytes())}return a!==null&&(t=H4({certificate:r,md:a,signature:e.signature})),t},r.isIssuer=function(e){var t=!1,n=r.issuer,s=e.subject;if(n.hash&&s.hash)t=n.hash===s.hash;else if(n.attributes.length===s.attributes.length){t=!0;for(var i,a,u=0;t&&u<n.attributes.length;++u)i=n.attributes[u],a=s.attributes[u],(i.type!==a.type||i.value!==a.value)&&(t=!1)}return t},r.issued=function(e){return e.isIssuer(r)},r.generateSubjectKeyIdentifier=function(){return ze.getPublicKeyFingerprint(r.publicKey,{type:"RSAPublicKey"})},r.verifySubjectKeyIdentifier=function(){for(var e=cr.subjectKeyIdentifier,t=0;t<r.extensions.length;++t){var n=r.extensions[t];if(n.id===e){var s=r.generateSubjectKeyIdentifier().getBytes();return Et.util.hexToBytes(n.subjectKeyIdentifier)===s}}return!1},r};ze.certificateFromAsn1=function(r,e){var t={},n=[];if(!L.validate(r,qee,t,n)){var s=new Error("Cannot read X.509 certificate. ASN.1 object is not an X509v3 Certificate.");throw s.errors=n,s}var i=L.derToOid(t.publicKeyOid);if(i!==ze.oids.rsaEncryption)throw new Error("Cannot read public key. OID is not RSA.");var a=ze.createCertificate();a.version=t.certVersion?t.certVersion.charCodeAt(0):0;var u=Et.util.createBuffer(t.certSerialNumber);a.serialNumber=u.toHex(),a.signatureOid=Et.asn1.derToOid(t.certSignatureOid),a.signatureParameters=yE(a.signatureOid,t.certSignatureParams,!0),a.siginfo.algorithmOid=Et.asn1.derToOid(t.certinfoSignatureOid),a.siginfo.parameters=yE(a.siginfo.algorithmOid,t.certinfoSignatureParams,!1),a.signature=t.certSignature;var c=[];if(t.certValidity1UTCTime!==void 0&&c.push(L.utcTimeToDate(t.certValidity1UTCTime)),t.certValidity2GeneralizedTime!==void 0&&c.push(L.generalizedTimeToDate(t.certValidity2GeneralizedTime)),t.certValidity3UTCTime!==void 0&&c.push(L.utcTimeToDate(t.certValidity3UTCTime)),t.certValidity4GeneralizedTime!==void 0&&c.push(L.generalizedTimeToDate(t.certValidity4GeneralizedTime)),c.length>2)throw new Error("Cannot read notBefore/notAfter validity times; more than two times were provided in the certificate.");if(c.length<2)throw new Error("Cannot read notBefore/notAfter validity times; they were not provided as either UTCTime or GeneralizedTime.");if(a.validity.notBefore=c[0],a.validity.notAfter=c[1],a.tbsCertificate=t.tbsCertificate,e){a.md=xE({signatureOid:a.signatureOid,type:"certificate"});var l=L.toDer(a.tbsCertificate);a.md.update(l.getBytes())}var h=Et.md.sha1.create(),m=L.toDer(t.certIssuer);h.update(m.getBytes()),a.issuer.getField=function(v){return Yu(a.issuer,v)},a.issuer.addField=function(v){ki([v]),a.issuer.attributes.push(v)},a.issuer.attributes=ze.RDNAttributesAsArray(t.certIssuer),t.certIssuerUniqueId&&(a.issuer.uniqueId=t.certIssuerUniqueId),a.issuer.hash=h.digest().toHex();var g=Et.md.sha1.create(),y=L.toDer(t.certSubject);return g.update(y.getBytes()),a.subject.getField=function(v){return Yu(a.subject,v)},a.subject.addField=function(v){ki([v]),a.subject.attributes.push(v)},a.subject.attributes=ze.RDNAttributesAsArray(t.certSubject),t.certSubjectUniqueId&&(a.subject.uniqueId=t.certSubjectUniqueId),a.subject.hash=g.digest().toHex(),t.certExtensions?a.extensions=ze.certificateExtensionsFromAsn1(t.certExtensions):a.extensions=[],a.publicKey=ze.publicKeyFromAsn1(t.subjectPublicKeyInfo),a};ze.certificateExtensionsFromAsn1=function(r){for(var e=[],t=0;t<r.value.length;++t)for(var n=r.value[t],s=0;s<n.value.length;++s)e.push(ze.certificateExtensionFromAsn1(n.value[s]));return e};ze.certificateExtensionFromAsn1=function(r){var e={};if(e.id=L.derToOid(r.value[0].value),e.critical=!1,r.value[1].type===L.Type.BOOLEAN?(e.critical=r.value[1].value.charCodeAt(0)!==0,e.value=r.value[2].value):e.value=r.value[1].value,e.id in cr){if(e.name=cr[e.id],e.name==="keyUsage"){var t=L.fromDer(e.value),n=0,s=0;t.value.length>1&&(n=t.value.charCodeAt(1),s=t.value.length>2?t.value.charCodeAt(2):0),e.digitalSignature=(n&128)===128,e.nonRepudiation=(n&64)===64,e.keyEncipherment=(n&32)===32,e.dataEncipherment=(n&16)===16,e.keyAgreement=(n&8)===8,e.keyCertSign=(n&4)===4,e.cRLSign=(n&2)===2,e.encipherOnly=(n&1)===1,e.decipherOnly=(s&128)===128}else if(e.name==="basicConstraints"){var t=L.fromDer(e.value);t.value.length>0&&t.value[0].type===L.Type.BOOLEAN?e.cA=t.value[0].value.charCodeAt(0)!==0:e.cA=!1;var i=null;t.value.length>0&&t.value[0].type===L.Type.INTEGER?i=t.value[0].value:t.value.length>1&&(i=t.value[1].value),i!==null&&(e.pathLenConstraint=L.derToInteger(i))}else if(e.name==="extKeyUsage")for(var t=L.fromDer(e.value),a=0;a<t.value.length;++a){var u=L.derToOid(t.value[a].value);u in cr?e[cr[u]]=!0:e[u]=!0}else if(e.name==="nsCertType"){var t=L.fromDer(e.value),n=0;t.value.length>1&&(n=t.value.charCodeAt(1)),e.client=(n&128)===128,e.server=(n&64)===64,e.email=(n&32)===32,e.objsign=(n&16)===16,e.reserved=(n&8)===8,e.sslCA=(n&4)===4,e.emailCA=(n&2)===2,e.objCA=(n&1)===1}else if(e.name==="subjectAltName"||e.name==="issuerAltName"){e.altNames=[];for(var c,t=L.fromDer(e.value),l=0;l<t.value.length;++l){c=t.value[l];var h={type:c.type,value:c.value};switch(e.altNames.push(h),c.type){case 1:case 2:case 6:break;case 7:h.ip=Et.util.bytesToIP(c.value);break;case 8:h.oid=L.derToOid(c.value);break;default:}}}else if(e.name==="subjectKeyIdentifier"){var t=L.fromDer(e.value);e.subjectKeyIdentifier=Et.util.bytesToHex(t.value)}}return e};ze.certificationRequestFromAsn1=function(r,e){var t={},n=[];if(!L.validate(r,$ee,t,n)){var s=new Error("Cannot read PKCS#10 certificate request. ASN.1 object is not a PKCS#10 CertificationRequest.");throw s.errors=n,s}var i=L.derToOid(t.publicKeyOid);if(i!==ze.oids.rsaEncryption)throw new Error("Cannot read public key. OID is not RSA.");var a=ze.createCertificationRequest();if(a.version=t.csrVersion?t.csrVersion.charCodeAt(0):0,a.signatureOid=Et.asn1.derToOid(t.csrSignatureOid),a.signatureParameters=yE(a.signatureOid,t.csrSignatureParams,!0),a.siginfo.algorithmOid=Et.asn1.derToOid(t.csrSignatureOid),a.siginfo.parameters=yE(a.siginfo.algorithmOid,t.csrSignatureParams,!1),a.signature=t.csrSignature,a.certificationRequestInfo=t.certificationRequestInfo,e){a.md=xE({signatureOid:a.signatureOid,type:"certification request"});var u=L.toDer(a.certificationRequestInfo);a.md.update(u.getBytes())}var c=Et.md.sha1.create();return a.subject.getField=function(l){return Yu(a.subject,l)},a.subject.addField=function(l){ki([l]),a.subject.attributes.push(l)},a.subject.attributes=ze.RDNAttributesAsArray(t.certificationRequestInfoSubject,c),a.subject.hash=c.digest().toHex(),a.publicKey=ze.publicKeyFromAsn1(t.subjectPublicKeyInfo),a.getAttribute=function(l){return Yu(a,l)},a.addAttribute=function(l){ki([l]),a.attributes.push(l)},a.attributes=ze.CRIAttributesAsArray(t.certificationRequestInfoAttributes||[]),a};ze.createCertificationRequest=function(){var r={};return r.version=0,r.signatureOid=null,r.signature=null,r.siginfo={},r.siginfo.algorithmOid=null,r.subject={},r.subject.getField=function(e){return Yu(r.subject,e)},r.subject.addField=function(e){ki([e]),r.subject.attributes.push(e)},r.subject.attributes=[],r.subject.hash=null,r.publicKey=null,r.attributes=[],r.getAttribute=function(e){return Yu(r,e)},r.addAttribute=function(e){ki([e]),r.attributes.push(e)},r.md=null,r.setSubject=function(e){ki(e),r.subject.attributes=e,r.subject.hash=null},r.setAttributes=function(e){ki(e),r.attributes=e},r.sign=function(e,t){r.md=t||Et.md.sha1.create();var n=cr[r.md.algorithm+"WithRSAEncryption"];if(!n){var s=new Error("Could not compute certification request digest. Unknown message digest algorithm OID.");throw s.algorithm=r.md.algorithm,s}r.signatureOid=r.siginfo.algorithmOid=n,r.certificationRequestInfo=ze.getCertificationRequestInfo(r);var i=L.toDer(r.certificationRequestInfo);r.md.update(i.getBytes()),r.signature=e.sign(r.md)},r.verify=function(){var e=!1,t=r.md;if(t===null){t=xE({signatureOid:r.signatureOid,type:"certification request"});var n=r.certificationRequestInfo||ze.getCertificationRequestInfo(r),s=L.toDer(n);t.update(s.getBytes())}return t!==null&&(e=H4({certificate:r,md:t,signature:r.signature})),e},r};function jp(r){for(var e=L.create(L.Class.UNIVERSAL,L.Type.SEQUENCE,!0,[]),t,n,s=r.attributes,i=0;i<s.length;++i){t=s[i];var a=t.value,u=L.Type.PRINTABLESTRING;"valueTagClass"in t&&(u=t.valueTagClass,u===L.Type.UTF8&&(a=Et.util.encodeUtf8(a))),n=L.create(L.Class.UNIVERSAL,L.Type.SET,!0,[L.create(L.Class.UNIVERSAL,L.Type.SEQUENCE,!0,[L.create(L.Class.UNIVERSAL,L.Type.OID,!1,L.oidToDer(t.type).getBytes()),L.create(L.Class.UNIVERSAL,u,!1,a)])]),e.value.push(n)}return e}o(jp,"_dnToAsn1");function ki(r){for(var e,t=0;t<r.length;++t){if(e=r[t],typeof e.name>"u"&&(e.type&&e.type in ze.oids?e.name=ze.oids[e.type]:e.shortName&&e.shortName in on&&(e.name=ze.oids[on[e.shortName]])),typeof e.type>"u")if(e.name&&e.name in ze.oids)e.type=ze.oids[e.name];else{var n=new Error("Attribute type not specified.");throw n.attribute=e,n}if(typeof e.shortName>"u"&&e.name&&e.name in on&&(e.shortName=on[e.name]),e.type===cr.extensionRequest&&(e.valueConstructed=!0,e.valueTagClass=L.Type.SEQUENCE,!e.value&&e.extensions)){e.value=[];for(var s=0;s<e.extensions.length;++s)e.value.push(ze.certificateExtensionToAsn1(K4(e.extensions[s])))}if(typeof e.value>"u"){var n=new Error("Attribute value not specified.");throw n.attribute=e,n}}}o(ki,"_fillMissingFields");function K4(r,e){if(e=e||{},typeof r.name>"u"&&r.id&&r.id in ze.oids&&(r.name=ze.oids[r.id]),typeof r.id>"u")if(r.name&&r.name in ze.oids)r.id=ze.oids[r.name];else{var t=new Error("Extension ID not specified.");throw t.extension=r,t}if(typeof r.value<"u")return r;if(r.name==="keyUsage"){var n=0,s=0,i=0;r.digitalSignature&&(s|=128,n=7),r.nonRepudiation&&(s|=64,n=6),r.keyEncipherment&&(s|=32,n=5),r.dataEncipherment&&(s|=16,n=4),r.keyAgreement&&(s|=8,n=3),r.keyCertSign&&(s|=4,n=2),r.cRLSign&&(s|=2,n=1),r.encipherOnly&&(s|=1,n=0),r.decipherOnly&&(i|=128,n=7);var a=String.fromCharCode(n);i!==0?a+=String.fromCharCode(s)+String.fromCharCode(i):s!==0&&(a+=String.fromCharCode(s)),r.value=L.create(L.Class.UNIVERSAL,L.Type.BITSTRING,!1,a)}else if(r.name==="basicConstraints")r.value=L.create(L.Class.UNIVERSAL,L.Type.SEQUENCE,!0,[]),r.cA&&r.value.value.push(L.create(L.Class.UNIVERSAL,L.Type.BOOLEAN,!1,"\xFF")),"pathLenConstraint"in r&&r.value.value.push(L.create(L.Class.UNIVERSAL,L.Type.INTEGER,!1,L.integerToDer(r.pathLenConstraint).getBytes()));else if(r.name==="extKeyUsage"){r.value=L.create(L.Class.UNIVERSAL,L.Type.SEQUENCE,!0,[]);var u=r.value.value;for(var c in r)r[c]===!0&&(c in cr?u.push(L.create(L.Class.UNIVERSAL,L.Type.OID,!1,L.oidToDer(cr[c]).getBytes())):c.indexOf(".")!==-1&&u.push(L.create(L.Class.UNIVERSAL,L.Type.OID,!1,L.oidToDer(c).getBytes())))}else if(r.name==="nsCertType"){var n=0,s=0;r.client&&(s|=128,n=7),r.server&&(s|=64,n=6),r.email&&(s|=32,n=5),r.objsign&&(s|=16,n=4),r.reserved&&(s|=8,n=3),r.sslCA&&(s|=4,n=2),r.emailCA&&(s|=2,n=1),r.objCA&&(s|=1,n=0);var a=String.fromCharCode(n);s!==0&&(a+=String.fromCharCode(s)),r.value=L.create(L.Class.UNIVERSAL,L.Type.BITSTRING,!1,a)}else if(r.name==="subjectAltName"||r.name==="issuerAltName"){r.value=L.create(L.Class.UNIVERSAL,L.Type.SEQUENCE,!0,[]);for(var l,h=0;h<r.altNames.length;++h){l=r.altNames[h];var a=l.value;if(l.type===7&&l.ip){if(a=Et.util.bytesFromIP(l.ip),a===null){var t=new Error('Extension "ip" value is not a valid IPv4 or IPv6 address.');throw t.extension=r,t}}else l.type===8&&(l.oid?a=L.oidToDer(L.oidToDer(l.oid)):a=L.oidToDer(a));r.value.value.push(L.create(L.Class.CONTEXT_SPECIFIC,l.type,!1,a))}}else if(r.name==="nsComment"&&e.cert){if(!/^[\x00-\x7F]*$/.test(r.comment)||r.comment.length<1||r.comment.length>128)throw new Error('Invalid "nsComment" content.');r.value=L.create(L.Class.UNIVERSAL,L.Type.IA5STRING,!1,r.comment)}else if(r.name==="subjectKeyIdentifier"&&e.cert){var m=e.cert.generateSubjectKeyIdentifier();r.subjectKeyIdentifier=m.toHex(),r.value=L.create(L.Class.UNIVERSAL,L.Type.OCTETSTRING,!1,m.getBytes())}else if(r.name==="authorityKeyIdentifier"&&e.cert){r.value=L.create(L.Class.UNIVERSAL,L.Type.SEQUENCE,!0,[]);var u=r.value.value;if(r.keyIdentifier){var g=r.keyIdentifier===!0?e.cert.generateSubjectKeyIdentifier().getBytes():r.keyIdentifier;u.push(L.create(L.Class.CONTEXT_SPECIFIC,0,!1,g))}if(r.authorityCertIssuer){var y=[L.create(L.Class.CONTEXT_SPECIFIC,4,!0,[jp(r.authorityCertIssuer===!0?e.cert.issuer:r.authorityCertIssuer)])];u.push(L.create(L.Class.CONTEXT_SPECIFIC,1,!0,y))}if(r.serialNumber){var v=Et.util.hexToBytes(r.serialNumber===!0?e.cert.serialNumber:r.serialNumber);u.push(L.create(L.Class.CONTEXT_SPECIFIC,2,!1,v))}}else if(r.name==="cRLDistributionPoints"){r.value=L.create(L.Class.UNIVERSAL,L.Type.SEQUENCE,!0,[]);for(var u=r.value.value,E=L.create(L.Class.UNIVERSAL,L.Type.SEQUENCE,!0,[]),w=L.create(L.Class.CONTEXT_SPECIFIC,0,!0,[]),l,h=0;h<r.altNames.length;++h){l=r.altNames[h];var a=l.value;if(l.type===7&&l.ip){if(a=Et.util.bytesFromIP(l.ip),a===null){var t=new Error('Extension "ip" value is not a valid IPv4 or IPv6 address.');throw t.extension=r,t}}else l.type===8&&(l.oid?a=L.oidToDer(L.oidToDer(l.oid)):a=L.oidToDer(a));w.value.push(L.create(L.Class.CONTEXT_SPECIFIC,l.type,!1,a))}E.value.push(L.create(L.Class.CONTEXT_SPECIFIC,0,!0,[w])),u.push(E)}if(typeof r.value>"u"){var t=new Error("Extension value not specified.");throw t.extension=r,t}return r}o(K4,"_fillMissingExtensionFields");function yT(r,e){switch(r){case cr["RSASSA-PSS"]:var t=[];return e.hash.algorithmOid!==void 0&&t.push(L.create(L.Class.CONTEXT_SPECIFIC,0,!0,[L.create(L.Class.UNIVERSAL,L.Type.SEQUENCE,!0,[L.create(L.Class.UNIVERSAL,L.Type.OID,!1,L.oidToDer(e.hash.algorithmOid).getBytes()),L.create(L.Class.UNIVERSAL,L.Type.NULL,!1,"")])])),e.mgf.algorithmOid!==void 0&&t.push(L.create(L.Class.CONTEXT_SPECIFIC,1,!0,[L.create(L.Class.UNIVERSAL,L.Type.SEQUENCE,!0,[L.create(L.Class.UNIVERSAL,L.Type.OID,!1,L.oidToDer(e.mgf.algorithmOid).getBytes()),L.create(L.Class.UNIVERSAL,L.Type.SEQUENCE,!0,[L.create(L.Class.UNIVERSAL,L.Type.OID,!1,L.oidToDer(e.mgf.hash.algorithmOid).getBytes()),L.create(L.Class.UNIVERSAL,L.Type.NULL,!1,"")])])])),e.saltLength!==void 0&&t.push(L.create(L.Class.CONTEXT_SPECIFIC,2,!0,[L.create(L.Class.UNIVERSAL,L.Type.INTEGER,!1,L.integerToDer(e.saltLength).getBytes())])),L.create(L.Class.UNIVERSAL,L.Type.SEQUENCE,!0,t);default:return L.create(L.Class.UNIVERSAL,L.Type.NULL,!1,"")}}o(yT,"_signatureParametersToAsn1");function Gee(r){var e=L.create(L.Class.CONTEXT_SPECIFIC,0,!0,[]);if(r.attributes.length===0)return e;for(var t=r.attributes,n=0;n<t.length;++n){var s=t[n],i=s.value,a=L.Type.UTF8;"valueTagClass"in s&&(a=s.valueTagClass),a===L.Type.UTF8&&(i=Et.util.encodeUtf8(i));var u=!1;"valueConstructed"in s&&(u=s.valueConstructed);var c=L.create(L.Class.UNIVERSAL,L.Type.SEQUENCE,!0,[L.create(L.Class.UNIVERSAL,L.Type.OID,!1,L.oidToDer(s.type).getBytes()),L.create(L.Class.UNIVERSAL,L.Type.SET,!0,[L.create(L.Class.UNIVERSAL,a,u,i)])]);e.value.push(c)}return e}o(Gee,"_CRIAttributesToAsn1");var Xee=new Date("1950-01-01T00:00:00Z"),Wee=new Date("2050-01-01T00:00:00Z");function M4(r){return r>=Xee&&r<Wee?L.create(L.Class.UNIVERSAL,L.Type.UTCTIME,!1,L.dateToUtcTime(r)):L.create(L.Class.UNIVERSAL,L.Type.GENERALIZEDTIME,!1,L.dateToGeneralizedTime(r))}o(M4,"_dateToAsn1");ze.getTBSCertificate=function(r){var e=M4(r.validity.notBefore),t=M4(r.validity.notAfter),n=L.create(L.Class.UNIVERSAL,L.Type.SEQUENCE,!0,[L.create(L.Class.CONTEXT_SPECIFIC,0,!0,[L.create(L.Class.UNIVERSAL,L.Type.INTEGER,!1,L.integerToDer(r.version).getBytes())]),L.create(L.Class.UNIVERSAL,L.Type.INTEGER,!1,Et.util.hexToBytes(r.serialNumber)),L.create(L.Class.UNIVERSAL,L.Type.SEQUENCE,!0,[L.create(L.Class.UNIVERSAL,L.Type.OID,!1,L.oidToDer(r.siginfo.algorithmOid).getBytes()),yT(r.siginfo.algorithmOid,r.siginfo.parameters)]),jp(r.issuer),L.create(L.Class.UNIVERSAL,L.Type.SEQUENCE,!0,[e,t]),jp(r.subject),ze.publicKeyToAsn1(r.publicKey)]);return r.issuer.uniqueId&&n.value.push(L.create(L.Class.CONTEXT_SPECIFIC,1,!0,[L.create(L.Class.UNIVERSAL,L.Type.BITSTRING,!1,"\0"+r.issuer.uniqueId)])),r.subject.uniqueId&&n.value.push(L.create(L.Class.CONTEXT_SPECIFIC,2,!0,[L.create(L.Class.UNIVERSAL,L.Type.BITSTRING,!1,"\0"+r.subject.uniqueId)])),r.extensions.length>0&&n.value.push(ze.certificateExtensionsToAsn1(r.extensions)),n};ze.getCertificationRequestInfo=function(r){var e=L.create(L.Class.UNIVERSAL,L.Type.SEQUENCE,!0,[L.create(L.Class.UNIVERSAL,L.Type.INTEGER,!1,L.integerToDer(r.version).getBytes()),jp(r.subject),ze.publicKeyToAsn1(r.publicKey),Gee(r)]);return e};ze.distinguishedNameToAsn1=function(r){return jp(r)};ze.certificateToAsn1=function(r){var e=r.tbsCertificate||ze.getTBSCertificate(r);return L.create(L.Class.UNIVERSAL,L.Type.SEQUENCE,!0,[e,L.create(L.Class.UNIVERSAL,L.Type.SEQUENCE,!0,[L.create(L.Class.UNIVERSAL,L.Type.OID,!1,L.oidToDer(r.signatureOid).getBytes()),yT(r.signatureOid,r.signatureParameters)]),L.create(L.Class.UNIVERSAL,L.Type.BITSTRING,!1,"\0"+r.signature)])};ze.certificateExtensionsToAsn1=function(r){var e=L.create(L.Class.CONTEXT_SPECIFIC,3,!0,[]),t=L.create(L.Class.UNIVERSAL,L.Type.SEQUENCE,!0,[]);e.value.push(t);for(var n=0;n<r.length;++n)t.value.push(ze.certificateExtensionToAsn1(r[n]));return e};ze.certificateExtensionToAsn1=function(r){var e=L.create(L.Class.UNIVERSAL,L.Type.SEQUENCE,!0,[]);e.value.push(L.create(L.Class.UNIVERSAL,L.Type.OID,!1,L.oidToDer(r.id).getBytes())),r.critical&&e.value.push(L.create(L.Class.UNIVERSAL,L.Type.BOOLEAN,!1,"\xFF"));var t=r.value;return typeof r.value!="string"&&(t=L.toDer(t).getBytes()),e.value.push(L.create(L.Class.UNIVERSAL,L.Type.OCTETSTRING,!1,t)),e};ze.certificationRequestToAsn1=function(r){var e=r.certificationRequestInfo||ze.getCertificationRequestInfo(r);return L.create(L.Class.UNIVERSAL,L.Type.SEQUENCE,!0,[e,L.create(L.Class.UNIVERSAL,L.Type.SEQUENCE,!0,[L.create(L.Class.UNIVERSAL,L.Type.OID,!1,L.oidToDer(r.signatureOid).getBytes()),yT(r.signatureOid,r.signatureParameters)]),L.create(L.Class.UNIVERSAL,L.Type.BITSTRING,!1,"\0"+r.signature)])};ze.createCaStore=function(r){var e={certs:{}};e.getIssuer=function(a){var u=t(a.issuer);return u},e.addCertificate=function(a){if(typeof a=="string"&&(a=Et.pki.certificateFromPem(a)),n(a.subject),!e.hasCertificate(a))if(a.subject.hash in e.certs){var u=e.certs[a.subject.hash];Et.util.isArray(u)||(u=[u]),u.push(a),e.certs[a.subject.hash]=u}else e.certs[a.subject.hash]=a},e.hasCertificate=function(a){typeof a=="string"&&(a=Et.pki.certificateFromPem(a));var u=t(a.subject);if(!u)return!1;Et.util.isArray(u)||(u=[u]);for(var c=L.toDer(ze.certificateToAsn1(a)).getBytes(),l=0;l<u.length;++l){var h=L.toDer(ze.certificateToAsn1(u[l])).getBytes();if(c===h)return!0}return!1},e.listAllCertificates=function(){var a=[];for(var u in e.certs)if(e.certs.hasOwnProperty(u)){var c=e.certs[u];if(!Et.util.isArray(c))a.push(c);else for(var l=0;l<c.length;++l)a.push(c[l])}return a},e.removeCertificate=function(a){var u;if(typeof a=="string"&&(a=Et.pki.certificateFromPem(a)),n(a.subject),!e.hasCertificate(a))return null;var c=t(a.subject);if(!Et.util.isArray(c))return u=e.certs[a.subject.hash],delete e.certs[a.subject.hash],u;for(var l=L.toDer(ze.certificateToAsn1(a)).getBytes(),h=0;h<c.length;++h){var m=L.toDer(ze.certificateToAsn1(c[h])).getBytes();l===m&&(u=c[h],c.splice(h,1))}return c.length===0&&delete e.certs[a.subject.hash],u};function t(a){return n(a),e.certs[a.hash]||null}o(t,"getBySubject");function n(a){if(!a.hash){var u=Et.md.sha1.create();a.attributes=ze.RDNAttributesAsArray(jp(a),u),a.hash=u.digest().toHex()}}if(o(n,"ensureSubjectHasHash"),r)for(var s=0;s<r.length;++s){var i=r[s];e.addCertificate(i)}return e};ze.certificateError={bad_certificate:"forge.pki.BadCertificate",unsupported_certificate:"forge.pki.UnsupportedCertificate",certificate_revoked:"forge.pki.CertificateRevoked",certificate_expired:"forge.pki.CertificateExpired",certificate_unknown:"forge.pki.CertificateUnknown",unknown_ca:"forge.pki.UnknownCertificateAuthority"};ze.verifyCertificateChain=function(r,e,t){typeof t=="function"&&(t={verify:t}),t=t||{},e=e.slice(0);var n=e.slice(0),s=t.validityCheckDate;typeof s>"u"&&(s=new Date);var i=!0,a=null,u=0;do{var c=e.shift(),l=null,h=!1;if(s&&(s<c.validity.notBefore||s>c.validity.notAfter)&&(a={message:"Certificate is not valid yet or has expired.",error:ze.certificateError.certificate_expired,notBefore:c.validity.notBefore,notAfter:c.validity.notAfter,now:s}),a===null){if(l=e[0]||r.getIssuer(c),l===null&&c.isIssuer(c)&&(h=!0,l=c),l){var m=l;Et.util.isArray(m)||(m=[m]);for(var g=!1;!g&&m.length>0;){l=m.shift();try{g=l.verify(c)}catch{}}g||(a={message:"Certificate signature is invalid.",error:ze.certificateError.bad_certificate})}a===null&&(!l||h)&&!r.hasCertificate(c)&&(a={message:"Certificate is not trusted.",error:ze.certificateError.unknown_ca})}if(a===null&&l&&!c.isIssuer(l)&&(a={message:"Certificate issuer is invalid.",error:ze.certificateError.bad_certificate}),a===null)for(var y={keyUsage:!0,basicConstraints:!0},v=0;a===null&&v<c.extensions.length;++v){var E=c.extensions[v];E.critical&&!(E.name in y)&&(a={message:"Certificate has an unsupported critical extension.",error:ze.certificateError.unsupported_certificate})}if(a===null&&(!i||e.length===0&&(!l||h))){var w=c.getExtension("basicConstraints"),C=c.getExtension("keyUsage");if(C!==null&&(!C.keyCertSign||w===null)&&(a={message:"Certificate keyUsage or basicConstraints conflict or indicate that the certificate is not a CA. If the certificate is the only one in the chain or isn't the first then the certificate must be a valid CA.",error:ze.certificateError.bad_certificate}),a===null&&w!==null&&!w.cA&&(a={message:"Certificate basicConstraints indicates the certificate is not a CA.",error:ze.certificateError.bad_certificate}),a===null&&C!==null&&"pathLenConstraint"in w){var _=u-1;_>w.pathLenConstraint&&(a={message:"Certificate basicConstraints pathLenConstraint violated.",error:ze.certificateError.bad_certificate})}}var b=a===null?!0:a.error,A=t.verify?t.verify(b,u,n):b;if(A===!0)a=null;else throw b===!0&&(a={message:"The application rejected the certificate.",error:ze.certificateError.bad_certificate}),(A||A===0)&&(typeof A=="object"&&!Et.util.isArray(A)?(A.message&&(a.message=A.message),A.error&&(a.error=A.error)):typeof A=="string"&&(a.error=A)),a;i=!1,++u}while(e.length>0);return!0}});var wT=te((Vye,X4)=>{"use strict";var Vr=zt();la();Rp();Wu();gT();mT();Ri();Rg();Lp();pr();wE();var ee=Vr.asn1,tr=Vr.pki,Pg=X4.exports=Vr.pkcs12=Vr.pkcs12||{},G4={name:"ContentInfo",tagClass:ee.Class.UNIVERSAL,type:ee.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.contentType",tagClass:ee.Class.UNIVERSAL,type:ee.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:ee.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"content"}]},zee={name:"PFX",tagClass:ee.Class.UNIVERSAL,type:ee.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.version",tagClass:ee.Class.UNIVERSAL,type:ee.Type.INTEGER,constructed:!1,capture:"version"},G4,{name:"PFX.macData",tagClass:ee.Class.UNIVERSAL,type:ee.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"mac",value:[{name:"PFX.macData.mac",tagClass:ee.Class.UNIVERSAL,type:ee.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm",tagClass:ee.Class.UNIVERSAL,type:ee.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm.algorithm",tagClass:ee.Class.UNIVERSAL,type:ee.Type.OID,constructed:!1,capture:"macAlgorithm"},{name:"PFX.macData.mac.digestAlgorithm.parameters",optional:!0,tagClass:ee.Class.UNIVERSAL,captureAsn1:"macAlgorithmParameters"}]},{name:"PFX.macData.mac.digest",tagClass:ee.Class.UNIVERSAL,type:ee.Type.OCTETSTRING,constructed:!1,capture:"macDigest"}]},{name:"PFX.macData.macSalt",tagClass:ee.Class.UNIVERSAL,type:ee.Type.OCTETSTRING,constructed:!1,capture:"macSalt"},{name:"PFX.macData.iterations",tagClass:ee.Class.UNIVERSAL,type:ee.Type.INTEGER,constructed:!1,optional:!0,capture:"macIterations"}]}]},Jee={name:"SafeBag",tagClass:ee.Class.UNIVERSAL,type:ee.Type.SEQUENCE,constructed:!0,value:[{name:"SafeBag.bagId",tagClass:ee.Class.UNIVERSAL,type:ee.Type.OID,constructed:!1,capture:"bagId"},{name:"SafeBag.bagValue",tagClass:ee.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"bagValue"},{name:"SafeBag.bagAttributes",tagClass:ee.Class.UNIVERSAL,type:ee.Type.SET,constructed:!0,optional:!0,capture:"bagAttributes"}]},Yee={name:"Attribute",tagClass:ee.Class.UNIVERSAL,type:ee.Type.SEQUENCE,constructed:!0,value:[{name:"Attribute.attrId",tagClass:ee.Class.UNIVERSAL,type:ee.Type.OID,constructed:!1,capture:"oid"},{name:"Attribute.attrValues",tagClass:ee.Class.UNIVERSAL,type:ee.Type.SET,constructed:!0,capture:"values"}]},Qee={name:"CertBag",tagClass:ee.Class.UNIVERSAL,type:ee.Type.SEQUENCE,constructed:!0,value:[{name:"CertBag.certId",tagClass:ee.Class.UNIVERSAL,type:ee.Type.OID,constructed:!1,capture:"certId"},{name:"CertBag.certValue",tagClass:ee.Class.CONTEXT_SPECIFIC,constructed:!0,value:[{name:"CertBag.certValue[0]",tagClass:ee.Class.UNIVERSAL,type:ee.Class.OCTETSTRING,constructed:!1,capture:"cert"}]}]};function Og(r,e,t,n){for(var s=[],i=0;i<r.length;i++)for(var a=0;a<r[i].safeBags.length;a++){var u=r[i].safeBags[a];if(!(n!==void 0&&u.type!==n)){if(e===null){s.push(u);continue}u.attributes[e]!==void 0&&u.attributes[e].indexOf(t)>=0&&s.push(u)}}return s}o(Og,"_getBagsByAttribute");Pg.pkcs12FromAsn1=function(r,e,t){typeof e=="string"?(t=e,e=!0):e===void 0&&(e=!0);var n={},s=[];if(!ee.validate(r,zee,n,s)){var i=new Error("Cannot read PKCS#12 PFX. ASN.1 object is not an PKCS#12 PFX.");throw i.errors=i,i}var a={version:n.version.charCodeAt(0),safeContents:[],getBags:o(function(w){var C={},_;return"localKeyId"in w?_=w.localKeyId:"localKeyIdHex"in w&&(_=Vr.util.hexToBytes(w.localKeyIdHex)),_===void 0&&!("friendlyName"in w)&&"bagType"in w&&(C[w.bagType]=Og(a.safeContents,null,null,w.bagType)),_!==void 0&&(C.localKeyId=Og(a.safeContents,"localKeyId",_,w.bagType)),"friendlyName"in w&&(C.friendlyName=Og(a.safeContents,"friendlyName",w.friendlyName,w.bagType)),C},"getBags"),getBagsByFriendlyName:o(function(w,C){return Og(a.safeContents,"friendlyName",w,C)},"getBagsByFriendlyName"),getBagsByLocalKeyId:o(function(w,C){return Og(a.safeContents,"localKeyId",w,C)},"getBagsByLocalKeyId")};if(n.version.charCodeAt(0)!==3){var i=new Error("PKCS#12 PFX of version other than 3 not supported.");throw i.version=n.version.charCodeAt(0),i}if(ee.derToOid(n.contentType)!==tr.oids.data){var i=new Error("Only PKCS#12 PFX in password integrity mode supported.");throw i.oid=ee.derToOid(n.contentType),i}var u=n.content.value[0];if(u.tagClass!==ee.Class.UNIVERSAL||u.type!==ee.Type.OCTETSTRING)throw new Error("PKCS#12 authSafe content data is not an OCTET STRING.");if(u=xT(u),n.mac){var c=null,l=0,h=ee.derToOid(n.macAlgorithm);switch(h){case tr.oids.sha1:c=Vr.md.sha1.create(),l=20;break;case tr.oids.sha256:c=Vr.md.sha256.create(),l=32;break;case tr.oids.sha384:c=Vr.md.sha384.create(),l=48;break;case tr.oids.sha512:c=Vr.md.sha512.create(),l=64;break;case tr.oids.md5:c=Vr.md.md5.create(),l=16;break}if(c===null)throw new Error("PKCS#12 uses unsupported MAC algorithm: "+h);var m=new Vr.util.ByteBuffer(n.macSalt),g="macIterations"in n?parseInt(Vr.util.bytesToHex(n.macIterations),16):1,y=Pg.generateKey(t,m,3,g,l,c),v=Vr.hmac.create();v.start(c,y),v.update(u.value);var E=v.getMac();if(E.getBytes()!==n.macDigest)throw new Error("PKCS#12 MAC could not be verified. Invalid password?")}else if(Array.isArray(r.value)&&r.value.length>2)throw new Error("Invalid PKCS#12. macData field present but MAC was not validated.");return Zee(a,u.value,e,t),a};function xT(r){if(r.composed||r.constructed){for(var e=Vr.util.createBuffer(),t=0;t<r.value.length;++t)e.putBytes(r.value[t].value);r.composed=r.constructed=!1,r.value=e.getBytes()}return r}o(xT,"_decodePkcs7Data");function Zee(r,e,t,n){if(e=ee.fromDer(e,t),e.tagClass!==ee.Class.UNIVERSAL||e.type!==ee.Type.SEQUENCE||e.constructed!==!0)throw new Error("PKCS#12 AuthenticatedSafe expected to be a SEQUENCE OF ContentInfo");for(var s=0;s<e.value.length;s++){var i=e.value[s],a={},u=[];if(!ee.validate(i,G4,a,u)){var c=new Error("Cannot read ContentInfo.");throw c.errors=u,c}var l={encrypted:!1},h=null,m=a.content.value[0];switch(ee.derToOid(a.contentType)){case tr.oids.data:if(m.tagClass!==ee.Class.UNIVERSAL||m.type!==ee.Type.OCTETSTRING)throw new Error("PKCS#12 SafeContents Data is not an OCTET STRING.");h=xT(m).value;break;case tr.oids.encryptedData:h=ete(m,n),l.encrypted=!0;break;default:var c=new Error("Unsupported PKCS#12 contentType.");throw c.contentType=ee.derToOid(a.contentType),c}l.safeBags=tte(h,t,n),r.safeContents.push(l)}}o(Zee,"_decodeAuthenticatedSafe");function ete(r,e){var t={},n=[];if(!ee.validate(r,Vr.pkcs7.asn1.encryptedDataValidator,t,n)){var s=new Error("Cannot read EncryptedContentInfo.");throw s.errors=n,s}var i=ee.derToOid(t.contentType);if(i!==tr.oids.data){var s=new Error("PKCS#12 EncryptedContentInfo ContentType is not Data.");throw s.oid=i,s}i=ee.derToOid(t.encAlgorithm);var a=tr.pbe.getCipher(i,t.encParameter,e),u=xT(t.encryptedContentAsn1),c=Vr.util.createBuffer(u.value);if(a.update(c),!a.finish())throw new Error("Failed to decrypt PKCS#12 SafeContents.");return a.output.getBytes()}o(ete,"_decryptSafeContents");function tte(r,e,t){if(!e&&r.length===0)return[];if(r=ee.fromDer(r,e),r.tagClass!==ee.Class.UNIVERSAL||r.type!==ee.Type.SEQUENCE||r.constructed!==!0)throw new Error("PKCS#12 SafeContents expected to be a SEQUENCE OF SafeBag.");for(var n=[],s=0;s<r.value.length;s++){var i=r.value[s],a={},u=[];if(!ee.validate(i,Jee,a,u)){var c=new Error("Cannot read SafeBag.");throw c.errors=u,c}var l={type:ee.derToOid(a.bagId),attributes:rte(a.bagAttributes)};n.push(l);var h,m,g=a.bagValue.value[0];switch(l.type){case tr.oids.pkcs8ShroudedKeyBag:if(g=tr.decryptPrivateKeyInfo(g,t),g===null)throw new Error("Unable to decrypt PKCS#8 ShroudedKeyBag, wrong password?");case tr.oids.keyBag:try{l.key=tr.privateKeyFromAsn1(g)}catch{l.key=null,l.asn1=g}continue;case tr.oids.certBag:h=Qee,m=o(function(){if(ee.derToOid(a.certId)!==tr.oids.x509Certificate){var v=new Error("Unsupported certificate type, only X.509 supported.");throw v.oid=ee.derToOid(a.certId),v}var E=ee.fromDer(a.cert,e);try{l.cert=tr.certificateFromAsn1(E,!0)}catch{l.cert=null,l.asn1=E}},"decoder");break;default:var c=new Error("Unsupported PKCS#12 SafeBag type.");throw c.oid=l.type,c}if(h!==void 0&&!ee.validate(g,h,a,u)){var c=new Error("Cannot read PKCS#12 "+h.name);throw c.errors=u,c}m()}return n}o(tte,"_decodeSafeContents");function rte(r){var e={};if(r!==void 0)for(var t=0;t<r.length;++t){var n={},s=[];if(!ee.validate(r[t],Yee,n,s)){var i=new Error("Cannot read PKCS#12 BagAttribute.");throw i.errors=s,i}var a=ee.derToOid(n.oid);if(tr.oids[a]!==void 0){e[tr.oids[a]]=[];for(var u=0;u<n.values.length;++u)e[tr.oids[a]].push(n.values[u].value)}}return e}o(rte,"_decodeBagAttributes");Pg.toPkcs12Asn1=function(r,e,t,n){n=n||{},n.saltSize=n.saltSize||8,n.count=n.count||2048,n.algorithm=n.algorithm||n.encAlgorithm||"aes128","useMac"in n||(n.useMac=!0),"localKeyId"in n||(n.localKeyId=null),"generateLocalKeyId"in n||(n.generateLocalKeyId=!0);var s=n.localKeyId,i;if(s!==null)s=Vr.util.hexToBytes(s);else if(n.generateLocalKeyId)if(e){var a=Vr.util.isArray(e)?e[0]:e;typeof a=="string"&&(a=tr.certificateFromPem(a));var u=Vr.md.sha1.create();u.update(ee.toDer(tr.certificateToAsn1(a)).getBytes()),s=u.digest().getBytes()}else s=Vr.random.getBytes(20);var c=[];s!==null&&c.push(ee.create(ee.Class.UNIVERSAL,ee.Type.SEQUENCE,!0,[ee.create(ee.Class.UNIVERSAL,ee.Type.OID,!1,ee.oidToDer(tr.oids.localKeyId).getBytes()),ee.create(ee.Class.UNIVERSAL,ee.Type.SET,!0,[ee.create(ee.Class.UNIVERSAL,ee.Type.OCTETSTRING,!1,s)])])),"friendlyName"in n&&c.push(ee.create(ee.Class.UNIVERSAL,ee.Type.SEQUENCE,!0,[ee.create(ee.Class.UNIVERSAL,ee.Type.OID,!1,ee.oidToDer(tr.oids.friendlyName).getBytes()),ee.create(ee.Class.UNIVERSAL,ee.Type.SET,!0,[ee.create(ee.Class.UNIVERSAL,ee.Type.BMPSTRING,!1,n.friendlyName)])])),c.length>0&&(i=ee.create(ee.Class.UNIVERSAL,ee.Type.SET,!0,c));var l=[],h=[];e!==null&&(Vr.util.isArray(e)?h=e:h=[e]);for(var m=[],g=0;g<h.length;++g){e=h[g],typeof e=="string"&&(e=tr.certificateFromPem(e));var y=g===0?i:void 0,v=tr.certificateToAsn1(e),E=ee.create(ee.Class.UNIVERSAL,ee.Type.SEQUENCE,!0,[ee.create(ee.Class.UNIVERSAL,ee.Type.OID,!1,ee.oidToDer(tr.oids.certBag).getBytes()),ee.create(ee.Class.CONTEXT_SPECIFIC,0,!0,[ee.create(ee.Class.UNIVERSAL,ee.Type.SEQUENCE,!0,[ee.create(ee.Class.UNIVERSAL,ee.Type.OID,!1,ee.oidToDer(tr.oids.x509Certificate).getBytes()),ee.create(ee.Class.CONTEXT_SPECIFIC,0,!0,[ee.create(ee.Class.UNIVERSAL,ee.Type.OCTETSTRING,!1,ee.toDer(v).getBytes())])])]),y]);m.push(E)}if(m.length>0){var w=ee.create(ee.Class.UNIVERSAL,ee.Type.SEQUENCE,!0,m),C=ee.create(ee.Class.UNIVERSAL,ee.Type.SEQUENCE,!0,[ee.create(ee.Class.UNIVERSAL,ee.Type.OID,!1,ee.oidToDer(tr.oids.data).getBytes()),ee.create(ee.Class.CONTEXT_SPECIFIC,0,!0,[ee.create(ee.Class.UNIVERSAL,ee.Type.OCTETSTRING,!1,ee.toDer(w).getBytes())])]);l.push(C)}var _=null;if(r!==null){var b=tr.wrapRsaPrivateKey(tr.privateKeyToAsn1(r));t===null?_=ee.create(ee.Class.UNIVERSAL,ee.Type.SEQUENCE,!0,[ee.create(ee.Class.UNIVERSAL,ee.Type.OID,!1,ee.oidToDer(tr.oids.keyBag).getBytes()),ee.create(ee.Class.CONTEXT_SPECIFIC,0,!0,[b]),i]):_=ee.create(ee.Class.UNIVERSAL,ee.Type.SEQUENCE,!0,[ee.create(ee.Class.UNIVERSAL,ee.Type.OID,!1,ee.oidToDer(tr.oids.pkcs8ShroudedKeyBag).getBytes()),ee.create(ee.Class.CONTEXT_SPECIFIC,0,!0,[tr.encryptPrivateKeyInfo(b,t,n)]),i]);var A=ee.create(ee.Class.UNIVERSAL,ee.Type.SEQUENCE,!0,[_]),T=ee.create(ee.Class.UNIVERSAL,ee.Type.SEQUENCE,!0,[ee.create(ee.Class.UNIVERSAL,ee.Type.OID,!1,ee.oidToDer(tr.oids.data).getBytes()),ee.create(ee.Class.CONTEXT_SPECIFIC,0,!0,[ee.create(ee.Class.UNIVERSAL,ee.Type.OCTETSTRING,!1,ee.toDer(A).getBytes())])]);l.push(T)}var B=ee.create(ee.Class.UNIVERSAL,ee.Type.SEQUENCE,!0,l),M;if(n.useMac){var u=Vr.md.sha1.create(),I=new Vr.util.ByteBuffer(Vr.random.getBytes(n.saltSize)),H=n.count,r=Pg.generateKey(t,I,3,H,20),K=Vr.hmac.create();K.start(u,r),K.update(ee.toDer(B).getBytes());var q=K.getMac();M=ee.create(ee.Class.UNIVERSAL,ee.Type.SEQUENCE,!0,[ee.create(ee.Class.UNIVERSAL,ee.Type.SEQUENCE,!0,[ee.create(ee.Class.UNIVERSAL,ee.Type.SEQUENCE,!0,[ee.create(ee.Class.UNIVERSAL,ee.Type.OID,!1,ee.oidToDer(tr.oids.sha1).getBytes()),ee.create(ee.Class.UNIVERSAL,ee.Type.NULL,!1,"")]),ee.create(ee.Class.UNIVERSAL,ee.Type.OCTETSTRING,!1,q.getBytes())]),ee.create(ee.Class.UNIVERSAL,ee.Type.OCTETSTRING,!1,I.getBytes()),ee.create(ee.Class.UNIVERSAL,ee.Type.INTEGER,!1,ee.integerToDer(H).getBytes())])}return ee.create(ee.Class.UNIVERSAL,ee.Type.SEQUENCE,!0,[ee.create(ee.Class.UNIVERSAL,ee.Type.INTEGER,!1,ee.integerToDer(3).getBytes()),ee.create(ee.Class.UNIVERSAL,ee.Type.SEQUENCE,!0,[ee.create(ee.Class.UNIVERSAL,ee.Type.OID,!1,ee.oidToDer(tr.oids.data).getBytes()),ee.create(ee.Class.CONTEXT_SPECIFIC,0,!0,[ee.create(ee.Class.UNIVERSAL,ee.Type.OCTETSTRING,!1,ee.toDer(B).getBytes())])]),M])};Pg.generateKey=Vr.pbe.generatePkcs12Key});var ST=te((jye,W4)=>{"use strict";var Qu=zt();la();Wu();mT();zl();lE();wT();vE();Rg();pr();wE();var ET=Qu.asn1,Fp=W4.exports=Qu.pki=Qu.pki||{};Fp.pemToDer=function(r){var e=Qu.pem.decode(r)[0];if(e.procType&&e.procType.type==="ENCRYPTED")throw new Error("Could not convert PEM to DER; PEM is encrypted.");return Qu.util.createBuffer(e.body)};Fp.privateKeyFromPem=function(r){var e=Qu.pem.decode(r)[0];if(e.type!=="PRIVATE KEY"&&e.type!=="RSA PRIVATE KEY"){var t=new Error('Could not convert private key from PEM; PEM header type is not "PRIVATE KEY" or "RSA PRIVATE KEY".');throw t.headerType=e.type,t}if(e.procType&&e.procType.type==="ENCRYPTED")throw new Error("Could not convert private key from PEM; PEM is encrypted.");var n=ET.fromDer(e.body);return Fp.privateKeyFromAsn1(n)};Fp.privateKeyToPem=function(r,e){var t={type:"RSA PRIVATE KEY",body:ET.toDer(Fp.privateKeyToAsn1(r)).getBytes()};return Qu.pem.encode(t,{maxline:e})};Fp.privateKeyInfoToPem=function(r,e){var t={type:"PRIVATE KEY",body:ET.toDer(r).getBytes()};return Qu.pem.encode(t,{maxline:e})}});var IT=te((Fye,rL)=>{"use strict";var je=zt();la();Rp();aE();zl();ST();Ri();Lp();pr();var AE=o(function(r,e,t,n){var s=je.util.createBuffer(),i=r.length>>1,a=i+(r.length&1),u=r.substr(0,a),c=r.substr(i,a),l=je.util.createBuffer(),h=je.hmac.create();t=e+t;var m=Math.ceil(n/16),g=Math.ceil(n/20);h.start("MD5",u);var y=je.util.createBuffer();l.putBytes(t);for(var v=0;v<m;++v)h.start(null,null),h.update(l.getBytes()),l.putBuffer(h.digest()),h.start(null,null),h.update(l.bytes()+t),y.putBuffer(h.digest());h.start("SHA1",c);var E=je.util.createBuffer();l.clear(),l.putBytes(t);for(var v=0;v<g;++v)h.start(null,null),h.update(l.getBytes()),l.putBuffer(h.digest()),h.start(null,null),h.update(l.bytes()+t),E.putBuffer(h.digest());return s.putBytes(je.util.xorBytes(y.getBytes(),E.getBytes(),n)),s},"prf_TLS1"),nte=o(function(r,e,t){var n=je.hmac.create();n.start("SHA1",r);var s=je.util.createBuffer();return s.putInt32(e[0]),s.putInt32(e[1]),s.putByte(t.type),s.putByte(t.version.major),s.putByte(t.version.minor),s.putInt16(t.length),s.putBytes(t.fragment.bytes()),n.update(s.getBytes()),n.digest().getBytes()},"hmac_sha1"),ste=o(function(r,e,t){var n=!1;try{var s=r.deflate(e.fragment.getBytes());e.fragment=je.util.createBuffer(s),e.length=s.length,n=!0}catch{}return n},"deflate"),ite=o(function(r,e,t){var n=!1;try{var s=r.inflate(e.fragment.getBytes());e.fragment=je.util.createBuffer(s),e.length=s.length,n=!0}catch{}return n},"inflate"),li=o(function(r,e){var t=0;switch(e){case 1:t=r.getByte();break;case 2:t=r.getInt16();break;case 3:t=r.getInt24();break;case 4:t=r.getInt32();break}return je.util.createBuffer(r.getBytes(t))},"readVector"),Li=o(function(r,e,t){r.putInt(t.length(),e<<3),r.putBuffer(t)},"writeVector"),j={};j.Versions={TLS_1_0:{major:3,minor:1},TLS_1_1:{major:3,minor:2},TLS_1_2:{major:3,minor:3}};j.SupportedVersions=[j.Versions.TLS_1_1,j.Versions.TLS_1_0];j.Version=j.SupportedVersions[0];j.MaxFragment=15360;j.ConnectionEnd={server:0,client:1};j.PRFAlgorithm={tls_prf_sha256:0};j.BulkCipherAlgorithm={none:null,rc4:0,des3:1,aes:2};j.CipherType={stream:0,block:1,aead:2};j.MACAlgorithm={none:null,hmac_md5:0,hmac_sha1:1,hmac_sha256:2,hmac_sha384:3,hmac_sha512:4};j.CompressionMethod={none:0,deflate:1};j.ContentType={change_cipher_spec:20,alert:21,handshake:22,application_data:23,heartbeat:24};j.HandshakeType={hello_request:0,client_hello:1,server_hello:2,certificate:11,server_key_exchange:12,certificate_request:13,server_hello_done:14,certificate_verify:15,client_key_exchange:16,finished:20};j.Alert={};j.Alert.Level={warning:1,fatal:2};j.Alert.Description={close_notify:0,unexpected_message:10,bad_record_mac:20,decryption_failed:21,record_overflow:22,decompression_failure:30,handshake_failure:40,bad_certificate:42,unsupported_certificate:43,certificate_revoked:44,certificate_expired:45,certificate_unknown:46,illegal_parameter:47,unknown_ca:48,access_denied:49,decode_error:50,decrypt_error:51,export_restriction:60,protocol_version:70,insufficient_security:71,internal_error:80,user_canceled:90,no_renegotiation:100};j.HeartbeatMessageType={heartbeat_request:1,heartbeat_response:2};j.CipherSuites={};j.getCipherSuite=function(r){var e=null;for(var t in j.CipherSuites){var n=j.CipherSuites[t];if(n.id[0]===r.charCodeAt(0)&&n.id[1]===r.charCodeAt(1)){e=n;break}}return e};j.handleUnexpected=function(r,e){var t=!r.open&&r.entity===j.ConnectionEnd.client;t||r.error(r,{message:"Unexpected message. Received TLS record out of order.",send:!0,alert:{level:j.Alert.Level.fatal,description:j.Alert.Description.unexpected_message}})};j.handleHelloRequest=function(r,e,t){!r.handshaking&&r.handshakes>0&&(j.queue(r,j.createAlert(r,{level:j.Alert.Level.warning,description:j.Alert.Description.no_renegotiation})),j.flush(r)),r.process()};j.parseHelloMessage=function(r,e,t){var n=null,s=r.entity===j.ConnectionEnd.client;if(t<38)r.error(r,{message:s?"Invalid ServerHello message. Message too short.":"Invalid ClientHello message. Message too short.",send:!0,alert:{level:j.Alert.Level.fatal,description:j.Alert.Description.illegal_parameter}});else{var i=e.fragment,a=i.length();if(n={version:{major:i.getByte(),minor:i.getByte()},random:je.util.createBuffer(i.getBytes(32)),session_id:li(i,1),extensions:[]},s?(n.cipher_suite=i.getBytes(2),n.compression_method=i.getByte()):(n.cipher_suites=li(i,2),n.compression_methods=li(i,1)),a=t-(a-i.length()),a>0){for(var u=li(i,2);u.length()>0;)n.extensions.push({type:[u.getByte(),u.getByte()],data:li(u,2)});if(!s)for(var c=0;c<n.extensions.length;++c){var l=n.extensions[c];if(l.type[0]===0&&l.type[1]===0)for(var h=li(l.data,2);h.length()>0;){var m=h.getByte();if(m!==0)break;r.session.extensions.server_name.serverNameList.push(li(h,2).getBytes())}}}if(r.session.version&&(n.version.major!==r.session.version.major||n.version.minor!==r.session.version.minor))return r.error(r,{message:"TLS version change is disallowed during renegotiation.",send:!0,alert:{level:j.Alert.Level.fatal,description:j.Alert.Description.protocol_version}});if(s)r.session.cipherSuite=j.getCipherSuite(n.cipher_suite);else for(var g=je.util.createBuffer(n.cipher_suites.bytes());g.length()>0&&(r.session.cipherSuite=j.getCipherSuite(g.getBytes(2)),r.session.cipherSuite===null););if(r.session.cipherSuite===null)return r.error(r,{message:"No cipher suites in common.",send:!0,alert:{level:j.Alert.Level.fatal,description:j.Alert.Description.handshake_failure},cipherSuite:je.util.bytesToHex(n.cipher_suite)});s?r.session.compressionMethod=n.compression_method:r.session.compressionMethod=j.CompressionMethod.none}return n};j.createSecurityParameters=function(r,e){var t=r.entity===j.ConnectionEnd.client,n=e.random.bytes(),s=t?r.session.sp.client_random:n,i=t?n:j.createRandom().getBytes();r.session.sp={entity:r.entity,prf_algorithm:j.PRFAlgorithm.tls_prf_sha256,bulk_cipher_algorithm:null,cipher_type:null,enc_key_length:null,block_length:null,fixed_iv_length:null,record_iv_length:null,mac_algorithm:null,mac_length:null,mac_key_length:null,compression_algorithm:r.session.compressionMethod,pre_master_secret:null,master_secret:null,client_random:s,server_random:i}};j.handleServerHello=function(r,e,t){var n=j.parseHelloMessage(r,e,t);if(!r.fail){if(n.version.minor<=r.version.minor)r.version.minor=n.version.minor;else return r.error(r,{message:"Incompatible TLS version.",send:!0,alert:{level:j.Alert.Level.fatal,description:j.Alert.Description.protocol_version}});r.session.version=r.version;var s=n.session_id.bytes();s.length>0&&s===r.session.id?(r.expect=Y4,r.session.resuming=!0,r.session.sp.server_random=n.random.bytes()):(r.expect=ote,r.session.resuming=!1,j.createSecurityParameters(r,n)),r.session.id=s,r.process()}};j.handleClientHello=function(r,e,t){var n=j.parseHelloMessage(r,e,t);if(!r.fail){var s=n.session_id.bytes(),i=null;if(r.sessionCache&&(i=r.sessionCache.getSession(s),i===null?s="":(i.version.major!==n.version.major||i.version.minor>n.version.minor)&&(i=null,s="")),s.length===0&&(s=je.random.getBytes(32)),r.session.id=s,r.session.clientHelloVersion=n.version,r.session.sp={},i)r.version=r.session.version=i.version,r.session.sp=i.sp;else{for(var a,u=1;u<j.SupportedVersions.length&&(a=j.SupportedVersions[u],!(a.minor<=n.version.minor));++u);r.version={major:a.major,minor:a.minor},r.session.version=r.version}i!==null?(r.expect=NT,r.session.resuming=!0,r.session.sp.client_random=n.random.bytes()):(r.expect=r.verifyClient!==!1?dte:CT,r.session.resuming=!1,j.createSecurityParameters(r,n)),r.open=!0,j.queue(r,j.createRecord(r,{type:j.ContentType.handshake,data:j.createServerHello(r)})),r.session.resuming?(j.queue(r,j.createRecord(r,{type:j.ContentType.change_cipher_spec,data:j.createChangeCipherSpec()})),r.state.pending=j.createConnectionState(r),r.state.current.write=r.state.pending.write,j.queue(r,j.createRecord(r,{type:j.ContentType.handshake,data:j.createFinished(r)}))):(j.queue(r,j.createRecord(r,{type:j.ContentType.handshake,data:j.createCertificate(r)})),r.fail||(j.queue(r,j.createRecord(r,{type:j.ContentType.handshake,data:j.createServerKeyExchange(r)})),r.verifyClient!==!1&&j.queue(r,j.createRecord(r,{type:j.ContentType.handshake,data:j.createCertificateRequest(r)})),j.queue(r,j.createRecord(r,{type:j.ContentType.handshake,data:j.createServerHelloDone(r)})))),j.flush(r),r.process()}};j.handleCertificate=function(r,e,t){if(t<3)return r.error(r,{message:"Invalid Certificate message. Message too short.",send:!0,alert:{level:j.Alert.Level.fatal,description:j.Alert.Description.illegal_parameter}});var n=e.fragment,s={certificate_list:li(n,3)},i,a,u=[];try{for(;s.certificate_list.length()>0;)i=li(s.certificate_list,3),a=je.asn1.fromDer(i),i=je.pki.certificateFromAsn1(a,!0),u.push(i)}catch(l){return r.error(r,{message:"Could not parse certificate list.",cause:l,send:!0,alert:{level:j.Alert.Level.fatal,description:j.Alert.Description.bad_certificate}})}var c=r.entity===j.ConnectionEnd.client;(c||r.verifyClient===!0)&&u.length===0?r.error(r,{message:c?"No server certificate provided.":"No client certificate provided.",send:!0,alert:{level:j.Alert.Level.fatal,description:j.Alert.Description.illegal_parameter}}):u.length===0?r.expect=c?z4:CT:(c?r.session.serverCertificate=u[0]:r.session.clientCertificate=u[0],j.verifyCertificateChain(r,u)&&(r.expect=c?z4:CT)),r.process()};j.handleServerKeyExchange=function(r,e,t){if(t>0)return r.error(r,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:j.Alert.Level.fatal,description:j.Alert.Description.unsupported_certificate}});r.expect=ute,r.process()};j.handleClientKeyExchange=function(r,e,t){if(t<48)return r.error(r,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:j.Alert.Level.fatal,description:j.Alert.Description.unsupported_certificate}});var n=e.fragment,s={enc_pre_master_secret:li(n,2).getBytes()},i=null;if(r.getPrivateKey)try{i=r.getPrivateKey(r,r.session.serverCertificate),i=je.pki.privateKeyFromPem(i)}catch(c){r.error(r,{message:"Could not get private key.",cause:c,send:!0,alert:{level:j.Alert.Level.fatal,description:j.Alert.Description.internal_error}})}if(i===null)return r.error(r,{message:"No private key set.",send:!0,alert:{level:j.Alert.Level.fatal,description:j.Alert.Description.internal_error}});try{var a=r.session.sp;a.pre_master_secret=i.decrypt(s.enc_pre_master_secret);var u=r.session.clientHelloVersion;if(u.major!==a.pre_master_secret.charCodeAt(0)||u.minor!==a.pre_master_secret.charCodeAt(1))throw new Error("TLS version rollback attack detected.")}catch{a.pre_master_secret=je.random.getBytes(48)}r.expect=NT,r.session.clientCertificate!==null&&(r.expect=mte),r.process()};j.handleCertificateRequest=function(r,e,t){if(t<3)return r.error(r,{message:"Invalid CertificateRequest. Message too short.",send:!0,alert:{level:j.Alert.Level.fatal,description:j.Alert.Description.illegal_parameter}});var n=e.fragment,s={certificate_types:li(n,1),certificate_authorities:li(n,2)};r.session.certificateRequest=s,r.expect=cte,r.process()};j.handleCertificateVerify=function(r,e,t){if(t<2)return r.error(r,{message:"Invalid CertificateVerify. Message too short.",send:!0,alert:{level:j.Alert.Level.fatal,description:j.Alert.Description.illegal_parameter}});var n=e.fragment;n.read-=4;var s=n.bytes();n.read+=4;var i={signature:li(n,2).getBytes()},a=je.util.createBuffer();a.putBuffer(r.session.md5.digest()),a.putBuffer(r.session.sha1.digest()),a=a.getBytes();try{var u=r.session.clientCertificate;if(!u.publicKey.verify(a,i.signature,"NONE"))throw new Error("CertificateVerify signature does not match.");r.session.md5.update(s),r.session.sha1.update(s)}catch{return r.error(r,{message:"Bad signature in CertificateVerify.",send:!0,alert:{level:j.Alert.Level.fatal,description:j.Alert.Description.handshake_failure}})}r.expect=NT,r.process()};j.handleServerHelloDone=function(r,e,t){if(t>0)return r.error(r,{message:"Invalid ServerHelloDone message. Invalid length.",send:!0,alert:{level:j.Alert.Level.fatal,description:j.Alert.Description.record_overflow}});if(r.serverCertificate===null){var n={message:"No server certificate provided. Not enough security.",send:!0,alert:{level:j.Alert.Level.fatal,description:j.Alert.Description.insufficient_security}},s=0,i=r.verify(r,n.alert.description,s,[]);if(i!==!0)return(i||i===0)&&(typeof i=="object"&&!je.util.isArray(i)?(i.message&&(n.message=i.message),i.alert&&(n.alert.description=i.alert)):typeof i=="number"&&(n.alert.description=i)),r.error(r,n)}r.session.certificateRequest!==null&&(e=j.createRecord(r,{type:j.ContentType.handshake,data:j.createCertificate(r)}),j.queue(r,e)),e=j.createRecord(r,{type:j.ContentType.handshake,data:j.createClientKeyExchange(r)}),j.queue(r,e),r.expect=hte;var a=o(function(u,c){u.session.certificateRequest!==null&&u.session.clientCertificate!==null&&j.queue(u,j.createRecord(u,{type:j.ContentType.handshake,data:j.createCertificateVerify(u,c)})),j.queue(u,j.createRecord(u,{type:j.ContentType.change_cipher_spec,data:j.createChangeCipherSpec()})),u.state.pending=j.createConnectionState(u),u.state.current.write=u.state.pending.write,j.queue(u,j.createRecord(u,{type:j.ContentType.handshake,data:j.createFinished(u)})),u.expect=Y4,j.flush(u),u.process()},"callback");if(r.session.certificateRequest===null||r.session.clientCertificate===null)return a(r,null);j.getClientSignature(r,a)};j.handleChangeCipherSpec=function(r,e){if(e.fragment.getByte()!==1)return r.error(r,{message:"Invalid ChangeCipherSpec message received.",send:!0,alert:{level:j.Alert.Level.fatal,description:j.Alert.Description.illegal_parameter}});var t=r.entity===j.ConnectionEnd.client;(r.session.resuming&&t||!r.session.resuming&&!t)&&(r.state.pending=j.createConnectionState(r)),r.state.current.read=r.state.pending.read,(!r.session.resuming&&t||r.session.resuming&&!t)&&(r.state.pending=null),r.expect=t?lte:gte,r.process()};j.handleFinished=function(r,e,t){var n=e.fragment;n.read-=4;var s=n.bytes();n.read+=4;var i=e.fragment.getBytes();n=je.util.createBuffer(),n.putBuffer(r.session.md5.digest()),n.putBuffer(r.session.sha1.digest());var a=r.entity===j.ConnectionEnd.client,u=a?"server finished":"client finished",c=r.session.sp,l=12,h=AE;if(n=h(c.master_secret,u,n.getBytes(),l),n.getBytes()!==i)return r.error(r,{message:"Invalid verify_data in Finished message.",send:!0,alert:{level:j.Alert.Level.fatal,description:j.Alert.Description.decrypt_error}});r.session.md5.update(s),r.session.sha1.update(s),(r.session.resuming&&a||!r.session.resuming&&!a)&&(j.queue(r,j.createRecord(r,{type:j.ContentType.change_cipher_spec,data:j.createChangeCipherSpec()})),r.state.current.write=r.state.pending.write,r.state.pending=null,j.queue(r,j.createRecord(r,{type:j.ContentType.handshake,data:j.createFinished(r)}))),r.expect=a?fte:vte,r.handshaking=!1,++r.handshakes,r.peerCertificate=a?r.session.serverCertificate:r.session.clientCertificate,j.flush(r),r.isConnected=!0,r.connected(r),r.process()};j.handleAlert=function(r,e){var t=e.fragment,n={level:t.getByte(),description:t.getByte()},s;switch(n.description){case j.Alert.Description.close_notify:s="Connection closed.";break;case j.Alert.Description.unexpected_message:s="Unexpected message.";break;case j.Alert.Description.bad_record_mac:s="Bad record MAC.";break;case j.Alert.Description.decryption_failed:s="Decryption failed.";break;case j.Alert.Description.record_overflow:s="Record overflow.";break;case j.Alert.Description.decompression_failure:s="Decompression failed.";break;case j.Alert.Description.handshake_failure:s="Handshake failure.";break;case j.Alert.Description.bad_certificate:s="Bad certificate.";break;case j.Alert.Description.unsupported_certificate:s="Unsupported certificate.";break;case j.Alert.Description.certificate_revoked:s="Certificate revoked.";break;case j.Alert.Description.certificate_expired:s="Certificate expired.";break;case j.Alert.Description.certificate_unknown:s="Certificate unknown.";break;case j.Alert.Description.illegal_parameter:s="Illegal parameter.";break;case j.Alert.Description.unknown_ca:s="Unknown certificate authority.";break;case j.Alert.Description.access_denied:s="Access denied.";break;case j.Alert.Description.decode_error:s="Decode error.";break;case j.Alert.Description.decrypt_error:s="Decrypt error.";break;case j.Alert.Description.export_restriction:s="Export restriction.";break;case j.Alert.Description.protocol_version:s="Unsupported protocol version.";break;case j.Alert.Description.insufficient_security:s="Insufficient security.";break;case j.Alert.Description.internal_error:s="Internal error.";break;case j.Alert.Description.user_canceled:s="User canceled.";break;case j.Alert.Description.no_renegotiation:s="Renegotiation not supported.";break;default:s="Unknown error.";break}if(n.description===j.Alert.Description.close_notify)return r.close();r.error(r,{message:s,send:!1,origin:r.entity===j.ConnectionEnd.client?"server":"client",alert:n}),r.process()};j.handleHandshake=function(r,e){var t=e.fragment,n=t.getByte(),s=t.getInt24();if(s>t.length())return r.fragmented=e,e.fragment=je.util.createBuffer(),t.read-=4,r.process();r.fragmented=null,t.read-=4;var i=t.bytes(s+4);t.read+=4,n in bE[r.entity][r.expect]?(r.entity===j.ConnectionEnd.server&&!r.open&&!r.fail&&(r.handshaking=!0,r.session={version:null,extensions:{server_name:{serverNameList:[]}},cipherSuite:null,compressionMethod:null,serverCertificate:null,clientCertificate:null,md5:je.md.md5.create(),sha1:je.md.sha1.create()}),n!==j.HandshakeType.hello_request&&n!==j.HandshakeType.certificate_verify&&n!==j.HandshakeType.finished&&(r.session.md5.update(i),r.session.sha1.update(i)),bE[r.entity][r.expect][n](r,e,s)):j.handleUnexpected(r,e)};j.handleApplicationData=function(r,e){r.data.putBuffer(e.fragment),r.dataReady(r),r.process()};j.handleHeartbeat=function(r,e){var t=e.fragment,n=t.getByte(),s=t.getInt16(),i=t.getBytes(s);if(n===j.HeartbeatMessageType.heartbeat_request){if(r.handshaking||s>i.length)return r.process();j.queue(r,j.createRecord(r,{type:j.ContentType.heartbeat,data:j.createHeartbeat(j.HeartbeatMessageType.heartbeat_response,i)})),j.flush(r)}else if(n===j.HeartbeatMessageType.heartbeat_response){if(i!==r.expectedHeartbeatPayload)return r.process();r.heartbeatReceived&&r.heartbeatReceived(r,je.util.createBuffer(i))}r.process()};var ate=0,ote=1,z4=2,ute=3,cte=4,Y4=5,lte=6,fte=7,hte=8,pte=0,dte=1,CT=2,mte=3,NT=4,gte=5,vte=6,U=j.handleUnexpected,Q4=j.handleChangeCipherSpec,Jn=j.handleAlert,Ns=j.handleHandshake,Z4=j.handleApplicationData,Yn=j.handleHeartbeat,TT=[];TT[j.ConnectionEnd.client]=[[U,Jn,Ns,U,Yn],[U,Jn,Ns,U,Yn],[U,Jn,Ns,U,Yn],[U,Jn,Ns,U,Yn],[U,Jn,Ns,U,Yn],[Q4,Jn,U,U,Yn],[U,Jn,Ns,U,Yn],[U,Jn,Ns,Z4,Yn],[U,Jn,Ns,U,Yn]];TT[j.ConnectionEnd.server]=[[U,Jn,Ns,U,Yn],[U,Jn,Ns,U,Yn],[U,Jn,Ns,U,Yn],[U,Jn,Ns,U,Yn],[Q4,Jn,U,U,Yn],[U,Jn,Ns,U,Yn],[U,Jn,Ns,Z4,Yn],[U,Jn,Ns,U,Yn]];var Zu=j.handleHelloRequest,yte=j.handleServerHello,eL=j.handleCertificate,J4=j.handleServerKeyExchange,bT=j.handleCertificateRequest,EE=j.handleServerHelloDone,tL=j.handleFinished,bE=[];bE[j.ConnectionEnd.client]=[[U,U,yte,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U],[Zu,U,U,U,U,U,U,U,U,U,U,eL,J4,bT,EE,U,U,U,U,U,U],[Zu,U,U,U,U,U,U,U,U,U,U,U,J4,bT,EE,U,U,U,U,U,U],[Zu,U,U,U,U,U,U,U,U,U,U,U,U,bT,EE,U,U,U,U,U,U],[Zu,U,U,U,U,U,U,U,U,U,U,U,U,U,EE,U,U,U,U,U,U],[Zu,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U],[Zu,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,tL],[Zu,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U],[Zu,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U]];var xte=j.handleClientHello,wte=j.handleClientKeyExchange,Ete=j.handleCertificateVerify;bE[j.ConnectionEnd.server]=[[U,xte,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U],[U,U,U,U,U,U,U,U,U,U,U,eL,U,U,U,U,U,U,U,U,U],[U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,wte,U,U,U,U],[U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,Ete,U,U,U,U,U],[U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U],[U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,tL],[U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U],[U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U]];j.generateKeys=function(r,e){var t=AE,n=e.client_random+e.server_random;r.session.resuming||(e.master_secret=t(e.pre_master_secret,"master secret",n,48).bytes(),e.pre_master_secret=null),n=e.server_random+e.client_random;var s=2*e.mac_key_length+2*e.enc_key_length,i=r.version.major===j.Versions.TLS_1_0.major&&r.version.minor===j.Versions.TLS_1_0.minor;i&&(s+=2*e.fixed_iv_length);var a=t(e.master_secret,"key expansion",n,s),u={client_write_MAC_key:a.getBytes(e.mac_key_length),server_write_MAC_key:a.getBytes(e.mac_key_length),client_write_key:a.getBytes(e.enc_key_length),server_write_key:a.getBytes(e.enc_key_length)};return i&&(u.client_write_IV=a.getBytes(e.fixed_iv_length),u.server_write_IV=a.getBytes(e.fixed_iv_length)),u};j.createConnectionState=function(r){var e=r.entity===j.ConnectionEnd.client,t=o(function(){var i={sequenceNumber:[0,0],macKey:null,macLength:0,macFunction:null,cipherState:null,cipherFunction:o(function(a){return!0},"cipherFunction"),compressionState:null,compressFunction:o(function(a){return!0},"compressFunction"),updateSequenceNumber:o(function(){i.sequenceNumber[1]===4294967295?(i.sequenceNumber[1]=0,++i.sequenceNumber[0]):++i.sequenceNumber[1]},"updateSequenceNumber")};return i},"createMode"),n={read:t(),write:t()};if(n.read.update=function(i,a){return n.read.cipherFunction(a,n.read)?n.read.compressFunction(i,a,n.read)||i.error(i,{message:"Could not decompress record.",send:!0,alert:{level:j.Alert.Level.fatal,description:j.Alert.Description.decompression_failure}}):i.error(i,{message:"Could not decrypt record or bad MAC.",send:!0,alert:{level:j.Alert.Level.fatal,description:j.Alert.Description.bad_record_mac}}),!i.fail},n.write.update=function(i,a){return n.write.compressFunction(i,a,n.write)?n.write.cipherFunction(a,n.write)||i.error(i,{message:"Could not encrypt record.",send:!1,alert:{level:j.Alert.Level.fatal,description:j.Alert.Description.internal_error}}):i.error(i,{message:"Could not compress record.",send:!1,alert:{level:j.Alert.Level.fatal,description:j.Alert.Description.internal_error}}),!i.fail},r.session){var s=r.session.sp;switch(r.session.cipherSuite.initSecurityParameters(s),s.keys=j.generateKeys(r,s),n.read.macKey=e?s.keys.server_write_MAC_key:s.keys.client_write_MAC_key,n.write.macKey=e?s.keys.client_write_MAC_key:s.keys.server_write_MAC_key,r.session.cipherSuite.initConnectionState(n,r,s),s.compression_algorithm){case j.CompressionMethod.none:break;case j.CompressionMethod.deflate:n.read.compressFunction=ite,n.write.compressFunction=ste;break;default:throw new Error("Unsupported compression algorithm.")}}return n};j.createRandom=function(){var r=new Date,e=+r+r.getTimezoneOffset()*6e4,t=je.util.createBuffer();return t.putInt32(e),t.putBytes(je.random.getBytes(28)),t};j.createRecord=function(r,e){if(!e.data)return null;var t={type:e.type,version:{major:r.version.major,minor:r.version.minor},length:e.data.length(),fragment:e.data};return t};j.createAlert=function(r,e){var t=je.util.createBuffer();return t.putByte(e.level),t.putByte(e.description),j.createRecord(r,{type:j.ContentType.alert,data:t})};j.createClientHello=function(r){r.session.clientHelloVersion={major:r.version.major,minor:r.version.minor};for(var e=je.util.createBuffer(),t=0;t<r.cipherSuites.length;++t){var n=r.cipherSuites[t];e.putByte(n.id[0]),e.putByte(n.id[1])}var s=e.length(),i=je.util.createBuffer();i.putByte(j.CompressionMethod.none);var a=i.length(),u=je.util.createBuffer();if(r.virtualHost){var c=je.util.createBuffer();c.putByte(0),c.putByte(0);var l=je.util.createBuffer();l.putByte(0),Li(l,2,je.util.createBuffer(r.virtualHost));var h=je.util.createBuffer();Li(h,2,l),Li(c,2,h),u.putBuffer(c)}var m=u.length();m>0&&(m+=2);var g=r.session.id,y=g.length+1+2+4+28+2+s+1+a+m,v=je.util.createBuffer();return v.putByte(j.HandshakeType.client_hello),v.putInt24(y),v.putByte(r.version.major),v.putByte(r.version.minor),v.putBytes(r.session.sp.client_random),Li(v,1,je.util.createBuffer(g)),Li(v,2,e),Li(v,1,i),m>0&&Li(v,2,u),v};j.createServerHello=function(r){var e=r.session.id,t=e.length+1+2+4+28+2+1,n=je.util.createBuffer();return n.putByte(j.HandshakeType.server_hello),n.putInt24(t),n.putByte(r.version.major),n.putByte(r.version.minor),n.putBytes(r.session.sp.server_random),Li(n,1,je.util.createBuffer(e)),n.putByte(r.session.cipherSuite.id[0]),n.putByte(r.session.cipherSuite.id[1]),n.putByte(r.session.compressionMethod),n};j.createCertificate=function(r){var e=r.entity===j.ConnectionEnd.client,t=null;if(r.getCertificate){var n;e?n=r.session.certificateRequest:n=r.session.extensions.server_name.serverNameList,t=r.getCertificate(r,n)}var s=je.util.createBuffer();if(t!==null)try{je.util.isArray(t)||(t=[t]);for(var i=null,a=0;a<t.length;++a){var u=je.pem.decode(t[a])[0];if(u.type!=="CERTIFICATE"&&u.type!=="X509 CERTIFICATE"&&u.type!=="TRUSTED CERTIFICATE"){var c=new Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');throw c.headerType=u.type,c}if(u.procType&&u.procType.type==="ENCRYPTED")throw new Error("Could not convert certificate from PEM; PEM is encrypted.");var l=je.util.createBuffer(u.body);i===null&&(i=je.asn1.fromDer(l.bytes(),!1));var h=je.util.createBuffer();Li(h,3,l),s.putBuffer(h)}t=je.pki.certificateFromAsn1(i),e?r.session.clientCertificate=t:r.session.serverCertificate=t}catch(y){return r.error(r,{message:"Could not send certificate list.",cause:y,send:!0,alert:{level:j.Alert.Level.fatal,description:j.Alert.Description.bad_certificate}})}var m=3+s.length(),g=je.util.createBuffer();return g.putByte(j.HandshakeType.certificate),g.putInt24(m),Li(g,3,s),g};j.createClientKeyExchange=function(r){var e=je.util.createBuffer();e.putByte(r.session.clientHelloVersion.major),e.putByte(r.session.clientHelloVersion.minor),e.putBytes(je.random.getBytes(46));var t=r.session.sp;t.pre_master_secret=e.getBytes();var n=r.session.serverCertificate.publicKey;e=n.encrypt(t.pre_master_secret);var s=e.length+2,i=je.util.createBuffer();return i.putByte(j.HandshakeType.client_key_exchange),i.putInt24(s),i.putInt16(e.length),i.putBytes(e),i};j.createServerKeyExchange=function(r){var e=0,t=je.util.createBuffer();return e>0&&(t.putByte(j.HandshakeType.server_key_exchange),t.putInt24(e)),t};j.getClientSignature=function(r,e){var t=je.util.createBuffer();t.putBuffer(r.session.md5.digest()),t.putBuffer(r.session.sha1.digest()),t=t.getBytes(),r.getSignature=r.getSignature||function(n,s,i){var a=null;if(n.getPrivateKey)try{a=n.getPrivateKey(n,n.session.clientCertificate),a=je.pki.privateKeyFromPem(a)}catch(u){n.error(n,{message:"Could not get private key.",cause:u,send:!0,alert:{level:j.Alert.Level.fatal,description:j.Alert.Description.internal_error}})}a===null?n.error(n,{message:"No private key set.",send:!0,alert:{level:j.Alert.Level.fatal,description:j.Alert.Description.internal_error}}):s=a.sign(s,null),i(n,s)},r.getSignature(r,t,e)};j.createCertificateVerify=function(r,e){var t=e.length+2,n=je.util.createBuffer();return n.putByte(j.HandshakeType.certificate_verify),n.putInt24(t),n.putInt16(e.length),n.putBytes(e),n};j.createCertificateRequest=function(r){var e=je.util.createBuffer();e.putByte(1);var t=je.util.createBuffer();for(var n in r.caStore.certs){var s=r.caStore.certs[n],i=je.pki.distinguishedNameToAsn1(s.subject),a=je.asn1.toDer(i);t.putInt16(a.length()),t.putBuffer(a)}var u=1+e.length()+2+t.length(),c=je.util.createBuffer();return c.putByte(j.HandshakeType.certificate_request),c.putInt24(u),Li(c,1,e),Li(c,2,t),c};j.createServerHelloDone=function(r){var e=je.util.createBuffer();return e.putByte(j.HandshakeType.server_hello_done),e.putInt24(0),e};j.createChangeCipherSpec=function(){var r=je.util.createBuffer();return r.putByte(1),r};j.createFinished=function(r){var e=je.util.createBuffer();e.putBuffer(r.session.md5.digest()),e.putBuffer(r.session.sha1.digest());var t=r.entity===j.ConnectionEnd.client,n=r.session.sp,s=12,i=AE,a=t?"client finished":"server finished";e=i(n.master_secret,a,e.getBytes(),s);var u=je.util.createBuffer();return u.putByte(j.HandshakeType.finished),u.putInt24(e.length()),u.putBuffer(e),u};j.createHeartbeat=function(r,e,t){typeof t>"u"&&(t=e.length);var n=je.util.createBuffer();n.putByte(r),n.putInt16(t),n.putBytes(e);var s=n.length(),i=Math.max(16,s-t-3);return n.putBytes(je.random.getBytes(i)),n};j.queue=function(r,e){if(e&&!(e.fragment.length()===0&&(e.type===j.ContentType.handshake||e.type===j.ContentType.alert||e.type===j.ContentType.change_cipher_spec))){if(e.type===j.ContentType.handshake){var t=e.fragment.bytes();r.session.md5.update(t),r.session.sha1.update(t),t=null}var n;if(e.fragment.length()<=j.MaxFragment)n=[e];else{n=[];for(var s=e.fragment.bytes();s.length>j.MaxFragment;)n.push(j.createRecord(r,{type:e.type,data:je.util.createBuffer(s.slice(0,j.MaxFragment))})),s=s.slice(j.MaxFragment);s.length>0&&n.push(j.createRecord(r,{type:e.type,data:je.util.createBuffer(s)}))}for(var i=0;i<n.length&&!r.fail;++i){var a=n[i],u=r.state.current.write;u.update(r,a)&&r.records.push(a)}}};j.flush=function(r){for(var e=0;e<r.records.length;++e){var t=r.records[e];r.tlsData.putByte(t.type),r.tlsData.putByte(t.version.major),r.tlsData.putByte(t.version.minor),r.tlsData.putInt16(t.fragment.length()),r.tlsData.putBuffer(r.records[e].fragment)}return r.records=[],r.tlsDataReady(r)};var AT=o(function(r){switch(r){case!0:return!0;case je.pki.certificateError.bad_certificate:return j.Alert.Description.bad_certificate;case je.pki.certificateError.unsupported_certificate:return j.Alert.Description.unsupported_certificate;case je.pki.certificateError.certificate_revoked:return j.Alert.Description.certificate_revoked;case je.pki.certificateError.certificate_expired:return j.Alert.Description.certificate_expired;case je.pki.certificateError.certificate_unknown:return j.Alert.Description.certificate_unknown;case je.pki.certificateError.unknown_ca:return j.Alert.Description.unknown_ca;default:return j.Alert.Description.bad_certificate}},"_certErrorToAlertDesc"),Ste=o(function(r){switch(r){case!0:return!0;case j.Alert.Description.bad_certificate:return je.pki.certificateError.bad_certificate;case j.Alert.Description.unsupported_certificate:return je.pki.certificateError.unsupported_certificate;case j.Alert.Description.certificate_revoked:return je.pki.certificateError.certificate_revoked;case j.Alert.Description.certificate_expired:return je.pki.certificateError.certificate_expired;case j.Alert.Description.certificate_unknown:return je.pki.certificateError.certificate_unknown;case j.Alert.Description.unknown_ca:return je.pki.certificateError.unknown_ca;default:return je.pki.certificateError.bad_certificate}},"_alertDescToCertError");j.verifyCertificateChain=function(r,e){try{var t={};for(var n in r.verifyOptions)t[n]=r.verifyOptions[n];t.verify=function(i,a,u){var c=AT(i),l=r.verify(r,i,a,u);if(l!==!0){if(typeof l=="object"&&!je.util.isArray(l)){var h=new Error("The application rejected the certificate.");throw h.send=!0,h.alert={level:j.Alert.Level.fatal,description:j.Alert.Description.bad_certificate},l.message&&(h.message=l.message),l.alert&&(h.alert.description=l.alert),h}l!==i&&(l=Ste(l))}return l},je.pki.verifyCertificateChain(r.caStore,e,t)}catch(i){var s=i;(typeof s!="object"||je.util.isArray(s))&&(s={send:!0,alert:{level:j.Alert.Level.fatal,description:AT(i)}}),"send"in s||(s.send=!0),"alert"in s||(s.alert={level:j.Alert.Level.fatal,description:AT(s.error)}),r.error(r,s)}return!r.fail};j.createSessionCache=function(r,e){var t=null;if(r&&r.getSession&&r.setSession&&r.order)t=r;else{t={},t.cache=r||{},t.capacity=Math.max(e||100,1),t.order=[];for(var n in r)t.order.length<=e?t.order.push(n):delete r[n];t.getSession=function(s){var i=null,a=null;if(s?a=je.util.bytesToHex(s):t.order.length>0&&(a=t.order[0]),a!==null&&a in t.cache){i=t.cache[a],delete t.cache[a];for(var u in t.order)if(t.order[u]===a){t.order.splice(u,1);break}}return i},t.setSession=function(s,i){if(t.order.length===t.capacity){var a=t.order.shift();delete t.cache[a]}var a=je.util.bytesToHex(s);t.order.push(a),t.cache[a]=i}}return t};j.createConnection=function(r){var e=null;r.caStore?je.util.isArray(r.caStore)?e=je.pki.createCaStore(r.caStore):e=r.caStore:e=je.pki.createCaStore();var t=r.cipherSuites||null;if(t===null){t=[];for(var n in j.CipherSuites)t.push(j.CipherSuites[n])}var s=r.server?j.ConnectionEnd.server:j.ConnectionEnd.client,i=r.sessionCache?j.createSessionCache(r.sessionCache):null,a={version:{major:j.Version.major,minor:j.Version.minor},entity:s,sessionId:r.sessionId,caStore:e,sessionCache:i,cipherSuites:t,connected:r.connected,virtualHost:r.virtualHost||null,verifyClient:r.verifyClient||!1,verify:r.verify||function(h,m,g,y){return m},verifyOptions:r.verifyOptions||{},getCertificate:r.getCertificate||null,getPrivateKey:r.getPrivateKey||null,getSignature:r.getSignature||null,input:je.util.createBuffer(),tlsData:je.util.createBuffer(),data:je.util.createBuffer(),tlsDataReady:r.tlsDataReady,dataReady:r.dataReady,heartbeatReceived:r.heartbeatReceived,closed:r.closed,error:o(function(h,m){m.origin=m.origin||(h.entity===j.ConnectionEnd.client?"client":"server"),m.send&&(j.queue(h,j.createAlert(h,m.alert)),j.flush(h));var g=m.fatal!==!1;g&&(h.fail=!0),r.error(h,m),g&&h.close(!1)},"error"),deflate:r.deflate||null,inflate:r.inflate||null};a.reset=function(h){a.version={major:j.Version.major,minor:j.Version.minor},a.record=null,a.session=null,a.peerCertificate=null,a.state={pending:null,current:null},a.expect=a.entity===j.ConnectionEnd.client?ate:pte,a.fragmented=null,a.records=[],a.open=!1,a.handshakes=0,a.handshaking=!1,a.isConnected=!1,a.fail=!(h||typeof h>"u"),a.input.clear(),a.tlsData.clear(),a.data.clear(),a.state.current=j.createConnectionState(a)},a.reset();var u=o(function(h,m){var g=m.type-j.ContentType.change_cipher_spec,y=TT[h.entity][h.expect];g in y?y[g](h,m):j.handleUnexpected(h,m)},"_update"),c=o(function(h){var m=0,g=h.input,y=g.length();if(y<5)m=5-y;else{h.record={type:g.getByte(),version:{major:g.getByte(),minor:g.getByte()},length:g.getInt16(),fragment:je.util.createBuffer(),ready:!1};var v=h.record.version.major===h.version.major;v&&h.session&&h.session.version&&(v=h.record.version.minor===h.version.minor),v||h.error(h,{message:"Incompatible TLS version.",send:!0,alert:{level:j.Alert.Level.fatal,description:j.Alert.Description.protocol_version}})}return m},"_readRecordHeader"),l=o(function(h){var m=0,g=h.input,y=g.length();if(y<h.record.length)m=h.record.length-y;else{h.record.fragment.putBytes(g.getBytes(h.record.length)),g.compact();var v=h.state.current.read;v.update(h,h.record)&&(h.fragmented!==null&&(h.fragmented.type===h.record.type?(h.fragmented.fragment.putBuffer(h.record.fragment),h.record=h.fragmented):h.error(h,{message:"Invalid fragmented record.",send:!0,alert:{level:j.Alert.Level.fatal,description:j.Alert.Description.unexpected_message}})),h.record.ready=!0)}return m},"_readRecord");return a.handshake=function(h){if(a.entity!==j.ConnectionEnd.client)a.error(a,{message:"Cannot initiate handshake as a server.",fatal:!1});else if(a.handshaking)a.error(a,{message:"Handshake already in progress.",fatal:!1});else{a.fail&&!a.open&&a.handshakes===0&&(a.fail=!1),a.handshaking=!0,h=h||"";var m=null;h.length>0&&(a.sessionCache&&(m=a.sessionCache.getSession(h)),m===null&&(h="")),h.length===0&&a.sessionCache&&(m=a.sessionCache.getSession(),m!==null&&(h=m.id)),a.session={id:h,version:null,cipherSuite:null,compressionMethod:null,serverCertificate:null,certificateRequest:null,clientCertificate:null,sp:{},md5:je.md.md5.create(),sha1:je.md.sha1.create()},m&&(a.version=m.version,a.session.sp=m.sp),a.session.sp.client_random=j.createRandom().getBytes(),a.open=!0,j.queue(a,j.createRecord(a,{type:j.ContentType.handshake,data:j.createClientHello(a)})),j.flush(a)}},a.process=function(h){var m=0;return h&&a.input.putBytes(h),a.fail||(a.record!==null&&a.record.ready&&a.record.fragment.isEmpty()&&(a.record=null),a.record===null&&(m=c(a)),!a.fail&&a.record!==null&&!a.record.ready&&(m=l(a)),!a.fail&&a.record!==null&&a.record.ready&&u(a,a.record)),m},a.prepare=function(h){return j.queue(a,j.createRecord(a,{type:j.ContentType.application_data,data:je.util.createBuffer(h)})),j.flush(a)},a.prepareHeartbeatRequest=function(h,m){return h instanceof je.util.ByteBuffer&&(h=h.bytes()),typeof m>"u"&&(m=h.length),a.expectedHeartbeatPayload=h,j.queue(a,j.createRecord(a,{type:j.ContentType.heartbeat,data:j.createHeartbeat(j.HeartbeatMessageType.heartbeat_request,h,m)})),j.flush(a)},a.close=function(h){if(!a.fail&&a.sessionCache&&a.session){var m={id:a.session.id,version:a.session.version,sp:a.session.sp};m.sp.keys=null,a.sessionCache.setSession(m.id,m)}a.open&&(a.open=!1,a.input.clear(),(a.isConnected||a.handshaking)&&(a.isConnected=a.handshaking=!1,j.queue(a,j.createAlert(a,{level:j.Alert.Level.warning,description:j.Alert.Description.close_notify})),j.flush(a)),a.closed(a)),a.reset(h)},a};rL.exports=je.tls=je.tls||{};for(SE in j)typeof j[SE]!="function"&&(je.tls[SE]=j[SE]);var SE;je.tls.prf_tls1=AE;je.tls.hmac_sha1=nte;je.tls.createSessionCache=j.createSessionCache;je.tls.createConnection=j.createConnection});var iL=te((qye,sL)=>{"use strict";var ec=zt();Xu();IT();var Vi=sL.exports=ec.tls;Vi.CipherSuites.TLS_RSA_WITH_AES_128_CBC_SHA={id:[0,47],name:"TLS_RSA_WITH_AES_128_CBC_SHA",initSecurityParameters:o(function(r){r.bulk_cipher_algorithm=Vi.BulkCipherAlgorithm.aes,r.cipher_type=Vi.CipherType.block,r.enc_key_length=16,r.block_length=16,r.fixed_iv_length=16,r.record_iv_length=16,r.mac_algorithm=Vi.MACAlgorithm.hmac_sha1,r.mac_length=20,r.mac_key_length=20},"initSecurityParameters"),initConnectionState:nL};Vi.CipherSuites.TLS_RSA_WITH_AES_256_CBC_SHA={id:[0,53],name:"TLS_RSA_WITH_AES_256_CBC_SHA",initSecurityParameters:o(function(r){r.bulk_cipher_algorithm=Vi.BulkCipherAlgorithm.aes,r.cipher_type=Vi.CipherType.block,r.enc_key_length=32,r.block_length=16,r.fixed_iv_length=16,r.record_iv_length=16,r.mac_algorithm=Vi.MACAlgorithm.hmac_sha1,r.mac_length=20,r.mac_key_length=20},"initSecurityParameters"),initConnectionState:nL};function nL(r,e,t){var n=e.entity===ec.tls.ConnectionEnd.client;r.read.cipherState={init:!1,cipher:ec.cipher.createDecipher("AES-CBC",n?t.keys.server_write_key:t.keys.client_write_key),iv:n?t.keys.server_write_IV:t.keys.client_write_IV},r.write.cipherState={init:!1,cipher:ec.cipher.createCipher("AES-CBC",n?t.keys.client_write_key:t.keys.server_write_key),iv:n?t.keys.client_write_IV:t.keys.server_write_IV},r.read.cipherFunction=Nte,r.write.cipherFunction=bte,r.read.macLength=r.write.macLength=t.mac_length,r.read.macFunction=r.write.macFunction=Vi.hmac_sha1}o(nL,"initConnectionState");function bte(r,e){var t=!1,n=e.macFunction(e.macKey,e.sequenceNumber,r);r.fragment.putBytes(n),e.updateSequenceNumber();var s;r.version.minor===Vi.Versions.TLS_1_0.minor?s=e.cipherState.init?null:e.cipherState.iv:s=ec.random.getBytesSync(16),e.cipherState.init=!0;var i=e.cipherState.cipher;return i.start({iv:s}),r.version.minor>=Vi.Versions.TLS_1_1.minor&&i.output.putBytes(s),i.update(r.fragment),i.finish(Ate)&&(r.fragment=i.output,r.length=r.fragment.length(),t=!0),t}o(bte,"encrypt_aes_cbc_sha1");function Ate(r,e,t){if(!t){var n=r-e.length()%r;e.fillWithByte(n-1,n)}return!0}o(Ate,"encrypt_aes_cbc_sha1_padding");function Cte(r,e,t){var n=!0;if(t){for(var s=e.length(),i=e.last(),a=s-1-i;a<s-1;++a)n=n&&e.at(a)==i;n&&e.truncate(i+1)}return n}o(Cte,"decrypt_aes_cbc_sha1_padding");function Nte(r,e){var t=!1,n;r.version.minor===Vi.Versions.TLS_1_0.minor?n=e.cipherState.init?null:e.cipherState.iv:n=r.fragment.getBytes(16),e.cipherState.init=!0;var s=e.cipherState.cipher;s.start({iv:n}),s.update(r.fragment),t=s.finish(Cte);var i=e.macLength,a=ec.random.getBytesSync(i),u=s.output.length();u>=i?(r.fragment=s.output.getBytes(u-i),a=s.output.getBytes(i)):r.fragment=s.output.getBytes(),r.fragment=ec.util.createBuffer(r.fragment),r.length=r.fragment.length();var c=e.macFunction(e.macKey,e.sequenceNumber,r);return e.updateSequenceNumber(),t=Tte(e.macKey,a,c)&&t,t}o(Nte,"decrypt_aes_cbc_sha1");function Tte(r,e,t){var n=ec.hmac.create();return n.start("SHA1",r),n.update(e),e=n.digest().getBytes(),n.start(null,null),n.update(t),t=n.digest().getBytes(),e===t}o(Tte,"compareMacs")});var BT=te((Kye,cL)=>{"use strict";var $r=zt();Ma();pr();var kg=cL.exports=$r.sha512=$r.sha512||{};$r.md.sha512=$r.md.algorithms.sha512=kg;var oL=$r.sha384=$r.sha512.sha384=$r.sha512.sha384||{};oL.create=function(){return kg.create("SHA-384")};$r.md.sha384=$r.md.algorithms.sha384=oL;$r.sha512.sha256=$r.sha512.sha256||{create:o(function(){return kg.create("SHA-512/256")},"create")};$r.md["sha512/256"]=$r.md.algorithms["sha512/256"]=$r.sha512.sha256;$r.sha512.sha224=$r.sha512.sha224||{create:o(function(){return kg.create("SHA-512/224")},"create")};$r.md["sha512/224"]=$r.md.algorithms["sha512/224"]=$r.sha512.sha224;kg.create=function(r){if(uL||Ite(),typeof r>"u"&&(r="SHA-512"),!(r in tf))throw new Error("Invalid SHA-512 algorithm: "+r);for(var e=tf[r],t=null,n=$r.util.createBuffer(),s=new Array(80),i=0;i<80;++i)s[i]=new Array(2);var a=64;switch(r){case"SHA-384":a=48;break;case"SHA-512/256":a=32;break;case"SHA-512/224":a=28;break}var u={algorithm:r.replace("-","").toLowerCase(),blockLength:128,digestLength:a,messageLength:0,fullMessageLength:null,messageLengthSize:16};return u.start=function(){u.messageLength=0,u.fullMessageLength=u.messageLength128=[];for(var c=u.messageLengthSize/4,l=0;l<c;++l)u.fullMessageLength.push(0);n=$r.util.createBuffer(),t=new Array(e.length);for(var l=0;l<e.length;++l)t[l]=e[l].slice(0);return u},u.start(),u.update=function(c,l){l==="utf8"&&(c=$r.util.encodeUtf8(c));var h=c.length;u.messageLength+=h,h=[h/4294967296>>>0,h>>>0];for(var m=u.fullMessageLength.length-1;m>=0;--m)u.fullMessageLength[m]+=h[1],h[1]=h[0]+(u.fullMessageLength[m]/4294967296>>>0),u.fullMessageLength[m]=u.fullMessageLength[m]>>>0,h[0]=h[1]/4294967296>>>0;return n.putBytes(c),aL(t,s,n),(n.read>2048||n.length()===0)&&n.compact(),u},u.digest=function(){var c=$r.util.createBuffer();c.putBytes(n.bytes());var l=u.fullMessageLength[u.fullMessageLength.length-1]+u.messageLengthSize,h=l&u.blockLength-1;c.putBytes(_T.substr(0,u.blockLength-h));for(var m,g,y=u.fullMessageLength[0]*8,v=0;v<u.fullMessageLength.length-1;++v)m=u.fullMessageLength[v+1]*8,g=m/4294967296>>>0,y+=g,c.putInt32(y>>>0),y=m>>>0;c.putInt32(y);for(var E=new Array(t.length),v=0;v<t.length;++v)E[v]=t[v].slice(0);aL(E,s,c);var w=$r.util.createBuffer(),C;r==="SHA-512"?C=E.length:r==="SHA-384"?C=E.length-2:C=E.length-4;for(var v=0;v<C;++v)w.putInt32(E[v][0]),(v!==C-1||r!=="SHA-512/224")&&w.putInt32(E[v][1]);return w},u};var _T=null,uL=!1,DT=null,tf=null;function Ite(){_T="\x80",_T+=$r.util.fillString("\0",128),DT=[[1116352408,3609767458],[1899447441,602891725],[3049323471,3964484399],[3921009573,2173295548],[961987163,4081628472],[1508970993,3053834265],[2453635748,2937671579],[2870763221,3664609560],[3624381080,2734883394],[310598401,1164996542],[607225278,1323610764],[1426881987,3590304994],[1925078388,4068182383],[2162078206,991336113],[2614888103,633803317],[3248222580,3479774868],[3835390401,2666613458],[4022224774,944711139],[264347078,2341262773],[604807628,2007800933],[770255983,1495990901],[1249150122,1856431235],[1555081692,3175218132],[1996064986,2198950837],[2554220882,3999719339],[2821834349,766784016],[2952996808,2566594879],[3210313671,3203337956],[3336571891,1034457026],[3584528711,2466948901],[113926993,3758326383],[338241895,168717936],[666307205,1188179964],[773529912,1546045734],[1294757372,1522805485],[1396182291,2643833823],[1695183700,2343527390],[1986661051,1014477480],[2177026350,1206759142],[2456956037,344077627],[2730485921,1290863460],[2820302411,3158454273],[3259730800,3505952657],[3345764771,106217008],[3516065817,3606008344],[3600352804,1432725776],[4094571909,1467031594],[275423344,851169720],[430227734,3100823752],[506948616,1363258195],[659060556,3750685593],[883997877,3785050280],[958139571,3318307427],[1322822218,3812723403],[1537002063,2003034995],[1747873779,3602036899],[1955562222,1575990012],[2024104815,1125592928],[2227730452,2716904306],[2361852424,442776044],[2428436474,593698344],[2756734187,3733110249],[3204031479,2999351573],[3329325298,3815920427],[3391569614,3928383900],[3515267271,566280711],[3940187606,3454069534],[4118630271,4000239992],[116418474,1914138554],[174292421,2731055270],[289380356,3203993006],[460393269,320620315],[685471733,587496836],[852142971,1086792851],[1017036298,365543100],[1126000580,2618297676],[1288033470,3409855158],[1501505948,4234509866],[1607167915,987167468],[1816402316,1246189591]],tf={},tf["SHA-512"]=[[1779033703,4089235720],[3144134277,2227873595],[1013904242,4271175723],[2773480762,1595750129],[1359893119,2917565137],[2600822924,725511199],[528734635,4215389547],[1541459225,327033209]],tf["SHA-384"]=[[3418070365,3238371032],[1654270250,914150663],[2438529370,812702999],[355462360,4144912697],[1731405415,4290775857],[2394180231,1750603025],[3675008525,1694076839],[1203062813,3204075428]],tf["SHA-512/256"]=[[573645204,4230739756],[2673172387,3360449730],[596883563,1867755857],[2520282905,1497426621],[2519219938,2827943907],[3193839141,1401305490],[721525244,746961066],[246885852,2177182882]],tf["SHA-512/224"]=[[2352822216,424955298],[1944164710,2312950998],[502970286,855612546],[1738396948,1479516111],[258812777,2077511080],[2011393907,79989058],[1067287976,1780299464],[286451373,2446758561]],uL=!0}o(Ite,"_init");function aL(r,e,t){for(var n,s,i,a,u,c,l,h,m,g,y,v,E,w,C,_,b,A,T,B,M,I,H,K,q,W,he,pe,ue,Y,ve,Oe,Je,ne,Z,Se=t.length();Se>=128;){for(ue=0;ue<16;++ue)e[ue][0]=t.getInt32()>>>0,e[ue][1]=t.getInt32()>>>0;for(;ue<80;++ue)Oe=e[ue-2],Y=Oe[0],ve=Oe[1],n=((Y>>>19|ve<<13)^(ve>>>29|Y<<3)^Y>>>6)>>>0,s=((Y<<13|ve>>>19)^(ve<<3|Y>>>29)^(Y<<26|ve>>>6))>>>0,ne=e[ue-15],Y=ne[0],ve=ne[1],i=((Y>>>1|ve<<31)^(Y>>>8|ve<<24)^Y>>>7)>>>0,a=((Y<<31|ve>>>1)^(Y<<24|ve>>>8)^(Y<<25|ve>>>7))>>>0,Je=e[ue-7],Z=e[ue-16],ve=s+Je[1]+a+Z[1],e[ue][0]=n+Je[0]+i+Z[0]+(ve/4294967296>>>0)>>>0,e[ue][1]=ve>>>0;for(E=r[0][0],w=r[0][1],C=r[1][0],_=r[1][1],b=r[2][0],A=r[2][1],T=r[3][0],B=r[3][1],M=r[4][0],I=r[4][1],H=r[5][0],K=r[5][1],q=r[6][0],W=r[6][1],he=r[7][0],pe=r[7][1],ue=0;ue<80;++ue)l=((M>>>14|I<<18)^(M>>>18|I<<14)^(I>>>9|M<<23))>>>0,h=((M<<18|I>>>14)^(M<<14|I>>>18)^(I<<23|M>>>9))>>>0,m=(q^M&(H^q))>>>0,g=(W^I&(K^W))>>>0,u=((E>>>28|w<<4)^(w>>>2|E<<30)^(w>>>7|E<<25))>>>0,c=((E<<4|w>>>28)^(w<<30|E>>>2)^(w<<25|E>>>7))>>>0,y=(E&C|b&(E^C))>>>0,v=(w&_|A&(w^_))>>>0,ve=pe+h+g+DT[ue][1]+e[ue][1],n=he+l+m+DT[ue][0]+e[ue][0]+(ve/4294967296>>>0)>>>0,s=ve>>>0,ve=c+v,i=u+y+(ve/4294967296>>>0)>>>0,a=ve>>>0,he=q,pe=W,q=H,W=K,H=M,K=I,ve=B+s,M=T+n+(ve/4294967296>>>0)>>>0,I=ve>>>0,T=b,B=A,b=C,A=_,C=E,_=w,ve=s+a,E=n+i+(ve/4294967296>>>0)>>>0,w=ve>>>0;ve=r[0][1]+w,r[0][0]=r[0][0]+E+(ve/4294967296>>>0)>>>0,r[0][1]=ve>>>0,ve=r[1][1]+_,r[1][0]=r[1][0]+C+(ve/4294967296>>>0)>>>0,r[1][1]=ve>>>0,ve=r[2][1]+A,r[2][0]=r[2][0]+b+(ve/4294967296>>>0)>>>0,r[2][1]=ve>>>0,ve=r[3][1]+B,r[3][0]=r[3][0]+T+(ve/4294967296>>>0)>>>0,r[3][1]=ve>>>0,ve=r[4][1]+I,r[4][0]=r[4][0]+M+(ve/4294967296>>>0)>>>0,r[4][1]=ve>>>0,ve=r[5][1]+K,r[5][0]=r[5][0]+H+(ve/4294967296>>>0)>>>0,r[5][1]=ve>>>0,ve=r[6][1]+W,r[6][0]=r[6][0]+q+(ve/4294967296>>>0)>>>0,r[6][1]=ve>>>0,ve=r[7][1]+pe,r[7][0]=r[7][0]+he+(ve/4294967296>>>0)>>>0,r[7][1]=ve>>>0,Se-=128}}o(aL,"_update")});var lL=te(RT=>{"use strict";var _te=zt();la();var Un=_te.asn1;RT.privateKeyValidator={name:"PrivateKeyInfo",tagClass:Un.Class.UNIVERSAL,type:Un.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:Un.Class.UNIVERSAL,type:Un.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:Un.Class.UNIVERSAL,type:Un.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:Un.Class.UNIVERSAL,type:Un.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:Un.Class.UNIVERSAL,type:Un.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]};RT.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:Un.Class.UNIVERSAL,type:Un.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:Un.Class.UNIVERSAL,type:Un.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:Un.Class.UNIVERSAL,type:Un.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{tagClass:Un.Class.UNIVERSAL,type:Un.Type.BITSTRING,constructed:!1,composed:!0,captureBitStringValue:"ed25519PublicKey"}]}});var bL=te((Xye,SL)=>{"use strict";var Qn=zt();Bg();Ri();BT();pr();var gL=lL(),Dte=gL.publicKeyValidator,Bte=gL.privateKeyValidator;typeof fL>"u"&&(fL=Qn.jsbn.BigInteger);var fL,kT=Qn.util.ByteBuffer,Us=typeof Buffer>"u"?Uint8Array:Buffer;Qn.pki=Qn.pki||{};SL.exports=Qn.pki.ed25519=Qn.ed25519=Qn.ed25519||{};var rr=Qn.ed25519;rr.constants={};rr.constants.PUBLIC_KEY_BYTE_LENGTH=32;rr.constants.PRIVATE_KEY_BYTE_LENGTH=64;rr.constants.SEED_BYTE_LENGTH=32;rr.constants.SIGN_BYTE_LENGTH=64;rr.constants.HASH_BYTE_LENGTH=64;rr.generateKeyPair=function(r){r=r||{};var e=r.seed;if(e===void 0)e=Qn.random.getBytesSync(rr.constants.SEED_BYTE_LENGTH);else if(typeof e=="string"){if(e.length!==rr.constants.SEED_BYTE_LENGTH)throw new TypeError('"seed" must be '+rr.constants.SEED_BYTE_LENGTH+" bytes in length.")}else if(!(e instanceof Uint8Array))throw new TypeError('"seed" must be a node.js Buffer, Uint8Array, or a binary string.');e=qo({message:e,encoding:"binary"});for(var t=new Us(rr.constants.PUBLIC_KEY_BYTE_LENGTH),n=new Us(rr.constants.PRIVATE_KEY_BYTE_LENGTH),s=0;s<32;++s)n[s]=e[s];return kte(t,n),{publicKey:t,privateKey:n}};rr.privateKeyFromAsn1=function(r){var e={},t=[],n=Qn.asn1.validate(r,Bte,e,t);if(!n){var s=new Error("Invalid Key.");throw s.errors=t,s}var i=Qn.asn1.derToOid(e.privateKeyOid),a=Qn.oids.EdDSA25519;if(i!==a)throw new Error('Invalid OID "'+i+'"; OID must be "'+a+'".');var u=e.privateKey,c=qo({message:Qn.asn1.fromDer(u).value,encoding:"binary"});return{privateKeyBytes:c}};rr.publicKeyFromAsn1=function(r){var e={},t=[],n=Qn.asn1.validate(r,Dte,e,t);if(!n){var s=new Error("Invalid Key.");throw s.errors=t,s}var i=Qn.asn1.derToOid(e.publicKeyOid),a=Qn.oids.EdDSA25519;if(i!==a)throw new Error('Invalid OID "'+i+'"; OID must be "'+a+'".');var u=e.ed25519PublicKey;if(u.length!==rr.constants.PUBLIC_KEY_BYTE_LENGTH)throw new Error("Key length is invalid.");return qo({message:u,encoding:"binary"})};rr.publicKeyFromPrivateKey=function(r){r=r||{};var e=qo({message:r.privateKey,encoding:"binary"});if(e.length!==rr.constants.PRIVATE_KEY_BYTE_LENGTH)throw new TypeError('"options.privateKey" must have a byte length of '+rr.constants.PRIVATE_KEY_BYTE_LENGTH);for(var t=new Us(rr.constants.PUBLIC_KEY_BYTE_LENGTH),n=0;n<t.length;++n)t[n]=e[32+n];return t};rr.sign=function(r){r=r||{};var e=qo(r),t=qo({message:r.privateKey,encoding:"binary"});if(t.length===rr.constants.SEED_BYTE_LENGTH){var n=rr.generateKeyPair({seed:t});t=n.privateKey}else if(t.length!==rr.constants.PRIVATE_KEY_BYTE_LENGTH)throw new TypeError('"options.privateKey" must have a byte length of '+rr.constants.SEED_BYTE_LENGTH+" or "+rr.constants.PRIVATE_KEY_BYTE_LENGTH);var s=new Us(rr.constants.SIGN_BYTE_LENGTH+e.length);Lte(s,e,e.length,t);for(var i=new Us(rr.constants.SIGN_BYTE_LENGTH),a=0;a<i.length;++a)i[a]=s[a];return i};rr.verify=function(r){r=r||{};var e=qo(r);if(r.signature===void 0)throw new TypeError('"options.signature" must be a node.js Buffer, a Uint8Array, a forge ByteBuffer, or a binary string.');var t=qo({message:r.signature,encoding:"binary"});if(t.length!==rr.constants.SIGN_BYTE_LENGTH)throw new TypeError('"options.signature" must have a byte length of '+rr.constants.SIGN_BYTE_LENGTH);var n=qo({message:r.publicKey,encoding:"binary"});if(n.length!==rr.constants.PUBLIC_KEY_BYTE_LENGTH)throw new TypeError('"options.publicKey" must have a byte length of '+rr.constants.PUBLIC_KEY_BYTE_LENGTH);var s=new Us(rr.constants.SIGN_BYTE_LENGTH+e.length),i=new Us(rr.constants.SIGN_BYTE_LENGTH+e.length),a;for(a=0;a<rr.constants.SIGN_BYTE_LENGTH;++a)s[a]=t[a];for(a=0;a<e.length;++a)s[a+rr.constants.SIGN_BYTE_LENGTH]=e[a];return Vte(i,s,s.length,n)>=0};function qo(r){var e=r.message;if(e instanceof Uint8Array||e instanceof Us)return e;var t=r.encoding;if(e===void 0)if(r.md)e=r.md.digest().getBytes(),t="binary";else throw new TypeError('"options.message" or "options.md" not specified.');if(typeof e=="string"&&!t)throw new TypeError('"options.encoding" must be "binary" or "utf8".');if(typeof e=="string"){if(typeof Buffer<"u")return Buffer.from(e,t);e=new kT(e,t)}else if(!(e instanceof kT))throw new TypeError('"options.message" must be a node.js Buffer, a Uint8Array, a forge ByteBuffer, or a string with "options.encoding" specifying its encoding.');for(var n=new Us(e.length()),s=0;s<n.length;++s)n[s]=e.at(s);return n}o(qo,"messageToNativeBuffer");var LT=Dt(),CE=Dt([1]),Rte=Dt([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),Ote=Dt([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),hL=Dt([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),pL=Dt([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),OT=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]),Pte=Dt([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function Lg(r,e){var t=Qn.md.sha512.create(),n=new kT(r);t.update(n.getBytes(e),"binary");var s=t.digest().getBytes();if(typeof Buffer<"u")return Buffer.from(s,"binary");for(var i=new Us(rr.constants.HASH_BYTE_LENGTH),a=0;a<64;++a)i[a]=s.charCodeAt(a);return i}o(Lg,"sha512");function kte(r,e){var t=[Dt(),Dt(),Dt(),Dt()],n,s=Lg(e,32);for(s[0]&=248,s[31]&=127,s[31]|=64,FT(t,s),jT(r,t),n=0;n<32;++n)e[n+32]=r[n];return 0}o(kte,"crypto_sign_keypair");function Lte(r,e,t,n){var s,i,a=new Float64Array(64),u=[Dt(),Dt(),Dt(),Dt()],c=Lg(n,32);c[0]&=248,c[31]&=127,c[31]|=64;var l=t+64;for(s=0;s<t;++s)r[64+s]=e[s];for(s=0;s<32;++s)r[32+s]=c[32+s];var h=Lg(r.subarray(32),t+32);for(VT(h),FT(u,h),jT(r,u),s=32;s<64;++s)r[s]=n[s];var m=Lg(r,t+64);for(VT(m),s=32;s<64;++s)a[s]=0;for(s=0;s<32;++s)a[s]=h[s];for(s=0;s<32;++s)for(i=0;i<32;i++)a[s+i]+=m[s]*c[i];return vL(r.subarray(32),a),l}o(Lte,"crypto_sign");function Vte(r,e,t,n){var s,i,a=new Us(32),u=[Dt(),Dt(),Dt(),Dt()],c=[Dt(),Dt(),Dt(),Dt()];if(i=-1,t<64||Ute(c,n))return-1;for(s=0;s<t;++s)r[s]=e[s];for(s=0;s<32;++s)r[s+32]=n[s];var l=Lg(r,t);if(VT(l),wL(u,c,l),FT(c,e.subarray(32)),UT(u,c),jT(a,u),t-=64,yL(e,0,a,0)){for(s=0;s<t;++s)r[s]=0;return-1}for(s=0;s<t;++s)r[s]=e[s+64];return i=t,i}o(Vte,"crypto_sign_open");function vL(r,e){var t,n,s,i;for(n=63;n>=32;--n){for(t=0,s=n-32,i=n-12;s<i;++s)e[s]+=t-16*e[n]*OT[s-(n-32)],t=e[s]+128>>8,e[s]-=t*256;e[s]+=t,e[n]=0}for(t=0,s=0;s<32;++s)e[s]+=t-(e[31]>>4)*OT[s],t=e[s]>>8,e[s]&=255;for(s=0;s<32;++s)e[s]-=t*OT[s];for(n=0;n<32;++n)e[n+1]+=e[n]>>8,r[n]=e[n]&255}o(vL,"modL");function VT(r){for(var e=new Float64Array(64),t=0;t<64;++t)e[t]=r[t],r[t]=0;vL(r,e)}o(VT,"reduce");function UT(r,e){var t=Dt(),n=Dt(),s=Dt(),i=Dt(),a=Dt(),u=Dt(),c=Dt(),l=Dt(),h=Dt();qp(t,r[1],r[0]),qp(h,e[1],e[0]),Or(t,t,h),Mp(n,r[0],r[1]),Mp(h,e[0],e[1]),Or(n,n,h),Or(s,r[3],e[3]),Or(s,s,Ote),Or(i,r[2],e[2]),Mp(i,i,i),qp(a,n,t),qp(u,i,s),Mp(c,i,s),Mp(l,n,t),Or(r[0],a,u),Or(r[1],l,c),Or(r[2],c,u),Or(r[3],a,l)}o(UT,"add");function dL(r,e,t){for(var n=0;n<4;++n)EL(r[n],e[n],t)}o(dL,"cswap");function jT(r,e){var t=Dt(),n=Dt(),s=Dt();qte(s,e[2]),Or(t,e[0],s),Or(n,e[1],s),NE(r,n),r[31]^=xL(t)<<7}o(jT,"pack");function NE(r,e){var t,n,s,i=Dt(),a=Dt();for(t=0;t<16;++t)a[t]=e[t];for(PT(a),PT(a),PT(a),n=0;n<2;++n){for(i[0]=a[0]-65517,t=1;t<15;++t)i[t]=a[t]-65535-(i[t-1]>>16&1),i[t-1]&=65535;i[15]=a[15]-32767-(i[14]>>16&1),s=i[15]>>16&1,i[14]&=65535,EL(a,i,1-s)}for(t=0;t<16;t++)r[2*t]=a[t]&255,r[2*t+1]=a[t]>>8}o(NE,"pack25519");function Ute(r,e){var t=Dt(),n=Dt(),s=Dt(),i=Dt(),a=Dt(),u=Dt(),c=Dt();return tc(r[2],CE),jte(r[1],e),rf(s,r[1]),Or(i,s,Rte),qp(s,s,r[2]),Mp(i,r[2],i),rf(a,i),rf(u,a),Or(c,u,a),Or(t,c,s),Or(t,t,i),Fte(t,t),Or(t,t,s),Or(t,t,i),Or(t,t,i),Or(r[0],t,i),rf(n,r[0]),Or(n,n,i),mL(n,s)&&Or(r[0],r[0],Pte),rf(n,r[0]),Or(n,n,i),mL(n,s)?-1:(xL(r[0])===e[31]>>7&&qp(r[0],LT,r[0]),Or(r[3],r[0],r[1]),0)}o(Ute,"unpackneg");function jte(r,e){var t;for(t=0;t<16;++t)r[t]=e[2*t]+(e[2*t+1]<<8);r[15]&=32767}o(jte,"unpack25519");function Fte(r,e){var t=Dt(),n;for(n=0;n<16;++n)t[n]=e[n];for(n=250;n>=0;--n)rf(t,t),n!==1&&Or(t,t,e);for(n=0;n<16;++n)r[n]=t[n]}o(Fte,"pow2523");function mL(r,e){var t=new Us(32),n=new Us(32);return NE(t,r),NE(n,e),yL(t,0,n,0)}o(mL,"neq25519");function yL(r,e,t,n){return Mte(r,e,t,n,32)}o(yL,"crypto_verify_32");function Mte(r,e,t,n,s){var i,a=0;for(i=0;i<s;++i)a|=r[e+i]^t[n+i];return(1&a-1>>>8)-1}o(Mte,"vn");function xL(r){var e=new Us(32);return NE(e,r),e[0]&1}o(xL,"par25519");function wL(r,e,t){var n,s;for(tc(r[0],LT),tc(r[1],CE),tc(r[2],CE),tc(r[3],LT),s=255;s>=0;--s)n=t[s/8|0]>>(s&7)&1,dL(r,e,n),UT(e,r),UT(r,r),dL(r,e,n)}o(wL,"scalarmult");function FT(r,e){var t=[Dt(),Dt(),Dt(),Dt()];tc(t[0],hL),tc(t[1],pL),tc(t[2],CE),Or(t[3],hL,pL),wL(r,t,e)}o(FT,"scalarbase");function tc(r,e){var t;for(t=0;t<16;t++)r[t]=e[t]|0}o(tc,"set25519");function qte(r,e){var t=Dt(),n;for(n=0;n<16;++n)t[n]=e[n];for(n=253;n>=0;--n)rf(t,t),n!==2&&n!==4&&Or(t,t,e);for(n=0;n<16;++n)r[n]=t[n]}o(qte,"inv25519");function PT(r){var e,t,n=1;for(e=0;e<16;++e)t=r[e]+n+65535,n=Math.floor(t/65536),r[e]=t-n*65536;r[0]+=n-1+37*(n-1)}o(PT,"car25519");function EL(r,e,t){for(var n,s=~(t-1),i=0;i<16;++i)n=s&(r[i]^e[i]),r[i]^=n,e[i]^=n}o(EL,"sel25519");function Dt(r){var e,t=new Float64Array(16);if(r)for(e=0;e<r.length;++e)t[e]=r[e];return t}o(Dt,"gf");function Mp(r,e,t){for(var n=0;n<16;++n)r[n]=e[n]+t[n]}o(Mp,"A");function qp(r,e,t){for(var n=0;n<16;++n)r[n]=e[n]-t[n]}o(qp,"Z");function rf(r,e){Or(r,e,e)}o(rf,"S");function Or(r,e,t){var n,s,i=0,a=0,u=0,c=0,l=0,h=0,m=0,g=0,y=0,v=0,E=0,w=0,C=0,_=0,b=0,A=0,T=0,B=0,M=0,I=0,H=0,K=0,q=0,W=0,he=0,pe=0,ue=0,Y=0,ve=0,Oe=0,Je=0,ne=t[0],Z=t[1],Se=t[2],He=t[3],Le=t[4],rt=t[5],N=t[6],S=t[7],G=t[8],P=t[9],Ee=t[10],Ce=t[11],Ae=t[12],Ye=t[13],Tt=t[14],Me=t[15];n=e[0],i+=n*ne,a+=n*Z,u+=n*Se,c+=n*He,l+=n*Le,h+=n*rt,m+=n*N,g+=n*S,y+=n*G,v+=n*P,E+=n*Ee,w+=n*Ce,C+=n*Ae,_+=n*Ye,b+=n*Tt,A+=n*Me,n=e[1],a+=n*ne,u+=n*Z,c+=n*Se,l+=n*He,h+=n*Le,m+=n*rt,g+=n*N,y+=n*S,v+=n*G,E+=n*P,w+=n*Ee,C+=n*Ce,_+=n*Ae,b+=n*Ye,A+=n*Tt,T+=n*Me,n=e[2],u+=n*ne,c+=n*Z,l+=n*Se,h+=n*He,m+=n*Le,g+=n*rt,y+=n*N,v+=n*S,E+=n*G,w+=n*P,C+=n*Ee,_+=n*Ce,b+=n*Ae,A+=n*Ye,T+=n*Tt,B+=n*Me,n=e[3],c+=n*ne,l+=n*Z,h+=n*Se,m+=n*He,g+=n*Le,y+=n*rt,v+=n*N,E+=n*S,w+=n*G,C+=n*P,_+=n*Ee,b+=n*Ce,A+=n*Ae,T+=n*Ye,B+=n*Tt,M+=n*Me,n=e[4],l+=n*ne,h+=n*Z,m+=n*Se,g+=n*He,y+=n*Le,v+=n*rt,E+=n*N,w+=n*S,C+=n*G,_+=n*P,b+=n*Ee,A+=n*Ce,T+=n*Ae,B+=n*Ye,M+=n*Tt,I+=n*Me,n=e[5],h+=n*ne,m+=n*Z,g+=n*Se,y+=n*He,v+=n*Le,E+=n*rt,w+=n*N,C+=n*S,_+=n*G,b+=n*P,A+=n*Ee,T+=n*Ce,B+=n*Ae,M+=n*Ye,I+=n*Tt,H+=n*Me,n=e[6],m+=n*ne,g+=n*Z,y+=n*Se,v+=n*He,E+=n*Le,w+=n*rt,C+=n*N,_+=n*S,b+=n*G,A+=n*P,T+=n*Ee,B+=n*Ce,M+=n*Ae,I+=n*Ye,H+=n*Tt,K+=n*Me,n=e[7],g+=n*ne,y+=n*Z,v+=n*Se,E+=n*He,w+=n*Le,C+=n*rt,_+=n*N,b+=n*S,A+=n*G,T+=n*P,B+=n*Ee,M+=n*Ce,I+=n*Ae,H+=n*Ye,K+=n*Tt,q+=n*Me,n=e[8],y+=n*ne,v+=n*Z,E+=n*Se,w+=n*He,C+=n*Le,_+=n*rt,b+=n*N,A+=n*S,T+=n*G,B+=n*P,M+=n*Ee,I+=n*Ce,H+=n*Ae,K+=n*Ye,q+=n*Tt,W+=n*Me,n=e[9],v+=n*ne,E+=n*Z,w+=n*Se,C+=n*He,_+=n*Le,b+=n*rt,A+=n*N,T+=n*S,B+=n*G,M+=n*P,I+=n*Ee,H+=n*Ce,K+=n*Ae,q+=n*Ye,W+=n*Tt,he+=n*Me,n=e[10],E+=n*ne,w+=n*Z,C+=n*Se,_+=n*He,b+=n*Le,A+=n*rt,T+=n*N,B+=n*S,M+=n*G,I+=n*P,H+=n*Ee,K+=n*Ce,q+=n*Ae,W+=n*Ye,he+=n*Tt,pe+=n*Me,n=e[11],w+=n*ne,C+=n*Z,_+=n*Se,b+=n*He,A+=n*Le,T+=n*rt,B+=n*N,M+=n*S,I+=n*G,H+=n*P,K+=n*Ee,q+=n*Ce,W+=n*Ae,he+=n*Ye,pe+=n*Tt,ue+=n*Me,n=e[12],C+=n*ne,_+=n*Z,b+=n*Se,A+=n*He,T+=n*Le,B+=n*rt,M+=n*N,I+=n*S,H+=n*G,K+=n*P,q+=n*Ee,W+=n*Ce,he+=n*Ae,pe+=n*Ye,ue+=n*Tt,Y+=n*Me,n=e[13],_+=n*ne,b+=n*Z,A+=n*Se,T+=n*He,B+=n*Le,M+=n*rt,I+=n*N,H+=n*S,K+=n*G,q+=n*P,W+=n*Ee,he+=n*Ce,pe+=n*Ae,ue+=n*Ye,Y+=n*Tt,ve+=n*Me,n=e[14],b+=n*ne,A+=n*Z,T+=n*Se,B+=n*He,M+=n*Le,I+=n*rt,H+=n*N,K+=n*S,q+=n*G,W+=n*P,he+=n*Ee,pe+=n*Ce,ue+=n*Ae,Y+=n*Ye,ve+=n*Tt,Oe+=n*Me,n=e[15],A+=n*ne,T+=n*Z,B+=n*Se,M+=n*He,I+=n*Le,H+=n*rt,K+=n*N,q+=n*S,W+=n*G,he+=n*P,pe+=n*Ee,ue+=n*Ce,Y+=n*Ae,ve+=n*Ye,Oe+=n*Tt,Je+=n*Me,i+=38*T,a+=38*B,u+=38*M,c+=38*I,l+=38*H,h+=38*K,m+=38*q,g+=38*W,y+=38*he,v+=38*pe,E+=38*ue,w+=38*Y,C+=38*ve,_+=38*Oe,b+=38*Je,s=1,n=i+s+65535,s=Math.floor(n/65536),i=n-s*65536,n=a+s+65535,s=Math.floor(n/65536),a=n-s*65536,n=u+s+65535,s=Math.floor(n/65536),u=n-s*65536,n=c+s+65535,s=Math.floor(n/65536),c=n-s*65536,n=l+s+65535,s=Math.floor(n/65536),l=n-s*65536,n=h+s+65535,s=Math.floor(n/65536),h=n-s*65536,n=m+s+65535,s=Math.floor(n/65536),m=n-s*65536,n=g+s+65535,s=Math.floor(n/65536),g=n-s*65536,n=y+s+65535,s=Math.floor(n/65536),y=n-s*65536,n=v+s+65535,s=Math.floor(n/65536),v=n-s*65536,n=E+s+65535,s=Math.floor(n/65536),E=n-s*65536,n=w+s+65535,s=Math.floor(n/65536),w=n-s*65536,n=C+s+65535,s=Math.floor(n/65536),C=n-s*65536,n=_+s+65535,s=Math.floor(n/65536),_=n-s*65536,n=b+s+65535,s=Math.floor(n/65536),b=n-s*65536,n=A+s+65535,s=Math.floor(n/65536),A=n-s*65536,i+=s-1+37*(s-1),s=1,n=i+s+65535,s=Math.floor(n/65536),i=n-s*65536,n=a+s+65535,s=Math.floor(n/65536),a=n-s*65536,n=u+s+65535,s=Math.floor(n/65536),u=n-s*65536,n=c+s+65535,s=Math.floor(n/65536),c=n-s*65536,n=l+s+65535,s=Math.floor(n/65536),l=n-s*65536,n=h+s+65535,s=Math.floor(n/65536),h=n-s*65536,n=m+s+65535,s=Math.floor(n/65536),m=n-s*65536,n=g+s+65535,s=Math.floor(n/65536),g=n-s*65536,n=y+s+65535,s=Math.floor(n/65536),y=n-s*65536,n=v+s+65535,s=Math.floor(n/65536),v=n-s*65536,n=E+s+65535,s=Math.floor(n/65536),E=n-s*65536,n=w+s+65535,s=Math.floor(n/65536),w=n-s*65536,n=C+s+65535,s=Math.floor(n/65536),C=n-s*65536,n=_+s+65535,s=Math.floor(n/65536),_=n-s*65536,n=b+s+65535,s=Math.floor(n/65536),b=n-s*65536,n=A+s+65535,s=Math.floor(n/65536),A=n-s*65536,i+=s-1+37*(s-1),r[0]=i,r[1]=a,r[2]=u,r[3]=c,r[4]=l,r[5]=h,r[6]=m,r[7]=g,r[8]=y,r[9]=v,r[10]=E,r[11]=w,r[12]=C,r[13]=_,r[14]=b,r[15]=A}o(Or,"M")});var TL=te((zye,NL)=>{"use strict";var fi=zt();pr();Ri();Bg();NL.exports=fi.kem=fi.kem||{};var AL=fi.jsbn.BigInteger;fi.kem.rsa={};fi.kem.rsa.create=function(r,e){e=e||{};var t=e.prng||fi.random,n={};return n.encrypt=function(s,i){var a=Math.ceil(s.n.bitLength()/8),u;do u=new AL(fi.util.bytesToHex(t.getBytesSync(a)),16).mod(s.n);while(u.compareTo(AL.ONE)<=0);u=fi.util.hexToBytes(u.toString(16));var c=a-u.length;c>0&&(u=fi.util.fillString("\0",c)+u);var l=s.encrypt(u,"NONE"),h=r.generate(u,i);return{encapsulation:l,key:h}},n.decrypt=function(s,i,a){var u=s.decrypt(i,"NONE");return r.generate(u,a)},n};fi.kem.kdf1=function(r,e){CL(this,r,0,e||r.digestLength)};fi.kem.kdf2=function(r,e){CL(this,r,1,e||r.digestLength)};function CL(r,e,t,n){r.generate=function(s,i){for(var a=new fi.util.ByteBuffer,u=Math.ceil(i/n)+t,c=new fi.util.ByteBuffer,l=t;l<u;++l){c.putInt32(l),e.start(),e.update(s+c.getBytes());var h=e.digest();a.putBytes(h.getBytes(n))}return a.truncate(a.length()-i),a.getBytes()}}o(CL,"_createKDF")});var BL=te((Yye,DL)=>{"use strict";var ar=zt();pr();DL.exports=ar.log=ar.log||{};ar.log.levels=["none","error","warning","info","debug","verbose","max"];var TE={},HT=[],Ug=null;ar.log.LEVEL_LOCKED=2;ar.log.NO_LEVEL_CHECK=4;ar.log.INTERPOLATE=8;for(za=0;za<ar.log.levels.length;++za)MT=ar.log.levels[za],TE[MT]={index:za,name:MT.toUpperCase()};var MT,za;ar.log.logMessage=function(r){for(var e=TE[r.level].index,t=0;t<HT.length;++t){var n=HT[t];if(n.flags&ar.log.NO_LEVEL_CHECK)n.f(r);else{var s=TE[n.level].index;e<=s&&n.f(n,r)}}};ar.log.prepareStandard=function(r){"standard"in r||(r.standard=TE[r.level].name+" ["+r.category+"] "+r.message)};ar.log.prepareFull=function(r){if(!("full"in r)){var e=[r.message];e=e.concat([]),r.full=ar.util.format.apply(this,e)}};ar.log.prepareStandardFull=function(r){"standardFull"in r||(ar.log.prepareStandard(r),r.standardFull=r.standard)};for(qT=["error","warning","info","debug","verbose"],za=0;za<qT.length;++za)(function(e){ar.log[e]=function(t,n){var s=Array.prototype.slice.call(arguments).slice(2),i={timestamp:new Date,level:e,category:t,message:n,arguments:s};ar.log.logMessage(i)}})(qT[za]);var qT,za;ar.log.makeLogger=function(r){var e={flags:0,f:r};return ar.log.setLevel(e,"none"),e};ar.log.setLevel=function(r,e){var t=!1;if(r&&!(r.flags&ar.log.LEVEL_LOCKED))for(var n=0;n<ar.log.levels.length;++n){var s=ar.log.levels[n];if(e==s){r.level=e,t=!0;break}}return t};ar.log.lock=function(r,e){typeof e>"u"||e?r.flags|=ar.log.LEVEL_LOCKED:r.flags&=~ar.log.LEVEL_LOCKED};ar.log.addLogger=function(r){HT.push(r)};typeof console<"u"&&"log"in console?(console.error&&console.warn&&console.info&&console.debug?(IL={error:console.error,warning:console.warn,info:console.info,debug:console.debug,verbose:console.debug},jg=o(function(r,e){ar.log.prepareStandard(e);var t=IL[e.level],n=[e.standard];n=n.concat(e.arguments.slice()),t.apply(console,n)},"f"),Hp=ar.log.makeLogger(jg)):(jg=o(function(e,t){ar.log.prepareStandardFull(t),console.log(t.standardFull)},"f"),Hp=ar.log.makeLogger(jg)),ar.log.setLevel(Hp,"debug"),ar.log.addLogger(Hp),Ug=Hp):console={log:o(function(){},"log")};var Hp,IL,jg;Ug!==null&&typeof window<"u"&&window.location&&(Vg=new URL(window.location.href).searchParams,Vg.has("console.level")&&ar.log.setLevel(Ug,Vg.get("console.level").slice(-1)[0]),Vg.has("console.lock")&&(_L=Vg.get("console.lock").slice(-1)[0],_L=="true"&&ar.log.lock(Ug)));var Vg,_L;ar.log.consoleLogger=Ug});var OL=te((Zye,RL)=>{"use strict";RL.exports=Ma();aE();Lp();rT();BT()});var LL=te((e1e,kL)=>{"use strict";var et=zt();Xu();la();_g();Wu();zl();gT();Ri();pr();wE();var se=et.asn1,Ts=kL.exports=et.pkcs7=et.pkcs7||{};Ts.messageFromPem=function(r){var e=et.pem.decode(r)[0];if(e.type!=="PKCS7"){var t=new Error('Could not convert PKCS#7 message from PEM; PEM header type is not "PKCS#7".');throw t.headerType=e.type,t}if(e.procType&&e.procType.type==="ENCRYPTED")throw new Error("Could not convert PKCS#7 message from PEM; PEM is encrypted.");var n=se.fromDer(e.body);return Ts.messageFromAsn1(n)};Ts.messageToPem=function(r,e){var t={type:"PKCS7",body:se.toDer(r.toAsn1()).getBytes()};return et.pem.encode(t,{maxline:e})};Ts.messageFromAsn1=function(r){var e={},t=[];if(!se.validate(r,Ts.asn1.contentInfoValidator,e,t)){var n=new Error("Cannot read PKCS#7 message. ASN.1 object is not an PKCS#7 ContentInfo.");throw n.errors=t,n}var s=se.derToOid(e.contentType),i;switch(s){case et.pki.oids.envelopedData:i=Ts.createEnvelopedData();break;case et.pki.oids.encryptedData:i=Ts.createEncryptedData();break;case et.pki.oids.signedData:i=Ts.createSignedData();break;default:throw new Error("Cannot read PKCS#7 message. ContentType with OID "+s+" is not (yet) supported.")}return i.fromAsn1(e.content.value[0]),i};Ts.createSignedData=function(){var r=null;return r={type:et.pki.oids.signedData,version:1,certificates:[],crls:[],signers:[],digestAlgorithmIdentifiers:[],contentInfo:null,signerInfos:[],fromAsn1:o(function(n){if($T(r,n,Ts.asn1.signedDataValidator),r.certificates=[],r.crls=[],r.digestAlgorithmIdentifiers=[],r.contentInfo=null,r.signerInfos=[],r.rawCapture.certificates)for(var s=r.rawCapture.certificates.value,i=0;i<s.length;++i)r.certificates.push(et.pki.certificateFromAsn1(s[i]))},"fromAsn1"),toAsn1:o(function(){r.contentInfo||r.sign();for(var n=[],s=0;s<r.certificates.length;++s)n.push(et.pki.certificateToAsn1(r.certificates[s]));var i=[],a=se.create(se.Class.CONTEXT_SPECIFIC,0,!0,[se.create(se.Class.UNIVERSAL,se.Type.SEQUENCE,!0,[se.create(se.Class.UNIVERSAL,se.Type.INTEGER,!1,se.integerToDer(r.version).getBytes()),se.create(se.Class.UNIVERSAL,se.Type.SET,!0,r.digestAlgorithmIdentifiers),r.contentInfo])]);return n.length>0&&a.value[0].value.push(se.create(se.Class.CONTEXT_SPECIFIC,0,!0,n)),i.length>0&&a.value[0].value.push(se.create(se.Class.CONTEXT_SPECIFIC,1,!0,i)),a.value[0].value.push(se.create(se.Class.UNIVERSAL,se.Type.SET,!0,r.signerInfos)),se.create(se.Class.UNIVERSAL,se.Type.SEQUENCE,!0,[se.create(se.Class.UNIVERSAL,se.Type.OID,!1,se.oidToDer(r.type).getBytes()),a])},"toAsn1"),addSigner:o(function(n){var s=n.issuer,i=n.serialNumber;if(n.certificate){var a=n.certificate;typeof a=="string"&&(a=et.pki.certificateFromPem(a)),s=a.issuer.attributes,i=a.serialNumber}var u=n.key;if(!u)throw new Error("Could not add PKCS#7 signer; no private key specified.");typeof u=="string"&&(u=et.pki.privateKeyFromPem(u));var c=n.digestAlgorithm||et.pki.oids.sha1;switch(c){case et.pki.oids.sha1:case et.pki.oids.sha256:case et.pki.oids.sha384:case et.pki.oids.sha512:case et.pki.oids.md5:break;default:throw new Error("Could not add PKCS#7 signer; unknown message digest algorithm: "+c)}var l=n.authenticatedAttributes||[];if(l.length>0){for(var h=!1,m=!1,g=0;g<l.length;++g){var y=l[g];if(!h&&y.type===et.pki.oids.contentType){if(h=!0,m)break;continue}if(!m&&y.type===et.pki.oids.messageDigest){if(m=!0,h)break;continue}}if(!h||!m)throw new Error("Invalid signer.authenticatedAttributes. If signer.authenticatedAttributes is specified, then it must contain at least two attributes, PKCS #9 content-type and PKCS #9 message-digest.")}r.signers.push({key:u,version:1,issuer:s,serialNumber:i,digestAlgorithm:c,signatureAlgorithm:et.pki.oids.rsaEncryption,signature:null,authenticatedAttributes:l,unauthenticatedAttributes:[]})},"addSigner"),sign:o(function(n){if(n=n||{},(typeof r.content!="object"||r.contentInfo===null)&&(r.contentInfo=se.create(se.Class.UNIVERSAL,se.Type.SEQUENCE,!0,[se.create(se.Class.UNIVERSAL,se.Type.OID,!1,se.oidToDer(et.pki.oids.data).getBytes())]),"content"in r)){var s;r.content instanceof et.util.ByteBuffer?s=r.content.bytes():typeof r.content=="string"&&(s=et.util.encodeUtf8(r.content)),n.detached?r.detachedContent=se.create(se.Class.UNIVERSAL,se.Type.OCTETSTRING,!1,s):r.contentInfo.value.push(se.create(se.Class.CONTEXT_SPECIFIC,0,!0,[se.create(se.Class.UNIVERSAL,se.Type.OCTETSTRING,!1,s)]))}if(r.signers.length!==0){var i=e();t(i)}},"sign"),verify:o(function(){throw new Error("PKCS#7 signature verification not yet implemented.")},"verify"),addCertificate:o(function(n){typeof n=="string"&&(n=et.pki.certificateFromPem(n)),r.certificates.push(n)},"addCertificate"),addCertificateRevokationList:o(function(n){throw new Error("PKCS#7 CRL support not yet implemented.")},"addCertificateRevokationList")},r;function e(){for(var n={},s=0;s<r.signers.length;++s){var i=r.signers[s],a=i.digestAlgorithm;a in n||(n[a]=et.md[et.pki.oids[a]].create()),i.authenticatedAttributes.length===0?i.md=n[a]:i.md=et.md[et.pki.oids[a]].create()}r.digestAlgorithmIdentifiers=[];for(var a in n)r.digestAlgorithmIdentifiers.push(se.create(se.Class.UNIVERSAL,se.Type.SEQUENCE,!0,[se.create(se.Class.UNIVERSAL,se.Type.OID,!1,se.oidToDer(a).getBytes()),se.create(se.Class.UNIVERSAL,se.Type.NULL,!1,"")]));return n}o(e,"addDigestAlgorithmIds");function t(n){var s;if(r.detachedContent?s=r.detachedContent:(s=r.contentInfo.value[1],s=s.value[0]),!s)throw new Error("Could not sign PKCS#7 message; there is no content to sign.");var i=se.derToOid(r.contentInfo.value[0].value),a=se.toDer(s);a.getByte(),se.getBerValueLength(a),a=a.getBytes();for(var u in n)n[u].start().update(a);for(var c=new Date,l=0;l<r.signers.length;++l){var h=r.signers[l];if(h.authenticatedAttributes.length===0){if(i!==et.pki.oids.data)throw new Error("Invalid signer; authenticatedAttributes must be present when the ContentInfo content type is not PKCS#7 Data.")}else{h.authenticatedAttributesAsn1=se.create(se.Class.CONTEXT_SPECIFIC,0,!0,[]);for(var m=se.create(se.Class.UNIVERSAL,se.Type.SET,!0,[]),g=0;g<h.authenticatedAttributes.length;++g){var y=h.authenticatedAttributes[g];y.type===et.pki.oids.messageDigest?y.value=n[h.digestAlgorithm].digest():y.type===et.pki.oids.signingTime&&(y.value||(y.value=c)),m.value.push(KT(y)),h.authenticatedAttributesAsn1.value.push(KT(y))}a=se.toDer(m).getBytes(),h.md.start().update(a)}h.signature=h.key.sign(h.md,"RSASSA-PKCS1-V1_5")}r.signerInfos=Wte(r.signers)}o(t,"addSignerInfos")};Ts.createEncryptedData=function(){var r=null;return r={type:et.pki.oids.encryptedData,version:0,encryptedContent:{algorithm:et.pki.oids["aes256-CBC"]},fromAsn1:o(function(e){$T(r,e,Ts.asn1.encryptedDataValidator)},"fromAsn1"),decrypt:o(function(e){e!==void 0&&(r.encryptedContent.key=e),PL(r)},"decrypt")},r};Ts.createEnvelopedData=function(){var r=null;return r={type:et.pki.oids.envelopedData,version:0,recipients:[],encryptedContent:{algorithm:et.pki.oids["aes256-CBC"]},fromAsn1:o(function(e){var t=$T(r,e,Ts.asn1.envelopedDataValidator);r.recipients=$te(t.recipientInfos.value)},"fromAsn1"),toAsn1:o(function(){return se.create(se.Class.UNIVERSAL,se.Type.SEQUENCE,!0,[se.create(se.Class.UNIVERSAL,se.Type.OID,!1,se.oidToDer(r.type).getBytes()),se.create(se.Class.CONTEXT_SPECIFIC,0,!0,[se.create(se.Class.UNIVERSAL,se.Type.SEQUENCE,!0,[se.create(se.Class.UNIVERSAL,se.Type.INTEGER,!1,se.integerToDer(r.version).getBytes()),se.create(se.Class.UNIVERSAL,se.Type.SET,!0,Gte(r.recipients)),se.create(se.Class.UNIVERSAL,se.Type.SEQUENCE,!0,zte(r.encryptedContent))])])])},"toAsn1"),findRecipient:o(function(e){for(var t=e.issuer.attributes,n=0;n<r.recipients.length;++n){var s=r.recipients[n],i=s.issuer;if(s.serialNumber===e.serialNumber&&i.length===t.length){for(var a=!0,u=0;u<t.length;++u)if(i[u].type!==t[u].type||i[u].value!==t[u].value){a=!1;break}if(a)return s}}return null},"findRecipient"),decrypt:o(function(e,t){if(r.encryptedContent.key===void 0&&e!==void 0&&t!==void 0)switch(e.encryptedContent.algorithm){case et.pki.oids.rsaEncryption:case et.pki.oids.desCBC:var n=t.decrypt(e.encryptedContent.content);r.encryptedContent.key=et.util.createBuffer(n);break;default:throw new Error("Unsupported asymmetric cipher, OID "+e.encryptedContent.algorithm)}PL(r)},"decrypt"),addRecipient:o(function(e){r.recipients.push({version:0,issuer:e.issuer.attributes,serialNumber:e.serialNumber,encryptedContent:{algorithm:et.pki.oids.rsaEncryption,key:e.publicKey}})},"addRecipient"),encrypt:o(function(e,t){if(r.encryptedContent.content===void 0){t=t||r.encryptedContent.algorithm,e=e||r.encryptedContent.key;var n,s,i;switch(t){case et.pki.oids["aes128-CBC"]:n=16,s=16,i=et.aes.createEncryptionCipher;break;case et.pki.oids["aes192-CBC"]:n=24,s=16,i=et.aes.createEncryptionCipher;break;case et.pki.oids["aes256-CBC"]:n=32,s=16,i=et.aes.createEncryptionCipher;break;case et.pki.oids["des-EDE3-CBC"]:n=24,s=8,i=et.des.createEncryptionCipher;break;default:throw new Error("Unsupported symmetric cipher, OID "+t)}if(e===void 0)e=et.util.createBuffer(et.random.getBytes(n));else if(e.length()!=n)throw new Error("Symmetric key has wrong length; got "+e.length()+" bytes, expected "+n+".");r.encryptedContent.algorithm=t,r.encryptedContent.key=e,r.encryptedContent.parameter=et.util.createBuffer(et.random.getBytes(s));var a=i(e);if(a.start(r.encryptedContent.parameter.copy()),a.update(r.content),!a.finish())throw new Error("Symmetric encryption failed.");r.encryptedContent.content=a.output}for(var u=0;u<r.recipients.length;++u){var c=r.recipients[u];if(c.encryptedContent.content===void 0)switch(c.encryptedContent.algorithm){case et.pki.oids.rsaEncryption:c.encryptedContent.content=c.encryptedContent.key.encrypt(r.encryptedContent.key.data);break;default:throw new Error("Unsupported asymmetric cipher, OID "+c.encryptedContent.algorithm)}}},"encrypt")},r};function Hte(r){var e={},t=[];if(!se.validate(r,Ts.asn1.recipientInfoValidator,e,t)){var n=new Error("Cannot read PKCS#7 RecipientInfo. ASN.1 object is not an PKCS#7 RecipientInfo.");throw n.errors=t,n}return{version:e.version.charCodeAt(0),issuer:et.pki.RDNAttributesAsArray(e.issuer),serialNumber:et.util.createBuffer(e.serial).toHex(),encryptedContent:{algorithm:se.derToOid(e.encAlgorithm),parameter:e.encParameter?e.encParameter.value:void 0,content:e.encKey}}}o(Hte,"_recipientFromAsn1");function Kte(r){return se.create(se.Class.UNIVERSAL,se.Type.SEQUENCE,!0,[se.create(se.Class.UNIVERSAL,se.Type.INTEGER,!1,se.integerToDer(r.version).getBytes()),se.create(se.Class.UNIVERSAL,se.Type.SEQUENCE,!0,[et.pki.distinguishedNameToAsn1({attributes:r.issuer}),se.create(se.Class.UNIVERSAL,se.Type.INTEGER,!1,et.util.hexToBytes(r.serialNumber))]),se.create(se.Class.UNIVERSAL,se.Type.SEQUENCE,!0,[se.create(se.Class.UNIVERSAL,se.Type.OID,!1,se.oidToDer(r.encryptedContent.algorithm).getBytes()),se.create(se.Class.UNIVERSAL,se.Type.NULL,!1,"")]),se.create(se.Class.UNIVERSAL,se.Type.OCTETSTRING,!1,r.encryptedContent.content)])}o(Kte,"_recipientToAsn1");function $te(r){for(var e=[],t=0;t<r.length;++t)e.push(Hte(r[t]));return e}o($te,"_recipientsFromAsn1");function Gte(r){for(var e=[],t=0;t<r.length;++t)e.push(Kte(r[t]));return e}o(Gte,"_recipientsToAsn1");function Xte(r){var e=se.create(se.Class.UNIVERSAL,se.Type.SEQUENCE,!0,[se.create(se.Class.UNIVERSAL,se.Type.INTEGER,!1,se.integerToDer(r.version).getBytes()),se.create(se.Class.UNIVERSAL,se.Type.SEQUENCE,!0,[et.pki.distinguishedNameToAsn1({attributes:r.issuer}),se.create(se.Class.UNIVERSAL,se.Type.INTEGER,!1,et.util.hexToBytes(r.serialNumber))]),se.create(se.Class.UNIVERSAL,se.Type.SEQUENCE,!0,[se.create(se.Class.UNIVERSAL,se.Type.OID,!1,se.oidToDer(r.digestAlgorithm).getBytes()),se.create(se.Class.UNIVERSAL,se.Type.NULL,!1,"")])]);if(r.authenticatedAttributesAsn1&&e.value.push(r.authenticatedAttributesAsn1),e.value.push(se.create(se.Class.UNIVERSAL,se.Type.SEQUENCE,!0,[se.create(se.Class.UNIVERSAL,se.Type.OID,!1,se.oidToDer(r.signatureAlgorithm).getBytes()),se.create(se.Class.UNIVERSAL,se.Type.NULL,!1,"")])),e.value.push(se.create(se.Class.UNIVERSAL,se.Type.OCTETSTRING,!1,r.signature)),r.unauthenticatedAttributes.length>0){for(var t=se.create(se.Class.CONTEXT_SPECIFIC,1,!0,[]),n=0;n<r.unauthenticatedAttributes.length;++n){var s=r.unauthenticatedAttributes[n];t.values.push(KT(s))}e.value.push(t)}return e}o(Xte,"_signerToAsn1");function Wte(r){for(var e=[],t=0;t<r.length;++t)e.push(Xte(r[t]));return e}o(Wte,"_signersToAsn1");function KT(r){var e;if(r.type===et.pki.oids.contentType)e=se.create(se.Class.UNIVERSAL,se.Type.OID,!1,se.oidToDer(r.value).getBytes());else if(r.type===et.pki.oids.messageDigest)e=se.create(se.Class.UNIVERSAL,se.Type.OCTETSTRING,!1,r.value.bytes());else if(r.type===et.pki.oids.signingTime){var t=new Date("1950-01-01T00:00:00Z"),n=new Date("2050-01-01T00:00:00Z"),s=r.value;if(typeof s=="string"){var i=Date.parse(s);isNaN(i)?s.length===13?s=se.utcTimeToDate(s):s=se.generalizedTimeToDate(s):s=new Date(i)}s>=t&&s<n?e=se.create(se.Class.UNIVERSAL,se.Type.UTCTIME,!1,se.dateToUtcTime(s)):e=se.create(se.Class.UNIVERSAL,se.Type.GENERALIZEDTIME,!1,se.dateToGeneralizedTime(s))}return se.create(se.Class.UNIVERSAL,se.Type.SEQUENCE,!0,[se.create(se.Class.UNIVERSAL,se.Type.OID,!1,se.oidToDer(r.type).getBytes()),se.create(se.Class.UNIVERSAL,se.Type.SET,!0,[e])])}o(KT,"_attributeToAsn1");function zte(r){return[se.create(se.Class.UNIVERSAL,se.Type.OID,!1,se.oidToDer(et.pki.oids.data).getBytes()),se.create(se.Class.UNIVERSAL,se.Type.SEQUENCE,!0,[se.create(se.Class.UNIVERSAL,se.Type.OID,!1,se.oidToDer(r.algorithm).getBytes()),r.parameter?se.create(se.Class.UNIVERSAL,se.Type.OCTETSTRING,!1,r.parameter.getBytes()):void 0]),se.create(se.Class.CONTEXT_SPECIFIC,0,!0,[se.create(se.Class.UNIVERSAL,se.Type.OCTETSTRING,!1,r.content.getBytes())])]}o(zte,"_encryptedContentToAsn1");function $T(r,e,t){var n={},s=[];if(!se.validate(e,t,n,s)){var i=new Error("Cannot read PKCS#7 message. ASN.1 object is not a supported PKCS#7 message.");throw i.errors=i,i}var a=se.derToOid(n.contentType);if(a!==et.pki.oids.data)throw new Error("Unsupported PKCS#7 message. Only wrapped ContentType Data supported.");if(n.encryptedContent){var u="";if(et.util.isArray(n.encryptedContent))for(var c=0;c<n.encryptedContent.length;++c){if(n.encryptedContent[c].type!==se.Type.OCTETSTRING)throw new Error("Malformed PKCS#7 message, expecting encrypted content constructed of only OCTET STRING objects.");u+=n.encryptedContent[c].value}else u=n.encryptedContent;r.encryptedContent={algorithm:se.derToOid(n.encAlgorithm),parameter:et.util.createBuffer(n.encParameter.value),content:et.util.createBuffer(u)}}if(n.content){var u="";if(et.util.isArray(n.content))for(var c=0;c<n.content.length;++c){if(n.content[c].type!==se.Type.OCTETSTRING)throw new Error("Malformed PKCS#7 message, expecting content constructed of only OCTET STRING objects.");u+=n.content[c].value}else u=n.content;r.content=et.util.createBuffer(u)}return r.version=n.version.charCodeAt(0),r.rawCapture=n,n}o($T,"_fromAsn1");function PL(r){if(r.encryptedContent.key===void 0)throw new Error("Symmetric key not available.");if(r.content===void 0){var e;switch(r.encryptedContent.algorithm){case et.pki.oids["aes128-CBC"]:case et.pki.oids["aes192-CBC"]:case et.pki.oids["aes256-CBC"]:e=et.aes.createDecryptionCipher(r.encryptedContent.key);break;case et.pki.oids.desCBC:case et.pki.oids["des-EDE3-CBC"]:e=et.des.createDecryptionCipher(r.encryptedContent.key);break;default:throw new Error("Unsupported symmetric cipher, OID "+r.encryptedContent.algorithm)}if(e.start(r.encryptedContent.parameter),e.update(r.encryptedContent.content),!e.finish())throw new Error("Symmetric decryption failed.");r.content=e.output}}o(PL,"_decryptContent")});var UL=te((r1e,VL)=>{"use strict";var wn=zt();Xu();Rp();aE();Lp();pr();var _E=VL.exports=wn.ssh=wn.ssh||{};_E.privateKeyToPutty=function(r,e,t){t=t||"",e=e||"";var n="ssh-rsa",s=e===""?"none":"aes256-cbc",i="PuTTY-User-Key-File-2: "+n+`\r
|
|
16
|
-
`;i+="Encryption: "+s+`\r
|
|
17
|
-
`,i+="Comment: "+t+`\r
|
|
18
|
-
`;var a=wn.util.createBuffer();Kp(a,n),Ja(a,r.e),Ja(a,r.n);var u=wn.util.encode64(a.bytes(),64),c=Math.floor(u.length/66)+1;i+="Public-Lines: "+c+`\r
|
|
19
|
-
`,i+=u;var l=wn.util.createBuffer();Ja(l,r.d),Ja(l,r.p),Ja(l,r.q),Ja(l,r.qInv);var h;if(!e)h=wn.util.encode64(l.bytes(),64);else{var m=l.length()+16-1;m-=m%16;var g=IE(l.bytes());g.truncate(g.length()-m+l.length()),l.putBuffer(g);var y=wn.util.createBuffer();y.putBuffer(IE("\0\0\0\0",e)),y.putBuffer(IE("\0\0\0",e));var v=wn.aes.createEncryptionCipher(y.truncate(8),"CBC");v.start(wn.util.createBuffer().fillWithByte(0,16)),v.update(l.copy()),v.finish();var E=v.output;E.truncate(16),h=wn.util.encode64(E.bytes(),64)}c=Math.floor(h.length/66)+1,i+=`\r
|
|
20
|
-
Private-Lines: `+c+`\r
|
|
21
|
-
`,i+=h;var w=IE("putty-private-key-file-mac-key",e),C=wn.util.createBuffer();Kp(C,n),Kp(C,s),Kp(C,t),C.putInt32(a.length()),C.putBuffer(a),C.putInt32(l.length()),C.putBuffer(l);var _=wn.hmac.create();return _.start("sha1",w),_.update(C.bytes()),i+=`\r
|
|
22
|
-
Private-MAC: `+_.digest().toHex()+`\r
|
|
23
|
-
`,i};_E.publicKeyToOpenSSH=function(r,e){var t="ssh-rsa";e=e||"";var n=wn.util.createBuffer();return Kp(n,t),Ja(n,r.e),Ja(n,r.n),t+" "+wn.util.encode64(n.bytes())+" "+e};_E.privateKeyToOpenSSH=function(r,e){return e?wn.pki.encryptRsaPrivateKey(r,e,{legacy:!0,algorithm:"aes128"}):wn.pki.privateKeyToPem(r)};_E.getPublicKeyFingerprint=function(r,e){e=e||{};var t=e.md||wn.md.md5.create(),n="ssh-rsa",s=wn.util.createBuffer();Kp(s,n),Ja(s,r.e),Ja(s,r.n),t.start(),t.update(s.getBytes());var i=t.digest();if(e.encoding==="hex"){var a=i.toHex();return e.delimiter?a.match(/.{2}/g).join(e.delimiter):a}else{if(e.encoding==="binary")return i.getBytes();if(e.encoding)throw new Error('Unknown encoding "'+e.encoding+'".')}return i};function Ja(r,e){var t=e.toString(16);t[0]>="8"&&(t="00"+t);var n=wn.util.hexToBytes(t);r.putInt32(n.length),r.putBytes(n)}o(Ja,"_addBigIntegerToBuffer");function Kp(r,e){r.putInt32(e.length),r.putString(e)}o(Kp,"_addStringToBuffer");function IE(){for(var r=wn.md.sha1.create(),e=arguments.length,t=0;t<e;++t)r.update(arguments[t]);return r.digest()}o(IE,"_sha1")});var FL=te((s1e,jL)=>{"use strict";jL.exports=zt();Xu();iL();la();Zw();_g();bL();Rp();TL();BL();OL();vT();lE();zl();fT();wT();LL();ST();pT();nT();vE();Ri();aT();UL();IT();pr()});var qL=te((c1e,ML)=>{"use strict";var $p=1e3,Gp=$p*60,Xp=Gp*60,sf=Xp*24,Yte=sf*7,Qte=sf*365.25;ML.exports=function(r,e){e=e||{};var t=typeof r;if(t==="string"&&r.length>0)return Zte(r);if(t==="number"&&isFinite(r))return e.long?tre(r):ere(r);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(r))};function Zte(r){if(r=String(r),!(r.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(r);if(e){var t=parseFloat(e[1]),n=(e[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return t*Qte;case"weeks":case"week":case"w":return t*Yte;case"days":case"day":case"d":return t*sf;case"hours":case"hour":case"hrs":case"hr":case"h":return t*Xp;case"minutes":case"minute":case"mins":case"min":case"m":return t*Gp;case"seconds":case"second":case"secs":case"sec":case"s":return t*$p;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return t;default:return}}}}o(Zte,"parse");function ere(r){var e=Math.abs(r);return e>=sf?Math.round(r/sf)+"d":e>=Xp?Math.round(r/Xp)+"h":e>=Gp?Math.round(r/Gp)+"m":e>=$p?Math.round(r/$p)+"s":r+"ms"}o(ere,"fmtShort");function tre(r){var e=Math.abs(r);return e>=sf?DE(r,e,sf,"day"):e>=Xp?DE(r,e,Xp,"hour"):e>=Gp?DE(r,e,Gp,"minute"):e>=$p?DE(r,e,$p,"second"):r+" ms"}o(tre,"fmtLong");function DE(r,e,t,n){var s=e>=t*1.5;return Math.round(r/t)+" "+n+(s?"s":"")}o(DE,"plural")});var GT=te((f1e,HL)=>{"use strict";function rre(r){t.debug=t,t.default=t,t.coerce=c,t.disable=a,t.enable=s,t.enabled=u,t.humanize=qL(),t.destroy=l,Object.keys(r).forEach(h=>{t[h]=r[h]}),t.names=[],t.skips=[],t.formatters={};function e(h){let m=0;for(let g=0;g<h.length;g++)m=(m<<5)-m+h.charCodeAt(g),m|=0;return t.colors[Math.abs(m)%t.colors.length]}o(e,"selectColor"),t.selectColor=e;function t(h){let m,g=null,y,v;function E(...w){if(!E.enabled)return;let C=E,_=Number(new Date),b=_-(m||_);C.diff=b,C.prev=m,C.curr=_,m=_,w[0]=t.coerce(w[0]),typeof w[0]!="string"&&w.unshift("%O");let A=0;w[0]=w[0].replace(/%([a-zA-Z%])/g,(B,M)=>{if(B==="%%")return"%";A++;let I=t.formatters[M];if(typeof I=="function"){let H=w[A];B=I.call(C,H),w.splice(A,1),A--}return B}),t.formatArgs.call(C,w),(C.log||t.log).apply(C,w)}return o(E,"debug"),E.namespace=h,E.useColors=t.useColors(),E.color=t.selectColor(h),E.extend=n,E.destroy=t.destroy,Object.defineProperty(E,"enabled",{enumerable:!0,configurable:!1,get:o(()=>g!==null?g:(y!==t.namespaces&&(y=t.namespaces,v=t.enabled(h)),v),"get"),set:o(w=>{g=w},"set")}),typeof t.init=="function"&&t.init(E),E}o(t,"createDebug");function n(h,m){let g=t(this.namespace+(typeof m>"u"?":":m)+h);return g.log=this.log,g}o(n,"extend");function s(h){t.save(h),t.namespaces=h,t.names=[],t.skips=[];let m=(typeof h=="string"?h:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let g of m)g[0]==="-"?t.skips.push(g.slice(1)):t.names.push(g)}o(s,"enable");function i(h,m){let g=0,y=0,v=-1,E=0;for(;g<h.length;)if(y<m.length&&(m[y]===h[g]||m[y]==="*"))m[y]==="*"?(v=y,E=g,y++):(g++,y++);else if(v!==-1)y=v+1,E++,g=E;else return!1;for(;y<m.length&&m[y]==="*";)y++;return y===m.length}o(i,"matchesTemplate");function a(){let h=[...t.names,...t.skips.map(m=>"-"+m)].join(",");return t.enable(""),h}o(a,"disable");function u(h){for(let m of t.skips)if(i(h,m))return!1;for(let m of t.names)if(i(h,m))return!0;return!1}o(u,"enabled");function c(h){return h instanceof Error?h.stack||h.message:h}o(c,"coerce");function l(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return o(l,"destroy"),t.enable(t.load()),t}o(rre,"setup");HL.exports=rre});var KL=te((js,BE)=>{"use strict";js.formatArgs=sre;js.save=ire;js.load=are;js.useColors=nre;js.storage=ore();js.destroy=(()=>{let r=!1;return()=>{r||(r=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();js.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function nre(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let r;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(r=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(r[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}o(nre,"useColors");function sre(r){if(r[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+r[0]+(this.useColors?"%c ":" ")+"+"+BE.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;r.splice(1,0,e,"color: inherit");let t=0,n=0;r[0].replace(/%[a-zA-Z%]/g,s=>{s!=="%%"&&(t++,s==="%c"&&(n=t))}),r.splice(n,0,e)}o(sre,"formatArgs");js.log=console.debug||console.log||(()=>{});function ire(r){try{r?js.storage.setItem("debug",r):js.storage.removeItem("debug")}catch{}}o(ire,"save");function are(){let r;try{r=js.storage.getItem("debug")||js.storage.getItem("DEBUG")}catch{}return!r&&typeof process<"u"&&"env"in process&&(r=process.env.DEBUG),r}o(are,"load");function ore(){try{return localStorage}catch{}}o(ore,"localstorage");BE.exports=GT()(js);var{formatters:ure}=BE.exports;ure.j=function(r){try{return JSON.stringify(r)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var GL=te((d1e,$L)=>{"use strict";$L.exports=(r,e=process.argv)=>{let t=r.startsWith("-")?"":r.length===1?"-":"--",n=e.indexOf(t+r),s=e.indexOf("--");return n!==-1&&(s===-1||n<s)}});var zL=te((m1e,WL)=>{"use strict";var cre=Ge("os"),XL=Ge("tty"),Ui=GL(),{env:jn}=process,rc;Ui("no-color")||Ui("no-colors")||Ui("color=false")||Ui("color=never")?rc=0:(Ui("color")||Ui("colors")||Ui("color=true")||Ui("color=always"))&&(rc=1);"FORCE_COLOR"in jn&&(jn.FORCE_COLOR==="true"?rc=1:jn.FORCE_COLOR==="false"?rc=0:rc=jn.FORCE_COLOR.length===0?1:Math.min(parseInt(jn.FORCE_COLOR,10),3));function XT(r){return r===0?!1:{level:r,hasBasic:!0,has256:r>=2,has16m:r>=3}}o(XT,"translateLevel");function WT(r,e){if(rc===0)return 0;if(Ui("color=16m")||Ui("color=full")||Ui("color=truecolor"))return 3;if(Ui("color=256"))return 2;if(r&&!e&&rc===void 0)return 0;let t=rc||0;if(jn.TERM==="dumb")return t;if(process.platform==="win32"){let n=cre.release().split(".");return Number(n[0])>=10&&Number(n[2])>=10586?Number(n[2])>=14931?3:2:1}if("CI"in jn)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(n=>n in jn)||jn.CI_NAME==="codeship"?1:t;if("TEAMCITY_VERSION"in jn)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(jn.TEAMCITY_VERSION)?1:0;if(jn.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in jn){let n=parseInt((jn.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(jn.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(jn.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(jn.TERM)||"COLORTERM"in jn?1:t}o(WT,"supportsColor");function lre(r){let e=WT(r,r&&r.isTTY);return XT(e)}o(lre,"getSupportLevel");WL.exports={supportsColor:lre,stdout:XT(WT(!0,XL.isatty(1))),stderr:XT(WT(!0,XL.isatty(2)))}});var YL=te((Fn,OE)=>{"use strict";var fre=Ge("tty"),RE=Ge("util");Fn.init=yre;Fn.log=mre;Fn.formatArgs=pre;Fn.save=gre;Fn.load=vre;Fn.useColors=hre;Fn.destroy=RE.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");Fn.colors=[6,2,3,4,5,1];try{let r=zL();r&&(r.stderr||r).level>=2&&(Fn.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}Fn.inspectOpts=Object.keys(process.env).filter(r=>/^debug_/i.test(r)).reduce((r,e)=>{let t=e.substring(6).toLowerCase().replace(/_([a-z])/g,(s,i)=>i.toUpperCase()),n=process.env[e];return/^(yes|on|true|enabled)$/i.test(n)?n=!0:/^(no|off|false|disabled)$/i.test(n)?n=!1:n==="null"?n=null:n=Number(n),r[t]=n,r},{});function hre(){return"colors"in Fn.inspectOpts?!!Fn.inspectOpts.colors:fre.isatty(process.stderr.fd)}o(hre,"useColors");function pre(r){let{namespace:e,useColors:t}=this;if(t){let n=this.color,s="\x1B[3"+(n<8?n:"8;5;"+n),i=` ${s};1m${e} \x1B[0m`;r[0]=i+r[0].split(`
|
|
24
|
-
`).join(`
|
|
25
|
-
`+i),r.push(s+"m+"+OE.exports.humanize(this.diff)+"\x1B[0m")}else r[0]=dre()+e+" "+r[0]}o(pre,"formatArgs");function dre(){return Fn.inspectOpts.hideDate?"":new Date().toISOString()+" "}o(dre,"getDate");function mre(...r){return process.stderr.write(RE.formatWithOptions(Fn.inspectOpts,...r)+`
|
|
26
|
-
`)}o(mre,"log");function gre(r){r?process.env.DEBUG=r:delete process.env.DEBUG}o(gre,"save");function vre(){return process.env.DEBUG}o(vre,"load");function yre(r){r.inspectOpts={};let e=Object.keys(Fn.inspectOpts);for(let t=0;t<e.length;t++)r.inspectOpts[e[t]]=Fn.inspectOpts[e[t]]}o(yre,"init");OE.exports=GT()(Fn);var{formatters:JL}=OE.exports;JL.o=function(r){return this.inspectOpts.colors=this.useColors,RE.inspect(r,this.inspectOpts).split(`
|
|
27
|
-
`).map(e=>e.trim()).join(" ")};JL.O=function(r){return this.inspectOpts.colors=this.useColors,RE.inspect(r,this.inspectOpts)}});var Wp=te((y1e,zT)=>{"use strict";typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?zT.exports=KL():zT.exports=YL()});var ZL=te((x1e,QL)=>{"use strict";var{PassThrough:xre}=Ge("stream");QL.exports=r=>{r={...r};let{array:e}=r,{encoding:t}=r,n=t==="buffer",s=!1;e?s=!(t||n):t=t||"utf8",n&&(t=null);let i=new xre({objectMode:s});t&&i.setEncoding(t);let a=0,u=[];return i.on("data",c=>{u.push(c),s?a=u.length:a+=c.length}),i.getBufferedValue=()=>e?u:n?Buffer.concat(u,a):u.join(""),i.getBufferedLength=()=>a,i}});var t8=te((E1e,Fg)=>{"use strict";var{constants:wre}=Ge("buffer"),Ere=Ge("stream"),{promisify:Sre}=Ge("util"),bre=ZL(),Are=Sre(Ere.pipeline),e8=class extends Error{static{o(this,"MaxBufferError")}constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}};async function JT(r,e){if(!r)throw new Error("Expected a stream");e={maxBuffer:1/0,...e};let{maxBuffer:t}=e,n=bre(e);return await new Promise((s,i)=>{let a=o(u=>{u&&n.getBufferedLength()<=wre.MAX_LENGTH&&(u.bufferedData=n.getBufferedValue()),i(u)},"rejectPromise");(async()=>{try{await Are(r,n),s()}catch(u){a(u)}})(),n.on("data",()=>{n.getBufferedLength()>t&&a(new e8)})}),n.getBufferedValue()}o(JT,"getStream");Fg.exports=JT;Fg.exports.buffer=(r,e)=>JT(r,{...e,encoding:"buffer"});Fg.exports.array=(r,e)=>JT(r,{...e,array:!0});Fg.exports.MaxBufferError=e8});var Ho=te((zp,Mg)=>{"use strict";(function(){var r,e="4.17.21",t=200,n="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",s="Expected a function",i="Invalid `variable` option passed into `_.template`",a="__lodash_hash_undefined__",u=500,c="__lodash_placeholder__",l=1,h=2,m=4,g=1,y=2,v=1,E=2,w=4,C=8,_=16,b=32,A=64,T=128,B=256,M=512,I=30,H="...",K=800,q=16,W=1,he=2,pe=3,ue=1/0,Y=9007199254740991,ve=17976931348623157e292,Oe=NaN,Je=4294967295,ne=Je-1,Z=Je>>>1,Se=[["ary",T],["bind",v],["bindKey",E],["curry",C],["curryRight",_],["flip",M],["partial",b],["partialRight",A],["rearg",B]],He="[object Arguments]",Le="[object Array]",rt="[object AsyncFunction]",N="[object Boolean]",S="[object Date]",G="[object DOMException]",P="[object Error]",Ee="[object Function]",Ce="[object GeneratorFunction]",Ae="[object Map]",Ye="[object Number]",Tt="[object Null]",Me="[object Object]",St="[object Promise]",Yr="[object Proxy]",Qe="[object RegExp]",Dr="[object Set]",Gr="[object String]",Nn="[object Symbol]",Bs="[object Undefined]",xs="[object WeakMap]",gt="[object WeakSet]",st="[object ArrayBuffer]",Gn="[object DataView]",ws="[object Float32Array]",Oa="[object Float64Array]",Pa="[object Int8Array]",Lt="[object Int16Array]",lp="[object Int32Array]",fp="[object Uint8Array]",Vl="[object Uint8ClampedArray]",ig="[object Uint16Array]",ni="[object Uint32Array]",d=/\b__p \+= '';/g,R=/\b(__p \+=) '' \+/g,X=/(__e\(.*?\)|\b__t\)) \+\n'';/g,ae=/&(?:amp|lt|gt|quot|#39);/g,le=/[&<>"']/g,z=RegExp(ae.source),ut=RegExp(le.source),jt=/<%-([\s\S]+?)%>/g,Qt=/<%([\s\S]+?)%>/g,it=/<%=([\s\S]+?)%>/g,Pt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Xn=/^\w*$/,Si=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,hr=/[\\^$.*+?()[\]{}|]/g,ka=RegExp(hr.source),ag=/^\s+/,Qx=/\s/,y2=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,x2=/\{\n\/\* \[wrapped with (.+)\] \*/,w2=/,? & /,E2=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Xe=/[()=,{}\[\]\/\s]/,sr=/\\(\\)?/g,os=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,na=/\w*$/,S2=/^[-+]0x[0-9a-f]+$/i,sK=/^0b[01]+$/i,iK=/^\[object .+?Constructor\]$/,aK=/^0o[0-7]+$/i,oK=/^(?:0|[1-9]\d*)$/,uK=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Zx=/($^)/,cK=/['\n\r\u2028\u2029\\]/g,ew="\\ud800-\\udfff",lK="\\u0300-\\u036f",fK="\\ufe20-\\ufe2f",hK="\\u20d0-\\u20ff",BO=lK+fK+hK,RO="\\u2700-\\u27bf",OO="a-z\\xdf-\\xf6\\xf8-\\xff",pK="\\xac\\xb1\\xd7\\xf7",dK="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",mK="\\u2000-\\u206f",gK=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",PO="A-Z\\xc0-\\xd6\\xd8-\\xde",kO="\\ufe0e\\ufe0f",LO=pK+dK+mK+gK,b2="['\u2019]",vK="["+ew+"]",VO="["+LO+"]",tw="["+BO+"]",UO="\\d+",yK="["+RO+"]",jO="["+OO+"]",FO="[^"+ew+LO+UO+RO+OO+PO+"]",A2="\\ud83c[\\udffb-\\udfff]",xK="(?:"+tw+"|"+A2+")",MO="[^"+ew+"]",C2="(?:\\ud83c[\\udde6-\\uddff]){2}",N2="[\\ud800-\\udbff][\\udc00-\\udfff]",hp="["+PO+"]",qO="\\u200d",HO="(?:"+jO+"|"+FO+")",wK="(?:"+hp+"|"+FO+")",KO="(?:"+b2+"(?:d|ll|m|re|s|t|ve))?",$O="(?:"+b2+"(?:D|LL|M|RE|S|T|VE))?",GO=xK+"?",XO="["+kO+"]?",EK="(?:"+qO+"(?:"+[MO,C2,N2].join("|")+")"+XO+GO+")*",SK="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",bK="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",WO=XO+GO+EK,AK="(?:"+[yK,C2,N2].join("|")+")"+WO,CK="(?:"+[MO+tw+"?",tw,C2,N2,vK].join("|")+")",NK=RegExp(b2,"g"),TK=RegExp(tw,"g"),T2=RegExp(A2+"(?="+A2+")|"+CK+WO,"g"),IK=RegExp([hp+"?"+jO+"+"+KO+"(?="+[VO,hp,"$"].join("|")+")",wK+"+"+$O+"(?="+[VO,hp+HO,"$"].join("|")+")",hp+"?"+HO+"+"+KO,hp+"+"+$O,bK,SK,UO,AK].join("|"),"g"),_K=RegExp("["+qO+ew+BO+kO+"]"),DK=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,BK=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],RK=-1,Hr={};Hr[ws]=Hr[Oa]=Hr[Pa]=Hr[Lt]=Hr[lp]=Hr[fp]=Hr[Vl]=Hr[ig]=Hr[ni]=!0,Hr[He]=Hr[Le]=Hr[st]=Hr[N]=Hr[Gn]=Hr[S]=Hr[P]=Hr[Ee]=Hr[Ae]=Hr[Ye]=Hr[Me]=Hr[Qe]=Hr[Dr]=Hr[Gr]=Hr[xs]=!1;var kr={};kr[He]=kr[Le]=kr[st]=kr[Gn]=kr[N]=kr[S]=kr[ws]=kr[Oa]=kr[Pa]=kr[Lt]=kr[lp]=kr[Ae]=kr[Ye]=kr[Me]=kr[Qe]=kr[Dr]=kr[Gr]=kr[Nn]=kr[fp]=kr[Vl]=kr[ig]=kr[ni]=!0,kr[P]=kr[Ee]=kr[xs]=!1;var OK={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},PK={"&":"&","<":"<",">":">",'"':""","'":"'"},kK={"&":"&","<":"<",">":">",""":'"',"'":"'"},LK={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},VK=parseFloat,UK=parseInt,zO=typeof global=="object"&&global&&global.Object===Object&&global,jK=typeof self=="object"&&self&&self.Object===Object&&self,On=zO||jK||Function("return this")(),I2=typeof zp=="object"&&zp&&!zp.nodeType&&zp,Ul=I2&&typeof Mg=="object"&&Mg&&!Mg.nodeType&&Mg,JO=Ul&&Ul.exports===I2,_2=JO&&zO.process,bi=(function(){try{var ce=Ul&&Ul.require&&Ul.require("util").types;return ce||_2&&_2.binding&&_2.binding("util")}catch{}})(),YO=bi&&bi.isArrayBuffer,QO=bi&&bi.isDate,ZO=bi&&bi.isMap,eP=bi&&bi.isRegExp,tP=bi&&bi.isSet,rP=bi&&bi.isTypedArray;function si(ce,Ie,be){switch(be.length){case 0:return ce.call(Ie);case 1:return ce.call(Ie,be[0]);case 2:return ce.call(Ie,be[0],be[1]);case 3:return ce.call(Ie,be[0],be[1],be[2])}return ce.apply(Ie,be)}o(si,"apply");function FK(ce,Ie,be,pt){for(var Vt=-1,Er=ce==null?0:ce.length;++Vt<Er;){var Tn=ce[Vt];Ie(pt,Tn,be(Tn),ce)}return pt}o(FK,"arrayAggregator");function Ai(ce,Ie){for(var be=-1,pt=ce==null?0:ce.length;++be<pt&&Ie(ce[be],be,ce)!==!1;);return ce}o(Ai,"arrayEach");function MK(ce,Ie){for(var be=ce==null?0:ce.length;be--&&Ie(ce[be],be,ce)!==!1;);return ce}o(MK,"arrayEachRight");function nP(ce,Ie){for(var be=-1,pt=ce==null?0:ce.length;++be<pt;)if(!Ie(ce[be],be,ce))return!1;return!0}o(nP,"arrayEvery");function Du(ce,Ie){for(var be=-1,pt=ce==null?0:ce.length,Vt=0,Er=[];++be<pt;){var Tn=ce[be];Ie(Tn,be,ce)&&(Er[Vt++]=Tn)}return Er}o(Du,"arrayFilter");function rw(ce,Ie){var be=ce==null?0:ce.length;return!!be&&pp(ce,Ie,0)>-1}o(rw,"arrayIncludes");function D2(ce,Ie,be){for(var pt=-1,Vt=ce==null?0:ce.length;++pt<Vt;)if(be(Ie,ce[pt]))return!0;return!1}o(D2,"arrayIncludesWith");function Xr(ce,Ie){for(var be=-1,pt=ce==null?0:ce.length,Vt=Array(pt);++be<pt;)Vt[be]=Ie(ce[be],be,ce);return Vt}o(Xr,"arrayMap");function Bu(ce,Ie){for(var be=-1,pt=Ie.length,Vt=ce.length;++be<pt;)ce[Vt+be]=Ie[be];return ce}o(Bu,"arrayPush");function B2(ce,Ie,be,pt){var Vt=-1,Er=ce==null?0:ce.length;for(pt&&Er&&(be=ce[++Vt]);++Vt<Er;)be=Ie(be,ce[Vt],Vt,ce);return be}o(B2,"arrayReduce");function qK(ce,Ie,be,pt){var Vt=ce==null?0:ce.length;for(pt&&Vt&&(be=ce[--Vt]);Vt--;)be=Ie(be,ce[Vt],Vt,ce);return be}o(qK,"arrayReduceRight");function R2(ce,Ie){for(var be=-1,pt=ce==null?0:ce.length;++be<pt;)if(Ie(ce[be],be,ce))return!0;return!1}o(R2,"arraySome");var HK=O2("length");function KK(ce){return ce.split("")}o(KK,"asciiToArray");function $K(ce){return ce.match(E2)||[]}o($K,"asciiWords");function sP(ce,Ie,be){var pt;return be(ce,function(Vt,Er,Tn){if(Ie(Vt,Er,Tn))return pt=Er,!1}),pt}o(sP,"baseFindKey");function nw(ce,Ie,be,pt){for(var Vt=ce.length,Er=be+(pt?1:-1);pt?Er--:++Er<Vt;)if(Ie(ce[Er],Er,ce))return Er;return-1}o(nw,"baseFindIndex");function pp(ce,Ie,be){return Ie===Ie?n$(ce,Ie,be):nw(ce,iP,be)}o(pp,"baseIndexOf");function GK(ce,Ie,be,pt){for(var Vt=be-1,Er=ce.length;++Vt<Er;)if(pt(ce[Vt],Ie))return Vt;return-1}o(GK,"baseIndexOfWith");function iP(ce){return ce!==ce}o(iP,"baseIsNaN");function aP(ce,Ie){var be=ce==null?0:ce.length;return be?k2(ce,Ie)/be:Oe}o(aP,"baseMean");function O2(ce){return function(Ie){return Ie==null?r:Ie[ce]}}o(O2,"baseProperty");function P2(ce){return function(Ie){return ce==null?r:ce[Ie]}}o(P2,"basePropertyOf");function oP(ce,Ie,be,pt,Vt){return Vt(ce,function(Er,Tn,Br){be=pt?(pt=!1,Er):Ie(be,Er,Tn,Br)}),be}o(oP,"baseReduce");function XK(ce,Ie){var be=ce.length;for(ce.sort(Ie);be--;)ce[be]=ce[be].value;return ce}o(XK,"baseSortBy");function k2(ce,Ie){for(var be,pt=-1,Vt=ce.length;++pt<Vt;){var Er=Ie(ce[pt]);Er!==r&&(be=be===r?Er:be+Er)}return be}o(k2,"baseSum");function L2(ce,Ie){for(var be=-1,pt=Array(ce);++be<ce;)pt[be]=Ie(be);return pt}o(L2,"baseTimes");function WK(ce,Ie){return Xr(Ie,function(be){return[be,ce[be]]})}o(WK,"baseToPairs");function uP(ce){return ce&&ce.slice(0,hP(ce)+1).replace(ag,"")}o(uP,"baseTrim");function ii(ce){return function(Ie){return ce(Ie)}}o(ii,"baseUnary");function V2(ce,Ie){return Xr(Ie,function(be){return ce[be]})}o(V2,"baseValues");function og(ce,Ie){return ce.has(Ie)}o(og,"cacheHas");function cP(ce,Ie){for(var be=-1,pt=ce.length;++be<pt&&pp(Ie,ce[be],0)>-1;);return be}o(cP,"charsStartIndex");function lP(ce,Ie){for(var be=ce.length;be--&&pp(Ie,ce[be],0)>-1;);return be}o(lP,"charsEndIndex");function zK(ce,Ie){for(var be=ce.length,pt=0;be--;)ce[be]===Ie&&++pt;return pt}o(zK,"countHolders");var JK=P2(OK),YK=P2(PK);function QK(ce){return"\\"+LK[ce]}o(QK,"escapeStringChar");function ZK(ce,Ie){return ce==null?r:ce[Ie]}o(ZK,"getValue");function dp(ce){return _K.test(ce)}o(dp,"hasUnicode");function e$(ce){return DK.test(ce)}o(e$,"hasUnicodeWord");function t$(ce){for(var Ie,be=[];!(Ie=ce.next()).done;)be.push(Ie.value);return be}o(t$,"iteratorToArray");function U2(ce){var Ie=-1,be=Array(ce.size);return ce.forEach(function(pt,Vt){be[++Ie]=[Vt,pt]}),be}o(U2,"mapToArray");function fP(ce,Ie){return function(be){return ce(Ie(be))}}o(fP,"overArg");function Ru(ce,Ie){for(var be=-1,pt=ce.length,Vt=0,Er=[];++be<pt;){var Tn=ce[be];(Tn===Ie||Tn===c)&&(ce[be]=c,Er[Vt++]=be)}return Er}o(Ru,"replaceHolders");function sw(ce){var Ie=-1,be=Array(ce.size);return ce.forEach(function(pt){be[++Ie]=pt}),be}o(sw,"setToArray");function r$(ce){var Ie=-1,be=Array(ce.size);return ce.forEach(function(pt){be[++Ie]=[pt,pt]}),be}o(r$,"setToPairs");function n$(ce,Ie,be){for(var pt=be-1,Vt=ce.length;++pt<Vt;)if(ce[pt]===Ie)return pt;return-1}o(n$,"strictIndexOf");function s$(ce,Ie,be){for(var pt=be+1;pt--;)if(ce[pt]===Ie)return pt;return pt}o(s$,"strictLastIndexOf");function mp(ce){return dp(ce)?a$(ce):HK(ce)}o(mp,"stringSize");function sa(ce){return dp(ce)?o$(ce):KK(ce)}o(sa,"stringToArray");function hP(ce){for(var Ie=ce.length;Ie--&&Qx.test(ce.charAt(Ie)););return Ie}o(hP,"trimmedEndIndex");var i$=P2(kK);function a$(ce){for(var Ie=T2.lastIndex=0;T2.test(ce);)++Ie;return Ie}o(a$,"unicodeSize");function o$(ce){return ce.match(T2)||[]}o(o$,"unicodeToArray");function u$(ce){return ce.match(IK)||[]}o(u$,"unicodeWords");var c$=o(function ce(Ie){Ie=Ie==null?On:Ou.defaults(On.Object(),Ie,Ou.pick(On,BK));var be=Ie.Array,pt=Ie.Date,Vt=Ie.Error,Er=Ie.Function,Tn=Ie.Math,Br=Ie.Object,j2=Ie.RegExp,l$=Ie.String,Ci=Ie.TypeError,iw=be.prototype,f$=Er.prototype,gp=Br.prototype,aw=Ie["__core-js_shared__"],ow=f$.toString,Cr=gp.hasOwnProperty,h$=0,pP=(function(){var f=/[^.]+$/.exec(aw&&aw.keys&&aw.keys.IE_PROTO||"");return f?"Symbol(src)_1."+f:""})(),uw=gp.toString,p$=ow.call(Br),d$=On._,m$=j2("^"+ow.call(Cr).replace(hr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),cw=JO?Ie.Buffer:r,Pu=Ie.Symbol,lw=Ie.Uint8Array,dP=cw?cw.allocUnsafe:r,fw=fP(Br.getPrototypeOf,Br),mP=Br.create,gP=gp.propertyIsEnumerable,hw=iw.splice,vP=Pu?Pu.isConcatSpreadable:r,ug=Pu?Pu.iterator:r,jl=Pu?Pu.toStringTag:r,pw=(function(){try{var f=Kl(Br,"defineProperty");return f({},"",{}),f}catch{}})(),g$=Ie.clearTimeout!==On.clearTimeout&&Ie.clearTimeout,v$=pt&&pt.now!==On.Date.now&&pt.now,y$=Ie.setTimeout!==On.setTimeout&&Ie.setTimeout,dw=Tn.ceil,mw=Tn.floor,F2=Br.getOwnPropertySymbols,x$=cw?cw.isBuffer:r,yP=Ie.isFinite,w$=iw.join,E$=fP(Br.keys,Br),In=Tn.max,us=Tn.min,S$=pt.now,b$=Ie.parseInt,xP=Tn.random,A$=iw.reverse,M2=Kl(Ie,"DataView"),cg=Kl(Ie,"Map"),q2=Kl(Ie,"Promise"),vp=Kl(Ie,"Set"),lg=Kl(Ie,"WeakMap"),fg=Kl(Br,"create"),gw=lg&&new lg,yp={},C$=$l(M2),N$=$l(cg),T$=$l(q2),I$=$l(vp),_$=$l(lg),vw=Pu?Pu.prototype:r,hg=vw?vw.valueOf:r,wP=vw?vw.toString:r;function F(f){if(an(f)&&!Ft(f)&&!(f instanceof ir)){if(f instanceof Ni)return f;if(Cr.call(f,"__wrapped__"))return E3(f)}return new Ni(f)}o(F,"lodash");var xp=(function(){function f(){}return o(f,"object"),function(p){if(!Qr(p))return{};if(mP)return mP(p);f.prototype=p;var x=new f;return f.prototype=r,x}})();function yw(){}o(yw,"baseLodash");function Ni(f,p){this.__wrapped__=f,this.__actions__=[],this.__chain__=!!p,this.__index__=0,this.__values__=r}o(Ni,"LodashWrapper"),F.templateSettings={escape:jt,evaluate:Qt,interpolate:it,variable:"",imports:{_:F}},F.prototype=yw.prototype,F.prototype.constructor=F,Ni.prototype=xp(yw.prototype),Ni.prototype.constructor=Ni;function ir(f){this.__wrapped__=f,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Je,this.__views__=[]}o(ir,"LazyWrapper");function D$(){var f=new ir(this.__wrapped__);return f.__actions__=Rs(this.__actions__),f.__dir__=this.__dir__,f.__filtered__=this.__filtered__,f.__iteratees__=Rs(this.__iteratees__),f.__takeCount__=this.__takeCount__,f.__views__=Rs(this.__views__),f}o(D$,"lazyClone");function B$(){if(this.__filtered__){var f=new ir(this);f.__dir__=-1,f.__filtered__=!0}else f=this.clone(),f.__dir__*=-1;return f}o(B$,"lazyReverse");function R$(){var f=this.__wrapped__.value(),p=this.__dir__,x=Ft(f),D=p<0,k=x?f.length:0,$=KG(0,k,this.__views__),Q=$.start,re=$.end,me=re-Q,_e=D?re:Q-1,Pe=this.__iteratees__,Fe=Pe.length,nt=0,mt=us(me,this.__takeCount__);if(!x||!D&&k==me&&mt==me)return KP(f,this.__actions__);var It=[];e:for(;me--&&nt<mt;){_e+=p;for(var Wt=-1,_t=f[_e];++Wt<Fe;){var Zt=Pe[Wt],or=Zt.iteratee,ui=Zt.type,bs=or(_t);if(ui==he)_t=bs;else if(!bs){if(ui==W)continue e;break e}}It[nt++]=_t}return It}o(R$,"lazyValue"),ir.prototype=xp(yw.prototype),ir.prototype.constructor=ir;function Fl(f){var p=-1,x=f==null?0:f.length;for(this.clear();++p<x;){var D=f[p];this.set(D[0],D[1])}}o(Fl,"Hash");function O$(){this.__data__=fg?fg(null):{},this.size=0}o(O$,"hashClear");function P$(f){var p=this.has(f)&&delete this.__data__[f];return this.size-=p?1:0,p}o(P$,"hashDelete");function k$(f){var p=this.__data__;if(fg){var x=p[f];return x===a?r:x}return Cr.call(p,f)?p[f]:r}o(k$,"hashGet");function L$(f){var p=this.__data__;return fg?p[f]!==r:Cr.call(p,f)}o(L$,"hashHas");function V$(f,p){var x=this.__data__;return this.size+=this.has(f)?0:1,x[f]=fg&&p===r?a:p,this}o(V$,"hashSet"),Fl.prototype.clear=O$,Fl.prototype.delete=P$,Fl.prototype.get=k$,Fl.prototype.has=L$,Fl.prototype.set=V$;function _o(f){var p=-1,x=f==null?0:f.length;for(this.clear();++p<x;){var D=f[p];this.set(D[0],D[1])}}o(_o,"ListCache");function U$(){this.__data__=[],this.size=0}o(U$,"listCacheClear");function j$(f){var p=this.__data__,x=xw(p,f);if(x<0)return!1;var D=p.length-1;return x==D?p.pop():hw.call(p,x,1),--this.size,!0}o(j$,"listCacheDelete");function F$(f){var p=this.__data__,x=xw(p,f);return x<0?r:p[x][1]}o(F$,"listCacheGet");function M$(f){return xw(this.__data__,f)>-1}o(M$,"listCacheHas");function q$(f,p){var x=this.__data__,D=xw(x,f);return D<0?(++this.size,x.push([f,p])):x[D][1]=p,this}o(q$,"listCacheSet"),_o.prototype.clear=U$,_o.prototype.delete=j$,_o.prototype.get=F$,_o.prototype.has=M$,_o.prototype.set=q$;function Do(f){var p=-1,x=f==null?0:f.length;for(this.clear();++p<x;){var D=f[p];this.set(D[0],D[1])}}o(Do,"MapCache");function H$(){this.size=0,this.__data__={hash:new Fl,map:new(cg||_o),string:new Fl}}o(H$,"mapCacheClear");function K$(f){var p=Bw(this,f).delete(f);return this.size-=p?1:0,p}o(K$,"mapCacheDelete");function $$(f){return Bw(this,f).get(f)}o($$,"mapCacheGet");function G$(f){return Bw(this,f).has(f)}o(G$,"mapCacheHas");function X$(f,p){var x=Bw(this,f),D=x.size;return x.set(f,p),this.size+=x.size==D?0:1,this}o(X$,"mapCacheSet"),Do.prototype.clear=H$,Do.prototype.delete=K$,Do.prototype.get=$$,Do.prototype.has=G$,Do.prototype.set=X$;function Ml(f){var p=-1,x=f==null?0:f.length;for(this.__data__=new Do;++p<x;)this.add(f[p])}o(Ml,"SetCache");function W$(f){return this.__data__.set(f,a),this}o(W$,"setCacheAdd");function z$(f){return this.__data__.has(f)}o(z$,"setCacheHas"),Ml.prototype.add=Ml.prototype.push=W$,Ml.prototype.has=z$;function ia(f){var p=this.__data__=new _o(f);this.size=p.size}o(ia,"Stack");function J$(){this.__data__=new _o,this.size=0}o(J$,"stackClear");function Y$(f){var p=this.__data__,x=p.delete(f);return this.size=p.size,x}o(Y$,"stackDelete");function Q$(f){return this.__data__.get(f)}o(Q$,"stackGet");function Z$(f){return this.__data__.has(f)}o(Z$,"stackHas");function eG(f,p){var x=this.__data__;if(x instanceof _o){var D=x.__data__;if(!cg||D.length<t-1)return D.push([f,p]),this.size=++x.size,this;x=this.__data__=new Do(D)}return x.set(f,p),this.size=x.size,this}o(eG,"stackSet"),ia.prototype.clear=J$,ia.prototype.delete=Y$,ia.prototype.get=Q$,ia.prototype.has=Z$,ia.prototype.set=eG;function EP(f,p){var x=Ft(f),D=!x&&Gl(f),k=!x&&!D&&ju(f),$=!x&&!D&&!k&&bp(f),Q=x||D||k||$,re=Q?L2(f.length,l$):[],me=re.length;for(var _e in f)(p||Cr.call(f,_e))&&!(Q&&(_e=="length"||k&&(_e=="offset"||_e=="parent")||$&&(_e=="buffer"||_e=="byteLength"||_e=="byteOffset")||Po(_e,me)))&&re.push(_e);return re}o(EP,"arrayLikeKeys");function SP(f){var p=f.length;return p?f[Z2(0,p-1)]:r}o(SP,"arraySample");function tG(f,p){return Rw(Rs(f),ql(p,0,f.length))}o(tG,"arraySampleSize");function rG(f){return Rw(Rs(f))}o(rG,"arrayShuffle");function H2(f,p,x){(x!==r&&!aa(f[p],x)||x===r&&!(p in f))&&Bo(f,p,x)}o(H2,"assignMergeValue");function pg(f,p,x){var D=f[p];(!(Cr.call(f,p)&&aa(D,x))||x===r&&!(p in f))&&Bo(f,p,x)}o(pg,"assignValue");function xw(f,p){for(var x=f.length;x--;)if(aa(f[x][0],p))return x;return-1}o(xw,"assocIndexOf");function nG(f,p,x,D){return ku(f,function(k,$,Q){p(D,k,x(k),Q)}),D}o(nG,"baseAggregator");function bP(f,p){return f&&Va(p,Pn(p),f)}o(bP,"baseAssign");function sG(f,p){return f&&Va(p,Ps(p),f)}o(sG,"baseAssignIn");function Bo(f,p,x){p=="__proto__"&&pw?pw(f,p,{configurable:!0,enumerable:!0,value:x,writable:!0}):f[p]=x}o(Bo,"baseAssignValue");function K2(f,p){for(var x=-1,D=p.length,k=be(D),$=f==null;++x<D;)k[x]=$?r:AN(f,p[x]);return k}o(K2,"baseAt");function ql(f,p,x){return f===f&&(x!==r&&(f=f<=x?f:x),p!==r&&(f=f>=p?f:p)),f}o(ql,"baseClamp");function Ti(f,p,x,D,k,$){var Q,re=p&l,me=p&h,_e=p&m;if(x&&(Q=k?x(f,D,k,$):x(f)),Q!==r)return Q;if(!Qr(f))return f;var Pe=Ft(f);if(Pe){if(Q=GG(f),!re)return Rs(f,Q)}else{var Fe=cs(f),nt=Fe==Ee||Fe==Ce;if(ju(f))return XP(f,re);if(Fe==Me||Fe==He||nt&&!k){if(Q=me||nt?{}:h3(f),!re)return me?kG(f,sG(Q,f)):PG(f,bP(Q,f))}else{if(!kr[Fe])return k?f:{};Q=XG(f,Fe,re)}}$||($=new ia);var mt=$.get(f);if(mt)return mt;$.set(f,Q),M3(f)?f.forEach(function(_t){Q.add(Ti(_t,p,x,_t,f,$))}):j3(f)&&f.forEach(function(_t,Zt){Q.set(Zt,Ti(_t,p,x,Zt,f,$))});var It=_e?me?lN:cN:me?Ps:Pn,Wt=Pe?r:It(f);return Ai(Wt||f,function(_t,Zt){Wt&&(Zt=_t,_t=f[Zt]),pg(Q,Zt,Ti(_t,p,x,Zt,f,$))}),Q}o(Ti,"baseClone");function iG(f){var p=Pn(f);return function(x){return AP(x,f,p)}}o(iG,"baseConforms");function AP(f,p,x){var D=x.length;if(f==null)return!D;for(f=Br(f);D--;){var k=x[D],$=p[k],Q=f[k];if(Q===r&&!(k in f)||!$(Q))return!1}return!0}o(AP,"baseConformsTo");function CP(f,p,x){if(typeof f!="function")throw new Ci(s);return wg(function(){f.apply(r,x)},p)}o(CP,"baseDelay");function dg(f,p,x,D){var k=-1,$=rw,Q=!0,re=f.length,me=[],_e=p.length;if(!re)return me;x&&(p=Xr(p,ii(x))),D?($=D2,Q=!1):p.length>=t&&($=og,Q=!1,p=new Ml(p));e:for(;++k<re;){var Pe=f[k],Fe=x==null?Pe:x(Pe);if(Pe=D||Pe!==0?Pe:0,Q&&Fe===Fe){for(var nt=_e;nt--;)if(p[nt]===Fe)continue e;me.push(Pe)}else $(p,Fe,D)||me.push(Pe)}return me}o(dg,"baseDifference");var ku=QP(La),NP=QP(G2,!0);function aG(f,p){var x=!0;return ku(f,function(D,k,$){return x=!!p(D,k,$),x}),x}o(aG,"baseEvery");function ww(f,p,x){for(var D=-1,k=f.length;++D<k;){var $=f[D],Q=p($);if(Q!=null&&(re===r?Q===Q&&!oi(Q):x(Q,re)))var re=Q,me=$}return me}o(ww,"baseExtremum");function oG(f,p,x,D){var k=f.length;for(x=Kt(x),x<0&&(x=-x>k?0:k+x),D=D===r||D>k?k:Kt(D),D<0&&(D+=k),D=x>D?0:H3(D);x<D;)f[x++]=p;return f}o(oG,"baseFill");function TP(f,p){var x=[];return ku(f,function(D,k,$){p(D,k,$)&&x.push(D)}),x}o(TP,"baseFilter");function Wn(f,p,x,D,k){var $=-1,Q=f.length;for(x||(x=zG),k||(k=[]);++$<Q;){var re=f[$];p>0&&x(re)?p>1?Wn(re,p-1,x,D,k):Bu(k,re):D||(k[k.length]=re)}return k}o(Wn,"baseFlatten");var $2=ZP(),IP=ZP(!0);function La(f,p){return f&&$2(f,p,Pn)}o(La,"baseForOwn");function G2(f,p){return f&&IP(f,p,Pn)}o(G2,"baseForOwnRight");function Ew(f,p){return Du(p,function(x){return ko(f[x])})}o(Ew,"baseFunctions");function Hl(f,p){p=Vu(p,f);for(var x=0,D=p.length;f!=null&&x<D;)f=f[Ua(p[x++])];return x&&x==D?f:r}o(Hl,"baseGet");function _P(f,p,x){var D=p(f);return Ft(f)?D:Bu(D,x(f))}o(_P,"baseGetAllKeys");function Es(f){return f==null?f===r?Bs:Tt:jl&&jl in Br(f)?HG(f):rX(f)}o(Es,"baseGetTag");function X2(f,p){return f>p}o(X2,"baseGt");function uG(f,p){return f!=null&&Cr.call(f,p)}o(uG,"baseHas");function cG(f,p){return f!=null&&p in Br(f)}o(cG,"baseHasIn");function lG(f,p,x){return f>=us(p,x)&&f<In(p,x)}o(lG,"baseInRange");function W2(f,p,x){for(var D=x?D2:rw,k=f[0].length,$=f.length,Q=$,re=be($),me=1/0,_e=[];Q--;){var Pe=f[Q];Q&&p&&(Pe=Xr(Pe,ii(p))),me=us(Pe.length,me),re[Q]=!x&&(p||k>=120&&Pe.length>=120)?new Ml(Q&&Pe):r}Pe=f[0];var Fe=-1,nt=re[0];e:for(;++Fe<k&&_e.length<me;){var mt=Pe[Fe],It=p?p(mt):mt;if(mt=x||mt!==0?mt:0,!(nt?og(nt,It):D(_e,It,x))){for(Q=$;--Q;){var Wt=re[Q];if(!(Wt?og(Wt,It):D(f[Q],It,x)))continue e}nt&&nt.push(It),_e.push(mt)}}return _e}o(W2,"baseIntersection");function fG(f,p,x,D){return La(f,function(k,$,Q){p(D,x(k),$,Q)}),D}o(fG,"baseInverter");function mg(f,p,x){p=Vu(p,f),f=g3(f,p);var D=f==null?f:f[Ua(_i(p))];return D==null?r:si(D,f,x)}o(mg,"baseInvoke");function DP(f){return an(f)&&Es(f)==He}o(DP,"baseIsArguments");function hG(f){return an(f)&&Es(f)==st}o(hG,"baseIsArrayBuffer");function pG(f){return an(f)&&Es(f)==S}o(pG,"baseIsDate");function gg(f,p,x,D,k){return f===p?!0:f==null||p==null||!an(f)&&!an(p)?f!==f&&p!==p:dG(f,p,x,D,gg,k)}o(gg,"baseIsEqual");function dG(f,p,x,D,k,$){var Q=Ft(f),re=Ft(p),me=Q?Le:cs(f),_e=re?Le:cs(p);me=me==He?Me:me,_e=_e==He?Me:_e;var Pe=me==Me,Fe=_e==Me,nt=me==_e;if(nt&&ju(f)){if(!ju(p))return!1;Q=!0,Pe=!1}if(nt&&!Pe)return $||($=new ia),Q||bp(f)?c3(f,p,x,D,k,$):MG(f,p,me,x,D,k,$);if(!(x&g)){var mt=Pe&&Cr.call(f,"__wrapped__"),It=Fe&&Cr.call(p,"__wrapped__");if(mt||It){var Wt=mt?f.value():f,_t=It?p.value():p;return $||($=new ia),k(Wt,_t,x,D,$)}}return nt?($||($=new ia),qG(f,p,x,D,k,$)):!1}o(dG,"baseIsEqualDeep");function mG(f){return an(f)&&cs(f)==Ae}o(mG,"baseIsMap");function z2(f,p,x,D){var k=x.length,$=k,Q=!D;if(f==null)return!$;for(f=Br(f);k--;){var re=x[k];if(Q&&re[2]?re[1]!==f[re[0]]:!(re[0]in f))return!1}for(;++k<$;){re=x[k];var me=re[0],_e=f[me],Pe=re[1];if(Q&&re[2]){if(_e===r&&!(me in f))return!1}else{var Fe=new ia;if(D)var nt=D(_e,Pe,me,f,p,Fe);if(!(nt===r?gg(Pe,_e,g|y,D,Fe):nt))return!1}}return!0}o(z2,"baseIsMatch");function BP(f){if(!Qr(f)||YG(f))return!1;var p=ko(f)?m$:iK;return p.test($l(f))}o(BP,"baseIsNative");function gG(f){return an(f)&&Es(f)==Qe}o(gG,"baseIsRegExp");function vG(f){return an(f)&&cs(f)==Dr}o(vG,"baseIsSet");function yG(f){return an(f)&&Uw(f.length)&&!!Hr[Es(f)]}o(yG,"baseIsTypedArray");function RP(f){return typeof f=="function"?f:f==null?ks:typeof f=="object"?Ft(f)?kP(f[0],f[1]):PP(f):ek(f)}o(RP,"baseIteratee");function J2(f){if(!xg(f))return E$(f);var p=[];for(var x in Br(f))Cr.call(f,x)&&x!="constructor"&&p.push(x);return p}o(J2,"baseKeys");function xG(f){if(!Qr(f))return tX(f);var p=xg(f),x=[];for(var D in f)D=="constructor"&&(p||!Cr.call(f,D))||x.push(D);return x}o(xG,"baseKeysIn");function Y2(f,p){return f<p}o(Y2,"baseLt");function OP(f,p){var x=-1,D=Os(f)?be(f.length):[];return ku(f,function(k,$,Q){D[++x]=p(k,$,Q)}),D}o(OP,"baseMap");function PP(f){var p=hN(f);return p.length==1&&p[0][2]?d3(p[0][0],p[0][1]):function(x){return x===f||z2(x,f,p)}}o(PP,"baseMatches");function kP(f,p){return dN(f)&&p3(p)?d3(Ua(f),p):function(x){var D=AN(x,f);return D===r&&D===p?CN(x,f):gg(p,D,g|y)}}o(kP,"baseMatchesProperty");function Sw(f,p,x,D,k){f!==p&&$2(p,function($,Q){if(k||(k=new ia),Qr($))wG(f,p,Q,x,Sw,D,k);else{var re=D?D(gN(f,Q),$,Q+"",f,p,k):r;re===r&&(re=$),H2(f,Q,re)}},Ps)}o(Sw,"baseMerge");function wG(f,p,x,D,k,$,Q){var re=gN(f,x),me=gN(p,x),_e=Q.get(me);if(_e){H2(f,x,_e);return}var Pe=$?$(re,me,x+"",f,p,Q):r,Fe=Pe===r;if(Fe){var nt=Ft(me),mt=!nt&&ju(me),It=!nt&&!mt&&bp(me);Pe=me,nt||mt||It?Ft(re)?Pe=re:dn(re)?Pe=Rs(re):mt?(Fe=!1,Pe=XP(me,!0)):It?(Fe=!1,Pe=WP(me,!0)):Pe=[]:Eg(me)||Gl(me)?(Pe=re,Gl(re)?Pe=K3(re):(!Qr(re)||ko(re))&&(Pe=h3(me))):Fe=!1}Fe&&(Q.set(me,Pe),k(Pe,me,D,$,Q),Q.delete(me)),H2(f,x,Pe)}o(wG,"baseMergeDeep");function LP(f,p){var x=f.length;if(x)return p+=p<0?x:0,Po(p,x)?f[p]:r}o(LP,"baseNth");function VP(f,p,x){p.length?p=Xr(p,function($){return Ft($)?function(Q){return Hl(Q,$.length===1?$[0]:$)}:$}):p=[ks];var D=-1;p=Xr(p,ii(At()));var k=OP(f,function($,Q,re){var me=Xr(p,function(_e){return _e($)});return{criteria:me,index:++D,value:$}});return XK(k,function($,Q){return OG($,Q,x)})}o(VP,"baseOrderBy");function EG(f,p){return UP(f,p,function(x,D){return CN(f,D)})}o(EG,"basePick");function UP(f,p,x){for(var D=-1,k=p.length,$={};++D<k;){var Q=p[D],re=Hl(f,Q);x(re,Q)&&vg($,Vu(Q,f),re)}return $}o(UP,"basePickBy");function SG(f){return function(p){return Hl(p,f)}}o(SG,"basePropertyDeep");function Q2(f,p,x,D){var k=D?GK:pp,$=-1,Q=p.length,re=f;for(f===p&&(p=Rs(p)),x&&(re=Xr(f,ii(x)));++$<Q;)for(var me=0,_e=p[$],Pe=x?x(_e):_e;(me=k(re,Pe,me,D))>-1;)re!==f&&hw.call(re,me,1),hw.call(f,me,1);return f}o(Q2,"basePullAll");function jP(f,p){for(var x=f?p.length:0,D=x-1;x--;){var k=p[x];if(x==D||k!==$){var $=k;Po(k)?hw.call(f,k,1):rN(f,k)}}return f}o(jP,"basePullAt");function Z2(f,p){return f+mw(xP()*(p-f+1))}o(Z2,"baseRandom");function bG(f,p,x,D){for(var k=-1,$=In(dw((p-f)/(x||1)),0),Q=be($);$--;)Q[D?$:++k]=f,f+=x;return Q}o(bG,"baseRange");function eN(f,p){var x="";if(!f||p<1||p>Y)return x;do p%2&&(x+=f),p=mw(p/2),p&&(f+=f);while(p);return x}o(eN,"baseRepeat");function Yt(f,p){return vN(m3(f,p,ks),f+"")}o(Yt,"baseRest");function AG(f){return SP(Ap(f))}o(AG,"baseSample");function CG(f,p){var x=Ap(f);return Rw(x,ql(p,0,x.length))}o(CG,"baseSampleSize");function vg(f,p,x,D){if(!Qr(f))return f;p=Vu(p,f);for(var k=-1,$=p.length,Q=$-1,re=f;re!=null&&++k<$;){var me=Ua(p[k]),_e=x;if(me==="__proto__"||me==="constructor"||me==="prototype")return f;if(k!=Q){var Pe=re[me];_e=D?D(Pe,me,re):r,_e===r&&(_e=Qr(Pe)?Pe:Po(p[k+1])?[]:{})}pg(re,me,_e),re=re[me]}return f}o(vg,"baseSet");var FP=gw?function(f,p){return gw.set(f,p),f}:ks,NG=pw?function(f,p){return pw(f,"toString",{configurable:!0,enumerable:!1,value:TN(p),writable:!0})}:ks;function TG(f){return Rw(Ap(f))}o(TG,"baseShuffle");function Ii(f,p,x){var D=-1,k=f.length;p<0&&(p=-p>k?0:k+p),x=x>k?k:x,x<0&&(x+=k),k=p>x?0:x-p>>>0,p>>>=0;for(var $=be(k);++D<k;)$[D]=f[D+p];return $}o(Ii,"baseSlice");function IG(f,p){var x;return ku(f,function(D,k,$){return x=p(D,k,$),!x}),!!x}o(IG,"baseSome");function bw(f,p,x){var D=0,k=f==null?D:f.length;if(typeof p=="number"&&p===p&&k<=Z){for(;D<k;){var $=D+k>>>1,Q=f[$];Q!==null&&!oi(Q)&&(x?Q<=p:Q<p)?D=$+1:k=$}return k}return tN(f,p,ks,x)}o(bw,"baseSortedIndex");function tN(f,p,x,D){var k=0,$=f==null?0:f.length;if($===0)return 0;p=x(p);for(var Q=p!==p,re=p===null,me=oi(p),_e=p===r;k<$;){var Pe=mw((k+$)/2),Fe=x(f[Pe]),nt=Fe!==r,mt=Fe===null,It=Fe===Fe,Wt=oi(Fe);if(Q)var _t=D||It;else _e?_t=It&&(D||nt):re?_t=It&&nt&&(D||!mt):me?_t=It&&nt&&!mt&&(D||!Wt):mt||Wt?_t=!1:_t=D?Fe<=p:Fe<p;_t?k=Pe+1:$=Pe}return us($,ne)}o(tN,"baseSortedIndexBy");function MP(f,p){for(var x=-1,D=f.length,k=0,$=[];++x<D;){var Q=f[x],re=p?p(Q):Q;if(!x||!aa(re,me)){var me=re;$[k++]=Q===0?0:Q}}return $}o(MP,"baseSortedUniq");function qP(f){return typeof f=="number"?f:oi(f)?Oe:+f}o(qP,"baseToNumber");function ai(f){if(typeof f=="string")return f;if(Ft(f))return Xr(f,ai)+"";if(oi(f))return wP?wP.call(f):"";var p=f+"";return p=="0"&&1/f==-ue?"-0":p}o(ai,"baseToString");function Lu(f,p,x){var D=-1,k=rw,$=f.length,Q=!0,re=[],me=re;if(x)Q=!1,k=D2;else if($>=t){var _e=p?null:jG(f);if(_e)return sw(_e);Q=!1,k=og,me=new Ml}else me=p?[]:re;e:for(;++D<$;){var Pe=f[D],Fe=p?p(Pe):Pe;if(Pe=x||Pe!==0?Pe:0,Q&&Fe===Fe){for(var nt=me.length;nt--;)if(me[nt]===Fe)continue e;p&&me.push(Fe),re.push(Pe)}else k(me,Fe,x)||(me!==re&&me.push(Fe),re.push(Pe))}return re}o(Lu,"baseUniq");function rN(f,p){return p=Vu(p,f),f=g3(f,p),f==null||delete f[Ua(_i(p))]}o(rN,"baseUnset");function HP(f,p,x,D){return vg(f,p,x(Hl(f,p)),D)}o(HP,"baseUpdate");function Aw(f,p,x,D){for(var k=f.length,$=D?k:-1;(D?$--:++$<k)&&p(f[$],$,f););return x?Ii(f,D?0:$,D?$+1:k):Ii(f,D?$+1:0,D?k:$)}o(Aw,"baseWhile");function KP(f,p){var x=f;return x instanceof ir&&(x=x.value()),B2(p,function(D,k){return k.func.apply(k.thisArg,Bu([D],k.args))},x)}o(KP,"baseWrapperValue");function nN(f,p,x){var D=f.length;if(D<2)return D?Lu(f[0]):[];for(var k=-1,$=be(D);++k<D;)for(var Q=f[k],re=-1;++re<D;)re!=k&&($[k]=dg($[k]||Q,f[re],p,x));return Lu(Wn($,1),p,x)}o(nN,"baseXor");function $P(f,p,x){for(var D=-1,k=f.length,$=p.length,Q={};++D<k;){var re=D<$?p[D]:r;x(Q,f[D],re)}return Q}o($P,"baseZipObject");function sN(f){return dn(f)?f:[]}o(sN,"castArrayLikeObject");function iN(f){return typeof f=="function"?f:ks}o(iN,"castFunction");function Vu(f,p){return Ft(f)?f:dN(f,p)?[f]:w3(Sr(f))}o(Vu,"castPath");var _G=Yt;function Uu(f,p,x){var D=f.length;return x=x===r?D:x,!p&&x>=D?f:Ii(f,p,x)}o(Uu,"castSlice");var GP=g$||function(f){return On.clearTimeout(f)};function XP(f,p){if(p)return f.slice();var x=f.length,D=dP?dP(x):new f.constructor(x);return f.copy(D),D}o(XP,"cloneBuffer");function aN(f){var p=new f.constructor(f.byteLength);return new lw(p).set(new lw(f)),p}o(aN,"cloneArrayBuffer");function DG(f,p){var x=p?aN(f.buffer):f.buffer;return new f.constructor(x,f.byteOffset,f.byteLength)}o(DG,"cloneDataView");function BG(f){var p=new f.constructor(f.source,na.exec(f));return p.lastIndex=f.lastIndex,p}o(BG,"cloneRegExp");function RG(f){return hg?Br(hg.call(f)):{}}o(RG,"cloneSymbol");function WP(f,p){var x=p?aN(f.buffer):f.buffer;return new f.constructor(x,f.byteOffset,f.length)}o(WP,"cloneTypedArray");function zP(f,p){if(f!==p){var x=f!==r,D=f===null,k=f===f,$=oi(f),Q=p!==r,re=p===null,me=p===p,_e=oi(p);if(!re&&!_e&&!$&&f>p||$&&Q&&me&&!re&&!_e||D&&Q&&me||!x&&me||!k)return 1;if(!D&&!$&&!_e&&f<p||_e&&x&&k&&!D&&!$||re&&x&&k||!Q&&k||!me)return-1}return 0}o(zP,"compareAscending");function OG(f,p,x){for(var D=-1,k=f.criteria,$=p.criteria,Q=k.length,re=x.length;++D<Q;){var me=zP(k[D],$[D]);if(me){if(D>=re)return me;var _e=x[D];return me*(_e=="desc"?-1:1)}}return f.index-p.index}o(OG,"compareMultiple");function JP(f,p,x,D){for(var k=-1,$=f.length,Q=x.length,re=-1,me=p.length,_e=In($-Q,0),Pe=be(me+_e),Fe=!D;++re<me;)Pe[re]=p[re];for(;++k<Q;)(Fe||k<$)&&(Pe[x[k]]=f[k]);for(;_e--;)Pe[re++]=f[k++];return Pe}o(JP,"composeArgs");function YP(f,p,x,D){for(var k=-1,$=f.length,Q=-1,re=x.length,me=-1,_e=p.length,Pe=In($-re,0),Fe=be(Pe+_e),nt=!D;++k<Pe;)Fe[k]=f[k];for(var mt=k;++me<_e;)Fe[mt+me]=p[me];for(;++Q<re;)(nt||k<$)&&(Fe[mt+x[Q]]=f[k++]);return Fe}o(YP,"composeArgsRight");function Rs(f,p){var x=-1,D=f.length;for(p||(p=be(D));++x<D;)p[x]=f[x];return p}o(Rs,"copyArray");function Va(f,p,x,D){var k=!x;x||(x={});for(var $=-1,Q=p.length;++$<Q;){var re=p[$],me=D?D(x[re],f[re],re,x,f):r;me===r&&(me=f[re]),k?Bo(x,re,me):pg(x,re,me)}return x}o(Va,"copyObject");function PG(f,p){return Va(f,pN(f),p)}o(PG,"copySymbols");function kG(f,p){return Va(f,l3(f),p)}o(kG,"copySymbolsIn");function Cw(f,p){return function(x,D){var k=Ft(x)?FK:nG,$=p?p():{};return k(x,f,At(D,2),$)}}o(Cw,"createAggregator");function wp(f){return Yt(function(p,x){var D=-1,k=x.length,$=k>1?x[k-1]:r,Q=k>2?x[2]:r;for($=f.length>3&&typeof $=="function"?(k--,$):r,Q&&Ss(x[0],x[1],Q)&&($=k<3?r:$,k=1),p=Br(p);++D<k;){var re=x[D];re&&f(p,re,D,$)}return p})}o(wp,"createAssigner");function QP(f,p){return function(x,D){if(x==null)return x;if(!Os(x))return f(x,D);for(var k=x.length,$=p?k:-1,Q=Br(x);(p?$--:++$<k)&&D(Q[$],$,Q)!==!1;);return x}}o(QP,"createBaseEach");function ZP(f){return function(p,x,D){for(var k=-1,$=Br(p),Q=D(p),re=Q.length;re--;){var me=Q[f?re:++k];if(x($[me],me,$)===!1)break}return p}}o(ZP,"createBaseFor");function LG(f,p,x){var D=p&v,k=yg(f);function $(){var Q=this&&this!==On&&this instanceof $?k:f;return Q.apply(D?x:this,arguments)}return o($,"wrapper"),$}o(LG,"createBind");function e3(f){return function(p){p=Sr(p);var x=dp(p)?sa(p):r,D=x?x[0]:p.charAt(0),k=x?Uu(x,1).join(""):p.slice(1);return D[f]()+k}}o(e3,"createCaseFirst");function Ep(f){return function(p){return B2(Q3(Y3(p).replace(NK,"")),f,"")}}o(Ep,"createCompounder");function yg(f){return function(){var p=arguments;switch(p.length){case 0:return new f;case 1:return new f(p[0]);case 2:return new f(p[0],p[1]);case 3:return new f(p[0],p[1],p[2]);case 4:return new f(p[0],p[1],p[2],p[3]);case 5:return new f(p[0],p[1],p[2],p[3],p[4]);case 6:return new f(p[0],p[1],p[2],p[3],p[4],p[5]);case 7:return new f(p[0],p[1],p[2],p[3],p[4],p[5],p[6])}var x=xp(f.prototype),D=f.apply(x,p);return Qr(D)?D:x}}o(yg,"createCtor");function VG(f,p,x){var D=yg(f);function k(){for(var $=arguments.length,Q=be($),re=$,me=Sp(k);re--;)Q[re]=arguments[re];var _e=$<3&&Q[0]!==me&&Q[$-1]!==me?[]:Ru(Q,me);if($-=_e.length,$<x)return i3(f,p,Nw,k.placeholder,r,Q,_e,r,r,x-$);var Pe=this&&this!==On&&this instanceof k?D:f;return si(Pe,this,Q)}return o(k,"wrapper"),k}o(VG,"createCurry");function t3(f){return function(p,x,D){var k=Br(p);if(!Os(p)){var $=At(x,3);p=Pn(p),x=o(function(re){return $(k[re],re,k)},"predicate")}var Q=f(p,x,D);return Q>-1?k[$?p[Q]:Q]:r}}o(t3,"createFind");function r3(f){return Oo(function(p){var x=p.length,D=x,k=Ni.prototype.thru;for(f&&p.reverse();D--;){var $=p[D];if(typeof $!="function")throw new Ci(s);if(k&&!Q&&Dw($)=="wrapper")var Q=new Ni([],!0)}for(D=Q?D:x;++D<x;){$=p[D];var re=Dw($),me=re=="wrapper"?fN($):r;me&&mN(me[0])&&me[1]==(T|C|b|B)&&!me[4].length&&me[9]==1?Q=Q[Dw(me[0])].apply(Q,me[3]):Q=$.length==1&&mN($)?Q[re]():Q.thru($)}return function(){var _e=arguments,Pe=_e[0];if(Q&&_e.length==1&&Ft(Pe))return Q.plant(Pe).value();for(var Fe=0,nt=x?p[Fe].apply(this,_e):Pe;++Fe<x;)nt=p[Fe].call(this,nt);return nt}})}o(r3,"createFlow");function Nw(f,p,x,D,k,$,Q,re,me,_e){var Pe=p&T,Fe=p&v,nt=p&E,mt=p&(C|_),It=p&M,Wt=nt?r:yg(f);function _t(){for(var Zt=arguments.length,or=be(Zt),ui=Zt;ui--;)or[ui]=arguments[ui];if(mt)var bs=Sp(_t),ci=zK(or,bs);if(D&&(or=JP(or,D,k,mt)),$&&(or=YP(or,$,Q,mt)),Zt-=ci,mt&&Zt<_e){var mn=Ru(or,bs);return i3(f,p,Nw,_t.placeholder,x,or,mn,re,me,_e-Zt)}var oa=Fe?x:this,Vo=nt?oa[f]:f;return Zt=or.length,re?or=nX(or,re):It&&Zt>1&&or.reverse(),Pe&&me<Zt&&(or.length=me),this&&this!==On&&this instanceof _t&&(Vo=Wt||yg(Vo)),Vo.apply(oa,or)}return o(_t,"wrapper"),_t}o(Nw,"createHybrid");function n3(f,p){return function(x,D){return fG(x,f,p(D),{})}}o(n3,"createInverter");function Tw(f,p){return function(x,D){var k;if(x===r&&D===r)return p;if(x!==r&&(k=x),D!==r){if(k===r)return D;typeof x=="string"||typeof D=="string"?(x=ai(x),D=ai(D)):(x=qP(x),D=qP(D)),k=f(x,D)}return k}}o(Tw,"createMathOperation");function oN(f){return Oo(function(p){return p=Xr(p,ii(At())),Yt(function(x){var D=this;return f(p,function(k){return si(k,D,x)})})})}o(oN,"createOver");function Iw(f,p){p=p===r?" ":ai(p);var x=p.length;if(x<2)return x?eN(p,f):p;var D=eN(p,dw(f/mp(p)));return dp(p)?Uu(sa(D),0,f).join(""):D.slice(0,f)}o(Iw,"createPadding");function UG(f,p,x,D){var k=p&v,$=yg(f);function Q(){for(var re=-1,me=arguments.length,_e=-1,Pe=D.length,Fe=be(Pe+me),nt=this&&this!==On&&this instanceof Q?$:f;++_e<Pe;)Fe[_e]=D[_e];for(;me--;)Fe[_e++]=arguments[++re];return si(nt,k?x:this,Fe)}return o(Q,"wrapper"),Q}o(UG,"createPartial");function s3(f){return function(p,x,D){return D&&typeof D!="number"&&Ss(p,x,D)&&(x=D=r),p=Lo(p),x===r?(x=p,p=0):x=Lo(x),D=D===r?p<x?1:-1:Lo(D),bG(p,x,D,f)}}o(s3,"createRange");function _w(f){return function(p,x){return typeof p=="string"&&typeof x=="string"||(p=Di(p),x=Di(x)),f(p,x)}}o(_w,"createRelationalOperation");function i3(f,p,x,D,k,$,Q,re,me,_e){var Pe=p&C,Fe=Pe?Q:r,nt=Pe?r:Q,mt=Pe?$:r,It=Pe?r:$;p|=Pe?b:A,p&=~(Pe?A:b),p&w||(p&=~(v|E));var Wt=[f,p,k,mt,Fe,It,nt,re,me,_e],_t=x.apply(r,Wt);return mN(f)&&v3(_t,Wt),_t.placeholder=D,y3(_t,f,p)}o(i3,"createRecurry");function uN(f){var p=Tn[f];return function(x,D){if(x=Di(x),D=D==null?0:us(Kt(D),292),D&&yP(x)){var k=(Sr(x)+"e").split("e"),$=p(k[0]+"e"+(+k[1]+D));return k=(Sr($)+"e").split("e"),+(k[0]+"e"+(+k[1]-D))}return p(x)}}o(uN,"createRound");var jG=vp&&1/sw(new vp([,-0]))[1]==ue?function(f){return new vp(f)}:DN;function a3(f){return function(p){var x=cs(p);return x==Ae?U2(p):x==Dr?r$(p):WK(p,f(p))}}o(a3,"createToPairs");function Ro(f,p,x,D,k,$,Q,re){var me=p&E;if(!me&&typeof f!="function")throw new Ci(s);var _e=D?D.length:0;if(_e||(p&=~(b|A),D=k=r),Q=Q===r?Q:In(Kt(Q),0),re=re===r?re:Kt(re),_e-=k?k.length:0,p&A){var Pe=D,Fe=k;D=k=r}var nt=me?r:fN(f),mt=[f,p,x,D,k,Pe,Fe,$,Q,re];if(nt&&eX(mt,nt),f=mt[0],p=mt[1],x=mt[2],D=mt[3],k=mt[4],re=mt[9]=mt[9]===r?me?0:f.length:In(mt[9]-_e,0),!re&&p&(C|_)&&(p&=~(C|_)),!p||p==v)var It=LG(f,p,x);else p==C||p==_?It=VG(f,p,re):(p==b||p==(v|b))&&!k.length?It=UG(f,p,x,D):It=Nw.apply(r,mt);var Wt=nt?FP:v3;return y3(Wt(It,mt),f,p)}o(Ro,"createWrap");function o3(f,p,x,D){return f===r||aa(f,gp[x])&&!Cr.call(D,x)?p:f}o(o3,"customDefaultsAssignIn");function u3(f,p,x,D,k,$){return Qr(f)&&Qr(p)&&($.set(p,f),Sw(f,p,r,u3,$),$.delete(p)),f}o(u3,"customDefaultsMerge");function FG(f){return Eg(f)?r:f}o(FG,"customOmitClone");function c3(f,p,x,D,k,$){var Q=x&g,re=f.length,me=p.length;if(re!=me&&!(Q&&me>re))return!1;var _e=$.get(f),Pe=$.get(p);if(_e&&Pe)return _e==p&&Pe==f;var Fe=-1,nt=!0,mt=x&y?new Ml:r;for($.set(f,p),$.set(p,f);++Fe<re;){var It=f[Fe],Wt=p[Fe];if(D)var _t=Q?D(Wt,It,Fe,p,f,$):D(It,Wt,Fe,f,p,$);if(_t!==r){if(_t)continue;nt=!1;break}if(mt){if(!R2(p,function(Zt,or){if(!og(mt,or)&&(It===Zt||k(It,Zt,x,D,$)))return mt.push(or)})){nt=!1;break}}else if(!(It===Wt||k(It,Wt,x,D,$))){nt=!1;break}}return $.delete(f),$.delete(p),nt}o(c3,"equalArrays");function MG(f,p,x,D,k,$,Q){switch(x){case Gn:if(f.byteLength!=p.byteLength||f.byteOffset!=p.byteOffset)return!1;f=f.buffer,p=p.buffer;case st:return!(f.byteLength!=p.byteLength||!$(new lw(f),new lw(p)));case N:case S:case Ye:return aa(+f,+p);case P:return f.name==p.name&&f.message==p.message;case Qe:case Gr:return f==p+"";case Ae:var re=U2;case Dr:var me=D&g;if(re||(re=sw),f.size!=p.size&&!me)return!1;var _e=Q.get(f);if(_e)return _e==p;D|=y,Q.set(f,p);var Pe=c3(re(f),re(p),D,k,$,Q);return Q.delete(f),Pe;case Nn:if(hg)return hg.call(f)==hg.call(p)}return!1}o(MG,"equalByTag");function qG(f,p,x,D,k,$){var Q=x&g,re=cN(f),me=re.length,_e=cN(p),Pe=_e.length;if(me!=Pe&&!Q)return!1;for(var Fe=me;Fe--;){var nt=re[Fe];if(!(Q?nt in p:Cr.call(p,nt)))return!1}var mt=$.get(f),It=$.get(p);if(mt&&It)return mt==p&&It==f;var Wt=!0;$.set(f,p),$.set(p,f);for(var _t=Q;++Fe<me;){nt=re[Fe];var Zt=f[nt],or=p[nt];if(D)var ui=Q?D(or,Zt,nt,p,f,$):D(Zt,or,nt,f,p,$);if(!(ui===r?Zt===or||k(Zt,or,x,D,$):ui)){Wt=!1;break}_t||(_t=nt=="constructor")}if(Wt&&!_t){var bs=f.constructor,ci=p.constructor;bs!=ci&&"constructor"in f&&"constructor"in p&&!(typeof bs=="function"&&bs instanceof bs&&typeof ci=="function"&&ci instanceof ci)&&(Wt=!1)}return $.delete(f),$.delete(p),Wt}o(qG,"equalObjects");function Oo(f){return vN(m3(f,r,A3),f+"")}o(Oo,"flatRest");function cN(f){return _P(f,Pn,pN)}o(cN,"getAllKeys");function lN(f){return _P(f,Ps,l3)}o(lN,"getAllKeysIn");var fN=gw?function(f){return gw.get(f)}:DN;function Dw(f){for(var p=f.name+"",x=yp[p],D=Cr.call(yp,p)?x.length:0;D--;){var k=x[D],$=k.func;if($==null||$==f)return k.name}return p}o(Dw,"getFuncName");function Sp(f){var p=Cr.call(F,"placeholder")?F:f;return p.placeholder}o(Sp,"getHolder");function At(){var f=F.iteratee||IN;return f=f===IN?RP:f,arguments.length?f(arguments[0],arguments[1]):f}o(At,"getIteratee");function Bw(f,p){var x=f.__data__;return JG(p)?x[typeof p=="string"?"string":"hash"]:x.map}o(Bw,"getMapData");function hN(f){for(var p=Pn(f),x=p.length;x--;){var D=p[x],k=f[D];p[x]=[D,k,p3(k)]}return p}o(hN,"getMatchData");function Kl(f,p){var x=ZK(f,p);return BP(x)?x:r}o(Kl,"getNative");function HG(f){var p=Cr.call(f,jl),x=f[jl];try{f[jl]=r;var D=!0}catch{}var k=uw.call(f);return D&&(p?f[jl]=x:delete f[jl]),k}o(HG,"getRawTag");var pN=F2?function(f){return f==null?[]:(f=Br(f),Du(F2(f),function(p){return gP.call(f,p)}))}:BN,l3=F2?function(f){for(var p=[];f;)Bu(p,pN(f)),f=fw(f);return p}:BN,cs=Es;(M2&&cs(new M2(new ArrayBuffer(1)))!=Gn||cg&&cs(new cg)!=Ae||q2&&cs(q2.resolve())!=St||vp&&cs(new vp)!=Dr||lg&&cs(new lg)!=xs)&&(cs=o(function(f){var p=Es(f),x=p==Me?f.constructor:r,D=x?$l(x):"";if(D)switch(D){case C$:return Gn;case N$:return Ae;case T$:return St;case I$:return Dr;case _$:return xs}return p},"getTag"));function KG(f,p,x){for(var D=-1,k=x.length;++D<k;){var $=x[D],Q=$.size;switch($.type){case"drop":f+=Q;break;case"dropRight":p-=Q;break;case"take":p=us(p,f+Q);break;case"takeRight":f=In(f,p-Q);break}}return{start:f,end:p}}o(KG,"getView");function $G(f){var p=f.match(x2);return p?p[1].split(w2):[]}o($G,"getWrapDetails");function f3(f,p,x){p=Vu(p,f);for(var D=-1,k=p.length,$=!1;++D<k;){var Q=Ua(p[D]);if(!($=f!=null&&x(f,Q)))break;f=f[Q]}return $||++D!=k?$:(k=f==null?0:f.length,!!k&&Uw(k)&&Po(Q,k)&&(Ft(f)||Gl(f)))}o(f3,"hasPath");function GG(f){var p=f.length,x=new f.constructor(p);return p&&typeof f[0]=="string"&&Cr.call(f,"index")&&(x.index=f.index,x.input=f.input),x}o(GG,"initCloneArray");function h3(f){return typeof f.constructor=="function"&&!xg(f)?xp(fw(f)):{}}o(h3,"initCloneObject");function XG(f,p,x){var D=f.constructor;switch(p){case st:return aN(f);case N:case S:return new D(+f);case Gn:return DG(f,x);case ws:case Oa:case Pa:case Lt:case lp:case fp:case Vl:case ig:case ni:return WP(f,x);case Ae:return new D;case Ye:case Gr:return new D(f);case Qe:return BG(f);case Dr:return new D;case Nn:return RG(f)}}o(XG,"initCloneByTag");function WG(f,p){var x=p.length;if(!x)return f;var D=x-1;return p[D]=(x>1?"& ":"")+p[D],p=p.join(x>2?", ":" "),f.replace(y2,`{
|
|
28
|
-
/* [wrapped with `+p+`] */
|
|
29
|
-
`)}o(WG,"insertWrapDetails");function zG(f){return Ft(f)||Gl(f)||!!(vP&&f&&f[vP])}o(zG,"isFlattenable");function Po(f,p){var x=typeof f;return p=p??Y,!!p&&(x=="number"||x!="symbol"&&oK.test(f))&&f>-1&&f%1==0&&f<p}o(Po,"isIndex");function Ss(f,p,x){if(!Qr(x))return!1;var D=typeof p;return(D=="number"?Os(x)&&Po(p,x.length):D=="string"&&p in x)?aa(x[p],f):!1}o(Ss,"isIterateeCall");function dN(f,p){if(Ft(f))return!1;var x=typeof f;return x=="number"||x=="symbol"||x=="boolean"||f==null||oi(f)?!0:Xn.test(f)||!Pt.test(f)||p!=null&&f in Br(p)}o(dN,"isKey");function JG(f){var p=typeof f;return p=="string"||p=="number"||p=="symbol"||p=="boolean"?f!=="__proto__":f===null}o(JG,"isKeyable");function mN(f){var p=Dw(f),x=F[p];if(typeof x!="function"||!(p in ir.prototype))return!1;if(f===x)return!0;var D=fN(x);return!!D&&f===D[0]}o(mN,"isLaziable");function YG(f){return!!pP&&pP in f}o(YG,"isMasked");var QG=aw?ko:RN;function xg(f){var p=f&&f.constructor,x=typeof p=="function"&&p.prototype||gp;return f===x}o(xg,"isPrototype");function p3(f){return f===f&&!Qr(f)}o(p3,"isStrictComparable");function d3(f,p){return function(x){return x==null?!1:x[f]===p&&(p!==r||f in Br(x))}}o(d3,"matchesStrictComparable");function ZG(f){var p=Lw(f,function(D){return x.size===u&&x.clear(),D}),x=p.cache;return p}o(ZG,"memoizeCapped");function eX(f,p){var x=f[1],D=p[1],k=x|D,$=k<(v|E|T),Q=D==T&&x==C||D==T&&x==B&&f[7].length<=p[8]||D==(T|B)&&p[7].length<=p[8]&&x==C;if(!($||Q))return f;D&v&&(f[2]=p[2],k|=x&v?0:w);var re=p[3];if(re){var me=f[3];f[3]=me?JP(me,re,p[4]):re,f[4]=me?Ru(f[3],c):p[4]}return re=p[5],re&&(me=f[5],f[5]=me?YP(me,re,p[6]):re,f[6]=me?Ru(f[5],c):p[6]),re=p[7],re&&(f[7]=re),D&T&&(f[8]=f[8]==null?p[8]:us(f[8],p[8])),f[9]==null&&(f[9]=p[9]),f[0]=p[0],f[1]=k,f}o(eX,"mergeData");function tX(f){var p=[];if(f!=null)for(var x in Br(f))p.push(x);return p}o(tX,"nativeKeysIn");function rX(f){return uw.call(f)}o(rX,"objectToString");function m3(f,p,x){return p=In(p===r?f.length-1:p,0),function(){for(var D=arguments,k=-1,$=In(D.length-p,0),Q=be($);++k<$;)Q[k]=D[p+k];k=-1;for(var re=be(p+1);++k<p;)re[k]=D[k];return re[p]=x(Q),si(f,this,re)}}o(m3,"overRest");function g3(f,p){return p.length<2?f:Hl(f,Ii(p,0,-1))}o(g3,"parent");function nX(f,p){for(var x=f.length,D=us(p.length,x),k=Rs(f);D--;){var $=p[D];f[D]=Po($,x)?k[$]:r}return f}o(nX,"reorder");function gN(f,p){if(!(p==="constructor"&&typeof f[p]=="function")&&p!="__proto__")return f[p]}o(gN,"safeGet");var v3=x3(FP),wg=y$||function(f,p){return On.setTimeout(f,p)},vN=x3(NG);function y3(f,p,x){var D=p+"";return vN(f,WG(D,sX($G(D),x)))}o(y3,"setWrapToString");function x3(f){var p=0,x=0;return function(){var D=S$(),k=q-(D-x);if(x=D,k>0){if(++p>=K)return arguments[0]}else p=0;return f.apply(r,arguments)}}o(x3,"shortOut");function Rw(f,p){var x=-1,D=f.length,k=D-1;for(p=p===r?D:p;++x<p;){var $=Z2(x,k),Q=f[$];f[$]=f[x],f[x]=Q}return f.length=p,f}o(Rw,"shuffleSelf");var w3=ZG(function(f){var p=[];return f.charCodeAt(0)===46&&p.push(""),f.replace(Si,function(x,D,k,$){p.push(k?$.replace(sr,"$1"):D||x)}),p});function Ua(f){if(typeof f=="string"||oi(f))return f;var p=f+"";return p=="0"&&1/f==-ue?"-0":p}o(Ua,"toKey");function $l(f){if(f!=null){try{return ow.call(f)}catch{}try{return f+""}catch{}}return""}o($l,"toSource");function sX(f,p){return Ai(Se,function(x){var D="_."+x[0];p&x[1]&&!rw(f,D)&&f.push(D)}),f.sort()}o(sX,"updateWrapDetails");function E3(f){if(f instanceof ir)return f.clone();var p=new Ni(f.__wrapped__,f.__chain__);return p.__actions__=Rs(f.__actions__),p.__index__=f.__index__,p.__values__=f.__values__,p}o(E3,"wrapperClone");function iX(f,p,x){(x?Ss(f,p,x):p===r)?p=1:p=In(Kt(p),0);var D=f==null?0:f.length;if(!D||p<1)return[];for(var k=0,$=0,Q=be(dw(D/p));k<D;)Q[$++]=Ii(f,k,k+=p);return Q}o(iX,"chunk");function aX(f){for(var p=-1,x=f==null?0:f.length,D=0,k=[];++p<x;){var $=f[p];$&&(k[D++]=$)}return k}o(aX,"compact");function oX(){var f=arguments.length;if(!f)return[];for(var p=be(f-1),x=arguments[0],D=f;D--;)p[D-1]=arguments[D];return Bu(Ft(x)?Rs(x):[x],Wn(p,1))}o(oX,"concat");var uX=Yt(function(f,p){return dn(f)?dg(f,Wn(p,1,dn,!0)):[]}),cX=Yt(function(f,p){var x=_i(p);return dn(x)&&(x=r),dn(f)?dg(f,Wn(p,1,dn,!0),At(x,2)):[]}),lX=Yt(function(f,p){var x=_i(p);return dn(x)&&(x=r),dn(f)?dg(f,Wn(p,1,dn,!0),r,x):[]});function fX(f,p,x){var D=f==null?0:f.length;return D?(p=x||p===r?1:Kt(p),Ii(f,p<0?0:p,D)):[]}o(fX,"drop");function hX(f,p,x){var D=f==null?0:f.length;return D?(p=x||p===r?1:Kt(p),p=D-p,Ii(f,0,p<0?0:p)):[]}o(hX,"dropRight");function pX(f,p){return f&&f.length?Aw(f,At(p,3),!0,!0):[]}o(pX,"dropRightWhile");function dX(f,p){return f&&f.length?Aw(f,At(p,3),!0):[]}o(dX,"dropWhile");function mX(f,p,x,D){var k=f==null?0:f.length;return k?(x&&typeof x!="number"&&Ss(f,p,x)&&(x=0,D=k),oG(f,p,x,D)):[]}o(mX,"fill");function S3(f,p,x){var D=f==null?0:f.length;if(!D)return-1;var k=x==null?0:Kt(x);return k<0&&(k=In(D+k,0)),nw(f,At(p,3),k)}o(S3,"findIndex");function b3(f,p,x){var D=f==null?0:f.length;if(!D)return-1;var k=D-1;return x!==r&&(k=Kt(x),k=x<0?In(D+k,0):us(k,D-1)),nw(f,At(p,3),k,!0)}o(b3,"findLastIndex");function A3(f){var p=f==null?0:f.length;return p?Wn(f,1):[]}o(A3,"flatten");function gX(f){var p=f==null?0:f.length;return p?Wn(f,ue):[]}o(gX,"flattenDeep");function vX(f,p){var x=f==null?0:f.length;return x?(p=p===r?1:Kt(p),Wn(f,p)):[]}o(vX,"flattenDepth");function yX(f){for(var p=-1,x=f==null?0:f.length,D={};++p<x;){var k=f[p];D[k[0]]=k[1]}return D}o(yX,"fromPairs");function C3(f){return f&&f.length?f[0]:r}o(C3,"head");function xX(f,p,x){var D=f==null?0:f.length;if(!D)return-1;var k=x==null?0:Kt(x);return k<0&&(k=In(D+k,0)),pp(f,p,k)}o(xX,"indexOf");function wX(f){var p=f==null?0:f.length;return p?Ii(f,0,-1):[]}o(wX,"initial");var EX=Yt(function(f){var p=Xr(f,sN);return p.length&&p[0]===f[0]?W2(p):[]}),SX=Yt(function(f){var p=_i(f),x=Xr(f,sN);return p===_i(x)?p=r:x.pop(),x.length&&x[0]===f[0]?W2(x,At(p,2)):[]}),bX=Yt(function(f){var p=_i(f),x=Xr(f,sN);return p=typeof p=="function"?p:r,p&&x.pop(),x.length&&x[0]===f[0]?W2(x,r,p):[]});function AX(f,p){return f==null?"":w$.call(f,p)}o(AX,"join");function _i(f){var p=f==null?0:f.length;return p?f[p-1]:r}o(_i,"last");function CX(f,p,x){var D=f==null?0:f.length;if(!D)return-1;var k=D;return x!==r&&(k=Kt(x),k=k<0?In(D+k,0):us(k,D-1)),p===p?s$(f,p,k):nw(f,iP,k,!0)}o(CX,"lastIndexOf");function NX(f,p){return f&&f.length?LP(f,Kt(p)):r}o(NX,"nth");var TX=Yt(N3);function N3(f,p){return f&&f.length&&p&&p.length?Q2(f,p):f}o(N3,"pullAll");function IX(f,p,x){return f&&f.length&&p&&p.length?Q2(f,p,At(x,2)):f}o(IX,"pullAllBy");function _X(f,p,x){return f&&f.length&&p&&p.length?Q2(f,p,r,x):f}o(_X,"pullAllWith");var DX=Oo(function(f,p){var x=f==null?0:f.length,D=K2(f,p);return jP(f,Xr(p,function(k){return Po(k,x)?+k:k}).sort(zP)),D});function BX(f,p){var x=[];if(!(f&&f.length))return x;var D=-1,k=[],$=f.length;for(p=At(p,3);++D<$;){var Q=f[D];p(Q,D,f)&&(x.push(Q),k.push(D))}return jP(f,k),x}o(BX,"remove");function yN(f){return f==null?f:A$.call(f)}o(yN,"reverse");function RX(f,p,x){var D=f==null?0:f.length;return D?(x&&typeof x!="number"&&Ss(f,p,x)?(p=0,x=D):(p=p==null?0:Kt(p),x=x===r?D:Kt(x)),Ii(f,p,x)):[]}o(RX,"slice");function OX(f,p){return bw(f,p)}o(OX,"sortedIndex");function PX(f,p,x){return tN(f,p,At(x,2))}o(PX,"sortedIndexBy");function kX(f,p){var x=f==null?0:f.length;if(x){var D=bw(f,p);if(D<x&&aa(f[D],p))return D}return-1}o(kX,"sortedIndexOf");function LX(f,p){return bw(f,p,!0)}o(LX,"sortedLastIndex");function VX(f,p,x){return tN(f,p,At(x,2),!0)}o(VX,"sortedLastIndexBy");function UX(f,p){var x=f==null?0:f.length;if(x){var D=bw(f,p,!0)-1;if(aa(f[D],p))return D}return-1}o(UX,"sortedLastIndexOf");function jX(f){return f&&f.length?MP(f):[]}o(jX,"sortedUniq");function FX(f,p){return f&&f.length?MP(f,At(p,2)):[]}o(FX,"sortedUniqBy");function MX(f){var p=f==null?0:f.length;return p?Ii(f,1,p):[]}o(MX,"tail");function qX(f,p,x){return f&&f.length?(p=x||p===r?1:Kt(p),Ii(f,0,p<0?0:p)):[]}o(qX,"take");function HX(f,p,x){var D=f==null?0:f.length;return D?(p=x||p===r?1:Kt(p),p=D-p,Ii(f,p<0?0:p,D)):[]}o(HX,"takeRight");function KX(f,p){return f&&f.length?Aw(f,At(p,3),!1,!0):[]}o(KX,"takeRightWhile");function $X(f,p){return f&&f.length?Aw(f,At(p,3)):[]}o($X,"takeWhile");var GX=Yt(function(f){return Lu(Wn(f,1,dn,!0))}),XX=Yt(function(f){var p=_i(f);return dn(p)&&(p=r),Lu(Wn(f,1,dn,!0),At(p,2))}),WX=Yt(function(f){var p=_i(f);return p=typeof p=="function"?p:r,Lu(Wn(f,1,dn,!0),r,p)});function zX(f){return f&&f.length?Lu(f):[]}o(zX,"uniq");function JX(f,p){return f&&f.length?Lu(f,At(p,2)):[]}o(JX,"uniqBy");function YX(f,p){return p=typeof p=="function"?p:r,f&&f.length?Lu(f,r,p):[]}o(YX,"uniqWith");function xN(f){if(!(f&&f.length))return[];var p=0;return f=Du(f,function(x){if(dn(x))return p=In(x.length,p),!0}),L2(p,function(x){return Xr(f,O2(x))})}o(xN,"unzip");function T3(f,p){if(!(f&&f.length))return[];var x=xN(f);return p==null?x:Xr(x,function(D){return si(p,r,D)})}o(T3,"unzipWith");var QX=Yt(function(f,p){return dn(f)?dg(f,p):[]}),ZX=Yt(function(f){return nN(Du(f,dn))}),eW=Yt(function(f){var p=_i(f);return dn(p)&&(p=r),nN(Du(f,dn),At(p,2))}),tW=Yt(function(f){var p=_i(f);return p=typeof p=="function"?p:r,nN(Du(f,dn),r,p)}),rW=Yt(xN);function nW(f,p){return $P(f||[],p||[],pg)}o(nW,"zipObject");function sW(f,p){return $P(f||[],p||[],vg)}o(sW,"zipObjectDeep");var iW=Yt(function(f){var p=f.length,x=p>1?f[p-1]:r;return x=typeof x=="function"?(f.pop(),x):r,T3(f,x)});function I3(f){var p=F(f);return p.__chain__=!0,p}o(I3,"chain");function aW(f,p){return p(f),f}o(aW,"tap");function Ow(f,p){return p(f)}o(Ow,"thru");var oW=Oo(function(f){var p=f.length,x=p?f[0]:0,D=this.__wrapped__,k=o(function($){return K2($,f)},"interceptor");return p>1||this.__actions__.length||!(D instanceof ir)||!Po(x)?this.thru(k):(D=D.slice(x,+x+(p?1:0)),D.__actions__.push({func:Ow,args:[k],thisArg:r}),new Ni(D,this.__chain__).thru(function($){return p&&!$.length&&$.push(r),$}))});function uW(){return I3(this)}o(uW,"wrapperChain");function cW(){return new Ni(this.value(),this.__chain__)}o(cW,"wrapperCommit");function lW(){this.__values__===r&&(this.__values__=q3(this.value()));var f=this.__index__>=this.__values__.length,p=f?r:this.__values__[this.__index__++];return{done:f,value:p}}o(lW,"wrapperNext");function fW(){return this}o(fW,"wrapperToIterator");function hW(f){for(var p,x=this;x instanceof yw;){var D=E3(x);D.__index__=0,D.__values__=r,p?k.__wrapped__=D:p=D;var k=D;x=x.__wrapped__}return k.__wrapped__=f,p}o(hW,"wrapperPlant");function pW(){var f=this.__wrapped__;if(f instanceof ir){var p=f;return this.__actions__.length&&(p=new ir(this)),p=p.reverse(),p.__actions__.push({func:Ow,args:[yN],thisArg:r}),new Ni(p,this.__chain__)}return this.thru(yN)}o(pW,"wrapperReverse");function dW(){return KP(this.__wrapped__,this.__actions__)}o(dW,"wrapperValue");var mW=Cw(function(f,p,x){Cr.call(f,x)?++f[x]:Bo(f,x,1)});function gW(f,p,x){var D=Ft(f)?nP:aG;return x&&Ss(f,p,x)&&(p=r),D(f,At(p,3))}o(gW,"every");function vW(f,p){var x=Ft(f)?Du:TP;return x(f,At(p,3))}o(vW,"filter");var yW=t3(S3),xW=t3(b3);function wW(f,p){return Wn(Pw(f,p),1)}o(wW,"flatMap");function EW(f,p){return Wn(Pw(f,p),ue)}o(EW,"flatMapDeep");function SW(f,p,x){return x=x===r?1:Kt(x),Wn(Pw(f,p),x)}o(SW,"flatMapDepth");function _3(f,p){var x=Ft(f)?Ai:ku;return x(f,At(p,3))}o(_3,"forEach");function D3(f,p){var x=Ft(f)?MK:NP;return x(f,At(p,3))}o(D3,"forEachRight");var bW=Cw(function(f,p,x){Cr.call(f,x)?f[x].push(p):Bo(f,x,[p])});function AW(f,p,x,D){f=Os(f)?f:Ap(f),x=x&&!D?Kt(x):0;var k=f.length;return x<0&&(x=In(k+x,0)),jw(f)?x<=k&&f.indexOf(p,x)>-1:!!k&&pp(f,p,x)>-1}o(AW,"includes");var CW=Yt(function(f,p,x){var D=-1,k=typeof p=="function",$=Os(f)?be(f.length):[];return ku(f,function(Q){$[++D]=k?si(p,Q,x):mg(Q,p,x)}),$}),NW=Cw(function(f,p,x){Bo(f,x,p)});function Pw(f,p){var x=Ft(f)?Xr:OP;return x(f,At(p,3))}o(Pw,"map");function TW(f,p,x,D){return f==null?[]:(Ft(p)||(p=p==null?[]:[p]),x=D?r:x,Ft(x)||(x=x==null?[]:[x]),VP(f,p,x))}o(TW,"orderBy");var IW=Cw(function(f,p,x){f[x?0:1].push(p)},function(){return[[],[]]});function _W(f,p,x){var D=Ft(f)?B2:oP,k=arguments.length<3;return D(f,At(p,4),x,k,ku)}o(_W,"reduce");function DW(f,p,x){var D=Ft(f)?qK:oP,k=arguments.length<3;return D(f,At(p,4),x,k,NP)}o(DW,"reduceRight");function BW(f,p){var x=Ft(f)?Du:TP;return x(f,Vw(At(p,3)))}o(BW,"reject");function RW(f){var p=Ft(f)?SP:AG;return p(f)}o(RW,"sample");function OW(f,p,x){(x?Ss(f,p,x):p===r)?p=1:p=Kt(p);var D=Ft(f)?tG:CG;return D(f,p)}o(OW,"sampleSize");function PW(f){var p=Ft(f)?rG:TG;return p(f)}o(PW,"shuffle");function kW(f){if(f==null)return 0;if(Os(f))return jw(f)?mp(f):f.length;var p=cs(f);return p==Ae||p==Dr?f.size:J2(f).length}o(kW,"size");function LW(f,p,x){var D=Ft(f)?R2:IG;return x&&Ss(f,p,x)&&(p=r),D(f,At(p,3))}o(LW,"some");var VW=Yt(function(f,p){if(f==null)return[];var x=p.length;return x>1&&Ss(f,p[0],p[1])?p=[]:x>2&&Ss(p[0],p[1],p[2])&&(p=[p[0]]),VP(f,Wn(p,1),[])}),kw=v$||function(){return On.Date.now()};function UW(f,p){if(typeof p!="function")throw new Ci(s);return f=Kt(f),function(){if(--f<1)return p.apply(this,arguments)}}o(UW,"after");function B3(f,p,x){return p=x?r:p,p=f&&p==null?f.length:p,Ro(f,T,r,r,r,r,p)}o(B3,"ary");function R3(f,p){var x;if(typeof p!="function")throw new Ci(s);return f=Kt(f),function(){return--f>0&&(x=p.apply(this,arguments)),f<=1&&(p=r),x}}o(R3,"before");var wN=Yt(function(f,p,x){var D=v;if(x.length){var k=Ru(x,Sp(wN));D|=b}return Ro(f,D,p,x,k)}),O3=Yt(function(f,p,x){var D=v|E;if(x.length){var k=Ru(x,Sp(O3));D|=b}return Ro(p,D,f,x,k)});function P3(f,p,x){p=x?r:p;var D=Ro(f,C,r,r,r,r,r,p);return D.placeholder=P3.placeholder,D}o(P3,"curry");function k3(f,p,x){p=x?r:p;var D=Ro(f,_,r,r,r,r,r,p);return D.placeholder=k3.placeholder,D}o(k3,"curryRight");function L3(f,p,x){var D,k,$,Q,re,me,_e=0,Pe=!1,Fe=!1,nt=!0;if(typeof f!="function")throw new Ci(s);p=Di(p)||0,Qr(x)&&(Pe=!!x.leading,Fe="maxWait"in x,$=Fe?In(Di(x.maxWait)||0,p):$,nt="trailing"in x?!!x.trailing:nt);function mt(mn){var oa=D,Vo=k;return D=k=r,_e=mn,Q=f.apply(Vo,oa),Q}o(mt,"invokeFunc");function It(mn){return _e=mn,re=wg(Zt,p),Pe?mt(mn):Q}o(It,"leadingEdge");function Wt(mn){var oa=mn-me,Vo=mn-_e,tk=p-oa;return Fe?us(tk,$-Vo):tk}o(Wt,"remainingWait");function _t(mn){var oa=mn-me,Vo=mn-_e;return me===r||oa>=p||oa<0||Fe&&Vo>=$}o(_t,"shouldInvoke");function Zt(){var mn=kw();if(_t(mn))return or(mn);re=wg(Zt,Wt(mn))}o(Zt,"timerExpired");function or(mn){return re=r,nt&&D?mt(mn):(D=k=r,Q)}o(or,"trailingEdge");function ui(){re!==r&&GP(re),_e=0,D=me=k=re=r}o(ui,"cancel");function bs(){return re===r?Q:or(kw())}o(bs,"flush");function ci(){var mn=kw(),oa=_t(mn);if(D=arguments,k=this,me=mn,oa){if(re===r)return It(me);if(Fe)return GP(re),re=wg(Zt,p),mt(me)}return re===r&&(re=wg(Zt,p)),Q}return o(ci,"debounced"),ci.cancel=ui,ci.flush=bs,ci}o(L3,"debounce");var jW=Yt(function(f,p){return CP(f,1,p)}),FW=Yt(function(f,p,x){return CP(f,Di(p)||0,x)});function MW(f){return Ro(f,M)}o(MW,"flip");function Lw(f,p){if(typeof f!="function"||p!=null&&typeof p!="function")throw new Ci(s);var x=o(function(){var D=arguments,k=p?p.apply(this,D):D[0],$=x.cache;if($.has(k))return $.get(k);var Q=f.apply(this,D);return x.cache=$.set(k,Q)||$,Q},"memoized");return x.cache=new(Lw.Cache||Do),x}o(Lw,"memoize"),Lw.Cache=Do;function Vw(f){if(typeof f!="function")throw new Ci(s);return function(){var p=arguments;switch(p.length){case 0:return!f.call(this);case 1:return!f.call(this,p[0]);case 2:return!f.call(this,p[0],p[1]);case 3:return!f.call(this,p[0],p[1],p[2])}return!f.apply(this,p)}}o(Vw,"negate");function qW(f){return R3(2,f)}o(qW,"once");var HW=_G(function(f,p){p=p.length==1&&Ft(p[0])?Xr(p[0],ii(At())):Xr(Wn(p,1),ii(At()));var x=p.length;return Yt(function(D){for(var k=-1,$=us(D.length,x);++k<$;)D[k]=p[k].call(this,D[k]);return si(f,this,D)})}),EN=Yt(function(f,p){var x=Ru(p,Sp(EN));return Ro(f,b,r,p,x)}),V3=Yt(function(f,p){var x=Ru(p,Sp(V3));return Ro(f,A,r,p,x)}),KW=Oo(function(f,p){return Ro(f,B,r,r,r,p)});function $W(f,p){if(typeof f!="function")throw new Ci(s);return p=p===r?p:Kt(p),Yt(f,p)}o($W,"rest");function GW(f,p){if(typeof f!="function")throw new Ci(s);return p=p==null?0:In(Kt(p),0),Yt(function(x){var D=x[p],k=Uu(x,0,p);return D&&Bu(k,D),si(f,this,k)})}o(GW,"spread");function XW(f,p,x){var D=!0,k=!0;if(typeof f!="function")throw new Ci(s);return Qr(x)&&(D="leading"in x?!!x.leading:D,k="trailing"in x?!!x.trailing:k),L3(f,p,{leading:D,maxWait:p,trailing:k})}o(XW,"throttle");function WW(f){return B3(f,1)}o(WW,"unary");function zW(f,p){return EN(iN(p),f)}o(zW,"wrap");function JW(){if(!arguments.length)return[];var f=arguments[0];return Ft(f)?f:[f]}o(JW,"castArray");function YW(f){return Ti(f,m)}o(YW,"clone");function QW(f,p){return p=typeof p=="function"?p:r,Ti(f,m,p)}o(QW,"cloneWith");function ZW(f){return Ti(f,l|m)}o(ZW,"cloneDeep");function ez(f,p){return p=typeof p=="function"?p:r,Ti(f,l|m,p)}o(ez,"cloneDeepWith");function tz(f,p){return p==null||AP(f,p,Pn(p))}o(tz,"conformsTo");function aa(f,p){return f===p||f!==f&&p!==p}o(aa,"eq");var rz=_w(X2),nz=_w(function(f,p){return f>=p}),Gl=DP((function(){return arguments})())?DP:function(f){return an(f)&&Cr.call(f,"callee")&&!gP.call(f,"callee")},Ft=be.isArray,sz=YO?ii(YO):hG;function Os(f){return f!=null&&Uw(f.length)&&!ko(f)}o(Os,"isArrayLike");function dn(f){return an(f)&&Os(f)}o(dn,"isArrayLikeObject");function iz(f){return f===!0||f===!1||an(f)&&Es(f)==N}o(iz,"isBoolean");var ju=x$||RN,az=QO?ii(QO):pG;function oz(f){return an(f)&&f.nodeType===1&&!Eg(f)}o(oz,"isElement");function uz(f){if(f==null)return!0;if(Os(f)&&(Ft(f)||typeof f=="string"||typeof f.splice=="function"||ju(f)||bp(f)||Gl(f)))return!f.length;var p=cs(f);if(p==Ae||p==Dr)return!f.size;if(xg(f))return!J2(f).length;for(var x in f)if(Cr.call(f,x))return!1;return!0}o(uz,"isEmpty");function cz(f,p){return gg(f,p)}o(cz,"isEqual");function lz(f,p,x){x=typeof x=="function"?x:r;var D=x?x(f,p):r;return D===r?gg(f,p,r,x):!!D}o(lz,"isEqualWith");function SN(f){if(!an(f))return!1;var p=Es(f);return p==P||p==G||typeof f.message=="string"&&typeof f.name=="string"&&!Eg(f)}o(SN,"isError");function fz(f){return typeof f=="number"&&yP(f)}o(fz,"isFinite");function ko(f){if(!Qr(f))return!1;var p=Es(f);return p==Ee||p==Ce||p==rt||p==Yr}o(ko,"isFunction");function U3(f){return typeof f=="number"&&f==Kt(f)}o(U3,"isInteger");function Uw(f){return typeof f=="number"&&f>-1&&f%1==0&&f<=Y}o(Uw,"isLength");function Qr(f){var p=typeof f;return f!=null&&(p=="object"||p=="function")}o(Qr,"isObject");function an(f){return f!=null&&typeof f=="object"}o(an,"isObjectLike");var j3=ZO?ii(ZO):mG;function hz(f,p){return f===p||z2(f,p,hN(p))}o(hz,"isMatch");function pz(f,p,x){return x=typeof x=="function"?x:r,z2(f,p,hN(p),x)}o(pz,"isMatchWith");function dz(f){return F3(f)&&f!=+f}o(dz,"isNaN");function mz(f){if(QG(f))throw new Vt(n);return BP(f)}o(mz,"isNative");function gz(f){return f===null}o(gz,"isNull");function vz(f){return f==null}o(vz,"isNil");function F3(f){return typeof f=="number"||an(f)&&Es(f)==Ye}o(F3,"isNumber");function Eg(f){if(!an(f)||Es(f)!=Me)return!1;var p=fw(f);if(p===null)return!0;var x=Cr.call(p,"constructor")&&p.constructor;return typeof x=="function"&&x instanceof x&&ow.call(x)==p$}o(Eg,"isPlainObject");var bN=eP?ii(eP):gG;function yz(f){return U3(f)&&f>=-Y&&f<=Y}o(yz,"isSafeInteger");var M3=tP?ii(tP):vG;function jw(f){return typeof f=="string"||!Ft(f)&&an(f)&&Es(f)==Gr}o(jw,"isString");function oi(f){return typeof f=="symbol"||an(f)&&Es(f)==Nn}o(oi,"isSymbol");var bp=rP?ii(rP):yG;function xz(f){return f===r}o(xz,"isUndefined");function wz(f){return an(f)&&cs(f)==xs}o(wz,"isWeakMap");function Ez(f){return an(f)&&Es(f)==gt}o(Ez,"isWeakSet");var Sz=_w(Y2),bz=_w(function(f,p){return f<=p});function q3(f){if(!f)return[];if(Os(f))return jw(f)?sa(f):Rs(f);if(ug&&f[ug])return t$(f[ug]());var p=cs(f),x=p==Ae?U2:p==Dr?sw:Ap;return x(f)}o(q3,"toArray");function Lo(f){if(!f)return f===0?f:0;if(f=Di(f),f===ue||f===-ue){var p=f<0?-1:1;return p*ve}return f===f?f:0}o(Lo,"toFinite");function Kt(f){var p=Lo(f),x=p%1;return p===p?x?p-x:p:0}o(Kt,"toInteger");function H3(f){return f?ql(Kt(f),0,Je):0}o(H3,"toLength");function Di(f){if(typeof f=="number")return f;if(oi(f))return Oe;if(Qr(f)){var p=typeof f.valueOf=="function"?f.valueOf():f;f=Qr(p)?p+"":p}if(typeof f!="string")return f===0?f:+f;f=uP(f);var x=sK.test(f);return x||aK.test(f)?UK(f.slice(2),x?2:8):S2.test(f)?Oe:+f}o(Di,"toNumber");function K3(f){return Va(f,Ps(f))}o(K3,"toPlainObject");function Az(f){return f?ql(Kt(f),-Y,Y):f===0?f:0}o(Az,"toSafeInteger");function Sr(f){return f==null?"":ai(f)}o(Sr,"toString");var Cz=wp(function(f,p){if(xg(p)||Os(p)){Va(p,Pn(p),f);return}for(var x in p)Cr.call(p,x)&&pg(f,x,p[x])}),$3=wp(function(f,p){Va(p,Ps(p),f)}),Fw=wp(function(f,p,x,D){Va(p,Ps(p),f,D)}),Nz=wp(function(f,p,x,D){Va(p,Pn(p),f,D)}),Tz=Oo(K2);function Iz(f,p){var x=xp(f);return p==null?x:bP(x,p)}o(Iz,"create");var _z=Yt(function(f,p){f=Br(f);var x=-1,D=p.length,k=D>2?p[2]:r;for(k&&Ss(p[0],p[1],k)&&(D=1);++x<D;)for(var $=p[x],Q=Ps($),re=-1,me=Q.length;++re<me;){var _e=Q[re],Pe=f[_e];(Pe===r||aa(Pe,gp[_e])&&!Cr.call(f,_e))&&(f[_e]=$[_e])}return f}),Dz=Yt(function(f){return f.push(r,u3),si(G3,r,f)});function Bz(f,p){return sP(f,At(p,3),La)}o(Bz,"findKey");function Rz(f,p){return sP(f,At(p,3),G2)}o(Rz,"findLastKey");function Oz(f,p){return f==null?f:$2(f,At(p,3),Ps)}o(Oz,"forIn");function Pz(f,p){return f==null?f:IP(f,At(p,3),Ps)}o(Pz,"forInRight");function kz(f,p){return f&&La(f,At(p,3))}o(kz,"forOwn");function Lz(f,p){return f&&G2(f,At(p,3))}o(Lz,"forOwnRight");function Vz(f){return f==null?[]:Ew(f,Pn(f))}o(Vz,"functions");function Uz(f){return f==null?[]:Ew(f,Ps(f))}o(Uz,"functionsIn");function AN(f,p,x){var D=f==null?r:Hl(f,p);return D===r?x:D}o(AN,"get");function jz(f,p){return f!=null&&f3(f,p,uG)}o(jz,"has");function CN(f,p){return f!=null&&f3(f,p,cG)}o(CN,"hasIn");var Fz=n3(function(f,p,x){p!=null&&typeof p.toString!="function"&&(p=uw.call(p)),f[p]=x},TN(ks)),Mz=n3(function(f,p,x){p!=null&&typeof p.toString!="function"&&(p=uw.call(p)),Cr.call(f,p)?f[p].push(x):f[p]=[x]},At),qz=Yt(mg);function Pn(f){return Os(f)?EP(f):J2(f)}o(Pn,"keys");function Ps(f){return Os(f)?EP(f,!0):xG(f)}o(Ps,"keysIn");function Hz(f,p){var x={};return p=At(p,3),La(f,function(D,k,$){Bo(x,p(D,k,$),D)}),x}o(Hz,"mapKeys");function Kz(f,p){var x={};return p=At(p,3),La(f,function(D,k,$){Bo(x,k,p(D,k,$))}),x}o(Kz,"mapValues");var $z=wp(function(f,p,x){Sw(f,p,x)}),G3=wp(function(f,p,x,D){Sw(f,p,x,D)}),Gz=Oo(function(f,p){var x={};if(f==null)return x;var D=!1;p=Xr(p,function($){return $=Vu($,f),D||(D=$.length>1),$}),Va(f,lN(f),x),D&&(x=Ti(x,l|h|m,FG));for(var k=p.length;k--;)rN(x,p[k]);return x});function Xz(f,p){return X3(f,Vw(At(p)))}o(Xz,"omitBy");var Wz=Oo(function(f,p){return f==null?{}:EG(f,p)});function X3(f,p){if(f==null)return{};var x=Xr(lN(f),function(D){return[D]});return p=At(p),UP(f,x,function(D,k){return p(D,k[0])})}o(X3,"pickBy");function zz(f,p,x){p=Vu(p,f);var D=-1,k=p.length;for(k||(k=1,f=r);++D<k;){var $=f==null?r:f[Ua(p[D])];$===r&&(D=k,$=x),f=ko($)?$.call(f):$}return f}o(zz,"result");function Jz(f,p,x){return f==null?f:vg(f,p,x)}o(Jz,"set");function Yz(f,p,x,D){return D=typeof D=="function"?D:r,f==null?f:vg(f,p,x,D)}o(Yz,"setWith");var W3=a3(Pn),z3=a3(Ps);function Qz(f,p,x){var D=Ft(f),k=D||ju(f)||bp(f);if(p=At(p,4),x==null){var $=f&&f.constructor;k?x=D?new $:[]:Qr(f)?x=ko($)?xp(fw(f)):{}:x={}}return(k?Ai:La)(f,function(Q,re,me){return p(x,Q,re,me)}),x}o(Qz,"transform");function Zz(f,p){return f==null?!0:rN(f,p)}o(Zz,"unset");function eJ(f,p,x){return f==null?f:HP(f,p,iN(x))}o(eJ,"update");function tJ(f,p,x,D){return D=typeof D=="function"?D:r,f==null?f:HP(f,p,iN(x),D)}o(tJ,"updateWith");function Ap(f){return f==null?[]:V2(f,Pn(f))}o(Ap,"values");function rJ(f){return f==null?[]:V2(f,Ps(f))}o(rJ,"valuesIn");function nJ(f,p,x){return x===r&&(x=p,p=r),x!==r&&(x=Di(x),x=x===x?x:0),p!==r&&(p=Di(p),p=p===p?p:0),ql(Di(f),p,x)}o(nJ,"clamp");function sJ(f,p,x){return p=Lo(p),x===r?(x=p,p=0):x=Lo(x),f=Di(f),lG(f,p,x)}o(sJ,"inRange");function iJ(f,p,x){if(x&&typeof x!="boolean"&&Ss(f,p,x)&&(p=x=r),x===r&&(typeof p=="boolean"?(x=p,p=r):typeof f=="boolean"&&(x=f,f=r)),f===r&&p===r?(f=0,p=1):(f=Lo(f),p===r?(p=f,f=0):p=Lo(p)),f>p){var D=f;f=p,p=D}if(x||f%1||p%1){var k=xP();return us(f+k*(p-f+VK("1e-"+((k+"").length-1))),p)}return Z2(f,p)}o(iJ,"random");var aJ=Ep(function(f,p,x){return p=p.toLowerCase(),f+(x?J3(p):p)});function J3(f){return NN(Sr(f).toLowerCase())}o(J3,"capitalize");function Y3(f){return f=Sr(f),f&&f.replace(uK,JK).replace(TK,"")}o(Y3,"deburr");function oJ(f,p,x){f=Sr(f),p=ai(p);var D=f.length;x=x===r?D:ql(Kt(x),0,D);var k=x;return x-=p.length,x>=0&&f.slice(x,k)==p}o(oJ,"endsWith");function uJ(f){return f=Sr(f),f&&ut.test(f)?f.replace(le,YK):f}o(uJ,"escape");function cJ(f){return f=Sr(f),f&&ka.test(f)?f.replace(hr,"\\$&"):f}o(cJ,"escapeRegExp");var lJ=Ep(function(f,p,x){return f+(x?"-":"")+p.toLowerCase()}),fJ=Ep(function(f,p,x){return f+(x?" ":"")+p.toLowerCase()}),hJ=e3("toLowerCase");function pJ(f,p,x){f=Sr(f),p=Kt(p);var D=p?mp(f):0;if(!p||D>=p)return f;var k=(p-D)/2;return Iw(mw(k),x)+f+Iw(dw(k),x)}o(pJ,"pad");function dJ(f,p,x){f=Sr(f),p=Kt(p);var D=p?mp(f):0;return p&&D<p?f+Iw(p-D,x):f}o(dJ,"padEnd");function mJ(f,p,x){f=Sr(f),p=Kt(p);var D=p?mp(f):0;return p&&D<p?Iw(p-D,x)+f:f}o(mJ,"padStart");function gJ(f,p,x){return x||p==null?p=0:p&&(p=+p),b$(Sr(f).replace(ag,""),p||0)}o(gJ,"parseInt1");function vJ(f,p,x){return(x?Ss(f,p,x):p===r)?p=1:p=Kt(p),eN(Sr(f),p)}o(vJ,"repeat");function yJ(){var f=arguments,p=Sr(f[0]);return f.length<3?p:p.replace(f[1],f[2])}o(yJ,"replace");var xJ=Ep(function(f,p,x){return f+(x?"_":"")+p.toLowerCase()});function wJ(f,p,x){return x&&typeof x!="number"&&Ss(f,p,x)&&(p=x=r),x=x===r?Je:x>>>0,x?(f=Sr(f),f&&(typeof p=="string"||p!=null&&!bN(p))&&(p=ai(p),!p&&dp(f))?Uu(sa(f),0,x):f.split(p,x)):[]}o(wJ,"split");var EJ=Ep(function(f,p,x){return f+(x?" ":"")+NN(p)});function SJ(f,p,x){return f=Sr(f),x=x==null?0:ql(Kt(x),0,f.length),p=ai(p),f.slice(x,x+p.length)==p}o(SJ,"startsWith");function bJ(f,p,x){var D=F.templateSettings;x&&Ss(f,p,x)&&(p=r),f=Sr(f),p=Fw({},p,D,o3);var k=Fw({},p.imports,D.imports,o3),$=Pn(k),Q=V2(k,$),re,me,_e=0,Pe=p.interpolate||Zx,Fe="__p += '",nt=j2((p.escape||Zx).source+"|"+Pe.source+"|"+(Pe===it?os:Zx).source+"|"+(p.evaluate||Zx).source+"|$","g"),mt="//# sourceURL="+(Cr.call(p,"sourceURL")?(p.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++RK+"]")+`
|
|
30
|
-
`;f.replace(nt,function(_t,Zt,or,ui,bs,ci){return or||(or=ui),Fe+=f.slice(_e,ci).replace(cK,QK),Zt&&(re=!0,Fe+=`' +
|
|
31
|
-
__e(`+Zt+`) +
|
|
32
|
-
'`),bs&&(me=!0,Fe+=`';
|
|
33
|
-
`+bs+`;
|
|
34
|
-
__p += '`),or&&(Fe+=`' +
|
|
35
|
-
((__t = (`+or+`)) == null ? '' : __t) +
|
|
36
|
-
'`),_e=ci+_t.length,_t}),Fe+=`';
|
|
37
|
-
`;var It=Cr.call(p,"variable")&&p.variable;if(!It)Fe=`with (obj) {
|
|
38
|
-
`+Fe+`
|
|
39
|
-
}
|
|
40
|
-
`;else if(Xe.test(It))throw new Vt(i);Fe=(me?Fe.replace(d,""):Fe).replace(R,"$1").replace(X,"$1;"),Fe="function("+(It||"obj")+`) {
|
|
41
|
-
`+(It?"":`obj || (obj = {});
|
|
42
|
-
`)+"var __t, __p = ''"+(re?", __e = _.escape":"")+(me?`, __j = Array.prototype.join;
|
|
43
|
-
function print() { __p += __j.call(arguments, '') }
|
|
44
|
-
`:`;
|
|
45
|
-
`)+Fe+`return __p
|
|
46
|
-
}`;var Wt=Z3(function(){return Er($,mt+"return "+Fe).apply(r,Q)});if(Wt.source=Fe,SN(Wt))throw Wt;return Wt}o(bJ,"template");function AJ(f){return Sr(f).toLowerCase()}o(AJ,"toLower");function CJ(f){return Sr(f).toUpperCase()}o(CJ,"toUpper");function NJ(f,p,x){if(f=Sr(f),f&&(x||p===r))return uP(f);if(!f||!(p=ai(p)))return f;var D=sa(f),k=sa(p),$=cP(D,k),Q=lP(D,k)+1;return Uu(D,$,Q).join("")}o(NJ,"trim");function TJ(f,p,x){if(f=Sr(f),f&&(x||p===r))return f.slice(0,hP(f)+1);if(!f||!(p=ai(p)))return f;var D=sa(f),k=lP(D,sa(p))+1;return Uu(D,0,k).join("")}o(TJ,"trimEnd");function IJ(f,p,x){if(f=Sr(f),f&&(x||p===r))return f.replace(ag,"");if(!f||!(p=ai(p)))return f;var D=sa(f),k=cP(D,sa(p));return Uu(D,k).join("")}o(IJ,"trimStart");function _J(f,p){var x=I,D=H;if(Qr(p)){var k="separator"in p?p.separator:k;x="length"in p?Kt(p.length):x,D="omission"in p?ai(p.omission):D}f=Sr(f);var $=f.length;if(dp(f)){var Q=sa(f);$=Q.length}if(x>=$)return f;var re=x-mp(D);if(re<1)return D;var me=Q?Uu(Q,0,re).join(""):f.slice(0,re);if(k===r)return me+D;if(Q&&(re+=me.length-re),bN(k)){if(f.slice(re).search(k)){var _e,Pe=me;for(k.global||(k=j2(k.source,Sr(na.exec(k))+"g")),k.lastIndex=0;_e=k.exec(Pe);)var Fe=_e.index;me=me.slice(0,Fe===r?re:Fe)}}else if(f.indexOf(ai(k),re)!=re){var nt=me.lastIndexOf(k);nt>-1&&(me=me.slice(0,nt))}return me+D}o(_J,"truncate");function DJ(f){return f=Sr(f),f&&z.test(f)?f.replace(ae,i$):f}o(DJ,"unescape");var BJ=Ep(function(f,p,x){return f+(x?" ":"")+p.toUpperCase()}),NN=e3("toUpperCase");function Q3(f,p,x){return f=Sr(f),p=x?r:p,p===r?e$(f)?u$(f):$K(f):f.match(p)||[]}o(Q3,"words");var Z3=Yt(function(f,p){try{return si(f,r,p)}catch(x){return SN(x)?x:new Vt(x)}}),RJ=Oo(function(f,p){return Ai(p,function(x){x=Ua(x),Bo(f,x,wN(f[x],f))}),f});function OJ(f){var p=f==null?0:f.length,x=At();return f=p?Xr(f,function(D){if(typeof D[1]!="function")throw new Ci(s);return[x(D[0]),D[1]]}):[],Yt(function(D){for(var k=-1;++k<p;){var $=f[k];if(si($[0],this,D))return si($[1],this,D)}})}o(OJ,"cond");function PJ(f){return iG(Ti(f,l))}o(PJ,"conforms");function TN(f){return function(){return f}}o(TN,"constant");function kJ(f,p){return f==null||f!==f?p:f}o(kJ,"defaultTo");var LJ=r3(),VJ=r3(!0);function ks(f){return f}o(ks,"identity");function IN(f){return RP(typeof f=="function"?f:Ti(f,l))}o(IN,"iteratee");function UJ(f){return PP(Ti(f,l))}o(UJ,"matches");function jJ(f,p){return kP(f,Ti(p,l))}o(jJ,"matchesProperty");var FJ=Yt(function(f,p){return function(x){return mg(x,f,p)}}),MJ=Yt(function(f,p){return function(x){return mg(f,x,p)}});function _N(f,p,x){var D=Pn(p),k=Ew(p,D);x==null&&!(Qr(p)&&(k.length||!D.length))&&(x=p,p=f,f=this,k=Ew(p,Pn(p)));var $=!(Qr(x)&&"chain"in x)||!!x.chain,Q=ko(f);return Ai(k,function(re){var me=p[re];f[re]=me,Q&&(f.prototype[re]=function(){var _e=this.__chain__;if($||_e){var Pe=f(this.__wrapped__),Fe=Pe.__actions__=Rs(this.__actions__);return Fe.push({func:me,args:arguments,thisArg:f}),Pe.__chain__=_e,Pe}return me.apply(f,Bu([this.value()],arguments))})}),f}o(_N,"mixin");function qJ(){return On._===this&&(On._=d$),this}o(qJ,"noConflict");function DN(){}o(DN,"noop");function HJ(f){return f=Kt(f),Yt(function(p){return LP(p,f)})}o(HJ,"nthArg");var KJ=oN(Xr),$J=oN(nP),GJ=oN(R2);function ek(f){return dN(f)?O2(Ua(f)):SG(f)}o(ek,"property");function XJ(f){return function(p){return f==null?r:Hl(f,p)}}o(XJ,"propertyOf");var WJ=s3(),zJ=s3(!0);function BN(){return[]}o(BN,"stubArray");function RN(){return!1}o(RN,"stubFalse");function JJ(){return{}}o(JJ,"stubObject");function YJ(){return""}o(YJ,"stubString");function QJ(){return!0}o(QJ,"stubTrue");function ZJ(f,p){if(f=Kt(f),f<1||f>Y)return[];var x=Je,D=us(f,Je);p=At(p),f-=Je;for(var k=L2(D,p);++x<f;)p(x);return k}o(ZJ,"times");function eY(f){return Ft(f)?Xr(f,Ua):oi(f)?[f]:Rs(w3(Sr(f)))}o(eY,"toPath");function tY(f){var p=++h$;return Sr(f)+p}o(tY,"uniqueId");var rY=Tw(function(f,p){return f+p},0),nY=uN("ceil"),sY=Tw(function(f,p){return f/p},1),iY=uN("floor");function aY(f){return f&&f.length?ww(f,ks,X2):r}o(aY,"max");function oY(f,p){return f&&f.length?ww(f,At(p,2),X2):r}o(oY,"maxBy");function uY(f){return aP(f,ks)}o(uY,"mean");function cY(f,p){return aP(f,At(p,2))}o(cY,"meanBy");function lY(f){return f&&f.length?ww(f,ks,Y2):r}o(lY,"min");function fY(f,p){return f&&f.length?ww(f,At(p,2),Y2):r}o(fY,"minBy");var hY=Tw(function(f,p){return f*p},1),pY=uN("round"),dY=Tw(function(f,p){return f-p},0);function mY(f){return f&&f.length?k2(f,ks):0}o(mY,"sum");function gY(f,p){return f&&f.length?k2(f,At(p,2)):0}return o(gY,"sumBy"),F.after=UW,F.ary=B3,F.assign=Cz,F.assignIn=$3,F.assignInWith=Fw,F.assignWith=Nz,F.at=Tz,F.before=R3,F.bind=wN,F.bindAll=RJ,F.bindKey=O3,F.castArray=JW,F.chain=I3,F.chunk=iX,F.compact=aX,F.concat=oX,F.cond=OJ,F.conforms=PJ,F.constant=TN,F.countBy=mW,F.create=Iz,F.curry=P3,F.curryRight=k3,F.debounce=L3,F.defaults=_z,F.defaultsDeep=Dz,F.defer=jW,F.delay=FW,F.difference=uX,F.differenceBy=cX,F.differenceWith=lX,F.drop=fX,F.dropRight=hX,F.dropRightWhile=pX,F.dropWhile=dX,F.fill=mX,F.filter=vW,F.flatMap=wW,F.flatMapDeep=EW,F.flatMapDepth=SW,F.flatten=A3,F.flattenDeep=gX,F.flattenDepth=vX,F.flip=MW,F.flow=LJ,F.flowRight=VJ,F.fromPairs=yX,F.functions=Vz,F.functionsIn=Uz,F.groupBy=bW,F.initial=wX,F.intersection=EX,F.intersectionBy=SX,F.intersectionWith=bX,F.invert=Fz,F.invertBy=Mz,F.invokeMap=CW,F.iteratee=IN,F.keyBy=NW,F.keys=Pn,F.keysIn=Ps,F.map=Pw,F.mapKeys=Hz,F.mapValues=Kz,F.matches=UJ,F.matchesProperty=jJ,F.memoize=Lw,F.merge=$z,F.mergeWith=G3,F.method=FJ,F.methodOf=MJ,F.mixin=_N,F.negate=Vw,F.nthArg=HJ,F.omit=Gz,F.omitBy=Xz,F.once=qW,F.orderBy=TW,F.over=KJ,F.overArgs=HW,F.overEvery=$J,F.overSome=GJ,F.partial=EN,F.partialRight=V3,F.partition=IW,F.pick=Wz,F.pickBy=X3,F.property=ek,F.propertyOf=XJ,F.pull=TX,F.pullAll=N3,F.pullAllBy=IX,F.pullAllWith=_X,F.pullAt=DX,F.range=WJ,F.rangeRight=zJ,F.rearg=KW,F.reject=BW,F.remove=BX,F.rest=$W,F.reverse=yN,F.sampleSize=OW,F.set=Jz,F.setWith=Yz,F.shuffle=PW,F.slice=RX,F.sortBy=VW,F.sortedUniq=jX,F.sortedUniqBy=FX,F.split=wJ,F.spread=GW,F.tail=MX,F.take=qX,F.takeRight=HX,F.takeRightWhile=KX,F.takeWhile=$X,F.tap=aW,F.throttle=XW,F.thru=Ow,F.toArray=q3,F.toPairs=W3,F.toPairsIn=z3,F.toPath=eY,F.toPlainObject=K3,F.transform=Qz,F.unary=WW,F.union=GX,F.unionBy=XX,F.unionWith=WX,F.uniq=zX,F.uniqBy=JX,F.uniqWith=YX,F.unset=Zz,F.unzip=xN,F.unzipWith=T3,F.update=eJ,F.updateWith=tJ,F.values=Ap,F.valuesIn=rJ,F.without=QX,F.words=Q3,F.wrap=zW,F.xor=ZX,F.xorBy=eW,F.xorWith=tW,F.zip=rW,F.zipObject=nW,F.zipObjectDeep=sW,F.zipWith=iW,F.entries=W3,F.entriesIn=z3,F.extend=$3,F.extendWith=Fw,_N(F,F),F.add=rY,F.attempt=Z3,F.camelCase=aJ,F.capitalize=J3,F.ceil=nY,F.clamp=nJ,F.clone=YW,F.cloneDeep=ZW,F.cloneDeepWith=ez,F.cloneWith=QW,F.conformsTo=tz,F.deburr=Y3,F.defaultTo=kJ,F.divide=sY,F.endsWith=oJ,F.eq=aa,F.escape=uJ,F.escapeRegExp=cJ,F.every=gW,F.find=yW,F.findIndex=S3,F.findKey=Bz,F.findLast=xW,F.findLastIndex=b3,F.findLastKey=Rz,F.floor=iY,F.forEach=_3,F.forEachRight=D3,F.forIn=Oz,F.forInRight=Pz,F.forOwn=kz,F.forOwnRight=Lz,F.get=AN,F.gt=rz,F.gte=nz,F.has=jz,F.hasIn=CN,F.head=C3,F.identity=ks,F.includes=AW,F.indexOf=xX,F.inRange=sJ,F.invoke=qz,F.isArguments=Gl,F.isArray=Ft,F.isArrayBuffer=sz,F.isArrayLike=Os,F.isArrayLikeObject=dn,F.isBoolean=iz,F.isBuffer=ju,F.isDate=az,F.isElement=oz,F.isEmpty=uz,F.isEqual=cz,F.isEqualWith=lz,F.isError=SN,F.isFinite=fz,F.isFunction=ko,F.isInteger=U3,F.isLength=Uw,F.isMap=j3,F.isMatch=hz,F.isMatchWith=pz,F.isNaN=dz,F.isNative=mz,F.isNil=vz,F.isNull=gz,F.isNumber=F3,F.isObject=Qr,F.isObjectLike=an,F.isPlainObject=Eg,F.isRegExp=bN,F.isSafeInteger=yz,F.isSet=M3,F.isString=jw,F.isSymbol=oi,F.isTypedArray=bp,F.isUndefined=xz,F.isWeakMap=wz,F.isWeakSet=Ez,F.join=AX,F.kebabCase=lJ,F.last=_i,F.lastIndexOf=CX,F.lowerCase=fJ,F.lowerFirst=hJ,F.lt=Sz,F.lte=bz,F.max=aY,F.maxBy=oY,F.mean=uY,F.meanBy=cY,F.min=lY,F.minBy=fY,F.stubArray=BN,F.stubFalse=RN,F.stubObject=JJ,F.stubString=YJ,F.stubTrue=QJ,F.multiply=hY,F.nth=NX,F.noConflict=qJ,F.noop=DN,F.now=kw,F.pad=pJ,F.padEnd=dJ,F.padStart=mJ,F.parseInt=gJ,F.random=iJ,F.reduce=_W,F.reduceRight=DW,F.repeat=vJ,F.replace=yJ,F.result=zz,F.round=pY,F.runInContext=ce,F.sample=RW,F.size=kW,F.snakeCase=xJ,F.some=LW,F.sortedIndex=OX,F.sortedIndexBy=PX,F.sortedIndexOf=kX,F.sortedLastIndex=LX,F.sortedLastIndexBy=VX,F.sortedLastIndexOf=UX,F.startCase=EJ,F.startsWith=SJ,F.subtract=dY,F.sum=mY,F.sumBy=gY,F.template=bJ,F.times=ZJ,F.toFinite=Lo,F.toInteger=Kt,F.toLength=H3,F.toLower=AJ,F.toNumber=Di,F.toSafeInteger=Az,F.toString=Sr,F.toUpper=CJ,F.trim=NJ,F.trimEnd=TJ,F.trimStart=IJ,F.truncate=_J,F.unescape=DJ,F.uniqueId=tY,F.upperCase=BJ,F.upperFirst=NN,F.each=_3,F.eachRight=D3,F.first=C3,_N(F,(function(){var f={};return La(F,function(p,x){Cr.call(F.prototype,x)||(f[x]=p)}),f})(),{chain:!1}),F.VERSION=e,Ai(["bind","bindKey","curry","curryRight","partial","partialRight"],function(f){F[f].placeholder=F}),Ai(["drop","take"],function(f,p){ir.prototype[f]=function(x){x=x===r?1:In(Kt(x),0);var D=this.__filtered__&&!p?new ir(this):this.clone();return D.__filtered__?D.__takeCount__=us(x,D.__takeCount__):D.__views__.push({size:us(x,Je),type:f+(D.__dir__<0?"Right":"")}),D},ir.prototype[f+"Right"]=function(x){return this.reverse()[f](x).reverse()}}),Ai(["filter","map","takeWhile"],function(f,p){var x=p+1,D=x==W||x==pe;ir.prototype[f]=function(k){var $=this.clone();return $.__iteratees__.push({iteratee:At(k,3),type:x}),$.__filtered__=$.__filtered__||D,$}}),Ai(["head","last"],function(f,p){var x="take"+(p?"Right":"");ir.prototype[f]=function(){return this[x](1).value()[0]}}),Ai(["initial","tail"],function(f,p){var x="drop"+(p?"":"Right");ir.prototype[f]=function(){return this.__filtered__?new ir(this):this[x](1)}}),ir.prototype.compact=function(){return this.filter(ks)},ir.prototype.find=function(f){return this.filter(f).head()},ir.prototype.findLast=function(f){return this.reverse().find(f)},ir.prototype.invokeMap=Yt(function(f,p){return typeof f=="function"?new ir(this):this.map(function(x){return mg(x,f,p)})}),ir.prototype.reject=function(f){return this.filter(Vw(At(f)))},ir.prototype.slice=function(f,p){f=Kt(f);var x=this;return x.__filtered__&&(f>0||p<0)?new ir(x):(f<0?x=x.takeRight(-f):f&&(x=x.drop(f)),p!==r&&(p=Kt(p),x=p<0?x.dropRight(-p):x.take(p-f)),x)},ir.prototype.takeRightWhile=function(f){return this.reverse().takeWhile(f).reverse()},ir.prototype.toArray=function(){return this.take(Je)},La(ir.prototype,function(f,p){var x=/^(?:filter|find|map|reject)|While$/.test(p),D=/^(?:head|last)$/.test(p),k=F[D?"take"+(p=="last"?"Right":""):p],$=D||/^find/.test(p);k&&(F.prototype[p]=function(){var Q=this.__wrapped__,re=D?[1]:arguments,me=Q instanceof ir,_e=re[0],Pe=me||Ft(Q),Fe=o(function(Zt){var or=k.apply(F,Bu([Zt],re));return D&&nt?or[0]:or},"interceptor");Pe&&x&&typeof _e=="function"&&_e.length!=1&&(me=Pe=!1);var nt=this.__chain__,mt=!!this.__actions__.length,It=$&&!nt,Wt=me&&!mt;if(!$&&Pe){Q=Wt?Q:new ir(this);var _t=f.apply(Q,re);return _t.__actions__.push({func:Ow,args:[Fe],thisArg:r}),new Ni(_t,nt)}return It&&Wt?f.apply(this,re):(_t=this.thru(Fe),It?D?_t.value()[0]:_t.value():_t)})}),Ai(["pop","push","shift","sort","splice","unshift"],function(f){var p=iw[f],x=/^(?:push|sort|unshift)$/.test(f)?"tap":"thru",D=/^(?:pop|shift)$/.test(f);F.prototype[f]=function(){var k=arguments;if(D&&!this.__chain__){var $=this.value();return p.apply(Ft($)?$:[],k)}return this[x](function(Q){return p.apply(Ft(Q)?Q:[],k)})}}),La(ir.prototype,function(f,p){var x=F[p];if(x){var D=x.name+"";Cr.call(yp,D)||(yp[D]=[]),yp[D].push({name:p,func:x})}}),yp[Nw(r,E).name]=[{name:"wrapper",func:r}],ir.prototype.clone=D$,ir.prototype.reverse=B$,ir.prototype.value=R$,F.prototype.at=oW,F.prototype.chain=uW,F.prototype.commit=cW,F.prototype.next=lW,F.prototype.plant=hW,F.prototype.reverse=pW,F.prototype.toJSON=F.prototype.valueOf=F.prototype.value=dW,F.prototype.first=F.prototype.head,ug&&(F.prototype[ug]=fW),F},"runInContext"),Ou=c$();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(On._=Ou,define(function(){return Ou})):Ul?((Ul.exports=Ou)._=Ou,I2._=Ou):On._=Ou}).call(zp)});var s8=te((A1e,n8)=>{"use strict";var r8=Ge("stream").Stream,Cre=Ge("util");n8.exports=ha;function ha(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}o(ha,"DelayedStream");Cre.inherits(ha,r8);ha.create=function(r,e){var t=new this;e=e||{};for(var n in e)t[n]=e[n];t.source=r;var s=r.emit;return r.emit=function(){return t._handleEmit(arguments),s.apply(r,arguments)},r.on("error",function(){}),t.pauseStream&&r.pause(),t};Object.defineProperty(ha.prototype,"readable",{configurable:!0,enumerable:!0,get:o(function(){return this.source.readable},"get")});ha.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};ha.prototype.resume=function(){this._released||this.release(),this.source.resume()};ha.prototype.pause=function(){this.source.pause()};ha.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach((function(r){this.emit.apply(this,r)}).bind(this)),this._bufferedEvents=[]};ha.prototype.pipe=function(){var r=r8.prototype.pipe.apply(this,arguments);return this.resume(),r};ha.prototype._handleEmit=function(r){if(this._released){this.emit.apply(this,r);return}r[0]==="data"&&(this.dataSize+=r[1].length,this._checkIfMaxDataSizeExceeded()),this._bufferedEvents.push(r)};ha.prototype._checkIfMaxDataSizeExceeded=function(){if(!this._maxDataSizeExceeded&&!(this.dataSize<=this.maxDataSize)){this._maxDataSizeExceeded=!0;var r="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",new Error(r))}}});var YT=te((N1e,o8)=>{"use strict";var Nre=Ge("util"),a8=Ge("stream").Stream,i8=s8();o8.exports=un;function un(){this.writable=!1,this.readable=!0,this.dataSize=0,this.maxDataSize=2*1024*1024,this.pauseStreams=!0,this._released=!1,this._streams=[],this._currentStream=null,this._insideLoop=!1,this._pendingNext=!1}o(un,"CombinedStream");Nre.inherits(un,a8);un.create=function(r){var e=new this;r=r||{};for(var t in r)e[t]=r[t];return e};un.isStreamLike=function(r){return typeof r!="function"&&typeof r!="string"&&typeof r!="boolean"&&typeof r!="number"&&!Buffer.isBuffer(r)};un.prototype.append=function(r){var e=un.isStreamLike(r);if(e){if(!(r instanceof i8)){var t=i8.create(r,{maxDataSize:1/0,pauseStream:this.pauseStreams});r.on("data",this._checkDataSize.bind(this)),r=t}this._handleErrors(r),this.pauseStreams&&r.pause()}return this._streams.push(r),this};un.prototype.pipe=function(r,e){return a8.prototype.pipe.call(this,r,e),this.resume(),r};un.prototype._getNext=function(){if(this._currentStream=null,this._insideLoop){this._pendingNext=!0;return}this._insideLoop=!0;try{do this._pendingNext=!1,this._realGetNext();while(this._pendingNext)}finally{this._insideLoop=!1}};un.prototype._realGetNext=function(){var r=this._streams.shift();if(typeof r>"u"){this.end();return}if(typeof r!="function"){this._pipeNext(r);return}var e=r;e((function(t){var n=un.isStreamLike(t);n&&(t.on("data",this._checkDataSize.bind(this)),this._handleErrors(t)),this._pipeNext(t)}).bind(this))};un.prototype._pipeNext=function(r){this._currentStream=r;var e=un.isStreamLike(r);if(e){r.on("end",this._getNext.bind(this)),r.pipe(this,{end:!1});return}var t=r;this.write(t),this._getNext()};un.prototype._handleErrors=function(r){var e=this;r.on("error",function(t){e._emitError(t)})};un.prototype.write=function(r){this.emit("data",r)};un.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"))};un.prototype.resume=function(){this._released||(this._released=!0,this.writable=!0,this._getNext()),this.pauseStreams&&this._currentStream&&typeof this._currentStream.resume=="function"&&this._currentStream.resume(),this.emit("resume")};un.prototype.end=function(){this._reset(),this.emit("end")};un.prototype.destroy=function(){this._reset(),this.emit("close")};un.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};un.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var r="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(r))}};un.prototype._updateDataSize=function(){this.dataSize=0;var r=this;this._streams.forEach(function(e){e.dataSize&&(r.dataSize+=e.dataSize)}),this._currentStream&&this._currentStream.dataSize&&(this.dataSize+=this._currentStream.dataSize)};un.prototype._emitError=function(r){this._reset(),this.emit("error",r)}});var u8=te((I1e,Tre)=>{Tre.exports={"application/1d-interleaved-parityfec":{source:"iana"},"application/3gpdash-qoe-report+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/3gpp-ims+xml":{source:"iana",compressible:!0},"application/3gpphal+json":{source:"iana",compressible:!0},"application/3gpphalforms+json":{source:"iana",compressible:!0},"application/a2l":{source:"iana"},"application/ace+cbor":{source:"iana"},"application/activemessage":{source:"iana"},"application/activity+json":{source:"iana",compressible:!0},"application/alto-costmap+json":{source:"iana",compressible:!0},"application/alto-costmapfilter+json":{source:"iana",compressible:!0},"application/alto-directory+json":{source:"iana",compressible:!0},"application/alto-endpointcost+json":{source:"iana",compressible:!0},"application/alto-endpointcostparams+json":{source:"iana",compressible:!0},"application/alto-endpointprop+json":{source:"iana",compressible:!0},"application/alto-endpointpropparams+json":{source:"iana",compressible:!0},"application/alto-error+json":{source:"iana",compressible:!0},"application/alto-networkmap+json":{source:"iana",compressible:!0},"application/alto-networkmapfilter+json":{source:"iana",compressible:!0},"application/alto-updatestreamcontrol+json":{source:"iana",compressible:!0},"application/alto-updatestreamparams+json":{source:"iana",compressible:!0},"application/aml":{source:"iana"},"application/andrew-inset":{source:"iana",extensions:["ez"]},"application/applefile":{source:"iana"},"application/applixware":{source:"apache",extensions:["aw"]},"application/at+jwt":{source:"iana"},"application/atf":{source:"iana"},"application/atfx":{source:"iana"},"application/atom+xml":{source:"iana",compressible:!0,extensions:["atom"]},"application/atomcat+xml":{source:"iana",compressible:!0,extensions:["atomcat"]},"application/atomdeleted+xml":{source:"iana",compressible:!0,extensions:["atomdeleted"]},"application/atomicmail":{source:"iana"},"application/atomsvc+xml":{source:"iana",compressible:!0,extensions:["atomsvc"]},"application/atsc-dwd+xml":{source:"iana",compressible:!0,extensions:["dwd"]},"application/atsc-dynamic-event-message":{source:"iana"},"application/atsc-held+xml":{source:"iana",compressible:!0,extensions:["held"]},"application/atsc-rdt+json":{source:"iana",compressible:!0},"application/atsc-rsat+xml":{source:"iana",compressible:!0,extensions:["rsat"]},"application/atxml":{source:"iana"},"application/auth-policy+xml":{source:"iana",compressible:!0},"application/bacnet-xdd+zip":{source:"iana",compressible:!1},"application/batch-smtp":{source:"iana"},"application/bdoc":{compressible:!1,extensions:["bdoc"]},"application/beep+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/calendar+json":{source:"iana",compressible:!0},"application/calendar+xml":{source:"iana",compressible:!0,extensions:["xcs"]},"application/call-completion":{source:"iana"},"application/cals-1840":{source:"iana"},"application/captive+json":{source:"iana",compressible:!0},"application/cbor":{source:"iana"},"application/cbor-seq":{source:"iana"},"application/cccex":{source:"iana"},"application/ccmp+xml":{source:"iana",compressible:!0},"application/ccxml+xml":{source:"iana",compressible:!0,extensions:["ccxml"]},"application/cdfx+xml":{source:"iana",compressible:!0,extensions:["cdfx"]},"application/cdmi-capability":{source:"iana",extensions:["cdmia"]},"application/cdmi-container":{source:"iana",extensions:["cdmic"]},"application/cdmi-domain":{source:"iana",extensions:["cdmid"]},"application/cdmi-object":{source:"iana",extensions:["cdmio"]},"application/cdmi-queue":{source:"iana",extensions:["cdmiq"]},"application/cdni":{source:"iana"},"application/cea":{source:"iana"},"application/cea-2018+xml":{source:"iana",compressible:!0},"application/cellml+xml":{source:"iana",compressible:!0},"application/cfw":{source:"iana"},"application/city+json":{source:"iana",compressible:!0},"application/clr":{source:"iana"},"application/clue+xml":{source:"iana",compressible:!0},"application/clue_info+xml":{source:"iana",compressible:!0},"application/cms":{source:"iana"},"application/cnrp+xml":{source:"iana",compressible:!0},"application/coap-group+json":{source:"iana",compressible:!0},"application/coap-payload":{source:"iana"},"application/commonground":{source:"iana"},"application/conference-info+xml":{source:"iana",compressible:!0},"application/cose":{source:"iana"},"application/cose-key":{source:"iana"},"application/cose-key-set":{source:"iana"},"application/cpl+xml":{source:"iana",compressible:!0,extensions:["cpl"]},"application/csrattrs":{source:"iana"},"application/csta+xml":{source:"iana",compressible:!0},"application/cstadata+xml":{source:"iana",compressible:!0},"application/csvm+json":{source:"iana",compressible:!0},"application/cu-seeme":{source:"apache",extensions:["cu"]},"application/cwt":{source:"iana"},"application/cybercash":{source:"iana"},"application/dart":{compressible:!0},"application/dash+xml":{source:"iana",compressible:!0,extensions:["mpd"]},"application/dash-patch+xml":{source:"iana",compressible:!0,extensions:["mpp"]},"application/dashdelta":{source:"iana"},"application/davmount+xml":{source:"iana",compressible:!0,extensions:["davmount"]},"application/dca-rft":{source:"iana"},"application/dcd":{source:"iana"},"application/dec-dx":{source:"iana"},"application/dialog-info+xml":{source:"iana",compressible:!0},"application/dicom":{source:"iana"},"application/dicom+json":{source:"iana",compressible:!0},"application/dicom+xml":{source:"iana",compressible:!0},"application/dii":{source:"iana"},"application/dit":{source:"iana"},"application/dns":{source:"iana"},"application/dns+json":{source:"iana",compressible:!0},"application/dns-message":{source:"iana"},"application/docbook+xml":{source:"apache",compressible:!0,extensions:["dbk"]},"application/dots+cbor":{source:"iana"},"application/dskpp+xml":{source:"iana",compressible:!0},"application/dssc+der":{source:"iana",extensions:["dssc"]},"application/dssc+xml":{source:"iana",compressible:!0,extensions:["xdssc"]},"application/dvcs":{source:"iana"},"application/ecmascript":{source:"iana",compressible:!0,extensions:["es","ecma"]},"application/edi-consent":{source:"iana"},"application/edi-x12":{source:"iana",compressible:!1},"application/edifact":{source:"iana",compressible:!1},"application/efi":{source:"iana"},"application/elm+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/elm+xml":{source:"iana",compressible:!0},"application/emergencycalldata.cap+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/emergencycalldata.comment+xml":{source:"iana",compressible:!0},"application/emergencycalldata.control+xml":{source:"iana",compressible:!0},"application/emergencycalldata.deviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.ecall.msd":{source:"iana"},"application/emergencycalldata.providerinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.serviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.subscriberinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.veds+xml":{source:"iana",compressible:!0},"application/emma+xml":{source:"iana",compressible:!0,extensions:["emma"]},"application/emotionml+xml":{source:"iana",compressible:!0,extensions:["emotionml"]},"application/encaprtp":{source:"iana"},"application/epp+xml":{source:"iana",compressible:!0},"application/epub+zip":{source:"iana",compressible:!1,extensions:["epub"]},"application/eshop":{source:"iana"},"application/exi":{source:"iana",extensions:["exi"]},"application/expect-ct-report+json":{source:"iana",compressible:!0},"application/express":{source:"iana",extensions:["exp"]},"application/fastinfoset":{source:"iana"},"application/fastsoap":{source:"iana"},"application/fdt+xml":{source:"iana",compressible:!0,extensions:["fdt"]},"application/fhir+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/fhir+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/fido.trusted-apps+json":{compressible:!0},"application/fits":{source:"iana"},"application/flexfec":{source:"iana"},"application/font-sfnt":{source:"iana"},"application/font-tdpfr":{source:"iana",extensions:["pfr"]},"application/font-woff":{source:"iana",compressible:!1},"application/framework-attributes+xml":{source:"iana",compressible:!0},"application/geo+json":{source:"iana",compressible:!0,extensions:["geojson"]},"application/geo+json-seq":{source:"iana"},"application/geopackage+sqlite3":{source:"iana"},"application/geoxacml+xml":{source:"iana",compressible:!0},"application/gltf-buffer":{source:"iana"},"application/gml+xml":{source:"iana",compressible:!0,extensions:["gml"]},"application/gpx+xml":{source:"apache",compressible:!0,extensions:["gpx"]},"application/gxf":{source:"apache",extensions:["gxf"]},"application/gzip":{source:"iana",compressible:!1,extensions:["gz"]},"application/h224":{source:"iana"},"application/held+xml":{source:"iana",compressible:!0},"application/hjson":{extensions:["hjson"]},"application/http":{source:"iana"},"application/hyperstudio":{source:"iana",extensions:["stk"]},"application/ibe-key-request+xml":{source:"iana",compressible:!0},"application/ibe-pkg-reply+xml":{source:"iana",compressible:!0},"application/ibe-pp-data":{source:"iana"},"application/iges":{source:"iana"},"application/im-iscomposing+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/index":{source:"iana"},"application/index.cmd":{source:"iana"},"application/index.obj":{source:"iana"},"application/index.response":{source:"iana"},"application/index.vnd":{source:"iana"},"application/inkml+xml":{source:"iana",compressible:!0,extensions:["ink","inkml"]},"application/iotp":{source:"iana"},"application/ipfix":{source:"iana",extensions:["ipfix"]},"application/ipp":{source:"iana"},"application/isup":{source:"iana"},"application/its+xml":{source:"iana",compressible:!0,extensions:["its"]},"application/java-archive":{source:"apache",compressible:!1,extensions:["jar","war","ear"]},"application/java-serialized-object":{source:"apache",compressible:!1,extensions:["ser"]},"application/java-vm":{source:"apache",compressible:!1,extensions:["class"]},"application/javascript":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["js","mjs"]},"application/jf2feed+json":{source:"iana",compressible:!0},"application/jose":{source:"iana"},"application/jose+json":{source:"iana",compressible:!0},"application/jrd+json":{source:"iana",compressible:!0},"application/jscalendar+json":{source:"iana",compressible:!0},"application/json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["json","map"]},"application/json-patch+json":{source:"iana",compressible:!0},"application/json-seq":{source:"iana"},"application/json5":{extensions:["json5"]},"application/jsonml+json":{source:"apache",compressible:!0,extensions:["jsonml"]},"application/jwk+json":{source:"iana",compressible:!0},"application/jwk-set+json":{source:"iana",compressible:!0},"application/jwt":{source:"iana"},"application/kpml-request+xml":{source:"iana",compressible:!0},"application/kpml-response+xml":{source:"iana",compressible:!0},"application/ld+json":{source:"iana",compressible:!0,extensions:["jsonld"]},"application/lgr+xml":{source:"iana",compressible:!0,extensions:["lgr"]},"application/link-format":{source:"iana"},"application/load-control+xml":{source:"iana",compressible:!0},"application/lost+xml":{source:"iana",compressible:!0,extensions:["lostxml"]},"application/lostsync+xml":{source:"iana",compressible:!0},"application/lpf+zip":{source:"iana",compressible:!1},"application/lxf":{source:"iana"},"application/mac-binhex40":{source:"iana",extensions:["hqx"]},"application/mac-compactpro":{source:"apache",extensions:["cpt"]},"application/macwriteii":{source:"iana"},"application/mads+xml":{source:"iana",compressible:!0,extensions:["mads"]},"application/manifest+json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["webmanifest"]},"application/marc":{source:"iana",extensions:["mrc"]},"application/marcxml+xml":{source:"iana",compressible:!0,extensions:["mrcx"]},"application/mathematica":{source:"iana",extensions:["ma","nb","mb"]},"application/mathml+xml":{source:"iana",compressible:!0,extensions:["mathml"]},"application/mathml-content+xml":{source:"iana",compressible:!0},"application/mathml-presentation+xml":{source:"iana",compressible:!0},"application/mbms-associated-procedure-description+xml":{source:"iana",compressible:!0},"application/mbms-deregister+xml":{source:"iana",compressible:!0},"application/mbms-envelope+xml":{source:"iana",compressible:!0},"application/mbms-msk+xml":{source:"iana",compressible:!0},"application/mbms-msk-response+xml":{source:"iana",compressible:!0},"application/mbms-protection-description+xml":{source:"iana",compressible:!0},"application/mbms-reception-report+xml":{source:"iana",compressible:!0},"application/mbms-register+xml":{source:"iana",compressible:!0},"application/mbms-register-response+xml":{source:"iana",compressible:!0},"application/mbms-schedule+xml":{source:"iana",compressible:!0},"application/mbms-user-service-description+xml":{source:"iana",compressible:!0},"application/mbox":{source:"iana",extensions:["mbox"]},"application/media-policy-dataset+xml":{source:"iana",compressible:!0,extensions:["mpf"]},"application/media_control+xml":{source:"iana",compressible:!0},"application/mediaservercontrol+xml":{source:"iana",compressible:!0,extensions:["mscml"]},"application/merge-patch+json":{source:"iana",compressible:!0},"application/metalink+xml":{source:"apache",compressible:!0,extensions:["metalink"]},"application/metalink4+xml":{source:"iana",compressible:!0,extensions:["meta4"]},"application/mets+xml":{source:"iana",compressible:!0,extensions:["mets"]},"application/mf4":{source:"iana"},"application/mikey":{source:"iana"},"application/mipc":{source:"iana"},"application/missing-blocks+cbor-seq":{source:"iana"},"application/mmt-aei+xml":{source:"iana",compressible:!0,extensions:["maei"]},"application/mmt-usd+xml":{source:"iana",compressible:!0,extensions:["musd"]},"application/mods+xml":{source:"iana",compressible:!0,extensions:["mods"]},"application/moss-keys":{source:"iana"},"application/moss-signature":{source:"iana"},"application/mosskey-data":{source:"iana"},"application/mosskey-request":{source:"iana"},"application/mp21":{source:"iana",extensions:["m21","mp21"]},"application/mp4":{source:"iana",extensions:["mp4s","m4p"]},"application/mpeg4-generic":{source:"iana"},"application/mpeg4-iod":{source:"iana"},"application/mpeg4-iod-xmt":{source:"iana"},"application/mrb-consumer+xml":{source:"iana",compressible:!0},"application/mrb-publish+xml":{source:"iana",compressible:!0},"application/msc-ivr+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msc-mixer+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msword":{source:"iana",compressible:!1,extensions:["doc","dot"]},"application/mud+json":{source:"iana",compressible:!0},"application/multipart-core":{source:"iana"},"application/mxf":{source:"iana",extensions:["mxf"]},"application/n-quads":{source:"iana",extensions:["nq"]},"application/n-triples":{source:"iana",extensions:["nt"]},"application/nasdata":{source:"iana"},"application/news-checkgroups":{source:"iana",charset:"US-ASCII"},"application/news-groupinfo":{source:"iana",charset:"US-ASCII"},"application/news-transmission":{source:"iana"},"application/nlsml+xml":{source:"iana",compressible:!0},"application/node":{source:"iana",extensions:["cjs"]},"application/nss":{source:"iana"},"application/oauth-authz-req+jwt":{source:"iana"},"application/oblivious-dns-message":{source:"iana"},"application/ocsp-request":{source:"iana"},"application/ocsp-response":{source:"iana"},"application/octet-stream":{source:"iana",compressible:!1,extensions:["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"]},"application/oda":{source:"iana",extensions:["oda"]},"application/odm+xml":{source:"iana",compressible:!0},"application/odx":{source:"iana"},"application/oebps-package+xml":{source:"iana",compressible:!0,extensions:["opf"]},"application/ogg":{source:"iana",compressible:!1,extensions:["ogx"]},"application/omdoc+xml":{source:"apache",compressible:!0,extensions:["omdoc"]},"application/onenote":{source:"apache",extensions:["onetoc","onetoc2","onetmp","onepkg"]},"application/opc-nodeset+xml":{source:"iana",compressible:!0},"application/oscore":{source:"iana"},"application/oxps":{source:"iana",extensions:["oxps"]},"application/p21":{source:"iana"},"application/p21+zip":{source:"iana",compressible:!1},"application/p2p-overlay+xml":{source:"iana",compressible:!0,extensions:["relo"]},"application/parityfec":{source:"iana"},"application/passport":{source:"iana"},"application/patch-ops-error+xml":{source:"iana",compressible:!0,extensions:["xer"]},"application/pdf":{source:"iana",compressible:!1,extensions:["pdf"]},"application/pdx":{source:"iana"},"application/pem-certificate-chain":{source:"iana"},"application/pgp-encrypted":{source:"iana",compressible:!1,extensions:["pgp"]},"application/pgp-keys":{source:"iana",extensions:["asc"]},"application/pgp-signature":{source:"iana",extensions:["asc","sig"]},"application/pics-rules":{source:"apache",extensions:["prf"]},"application/pidf+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pidf-diff+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pkcs10":{source:"iana",extensions:["p10"]},"application/pkcs12":{source:"iana"},"application/pkcs7-mime":{source:"iana",extensions:["p7m","p7c"]},"application/pkcs7-signature":{source:"iana",extensions:["p7s"]},"application/pkcs8":{source:"iana",extensions:["p8"]},"application/pkcs8-encrypted":{source:"iana"},"application/pkix-attr-cert":{source:"iana",extensions:["ac"]},"application/pkix-cert":{source:"iana",extensions:["cer"]},"application/pkix-crl":{source:"iana",extensions:["crl"]},"application/pkix-pkipath":{source:"iana",extensions:["pkipath"]},"application/pkixcmp":{source:"iana",extensions:["pki"]},"application/pls+xml":{source:"iana",compressible:!0,extensions:["pls"]},"application/poc-settings+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/postscript":{source:"iana",compressible:!0,extensions:["ai","eps","ps"]},"application/ppsp-tracker+json":{source:"iana",compressible:!0},"application/problem+json":{source:"iana",compressible:!0},"application/problem+xml":{source:"iana",compressible:!0},"application/provenance+xml":{source:"iana",compressible:!0,extensions:["provx"]},"application/prs.alvestrand.titrax-sheet":{source:"iana"},"application/prs.cww":{source:"iana",extensions:["cww"]},"application/prs.cyn":{source:"iana",charset:"7-BIT"},"application/prs.hpub+zip":{source:"iana",compressible:!1},"application/prs.nprend":{source:"iana"},"application/prs.plucker":{source:"iana"},"application/prs.rdf-xml-crypt":{source:"iana"},"application/prs.xsf+xml":{source:"iana",compressible:!0},"application/pskc+xml":{source:"iana",compressible:!0,extensions:["pskcxml"]},"application/pvd+json":{source:"iana",compressible:!0},"application/qsig":{source:"iana"},"application/raml+yaml":{compressible:!0,extensions:["raml"]},"application/raptorfec":{source:"iana"},"application/rdap+json":{source:"iana",compressible:!0},"application/rdf+xml":{source:"iana",compressible:!0,extensions:["rdf","owl"]},"application/reginfo+xml":{source:"iana",compressible:!0,extensions:["rif"]},"application/relax-ng-compact-syntax":{source:"iana",extensions:["rnc"]},"application/remote-printing":{source:"iana"},"application/reputon+json":{source:"iana",compressible:!0},"application/resource-lists+xml":{source:"iana",compressible:!0,extensions:["rl"]},"application/resource-lists-diff+xml":{source:"iana",compressible:!0,extensions:["rld"]},"application/rfc+xml":{source:"iana",compressible:!0},"application/riscos":{source:"iana"},"application/rlmi+xml":{source:"iana",compressible:!0},"application/rls-services+xml":{source:"iana",compressible:!0,extensions:["rs"]},"application/route-apd+xml":{source:"iana",compressible:!0,extensions:["rapd"]},"application/route-s-tsid+xml":{source:"iana",compressible:!0,extensions:["sls"]},"application/route-usd+xml":{source:"iana",compressible:!0,extensions:["rusd"]},"application/rpki-ghostbusters":{source:"iana",extensions:["gbr"]},"application/rpki-manifest":{source:"iana",extensions:["mft"]},"application/rpki-publication":{source:"iana"},"application/rpki-roa":{source:"iana",extensions:["roa"]},"application/rpki-updown":{source:"iana"},"application/rsd+xml":{source:"apache",compressible:!0,extensions:["rsd"]},"application/rss+xml":{source:"apache",compressible:!0,extensions:["rss"]},"application/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"application/rtploopback":{source:"iana"},"application/rtx":{source:"iana"},"application/samlassertion+xml":{source:"iana",compressible:!0},"application/samlmetadata+xml":{source:"iana",compressible:!0},"application/sarif+json":{source:"iana",compressible:!0},"application/sarif-external-properties+json":{source:"iana",compressible:!0},"application/sbe":{source:"iana"},"application/sbml+xml":{source:"iana",compressible:!0,extensions:["sbml"]},"application/scaip+xml":{source:"iana",compressible:!0},"application/scim+json":{source:"iana",compressible:!0},"application/scvp-cv-request":{source:"iana",extensions:["scq"]},"application/scvp-cv-response":{source:"iana",extensions:["scs"]},"application/scvp-vp-request":{source:"iana",extensions:["spq"]},"application/scvp-vp-response":{source:"iana",extensions:["spp"]},"application/sdp":{source:"iana",extensions:["sdp"]},"application/secevent+jwt":{source:"iana"},"application/senml+cbor":{source:"iana"},"application/senml+json":{source:"iana",compressible:!0},"application/senml+xml":{source:"iana",compressible:!0,extensions:["senmlx"]},"application/senml-etch+cbor":{source:"iana"},"application/senml-etch+json":{source:"iana",compressible:!0},"application/senml-exi":{source:"iana"},"application/sensml+cbor":{source:"iana"},"application/sensml+json":{source:"iana",compressible:!0},"application/sensml+xml":{source:"iana",compressible:!0,extensions:["sensmlx"]},"application/sensml-exi":{source:"iana"},"application/sep+xml":{source:"iana",compressible:!0},"application/sep-exi":{source:"iana"},"application/session-info":{source:"iana"},"application/set-payment":{source:"iana"},"application/set-payment-initiation":{source:"iana",extensions:["setpay"]},"application/set-registration":{source:"iana"},"application/set-registration-initiation":{source:"iana",extensions:["setreg"]},"application/sgml":{source:"iana"},"application/sgml-open-catalog":{source:"iana"},"application/shf+xml":{source:"iana",compressible:!0,extensions:["shf"]},"application/sieve":{source:"iana",extensions:["siv","sieve"]},"application/simple-filter+xml":{source:"iana",compressible:!0},"application/simple-message-summary":{source:"iana"},"application/simplesymbolcontainer":{source:"iana"},"application/sipc":{source:"iana"},"application/slate":{source:"iana"},"application/smil":{source:"iana"},"application/smil+xml":{source:"iana",compressible:!0,extensions:["smi","smil"]},"application/smpte336m":{source:"iana"},"application/soap+fastinfoset":{source:"iana"},"application/soap+xml":{source:"iana",compressible:!0},"application/sparql-query":{source:"iana",extensions:["rq"]},"application/sparql-results+xml":{source:"iana",compressible:!0,extensions:["srx"]},"application/spdx+json":{source:"iana",compressible:!0},"application/spirits-event+xml":{source:"iana",compressible:!0},"application/sql":{source:"iana"},"application/srgs":{source:"iana",extensions:["gram"]},"application/srgs+xml":{source:"iana",compressible:!0,extensions:["grxml"]},"application/sru+xml":{source:"iana",compressible:!0,extensions:["sru"]},"application/ssdl+xml":{source:"apache",compressible:!0,extensions:["ssdl"]},"application/ssml+xml":{source:"iana",compressible:!0,extensions:["ssml"]},"application/stix+json":{source:"iana",compressible:!0},"application/swid+xml":{source:"iana",compressible:!0,extensions:["swidtag"]},"application/tamp-apex-update":{source:"iana"},"application/tamp-apex-update-confirm":{source:"iana"},"application/tamp-community-update":{source:"iana"},"application/tamp-community-update-confirm":{source:"iana"},"application/tamp-error":{source:"iana"},"application/tamp-sequence-adjust":{source:"iana"},"application/tamp-sequence-adjust-confirm":{source:"iana"},"application/tamp-status-query":{source:"iana"},"application/tamp-status-response":{source:"iana"},"application/tamp-update":{source:"iana"},"application/tamp-update-confirm":{source:"iana"},"application/tar":{compressible:!0},"application/taxii+json":{source:"iana",compressible:!0},"application/td+json":{source:"iana",compressible:!0},"application/tei+xml":{source:"iana",compressible:!0,extensions:["tei","teicorpus"]},"application/tetra_isi":{source:"iana"},"application/thraud+xml":{source:"iana",compressible:!0,extensions:["tfi"]},"application/timestamp-query":{source:"iana"},"application/timestamp-reply":{source:"iana"},"application/timestamped-data":{source:"iana",extensions:["tsd"]},"application/tlsrpt+gzip":{source:"iana"},"application/tlsrpt+json":{source:"iana",compressible:!0},"application/tnauthlist":{source:"iana"},"application/token-introspection+jwt":{source:"iana"},"application/toml":{compressible:!0,extensions:["toml"]},"application/trickle-ice-sdpfrag":{source:"iana"},"application/trig":{source:"iana",extensions:["trig"]},"application/ttml+xml":{source:"iana",compressible:!0,extensions:["ttml"]},"application/tve-trigger":{source:"iana"},"application/tzif":{source:"iana"},"application/tzif-leap":{source:"iana"},"application/ubjson":{compressible:!1,extensions:["ubj"]},"application/ulpfec":{source:"iana"},"application/urc-grpsheet+xml":{source:"iana",compressible:!0},"application/urc-ressheet+xml":{source:"iana",compressible:!0,extensions:["rsheet"]},"application/urc-targetdesc+xml":{source:"iana",compressible:!0,extensions:["td"]},"application/urc-uisocketdesc+xml":{source:"iana",compressible:!0},"application/vcard+json":{source:"iana",compressible:!0},"application/vcard+xml":{source:"iana",compressible:!0},"application/vemmi":{source:"iana"},"application/vividence.scriptfile":{source:"apache"},"application/vnd.1000minds.decision-model+xml":{source:"iana",compressible:!0,extensions:["1km"]},"application/vnd.3gpp-prose+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-prose-pc3ch+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-v2x-local-service-information":{source:"iana"},"application/vnd.3gpp.5gnas":{source:"iana"},"application/vnd.3gpp.access-transfer-events+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.bsf+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gmop+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gtpc":{source:"iana"},"application/vnd.3gpp.interworking-data":{source:"iana"},"application/vnd.3gpp.lpp":{source:"iana"},"application/vnd.3gpp.mc-signalling-ear":{source:"iana"},"application/vnd.3gpp.mcdata-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-payload":{source:"iana"},"application/vnd.3gpp.mcdata-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-signalling":{source:"iana"},"application/vnd.3gpp.mcdata-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-floor-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-signed+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-init-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-transmission-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mid-call+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ngap":{source:"iana"},"application/vnd.3gpp.pfcp":{source:"iana"},"application/vnd.3gpp.pic-bw-large":{source:"iana",extensions:["plb"]},"application/vnd.3gpp.pic-bw-small":{source:"iana",extensions:["psb"]},"application/vnd.3gpp.pic-bw-var":{source:"iana",extensions:["pvb"]},"application/vnd.3gpp.s1ap":{source:"iana"},"application/vnd.3gpp.sms":{source:"iana"},"application/vnd.3gpp.sms+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-ext+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.state-and-event-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ussd+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.bcmcsinfo+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.sms":{source:"iana"},"application/vnd.3gpp2.tcap":{source:"iana",extensions:["tcap"]},"application/vnd.3lightssoftware.imagescal":{source:"iana"},"application/vnd.3m.post-it-notes":{source:"iana",extensions:["pwn"]},"application/vnd.accpac.simply.aso":{source:"iana",extensions:["aso"]},"application/vnd.accpac.simply.imp":{source:"iana",extensions:["imp"]},"application/vnd.acucobol":{source:"iana",extensions:["acu"]},"application/vnd.acucorp":{source:"iana",extensions:["atc","acutc"]},"application/vnd.adobe.air-application-installer-package+zip":{source:"apache",compressible:!1,extensions:["air"]},"application/vnd.adobe.flash.movie":{source:"iana"},"application/vnd.adobe.formscentral.fcdt":{source:"iana",extensions:["fcdt"]},"application/vnd.adobe.fxp":{source:"iana",extensions:["fxp","fxpl"]},"application/vnd.adobe.partial-upload":{source:"iana"},"application/vnd.adobe.xdp+xml":{source:"iana",compressible:!0,extensions:["xdp"]},"application/vnd.adobe.xfdf":{source:"iana",extensions:["xfdf"]},"application/vnd.aether.imp":{source:"iana"},"application/vnd.afpc.afplinedata":{source:"iana"},"application/vnd.afpc.afplinedata-pagedef":{source:"iana"},"application/vnd.afpc.cmoca-cmresource":{source:"iana"},"application/vnd.afpc.foca-charset":{source:"iana"},"application/vnd.afpc.foca-codedfont":{source:"iana"},"application/vnd.afpc.foca-codepage":{source:"iana"},"application/vnd.afpc.modca":{source:"iana"},"application/vnd.afpc.modca-cmtable":{source:"iana"},"application/vnd.afpc.modca-formdef":{source:"iana"},"application/vnd.afpc.modca-mediummap":{source:"iana"},"application/vnd.afpc.modca-objectcontainer":{source:"iana"},"application/vnd.afpc.modca-overlay":{source:"iana"},"application/vnd.afpc.modca-pagesegment":{source:"iana"},"application/vnd.age":{source:"iana",extensions:["age"]},"application/vnd.ah-barcode":{source:"iana"},"application/vnd.ahead.space":{source:"iana",extensions:["ahead"]},"application/vnd.airzip.filesecure.azf":{source:"iana",extensions:["azf"]},"application/vnd.airzip.filesecure.azs":{source:"iana",extensions:["azs"]},"application/vnd.amadeus+json":{source:"iana",compressible:!0},"application/vnd.amazon.ebook":{source:"apache",extensions:["azw"]},"application/vnd.amazon.mobi8-ebook":{source:"iana"},"application/vnd.americandynamics.acc":{source:"iana",extensions:["acc"]},"application/vnd.amiga.ami":{source:"iana",extensions:["ami"]},"application/vnd.amundsen.maze+xml":{source:"iana",compressible:!0},"application/vnd.android.ota":{source:"iana"},"application/vnd.android.package-archive":{source:"apache",compressible:!1,extensions:["apk"]},"application/vnd.anki":{source:"iana"},"application/vnd.anser-web-certificate-issue-initiation":{source:"iana",extensions:["cii"]},"application/vnd.anser-web-funds-transfer-initiation":{source:"apache",extensions:["fti"]},"application/vnd.antix.game-component":{source:"iana",extensions:["atx"]},"application/vnd.apache.arrow.file":{source:"iana"},"application/vnd.apache.arrow.stream":{source:"iana"},"application/vnd.apache.thrift.binary":{source:"iana"},"application/vnd.apache.thrift.compact":{source:"iana"},"application/vnd.apache.thrift.json":{source:"iana"},"application/vnd.api+json":{source:"iana",compressible:!0},"application/vnd.aplextor.warrp+json":{source:"iana",compressible:!0},"application/vnd.apothekende.reservation+json":{source:"iana",compressible:!0},"application/vnd.apple.installer+xml":{source:"iana",compressible:!0,extensions:["mpkg"]},"application/vnd.apple.keynote":{source:"iana",extensions:["key"]},"application/vnd.apple.mpegurl":{source:"iana",extensions:["m3u8"]},"application/vnd.apple.numbers":{source:"iana",extensions:["numbers"]},"application/vnd.apple.pages":{source:"iana",extensions:["pages"]},"application/vnd.apple.pkpass":{compressible:!1,extensions:["pkpass"]},"application/vnd.arastra.swi":{source:"iana"},"application/vnd.aristanetworks.swi":{source:"iana",extensions:["swi"]},"application/vnd.artisan+json":{source:"iana",compressible:!0},"application/vnd.artsquare":{source:"iana"},"application/vnd.astraea-software.iota":{source:"iana",extensions:["iota"]},"application/vnd.audiograph":{source:"iana",extensions:["aep"]},"application/vnd.autopackage":{source:"iana"},"application/vnd.avalon+json":{source:"iana",compressible:!0},"application/vnd.avistar+xml":{source:"iana",compressible:!0},"application/vnd.balsamiq.bmml+xml":{source:"iana",compressible:!0,extensions:["bmml"]},"application/vnd.balsamiq.bmpr":{source:"iana"},"application/vnd.banana-accounting":{source:"iana"},"application/vnd.bbf.usp.error":{source:"iana"},"application/vnd.bbf.usp.msg":{source:"iana"},"application/vnd.bbf.usp.msg+json":{source:"iana",compressible:!0},"application/vnd.bekitzur-stech+json":{source:"iana",compressible:!0},"application/vnd.bint.med-content":{source:"iana"},"application/vnd.biopax.rdf+xml":{source:"iana",compressible:!0},"application/vnd.blink-idb-value-wrapper":{source:"iana"},"application/vnd.blueice.multipass":{source:"iana",extensions:["mpm"]},"application/vnd.bluetooth.ep.oob":{source:"iana"},"application/vnd.bluetooth.le.oob":{source:"iana"},"application/vnd.bmi":{source:"iana",extensions:["bmi"]},"application/vnd.bpf":{source:"iana"},"application/vnd.bpf3":{source:"iana"},"application/vnd.businessobjects":{source:"iana",extensions:["rep"]},"application/vnd.byu.uapi+json":{source:"iana",compressible:!0},"application/vnd.cab-jscript":{source:"iana"},"application/vnd.canon-cpdl":{source:"iana"},"application/vnd.canon-lips":{source:"iana"},"application/vnd.capasystems-pg+json":{source:"iana",compressible:!0},"application/vnd.cendio.thinlinc.clientconf":{source:"iana"},"application/vnd.century-systems.tcp_stream":{source:"iana"},"application/vnd.chemdraw+xml":{source:"iana",compressible:!0,extensions:["cdxml"]},"application/vnd.chess-pgn":{source:"iana"},"application/vnd.chipnuts.karaoke-mmd":{source:"iana",extensions:["mmd"]},"application/vnd.ciedi":{source:"iana"},"application/vnd.cinderella":{source:"iana",extensions:["cdy"]},"application/vnd.cirpack.isdn-ext":{source:"iana"},"application/vnd.citationstyles.style+xml":{source:"iana",compressible:!0,extensions:["csl"]},"application/vnd.claymore":{source:"iana",extensions:["cla"]},"application/vnd.cloanto.rp9":{source:"iana",extensions:["rp9"]},"application/vnd.clonk.c4group":{source:"iana",extensions:["c4g","c4d","c4f","c4p","c4u"]},"application/vnd.cluetrust.cartomobile-config":{source:"iana",extensions:["c11amc"]},"application/vnd.cluetrust.cartomobile-config-pkg":{source:"iana",extensions:["c11amz"]},"application/vnd.coffeescript":{source:"iana"},"application/vnd.collabio.xodocuments.document":{source:"iana"},"application/vnd.collabio.xodocuments.document-template":{source:"iana"},"application/vnd.collabio.xodocuments.presentation":{source:"iana"},"application/vnd.collabio.xodocuments.presentation-template":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet-template":{source:"iana"},"application/vnd.collection+json":{source:"iana",compressible:!0},"application/vnd.collection.doc+json":{source:"iana",compressible:!0},"application/vnd.collection.next+json":{source:"iana",compressible:!0},"application/vnd.comicbook+zip":{source:"iana",compressible:!1},"application/vnd.comicbook-rar":{source:"iana"},"application/vnd.commerce-battelle":{source:"iana"},"application/vnd.commonspace":{source:"iana",extensions:["csp"]},"application/vnd.contact.cmsg":{source:"iana",extensions:["cdbcmsg"]},"application/vnd.coreos.ignition+json":{source:"iana",compressible:!0},"application/vnd.cosmocaller":{source:"iana",extensions:["cmc"]},"application/vnd.crick.clicker":{source:"iana",extensions:["clkx"]},"application/vnd.crick.clicker.keyboard":{source:"iana",extensions:["clkk"]},"application/vnd.crick.clicker.palette":{source:"iana",extensions:["clkp"]},"application/vnd.crick.clicker.template":{source:"iana",extensions:["clkt"]},"application/vnd.crick.clicker.wordbank":{source:"iana",extensions:["clkw"]},"application/vnd.criticaltools.wbs+xml":{source:"iana",compressible:!0,extensions:["wbs"]},"application/vnd.cryptii.pipe+json":{source:"iana",compressible:!0},"application/vnd.crypto-shade-file":{source:"iana"},"application/vnd.cryptomator.encrypted":{source:"iana"},"application/vnd.cryptomator.vault":{source:"iana"},"application/vnd.ctc-posml":{source:"iana",extensions:["pml"]},"application/vnd.ctct.ws+xml":{source:"iana",compressible:!0},"application/vnd.cups-pdf":{source:"iana"},"application/vnd.cups-postscript":{source:"iana"},"application/vnd.cups-ppd":{source:"iana",extensions:["ppd"]},"application/vnd.cups-raster":{source:"iana"},"application/vnd.cups-raw":{source:"iana"},"application/vnd.curl":{source:"iana"},"application/vnd.curl.car":{source:"apache",extensions:["car"]},"application/vnd.curl.pcurl":{source:"apache",extensions:["pcurl"]},"application/vnd.cyan.dean.root+xml":{source:"iana",compressible:!0},"application/vnd.cybank":{source:"iana"},"application/vnd.cyclonedx+json":{source:"iana",compressible:!0},"application/vnd.cyclonedx+xml":{source:"iana",compressible:!0},"application/vnd.d2l.coursepackage1p0+zip":{source:"iana",compressible:!1},"application/vnd.d3m-dataset":{source:"iana"},"application/vnd.d3m-problem":{source:"iana"},"application/vnd.dart":{source:"iana",compressible:!0,extensions:["dart"]},"application/vnd.data-vision.rdz":{source:"iana",extensions:["rdz"]},"application/vnd.datapackage+json":{source:"iana",compressible:!0},"application/vnd.dataresource+json":{source:"iana",compressible:!0},"application/vnd.dbf":{source:"iana",extensions:["dbf"]},"application/vnd.debian.binary-package":{source:"iana"},"application/vnd.dece.data":{source:"iana",extensions:["uvf","uvvf","uvd","uvvd"]},"application/vnd.dece.ttml+xml":{source:"iana",compressible:!0,extensions:["uvt","uvvt"]},"application/vnd.dece.unspecified":{source:"iana",extensions:["uvx","uvvx"]},"application/vnd.dece.zip":{source:"iana",extensions:["uvz","uvvz"]},"application/vnd.denovo.fcselayout-link":{source:"iana",extensions:["fe_launch"]},"application/vnd.desmume.movie":{source:"iana"},"application/vnd.dir-bi.plate-dl-nosuffix":{source:"iana"},"application/vnd.dm.delegation+xml":{source:"iana",compressible:!0},"application/vnd.dna":{source:"iana",extensions:["dna"]},"application/vnd.document+json":{source:"iana",compressible:!0},"application/vnd.dolby.mlp":{source:"apache",extensions:["mlp"]},"application/vnd.dolby.mobile.1":{source:"iana"},"application/vnd.dolby.mobile.2":{source:"iana"},"application/vnd.doremir.scorecloud-binary-document":{source:"iana"},"application/vnd.dpgraph":{source:"iana",extensions:["dpg"]},"application/vnd.dreamfactory":{source:"iana",extensions:["dfac"]},"application/vnd.drive+json":{source:"iana",compressible:!0},"application/vnd.ds-keypoint":{source:"apache",extensions:["kpxx"]},"application/vnd.dtg.local":{source:"iana"},"application/vnd.dtg.local.flash":{source:"iana"},"application/vnd.dtg.local.html":{source:"iana"},"application/vnd.dvb.ait":{source:"iana",extensions:["ait"]},"application/vnd.dvb.dvbisl+xml":{source:"iana",compressible:!0},"application/vnd.dvb.dvbj":{source:"iana"},"application/vnd.dvb.esgcontainer":{source:"iana"},"application/vnd.dvb.ipdcdftnotifaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess2":{source:"iana"},"application/vnd.dvb.ipdcesgpdd":{source:"iana"},"application/vnd.dvb.ipdcroaming":{source:"iana"},"application/vnd.dvb.iptv.alfec-base":{source:"iana"},"application/vnd.dvb.iptv.alfec-enhancement":{source:"iana"},"application/vnd.dvb.notif-aggregate-root+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-container+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-generic+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-msglist+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-request+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-response+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-init+xml":{source:"iana",compressible:!0},"application/vnd.dvb.pfr":{source:"iana"},"application/vnd.dvb.service":{source:"iana",extensions:["svc"]},"application/vnd.dxr":{source:"iana"},"application/vnd.dynageo":{source:"iana",extensions:["geo"]},"application/vnd.dzr":{source:"iana"},"application/vnd.easykaraoke.cdgdownload":{source:"iana"},"application/vnd.ecdis-update":{source:"iana"},"application/vnd.ecip.rlp":{source:"iana"},"application/vnd.eclipse.ditto+json":{source:"iana",compressible:!0},"application/vnd.ecowin.chart":{source:"iana",extensions:["mag"]},"application/vnd.ecowin.filerequest":{source:"iana"},"application/vnd.ecowin.fileupdate":{source:"iana"},"application/vnd.ecowin.series":{source:"iana"},"application/vnd.ecowin.seriesrequest":{source:"iana"},"application/vnd.ecowin.seriesupdate":{source:"iana"},"application/vnd.efi.img":{source:"iana"},"application/vnd.efi.iso":{source:"iana"},"application/vnd.emclient.accessrequest+xml":{source:"iana",compressible:!0},"application/vnd.enliven":{source:"iana",extensions:["nml"]},"application/vnd.enphase.envoy":{source:"iana"},"application/vnd.eprints.data+xml":{source:"iana",compressible:!0},"application/vnd.epson.esf":{source:"iana",extensions:["esf"]},"application/vnd.epson.msf":{source:"iana",extensions:["msf"]},"application/vnd.epson.quickanime":{source:"iana",extensions:["qam"]},"application/vnd.epson.salt":{source:"iana",extensions:["slt"]},"application/vnd.epson.ssf":{source:"iana",extensions:["ssf"]},"application/vnd.ericsson.quickcall":{source:"iana"},"application/vnd.espass-espass+zip":{source:"iana",compressible:!1},"application/vnd.eszigno3+xml":{source:"iana",compressible:!0,extensions:["es3","et3"]},"application/vnd.etsi.aoc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.asic-e+zip":{source:"iana",compressible:!1},"application/vnd.etsi.asic-s+zip":{source:"iana",compressible:!1},"application/vnd.etsi.cug+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvcommand+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-bc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-cod+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-npvr+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvservice+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsync+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvueprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mcid+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mheg5":{source:"iana"},"application/vnd.etsi.overload-control-policy-dataset+xml":{source:"iana",compressible:!0},"application/vnd.etsi.pstn+xml":{source:"iana",compressible:!0},"application/vnd.etsi.sci+xml":{source:"iana",compressible:!0},"application/vnd.etsi.simservs+xml":{source:"iana",compressible:!0},"application/vnd.etsi.timestamp-token":{source:"iana"},"application/vnd.etsi.tsl+xml":{source:"iana",compressible:!0},"application/vnd.etsi.tsl.der":{source:"iana"},"application/vnd.eu.kasparian.car+json":{source:"iana",compressible:!0},"application/vnd.eudora.data":{source:"iana"},"application/vnd.evolv.ecig.profile":{source:"iana"},"application/vnd.evolv.ecig.settings":{source:"iana"},"application/vnd.evolv.ecig.theme":{source:"iana"},"application/vnd.exstream-empower+zip":{source:"iana",compressible:!1},"application/vnd.exstream-package":{source:"iana"},"application/vnd.ezpix-album":{source:"iana",extensions:["ez2"]},"application/vnd.ezpix-package":{source:"iana",extensions:["ez3"]},"application/vnd.f-secure.mobile":{source:"iana"},"application/vnd.familysearch.gedcom+zip":{source:"iana",compressible:!1},"application/vnd.fastcopy-disk-image":{source:"iana"},"application/vnd.fdf":{source:"iana",extensions:["fdf"]},"application/vnd.fdsn.mseed":{source:"iana",extensions:["mseed"]},"application/vnd.fdsn.seed":{source:"iana",extensions:["seed","dataless"]},"application/vnd.ffsns":{source:"iana"},"application/vnd.ficlab.flb+zip":{source:"iana",compressible:!1},"application/vnd.filmit.zfc":{source:"iana"},"application/vnd.fints":{source:"iana"},"application/vnd.firemonkeys.cloudcell":{source:"iana"},"application/vnd.flographit":{source:"iana",extensions:["gph"]},"application/vnd.fluxtime.clip":{source:"iana",extensions:["ftc"]},"application/vnd.font-fontforge-sfd":{source:"iana"},"application/vnd.framemaker":{source:"iana",extensions:["fm","frame","maker","book"]},"application/vnd.frogans.fnc":{source:"iana",extensions:["fnc"]},"application/vnd.frogans.ltf":{source:"iana",extensions:["ltf"]},"application/vnd.fsc.weblaunch":{source:"iana",extensions:["fsc"]},"application/vnd.fujifilm.fb.docuworks":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.binder":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.container":{source:"iana"},"application/vnd.fujifilm.fb.jfi+xml":{source:"iana",compressible:!0},"application/vnd.fujitsu.oasys":{source:"iana",extensions:["oas"]},"application/vnd.fujitsu.oasys2":{source:"iana",extensions:["oa2"]},"application/vnd.fujitsu.oasys3":{source:"iana",extensions:["oa3"]},"application/vnd.fujitsu.oasysgp":{source:"iana",extensions:["fg5"]},"application/vnd.fujitsu.oasysprs":{source:"iana",extensions:["bh2"]},"application/vnd.fujixerox.art-ex":{source:"iana"},"application/vnd.fujixerox.art4":{source:"iana"},"application/vnd.fujixerox.ddd":{source:"iana",extensions:["ddd"]},"application/vnd.fujixerox.docuworks":{source:"iana",extensions:["xdw"]},"application/vnd.fujixerox.docuworks.binder":{source:"iana",extensions:["xbd"]},"application/vnd.fujixerox.docuworks.container":{source:"iana"},"application/vnd.fujixerox.hbpl":{source:"iana"},"application/vnd.fut-misnet":{source:"iana"},"application/vnd.futoin+cbor":{source:"iana"},"application/vnd.futoin+json":{source:"iana",compressible:!0},"application/vnd.fuzzysheet":{source:"iana",extensions:["fzs"]},"application/vnd.genomatix.tuxedo":{source:"iana",extensions:["txd"]},"application/vnd.gentics.grd+json":{source:"iana",compressible:!0},"application/vnd.geo+json":{source:"iana",compressible:!0},"application/vnd.geocube+xml":{source:"iana",compressible:!0},"application/vnd.geogebra.file":{source:"iana",extensions:["ggb"]},"application/vnd.geogebra.slides":{source:"iana"},"application/vnd.geogebra.tool":{source:"iana",extensions:["ggt"]},"application/vnd.geometry-explorer":{source:"iana",extensions:["gex","gre"]},"application/vnd.geonext":{source:"iana",extensions:["gxt"]},"application/vnd.geoplan":{source:"iana",extensions:["g2w"]},"application/vnd.geospace":{source:"iana",extensions:["g3w"]},"application/vnd.gerber":{source:"iana"},"application/vnd.globalplatform.card-content-mgt":{source:"iana"},"application/vnd.globalplatform.card-content-mgt-response":{source:"iana"},"application/vnd.gmx":{source:"iana",extensions:["gmx"]},"application/vnd.google-apps.document":{compressible:!1,extensions:["gdoc"]},"application/vnd.google-apps.presentation":{compressible:!1,extensions:["gslides"]},"application/vnd.google-apps.spreadsheet":{compressible:!1,extensions:["gsheet"]},"application/vnd.google-earth.kml+xml":{source:"iana",compressible:!0,extensions:["kml"]},"application/vnd.google-earth.kmz":{source:"iana",compressible:!1,extensions:["kmz"]},"application/vnd.gov.sk.e-form+xml":{source:"iana",compressible:!0},"application/vnd.gov.sk.e-form+zip":{source:"iana",compressible:!1},"application/vnd.gov.sk.xmldatacontainer+xml":{source:"iana",compressible:!0},"application/vnd.grafeq":{source:"iana",extensions:["gqf","gqs"]},"application/vnd.gridmp":{source:"iana"},"application/vnd.groove-account":{source:"iana",extensions:["gac"]},"application/vnd.groove-help":{source:"iana",extensions:["ghf"]},"application/vnd.groove-identity-message":{source:"iana",extensions:["gim"]},"application/vnd.groove-injector":{source:"iana",extensions:["grv"]},"application/vnd.groove-tool-message":{source:"iana",extensions:["gtm"]},"application/vnd.groove-tool-template":{source:"iana",extensions:["tpl"]},"application/vnd.groove-vcard":{source:"iana",extensions:["vcg"]},"application/vnd.hal+json":{source:"iana",compressible:!0},"application/vnd.hal+xml":{source:"iana",compressible:!0,extensions:["hal"]},"application/vnd.handheld-entertainment+xml":{source:"iana",compressible:!0,extensions:["zmm"]},"application/vnd.hbci":{source:"iana",extensions:["hbci"]},"application/vnd.hc+json":{source:"iana",compressible:!0},"application/vnd.hcl-bireports":{source:"iana"},"application/vnd.hdt":{source:"iana"},"application/vnd.heroku+json":{source:"iana",compressible:!0},"application/vnd.hhe.lesson-player":{source:"iana",extensions:["les"]},"application/vnd.hl7cda+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.hl7v2+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.hp-hpgl":{source:"iana",extensions:["hpgl"]},"application/vnd.hp-hpid":{source:"iana",extensions:["hpid"]},"application/vnd.hp-hps":{source:"iana",extensions:["hps"]},"application/vnd.hp-jlyt":{source:"iana",extensions:["jlt"]},"application/vnd.hp-pcl":{source:"iana",extensions:["pcl"]},"application/vnd.hp-pclxl":{source:"iana",extensions:["pclxl"]},"application/vnd.httphone":{source:"iana"},"application/vnd.hydrostatix.sof-data":{source:"iana",extensions:["sfd-hdstx"]},"application/vnd.hyper+json":{source:"iana",compressible:!0},"application/vnd.hyper-item+json":{source:"iana",compressible:!0},"application/vnd.hyperdrive+json":{source:"iana",compressible:!0},"application/vnd.hzn-3d-crossword":{source:"iana"},"application/vnd.ibm.afplinedata":{source:"iana"},"application/vnd.ibm.electronic-media":{source:"iana"},"application/vnd.ibm.minipay":{source:"iana",extensions:["mpy"]},"application/vnd.ibm.modcap":{source:"iana",extensions:["afp","listafp","list3820"]},"application/vnd.ibm.rights-management":{source:"iana",extensions:["irm"]},"application/vnd.ibm.secure-container":{source:"iana",extensions:["sc"]},"application/vnd.iccprofile":{source:"iana",extensions:["icc","icm"]},"application/vnd.ieee.1905":{source:"iana"},"application/vnd.igloader":{source:"iana",extensions:["igl"]},"application/vnd.imagemeter.folder+zip":{source:"iana",compressible:!1},"application/vnd.imagemeter.image+zip":{source:"iana",compressible:!1},"application/vnd.immervision-ivp":{source:"iana",extensions:["ivp"]},"application/vnd.immervision-ivu":{source:"iana",extensions:["ivu"]},"application/vnd.ims.imsccv1p1":{source:"iana"},"application/vnd.ims.imsccv1p2":{source:"iana"},"application/vnd.ims.imsccv1p3":{source:"iana"},"application/vnd.ims.lis.v2.result+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolconsumerprofile+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy.id+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings.simple+json":{source:"iana",compressible:!0},"application/vnd.informedcontrol.rms+xml":{source:"iana",compressible:!0},"application/vnd.informix-visionary":{source:"iana"},"application/vnd.infotech.project":{source:"iana"},"application/vnd.infotech.project+xml":{source:"iana",compressible:!0},"application/vnd.innopath.wamp.notification":{source:"iana"},"application/vnd.insors.igm":{source:"iana",extensions:["igm"]},"application/vnd.intercon.formnet":{source:"iana",extensions:["xpw","xpx"]},"application/vnd.intergeo":{source:"iana",extensions:["i2g"]},"application/vnd.intertrust.digibox":{source:"iana"},"application/vnd.intertrust.nncp":{source:"iana"},"application/vnd.intu.qbo":{source:"iana",extensions:["qbo"]},"application/vnd.intu.qfx":{source:"iana",extensions:["qfx"]},"application/vnd.iptc.g2.catalogitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.conceptitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.knowledgeitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsmessage+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.packageitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.planningitem+xml":{source:"iana",compressible:!0},"application/vnd.ipunplugged.rcprofile":{source:"iana",extensions:["rcprofile"]},"application/vnd.irepository.package+xml":{source:"iana",compressible:!0,extensions:["irp"]},"application/vnd.is-xpr":{source:"iana",extensions:["xpr"]},"application/vnd.isac.fcs":{source:"iana",extensions:["fcs"]},"application/vnd.iso11783-10+zip":{source:"iana",compressible:!1},"application/vnd.jam":{source:"iana",extensions:["jam"]},"application/vnd.japannet-directory-service":{source:"iana"},"application/vnd.japannet-jpnstore-wakeup":{source:"iana"},"application/vnd.japannet-payment-wakeup":{source:"iana"},"application/vnd.japannet-registration":{source:"iana"},"application/vnd.japannet-registration-wakeup":{source:"iana"},"application/vnd.japannet-setstore-wakeup":{source:"iana"},"application/vnd.japannet-verification":{source:"iana"},"application/vnd.japannet-verification-wakeup":{source:"iana"},"application/vnd.jcp.javame.midlet-rms":{source:"iana",extensions:["rms"]},"application/vnd.jisp":{source:"iana",extensions:["jisp"]},"application/vnd.joost.joda-archive":{source:"iana",extensions:["joda"]},"application/vnd.jsk.isdn-ngn":{source:"iana"},"application/vnd.kahootz":{source:"iana",extensions:["ktz","ktr"]},"application/vnd.kde.karbon":{source:"iana",extensions:["karbon"]},"application/vnd.kde.kchart":{source:"iana",extensions:["chrt"]},"application/vnd.kde.kformula":{source:"iana",extensions:["kfo"]},"application/vnd.kde.kivio":{source:"iana",extensions:["flw"]},"application/vnd.kde.kontour":{source:"iana",extensions:["kon"]},"application/vnd.kde.kpresenter":{source:"iana",extensions:["kpr","kpt"]},"application/vnd.kde.kspread":{source:"iana",extensions:["ksp"]},"application/vnd.kde.kword":{source:"iana",extensions:["kwd","kwt"]},"application/vnd.kenameaapp":{source:"iana",extensions:["htke"]},"application/vnd.kidspiration":{source:"iana",extensions:["kia"]},"application/vnd.kinar":{source:"iana",extensions:["kne","knp"]},"application/vnd.koan":{source:"iana",extensions:["skp","skd","skt","skm"]},"application/vnd.kodak-descriptor":{source:"iana",extensions:["sse"]},"application/vnd.las":{source:"iana"},"application/vnd.las.las+json":{source:"iana",compressible:!0},"application/vnd.las.las+xml":{source:"iana",compressible:!0,extensions:["lasxml"]},"application/vnd.laszip":{source:"iana"},"application/vnd.leap+json":{source:"iana",compressible:!0},"application/vnd.liberty-request+xml":{source:"iana",compressible:!0},"application/vnd.llamagraphics.life-balance.desktop":{source:"iana",extensions:["lbd"]},"application/vnd.llamagraphics.life-balance.exchange+xml":{source:"iana",compressible:!0,extensions:["lbe"]},"application/vnd.logipipe.circuit+zip":{source:"iana",compressible:!1},"application/vnd.loom":{source:"iana"},"application/vnd.lotus-1-2-3":{source:"iana",extensions:["123"]},"application/vnd.lotus-approach":{source:"iana",extensions:["apr"]},"application/vnd.lotus-freelance":{source:"iana",extensions:["pre"]},"application/vnd.lotus-notes":{source:"iana",extensions:["nsf"]},"application/vnd.lotus-organizer":{source:"iana",extensions:["org"]},"application/vnd.lotus-screencam":{source:"iana",extensions:["scm"]},"application/vnd.lotus-wordpro":{source:"iana",extensions:["lwp"]},"application/vnd.macports.portpkg":{source:"iana",extensions:["portpkg"]},"application/vnd.mapbox-vector-tile":{source:"iana",extensions:["mvt"]},"application/vnd.marlin.drm.actiontoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.conftoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.license+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.mdcf":{source:"iana"},"application/vnd.mason+json":{source:"iana",compressible:!0},"application/vnd.maxar.archive.3tz+zip":{source:"iana",compressible:!1},"application/vnd.maxmind.maxmind-db":{source:"iana"},"application/vnd.mcd":{source:"iana",extensions:["mcd"]},"application/vnd.medcalcdata":{source:"iana",extensions:["mc1"]},"application/vnd.mediastation.cdkey":{source:"iana",extensions:["cdkey"]},"application/vnd.meridian-slingshot":{source:"iana"},"application/vnd.mfer":{source:"iana",extensions:["mwf"]},"application/vnd.mfmp":{source:"iana",extensions:["mfm"]},"application/vnd.micro+json":{source:"iana",compressible:!0},"application/vnd.micrografx.flo":{source:"iana",extensions:["flo"]},"application/vnd.micrografx.igx":{source:"iana",extensions:["igx"]},"application/vnd.microsoft.portable-executable":{source:"iana"},"application/vnd.microsoft.windows.thumbnail-cache":{source:"iana"},"application/vnd.miele+json":{source:"iana",compressible:!0},"application/vnd.mif":{source:"iana",extensions:["mif"]},"application/vnd.minisoft-hp3000-save":{source:"iana"},"application/vnd.mitsubishi.misty-guard.trustweb":{source:"iana"},"application/vnd.mobius.daf":{source:"iana",extensions:["daf"]},"application/vnd.mobius.dis":{source:"iana",extensions:["dis"]},"application/vnd.mobius.mbk":{source:"iana",extensions:["mbk"]},"application/vnd.mobius.mqy":{source:"iana",extensions:["mqy"]},"application/vnd.mobius.msl":{source:"iana",extensions:["msl"]},"application/vnd.mobius.plc":{source:"iana",extensions:["plc"]},"application/vnd.mobius.txf":{source:"iana",extensions:["txf"]},"application/vnd.mophun.application":{source:"iana",extensions:["mpn"]},"application/vnd.mophun.certificate":{source:"iana",extensions:["mpc"]},"application/vnd.motorola.flexsuite":{source:"iana"},"application/vnd.motorola.flexsuite.adsi":{source:"iana"},"application/vnd.motorola.flexsuite.fis":{source:"iana"},"application/vnd.motorola.flexsuite.gotap":{source:"iana"},"application/vnd.motorola.flexsuite.kmr":{source:"iana"},"application/vnd.motorola.flexsuite.ttc":{source:"iana"},"application/vnd.motorola.flexsuite.wem":{source:"iana"},"application/vnd.motorola.iprm":{source:"iana"},"application/vnd.mozilla.xul+xml":{source:"iana",compressible:!0,extensions:["xul"]},"application/vnd.ms-3mfdocument":{source:"iana"},"application/vnd.ms-artgalry":{source:"iana",extensions:["cil"]},"application/vnd.ms-asf":{source:"iana"},"application/vnd.ms-cab-compressed":{source:"iana",extensions:["cab"]},"application/vnd.ms-color.iccprofile":{source:"apache"},"application/vnd.ms-excel":{source:"iana",compressible:!1,extensions:["xls","xlm","xla","xlc","xlt","xlw"]},"application/vnd.ms-excel.addin.macroenabled.12":{source:"iana",extensions:["xlam"]},"application/vnd.ms-excel.sheet.binary.macroenabled.12":{source:"iana",extensions:["xlsb"]},"application/vnd.ms-excel.sheet.macroenabled.12":{source:"iana",extensions:["xlsm"]},"application/vnd.ms-excel.template.macroenabled.12":{source:"iana",extensions:["xltm"]},"application/vnd.ms-fontobject":{source:"iana",compressible:!0,extensions:["eot"]},"application/vnd.ms-htmlhelp":{source:"iana",extensions:["chm"]},"application/vnd.ms-ims":{source:"iana",extensions:["ims"]},"application/vnd.ms-lrm":{source:"iana",extensions:["lrm"]},"application/vnd.ms-office.activex+xml":{source:"iana",compressible:!0},"application/vnd.ms-officetheme":{source:"iana",extensions:["thmx"]},"application/vnd.ms-opentype":{source:"apache",compressible:!0},"application/vnd.ms-outlook":{compressible:!1,extensions:["msg"]},"application/vnd.ms-package.obfuscated-opentype":{source:"apache"},"application/vnd.ms-pki.seccat":{source:"apache",extensions:["cat"]},"application/vnd.ms-pki.stl":{source:"apache",extensions:["stl"]},"application/vnd.ms-playready.initiator+xml":{source:"iana",compressible:!0},"application/vnd.ms-powerpoint":{source:"iana",compressible:!1,extensions:["ppt","pps","pot"]},"application/vnd.ms-powerpoint.addin.macroenabled.12":{source:"iana",extensions:["ppam"]},"application/vnd.ms-powerpoint.presentation.macroenabled.12":{source:"iana",extensions:["pptm"]},"application/vnd.ms-powerpoint.slide.macroenabled.12":{source:"iana",extensions:["sldm"]},"application/vnd.ms-powerpoint.slideshow.macroenabled.12":{source:"iana",extensions:["ppsm"]},"application/vnd.ms-powerpoint.template.macroenabled.12":{source:"iana",extensions:["potm"]},"application/vnd.ms-printdevicecapabilities+xml":{source:"iana",compressible:!0},"application/vnd.ms-printing.printticket+xml":{source:"apache",compressible:!0},"application/vnd.ms-printschematicket+xml":{source:"iana",compressible:!0},"application/vnd.ms-project":{source:"iana",extensions:["mpp","mpt"]},"application/vnd.ms-tnef":{source:"iana"},"application/vnd.ms-windows.devicepairing":{source:"iana"},"application/vnd.ms-windows.nwprinting.oob":{source:"iana"},"application/vnd.ms-windows.printerpairing":{source:"iana"},"application/vnd.ms-windows.wsd.oob":{source:"iana"},"application/vnd.ms-wmdrm.lic-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.lic-resp":{source:"iana"},"application/vnd.ms-wmdrm.meter-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.meter-resp":{source:"iana"},"application/vnd.ms-word.document.macroenabled.12":{source:"iana",extensions:["docm"]},"application/vnd.ms-word.template.macroenabled.12":{source:"iana",extensions:["dotm"]},"application/vnd.ms-works":{source:"iana",extensions:["wps","wks","wcm","wdb"]},"application/vnd.ms-wpl":{source:"iana",extensions:["wpl"]},"application/vnd.ms-xpsdocument":{source:"iana",compressible:!1,extensions:["xps"]},"application/vnd.msa-disk-image":{source:"iana"},"application/vnd.mseq":{source:"iana",extensions:["mseq"]},"application/vnd.msign":{source:"iana"},"application/vnd.multiad.creator":{source:"iana"},"application/vnd.multiad.creator.cif":{source:"iana"},"application/vnd.music-niff":{source:"iana"},"application/vnd.musician":{source:"iana",extensions:["mus"]},"application/vnd.muvee.style":{source:"iana",extensions:["msty"]},"application/vnd.mynfc":{source:"iana",extensions:["taglet"]},"application/vnd.nacamar.ybrid+json":{source:"iana",compressible:!0},"application/vnd.ncd.control":{source:"iana"},"application/vnd.ncd.reference":{source:"iana"},"application/vnd.nearst.inv+json":{source:"iana",compressible:!0},"application/vnd.nebumind.line":{source:"iana"},"application/vnd.nervana":{source:"iana"},"application/vnd.netfpx":{source:"iana"},"application/vnd.neurolanguage.nlu":{source:"iana",extensions:["nlu"]},"application/vnd.nimn":{source:"iana"},"application/vnd.nintendo.nitro.rom":{source:"iana"},"application/vnd.nintendo.snes.rom":{source:"iana"},"application/vnd.nitf":{source:"iana",extensions:["ntf","nitf"]},"application/vnd.noblenet-directory":{source:"iana",extensions:["nnd"]},"application/vnd.noblenet-sealer":{source:"iana",extensions:["nns"]},"application/vnd.noblenet-web":{source:"iana",extensions:["nnw"]},"application/vnd.nokia.catalogs":{source:"iana"},"application/vnd.nokia.conml+wbxml":{source:"iana"},"application/vnd.nokia.conml+xml":{source:"iana",compressible:!0},"application/vnd.nokia.iptv.config+xml":{source:"iana",compressible:!0},"application/vnd.nokia.isds-radio-presets":{source:"iana"},"application/vnd.nokia.landmark+wbxml":{source:"iana"},"application/vnd.nokia.landmark+xml":{source:"iana",compressible:!0},"application/vnd.nokia.landmarkcollection+xml":{source:"iana",compressible:!0},"application/vnd.nokia.n-gage.ac+xml":{source:"iana",compressible:!0,extensions:["ac"]},"application/vnd.nokia.n-gage.data":{source:"iana",extensions:["ngdat"]},"application/vnd.nokia.n-gage.symbian.install":{source:"iana",extensions:["n-gage"]},"application/vnd.nokia.ncd":{source:"iana"},"application/vnd.nokia.pcd+wbxml":{source:"iana"},"application/vnd.nokia.pcd+xml":{source:"iana",compressible:!0},"application/vnd.nokia.radio-preset":{source:"iana",extensions:["rpst"]},"application/vnd.nokia.radio-presets":{source:"iana",extensions:["rpss"]},"application/vnd.novadigm.edm":{source:"iana",extensions:["edm"]},"application/vnd.novadigm.edx":{source:"iana",extensions:["edx"]},"application/vnd.novadigm.ext":{source:"iana",extensions:["ext"]},"application/vnd.ntt-local.content-share":{source:"iana"},"application/vnd.ntt-local.file-transfer":{source:"iana"},"application/vnd.ntt-local.ogw_remote-access":{source:"iana"},"application/vnd.ntt-local.sip-ta_remote":{source:"iana"},"application/vnd.ntt-local.sip-ta_tcp_stream":{source:"iana"},"application/vnd.oasis.opendocument.chart":{source:"iana",extensions:["odc"]},"application/vnd.oasis.opendocument.chart-template":{source:"iana",extensions:["otc"]},"application/vnd.oasis.opendocument.database":{source:"iana",extensions:["odb"]},"application/vnd.oasis.opendocument.formula":{source:"iana",extensions:["odf"]},"application/vnd.oasis.opendocument.formula-template":{source:"iana",extensions:["odft"]},"application/vnd.oasis.opendocument.graphics":{source:"iana",compressible:!1,extensions:["odg"]},"application/vnd.oasis.opendocument.graphics-template":{source:"iana",extensions:["otg"]},"application/vnd.oasis.opendocument.image":{source:"iana",extensions:["odi"]},"application/vnd.oasis.opendocument.image-template":{source:"iana",extensions:["oti"]},"application/vnd.oasis.opendocument.presentation":{source:"iana",compressible:!1,extensions:["odp"]},"application/vnd.oasis.opendocument.presentation-template":{source:"iana",extensions:["otp"]},"application/vnd.oasis.opendocument.spreadsheet":{source:"iana",compressible:!1,extensions:["ods"]},"application/vnd.oasis.opendocument.spreadsheet-template":{source:"iana",extensions:["ots"]},"application/vnd.oasis.opendocument.text":{source:"iana",compressible:!1,extensions:["odt"]},"application/vnd.oasis.opendocument.text-master":{source:"iana",extensions:["odm"]},"application/vnd.oasis.opendocument.text-template":{source:"iana",extensions:["ott"]},"application/vnd.oasis.opendocument.text-web":{source:"iana",extensions:["oth"]},"application/vnd.obn":{source:"iana"},"application/vnd.ocf+cbor":{source:"iana"},"application/vnd.oci.image.manifest.v1+json":{source:"iana",compressible:!0},"application/vnd.oftn.l10n+json":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessdownload+xml":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessstreaming+xml":{source:"iana",compressible:!0},"application/vnd.oipf.cspg-hexbinary":{source:"iana"},"application/vnd.oipf.dae.svg+xml":{source:"iana",compressible:!0},"application/vnd.oipf.dae.xhtml+xml":{source:"iana",compressible:!0},"application/vnd.oipf.mippvcontrolmessage+xml":{source:"iana",compressible:!0},"application/vnd.oipf.pae.gem":{source:"iana"},"application/vnd.oipf.spdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.oipf.spdlist+xml":{source:"iana",compressible:!0},"application/vnd.oipf.ueprofile+xml":{source:"iana",compressible:!0},"application/vnd.oipf.userprofile+xml":{source:"iana",compressible:!0},"application/vnd.olpc-sugar":{source:"iana",extensions:["xo"]},"application/vnd.oma-scws-config":{source:"iana"},"application/vnd.oma-scws-http-request":{source:"iana"},"application/vnd.oma-scws-http-response":{source:"iana"},"application/vnd.oma.bcast.associated-procedure-parameter+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.drm-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.imd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.ltkm":{source:"iana"},"application/vnd.oma.bcast.notification+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.provisioningtrigger":{source:"iana"},"application/vnd.oma.bcast.sgboot":{source:"iana"},"application/vnd.oma.bcast.sgdd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sgdu":{source:"iana"},"application/vnd.oma.bcast.simple-symbol-container":{source:"iana"},"application/vnd.oma.bcast.smartcard-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sprov+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.stkm":{source:"iana"},"application/vnd.oma.cab-address-book+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-feature-handler+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-pcc+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-subs-invite+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-user-prefs+xml":{source:"iana",compressible:!0},"application/vnd.oma.dcd":{source:"iana"},"application/vnd.oma.dcdc":{source:"iana"},"application/vnd.oma.dd2+xml":{source:"iana",compressible:!0,extensions:["dd2"]},"application/vnd.oma.drm.risd+xml":{source:"iana",compressible:!0},"application/vnd.oma.group-usage-list+xml":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+cbor":{source:"iana"},"application/vnd.oma.lwm2m+json":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+tlv":{source:"iana"},"application/vnd.oma.pal+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.detailed-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.final-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.groups+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.invocation-descriptor+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.optimized-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.push":{source:"iana"},"application/vnd.oma.scidm.messages+xml":{source:"iana",compressible:!0},"application/vnd.oma.xcap-directory+xml":{source:"iana",compressible:!0},"application/vnd.omads-email+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-file+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-folder+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omaloc-supl-init":{source:"iana"},"application/vnd.onepager":{source:"iana"},"application/vnd.onepagertamp":{source:"iana"},"application/vnd.onepagertamx":{source:"iana"},"application/vnd.onepagertat":{source:"iana"},"application/vnd.onepagertatp":{source:"iana"},"application/vnd.onepagertatx":{source:"iana"},"application/vnd.openblox.game+xml":{source:"iana",compressible:!0,extensions:["obgx"]},"application/vnd.openblox.game-binary":{source:"iana"},"application/vnd.openeye.oeb":{source:"iana"},"application/vnd.openofficeorg.extension":{source:"apache",extensions:["oxt"]},"application/vnd.openstreetmap.data+xml":{source:"iana",compressible:!0,extensions:["osm"]},"application/vnd.opentimestamps.ots":{source:"iana"},"application/vnd.openxmlformats-officedocument.custom-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.customxmlproperties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawing+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chart+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.extended-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{source:"iana",compressible:!1,extensions:["pptx"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slide":{source:"iana",extensions:["sldx"]},"application/vnd.openxmlformats-officedocument.presentationml.slide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideshow":{source:"iana",extensions:["ppsx"]},"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tags+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.template":{source:"iana",extensions:["potx"]},"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{source:"iana",compressible:!1,extensions:["xlsx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.template":{source:"iana",extensions:["xltx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.theme+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.themeoverride+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.vmldrawing":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{source:"iana",compressible:!1,extensions:["docx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.template":{source:"iana",extensions:["dotx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.core-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.relationships+xml":{source:"iana",compressible:!0},"application/vnd.oracle.resource+json":{source:"iana",compressible:!0},"application/vnd.orange.indata":{source:"iana"},"application/vnd.osa.netdeploy":{source:"iana"},"application/vnd.osgeo.mapguide.package":{source:"iana",extensions:["mgp"]},"application/vnd.osgi.bundle":{source:"iana"},"application/vnd.osgi.dp":{source:"iana",extensions:["dp"]},"application/vnd.osgi.subsystem":{source:"iana",extensions:["esa"]},"application/vnd.otps.ct-kip+xml":{source:"iana",compressible:!0},"application/vnd.oxli.countgraph":{source:"iana"},"application/vnd.pagerduty+json":{source:"iana",compressible:!0},"application/vnd.palm":{source:"iana",extensions:["pdb","pqa","oprc"]},"application/vnd.panoply":{source:"iana"},"application/vnd.paos.xml":{source:"iana"},"application/vnd.patentdive":{source:"iana"},"application/vnd.patientecommsdoc":{source:"iana"},"application/vnd.pawaafile":{source:"iana",extensions:["paw"]},"application/vnd.pcos":{source:"iana"},"application/vnd.pg.format":{source:"iana",extensions:["str"]},"application/vnd.pg.osasli":{source:"iana",extensions:["ei6"]},"application/vnd.piaccess.application-licence":{source:"iana"},"application/vnd.picsel":{source:"iana",extensions:["efif"]},"application/vnd.pmi.widget":{source:"iana",extensions:["wg"]},"application/vnd.poc.group-advertisement+xml":{source:"iana",compressible:!0},"application/vnd.pocketlearn":{source:"iana",extensions:["plf"]},"application/vnd.powerbuilder6":{source:"iana",extensions:["pbd"]},"application/vnd.powerbuilder6-s":{source:"iana"},"application/vnd.powerbuilder7":{source:"iana"},"application/vnd.powerbuilder7-s":{source:"iana"},"application/vnd.powerbuilder75":{source:"iana"},"application/vnd.powerbuilder75-s":{source:"iana"},"application/vnd.preminet":{source:"iana"},"application/vnd.previewsystems.box":{source:"iana",extensions:["box"]},"application/vnd.proteus.magazine":{source:"iana",extensions:["mgz"]},"application/vnd.psfs":{source:"iana"},"application/vnd.publishare-delta-tree":{source:"iana",extensions:["qps"]},"application/vnd.pvi.ptid1":{source:"iana",extensions:["ptid"]},"application/vnd.pwg-multiplexed":{source:"iana"},"application/vnd.pwg-xhtml-print+xml":{source:"iana",compressible:!0},"application/vnd.qualcomm.brew-app-res":{source:"iana"},"application/vnd.quarantainenet":{source:"iana"},"application/vnd.quark.quarkxpress":{source:"iana",extensions:["qxd","qxt","qwd","qwt","qxl","qxb"]},"application/vnd.quobject-quoxdocument":{source:"iana"},"application/vnd.radisys.moml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conn+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-stream+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-base+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-detect+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-sendrecv+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-group+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-speech+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-transform+xml":{source:"iana",compressible:!0},"application/vnd.rainstor.data":{source:"iana"},"application/vnd.rapid":{source:"iana"},"application/vnd.rar":{source:"iana",extensions:["rar"]},"application/vnd.realvnc.bed":{source:"iana",extensions:["bed"]},"application/vnd.recordare.musicxml":{source:"iana",extensions:["mxl"]},"application/vnd.recordare.musicxml+xml":{source:"iana",compressible:!0,extensions:["musicxml"]},"application/vnd.renlearn.rlprint":{source:"iana"},"application/vnd.resilient.logic":{source:"iana"},"application/vnd.restful+json":{source:"iana",compressible:!0},"application/vnd.rig.cryptonote":{source:"iana",extensions:["cryptonote"]},"application/vnd.rim.cod":{source:"apache",extensions:["cod"]},"application/vnd.rn-realmedia":{source:"apache",extensions:["rm"]},"application/vnd.rn-realmedia-vbr":{source:"apache",extensions:["rmvb"]},"application/vnd.route66.link66+xml":{source:"iana",compressible:!0,extensions:["link66"]},"application/vnd.rs-274x":{source:"iana"},"application/vnd.ruckus.download":{source:"iana"},"application/vnd.s3sms":{source:"iana"},"application/vnd.sailingtracker.track":{source:"iana",extensions:["st"]},"application/vnd.sar":{source:"iana"},"application/vnd.sbm.cid":{source:"iana"},"application/vnd.sbm.mid2":{source:"iana"},"application/vnd.scribus":{source:"iana"},"application/vnd.sealed.3df":{source:"iana"},"application/vnd.sealed.csf":{source:"iana"},"application/vnd.sealed.doc":{source:"iana"},"application/vnd.sealed.eml":{source:"iana"},"application/vnd.sealed.mht":{source:"iana"},"application/vnd.sealed.net":{source:"iana"},"application/vnd.sealed.ppt":{source:"iana"},"application/vnd.sealed.tiff":{source:"iana"},"application/vnd.sealed.xls":{source:"iana"},"application/vnd.sealedmedia.softseal.html":{source:"iana"},"application/vnd.sealedmedia.softseal.pdf":{source:"iana"},"application/vnd.seemail":{source:"iana",extensions:["see"]},"application/vnd.seis+json":{source:"iana",compressible:!0},"application/vnd.sema":{source:"iana",extensions:["sema"]},"application/vnd.semd":{source:"iana",extensions:["semd"]},"application/vnd.semf":{source:"iana",extensions:["semf"]},"application/vnd.shade-save-file":{source:"iana"},"application/vnd.shana.informed.formdata":{source:"iana",extensions:["ifm"]},"application/vnd.shana.informed.formtemplate":{source:"iana",extensions:["itp"]},"application/vnd.shana.informed.interchange":{source:"iana",extensions:["iif"]},"application/vnd.shana.informed.package":{source:"iana",extensions:["ipk"]},"application/vnd.shootproof+json":{source:"iana",compressible:!0},"application/vnd.shopkick+json":{source:"iana",compressible:!0},"application/vnd.shp":{source:"iana"},"application/vnd.shx":{source:"iana"},"application/vnd.sigrok.session":{source:"iana"},"application/vnd.simtech-mindmapper":{source:"iana",extensions:["twd","twds"]},"application/vnd.siren+json":{source:"iana",compressible:!0},"application/vnd.smaf":{source:"iana",extensions:["mmf"]},"application/vnd.smart.notebook":{source:"iana"},"application/vnd.smart.teacher":{source:"iana",extensions:["teacher"]},"application/vnd.snesdev-page-table":{source:"iana"},"application/vnd.software602.filler.form+xml":{source:"iana",compressible:!0,extensions:["fo"]},"application/vnd.software602.filler.form-xml-zip":{source:"iana"},"application/vnd.solent.sdkm+xml":{source:"iana",compressible:!0,extensions:["sdkm","sdkd"]},"application/vnd.spotfire.dxp":{source:"iana",extensions:["dxp"]},"application/vnd.spotfire.sfs":{source:"iana",extensions:["sfs"]},"application/vnd.sqlite3":{source:"iana"},"application/vnd.sss-cod":{source:"iana"},"application/vnd.sss-dtf":{source:"iana"},"application/vnd.sss-ntf":{source:"iana"},"application/vnd.stardivision.calc":{source:"apache",extensions:["sdc"]},"application/vnd.stardivision.draw":{source:"apache",extensions:["sda"]},"application/vnd.stardivision.impress":{source:"apache",extensions:["sdd"]},"application/vnd.stardivision.math":{source:"apache",extensions:["smf"]},"application/vnd.stardivision.writer":{source:"apache",extensions:["sdw","vor"]},"application/vnd.stardivision.writer-global":{source:"apache",extensions:["sgl"]},"application/vnd.stepmania.package":{source:"iana",extensions:["smzip"]},"application/vnd.stepmania.stepchart":{source:"iana",extensions:["sm"]},"application/vnd.street-stream":{source:"iana"},"application/vnd.sun.wadl+xml":{source:"iana",compressible:!0,extensions:["wadl"]},"application/vnd.sun.xml.calc":{source:"apache",extensions:["sxc"]},"application/vnd.sun.xml.calc.template":{source:"apache",extensions:["stc"]},"application/vnd.sun.xml.draw":{source:"apache",extensions:["sxd"]},"application/vnd.sun.xml.draw.template":{source:"apache",extensions:["std"]},"application/vnd.sun.xml.impress":{source:"apache",extensions:["sxi"]},"application/vnd.sun.xml.impress.template":{source:"apache",extensions:["sti"]},"application/vnd.sun.xml.math":{source:"apache",extensions:["sxm"]},"application/vnd.sun.xml.writer":{source:"apache",extensions:["sxw"]},"application/vnd.sun.xml.writer.global":{source:"apache",extensions:["sxg"]},"application/vnd.sun.xml.writer.template":{source:"apache",extensions:["stw"]},"application/vnd.sus-calendar":{source:"iana",extensions:["sus","susp"]},"application/vnd.svd":{source:"iana",extensions:["svd"]},"application/vnd.swiftview-ics":{source:"iana"},"application/vnd.sycle+xml":{source:"iana",compressible:!0},"application/vnd.syft+json":{source:"iana",compressible:!0},"application/vnd.symbian.install":{source:"apache",extensions:["sis","sisx"]},"application/vnd.syncml+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xsm"]},"application/vnd.syncml.dm+wbxml":{source:"iana",charset:"UTF-8",extensions:["bdm"]},"application/vnd.syncml.dm+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xdm"]},"application/vnd.syncml.dm.notification":{source:"iana"},"application/vnd.syncml.dmddf+wbxml":{source:"iana"},"application/vnd.syncml.dmddf+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["ddf"]},"application/vnd.syncml.dmtnds+wbxml":{source:"iana"},"application/vnd.syncml.dmtnds+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.syncml.ds.notification":{source:"iana"},"application/vnd.tableschema+json":{source:"iana",compressible:!0},"application/vnd.tao.intent-module-archive":{source:"iana",extensions:["tao"]},"application/vnd.tcpdump.pcap":{source:"iana",extensions:["pcap","cap","dmp"]},"application/vnd.think-cell.ppttc+json":{source:"iana",compressible:!0},"application/vnd.tmd.mediaflex.api+xml":{source:"iana",compressible:!0},"application/vnd.tml":{source:"iana"},"application/vnd.tmobile-livetv":{source:"iana",extensions:["tmo"]},"application/vnd.tri.onesource":{source:"iana"},"application/vnd.trid.tpt":{source:"iana",extensions:["tpt"]},"application/vnd.triscape.mxs":{source:"iana",extensions:["mxs"]},"application/vnd.trueapp":{source:"iana",extensions:["tra"]},"application/vnd.truedoc":{source:"iana"},"application/vnd.ubisoft.webplayer":{source:"iana"},"application/vnd.ufdl":{source:"iana",extensions:["ufd","ufdl"]},"application/vnd.uiq.theme":{source:"iana",extensions:["utz"]},"application/vnd.umajin":{source:"iana",extensions:["umj"]},"application/vnd.unity":{source:"iana",extensions:["unityweb"]},"application/vnd.uoml+xml":{source:"iana",compressible:!0,extensions:["uoml"]},"application/vnd.uplanet.alert":{source:"iana"},"application/vnd.uplanet.alert-wbxml":{source:"iana"},"application/vnd.uplanet.bearer-choice":{source:"iana"},"application/vnd.uplanet.bearer-choice-wbxml":{source:"iana"},"application/vnd.uplanet.cacheop":{source:"iana"},"application/vnd.uplanet.cacheop-wbxml":{source:"iana"},"application/vnd.uplanet.channel":{source:"iana"},"application/vnd.uplanet.channel-wbxml":{source:"iana"},"application/vnd.uplanet.list":{source:"iana"},"application/vnd.uplanet.list-wbxml":{source:"iana"},"application/vnd.uplanet.listcmd":{source:"iana"},"application/vnd.uplanet.listcmd-wbxml":{source:"iana"},"application/vnd.uplanet.signal":{source:"iana"},"application/vnd.uri-map":{source:"iana"},"application/vnd.valve.source.material":{source:"iana"},"application/vnd.vcx":{source:"iana",extensions:["vcx"]},"application/vnd.vd-study":{source:"iana"},"application/vnd.vectorworks":{source:"iana"},"application/vnd.vel+json":{source:"iana",compressible:!0},"application/vnd.verimatrix.vcas":{source:"iana"},"application/vnd.veritone.aion+json":{source:"iana",compressible:!0},"application/vnd.veryant.thin":{source:"iana"},"application/vnd.ves.encrypted":{source:"iana"},"application/vnd.vidsoft.vidconference":{source:"iana"},"application/vnd.visio":{source:"iana",extensions:["vsd","vst","vss","vsw"]},"application/vnd.visionary":{source:"iana",extensions:["vis"]},"application/vnd.vividence.scriptfile":{source:"iana"},"application/vnd.vsf":{source:"iana",extensions:["vsf"]},"application/vnd.wap.sic":{source:"iana"},"application/vnd.wap.slc":{source:"iana"},"application/vnd.wap.wbxml":{source:"iana",charset:"UTF-8",extensions:["wbxml"]},"application/vnd.wap.wmlc":{source:"iana",extensions:["wmlc"]},"application/vnd.wap.wmlscriptc":{source:"iana",extensions:["wmlsc"]},"application/vnd.webturbo":{source:"iana",extensions:["wtb"]},"application/vnd.wfa.dpp":{source:"iana"},"application/vnd.wfa.p2p":{source:"iana"},"application/vnd.wfa.wsc":{source:"iana"},"application/vnd.windows.devicepairing":{source:"iana"},"application/vnd.wmc":{source:"iana"},"application/vnd.wmf.bootstrap":{source:"iana"},"application/vnd.wolfram.mathematica":{source:"iana"},"application/vnd.wolfram.mathematica.package":{source:"iana"},"application/vnd.wolfram.player":{source:"iana",extensions:["nbp"]},"application/vnd.wordperfect":{source:"iana",extensions:["wpd"]},"application/vnd.wqd":{source:"iana",extensions:["wqd"]},"application/vnd.wrq-hp3000-labelled":{source:"iana"},"application/vnd.wt.stf":{source:"iana",extensions:["stf"]},"application/vnd.wv.csp+wbxml":{source:"iana"},"application/vnd.wv.csp+xml":{source:"iana",compressible:!0},"application/vnd.wv.ssp+xml":{source:"iana",compressible:!0},"application/vnd.xacml+json":{source:"iana",compressible:!0},"application/vnd.xara":{source:"iana",extensions:["xar"]},"application/vnd.xfdl":{source:"iana",extensions:["xfdl"]},"application/vnd.xfdl.webform":{source:"iana"},"application/vnd.xmi+xml":{source:"iana",compressible:!0},"application/vnd.xmpie.cpkg":{source:"iana"},"application/vnd.xmpie.dpkg":{source:"iana"},"application/vnd.xmpie.plan":{source:"iana"},"application/vnd.xmpie.ppkg":{source:"iana"},"application/vnd.xmpie.xlim":{source:"iana"},"application/vnd.yamaha.hv-dic":{source:"iana",extensions:["hvd"]},"application/vnd.yamaha.hv-script":{source:"iana",extensions:["hvs"]},"application/vnd.yamaha.hv-voice":{source:"iana",extensions:["hvp"]},"application/vnd.yamaha.openscoreformat":{source:"iana",extensions:["osf"]},"application/vnd.yamaha.openscoreformat.osfpvg+xml":{source:"iana",compressible:!0,extensions:["osfpvg"]},"application/vnd.yamaha.remote-setup":{source:"iana"},"application/vnd.yamaha.smaf-audio":{source:"iana",extensions:["saf"]},"application/vnd.yamaha.smaf-phrase":{source:"iana",extensions:["spf"]},"application/vnd.yamaha.through-ngn":{source:"iana"},"application/vnd.yamaha.tunnel-udpencap":{source:"iana"},"application/vnd.yaoweme":{source:"iana"},"application/vnd.yellowriver-custom-menu":{source:"iana",extensions:["cmp"]},"application/vnd.youtube.yt":{source:"iana"},"application/vnd.zul":{source:"iana",extensions:["zir","zirz"]},"application/vnd.zzazz.deck+xml":{source:"iana",compressible:!0,extensions:["zaz"]},"application/voicexml+xml":{source:"iana",compressible:!0,extensions:["vxml"]},"application/voucher-cms+json":{source:"iana",compressible:!0},"application/vq-rtcpxr":{source:"iana"},"application/wasm":{source:"iana",compressible:!0,extensions:["wasm"]},"application/watcherinfo+xml":{source:"iana",compressible:!0,extensions:["wif"]},"application/webpush-options+json":{source:"iana",compressible:!0},"application/whoispp-query":{source:"iana"},"application/whoispp-response":{source:"iana"},"application/widget":{source:"iana",extensions:["wgt"]},"application/winhlp":{source:"apache",extensions:["hlp"]},"application/wita":{source:"iana"},"application/wordperfect5.1":{source:"iana"},"application/wsdl+xml":{source:"iana",compressible:!0,extensions:["wsdl"]},"application/wspolicy+xml":{source:"iana",compressible:!0,extensions:["wspolicy"]},"application/x-7z-compressed":{source:"apache",compressible:!1,extensions:["7z"]},"application/x-abiword":{source:"apache",extensions:["abw"]},"application/x-ace-compressed":{source:"apache",extensions:["ace"]},"application/x-amf":{source:"apache"},"application/x-apple-diskimage":{source:"apache",extensions:["dmg"]},"application/x-arj":{compressible:!1,extensions:["arj"]},"application/x-authorware-bin":{source:"apache",extensions:["aab","x32","u32","vox"]},"application/x-authorware-map":{source:"apache",extensions:["aam"]},"application/x-authorware-seg":{source:"apache",extensions:["aas"]},"application/x-bcpio":{source:"apache",extensions:["bcpio"]},"application/x-bdoc":{compressible:!1,extensions:["bdoc"]},"application/x-bittorrent":{source:"apache",extensions:["torrent"]},"application/x-blorb":{source:"apache",extensions:["blb","blorb"]},"application/x-bzip":{source:"apache",compressible:!1,extensions:["bz"]},"application/x-bzip2":{source:"apache",compressible:!1,extensions:["bz2","boz"]},"application/x-cbr":{source:"apache",extensions:["cbr","cba","cbt","cbz","cb7"]},"application/x-cdlink":{source:"apache",extensions:["vcd"]},"application/x-cfs-compressed":{source:"apache",extensions:["cfs"]},"application/x-chat":{source:"apache",extensions:["chat"]},"application/x-chess-pgn":{source:"apache",extensions:["pgn"]},"application/x-chrome-extension":{extensions:["crx"]},"application/x-cocoa":{source:"nginx",extensions:["cco"]},"application/x-compress":{source:"apache"},"application/x-conference":{source:"apache",extensions:["nsc"]},"application/x-cpio":{source:"apache",extensions:["cpio"]},"application/x-csh":{source:"apache",extensions:["csh"]},"application/x-deb":{compressible:!1},"application/x-debian-package":{source:"apache",extensions:["deb","udeb"]},"application/x-dgc-compressed":{source:"apache",extensions:["dgc"]},"application/x-director":{source:"apache",extensions:["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"]},"application/x-doom":{source:"apache",extensions:["wad"]},"application/x-dtbncx+xml":{source:"apache",compressible:!0,extensions:["ncx"]},"application/x-dtbook+xml":{source:"apache",compressible:!0,extensions:["dtb"]},"application/x-dtbresource+xml":{source:"apache",compressible:!0,extensions:["res"]},"application/x-dvi":{source:"apache",compressible:!1,extensions:["dvi"]},"application/x-envoy":{source:"apache",extensions:["evy"]},"application/x-eva":{source:"apache",extensions:["eva"]},"application/x-font-bdf":{source:"apache",extensions:["bdf"]},"application/x-font-dos":{source:"apache"},"application/x-font-framemaker":{source:"apache"},"application/x-font-ghostscript":{source:"apache",extensions:["gsf"]},"application/x-font-libgrx":{source:"apache"},"application/x-font-linux-psf":{source:"apache",extensions:["psf"]},"application/x-font-pcf":{source:"apache",extensions:["pcf"]},"application/x-font-snf":{source:"apache",extensions:["snf"]},"application/x-font-speedo":{source:"apache"},"application/x-font-sunos-news":{source:"apache"},"application/x-font-type1":{source:"apache",extensions:["pfa","pfb","pfm","afm"]},"application/x-font-vfont":{source:"apache"},"application/x-freearc":{source:"apache",extensions:["arc"]},"application/x-futuresplash":{source:"apache",extensions:["spl"]},"application/x-gca-compressed":{source:"apache",extensions:["gca"]},"application/x-glulx":{source:"apache",extensions:["ulx"]},"application/x-gnumeric":{source:"apache",extensions:["gnumeric"]},"application/x-gramps-xml":{source:"apache",extensions:["gramps"]},"application/x-gtar":{source:"apache",extensions:["gtar"]},"application/x-gzip":{source:"apache"},"application/x-hdf":{source:"apache",extensions:["hdf"]},"application/x-httpd-php":{compressible:!0,extensions:["php"]},"application/x-install-instructions":{source:"apache",extensions:["install"]},"application/x-iso9660-image":{source:"apache",extensions:["iso"]},"application/x-iwork-keynote-sffkey":{extensions:["key"]},"application/x-iwork-numbers-sffnumbers":{extensions:["numbers"]},"application/x-iwork-pages-sffpages":{extensions:["pages"]},"application/x-java-archive-diff":{source:"nginx",extensions:["jardiff"]},"application/x-java-jnlp-file":{source:"apache",compressible:!1,extensions:["jnlp"]},"application/x-javascript":{compressible:!0},"application/x-keepass2":{extensions:["kdbx"]},"application/x-latex":{source:"apache",compressible:!1,extensions:["latex"]},"application/x-lua-bytecode":{extensions:["luac"]},"application/x-lzh-compressed":{source:"apache",extensions:["lzh","lha"]},"application/x-makeself":{source:"nginx",extensions:["run"]},"application/x-mie":{source:"apache",extensions:["mie"]},"application/x-mobipocket-ebook":{source:"apache",extensions:["prc","mobi"]},"application/x-mpegurl":{compressible:!1},"application/x-ms-application":{source:"apache",extensions:["application"]},"application/x-ms-shortcut":{source:"apache",extensions:["lnk"]},"application/x-ms-wmd":{source:"apache",extensions:["wmd"]},"application/x-ms-wmz":{source:"apache",extensions:["wmz"]},"application/x-ms-xbap":{source:"apache",extensions:["xbap"]},"application/x-msaccess":{source:"apache",extensions:["mdb"]},"application/x-msbinder":{source:"apache",extensions:["obd"]},"application/x-mscardfile":{source:"apache",extensions:["crd"]},"application/x-msclip":{source:"apache",extensions:["clp"]},"application/x-msdos-program":{extensions:["exe"]},"application/x-msdownload":{source:"apache",extensions:["exe","dll","com","bat","msi"]},"application/x-msmediaview":{source:"apache",extensions:["mvb","m13","m14"]},"application/x-msmetafile":{source:"apache",extensions:["wmf","wmz","emf","emz"]},"application/x-msmoney":{source:"apache",extensions:["mny"]},"application/x-mspublisher":{source:"apache",extensions:["pub"]},"application/x-msschedule":{source:"apache",extensions:["scd"]},"application/x-msterminal":{source:"apache",extensions:["trm"]},"application/x-mswrite":{source:"apache",extensions:["wri"]},"application/x-netcdf":{source:"apache",extensions:["nc","cdf"]},"application/x-ns-proxy-autoconfig":{compressible:!0,extensions:["pac"]},"application/x-nzb":{source:"apache",extensions:["nzb"]},"application/x-perl":{source:"nginx",extensions:["pl","pm"]},"application/x-pilot":{source:"nginx",extensions:["prc","pdb"]},"application/x-pkcs12":{source:"apache",compressible:!1,extensions:["p12","pfx"]},"application/x-pkcs7-certificates":{source:"apache",extensions:["p7b","spc"]},"application/x-pkcs7-certreqresp":{source:"apache",extensions:["p7r"]},"application/x-pki-message":{source:"iana"},"application/x-rar-compressed":{source:"apache",compressible:!1,extensions:["rar"]},"application/x-redhat-package-manager":{source:"nginx",extensions:["rpm"]},"application/x-research-info-systems":{source:"apache",extensions:["ris"]},"application/x-sea":{source:"nginx",extensions:["sea"]},"application/x-sh":{source:"apache",compressible:!0,extensions:["sh"]},"application/x-shar":{source:"apache",extensions:["shar"]},"application/x-shockwave-flash":{source:"apache",compressible:!1,extensions:["swf"]},"application/x-silverlight-app":{source:"apache",extensions:["xap"]},"application/x-sql":{source:"apache",extensions:["sql"]},"application/x-stuffit":{source:"apache",compressible:!1,extensions:["sit"]},"application/x-stuffitx":{source:"apache",extensions:["sitx"]},"application/x-subrip":{source:"apache",extensions:["srt"]},"application/x-sv4cpio":{source:"apache",extensions:["sv4cpio"]},"application/x-sv4crc":{source:"apache",extensions:["sv4crc"]},"application/x-t3vm-image":{source:"apache",extensions:["t3"]},"application/x-tads":{source:"apache",extensions:["gam"]},"application/x-tar":{source:"apache",compressible:!0,extensions:["tar"]},"application/x-tcl":{source:"apache",extensions:["tcl","tk"]},"application/x-tex":{source:"apache",extensions:["tex"]},"application/x-tex-tfm":{source:"apache",extensions:["tfm"]},"application/x-texinfo":{source:"apache",extensions:["texinfo","texi"]},"application/x-tgif":{source:"apache",extensions:["obj"]},"application/x-ustar":{source:"apache",extensions:["ustar"]},"application/x-virtualbox-hdd":{compressible:!0,extensions:["hdd"]},"application/x-virtualbox-ova":{compressible:!0,extensions:["ova"]},"application/x-virtualbox-ovf":{compressible:!0,extensions:["ovf"]},"application/x-virtualbox-vbox":{compressible:!0,extensions:["vbox"]},"application/x-virtualbox-vbox-extpack":{compressible:!1,extensions:["vbox-extpack"]},"application/x-virtualbox-vdi":{compressible:!0,extensions:["vdi"]},"application/x-virtualbox-vhd":{compressible:!0,extensions:["vhd"]},"application/x-virtualbox-vmdk":{compressible:!0,extensions:["vmdk"]},"application/x-wais-source":{source:"apache",extensions:["src"]},"application/x-web-app-manifest+json":{compressible:!0,extensions:["webapp"]},"application/x-www-form-urlencoded":{source:"iana",compressible:!0},"application/x-x509-ca-cert":{source:"iana",extensions:["der","crt","pem"]},"application/x-x509-ca-ra-cert":{source:"iana"},"application/x-x509-next-ca-cert":{source:"iana"},"application/x-xfig":{source:"apache",extensions:["fig"]},"application/x-xliff+xml":{source:"apache",compressible:!0,extensions:["xlf"]},"application/x-xpinstall":{source:"apache",compressible:!1,extensions:["xpi"]},"application/x-xz":{source:"apache",extensions:["xz"]},"application/x-zmachine":{source:"apache",extensions:["z1","z2","z3","z4","z5","z6","z7","z8"]},"application/x400-bp":{source:"iana"},"application/xacml+xml":{source:"iana",compressible:!0},"application/xaml+xml":{source:"apache",compressible:!0,extensions:["xaml"]},"application/xcap-att+xml":{source:"iana",compressible:!0,extensions:["xav"]},"application/xcap-caps+xml":{source:"iana",compressible:!0,extensions:["xca"]},"application/xcap-diff+xml":{source:"iana",compressible:!0,extensions:["xdf"]},"application/xcap-el+xml":{source:"iana",compressible:!0,extensions:["xel"]},"application/xcap-error+xml":{source:"iana",compressible:!0},"application/xcap-ns+xml":{source:"iana",compressible:!0,extensions:["xns"]},"application/xcon-conference-info+xml":{source:"iana",compressible:!0},"application/xcon-conference-info-diff+xml":{source:"iana",compressible:!0},"application/xenc+xml":{source:"iana",compressible:!0,extensions:["xenc"]},"application/xhtml+xml":{source:"iana",compressible:!0,extensions:["xhtml","xht"]},"application/xhtml-voice+xml":{source:"apache",compressible:!0},"application/xliff+xml":{source:"iana",compressible:!0,extensions:["xlf"]},"application/xml":{source:"iana",compressible:!0,extensions:["xml","xsl","xsd","rng"]},"application/xml-dtd":{source:"iana",compressible:!0,extensions:["dtd"]},"application/xml-external-parsed-entity":{source:"iana"},"application/xml-patch+xml":{source:"iana",compressible:!0},"application/xmpp+xml":{source:"iana",compressible:!0},"application/xop+xml":{source:"iana",compressible:!0,extensions:["xop"]},"application/xproc+xml":{source:"apache",compressible:!0,extensions:["xpl"]},"application/xslt+xml":{source:"iana",compressible:!0,extensions:["xsl","xslt"]},"application/xspf+xml":{source:"apache",compressible:!0,extensions:["xspf"]},"application/xv+xml":{source:"iana",compressible:!0,extensions:["mxml","xhvml","xvml","xvm"]},"application/yang":{source:"iana",extensions:["yang"]},"application/yang-data+json":{source:"iana",compressible:!0},"application/yang-data+xml":{source:"iana",compressible:!0},"application/yang-patch+json":{source:"iana",compressible:!0},"application/yang-patch+xml":{source:"iana",compressible:!0},"application/yin+xml":{source:"iana",compressible:!0,extensions:["yin"]},"application/zip":{source:"iana",compressible:!1,extensions:["zip"]},"application/zlib":{source:"iana"},"application/zstd":{source:"iana"},"audio/1d-interleaved-parityfec":{source:"iana"},"audio/32kadpcm":{source:"iana"},"audio/3gpp":{source:"iana",compressible:!1,extensions:["3gpp"]},"audio/3gpp2":{source:"iana"},"audio/aac":{source:"iana"},"audio/ac3":{source:"iana"},"audio/adpcm":{source:"apache",extensions:["adp"]},"audio/amr":{source:"iana",extensions:["amr"]},"audio/amr-wb":{source:"iana"},"audio/amr-wb+":{source:"iana"},"audio/aptx":{source:"iana"},"audio/asc":{source:"iana"},"audio/atrac-advanced-lossless":{source:"iana"},"audio/atrac-x":{source:"iana"},"audio/atrac3":{source:"iana"},"audio/basic":{source:"iana",compressible:!1,extensions:["au","snd"]},"audio/bv16":{source:"iana"},"audio/bv32":{source:"iana"},"audio/clearmode":{source:"iana"},"audio/cn":{source:"iana"},"audio/dat12":{source:"iana"},"audio/dls":{source:"iana"},"audio/dsr-es201108":{source:"iana"},"audio/dsr-es202050":{source:"iana"},"audio/dsr-es202211":{source:"iana"},"audio/dsr-es202212":{source:"iana"},"audio/dv":{source:"iana"},"audio/dvi4":{source:"iana"},"audio/eac3":{source:"iana"},"audio/encaprtp":{source:"iana"},"audio/evrc":{source:"iana"},"audio/evrc-qcp":{source:"iana"},"audio/evrc0":{source:"iana"},"audio/evrc1":{source:"iana"},"audio/evrcb":{source:"iana"},"audio/evrcb0":{source:"iana"},"audio/evrcb1":{source:"iana"},"audio/evrcnw":{source:"iana"},"audio/evrcnw0":{source:"iana"},"audio/evrcnw1":{source:"iana"},"audio/evrcwb":{source:"iana"},"audio/evrcwb0":{source:"iana"},"audio/evrcwb1":{source:"iana"},"audio/evs":{source:"iana"},"audio/flexfec":{source:"iana"},"audio/fwdred":{source:"iana"},"audio/g711-0":{source:"iana"},"audio/g719":{source:"iana"},"audio/g722":{source:"iana"},"audio/g7221":{source:"iana"},"audio/g723":{source:"iana"},"audio/g726-16":{source:"iana"},"audio/g726-24":{source:"iana"},"audio/g726-32":{source:"iana"},"audio/g726-40":{source:"iana"},"audio/g728":{source:"iana"},"audio/g729":{source:"iana"},"audio/g7291":{source:"iana"},"audio/g729d":{source:"iana"},"audio/g729e":{source:"iana"},"audio/gsm":{source:"iana"},"audio/gsm-efr":{source:"iana"},"audio/gsm-hr-08":{source:"iana"},"audio/ilbc":{source:"iana"},"audio/ip-mr_v2.5":{source:"iana"},"audio/isac":{source:"apache"},"audio/l16":{source:"iana"},"audio/l20":{source:"iana"},"audio/l24":{source:"iana",compressible:!1},"audio/l8":{source:"iana"},"audio/lpc":{source:"iana"},"audio/melp":{source:"iana"},"audio/melp1200":{source:"iana"},"audio/melp2400":{source:"iana"},"audio/melp600":{source:"iana"},"audio/mhas":{source:"iana"},"audio/midi":{source:"apache",extensions:["mid","midi","kar","rmi"]},"audio/mobile-xmf":{source:"iana",extensions:["mxmf"]},"audio/mp3":{compressible:!1,extensions:["mp3"]},"audio/mp4":{source:"iana",compressible:!1,extensions:["m4a","mp4a"]},"audio/mp4a-latm":{source:"iana"},"audio/mpa":{source:"iana"},"audio/mpa-robust":{source:"iana"},"audio/mpeg":{source:"iana",compressible:!1,extensions:["mpga","mp2","mp2a","mp3","m2a","m3a"]},"audio/mpeg4-generic":{source:"iana"},"audio/musepack":{source:"apache"},"audio/ogg":{source:"iana",compressible:!1,extensions:["oga","ogg","spx","opus"]},"audio/opus":{source:"iana"},"audio/parityfec":{source:"iana"},"audio/pcma":{source:"iana"},"audio/pcma-wb":{source:"iana"},"audio/pcmu":{source:"iana"},"audio/pcmu-wb":{source:"iana"},"audio/prs.sid":{source:"iana"},"audio/qcelp":{source:"iana"},"audio/raptorfec":{source:"iana"},"audio/red":{source:"iana"},"audio/rtp-enc-aescm128":{source:"iana"},"audio/rtp-midi":{source:"iana"},"audio/rtploopback":{source:"iana"},"audio/rtx":{source:"iana"},"audio/s3m":{source:"apache",extensions:["s3m"]},"audio/scip":{source:"iana"},"audio/silk":{source:"apache",extensions:["sil"]},"audio/smv":{source:"iana"},"audio/smv-qcp":{source:"iana"},"audio/smv0":{source:"iana"},"audio/sofa":{source:"iana"},"audio/sp-midi":{source:"iana"},"audio/speex":{source:"iana"},"audio/t140c":{source:"iana"},"audio/t38":{source:"iana"},"audio/telephone-event":{source:"iana"},"audio/tetra_acelp":{source:"iana"},"audio/tetra_acelp_bb":{source:"iana"},"audio/tone":{source:"iana"},"audio/tsvcis":{source:"iana"},"audio/uemclip":{source:"iana"},"audio/ulpfec":{source:"iana"},"audio/usac":{source:"iana"},"audio/vdvi":{source:"iana"},"audio/vmr-wb":{source:"iana"},"audio/vnd.3gpp.iufp":{source:"iana"},"audio/vnd.4sb":{source:"iana"},"audio/vnd.audiokoz":{source:"iana"},"audio/vnd.celp":{source:"iana"},"audio/vnd.cisco.nse":{source:"iana"},"audio/vnd.cmles.radio-events":{source:"iana"},"audio/vnd.cns.anp1":{source:"iana"},"audio/vnd.cns.inf1":{source:"iana"},"audio/vnd.dece.audio":{source:"iana",extensions:["uva","uvva"]},"audio/vnd.digital-winds":{source:"iana",extensions:["eol"]},"audio/vnd.dlna.adts":{source:"iana"},"audio/vnd.dolby.heaac.1":{source:"iana"},"audio/vnd.dolby.heaac.2":{source:"iana"},"audio/vnd.dolby.mlp":{source:"iana"},"audio/vnd.dolby.mps":{source:"iana"},"audio/vnd.dolby.pl2":{source:"iana"},"audio/vnd.dolby.pl2x":{source:"iana"},"audio/vnd.dolby.pl2z":{source:"iana"},"audio/vnd.dolby.pulse.1":{source:"iana"},"audio/vnd.dra":{source:"iana",extensions:["dra"]},"audio/vnd.dts":{source:"iana",extensions:["dts"]},"audio/vnd.dts.hd":{source:"iana",extensions:["dtshd"]},"audio/vnd.dts.uhd":{source:"iana"},"audio/vnd.dvb.file":{source:"iana"},"audio/vnd.everad.plj":{source:"iana"},"audio/vnd.hns.audio":{source:"iana"},"audio/vnd.lucent.voice":{source:"iana",extensions:["lvp"]},"audio/vnd.ms-playready.media.pya":{source:"iana",extensions:["pya"]},"audio/vnd.nokia.mobile-xmf":{source:"iana"},"audio/vnd.nortel.vbk":{source:"iana"},"audio/vnd.nuera.ecelp4800":{source:"iana",extensions:["ecelp4800"]},"audio/vnd.nuera.ecelp7470":{source:"iana",extensions:["ecelp7470"]},"audio/vnd.nuera.ecelp9600":{source:"iana",extensions:["ecelp9600"]},"audio/vnd.octel.sbc":{source:"iana"},"audio/vnd.presonus.multitrack":{source:"iana"},"audio/vnd.qcelp":{source:"iana"},"audio/vnd.rhetorex.32kadpcm":{source:"iana"},"audio/vnd.rip":{source:"iana",extensions:["rip"]},"audio/vnd.rn-realaudio":{compressible:!1},"audio/vnd.sealedmedia.softseal.mpeg":{source:"iana"},"audio/vnd.vmx.cvsd":{source:"iana"},"audio/vnd.wave":{compressible:!1},"audio/vorbis":{source:"iana",compressible:!1},"audio/vorbis-config":{source:"iana"},"audio/wav":{compressible:!1,extensions:["wav"]},"audio/wave":{compressible:!1,extensions:["wav"]},"audio/webm":{source:"apache",compressible:!1,extensions:["weba"]},"audio/x-aac":{source:"apache",compressible:!1,extensions:["aac"]},"audio/x-aiff":{source:"apache",extensions:["aif","aiff","aifc"]},"audio/x-caf":{source:"apache",compressible:!1,extensions:["caf"]},"audio/x-flac":{source:"apache",extensions:["flac"]},"audio/x-m4a":{source:"nginx",extensions:["m4a"]},"audio/x-matroska":{source:"apache",extensions:["mka"]},"audio/x-mpegurl":{source:"apache",extensions:["m3u"]},"audio/x-ms-wax":{source:"apache",extensions:["wax"]},"audio/x-ms-wma":{source:"apache",extensions:["wma"]},"audio/x-pn-realaudio":{source:"apache",extensions:["ram","ra"]},"audio/x-pn-realaudio-plugin":{source:"apache",extensions:["rmp"]},"audio/x-realaudio":{source:"nginx",extensions:["ra"]},"audio/x-tta":{source:"apache"},"audio/x-wav":{source:"apache",extensions:["wav"]},"audio/xm":{source:"apache",extensions:["xm"]},"chemical/x-cdx":{source:"apache",extensions:["cdx"]},"chemical/x-cif":{source:"apache",extensions:["cif"]},"chemical/x-cmdf":{source:"apache",extensions:["cmdf"]},"chemical/x-cml":{source:"apache",extensions:["cml"]},"chemical/x-csml":{source:"apache",extensions:["csml"]},"chemical/x-pdb":{source:"apache"},"chemical/x-xyz":{source:"apache",extensions:["xyz"]},"font/collection":{source:"iana",extensions:["ttc"]},"font/otf":{source:"iana",compressible:!0,extensions:["otf"]},"font/sfnt":{source:"iana"},"font/ttf":{source:"iana",compressible:!0,extensions:["ttf"]},"font/woff":{source:"iana",extensions:["woff"]},"font/woff2":{source:"iana",extensions:["woff2"]},"image/aces":{source:"iana",extensions:["exr"]},"image/apng":{compressible:!1,extensions:["apng"]},"image/avci":{source:"iana",extensions:["avci"]},"image/avcs":{source:"iana",extensions:["avcs"]},"image/avif":{source:"iana",compressible:!1,extensions:["avif"]},"image/bmp":{source:"iana",compressible:!0,extensions:["bmp"]},"image/cgm":{source:"iana",extensions:["cgm"]},"image/dicom-rle":{source:"iana",extensions:["drle"]},"image/emf":{source:"iana",extensions:["emf"]},"image/fits":{source:"iana",extensions:["fits"]},"image/g3fax":{source:"iana",extensions:["g3"]},"image/gif":{source:"iana",compressible:!1,extensions:["gif"]},"image/heic":{source:"iana",extensions:["heic"]},"image/heic-sequence":{source:"iana",extensions:["heics"]},"image/heif":{source:"iana",extensions:["heif"]},"image/heif-sequence":{source:"iana",extensions:["heifs"]},"image/hej2k":{source:"iana",extensions:["hej2"]},"image/hsj2":{source:"iana",extensions:["hsj2"]},"image/ief":{source:"iana",extensions:["ief"]},"image/jls":{source:"iana",extensions:["jls"]},"image/jp2":{source:"iana",compressible:!1,extensions:["jp2","jpg2"]},"image/jpeg":{source:"iana",compressible:!1,extensions:["jpeg","jpg","jpe"]},"image/jph":{source:"iana",extensions:["jph"]},"image/jphc":{source:"iana",extensions:["jhc"]},"image/jpm":{source:"iana",compressible:!1,extensions:["jpm"]},"image/jpx":{source:"iana",compressible:!1,extensions:["jpx","jpf"]},"image/jxr":{source:"iana",extensions:["jxr"]},"image/jxra":{source:"iana",extensions:["jxra"]},"image/jxrs":{source:"iana",extensions:["jxrs"]},"image/jxs":{source:"iana",extensions:["jxs"]},"image/jxsc":{source:"iana",extensions:["jxsc"]},"image/jxsi":{source:"iana",extensions:["jxsi"]},"image/jxss":{source:"iana",extensions:["jxss"]},"image/ktx":{source:"iana",extensions:["ktx"]},"image/ktx2":{source:"iana",extensions:["ktx2"]},"image/naplps":{source:"iana"},"image/pjpeg":{compressible:!1},"image/png":{source:"iana",compressible:!1,extensions:["png"]},"image/prs.btif":{source:"iana",extensions:["btif"]},"image/prs.pti":{source:"iana",extensions:["pti"]},"image/pwg-raster":{source:"iana"},"image/sgi":{source:"apache",extensions:["sgi"]},"image/svg+xml":{source:"iana",compressible:!0,extensions:["svg","svgz"]},"image/t38":{source:"iana",extensions:["t38"]},"image/tiff":{source:"iana",compressible:!1,extensions:["tif","tiff"]},"image/tiff-fx":{source:"iana",extensions:["tfx"]},"image/vnd.adobe.photoshop":{source:"iana",compressible:!0,extensions:["psd"]},"image/vnd.airzip.accelerator.azv":{source:"iana",extensions:["azv"]},"image/vnd.cns.inf2":{source:"iana"},"image/vnd.dece.graphic":{source:"iana",extensions:["uvi","uvvi","uvg","uvvg"]},"image/vnd.djvu":{source:"iana",extensions:["djvu","djv"]},"image/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"image/vnd.dwg":{source:"iana",extensions:["dwg"]},"image/vnd.dxf":{source:"iana",extensions:["dxf"]},"image/vnd.fastbidsheet":{source:"iana",extensions:["fbs"]},"image/vnd.fpx":{source:"iana",extensions:["fpx"]},"image/vnd.fst":{source:"iana",extensions:["fst"]},"image/vnd.fujixerox.edmics-mmr":{source:"iana",extensions:["mmr"]},"image/vnd.fujixerox.edmics-rlc":{source:"iana",extensions:["rlc"]},"image/vnd.globalgraphics.pgb":{source:"iana"},"image/vnd.microsoft.icon":{source:"iana",compressible:!0,extensions:["ico"]},"image/vnd.mix":{source:"iana"},"image/vnd.mozilla.apng":{source:"iana"},"image/vnd.ms-dds":{compressible:!0,extensions:["dds"]},"image/vnd.ms-modi":{source:"iana",extensions:["mdi"]},"image/vnd.ms-photo":{source:"apache",extensions:["wdp"]},"image/vnd.net-fpx":{source:"iana",extensions:["npx"]},"image/vnd.pco.b16":{source:"iana",extensions:["b16"]},"image/vnd.radiance":{source:"iana"},"image/vnd.sealed.png":{source:"iana"},"image/vnd.sealedmedia.softseal.gif":{source:"iana"},"image/vnd.sealedmedia.softseal.jpg":{source:"iana"},"image/vnd.svf":{source:"iana"},"image/vnd.tencent.tap":{source:"iana",extensions:["tap"]},"image/vnd.valve.source.texture":{source:"iana",extensions:["vtf"]},"image/vnd.wap.wbmp":{source:"iana",extensions:["wbmp"]},"image/vnd.xiff":{source:"iana",extensions:["xif"]},"image/vnd.zbrush.pcx":{source:"iana",extensions:["pcx"]},"image/webp":{source:"apache",extensions:["webp"]},"image/wmf":{source:"iana",extensions:["wmf"]},"image/x-3ds":{source:"apache",extensions:["3ds"]},"image/x-cmu-raster":{source:"apache",extensions:["ras"]},"image/x-cmx":{source:"apache",extensions:["cmx"]},"image/x-freehand":{source:"apache",extensions:["fh","fhc","fh4","fh5","fh7"]},"image/x-icon":{source:"apache",compressible:!0,extensions:["ico"]},"image/x-jng":{source:"nginx",extensions:["jng"]},"image/x-mrsid-image":{source:"apache",extensions:["sid"]},"image/x-ms-bmp":{source:"nginx",compressible:!0,extensions:["bmp"]},"image/x-pcx":{source:"apache",extensions:["pcx"]},"image/x-pict":{source:"apache",extensions:["pic","pct"]},"image/x-portable-anymap":{source:"apache",extensions:["pnm"]},"image/x-portable-bitmap":{source:"apache",extensions:["pbm"]},"image/x-portable-graymap":{source:"apache",extensions:["pgm"]},"image/x-portable-pixmap":{source:"apache",extensions:["ppm"]},"image/x-rgb":{source:"apache",extensions:["rgb"]},"image/x-tga":{source:"apache",extensions:["tga"]},"image/x-xbitmap":{source:"apache",extensions:["xbm"]},"image/x-xcf":{compressible:!1},"image/x-xpixmap":{source:"apache",extensions:["xpm"]},"image/x-xwindowdump":{source:"apache",extensions:["xwd"]},"message/cpim":{source:"iana"},"message/delivery-status":{source:"iana"},"message/disposition-notification":{source:"iana",extensions:["disposition-notification"]},"message/external-body":{source:"iana"},"message/feedback-report":{source:"iana"},"message/global":{source:"iana",extensions:["u8msg"]},"message/global-delivery-status":{source:"iana",extensions:["u8dsn"]},"message/global-disposition-notification":{source:"iana",extensions:["u8mdn"]},"message/global-headers":{source:"iana",extensions:["u8hdr"]},"message/http":{source:"iana",compressible:!1},"message/imdn+xml":{source:"iana",compressible:!0},"message/news":{source:"iana"},"message/partial":{source:"iana",compressible:!1},"message/rfc822":{source:"iana",compressible:!0,extensions:["eml","mime"]},"message/s-http":{source:"iana"},"message/sip":{source:"iana"},"message/sipfrag":{source:"iana"},"message/tracking-status":{source:"iana"},"message/vnd.si.simp":{source:"iana"},"message/vnd.wfa.wsc":{source:"iana",extensions:["wsc"]},"model/3mf":{source:"iana",extensions:["3mf"]},"model/e57":{source:"iana"},"model/gltf+json":{source:"iana",compressible:!0,extensions:["gltf"]},"model/gltf-binary":{source:"iana",compressible:!0,extensions:["glb"]},"model/iges":{source:"iana",compressible:!1,extensions:["igs","iges"]},"model/mesh":{source:"iana",compressible:!1,extensions:["msh","mesh","silo"]},"model/mtl":{source:"iana",extensions:["mtl"]},"model/obj":{source:"iana",extensions:["obj"]},"model/step":{source:"iana"},"model/step+xml":{source:"iana",compressible:!0,extensions:["stpx"]},"model/step+zip":{source:"iana",compressible:!1,extensions:["stpz"]},"model/step-xml+zip":{source:"iana",compressible:!1,extensions:["stpxz"]},"model/stl":{source:"iana",extensions:["stl"]},"model/vnd.collada+xml":{source:"iana",compressible:!0,extensions:["dae"]},"model/vnd.dwf":{source:"iana",extensions:["dwf"]},"model/vnd.flatland.3dml":{source:"iana"},"model/vnd.gdl":{source:"iana",extensions:["gdl"]},"model/vnd.gs-gdl":{source:"apache"},"model/vnd.gs.gdl":{source:"iana"},"model/vnd.gtw":{source:"iana",extensions:["gtw"]},"model/vnd.moml+xml":{source:"iana",compressible:!0},"model/vnd.mts":{source:"iana",extensions:["mts"]},"model/vnd.opengex":{source:"iana",extensions:["ogex"]},"model/vnd.parasolid.transmit.binary":{source:"iana",extensions:["x_b"]},"model/vnd.parasolid.transmit.text":{source:"iana",extensions:["x_t"]},"model/vnd.pytha.pyox":{source:"iana"},"model/vnd.rosette.annotated-data-model":{source:"iana"},"model/vnd.sap.vds":{source:"iana",extensions:["vds"]},"model/vnd.usdz+zip":{source:"iana",compressible:!1,extensions:["usdz"]},"model/vnd.valve.source.compiled-map":{source:"iana",extensions:["bsp"]},"model/vnd.vtu":{source:"iana",extensions:["vtu"]},"model/vrml":{source:"iana",compressible:!1,extensions:["wrl","vrml"]},"model/x3d+binary":{source:"apache",compressible:!1,extensions:["x3db","x3dbz"]},"model/x3d+fastinfoset":{source:"iana",extensions:["x3db"]},"model/x3d+vrml":{source:"apache",compressible:!1,extensions:["x3dv","x3dvz"]},"model/x3d+xml":{source:"iana",compressible:!0,extensions:["x3d","x3dz"]},"model/x3d-vrml":{source:"iana",extensions:["x3dv"]},"multipart/alternative":{source:"iana",compressible:!1},"multipart/appledouble":{source:"iana"},"multipart/byteranges":{source:"iana"},"multipart/digest":{source:"iana"},"multipart/encrypted":{source:"iana",compressible:!1},"multipart/form-data":{source:"iana",compressible:!1},"multipart/header-set":{source:"iana"},"multipart/mixed":{source:"iana"},"multipart/multilingual":{source:"iana"},"multipart/parallel":{source:"iana"},"multipart/related":{source:"iana",compressible:!1},"multipart/report":{source:"iana"},"multipart/signed":{source:"iana",compressible:!1},"multipart/vnd.bint.med-plus":{source:"iana"},"multipart/voice-message":{source:"iana"},"multipart/x-mixed-replace":{source:"iana"},"text/1d-interleaved-parityfec":{source:"iana"},"text/cache-manifest":{source:"iana",compressible:!0,extensions:["appcache","manifest"]},"text/calendar":{source:"iana",extensions:["ics","ifb"]},"text/calender":{compressible:!0},"text/cmd":{compressible:!0},"text/coffeescript":{extensions:["coffee","litcoffee"]},"text/cql":{source:"iana"},"text/cql-expression":{source:"iana"},"text/cql-identifier":{source:"iana"},"text/css":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["css"]},"text/csv":{source:"iana",compressible:!0,extensions:["csv"]},"text/csv-schema":{source:"iana"},"text/directory":{source:"iana"},"text/dns":{source:"iana"},"text/ecmascript":{source:"iana"},"text/encaprtp":{source:"iana"},"text/enriched":{source:"iana"},"text/fhirpath":{source:"iana"},"text/flexfec":{source:"iana"},"text/fwdred":{source:"iana"},"text/gff3":{source:"iana"},"text/grammar-ref-list":{source:"iana"},"text/html":{source:"iana",compressible:!0,extensions:["html","htm","shtml"]},"text/jade":{extensions:["jade"]},"text/javascript":{source:"iana",compressible:!0},"text/jcr-cnd":{source:"iana"},"text/jsx":{compressible:!0,extensions:["jsx"]},"text/less":{compressible:!0,extensions:["less"]},"text/markdown":{source:"iana",compressible:!0,extensions:["markdown","md"]},"text/mathml":{source:"nginx",extensions:["mml"]},"text/mdx":{compressible:!0,extensions:["mdx"]},"text/mizar":{source:"iana"},"text/n3":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["n3"]},"text/parameters":{source:"iana",charset:"UTF-8"},"text/parityfec":{source:"iana"},"text/plain":{source:"iana",compressible:!0,extensions:["txt","text","conf","def","list","log","in","ini"]},"text/provenance-notation":{source:"iana",charset:"UTF-8"},"text/prs.fallenstein.rst":{source:"iana"},"text/prs.lines.tag":{source:"iana",extensions:["dsc"]},"text/prs.prop.logic":{source:"iana"},"text/raptorfec":{source:"iana"},"text/red":{source:"iana"},"text/rfc822-headers":{source:"iana"},"text/richtext":{source:"iana",compressible:!0,extensions:["rtx"]},"text/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"text/rtp-enc-aescm128":{source:"iana"},"text/rtploopback":{source:"iana"},"text/rtx":{source:"iana"},"text/sgml":{source:"iana",extensions:["sgml","sgm"]},"text/shaclc":{source:"iana"},"text/shex":{source:"iana",extensions:["shex"]},"text/slim":{extensions:["slim","slm"]},"text/spdx":{source:"iana",extensions:["spdx"]},"text/strings":{source:"iana"},"text/stylus":{extensions:["stylus","styl"]},"text/t140":{source:"iana"},"text/tab-separated-values":{source:"iana",compressible:!0,extensions:["tsv"]},"text/troff":{source:"iana",extensions:["t","tr","roff","man","me","ms"]},"text/turtle":{source:"iana",charset:"UTF-8",extensions:["ttl"]},"text/ulpfec":{source:"iana"},"text/uri-list":{source:"iana",compressible:!0,extensions:["uri","uris","urls"]},"text/vcard":{source:"iana",compressible:!0,extensions:["vcard"]},"text/vnd.a":{source:"iana"},"text/vnd.abc":{source:"iana"},"text/vnd.ascii-art":{source:"iana"},"text/vnd.curl":{source:"iana",extensions:["curl"]},"text/vnd.curl.dcurl":{source:"apache",extensions:["dcurl"]},"text/vnd.curl.mcurl":{source:"apache",extensions:["mcurl"]},"text/vnd.curl.scurl":{source:"apache",extensions:["scurl"]},"text/vnd.debian.copyright":{source:"iana",charset:"UTF-8"},"text/vnd.dmclientscript":{source:"iana"},"text/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"text/vnd.esmertec.theme-descriptor":{source:"iana",charset:"UTF-8"},"text/vnd.familysearch.gedcom":{source:"iana",extensions:["ged"]},"text/vnd.ficlab.flt":{source:"iana"},"text/vnd.fly":{source:"iana",extensions:["fly"]},"text/vnd.fmi.flexstor":{source:"iana",extensions:["flx"]},"text/vnd.gml":{source:"iana"},"text/vnd.graphviz":{source:"iana",extensions:["gv"]},"text/vnd.hans":{source:"iana"},"text/vnd.hgl":{source:"iana"},"text/vnd.in3d.3dml":{source:"iana",extensions:["3dml"]},"text/vnd.in3d.spot":{source:"iana",extensions:["spot"]},"text/vnd.iptc.newsml":{source:"iana"},"text/vnd.iptc.nitf":{source:"iana"},"text/vnd.latex-z":{source:"iana"},"text/vnd.motorola.reflex":{source:"iana"},"text/vnd.ms-mediapackage":{source:"iana"},"text/vnd.net2phone.commcenter.command":{source:"iana"},"text/vnd.radisys.msml-basic-layout":{source:"iana"},"text/vnd.senx.warpscript":{source:"iana"},"text/vnd.si.uricatalogue":{source:"iana"},"text/vnd.sosi":{source:"iana"},"text/vnd.sun.j2me.app-descriptor":{source:"iana",charset:"UTF-8",extensions:["jad"]},"text/vnd.trolltech.linguist":{source:"iana",charset:"UTF-8"},"text/vnd.wap.si":{source:"iana"},"text/vnd.wap.sl":{source:"iana"},"text/vnd.wap.wml":{source:"iana",extensions:["wml"]},"text/vnd.wap.wmlscript":{source:"iana",extensions:["wmls"]},"text/vtt":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["vtt"]},"text/x-asm":{source:"apache",extensions:["s","asm"]},"text/x-c":{source:"apache",extensions:["c","cc","cxx","cpp","h","hh","dic"]},"text/x-component":{source:"nginx",extensions:["htc"]},"text/x-fortran":{source:"apache",extensions:["f","for","f77","f90"]},"text/x-gwt-rpc":{compressible:!0},"text/x-handlebars-template":{extensions:["hbs"]},"text/x-java-source":{source:"apache",extensions:["java"]},"text/x-jquery-tmpl":{compressible:!0},"text/x-lua":{extensions:["lua"]},"text/x-markdown":{compressible:!0,extensions:["mkd"]},"text/x-nfo":{source:"apache",extensions:["nfo"]},"text/x-opml":{source:"apache",extensions:["opml"]},"text/x-org":{compressible:!0,extensions:["org"]},"text/x-pascal":{source:"apache",extensions:["p","pas"]},"text/x-processing":{compressible:!0,extensions:["pde"]},"text/x-sass":{extensions:["sass"]},"text/x-scss":{extensions:["scss"]},"text/x-setext":{source:"apache",extensions:["etx"]},"text/x-sfv":{source:"apache",extensions:["sfv"]},"text/x-suse-ymp":{compressible:!0,extensions:["ymp"]},"text/x-uuencode":{source:"apache",extensions:["uu"]},"text/x-vcalendar":{source:"apache",extensions:["vcs"]},"text/x-vcard":{source:"apache",extensions:["vcf"]},"text/xml":{source:"iana",compressible:!0,extensions:["xml"]},"text/xml-external-parsed-entity":{source:"iana"},"text/yaml":{compressible:!0,extensions:["yaml","yml"]},"video/1d-interleaved-parityfec":{source:"iana"},"video/3gpp":{source:"iana",extensions:["3gp","3gpp"]},"video/3gpp-tt":{source:"iana"},"video/3gpp2":{source:"iana",extensions:["3g2"]},"video/av1":{source:"iana"},"video/bmpeg":{source:"iana"},"video/bt656":{source:"iana"},"video/celb":{source:"iana"},"video/dv":{source:"iana"},"video/encaprtp":{source:"iana"},"video/ffv1":{source:"iana"},"video/flexfec":{source:"iana"},"video/h261":{source:"iana",extensions:["h261"]},"video/h263":{source:"iana",extensions:["h263"]},"video/h263-1998":{source:"iana"},"video/h263-2000":{source:"iana"},"video/h264":{source:"iana",extensions:["h264"]},"video/h264-rcdo":{source:"iana"},"video/h264-svc":{source:"iana"},"video/h265":{source:"iana"},"video/iso.segment":{source:"iana",extensions:["m4s"]},"video/jpeg":{source:"iana",extensions:["jpgv"]},"video/jpeg2000":{source:"iana"},"video/jpm":{source:"apache",extensions:["jpm","jpgm"]},"video/jxsv":{source:"iana"},"video/mj2":{source:"iana",extensions:["mj2","mjp2"]},"video/mp1s":{source:"iana"},"video/mp2p":{source:"iana"},"video/mp2t":{source:"iana",extensions:["ts"]},"video/mp4":{source:"iana",compressible:!1,extensions:["mp4","mp4v","mpg4"]},"video/mp4v-es":{source:"iana"},"video/mpeg":{source:"iana",compressible:!1,extensions:["mpeg","mpg","mpe","m1v","m2v"]},"video/mpeg4-generic":{source:"iana"},"video/mpv":{source:"iana"},"video/nv":{source:"iana"},"video/ogg":{source:"iana",compressible:!1,extensions:["ogv"]},"video/parityfec":{source:"iana"},"video/pointer":{source:"iana"},"video/quicktime":{source:"iana",compressible:!1,extensions:["qt","mov"]},"video/raptorfec":{source:"iana"},"video/raw":{source:"iana"},"video/rtp-enc-aescm128":{source:"iana"},"video/rtploopback":{source:"iana"},"video/rtx":{source:"iana"},"video/scip":{source:"iana"},"video/smpte291":{source:"iana"},"video/smpte292m":{source:"iana"},"video/ulpfec":{source:"iana"},"video/vc1":{source:"iana"},"video/vc2":{source:"iana"},"video/vnd.cctv":{source:"iana"},"video/vnd.dece.hd":{source:"iana",extensions:["uvh","uvvh"]},"video/vnd.dece.mobile":{source:"iana",extensions:["uvm","uvvm"]},"video/vnd.dece.mp4":{source:"iana"},"video/vnd.dece.pd":{source:"iana",extensions:["uvp","uvvp"]},"video/vnd.dece.sd":{source:"iana",extensions:["uvs","uvvs"]},"video/vnd.dece.video":{source:"iana",extensions:["uvv","uvvv"]},"video/vnd.directv.mpeg":{source:"iana"},"video/vnd.directv.mpeg-tts":{source:"iana"},"video/vnd.dlna.mpeg-tts":{source:"iana"},"video/vnd.dvb.file":{source:"iana",extensions:["dvb"]},"video/vnd.fvt":{source:"iana",extensions:["fvt"]},"video/vnd.hns.video":{source:"iana"},"video/vnd.iptvforum.1dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.1dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.2dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.2dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.ttsavc":{source:"iana"},"video/vnd.iptvforum.ttsmpeg2":{source:"iana"},"video/vnd.motorola.video":{source:"iana"},"video/vnd.motorola.videop":{source:"iana"},"video/vnd.mpegurl":{source:"iana",extensions:["mxu","m4u"]},"video/vnd.ms-playready.media.pyv":{source:"iana",extensions:["pyv"]},"video/vnd.nokia.interleaved-multimedia":{source:"iana"},"video/vnd.nokia.mp4vr":{source:"iana"},"video/vnd.nokia.videovoip":{source:"iana"},"video/vnd.objectvideo":{source:"iana"},"video/vnd.radgamettools.bink":{source:"iana"},"video/vnd.radgamettools.smacker":{source:"iana"},"video/vnd.sealed.mpeg1":{source:"iana"},"video/vnd.sealed.mpeg4":{source:"iana"},"video/vnd.sealed.swf":{source:"iana"},"video/vnd.sealedmedia.softseal.mov":{source:"iana"},"video/vnd.uvvu.mp4":{source:"iana",extensions:["uvu","uvvu"]},"video/vnd.vivo":{source:"iana",extensions:["viv"]},"video/vnd.youtube.yt":{source:"iana"},"video/vp8":{source:"iana"},"video/vp9":{source:"iana"},"video/webm":{source:"apache",compressible:!1,extensions:["webm"]},"video/x-f4v":{source:"apache",extensions:["f4v"]},"video/x-fli":{source:"apache",extensions:["fli"]},"video/x-flv":{source:"apache",compressible:!1,extensions:["flv"]},"video/x-m4v":{source:"apache",extensions:["m4v"]},"video/x-matroska":{source:"apache",compressible:!1,extensions:["mkv","mk3d","mks"]},"video/x-mng":{source:"apache",extensions:["mng"]},"video/x-ms-asf":{source:"apache",extensions:["asf","asx"]},"video/x-ms-vob":{source:"apache",extensions:["vob"]},"video/x-ms-wm":{source:"apache",extensions:["wm"]},"video/x-ms-wmv":{source:"apache",compressible:!1,extensions:["wmv"]},"video/x-ms-wmx":{source:"apache",extensions:["wmx"]},"video/x-ms-wvx":{source:"apache",extensions:["wvx"]},"video/x-msvideo":{source:"apache",extensions:["avi"]},"video/x-sgi-movie":{source:"apache",extensions:["movie"]},"video/x-smv":{source:"apache",extensions:["smv"]},"x-conference/x-cooltalk":{source:"apache",extensions:["ice"]},"x-shader/x-fragment":{compressible:!0},"x-shader/x-vertex":{compressible:!0}}});var l8=te((_1e,c8)=>{"use strict";c8.exports=u8()});var QT=te(Fs=>{"use strict";var PE=l8(),Ire=Ge("path").extname,f8=/^\s*([^;\s]*)(?:;|\s|$)/,_re=/^text\//i;Fs.charset=h8;Fs.charsets={lookup:h8};Fs.contentType=Dre;Fs.extension=Bre;Fs.extensions=Object.create(null);Fs.lookup=Rre;Fs.types=Object.create(null);Ore(Fs.extensions,Fs.types);function h8(r){if(!r||typeof r!="string")return!1;var e=f8.exec(r),t=e&&PE[e[1].toLowerCase()];return t&&t.charset?t.charset:e&&_re.test(e[1])?"UTF-8":!1}o(h8,"charset");function Dre(r){if(!r||typeof r!="string")return!1;var e=r.indexOf("/")===-1?Fs.lookup(r):r;if(!e)return!1;if(e.indexOf("charset")===-1){var t=Fs.charset(e);t&&(e+="; charset="+t.toLowerCase())}return e}o(Dre,"contentType");function Bre(r){if(!r||typeof r!="string")return!1;var e=f8.exec(r),t=e&&Fs.extensions[e[1].toLowerCase()];return!t||!t.length?!1:t[0]}o(Bre,"extension");function Rre(r){if(!r||typeof r!="string")return!1;var e=Ire("x."+r).toLowerCase().substr(1);return e&&Fs.types[e]||!1}o(Rre,"lookup");function Ore(r,e){var t=["nginx","apache",void 0,"iana"];Object.keys(PE).forEach(o(function(s){var i=PE[s],a=i.extensions;if(!(!a||!a.length)){r[s]=a;for(var u=0;u<a.length;u++){var c=a[u];if(e[c]){var l=t.indexOf(PE[e[c]].source),h=t.indexOf(i.source);if(e[c]!=="application/octet-stream"&&(l>h||l===h&&e[c].substr(0,12)==="application/"))continue}e[c]=s}}},"forEachMimeType"))}o(Ore,"populateMaps")});var d8=te((R1e,p8)=>{"use strict";p8.exports=Pre;function Pre(r){var e=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;e?e(r):setTimeout(r,0)}o(Pre,"defer")});var ZT=te((P1e,g8)=>{"use strict";var m8=d8();g8.exports=kre;function kre(r){var e=!1;return m8(function(){e=!0}),o(function(n,s){e?r(n,s):m8(o(function(){r(n,s)},"nextTick_callback"))},"async_callback")}o(kre,"async")});var eI=te((L1e,v8)=>{"use strict";v8.exports=Lre;function Lre(r){Object.keys(r.jobs).forEach(Vre.bind(r)),r.jobs={}}o(Lre,"abort");function Vre(r){typeof this.jobs[r]=="function"&&this.jobs[r]()}o(Vre,"clean")});var tI=te((U1e,x8)=>{"use strict";var y8=ZT(),Ure=eI();x8.exports=jre;function jre(r,e,t,n){var s=t.keyedList?t.keyedList[t.index]:t.index;t.jobs[s]=Fre(e,s,r[s],function(i,a){s in t.jobs&&(delete t.jobs[s],i?Ure(t):t.results[s]=a,n(i,t.results))})}o(jre,"iterate");function Fre(r,e,t,n){var s;return r.length==2?s=r(t,y8(n)):s=r(t,e,y8(n)),s}o(Fre,"runJob")});var rI=te((F1e,w8)=>{"use strict";w8.exports=Mre;function Mre(r,e){var t=!Array.isArray(r),n={index:0,keyedList:t||e?Object.keys(r):null,jobs:{},results:t?{}:[],size:t?Object.keys(r).length:r.length};return e&&n.keyedList.sort(t?e:function(s,i){return e(r[s],r[i])}),n}o(Mre,"state")});var nI=te((q1e,E8)=>{"use strict";var qre=eI(),Hre=ZT();E8.exports=Kre;function Kre(r){Object.keys(this.jobs).length&&(this.index=this.size,qre(this),Hre(r)(null,this.results))}o(Kre,"terminator")});var b8=te((K1e,S8)=>{"use strict";var $re=tI(),Gre=rI(),Xre=nI();S8.exports=Wre;function Wre(r,e,t){for(var n=Gre(r);n.index<(n.keyedList||r).length;)$re(r,e,n,function(s,i){if(s){t(s,i);return}if(Object.keys(n.jobs).length===0){t(null,n.results);return}}),n.index++;return Xre.bind(n,t)}o(Wre,"parallel")});var sI=te((G1e,kE)=>{"use strict";var A8=tI(),zre=rI(),Jre=nI();kE.exports=Yre;kE.exports.ascending=C8;kE.exports.descending=Qre;function Yre(r,e,t,n){var s=zre(r,t);return A8(r,e,s,o(function i(a,u){if(a){n(a,u);return}if(s.index++,s.index<(s.keyedList||r).length){A8(r,e,s,i);return}n(null,s.results)},"iteratorHandler")),Jre.bind(s,n)}o(Yre,"serialOrdered");function C8(r,e){return r<e?-1:r>e?1:0}o(C8,"ascending");function Qre(r,e){return-1*C8(r,e)}o(Qre,"descending")});var T8=te((W1e,N8)=>{"use strict";var Zre=sI();N8.exports=ene;function ene(r,e,t){return Zre(r,e,null,t)}o(ene,"serial")});var iI=te((J1e,I8)=>{"use strict";I8.exports={parallel:b8(),serial:T8(),serialOrdered:sI()}});var aI=te((Y1e,_8)=>{"use strict";_8.exports=Object});var B8=te((Q1e,D8)=>{"use strict";D8.exports=Error});var O8=te((Z1e,R8)=>{"use strict";R8.exports=EvalError});var k8=te((exe,P8)=>{"use strict";P8.exports=RangeError});var V8=te((txe,L8)=>{"use strict";L8.exports=ReferenceError});var j8=te((rxe,U8)=>{"use strict";U8.exports=SyntaxError});var LE=te((nxe,F8)=>{"use strict";F8.exports=TypeError});var q8=te((sxe,M8)=>{"use strict";M8.exports=URIError});var K8=te((ixe,H8)=>{"use strict";H8.exports=Math.abs});var G8=te((axe,$8)=>{"use strict";$8.exports=Math.floor});var W8=te((oxe,X8)=>{"use strict";X8.exports=Math.max});var J8=te((uxe,z8)=>{"use strict";z8.exports=Math.min});var Q8=te((cxe,Y8)=>{"use strict";Y8.exports=Math.pow});var e5=te((lxe,Z8)=>{"use strict";Z8.exports=Math.round});var r5=te((fxe,t5)=>{"use strict";t5.exports=Number.isNaN||o(function(e){return e!==e},"isNaN")});var s5=te((pxe,n5)=>{"use strict";var tne=r5();n5.exports=o(function(e){return tne(e)||e===0?e:e<0?-1:1},"sign")});var a5=te((mxe,i5)=>{"use strict";i5.exports=Object.getOwnPropertyDescriptor});var oI=te((gxe,o5)=>{"use strict";var VE=a5();if(VE)try{VE([],"length")}catch{VE=null}o5.exports=VE});var c5=te((vxe,u5)=>{"use strict";var UE=Object.defineProperty||!1;if(UE)try{UE({},"a",{value:1})}catch{UE=!1}u5.exports=UE});var uI=te((yxe,l5)=>{"use strict";l5.exports=o(function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},t=Symbol("test"),n=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var s=42;e[t]=s;for(var i in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var a=Object.getOwnPropertySymbols(e);if(a.length!==1||a[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var u=Object.getOwnPropertyDescriptor(e,t);if(u.value!==s||u.enumerable!==!0)return!1}return!0},"hasSymbols")});var p5=te((wxe,h5)=>{"use strict";var f5=typeof Symbol<"u"&&Symbol,rne=uI();h5.exports=o(function(){return typeof f5!="function"||typeof Symbol!="function"||typeof f5("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:rne()},"hasNativeSymbols")});var cI=te((Sxe,d5)=>{"use strict";d5.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var lI=te((bxe,m5)=>{"use strict";var nne=aI();m5.exports=nne.getPrototypeOf||null});var y5=te((Axe,v5)=>{"use strict";var sne="Function.prototype.bind called on incompatible ",ine=Object.prototype.toString,ane=Math.max,one="[object Function]",g5=o(function(e,t){for(var n=[],s=0;s<e.length;s+=1)n[s]=e[s];for(var i=0;i<t.length;i+=1)n[i+e.length]=t[i];return n},"concatty"),une=o(function(e,t){for(var n=[],s=t||0,i=0;s<e.length;s+=1,i+=1)n[i]=e[s];return n},"slicy"),cne=o(function(r,e){for(var t="",n=0;n<r.length;n+=1)t+=r[n],n+1<r.length&&(t+=e);return t},"joiny");v5.exports=o(function(e){var t=this;if(typeof t!="function"||ine.apply(t)!==one)throw new TypeError(sne+t);for(var n=une(arguments,1),s,i=o(function(){if(this instanceof s){var h=t.apply(this,g5(n,arguments));return Object(h)===h?h:this}return t.apply(e,g5(n,arguments))},"binder"),a=ane(0,t.length-n.length),u=[],c=0;c<a;c++)u[c]="$"+c;if(s=Function("binder","return function ("+cne(u,",")+"){ return binder.apply(this,arguments); }")(i),t.prototype){var l=o(function(){},"Empty");l.prototype=t.prototype,s.prototype=new l,l.prototype=null}return s},"bind")});var qg=te((Nxe,x5)=>{"use strict";var lne=y5();x5.exports=Function.prototype.bind||lne});var jE=te((Txe,w5)=>{"use strict";w5.exports=Function.prototype.call});var fI=te((Ixe,E5)=>{"use strict";E5.exports=Function.prototype.apply});var b5=te((_xe,S5)=>{"use strict";S5.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var C5=te((Dxe,A5)=>{"use strict";var fne=qg(),hne=fI(),pne=jE(),dne=b5();A5.exports=dne||fne.call(pne,hne)});var T5=te((Bxe,N5)=>{"use strict";var mne=qg(),gne=LE(),vne=jE(),yne=C5();N5.exports=o(function(e){if(e.length<1||typeof e[0]!="function")throw new gne("a function is required");return yne(mne,vne,e)},"callBindBasic")});var O5=te((Oxe,R5)=>{"use strict";var xne=T5(),I5=oI(),D5;try{D5=[].__proto__===Array.prototype}catch(r){if(!r||typeof r!="object"||!("code"in r)||r.code!=="ERR_PROTO_ACCESS")throw r}var hI=!!D5&&I5&&I5(Object.prototype,"__proto__"),B5=Object,_5=B5.getPrototypeOf;R5.exports=hI&&typeof hI.get=="function"?xne([hI.get]):typeof _5=="function"?o(function(e){return _5(e==null?e:B5(e))},"getDunder"):!1});var U5=te((kxe,V5)=>{"use strict";var P5=cI(),k5=lI(),L5=O5();V5.exports=P5?o(function(e){return P5(e)},"getProto"):k5?o(function(e){if(!e||typeof e!="object"&&typeof e!="function")throw new TypeError("getProto: not an object");return k5(e)},"getProto"):L5?o(function(e){return L5(e)},"getProto"):null});var Hg=te((Vxe,j5)=>{"use strict";var wne=Function.prototype.call,Ene=Object.prototype.hasOwnProperty,Sne=qg();j5.exports=Sne.call(wne,Ene)});var G5=te((Uxe,$5)=>{"use strict";var nr,bne=aI(),Ane=B8(),Cne=O8(),Nne=k8(),Tne=V8(),Zp=j8(),Qp=LE(),Ine=q8(),_ne=K8(),Dne=G8(),Bne=W8(),Rne=J8(),One=Q8(),Pne=e5(),kne=s5(),H5=Function,pI=o(function(r){try{return H5('"use strict"; return ('+r+").constructor;")()}catch{}},"getEvalledConstructor"),Kg=oI(),Lne=c5(),dI=o(function(){throw new Qp},"throwTypeError"),Vne=Kg?(function(){try{return arguments.callee,dI}catch{try{return Kg(arguments,"callee").get}catch{return dI}}})():dI,Jp=p5()(),Mn=U5(),Une=lI(),jne=cI(),K5=fI(),$g=jE(),Yp={},Fne=typeof Uint8Array>"u"||!Mn?nr:Mn(Uint8Array),af={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?nr:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?nr:ArrayBuffer,"%ArrayIteratorPrototype%":Jp&&Mn?Mn([][Symbol.iterator]()):nr,"%AsyncFromSyncIteratorPrototype%":nr,"%AsyncFunction%":Yp,"%AsyncGenerator%":Yp,"%AsyncGeneratorFunction%":Yp,"%AsyncIteratorPrototype%":Yp,"%Atomics%":typeof Atomics>"u"?nr:Atomics,"%BigInt%":typeof BigInt>"u"?nr:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?nr:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?nr:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?nr:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Ane,"%eval%":eval,"%EvalError%":Cne,"%Float16Array%":typeof Float16Array>"u"?nr:Float16Array,"%Float32Array%":typeof Float32Array>"u"?nr:Float32Array,"%Float64Array%":typeof Float64Array>"u"?nr:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?nr:FinalizationRegistry,"%Function%":H5,"%GeneratorFunction%":Yp,"%Int8Array%":typeof Int8Array>"u"?nr:Int8Array,"%Int16Array%":typeof Int16Array>"u"?nr:Int16Array,"%Int32Array%":typeof Int32Array>"u"?nr:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Jp&&Mn?Mn(Mn([][Symbol.iterator]())):nr,"%JSON%":typeof JSON=="object"?JSON:nr,"%Map%":typeof Map>"u"?nr:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Jp||!Mn?nr:Mn(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":bne,"%Object.getOwnPropertyDescriptor%":Kg,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?nr:Promise,"%Proxy%":typeof Proxy>"u"?nr:Proxy,"%RangeError%":Nne,"%ReferenceError%":Tne,"%Reflect%":typeof Reflect>"u"?nr:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?nr:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Jp||!Mn?nr:Mn(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?nr:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Jp&&Mn?Mn(""[Symbol.iterator]()):nr,"%Symbol%":Jp?Symbol:nr,"%SyntaxError%":Zp,"%ThrowTypeError%":Vne,"%TypedArray%":Fne,"%TypeError%":Qp,"%Uint8Array%":typeof Uint8Array>"u"?nr:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?nr:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?nr:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?nr:Uint32Array,"%URIError%":Ine,"%WeakMap%":typeof WeakMap>"u"?nr:WeakMap,"%WeakRef%":typeof WeakRef>"u"?nr:WeakRef,"%WeakSet%":typeof WeakSet>"u"?nr:WeakSet,"%Function.prototype.call%":$g,"%Function.prototype.apply%":K5,"%Object.defineProperty%":Lne,"%Object.getPrototypeOf%":Une,"%Math.abs%":_ne,"%Math.floor%":Dne,"%Math.max%":Bne,"%Math.min%":Rne,"%Math.pow%":One,"%Math.round%":Pne,"%Math.sign%":kne,"%Reflect.getPrototypeOf%":jne};if(Mn)try{null.error}catch(r){F5=Mn(Mn(r)),af["%Error.prototype%"]=F5}var F5,Mne=o(function r(e){var t;if(e==="%AsyncFunction%")t=pI("async function () {}");else if(e==="%GeneratorFunction%")t=pI("function* () {}");else if(e==="%AsyncGeneratorFunction%")t=pI("async function* () {}");else if(e==="%AsyncGenerator%"){var n=r("%AsyncGeneratorFunction%");n&&(t=n.prototype)}else if(e==="%AsyncIteratorPrototype%"){var s=r("%AsyncGenerator%");s&&Mn&&(t=Mn(s.prototype))}return af[e]=t,t},"doEval"),M5={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Gg=qg(),FE=Hg(),qne=Gg.call($g,Array.prototype.concat),Hne=Gg.call(K5,Array.prototype.splice),q5=Gg.call($g,String.prototype.replace),ME=Gg.call($g,String.prototype.slice),Kne=Gg.call($g,RegExp.prototype.exec),$ne=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Gne=/\\(\\)?/g,Xne=o(function(e){var t=ME(e,0,1),n=ME(e,-1);if(t==="%"&&n!=="%")throw new Zp("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&t!=="%")throw new Zp("invalid intrinsic syntax, expected opening `%`");var s=[];return q5(e,$ne,function(i,a,u,c){s[s.length]=u?q5(c,Gne,"$1"):a||i}),s},"stringToPath"),Wne=o(function(e,t){var n=e,s;if(FE(M5,n)&&(s=M5[n],n="%"+s[0]+"%"),FE(af,n)){var i=af[n];if(i===Yp&&(i=Mne(n)),typeof i>"u"&&!t)throw new Qp("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:s,name:n,value:i}}throw new Zp("intrinsic "+e+" does not exist!")},"getBaseIntrinsic");$5.exports=o(function(e,t){if(typeof e!="string"||e.length===0)throw new Qp("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof t!="boolean")throw new Qp('"allowMissing" argument must be a boolean');if(Kne(/^%?[^%]*%?$/,e)===null)throw new Zp("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=Xne(e),s=n.length>0?n[0]:"",i=Wne("%"+s+"%",t),a=i.name,u=i.value,c=!1,l=i.alias;l&&(s=l[0],Hne(n,qne([0,1],l)));for(var h=1,m=!0;h<n.length;h+=1){var g=n[h],y=ME(g,0,1),v=ME(g,-1);if((y==='"'||y==="'"||y==="`"||v==='"'||v==="'"||v==="`")&&y!==v)throw new Zp("property names with quotes must have matching quotes");if((g==="constructor"||!m)&&(c=!0),s+="."+g,a="%"+s+"%",FE(af,a))u=af[a];else if(u!=null){if(!(g in u)){if(!t)throw new Qp("base intrinsic for "+e+" exists, but the property is not available.");return}if(Kg&&h+1>=n.length){var E=Kg(u,g);m=!!E,m&&"get"in E&&!("originalValue"in E.get)?u=E.get:u=u[g]}else m=FE(u,g),u=u[g];m&&!c&&(af[a]=u)}}return u},"GetIntrinsic")});var W5=te((Fxe,X5)=>{"use strict";var zne=uI();X5.exports=o(function(){return zne()&&!!Symbol.toStringTag},"hasToStringTagShams")});var mI=te((qxe,J5)=>{"use strict";var Jne=G5(),z5=Jne("%Object.defineProperty%",!0),Yne=W5()(),Qne=Hg(),Zne=LE(),qE=Yne?Symbol.toStringTag:null;J5.exports=o(function(e,t){var n=arguments.length>2&&!!arguments[2]&&arguments[2].force,s=arguments.length>2&&!!arguments[2]&&arguments[2].nonConfigurable;if(typeof n<"u"&&typeof n!="boolean"||typeof s<"u"&&typeof s!="boolean")throw new Zne("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");qE&&(n||!Qne(e,qE))&&(z5?z5(e,qE,{configurable:!s,enumerable:!1,value:t,writable:!1}):e[qE]=t)},"setToStringTag")});var Q5=te((Kxe,Y5)=>{"use strict";Y5.exports=function(r,e){return Object.keys(e).forEach(function(t){r[t]=r[t]||e[t]}),r}});var eV=te(($xe,Z5)=>{"use strict";var xI=YT(),ese=Ge("util"),gI=Ge("path"),tse=Ge("http"),rse=Ge("https"),nse=Ge("url").parse,sse=Ge("fs"),ise=Ge("stream").Stream,ase=Ge("crypto"),vI=QT(),ose=iI(),use=mI(),nc=Hg(),yI=Q5();function lr(r){if(!(this instanceof lr))return new lr(r);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],xI.call(this),r=r||{};for(var e in r)this[e]=r[e]}o(lr,"FormData");ese.inherits(lr,xI);lr.LINE_BREAK=`\r
|
|
47
|
-
`;lr.DEFAULT_CONTENT_TYPE="application/octet-stream";lr.prototype.append=function(r,e,t){t=t||{},typeof t=="string"&&(t={filename:t});var n=xI.prototype.append.bind(this);if((typeof e=="number"||e==null)&&(e=String(e)),Array.isArray(e)){this._error(new Error("Arrays are not supported."));return}var s=this._multiPartHeader(r,e,t),i=this._multiPartFooter();n(s),n(e),n(i),this._trackLength(s,e,t)};lr.prototype._trackLength=function(r,e,t){var n=0;t.knownLength!=null?n+=Number(t.knownLength):Buffer.isBuffer(e)?n=e.length:typeof e=="string"&&(n=Buffer.byteLength(e)),this._valueLength+=n,this._overheadLength+=Buffer.byteLength(r)+lr.LINE_BREAK.length,!(!e||!e.path&&!(e.readable&&nc(e,"httpVersion"))&&!(e instanceof ise))&&(t.knownLength||this._valuesToMeasure.push(e))};lr.prototype._lengthRetriever=function(r,e){nc(r,"fd")?r.end!=null&&r.end!=1/0&&r.start!=null?e(null,r.end+1-(r.start?r.start:0)):sse.stat(r.path,function(t,n){if(t){e(t);return}var s=n.size-(r.start?r.start:0);e(null,s)}):nc(r,"httpVersion")?e(null,Number(r.headers["content-length"])):nc(r,"httpModule")?(r.on("response",function(t){r.pause(),e(null,Number(t.headers["content-length"]))}),r.resume()):e("Unknown stream")};lr.prototype._multiPartHeader=function(r,e,t){if(typeof t.header=="string")return t.header;var n=this._getContentDisposition(e,t),s=this._getContentType(e,t),i="",a={"Content-Disposition":["form-data",'name="'+r+'"'].concat(n||[]),"Content-Type":[].concat(s||[])};typeof t.header=="object"&&yI(a,t.header);var u;for(var c in a)if(nc(a,c)){if(u=a[c],u==null)continue;Array.isArray(u)||(u=[u]),u.length&&(i+=c+": "+u.join("; ")+lr.LINE_BREAK)}return"--"+this.getBoundary()+lr.LINE_BREAK+i+lr.LINE_BREAK};lr.prototype._getContentDisposition=function(r,e){var t;if(typeof e.filepath=="string"?t=gI.normalize(e.filepath).replace(/\\/g,"/"):e.filename||r&&(r.name||r.path)?t=gI.basename(e.filename||r&&(r.name||r.path)):r&&r.readable&&nc(r,"httpVersion")&&(t=gI.basename(r.client._httpMessage.path||"")),t)return'filename="'+t+'"'};lr.prototype._getContentType=function(r,e){var t=e.contentType;return!t&&r&&r.name&&(t=vI.lookup(r.name)),!t&&r&&r.path&&(t=vI.lookup(r.path)),!t&&r&&r.readable&&nc(r,"httpVersion")&&(t=r.headers["content-type"]),!t&&(e.filepath||e.filename)&&(t=vI.lookup(e.filepath||e.filename)),!t&&r&&typeof r=="object"&&(t=lr.DEFAULT_CONTENT_TYPE),t};lr.prototype._multiPartFooter=function(){return(function(r){var e=lr.LINE_BREAK,t=this._streams.length===0;t&&(e+=this._lastBoundary()),r(e)}).bind(this)};lr.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+lr.LINE_BREAK};lr.prototype.getHeaders=function(r){var e,t={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(e in r)nc(r,e)&&(t[e.toLowerCase()]=r[e]);return t};lr.prototype.setBoundary=function(r){if(typeof r!="string")throw new TypeError("FormData boundary must be a string");this._boundary=r};lr.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};lr.prototype.getBuffer=function(){for(var r=new Buffer.alloc(0),e=this.getBoundary(),t=0,n=this._streams.length;t<n;t++)typeof this._streams[t]!="function"&&(Buffer.isBuffer(this._streams[t])?r=Buffer.concat([r,this._streams[t]]):r=Buffer.concat([r,Buffer.from(this._streams[t])]),(typeof this._streams[t]!="string"||this._streams[t].substring(2,e.length+2)!==e)&&(r=Buffer.concat([r,Buffer.from(lr.LINE_BREAK)])));return Buffer.concat([r,Buffer.from(this._lastBoundary())])};lr.prototype._generateBoundary=function(){this._boundary="--------------------------"+ase.randomBytes(12).toString("hex")};lr.prototype.getLengthSync=function(){var r=this._overheadLength+this._valueLength;return this._streams.length&&(r+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),r};lr.prototype.hasKnownLength=function(){var r=!0;return this._valuesToMeasure.length&&(r=!1),r};lr.prototype.getLength=function(r){var e=this._overheadLength+this._valueLength;if(this._streams.length&&(e+=this._lastBoundary().length),!this._valuesToMeasure.length){process.nextTick(r.bind(this,null,e));return}ose.parallel(this._valuesToMeasure,this._lengthRetriever,function(t,n){if(t){r(t);return}n.forEach(function(s){e+=s}),r(null,e)})};lr.prototype.submit=function(r,e){var t,n,s={method:"post"};return typeof r=="string"?(r=nse(r),n=yI({port:r.port,path:r.pathname,host:r.hostname,protocol:r.protocol},s)):(n=yI(r,s),n.port||(n.port=n.protocol==="https:"?443:80)),n.headers=this.getHeaders(r.headers),n.protocol==="https:"?t=rse.request(n):t=tse.request(n),this.getLength((function(i,a){if(i&&i!=="Unknown stream"){this._error(i);return}if(a&&t.setHeader("Content-Length",a),this.pipe(t),e){var u,c=o(function(l,h){return t.removeListener("error",c),t.removeListener("response",u),e.call(this,l,h)},"callback");u=c.bind(this,null),t.on("error",c),t.on("response",u)}}).bind(this)),t};lr.prototype._error=function(r){this.error||(this.error=r,this.pause(),this.emit("error",r))};lr.prototype.toString=function(){return"[object FormData]"};use(lr,"FormData");Z5.exports=lr});var wI=te(tV=>{"use strict";var cse=Ge("url").parse,lse={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443},fse=String.prototype.endsWith||function(r){return r.length<=this.length&&this.indexOf(r,this.length-r.length)!==-1};function hse(r){var e=typeof r=="string"?cse(r):r||{},t=e.protocol,n=e.host,s=e.port;if(typeof n!="string"||!n||typeof t!="string"||(t=t.split(":",1)[0],n=n.replace(/:\d*$/,""),s=parseInt(s)||lse[t]||0,!pse(n,s)))return"";var i=ed("npm_config_"+t+"_proxy")||ed(t+"_proxy")||ed("npm_config_proxy")||ed("all_proxy");return i&&i.indexOf("://")===-1&&(i=t+"://"+i),i}o(hse,"getProxyForUrl");function pse(r,e){var t=(ed("npm_config_no_proxy")||ed("no_proxy")).toLowerCase();return t?t==="*"?!1:t.split(/[,\s]/).every(function(n){if(!n)return!0;var s=n.match(/^(.+):(\d+)$/),i=s?s[1]:n,a=s?parseInt(s[2]):0;return a&&a!==e?!0:/^[.*]/.test(i)?(i.charAt(0)==="*"&&(i=i.slice(1)),!fse.call(r,i)):r!==i}):!0}o(pse,"shouldProxy");function ed(r){return process.env[r.toLowerCase()]||process.env[r.toUpperCase()]||""}o(ed,"getEnv");tV.getProxyForUrl=hse});var nV=te((zxe,rV)=>{"use strict";var Xg;rV.exports=function(){if(!Xg){try{Xg=Wp()("follow-redirects")}catch{}typeof Xg!="function"&&(Xg=o(function(){},"debug"))}Xg.apply(null,arguments)}});var OI=te((Yxe,RI)=>{"use strict";var zg=Ge("url"),Wg=zg.URL,dse=Ge("http"),mse=Ge("https"),CI=Ge("stream").Writable,NI=Ge("assert"),sV=nV();o((function(){var e=typeof process<"u",t=typeof window<"u"&&typeof document<"u",n=uf(Error.captureStackTrace);!e&&(t||!n)&&console.warn("The follow-redirects package should be excluded from browser builds.")}),"detectUnsupportedEnvironment")();var TI=!1;try{NI(new Wg(""))}catch(r){TI=r.code==="ERR_INVALID_URL"}var gse=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],II=["abort","aborted","connect","error","socket","timeout"],_I=Object.create(null);II.forEach(function(r){_I[r]=function(e,t,n){this._redirectable.emit(r,e,t,n)}});var SI=Jg("ERR_INVALID_URL","Invalid URL",TypeError),bI=Jg("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),vse=Jg("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",bI),yse=Jg("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),xse=Jg("ERR_STREAM_WRITE_AFTER_END","write after end"),wse=CI.prototype.destroy||aV;function Ms(r,e){CI.call(this),this._sanitizeOptions(r),this._options=r,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],e&&this.on("response",e);var t=this;this._onNativeResponse=function(n){try{t._processResponse(n)}catch(s){t.emit("error",s instanceof bI?s:new bI({cause:s}))}},this._performRequest()}o(Ms,"RedirectableRequest");Ms.prototype=Object.create(CI.prototype);Ms.prototype.abort=function(){BI(this._currentRequest),this._currentRequest.abort(),this.emit("abort")};Ms.prototype.destroy=function(r){return BI(this._currentRequest,r),wse.call(this,r),this};Ms.prototype.write=function(r,e,t){if(this._ending)throw new xse;if(!of(r)&&!bse(r))throw new TypeError("data should be a string, Buffer or Uint8Array");if(uf(e)&&(t=e,e=null),r.length===0){t&&t();return}this._requestBodyLength+r.length<=this._options.maxBodyLength?(this._requestBodyLength+=r.length,this._requestBodyBuffers.push({data:r,encoding:e}),this._currentRequest.write(r,e,t)):(this.emit("error",new yse),this.abort())};Ms.prototype.end=function(r,e,t){if(uf(r)?(t=r,r=e=null):uf(e)&&(t=e,e=null),!r)this._ended=this._ending=!0,this._currentRequest.end(null,null,t);else{var n=this,s=this._currentRequest;this.write(r,e,function(){n._ended=!0,s.end(null,null,t)}),this._ending=!0}};Ms.prototype.setHeader=function(r,e){this._options.headers[r]=e,this._currentRequest.setHeader(r,e)};Ms.prototype.removeHeader=function(r){delete this._options.headers[r],this._currentRequest.removeHeader(r)};Ms.prototype.setTimeout=function(r,e){var t=this;function n(a){a.setTimeout(r),a.removeListener("timeout",a.destroy),a.addListener("timeout",a.destroy)}o(n,"destroyOnTimeout");function s(a){t._timeout&&clearTimeout(t._timeout),t._timeout=setTimeout(function(){t.emit("timeout"),i()},r),n(a)}o(s,"startTimer");function i(){t._timeout&&(clearTimeout(t._timeout),t._timeout=null),t.removeListener("abort",i),t.removeListener("error",i),t.removeListener("response",i),t.removeListener("close",i),e&&t.removeListener("timeout",e),t.socket||t._currentRequest.removeListener("socket",s)}return o(i,"clearTimer"),e&&this.on("timeout",e),this.socket?s(this.socket):this._currentRequest.once("socket",s),this.on("socket",n),this.on("abort",i),this.on("error",i),this.on("response",i),this.on("close",i),this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function(r){Ms.prototype[r]=function(e,t){return this._currentRequest[r](e,t)}});["aborted","connection","socket"].forEach(function(r){Object.defineProperty(Ms.prototype,r,{get:o(function(){return this._currentRequest[r]},"get")})});Ms.prototype._sanitizeOptions=function(r){if(r.headers||(r.headers={}),r.host&&(r.hostname||(r.hostname=r.host),delete r.host),!r.pathname&&r.path){var e=r.path.indexOf("?");e<0?r.pathname=r.path:(r.pathname=r.path.substring(0,e),r.search=r.path.substring(e))}};Ms.prototype._performRequest=function(){var r=this._options.protocol,e=this._options.nativeProtocols[r];if(!e)throw new TypeError("Unsupported protocol "+r);if(this._options.agents){var t=r.slice(0,-1);this._options.agent=this._options.agents[t]}var n=this._currentRequest=e.request(this._options,this._onNativeResponse);n._redirectable=this;for(var s of II)n.on(s,_I[s]);if(this._currentUrl=/^\//.test(this._options.path)?zg.format(this._options):this._options.path,this._isRedirect){var i=0,a=this,u=this._requestBodyBuffers;o((function c(l){if(n===a._currentRequest)if(l)a.emit("error",l);else if(i<u.length){var h=u[i++];n.finished||n.write(h.data,h.encoding,c)}else a._ended&&n.end()}),"writeNext")()}};Ms.prototype._processResponse=function(r){var e=r.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:r.headers,statusCode:e});var t=r.headers.location;if(!t||this._options.followRedirects===!1||e<300||e>=400){r.responseUrl=this._currentUrl,r.redirects=this._redirects,this.emit("response",r),this._requestBodyBuffers=[];return}if(BI(this._currentRequest),r.destroy(),++this._redirectCount>this._options.maxRedirects)throw new vse;var n,s=this._options.beforeRedirect;s&&(n=Object.assign({Host:r.req.getHeader("host")},this._options.headers));var i=this._options.method;((e===301||e===302)&&this._options.method==="POST"||e===303&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],EI(/^content-/i,this._options.headers));var a=EI(/^host$/i,this._options.headers),u=DI(this._currentUrl),c=a||u.host,l=/^\w+:/.test(t)?this._currentUrl:zg.format(Object.assign(u,{host:c})),h=Ese(t,l);if(sV("redirecting to",h.href),this._isRedirect=!0,AI(h,this._options),(h.protocol!==u.protocol&&h.protocol!=="https:"||h.host!==c&&!Sse(h.host,c))&&EI(/^(?:(?:proxy-)?authorization|cookie)$/i,this._options.headers),uf(s)){var m={headers:r.headers,statusCode:e},g={url:l,method:i,headers:n};s(this._options,m,g),this._sanitizeOptions(this._options)}this._performRequest()};function iV(r){var e={maxRedirects:21,maxBodyLength:10485760},t={};return Object.keys(r).forEach(function(n){var s=n+":",i=t[s]=r[n],a=e[n]=Object.create(i);function u(l,h,m){return Ase(l)?l=AI(l):of(l)?l=AI(DI(l)):(m=h,h=oV(l),l={protocol:s}),uf(h)&&(m=h,h=null),h=Object.assign({maxRedirects:e.maxRedirects,maxBodyLength:e.maxBodyLength},l,h),h.nativeProtocols=t,!of(h.host)&&!of(h.hostname)&&(h.hostname="::1"),NI.equal(h.protocol,s,"protocol mismatch"),sV("options",h),new Ms(h,m)}o(u,"request");function c(l,h,m){var g=a.request(l,h,m);return g.end(),g}o(c,"get"),Object.defineProperties(a,{request:{value:u,configurable:!0,enumerable:!0,writable:!0},get:{value:c,configurable:!0,enumerable:!0,writable:!0}})}),e}o(iV,"wrap");function aV(){}o(aV,"noop");function DI(r){var e;if(TI)e=new Wg(r);else if(e=oV(zg.parse(r)),!of(e.protocol))throw new SI({input:r});return e}o(DI,"parseUrl");function Ese(r,e){return TI?new Wg(r,e):DI(zg.resolve(e,r))}o(Ese,"resolveUrl");function oV(r){if(/^\[/.test(r.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(r.hostname))throw new SI({input:r.href||r});if(/^\[/.test(r.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(r.host))throw new SI({input:r.href||r});return r}o(oV,"validateUrl");function AI(r,e){var t=e||{};for(var n of gse)t[n]=r[n];return t.hostname.startsWith("[")&&(t.hostname=t.hostname.slice(1,-1)),t.port!==""&&(t.port=Number(t.port)),t.path=t.search?t.pathname+t.search:t.pathname,t}o(AI,"spreadUrlObject");function EI(r,e){var t;for(var n in e)r.test(n)&&(t=e[n],delete e[n]);return t===null||typeof t>"u"?void 0:String(t).trim()}o(EI,"removeMatchingHeaders");function Jg(r,e,t){function n(s){uf(Error.captureStackTrace)&&Error.captureStackTrace(this,this.constructor),Object.assign(this,s||{}),this.code=r,this.message=this.cause?e+": "+this.cause.message:e}return o(n,"CustomError"),n.prototype=new(t||Error),Object.defineProperties(n.prototype,{constructor:{value:n,enumerable:!1},name:{value:"Error ["+r+"]",enumerable:!1}}),n}o(Jg,"createErrorType");function BI(r,e){for(var t of II)r.removeListener(t,_I[t]);r.on("error",aV),r.destroy(e)}o(BI,"destroyRequest");function Sse(r,e){NI(of(r)&&of(e));var t=r.length-e.length-1;return t>0&&r[t]==="."&&r.endsWith(e)}o(Sse,"isSubdomain");function of(r){return typeof r=="string"||r instanceof String}o(of,"isString");function uf(r){return typeof r=="function"}o(uf,"isFunction");function bse(r){return typeof r=="object"&&"length"in r}o(bse,"isBuffer");function Ase(r){return Wg&&r instanceof Wg}o(Ase,"isURL");RI.exports=iV({http:dse,https:mse});RI.exports.wrap=iV});var s_=te((Zxe,rU)=>{"use strict";var Cse=eV(),Nse=Ge("crypto"),Tse=Ge("url"),Ise=wI(),_se=Ge("http"),Dse=Ge("https"),Bse=Ge("http2"),Rse=Ge("util"),Ose=OI(),Pse=Ge("zlib"),DV=Ge("stream"),kse=Ge("events");function pa(r){return r&&typeof r=="object"&&"default"in r?r:{default:r}}o(pa,"_interopDefaultLegacy");var BV=pa(Cse),Lse=pa(Nse),Vse=pa(Tse),Use=pa(Ise),jse=pa(_se),Fse=pa(Dse),RV=pa(Bse),zI=pa(Rse),Mse=pa(Ose),sc=pa(Pse),Qa=pa(DV);function OV(r,e){return o(function(){return r.apply(e,arguments)},"wrap")}o(OV,"bind");var{toString:qse}=Object.prototype,{getPrototypeOf:JI}=Object,{iterator:YE,toStringTag:PV}=Symbol,QE=(r=>e=>{let t=qse.call(e);return r[t]||(r[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),da=o(r=>(r=r.toLowerCase(),e=>QE(e)===r),"kindOfTest"),ZE=o(r=>e=>typeof e===r,"typeOfTest"),{isArray:ad}=Array,rd=ZE("undefined");function Zg(r){return r!==null&&!rd(r)&&r.constructor!==null&&!rd(r.constructor)&&qs(r.constructor.isBuffer)&&r.constructor.isBuffer(r)}o(Zg,"isBuffer");var kV=da("ArrayBuffer");function Hse(r){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(r):e=r&&r.buffer&&kV(r.buffer),e}o(Hse,"isArrayBufferView");var Kse=ZE("string"),qs=ZE("function"),LV=ZE("number"),ev=o(r=>r!==null&&typeof r=="object","isObject"),$se=o(r=>r===!0||r===!1,"isBoolean"),KE=o(r=>{if(QE(r)!=="object")return!1;let e=JI(r);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(PV in r)&&!(YE in r)},"isPlainObject"),Gse=o(r=>{if(!ev(r)||Zg(r))return!1;try{return Object.keys(r).length===0&&Object.getPrototypeOf(r)===Object.prototype}catch{return!1}},"isEmptyObject"),Xse=da("Date"),Wse=da("File"),zse=da("Blob"),Jse=da("FileList"),Yse=o(r=>ev(r)&&qs(r.pipe),"isStream"),Qse=o(r=>{let e;return r&&(typeof FormData=="function"&&r instanceof FormData||qs(r.append)&&((e=QE(r))==="formdata"||e==="object"&&qs(r.toString)&&r.toString()==="[object FormData]"))},"isFormData"),Zse=da("URLSearchParams"),[eie,tie,rie,nie]=["ReadableStream","Request","Response","Headers"].map(da),sie=o(r=>r.trim?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),"trim");function tv(r,e,{allOwnKeys:t=!1}={}){if(r===null||typeof r>"u")return;let n,s;if(typeof r!="object"&&(r=[r]),ad(r))for(n=0,s=r.length;n<s;n++)e.call(null,r[n],n,r);else{if(Zg(r))return;let i=t?Object.getOwnPropertyNames(r):Object.keys(r),a=i.length,u;for(n=0;n<a;n++)u=i[n],e.call(null,r[u],u,r)}}o(tv,"forEach");function VV(r,e){if(Zg(r))return null;e=e.toLowerCase();let t=Object.keys(r),n=t.length,s;for(;n-- >0;)if(s=t[n],e===s.toLowerCase())return s;return null}o(VV,"findKey");var cf=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,UV=o(r=>!rd(r)&&r!==cf,"isContextDefined");function jI(){let{caseless:r,skipUndefined:e}=UV(this)&&this||{},t={},n=o((s,i)=>{let a=r&&VV(t,i)||i;KE(t[a])&&KE(s)?t[a]=jI(t[a],s):KE(s)?t[a]=jI({},s):ad(s)?t[a]=s.slice():(!e||!rd(s))&&(t[a]=s)},"assignValue");for(let s=0,i=arguments.length;s<i;s++)arguments[s]&&tv(arguments[s],n);return t}o(jI,"merge");var iie=o((r,e,t,{allOwnKeys:n}={})=>(tv(e,(s,i)=>{t&&qs(s)?r[i]=OV(s,t):r[i]=s},{allOwnKeys:n}),r),"extend"),aie=o(r=>(r.charCodeAt(0)===65279&&(r=r.slice(1)),r),"stripBOM"),oie=o((r,e,t,n)=>{r.prototype=Object.create(e.prototype,n),r.prototype.constructor=r,Object.defineProperty(r,"super",{value:e.prototype}),t&&Object.assign(r.prototype,t)},"inherits"),uie=o((r,e,t,n)=>{let s,i,a,u={};if(e=e||{},r==null)return e;do{for(s=Object.getOwnPropertyNames(r),i=s.length;i-- >0;)a=s[i],(!n||n(a,r,e))&&!u[a]&&(e[a]=r[a],u[a]=!0);r=t!==!1&&JI(r)}while(r&&(!t||t(r,e))&&r!==Object.prototype);return e},"toFlatObject"),cie=o((r,e,t)=>{r=String(r),(t===void 0||t>r.length)&&(t=r.length),t-=e.length;let n=r.indexOf(e,t);return n!==-1&&n===t},"endsWith"),lie=o(r=>{if(!r)return null;if(ad(r))return r;let e=r.length;if(!LV(e))return null;let t=new Array(e);for(;e-- >0;)t[e]=r[e];return t},"toArray"),fie=(r=>e=>r&&e instanceof r)(typeof Uint8Array<"u"&&JI(Uint8Array)),hie=o((r,e)=>{let n=(r&&r[YE]).call(r),s;for(;(s=n.next())&&!s.done;){let i=s.value;e.call(r,i[0],i[1])}},"forEachEntry"),pie=o((r,e)=>{let t,n=[];for(;(t=r.exec(e))!==null;)n.push(t);return n},"matchAll"),die=da("HTMLFormElement"),mie=o(r=>r.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,o(function(t,n,s){return n.toUpperCase()+s},"replacer")),"toCamelCase"),uV=(({hasOwnProperty:r})=>(e,t)=>r.call(e,t))(Object.prototype),gie=da("RegExp"),jV=o((r,e)=>{let t=Object.getOwnPropertyDescriptors(r),n={};tv(t,(s,i)=>{let a;(a=e(s,i,r))!==!1&&(n[i]=a||s)}),Object.defineProperties(r,n)},"reduceDescriptors"),vie=o(r=>{jV(r,(e,t)=>{if(qs(r)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;let n=r[t];if(qs(n)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+t+"'")})}})},"freezeMethods"),yie=o((r,e)=>{let t={},n=o(s=>{s.forEach(i=>{t[i]=!0})},"define");return ad(r)?n(r):n(String(r).split(e)),t},"toObjectSet"),xie=o(()=>{},"noop"),wie=o((r,e)=>r!=null&&Number.isFinite(r=+r)?r:e,"toFiniteNumber");function Eie(r){return!!(r&&qs(r.append)&&r[PV]==="FormData"&&r[YE])}o(Eie,"isSpecCompliantForm");var Sie=o(r=>{let e=new Array(10),t=o((n,s)=>{if(ev(n)){if(e.indexOf(n)>=0)return;if(Zg(n))return n;if(!("toJSON"in n)){e[s]=n;let i=ad(n)?[]:{};return tv(n,(a,u)=>{let c=t(a,s+1);!rd(c)&&(i[u]=c)}),e[s]=void 0,i}}return n},"visit");return t(r,0)},"toJSONObject"),bie=da("AsyncFunction"),Aie=o(r=>r&&(ev(r)||qs(r))&&qs(r.then)&&qs(r.catch),"isThenable"),FV=((r,e)=>r?setImmediate:e?((t,n)=>(cf.addEventListener("message",({source:s,data:i})=>{s===cf&&i===t&&n.length&&n.shift()()},!1),s=>{n.push(s),cf.postMessage(t,"*")}))(`axios@${Math.random()}`,[]):t=>setTimeout(t))(typeof setImmediate=="function",qs(cf.postMessage)),Cie=typeof queueMicrotask<"u"?queueMicrotask.bind(cf):typeof process<"u"&&process.nextTick||FV,Nie=o(r=>r!=null&&qs(r[YE]),"isIterable"),de={isArray:ad,isArrayBuffer:kV,isBuffer:Zg,isFormData:Qse,isArrayBufferView:Hse,isString:Kse,isNumber:LV,isBoolean:$se,isObject:ev,isPlainObject:KE,isEmptyObject:Gse,isReadableStream:eie,isRequest:tie,isResponse:rie,isHeaders:nie,isUndefined:rd,isDate:Xse,isFile:Wse,isBlob:zse,isRegExp:gie,isFunction:qs,isStream:Yse,isURLSearchParams:Zse,isTypedArray:fie,isFileList:Jse,forEach:tv,merge:jI,extend:iie,trim:sie,stripBOM:aie,inherits:oie,toFlatObject:uie,kindOf:QE,kindOfTest:da,endsWith:cie,toArray:lie,forEachEntry:hie,matchAll:pie,isHTMLForm:die,hasOwnProperty:uV,hasOwnProp:uV,reduceDescriptors:jV,freezeMethods:vie,toObjectSet:yie,toCamelCase:mie,noop:xie,toFiniteNumber:wie,findKey:VV,global:cf,isContextDefined:UV,isSpecCompliantForm:Eie,toJSONObject:Sie,isAsyncFn:bie,isThenable:Aie,setImmediate:FV,asap:Cie,isIterable:Nie};function lt(r,e,t,n,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=r,this.name="AxiosError",e&&(this.code=e),t&&(this.config=t),n&&(this.request=n),s&&(this.response=s,this.status=s.status?s.status:null)}o(lt,"AxiosError");de.inherits(lt,Error,{toJSON:o(function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:de.toJSONObject(this.config),code:this.code,status:this.status}},"toJSON")});var MV=lt.prototype,qV={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(r=>{qV[r]={value:r}});Object.defineProperties(lt,qV);Object.defineProperty(MV,"isAxiosError",{value:!0});lt.from=(r,e,t,n,s,i)=>{let a=Object.create(MV);de.toFlatObject(r,a,o(function(h){return h!==Error.prototype},"filter"),l=>l!=="isAxiosError");let u=r&&r.message?r.message:"Error",c=e==null&&r?r.code:e;return lt.call(a,u,c,t,n,s),r&&a.cause==null&&Object.defineProperty(a,"cause",{value:r,configurable:!0}),a.name=r&&r.name||"Error",i&&Object.assign(a,i),a};function FI(r){return de.isPlainObject(r)||de.isArray(r)}o(FI,"isVisitable");function HV(r){return de.endsWith(r,"[]")?r.slice(0,-2):r}o(HV,"removeBrackets");function cV(r,e,t){return r?r.concat(e).map(o(function(s,i){return s=HV(s),!t&&i?"["+s+"]":s},"each")).join(t?".":""):e}o(cV,"renderKey");function Tie(r){return de.isArray(r)&&!r.some(FI)}o(Tie,"isFlatArray");var Iie=de.toFlatObject(de,{},null,o(function(e){return/^is[A-Z]/.test(e)},"filter"));function eS(r,e,t){if(!de.isObject(r))throw new TypeError("target must be an object");e=e||new(BV.default||FormData),t=de.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,o(function(E,w){return!de.isUndefined(w[E])},"defined"));let n=t.metaTokens,s=t.visitor||h,i=t.dots,a=t.indexes,c=(t.Blob||typeof Blob<"u"&&Blob)&&de.isSpecCompliantForm(e);if(!de.isFunction(s))throw new TypeError("visitor must be a function");function l(v){if(v===null)return"";if(de.isDate(v))return v.toISOString();if(de.isBoolean(v))return v.toString();if(!c&&de.isBlob(v))throw new lt("Blob is not supported. Use a Buffer instead.");return de.isArrayBuffer(v)||de.isTypedArray(v)?c&&typeof Blob=="function"?new Blob([v]):Buffer.from(v):v}o(l,"convertValue");function h(v,E,w){let C=v;if(v&&!w&&typeof v=="object"){if(de.endsWith(E,"{}"))E=n?E:E.slice(0,-2),v=JSON.stringify(v);else if(de.isArray(v)&&Tie(v)||(de.isFileList(v)||de.endsWith(E,"[]"))&&(C=de.toArray(v)))return E=HV(E),C.forEach(o(function(b,A){!(de.isUndefined(b)||b===null)&&e.append(a===!0?cV([E],A,i):a===null?E:E+"[]",l(b))},"each")),!1}return FI(v)?!0:(e.append(cV(w,E,i),l(v)),!1)}o(h,"defaultVisitor");let m=[],g=Object.assign(Iie,{defaultVisitor:h,convertValue:l,isVisitable:FI});function y(v,E){if(!de.isUndefined(v)){if(m.indexOf(v)!==-1)throw Error("Circular reference detected in "+E.join("."));m.push(v),de.forEach(v,o(function(C,_){(!(de.isUndefined(C)||C===null)&&s.call(e,C,de.isString(_)?_.trim():_,E,g))===!0&&y(C,E?E.concat(_):[_])},"each")),m.pop()}}if(o(y,"build"),!de.isObject(r))throw new TypeError("data must be an object");return y(r),e}o(eS,"toFormData");function lV(r){let e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(r).replace(/[!'()~]|%20|%00/g,o(function(n){return e[n]},"replacer"))}o(lV,"encode$1");function KV(r,e){this._pairs=[],r&&eS(r,this,e)}o(KV,"AxiosURLSearchParams");var $V=KV.prototype;$V.append=o(function(e,t){this._pairs.push([e,t])},"append");$V.toString=o(function(e){let t=e?function(n){return e.call(this,n,lV)}:lV;return this._pairs.map(o(function(s){return t(s[0])+"="+t(s[1])},"each"),"").join("&")},"toString");function _ie(r){return encodeURIComponent(r).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}o(_ie,"encode");function YI(r,e,t){if(!e)return r;let n=t&&t.encode||_ie;de.isFunction(t)&&(t={serialize:t});let s=t&&t.serialize,i;if(s?i=s(e,t):i=de.isURLSearchParams(e)?e.toString():new KV(e,t).toString(n),i){let a=r.indexOf("#");a!==-1&&(r=r.slice(0,a)),r+=(r.indexOf("?")===-1?"?":"&")+i}return r}o(YI,"buildURL");var MI=class{static{o(this,"InterceptorManager")}constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){de.forEach(this.handlers,o(function(n){n!==null&&e(n)},"forEachHandler"))}},fV=MI,QI={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Die=Vse.default.URLSearchParams,PI="abcdefghijklmnopqrstuvwxyz",hV="0123456789",GV={DIGIT:hV,ALPHA:PI,ALPHA_DIGIT:PI+PI.toUpperCase()+hV},Bie=o((r=16,e=GV.ALPHA_DIGIT)=>{let t="",{length:n}=e,s=new Uint32Array(r);Lse.default.randomFillSync(s);for(let i=0;i<r;i++)t+=e[s[i]%n];return t},"generateString"),Rie={isNode:!0,classes:{URLSearchParams:Die,FormData:BV.default,Blob:typeof Blob<"u"&&Blob||null},ALPHABET:GV,generateString:Bie,protocols:["http","https","file","data"]},ZI=typeof window<"u"&&typeof document<"u",qI=typeof navigator=="object"&&navigator||void 0,Oie=ZI&&(!qI||["ReactNative","NativeScript","NS"].indexOf(qI.product)<0),Pie=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",kie=ZI&&window.location.href||"http://localhost",Lie=Object.freeze({__proto__:null,hasBrowserEnv:ZI,hasStandardBrowserWebWorkerEnv:Pie,hasStandardBrowserEnv:Oie,navigator:qI,origin:kie}),cn={...Lie,...Rie};function Vie(r,e){return eS(r,new cn.classes.URLSearchParams,{visitor:o(function(t,n,s,i){return cn.isNode&&de.isBuffer(t)?(this.append(n,t.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},"visitor"),...e})}o(Vie,"toURLEncodedForm");function Uie(r){return de.matchAll(/\w+|\[(\w*)]/g,r).map(e=>e[0]==="[]"?"":e[1]||e[0])}o(Uie,"parsePropPath");function jie(r){let e={},t=Object.keys(r),n,s=t.length,i;for(n=0;n<s;n++)i=t[n],e[i]=r[i];return e}o(jie,"arrayToObject");function XV(r){function e(t,n,s,i){let a=t[i++];if(a==="__proto__")return!0;let u=Number.isFinite(+a),c=i>=t.length;return a=!a&&de.isArray(s)?s.length:a,c?(de.hasOwnProp(s,a)?s[a]=[s[a],n]:s[a]=n,!u):((!s[a]||!de.isObject(s[a]))&&(s[a]=[]),e(t,n,s[a],i)&&de.isArray(s[a])&&(s[a]=jie(s[a])),!u)}if(o(e,"buildPath"),de.isFormData(r)&&de.isFunction(r.entries)){let t={};return de.forEachEntry(r,(n,s)=>{e(Uie(n),s,t,0)}),t}return null}o(XV,"formDataToJSON");function Fie(r,e,t){if(de.isString(r))try{return(e||JSON.parse)(r),de.trim(r)}catch(n){if(n.name!=="SyntaxError")throw n}return(t||JSON.stringify)(r)}o(Fie,"stringifySafely");var e_={transitional:QI,adapter:["xhr","http","fetch"],transformRequest:[o(function(e,t){let n=t.getContentType()||"",s=n.indexOf("application/json")>-1,i=de.isObject(e);if(i&&de.isHTMLForm(e)&&(e=new FormData(e)),de.isFormData(e))return s?JSON.stringify(XV(e)):e;if(de.isArrayBuffer(e)||de.isBuffer(e)||de.isStream(e)||de.isFile(e)||de.isBlob(e)||de.isReadableStream(e))return e;if(de.isArrayBufferView(e))return e.buffer;if(de.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let u;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return Vie(e,this.formSerializer).toString();if((u=de.isFileList(e))||n.indexOf("multipart/form-data")>-1){let c=this.env&&this.env.FormData;return eS(u?{"files[]":e}:e,c&&new c,this.formSerializer)}}return i||s?(t.setContentType("application/json",!1),Fie(e)):e},"transformRequest")],transformResponse:[o(function(e){let t=this.transitional||e_.transitional,n=t&&t.forcedJSONParsing,s=this.responseType==="json";if(de.isResponse(e)||de.isReadableStream(e))return e;if(e&&de.isString(e)&&(n&&!this.responseType||s)){let a=!(t&&t.silentJSONParsing)&&s;try{return JSON.parse(e,this.parseReviver)}catch(u){if(a)throw u.name==="SyntaxError"?lt.from(u,lt.ERR_BAD_RESPONSE,this,null,this.response):u}}return e},"transformResponse")],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:cn.classes.FormData,Blob:cn.classes.Blob},validateStatus:o(function(e){return e>=200&&e<300},"validateStatus"),headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};de.forEach(["delete","get","head","post","put","patch"],r=>{e_.headers[r]={}});var t_=e_,Mie=de.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),qie=o(r=>{let e={},t,n,s;return r&&r.split(`
|
|
48
|
-
`).forEach(o(function(a){s=a.indexOf(":"),t=a.substring(0,s).trim().toLowerCase(),n=a.substring(s+1).trim(),!(!t||e[t]&&Mie[t])&&(t==="set-cookie"?e[t]?e[t].push(n):e[t]=[n]:e[t]=e[t]?e[t]+", "+n:n)},"parser")),e},"parseHeaders"),pV=Symbol("internals");function Yg(r){return r&&String(r).trim().toLowerCase()}o(Yg,"normalizeHeader");function $E(r){return r===!1||r==null?r:de.isArray(r)?r.map($E):String(r)}o($E,"normalizeValue");function Hie(r){let e=Object.create(null),t=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,n;for(;n=t.exec(r);)e[n[1]]=n[2];return e}o(Hie,"parseTokens");var Kie=o(r=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(r.trim()),"isValidHeaderName");function kI(r,e,t,n,s){if(de.isFunction(n))return n.call(this,e,t);if(s&&(e=t),!!de.isString(e)){if(de.isString(n))return e.indexOf(n)!==-1;if(de.isRegExp(n))return n.test(e)}}o(kI,"matchHeaderValue");function $ie(r){return r.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}o($ie,"formatHeader");function Gie(r,e){let t=de.toCamelCase(" "+e);["get","set","has"].forEach(n=>{Object.defineProperty(r,n+t,{value:o(function(s,i,a){return this[n].call(this,e,s,i,a)},"value"),configurable:!0})})}o(Gie,"buildAccessors");var nd=class{static{o(this,"AxiosHeaders")}constructor(e){e&&this.set(e)}set(e,t,n){let s=this;function i(u,c,l){let h=Yg(c);if(!h)throw new Error("header name must be a non-empty string");let m=de.findKey(s,h);(!m||s[m]===void 0||l===!0||l===void 0&&s[m]!==!1)&&(s[m||c]=$E(u))}o(i,"setHeader");let a=o((u,c)=>de.forEach(u,(l,h)=>i(l,h,c)),"setHeaders");if(de.isPlainObject(e)||e instanceof this.constructor)a(e,t);else if(de.isString(e)&&(e=e.trim())&&!Kie(e))a(qie(e),t);else if(de.isObject(e)&&de.isIterable(e)){let u={},c,l;for(let h of e){if(!de.isArray(h))throw TypeError("Object iterator must return a key-value pair");u[l=h[0]]=(c=u[l])?de.isArray(c)?[...c,h[1]]:[c,h[1]]:h[1]}a(u,t)}else e!=null&&i(t,e,n);return this}get(e,t){if(e=Yg(e),e){let n=de.findKey(this,e);if(n){let s=this[n];if(!t)return s;if(t===!0)return Hie(s);if(de.isFunction(t))return t.call(this,s,n);if(de.isRegExp(t))return t.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Yg(e),e){let n=de.findKey(this,e);return!!(n&&this[n]!==void 0&&(!t||kI(this,this[n],n,t)))}return!1}delete(e,t){let n=this,s=!1;function i(a){if(a=Yg(a),a){let u=de.findKey(n,a);u&&(!t||kI(n,n[u],u,t))&&(delete n[u],s=!0)}}return o(i,"deleteHeader"),de.isArray(e)?e.forEach(i):i(e),s}clear(e){let t=Object.keys(this),n=t.length,s=!1;for(;n--;){let i=t[n];(!e||kI(this,this[i],i,e,!0))&&(delete this[i],s=!0)}return s}normalize(e){let t=this,n={};return de.forEach(this,(s,i)=>{let a=de.findKey(n,i);if(a){t[a]=$E(s),delete t[i];return}let u=e?$ie(i):String(i).trim();u!==i&&delete t[i],t[u]=$E(s),n[u]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let t=Object.create(null);return de.forEach(this,(n,s)=>{n!=null&&n!==!1&&(t[s]=e&&de.isArray(n)?n.join(", "):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join(`
|
|
49
|
-
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){let n=new this(e);return t.forEach(s=>n.set(s)),n}static accessor(e){let n=(this[pV]=this[pV]={accessors:{}}).accessors,s=this.prototype;function i(a){let u=Yg(a);n[u]||(Gie(s,a),n[u]=!0)}return o(i,"defineAccessor"),de.isArray(e)?e.forEach(i):i(e),this}};nd.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);de.reduceDescriptors(nd.prototype,({value:r},e)=>{let t=e[0].toUpperCase()+e.slice(1);return{get:o(()=>r,"get"),set(n){this[t]=n}}});de.freezeMethods(nd);var Hs=nd;function LI(r,e){let t=this||t_,n=e||t,s=Hs.from(n.headers),i=n.data;return de.forEach(r,o(function(u){i=u.call(t,i,s.normalize(),e?e.status:void 0)},"transform")),s.normalize(),i}o(LI,"transformData");function WV(r){return!!(r&&r.__CANCEL__)}o(WV,"isCancel");function ic(r,e,t){lt.call(this,r??"canceled",lt.ERR_CANCELED,e,t),this.name="CanceledError"}o(ic,"CanceledError");de.inherits(ic,lt,{__CANCEL__:!0});function td(r,e,t){let n=t.config.validateStatus;!t.status||!n||n(t.status)?r(t):e(new lt("Request failed with status code "+t.status,[lt.ERR_BAD_REQUEST,lt.ERR_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t))}o(td,"settle");function Xie(r){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(r)}o(Xie,"isAbsoluteURL");function Wie(r,e){return e?r.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):r}o(Wie,"combineURLs");function r_(r,e,t){let n=!Xie(e);return r&&(n||t==!1)?Wie(r,e):e}o(r_,"buildFullPath");var WE="1.13.2";function zV(r){let e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(r);return e&&e[1]||""}o(zV,"parseProtocol");var zie=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;function Jie(r,e,t){let n=t&&t.Blob||cn.classes.Blob,s=zV(r);if(e===void 0&&n&&(e=!0),s==="data"){r=s.length?r.slice(s.length+1):r;let i=zie.exec(r);if(!i)throw new lt("Invalid URL",lt.ERR_INVALID_URL);let a=i[1],u=i[2],c=i[3],l=Buffer.from(decodeURIComponent(c),u?"base64":"utf8");if(e){if(!n)throw new lt("Blob is not supported",lt.ERR_NOT_SUPPORT);return new n([l],{type:a})}return l}throw new lt("Unsupported protocol "+s,lt.ERR_NOT_SUPPORT)}o(Jie,"fromDataURI");var VI=Symbol("internals"),HI=class extends Qa.default.Transform{static{o(this,"AxiosTransformStream")}constructor(e){e=de.toFlatObject(e,{maxRate:0,chunkSize:64*1024,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(n,s)=>!de.isUndefined(s[n])),super({readableHighWaterMark:e.chunkSize});let t=this[VI]={timeWindow:e.timeWindow,chunkSize:e.chunkSize,maxRate:e.maxRate,minChunkSize:e.minChunkSize,bytesSeen:0,isCaptured:!1,notifiedBytesLoaded:0,ts:Date.now(),bytes:0,onReadCallback:null};this.on("newListener",n=>{n==="progress"&&(t.isCaptured||(t.isCaptured=!0))})}_read(e){let t=this[VI];return t.onReadCallback&&t.onReadCallback(),super._read(e)}_transform(e,t,n){let s=this[VI],i=s.maxRate,a=this.readableHighWaterMark,u=s.timeWindow,c=1e3/u,l=i/c,h=s.minChunkSize!==!1?Math.max(s.minChunkSize,l*.01):0,m=o((y,v)=>{let E=Buffer.byteLength(y);s.bytesSeen+=E,s.bytes+=E,s.isCaptured&&this.emit("progress",s.bytesSeen),this.push(y)?process.nextTick(v):s.onReadCallback=()=>{s.onReadCallback=null,process.nextTick(v)}},"pushChunk"),g=o((y,v)=>{let E=Buffer.byteLength(y),w=null,C=a,_,b=0;if(i){let A=Date.now();(!s.ts||(b=A-s.ts)>=u)&&(s.ts=A,_=l-s.bytes,s.bytes=_<0?-_:0,b=0),_=l-s.bytes}if(i){if(_<=0)return setTimeout(()=>{v(null,y)},u-b);_<C&&(C=_)}C&&E>C&&E-C>h&&(w=y.subarray(C),y=y.subarray(0,C)),m(y,w?()=>{process.nextTick(v,null,w)}:v)},"transformChunk");g(e,o(function y(v,E){if(v)return n(v);E?g(E,y):n(null)},"transformNextChunk"))}},dV=HI,{asyncIterator:mV}=Symbol,Yie=o(async function*(r){r.stream?yield*r.stream():r.arrayBuffer?yield await r.arrayBuffer():r[mV]?yield*r[mV]():yield r},"readBlob"),JV=Yie,Qie=cn.ALPHABET.ALPHA_DIGIT+"-_",Qg=typeof TextEncoder=="function"?new TextEncoder:new zI.default.TextEncoder,lf=`\r
|
|
50
|
-
`,Zie=Qg.encode(lf),eae=2,KI=class{static{o(this,"FormDataPart")}constructor(e,t){let{escapeName:n}=this.constructor,s=de.isString(t),i=`Content-Disposition: form-data; name="${n(e)}"${!s&&t.name?`; filename="${n(t.name)}"`:""}${lf}`;s?t=Qg.encode(String(t).replace(/\r?\n|\r\n?/g,lf)):i+=`Content-Type: ${t.type||"application/octet-stream"}${lf}`,this.headers=Qg.encode(i+lf),this.contentLength=s?t.byteLength:t.size,this.size=this.headers.byteLength+this.contentLength+eae,this.name=e,this.value=t}async*encode(){yield this.headers;let{value:e}=this;de.isTypedArray(e)?yield e:yield*JV(e),yield Zie}static escapeName(e){return String(e).replace(/[\r\n"]/g,t=>({"\r":"%0D","\n":"%0A",'"':"%22"})[t])}},tae=o((r,e,t)=>{let{tag:n="form-data-boundary",size:s=25,boundary:i=n+"-"+cn.generateString(s,Qie)}=t||{};if(!de.isFormData(r))throw TypeError("FormData instance required");if(i.length<1||i.length>70)throw Error("boundary must be 10-70 characters long");let a=Qg.encode("--"+i+lf),u=Qg.encode("--"+i+"--"+lf),c=u.byteLength,l=Array.from(r.entries()).map(([m,g])=>{let y=new KI(m,g);return c+=y.size,y});c+=a.byteLength*l.length,c=de.toFiniteNumber(c);let h={"Content-Type":`multipart/form-data; boundary=${i}`};return Number.isFinite(c)&&(h["Content-Length"]=c),e&&e(h),DV.Readable.from((async function*(){for(let m of l)yield a,yield*m.encode();yield u})())},"formDataToStream"),rae=tae,$I=class extends Qa.default.Transform{static{o(this,"ZlibHeaderTransformStream")}__transform(e,t,n){this.push(e),n()}_transform(e,t,n){if(e.length!==0&&(this._transform=this.__transform,e[0]!==120)){let s=Buffer.alloc(2);s[0]=120,s[1]=156,this.push(s,t)}this.__transform(e,t,n)}},nae=$I,sae=o((r,e)=>de.isAsyncFn(r)?function(...t){let n=t.pop();r.apply(this,t).then(s=>{try{e?n(null,...e(s)):n(null,s)}catch(i){n(i)}},n)}:r,"callbackify"),iae=sae;function aae(r,e){r=r||10;let t=new Array(r),n=new Array(r),s=0,i=0,a;return e=e!==void 0?e:1e3,o(function(c){let l=Date.now(),h=n[i];a||(a=l),t[s]=c,n[s]=l;let m=i,g=0;for(;m!==s;)g+=t[m++],m=m%r;if(s=(s+1)%r,s===i&&(i=(i+1)%r),l-a<e)return;let y=h&&l-h;return y?Math.round(g*1e3/y):void 0},"push")}o(aae,"speedometer");function oae(r,e){let t=0,n=1e3/e,s,i,a=o((l,h=Date.now())=>{t=h,s=null,i&&(clearTimeout(i),i=null),r(...l)},"invoke");return[o((...l)=>{let h=Date.now(),m=h-t;m>=n?a(l,h):(s=l,i||(i=setTimeout(()=>{i=null,a(s)},n-m)))},"throttled"),o(()=>s&&a(s),"flush")]}o(oae,"throttle");var sd=o((r,e,t=3)=>{let n=0,s=aae(50,250);return oae(i=>{let a=i.loaded,u=i.lengthComputable?i.total:void 0,c=a-n,l=s(c),h=a<=u;n=a;let m={loaded:a,total:u,progress:u?a/u:void 0,bytes:c,rate:l||void 0,estimated:l&&u&&h?(u-a)/l:void 0,event:i,lengthComputable:u!=null,[e?"download":"upload"]:!0};r(m)},t)},"progressEventReducer"),zE=o((r,e)=>{let t=r!=null;return[n=>e[0]({lengthComputable:t,total:r,loaded:n}),e[1]]},"progressEventDecorator"),JE=o(r=>(...e)=>de.asap(()=>r(...e)),"asyncDecorator");function uae(r){if(!r||typeof r!="string"||!r.startsWith("data:"))return 0;let e=r.indexOf(",");if(e<0)return 0;let t=r.slice(5,e),n=r.slice(e+1);if(/;base64/i.test(t)){let i=n.length,a=n.length;for(let g=0;g<a;g++)if(n.charCodeAt(g)===37&&g+2<a){let y=n.charCodeAt(g+1),v=n.charCodeAt(g+2);(y>=48&&y<=57||y>=65&&y<=70||y>=97&&y<=102)&&(v>=48&&v<=57||v>=65&&v<=70||v>=97&&v<=102)&&(i-=2,g+=2)}let u=0,c=a-1,l=o(g=>g>=2&&n.charCodeAt(g-2)===37&&n.charCodeAt(g-1)===51&&(n.charCodeAt(g)===68||n.charCodeAt(g)===100),"tailIsPct3D");c>=0&&(n.charCodeAt(c)===61?(u++,c--):l(c)&&(u++,c-=3)),u===1&&c>=0&&(n.charCodeAt(c)===61||l(c))&&u++;let m=Math.floor(i/4)*3-(u||0);return m>0?m:0}return Buffer.byteLength(n,"utf8")}o(uae,"estimateDataURLDecodedBytes");var gV={flush:sc.default.constants.Z_SYNC_FLUSH,finishFlush:sc.default.constants.Z_SYNC_FLUSH},cae={flush:sc.default.constants.BROTLI_OPERATION_FLUSH,finishFlush:sc.default.constants.BROTLI_OPERATION_FLUSH},vV=de.isFunction(sc.default.createBrotliDecompress),{http:lae,https:fae}=Mse.default,hae=/https:?/,yV=cn.protocols.map(r=>r+":"),xV=o((r,[e,t])=>(r.on("end",t).on("error",t),e),"flushOnFinish"),GI=class{static{o(this,"Http2Sessions")}constructor(){this.sessions=Object.create(null)}getSession(e,t){t=Object.assign({sessionTimeout:1e3},t);let n=this.sessions[e];if(n){let h=n.length;for(let m=0;m<h;m++){let[g,y]=n[m];if(!g.destroyed&&!g.closed&&zI.default.isDeepStrictEqual(y,t))return g}}let s=RV.default.connect(e,t),i,a=o(()=>{if(i)return;i=!0;let h=n,m=h.length,g=m;for(;g--;)if(h[g][0]===s){m===1?delete this.sessions[e]:h.splice(g,1);return}},"removeSession"),u=s.request,{sessionTimeout:c}=t;if(c!=null){let h,m=0;s.request=function(){let g=u.apply(this,arguments);return m++,h&&(clearTimeout(h),h=null),g.once("close",()=>{--m||(h=setTimeout(()=>{h=null,a()},c))}),g}}s.once("close",a);let l=[s,t];return n?n.push(l):n=this.sessions[e]=[l],s}},pae=new GI;function dae(r,e){r.beforeRedirects.proxy&&r.beforeRedirects.proxy(r),r.beforeRedirects.config&&r.beforeRedirects.config(r,e)}o(dae,"dispatchBeforeRedirect");function YV(r,e,t){let n=e;if(!n&&n!==!1){let s=Use.default.getProxyForUrl(t);s&&(n=new URL(s))}if(n){if(n.username&&(n.auth=(n.username||"")+":"+(n.password||"")),n.auth){(n.auth.username||n.auth.password)&&(n.auth=(n.auth.username||"")+":"+(n.auth.password||""));let i=Buffer.from(n.auth,"utf8").toString("base64");r.headers["Proxy-Authorization"]="Basic "+i}r.headers.host=r.hostname+(r.port?":"+r.port:"");let s=n.hostname||n.host;r.hostname=s,r.host=s,r.port=n.port,r.path=t,n.protocol&&(r.protocol=n.protocol.includes(":")?n.protocol:`${n.protocol}:`)}r.beforeRedirects.proxy=o(function(i){YV(i,e,i.href)},"beforeRedirect")}o(YV,"setProxy");var mae=typeof process<"u"&&de.kindOf(process)==="process",gae=o(r=>new Promise((e,t)=>{let n,s,i=o((c,l)=>{s||(s=!0,n&&n(c,l))},"done"),a=o(c=>{i(c),e(c)},"_resolve"),u=o(c=>{i(c,!0),t(c)},"_reject");r(a,u,c=>n=c).catch(u)}),"wrapAsync"),vae=o(({address:r,family:e})=>{if(!de.isString(r))throw TypeError("address must be a string");return{address:r,family:e||(r.indexOf(".")<0?6:4)}},"resolveFamily"),wV=o((r,e)=>vae(de.isObject(r)?r:{address:r,family:e}),"buildAddressEntry"),yae={request(r,e){let t=r.protocol+"//"+r.hostname+":"+(r.port||80),{http2Options:n,headers:s}=r,i=pae.getSession(t,n),{HTTP2_HEADER_SCHEME:a,HTTP2_HEADER_METHOD:u,HTTP2_HEADER_PATH:c,HTTP2_HEADER_STATUS:l}=RV.default.constants,h={[a]:r.protocol.replace(":",""),[u]:r.method,[c]:r.path};de.forEach(s,(g,y)=>{y.charAt(0)!==":"&&(h[y]=g)});let m=i.request(h);return m.once("response",g=>{let y=m;g=Object.assign({},g);let v=g[l];delete g[l],y.headers=g,y.statusCode=+v,e(y)}),m}},xae=mae&&o(function(e){return gae(o(async function(n,s,i){let{data:a,lookup:u,family:c,httpVersion:l=1,http2Options:h}=e,{responseType:m,responseEncoding:g}=e,y=e.method.toUpperCase(),v,E=!1,w;if(l=+l,Number.isNaN(l))throw TypeError(`Invalid protocol version: '${e.httpVersion}' is not a number`);if(l!==1&&l!==2)throw TypeError(`Unsupported protocol version '${l}'`);let C=l===2;if(u){let ne=iae(u,Z=>de.isArray(Z)?Z:[Z]);u=o((Z,Se,He)=>{ne(Z,Se,(Le,rt,N)=>{if(Le)return He(Le);let S=de.isArray(rt)?rt.map(G=>wV(G)):[wV(rt,N)];Se.all?He(Le,S):He(Le,S[0].address,S[0].family)})},"lookup")}let _=new kse.EventEmitter;function b(ne){try{_.emit("abort",!ne||ne.type?new ic(null,e,w):ne)}catch(Z){console.warn("emit error",Z)}}o(b,"abort"),_.once("abort",s);let A=o(()=>{e.cancelToken&&e.cancelToken.unsubscribe(b),e.signal&&e.signal.removeEventListener("abort",b),_.removeAllListeners()},"onFinished");(e.cancelToken||e.signal)&&(e.cancelToken&&e.cancelToken.subscribe(b),e.signal&&(e.signal.aborted?b():e.signal.addEventListener("abort",b))),i((ne,Z)=>{if(v=!0,Z){E=!0,A();return}let{data:Se}=ne;if(Se instanceof Qa.default.Readable||Se instanceof Qa.default.Duplex){let He=Qa.default.finished(Se,()=>{He(),A()})}else A()});let T=r_(e.baseURL,e.url,e.allowAbsoluteUrls),B=new URL(T,cn.hasBrowserEnv?cn.origin:void 0),M=B.protocol||yV[0];if(M==="data:"){if(e.maxContentLength>-1){let Z=String(e.url||T||"");if(uae(Z)>e.maxContentLength)return s(new lt("maxContentLength size of "+e.maxContentLength+" exceeded",lt.ERR_BAD_RESPONSE,e))}let ne;if(y!=="GET")return td(n,s,{status:405,statusText:"method not allowed",headers:{},config:e});try{ne=Jie(e.url,m==="blob",{Blob:e.env&&e.env.Blob})}catch(Z){throw lt.from(Z,lt.ERR_BAD_REQUEST,e)}return m==="text"?(ne=ne.toString(g),(!g||g==="utf8")&&(ne=de.stripBOM(ne))):m==="stream"&&(ne=Qa.default.Readable.from(ne)),td(n,s,{data:ne,status:200,statusText:"OK",headers:new Hs,config:e})}if(yV.indexOf(M)===-1)return s(new lt("Unsupported protocol "+M,lt.ERR_BAD_REQUEST,e));let I=Hs.from(e.headers).normalize();I.set("User-Agent","axios/"+WE,!1);let{onUploadProgress:H,onDownloadProgress:K}=e,q=e.maxRate,W,he;if(de.isSpecCompliantForm(a)){let ne=I.getContentType(/boundary=([-_\w\d]{10,70})/i);a=rae(a,Z=>{I.set(Z)},{tag:`axios-${WE}-boundary`,boundary:ne&&ne[1]||void 0})}else if(de.isFormData(a)&&de.isFunction(a.getHeaders)){if(I.set(a.getHeaders()),!I.hasContentLength())try{let ne=await zI.default.promisify(a.getLength).call(a);Number.isFinite(ne)&&ne>=0&&I.setContentLength(ne)}catch{}}else if(de.isBlob(a)||de.isFile(a))a.size&&I.setContentType(a.type||"application/octet-stream"),I.setContentLength(a.size||0),a=Qa.default.Readable.from(JV(a));else if(a&&!de.isStream(a)){if(!Buffer.isBuffer(a))if(de.isArrayBuffer(a))a=Buffer.from(new Uint8Array(a));else if(de.isString(a))a=Buffer.from(a,"utf-8");else return s(new lt("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",lt.ERR_BAD_REQUEST,e));if(I.setContentLength(a.length,!1),e.maxBodyLength>-1&&a.length>e.maxBodyLength)return s(new lt("Request body larger than maxBodyLength limit",lt.ERR_BAD_REQUEST,e))}let pe=de.toFiniteNumber(I.getContentLength());de.isArray(q)?(W=q[0],he=q[1]):W=he=q,a&&(H||W)&&(de.isStream(a)||(a=Qa.default.Readable.from(a,{objectMode:!1})),a=Qa.default.pipeline([a,new dV({maxRate:de.toFiniteNumber(W)})],de.noop),H&&a.on("progress",xV(a,zE(pe,sd(JE(H),!1,3)))));let ue;if(e.auth){let ne=e.auth.username||"",Z=e.auth.password||"";ue=ne+":"+Z}if(!ue&&B.username){let ne=B.username,Z=B.password;ue=ne+":"+Z}ue&&I.delete("authorization");let Y;try{Y=YI(B.pathname+B.search,e.params,e.paramsSerializer).replace(/^\?/,"")}catch(ne){let Z=new Error(ne.message);return Z.config=e,Z.url=e.url,Z.exists=!0,s(Z)}I.set("Accept-Encoding","gzip, compress, deflate"+(vV?", br":""),!1);let ve={path:Y,method:y,headers:I.toJSON(),agents:{http:e.httpAgent,https:e.httpsAgent},auth:ue,protocol:M,family:c,beforeRedirect:dae,beforeRedirects:{},http2Options:h};!de.isUndefined(u)&&(ve.lookup=u),e.socketPath?ve.socketPath=e.socketPath:(ve.hostname=B.hostname.startsWith("[")?B.hostname.slice(1,-1):B.hostname,ve.port=B.port,YV(ve,e.proxy,M+"//"+B.hostname+(B.port?":"+B.port:"")+ve.path));let Oe,Je=hae.test(ve.protocol);if(ve.agent=Je?e.httpsAgent:e.httpAgent,C?Oe=yae:e.transport?Oe=e.transport:e.maxRedirects===0?Oe=Je?Fse.default:jse.default:(e.maxRedirects&&(ve.maxRedirects=e.maxRedirects),e.beforeRedirect&&(ve.beforeRedirects.config=e.beforeRedirect),Oe=Je?fae:lae),e.maxBodyLength>-1?ve.maxBodyLength=e.maxBodyLength:ve.maxBodyLength=1/0,e.insecureHTTPParser&&(ve.insecureHTTPParser=e.insecureHTTPParser),w=Oe.request(ve,o(function(Z){if(w.destroyed)return;let Se=[Z],He=de.toFiniteNumber(Z.headers["content-length"]);if(K||he){let S=new dV({maxRate:de.toFiniteNumber(he)});K&&S.on("progress",xV(S,zE(He,sd(JE(K),!0,3)))),Se.push(S)}let Le=Z,rt=Z.req||w;if(e.decompress!==!1&&Z.headers["content-encoding"])switch((y==="HEAD"||Z.statusCode===204)&&delete Z.headers["content-encoding"],(Z.headers["content-encoding"]||"").toLowerCase()){case"gzip":case"x-gzip":case"compress":case"x-compress":Se.push(sc.default.createUnzip(gV)),delete Z.headers["content-encoding"];break;case"deflate":Se.push(new nae),Se.push(sc.default.createUnzip(gV)),delete Z.headers["content-encoding"];break;case"br":vV&&(Se.push(sc.default.createBrotliDecompress(cae)),delete Z.headers["content-encoding"])}Le=Se.length>1?Qa.default.pipeline(Se,de.noop):Se[0];let N={status:Z.statusCode,statusText:Z.statusMessage,headers:new Hs(Z.headers),config:e,request:rt};if(m==="stream")N.data=Le,td(n,s,N);else{let S=[],G=0;Le.on("data",o(function(Ee){S.push(Ee),G+=Ee.length,e.maxContentLength>-1&&G>e.maxContentLength&&(E=!0,Le.destroy(),b(new lt("maxContentLength size of "+e.maxContentLength+" exceeded",lt.ERR_BAD_RESPONSE,e,rt)))},"handleStreamData")),Le.on("aborted",o(function(){if(E)return;let Ee=new lt("stream has been aborted",lt.ERR_BAD_RESPONSE,e,rt);Le.destroy(Ee),s(Ee)},"handlerStreamAborted")),Le.on("error",o(function(Ee){w.destroyed||s(lt.from(Ee,null,e,rt))},"handleStreamError")),Le.on("end",o(function(){try{let Ee=S.length===1?S[0]:Buffer.concat(S);m!=="arraybuffer"&&(Ee=Ee.toString(g),(!g||g==="utf8")&&(Ee=de.stripBOM(Ee))),N.data=Ee}catch(Ee){return s(lt.from(Ee,null,e,N.request,N))}td(n,s,N)},"handleStreamEnd"))}_.once("abort",S=>{Le.destroyed||(Le.emit("error",S),Le.destroy())})},"handleResponse")),_.once("abort",ne=>{w.close?w.close():w.destroy(ne)}),w.on("error",o(function(Z){s(lt.from(Z,null,e,w))},"handleRequestError")),w.on("socket",o(function(Z){Z.setKeepAlive(!0,1e3*60)},"handleRequestSocket")),e.timeout){let ne=parseInt(e.timeout,10);if(Number.isNaN(ne)){b(new lt("error trying to parse `config.timeout` to int",lt.ERR_BAD_OPTION_VALUE,e,w));return}w.setTimeout(ne,o(function(){if(v)return;let Se=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",He=e.transitional||QI;e.timeoutErrorMessage&&(Se=e.timeoutErrorMessage),b(new lt(Se,He.clarifyTimeoutError?lt.ETIMEDOUT:lt.ECONNABORTED,e,w))},"handleRequestTimeout"))}else w.setTimeout(0);if(de.isStream(a)){let ne=!1,Z=!1;a.on("end",()=>{ne=!0}),a.once("error",Se=>{Z=!0,w.destroy(Se)}),a.on("close",()=>{!ne&&!Z&&b(new ic("Request stream has been aborted",e,w))}),a.pipe(w)}else a&&w.write(a),w.end()},"dispatchHttpRequest"))},"httpAdapter"),wae=cn.hasStandardBrowserEnv?((r,e)=>t=>(t=new URL(t,cn.origin),r.protocol===t.protocol&&r.host===t.host&&(e||r.port===t.port)))(new URL(cn.origin),cn.navigator&&/(msie|trident)/i.test(cn.navigator.userAgent)):()=>!0,Eae=cn.hasStandardBrowserEnv?{write(r,e,t,n,s,i,a){if(typeof document>"u")return;let u=[`${r}=${encodeURIComponent(e)}`];de.isNumber(t)&&u.push(`expires=${new Date(t).toUTCString()}`),de.isString(n)&&u.push(`path=${n}`),de.isString(s)&&u.push(`domain=${s}`),i===!0&&u.push("secure"),de.isString(a)&&u.push(`SameSite=${a}`),document.cookie=u.join("; ")},read(r){if(typeof document>"u")return null;let e=document.cookie.match(new RegExp("(?:^|; )"+r+"=([^;]*)"));return e?decodeURIComponent(e[1]):null},remove(r){this.write(r,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}},EV=o(r=>r instanceof Hs?{...r}:r,"headersToObject");function ff(r,e){e=e||{};let t={};function n(l,h,m,g){return de.isPlainObject(l)&&de.isPlainObject(h)?de.merge.call({caseless:g},l,h):de.isPlainObject(h)?de.merge({},h):de.isArray(h)?h.slice():h}o(n,"getMergedValue");function s(l,h,m,g){if(de.isUndefined(h)){if(!de.isUndefined(l))return n(void 0,l,m,g)}else return n(l,h,m,g)}o(s,"mergeDeepProperties");function i(l,h){if(!de.isUndefined(h))return n(void 0,h)}o(i,"valueFromConfig2");function a(l,h){if(de.isUndefined(h)){if(!de.isUndefined(l))return n(void 0,l)}else return n(void 0,h)}o(a,"defaultToConfig2");function u(l,h,m){if(m in e)return n(l,h);if(m in r)return n(void 0,l)}o(u,"mergeDirectKeys");let c={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:u,headers:o((l,h,m)=>s(EV(l),EV(h),m,!0),"headers")};return de.forEach(Object.keys({...r,...e}),o(function(h){let m=c[h]||s,g=m(r[h],e[h],h);de.isUndefined(g)&&m!==u||(t[h]=g)},"computeConfigValue")),t}o(ff,"mergeConfig");var QV=o(r=>{let e=ff({},r),{data:t,withXSRFToken:n,xsrfHeaderName:s,xsrfCookieName:i,headers:a,auth:u}=e;if(e.headers=a=Hs.from(a),e.url=YI(r_(e.baseURL,e.url,e.allowAbsoluteUrls),r.params,r.paramsSerializer),u&&a.set("Authorization","Basic "+btoa((u.username||"")+":"+(u.password?unescape(encodeURIComponent(u.password)):""))),de.isFormData(t)){if(cn.hasStandardBrowserEnv||cn.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(de.isFunction(t.getHeaders)){let c=t.getHeaders(),l=["content-type","content-length"];Object.entries(c).forEach(([h,m])=>{l.includes(h.toLowerCase())&&a.set(h,m)})}}if(cn.hasStandardBrowserEnv&&(n&&de.isFunction(n)&&(n=n(e)),n||n!==!1&&wae(e.url))){let c=s&&i&&Eae.read(i);c&&a.set(s,c)}return e},"resolveConfig"),Sae=typeof XMLHttpRequest<"u",bae=Sae&&function(r){return new Promise(o(function(t,n){let s=QV(r),i=s.data,a=Hs.from(s.headers).normalize(),{responseType:u,onUploadProgress:c,onDownloadProgress:l}=s,h,m,g,y,v;function E(){y&&y(),v&&v(),s.cancelToken&&s.cancelToken.unsubscribe(h),s.signal&&s.signal.removeEventListener("abort",h)}o(E,"done");let w=new XMLHttpRequest;w.open(s.method.toUpperCase(),s.url,!0),w.timeout=s.timeout;function C(){if(!w)return;let b=Hs.from("getAllResponseHeaders"in w&&w.getAllResponseHeaders()),T={data:!u||u==="text"||u==="json"?w.responseText:w.response,status:w.status,statusText:w.statusText,headers:b,config:r,request:w};td(o(function(M){t(M),E()},"_resolve"),o(function(M){n(M),E()},"_reject"),T),w=null}o(C,"onloadend"),"onloadend"in w?w.onloadend=C:w.onreadystatechange=o(function(){!w||w.readyState!==4||w.status===0&&!(w.responseURL&&w.responseURL.indexOf("file:")===0)||setTimeout(C)},"handleLoad"),w.onabort=o(function(){w&&(n(new lt("Request aborted",lt.ECONNABORTED,r,w)),w=null)},"handleAbort"),w.onerror=o(function(A){let T=A&&A.message?A.message:"Network Error",B=new lt(T,lt.ERR_NETWORK,r,w);B.event=A||null,n(B),w=null},"handleError"),w.ontimeout=o(function(){let A=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded",T=s.transitional||QI;s.timeoutErrorMessage&&(A=s.timeoutErrorMessage),n(new lt(A,T.clarifyTimeoutError?lt.ETIMEDOUT:lt.ECONNABORTED,r,w)),w=null},"handleTimeout"),i===void 0&&a.setContentType(null),"setRequestHeader"in w&&de.forEach(a.toJSON(),o(function(A,T){w.setRequestHeader(T,A)},"setRequestHeader")),de.isUndefined(s.withCredentials)||(w.withCredentials=!!s.withCredentials),u&&u!=="json"&&(w.responseType=s.responseType),l&&([g,v]=sd(l,!0),w.addEventListener("progress",g)),c&&w.upload&&([m,y]=sd(c),w.upload.addEventListener("progress",m),w.upload.addEventListener("loadend",y)),(s.cancelToken||s.signal)&&(h=o(b=>{w&&(n(!b||b.type?new ic(null,r,w):b),w.abort(),w=null)},"onCanceled"),s.cancelToken&&s.cancelToken.subscribe(h),s.signal&&(s.signal.aborted?h():s.signal.addEventListener("abort",h)));let _=zV(s.url);if(_&&cn.protocols.indexOf(_)===-1){n(new lt("Unsupported protocol "+_+":",lt.ERR_BAD_REQUEST,r));return}w.send(i||null)},"dispatchXhrRequest"))},Aae=o((r,e)=>{let{length:t}=r=r?r.filter(Boolean):[];if(e||t){let n=new AbortController,s,i=o(function(l){if(!s){s=!0,u();let h=l instanceof Error?l:this.reason;n.abort(h instanceof lt?h:new ic(h instanceof Error?h.message:h))}},"onabort"),a=e&&setTimeout(()=>{a=null,i(new lt(`timeout ${e} of ms exceeded`,lt.ETIMEDOUT))},e),u=o(()=>{r&&(a&&clearTimeout(a),a=null,r.forEach(l=>{l.unsubscribe?l.unsubscribe(i):l.removeEventListener("abort",i)}),r=null)},"unsubscribe");r.forEach(l=>l.addEventListener("abort",i));let{signal:c}=n;return c.unsubscribe=()=>de.asap(u),c}},"composeSignals"),Cae=Aae,Nae=o(function*(r,e){let t=r.byteLength;if(!e||t<e){yield r;return}let n=0,s;for(;n<t;)s=n+e,yield r.slice(n,s),n=s},"streamChunk"),Tae=o(async function*(r,e){for await(let t of Iae(r))yield*Nae(t,e)},"readBytes"),Iae=o(async function*(r){if(r[Symbol.asyncIterator]){yield*r;return}let e=r.getReader();try{for(;;){let{done:t,value:n}=await e.read();if(t)break;yield n}}finally{await e.cancel()}},"readStream"),SV=o((r,e,t,n)=>{let s=Tae(r,e),i=0,a,u=o(c=>{a||(a=!0,n&&n(c))},"_onFinish");return new ReadableStream({async pull(c){try{let{done:l,value:h}=await s.next();if(l){u(),c.close();return}let m=h.byteLength;if(t){let g=i+=m;t(g)}c.enqueue(new Uint8Array(h))}catch(l){throw u(l),l}},cancel(c){return u(c),s.return()}},{highWaterMark:2})},"trackStream"),bV=64*1024,{isFunction:HE}=de,_ae=(({Request:r,Response:e})=>({Request:r,Response:e}))(de.global),{ReadableStream:AV,TextEncoder:CV}=de.global,NV=o((r,...e)=>{try{return!!r(...e)}catch{return!1}},"test"),Dae=o(r=>{r=de.merge.call({skipUndefined:!0},_ae,r);let{fetch:e,Request:t,Response:n}=r,s=e?HE(e):typeof fetch=="function",i=HE(t),a=HE(n);if(!s)return!1;let u=s&&HE(AV),c=s&&(typeof CV=="function"?(v=>E=>v.encode(E))(new CV):async v=>new Uint8Array(await new t(v).arrayBuffer())),l=i&&u&&NV(()=>{let v=!1,E=new t(cn.origin,{body:new AV,method:"POST",get duplex(){return v=!0,"half"}}).headers.has("Content-Type");return v&&!E}),h=a&&u&&NV(()=>de.isReadableStream(new n("").body)),m={stream:h&&(v=>v.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(v=>{!m[v]&&(m[v]=(E,w)=>{let C=E&&E[v];if(C)return C.call(E);throw new lt(`Response type '${v}' is not supported`,lt.ERR_NOT_SUPPORT,w)})});let g=o(async v=>{if(v==null)return 0;if(de.isBlob(v))return v.size;if(de.isSpecCompliantForm(v))return(await new t(cn.origin,{method:"POST",body:v}).arrayBuffer()).byteLength;if(de.isArrayBufferView(v)||de.isArrayBuffer(v))return v.byteLength;if(de.isURLSearchParams(v)&&(v=v+""),de.isString(v))return(await c(v)).byteLength},"getBodyLength"),y=o(async(v,E)=>{let w=de.toFiniteNumber(v.getContentLength());return w??g(E)},"resolveBodyLength");return async v=>{let{url:E,method:w,data:C,signal:_,cancelToken:b,timeout:A,onDownloadProgress:T,onUploadProgress:B,responseType:M,headers:I,withCredentials:H="same-origin",fetchOptions:K}=QV(v),q=e||fetch;M=M?(M+"").toLowerCase():"text";let W=Cae([_,b&&b.toAbortSignal()],A),he=null,pe=W&&W.unsubscribe&&(()=>{W.unsubscribe()}),ue;try{if(B&&l&&w!=="get"&&w!=="head"&&(ue=await y(I,C))!==0){let Z=new t(E,{method:"POST",body:C,duplex:"half"}),Se;if(de.isFormData(C)&&(Se=Z.headers.get("content-type"))&&I.setContentType(Se),Z.body){let[He,Le]=zE(ue,sd(JE(B)));C=SV(Z.body,bV,He,Le)}}de.isString(H)||(H=H?"include":"omit");let Y=i&&"credentials"in t.prototype,ve={...K,signal:W,method:w.toUpperCase(),headers:I.normalize().toJSON(),body:C,duplex:"half",credentials:Y?H:void 0};he=i&&new t(E,ve);let Oe=await(i?q(he,K):q(E,ve)),Je=h&&(M==="stream"||M==="response");if(h&&(T||Je&&pe)){let Z={};["status","statusText","headers"].forEach(rt=>{Z[rt]=Oe[rt]});let Se=de.toFiniteNumber(Oe.headers.get("content-length")),[He,Le]=T&&zE(Se,sd(JE(T),!0))||[];Oe=new n(SV(Oe.body,bV,He,()=>{Le&&Le(),pe&&pe()}),Z)}M=M||"text";let ne=await m[de.findKey(m,M)||"text"](Oe,v);return!Je&&pe&&pe(),await new Promise((Z,Se)=>{td(Z,Se,{data:ne,headers:Hs.from(Oe.headers),status:Oe.status,statusText:Oe.statusText,config:v,request:he})})}catch(Y){throw pe&&pe(),Y&&Y.name==="TypeError"&&/Load failed|fetch/i.test(Y.message)?Object.assign(new lt("Network Error",lt.ERR_NETWORK,v,he),{cause:Y.cause||Y}):lt.from(Y,Y&&Y.code,v,he)}}},"factory"),Bae=new Map,ZV=o(r=>{let e=r&&r.env||{},{fetch:t,Request:n,Response:s}=e,i=[n,s,t],a=i.length,u=a,c,l,h=Bae;for(;u--;)c=i[u],l=h.get(c),l===void 0&&h.set(c,l=u?new Map:Dae(e)),h=l;return l},"getFetch");ZV();var n_={http:xae,xhr:bae,fetch:{get:ZV}};de.forEach(n_,(r,e)=>{if(r){try{Object.defineProperty(r,"name",{value:e})}catch{}Object.defineProperty(r,"adapterName",{value:e})}});var TV=o(r=>`- ${r}`,"renderReason"),Rae=o(r=>de.isFunction(r)||r===null||r===!1,"isResolvedHandle");function Oae(r,e){r=de.isArray(r)?r:[r];let{length:t}=r,n,s,i={};for(let a=0;a<t;a++){n=r[a];let u;if(s=n,!Rae(n)&&(s=n_[(u=String(n)).toLowerCase()],s===void 0))throw new lt(`Unknown adapter '${u}'`);if(s&&(de.isFunction(s)||(s=s.get(e))))break;i[u||"#"+a]=s}if(!s){let a=Object.entries(i).map(([c,l])=>`adapter ${c} `+(l===!1?"is not supported by the environment":"is not available in the build")),u=t?a.length>1?`since :
|
|
51
|
-
`+a.map(TV).join(`
|
|
52
|
-
`):" "+TV(a[0]):"as no adapter specified";throw new lt("There is no suitable adapter to dispatch the request "+u,"ERR_NOT_SUPPORT")}return s}o(Oae,"getAdapter");var eU={getAdapter:Oae,adapters:n_};function UI(r){if(r.cancelToken&&r.cancelToken.throwIfRequested(),r.signal&&r.signal.aborted)throw new ic(null,r)}o(UI,"throwIfCancellationRequested");function IV(r){return UI(r),r.headers=Hs.from(r.headers),r.data=LI.call(r,r.transformRequest),["post","put","patch"].indexOf(r.method)!==-1&&r.headers.setContentType("application/x-www-form-urlencoded",!1),eU.getAdapter(r.adapter||t_.adapter,r)(r).then(o(function(n){return UI(r),n.data=LI.call(r,r.transformResponse,n),n.headers=Hs.from(n.headers),n},"onAdapterResolution"),o(function(n){return WV(n)||(UI(r),n&&n.response&&(n.response.data=LI.call(r,r.transformResponse,n.response),n.response.headers=Hs.from(n.response.headers))),Promise.reject(n)},"onAdapterRejection"))}o(IV,"dispatchRequest");var tS={};["object","boolean","number","function","string","symbol"].forEach((r,e)=>{tS[r]=o(function(n){return typeof n===r||"a"+(e<1?"n ":" ")+r},"validator")});var _V={};tS.transitional=o(function(e,t,n){function s(i,a){return"[Axios v"+WE+"] Transitional option '"+i+"'"+a+(n?". "+n:"")}return o(s,"formatMessage"),(i,a,u)=>{if(e===!1)throw new lt(s(a," has been removed"+(t?" in "+t:"")),lt.ERR_DEPRECATED);return t&&!_V[a]&&(_V[a]=!0,console.warn(s(a," has been deprecated since v"+t+" and will be removed in the near future"))),e?e(i,a,u):!0}},"transitional");tS.spelling=o(function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)},"spelling");function Pae(r,e,t){if(typeof r!="object")throw new lt("options must be an object",lt.ERR_BAD_OPTION_VALUE);let n=Object.keys(r),s=n.length;for(;s-- >0;){let i=n[s],a=e[i];if(a){let u=r[i],c=u===void 0||a(u,i,r);if(c!==!0)throw new lt("option "+i+" must be "+c,lt.ERR_BAD_OPTION_VALUE);continue}if(t!==!0)throw new lt("Unknown option "+i,lt.ERR_BAD_OPTION)}}o(Pae,"assertOptions");var GE={assertOptions:Pae,validators:tS},Ya=GE.validators,id=class{static{o(this,"Axios")}constructor(e){this.defaults=e||{},this.interceptors={request:new fV,response:new fV}}async request(e,t){try{return await this._request(e,t)}catch(n){if(n instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;let i=s.stack?s.stack.replace(/^.+\n/,""):"";try{n.stack?i&&!String(n.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(n.stack+=`
|
|
53
|
-
`+i):n.stack=i}catch{}}throw n}}_request(e,t){typeof e=="string"?(t=t||{},t.url=e):t=e||{},t=ff(this.defaults,t);let{transitional:n,paramsSerializer:s,headers:i}=t;n!==void 0&&GE.assertOptions(n,{silentJSONParsing:Ya.transitional(Ya.boolean),forcedJSONParsing:Ya.transitional(Ya.boolean),clarifyTimeoutError:Ya.transitional(Ya.boolean)},!1),s!=null&&(de.isFunction(s)?t.paramsSerializer={serialize:s}:GE.assertOptions(s,{encode:Ya.function,serialize:Ya.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),GE.assertOptions(t,{baseUrl:Ya.spelling("baseURL"),withXsrfToken:Ya.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let a=i&&de.merge(i.common,i[t.method]);i&&de.forEach(["delete","get","head","post","put","patch","common"],v=>{delete i[v]}),t.headers=Hs.concat(a,i);let u=[],c=!0;this.interceptors.request.forEach(o(function(E){typeof E.runWhen=="function"&&E.runWhen(t)===!1||(c=c&&E.synchronous,u.unshift(E.fulfilled,E.rejected))},"unshiftRequestInterceptors"));let l=[];this.interceptors.response.forEach(o(function(E){l.push(E.fulfilled,E.rejected)},"pushResponseInterceptors"));let h,m=0,g;if(!c){let v=[IV.bind(this),void 0];for(v.unshift(...u),v.push(...l),g=v.length,h=Promise.resolve(t);m<g;)h=h.then(v[m++],v[m++]);return h}g=u.length;let y=t;for(;m<g;){let v=u[m++],E=u[m++];try{y=v(y)}catch(w){E.call(this,w);break}}try{h=IV.call(this,y)}catch(v){return Promise.reject(v)}for(m=0,g=l.length;m<g;)h=h.then(l[m++],l[m++]);return h}getUri(e){e=ff(this.defaults,e);let t=r_(e.baseURL,e.url,e.allowAbsoluteUrls);return YI(t,e.params,e.paramsSerializer)}};de.forEach(["delete","get","head","options"],o(function(e){id.prototype[e]=function(t,n){return this.request(ff(n||{},{method:e,url:t,data:(n||{}).data}))}},"forEachMethodNoData"));de.forEach(["post","put","patch"],o(function(e){function t(n){return o(function(i,a,u){return this.request(ff(u||{},{method:e,headers:n?{"Content-Type":"multipart/form-data"}:{},url:i,data:a}))},"httpMethod")}o(t,"generateHTTPMethod"),id.prototype[e]=t(),id.prototype[e+"Form"]=t(!0)},"forEachMethodWithData"));var XE=id,XI=class r{static{o(this,"CancelToken")}constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let t;this.promise=new Promise(o(function(i){t=i},"promiseExecutor"));let n=this;this.promise.then(s=>{if(!n._listeners)return;let i=n._listeners.length;for(;i-- >0;)n._listeners[i](s);n._listeners=null}),this.promise.then=s=>{let i,a=new Promise(u=>{n.subscribe(u),i=u}).then(s);return a.cancel=o(function(){n.unsubscribe(i)},"reject"),a},e(o(function(i,a,u){n.reason||(n.reason=new ic(i,a,u),t(n.reason))},"cancel"))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){let e=new AbortController,t=o(n=>{e.abort(n)},"abort");return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new r(o(function(s){e=s},"executor")),cancel:e}}},kae=XI;function Lae(r){return o(function(t){return r.apply(null,t)},"wrap")}o(Lae,"spread");function Vae(r){return de.isObject(r)&&r.isAxiosError===!0}o(Vae,"isAxiosError");var WI={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(WI).forEach(([r,e])=>{WI[e]=r});var Uae=WI;function tU(r){let e=new XE(r),t=OV(XE.prototype.request,e);return de.extend(t,XE.prototype,e,{allOwnKeys:!0}),de.extend(t,e,null,{allOwnKeys:!0}),t.create=o(function(s){return tU(ff(r,s))},"create"),t}o(tU,"createInstance");var En=tU(t_);En.Axios=XE;En.CanceledError=ic;En.CancelToken=kae;En.isCancel=WV;En.VERSION=WE;En.toFormData=eS;En.AxiosError=lt;En.Cancel=En.CanceledError;En.all=o(function(e){return Promise.all(e)},"all");En.spread=Lae;En.isAxiosError=Vae;En.mergeConfig=ff;En.AxiosHeaders=Hs;En.formToJSON=r=>XV(de.isHTMLForm(r)?new FormData(r):r);En.getAdapter=eU.getAdapter;En.HttpStatusCode=Uae;En.default=En;rU.exports=En});var nU=te((twe,Ur)=>{"use strict";Ur.exports.NTLMFLAG_NEGOTIATE_UNICODE=1;Ur.exports.NTLMFLAG_NEGOTIATE_OEM=2;Ur.exports.NTLMFLAG_REQUEST_TARGET=4;Ur.exports.NTLMFLAG_NEGOTIATE_SIGN=16;Ur.exports.NTLMFLAG_NEGOTIATE_SEAL=32;Ur.exports.NTLMFLAG_NEGOTIATE_DATAGRAM_STYLE=64;Ur.exports.NTLMFLAG_NEGOTIATE_LM_KEY=128;Ur.exports.NTLMFLAG_NEGOTIATE_NETWARE=256;Ur.exports.NTLMFLAG_NEGOTIATE_NTLM_KEY=512;Ur.exports.NTLMFLAG_NEGOTIATE_ANONYMOUS=2048;Ur.exports.NTLMFLAG_NEGOTIATE_DOMAIN_SUPPLIED=4096;Ur.exports.NTLMFLAG_NEGOTIATE_WORKSTATION_SUPPLIED=8192;Ur.exports.NTLMFLAG_NEGOTIATE_LOCAL_CALL=16384;Ur.exports.NTLMFLAG_NEGOTIATE_ALWAYS_SIGN=32768;Ur.exports.NTLMFLAG_TARGET_TYPE_DOMAIN=65536;Ur.exports.NTLMFLAG_TARGET_TYPE_SERVER=1<<17;Ur.exports.NTLMFLAG_TARGET_TYPE_SHARE=1<<18;Ur.exports.NTLMFLAG_NEGOTIATE_NTLM2_KEY=1<<19;Ur.exports.NTLMFLAG_REQUEST_INIT_RESPONSE=1<<20;Ur.exports.NTLMFLAG_REQUEST_ACCEPT_RESPONSE=1<<21;Ur.exports.NTLMFLAG_REQUEST_NONNT_SESSION_KEY=1<<22;Ur.exports.NTLMFLAG_NEGOTIATE_TARGET_INFO=1<<23;Ur.exports.NTLMFLAG_NEGOTIATE_128=1<<29;Ur.exports.NTLMFLAG_NEGOTIATE_KEY_EXCHANGE=1<<30;Ur.exports.NTLMFLAG_NEGOTIATE_56=1<<31});var i_=te(ji=>{"use strict";ji.readUInt32BE=o(function(e,t){var n=e[0+t]<<24|e[1+t]<<16|e[2+t]<<8|e[3+t];return n>>>0},"readUInt32BE");ji.writeUInt32BE=o(function(e,t,n){e[0+n]=t>>>24,e[1+n]=t>>>16&255,e[2+n]=t>>>8&255,e[3+n]=t&255},"writeUInt32BE");ji.ip=o(function(e,t,n,s){for(var i=0,a=0,u=6;u>=0;u-=2){for(var c=0;c<=24;c+=8)i<<=1,i|=t>>>c+u&1;for(var c=0;c<=24;c+=8)i<<=1,i|=e>>>c+u&1}for(var u=6;u>=0;u-=2){for(var c=1;c<=25;c+=8)a<<=1,a|=t>>>c+u&1;for(var c=1;c<=25;c+=8)a<<=1,a|=e>>>c+u&1}n[s+0]=i>>>0,n[s+1]=a>>>0},"ip");ji.rip=o(function(e,t,n,s){for(var i=0,a=0,u=0;u<4;u++)for(var c=24;c>=0;c-=8)i<<=1,i|=t>>>c+u&1,i<<=1,i|=e>>>c+u&1;for(var u=4;u<8;u++)for(var c=24;c>=0;c-=8)a<<=1,a|=t>>>c+u&1,a<<=1,a|=e>>>c+u&1;n[s+0]=i>>>0,n[s+1]=a>>>0},"rip");ji.pc1=o(function(e,t,n,s){for(var i=0,a=0,u=7;u>=5;u--){for(var c=0;c<=24;c+=8)i<<=1,i|=t>>c+u&1;for(var c=0;c<=24;c+=8)i<<=1,i|=e>>c+u&1}for(var c=0;c<=24;c+=8)i<<=1,i|=t>>c+u&1;for(var u=1;u<=3;u++){for(var c=0;c<=24;c+=8)a<<=1,a|=t>>c+u&1;for(var c=0;c<=24;c+=8)a<<=1,a|=e>>c+u&1}for(var c=0;c<=24;c+=8)a<<=1,a|=e>>c+u&1;n[s+0]=i>>>0,n[s+1]=a>>>0},"pc1");ji.r28shl=o(function(e,t){return e<<t&268435455|e>>>28-t},"r28shl");var rS=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];ji.pc2=o(function(e,t,n,s){for(var i=0,a=0,u=rS.length>>>1,c=0;c<u;c++)i<<=1,i|=e>>>rS[c]&1;for(var c=u;c<rS.length;c++)a<<=1,a|=t>>>rS[c]&1;n[s+0]=i>>>0,n[s+1]=a>>>0},"pc2");ji.expand=o(function(e,t,n){var s=0,i=0;s=(e&1)<<5|e>>>27;for(var a=23;a>=15;a-=4)s<<=6,s|=e>>>a&63;for(var a=11;a>=3;a-=4)i|=e>>>a&63,i<<=6;i|=(e&31)<<1|e>>>31,t[n+0]=s>>>0,t[n+1]=i>>>0},"expand");var sU=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];ji.substitute=o(function(e,t){for(var n=0,s=0;s<4;s++){var i=e>>>18-s*6&63,a=sU[s*64+i];n<<=4,n|=a}for(var s=0;s<4;s++){var i=t>>>18-s*6&63,a=sU[256+s*64+i];n<<=4,n|=a}return n>>>0},"substitute");var iU=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];ji.permute=o(function(e){for(var t=0,n=0;n<iU.length;n++)t<<=1,t|=e>>>iU[n]&1;return t>>>0},"permute");ji.padSplit=o(function(e,t,n){for(var s=e.toString(2);s.length<t;)s="0"+s;for(var i=[],a=0;a<t;a+=n)i.push(s.slice(a,a+n));return i.join(" ")},"padSplit")});var rv=te((swe,oU)=>{"use strict";oU.exports=aU;function aU(r,e){if(!r)throw new Error(e||"Assertion failed")}o(aU,"assert");aU.equal=o(function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)},"assertEqual")});var nS=te((awe,uU)=>{"use strict";var jae=rv();function Fi(r){this.options=r,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0,this.padding=r.padding!==!1}o(Fi,"Cipher");uU.exports=Fi;Fi.prototype._init=o(function(){},"_init");Fi.prototype.update=o(function(e){return e.length===0?[]:this.type==="decrypt"?this._updateDecrypt(e):this._updateEncrypt(e)},"update");Fi.prototype._buffer=o(function(e,t){for(var n=Math.min(this.buffer.length-this.bufferOff,e.length-t),s=0;s<n;s++)this.buffer[this.bufferOff+s]=e[t+s];return this.bufferOff+=n,n},"_buffer");Fi.prototype._flushBuffer=o(function(e,t){return this._update(this.buffer,0,e,t),this.bufferOff=0,this.blockSize},"_flushBuffer");Fi.prototype._updateEncrypt=o(function(e){var t=0,n=0,s=(this.bufferOff+e.length)/this.blockSize|0,i=new Array(s*this.blockSize);this.bufferOff!==0&&(t+=this._buffer(e,t),this.bufferOff===this.buffer.length&&(n+=this._flushBuffer(i,n)));for(var a=e.length-(e.length-t)%this.blockSize;t<a;t+=this.blockSize)this._update(e,t,i,n),n+=this.blockSize;for(;t<e.length;t++,this.bufferOff++)this.buffer[this.bufferOff]=e[t];return i},"_updateEncrypt");Fi.prototype._updateDecrypt=o(function(e){for(var t=0,n=0,s=Math.ceil((this.bufferOff+e.length)/this.blockSize)-1,i=new Array(s*this.blockSize);s>0;s--)t+=this._buffer(e,t),n+=this._flushBuffer(i,n);return t+=this._buffer(e,t),i},"_updateDecrypt");Fi.prototype.final=o(function(e){var t;e&&(t=this.update(e));var n;return this.type==="encrypt"?n=this._finalEncrypt():n=this._finalDecrypt(),t?t.concat(n):n},"final");Fi.prototype._pad=o(function(e,t){if(t===0)return!1;for(;t<e.length;)e[t++]=0;return!0},"_pad");Fi.prototype._finalEncrypt=o(function(){if(!this._pad(this.buffer,this.bufferOff))return[];var e=new Array(this.blockSize);return this._update(this.buffer,0,e,0),e},"_finalEncrypt");Fi.prototype._unpad=o(function(e){return e},"_unpad");Fi.prototype._finalDecrypt=o(function(){jae.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var e=new Array(this.blockSize);return this._flushBuffer(e,0),this._unpad(e)},"_finalDecrypt")});var cU=te((uwe,a_)=>{"use strict";typeof Object.create=="function"?a_.exports=o(function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))},"inherits"):a_.exports=o(function(e,t){if(t){e.super_=t;var n=o(function(){},"TempCtor");n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},"inherits")});var sS=te((lwe,u_)=>{"use strict";try{if(o_=Ge("util"),typeof o_.inherits!="function")throw"";u_.exports=o_.inherits}catch{u_.exports=cU()}var o_});var c_=te((fwe,hU)=>{"use strict";var lU=rv(),Fae=sS(),Dn=i_(),fU=nS();function Mae(){this.tmp=new Array(2),this.keys=null}o(Mae,"DESState");function Za(r){fU.call(this,r);var e=new Mae;this._desState=e,this.deriveKeys(e,r.key)}o(Za,"DES");Fae(Za,fU);hU.exports=Za;Za.create=o(function(e){return new Za(e)},"create");var qae=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];Za.prototype.deriveKeys=o(function(e,t){e.keys=new Array(32),lU.equal(t.length,this.blockSize,"Invalid key length");var n=Dn.readUInt32BE(t,0),s=Dn.readUInt32BE(t,4);Dn.pc1(n,s,e.tmp,0),n=e.tmp[0],s=e.tmp[1];for(var i=0;i<e.keys.length;i+=2){var a=qae[i>>>1];n=Dn.r28shl(n,a),s=Dn.r28shl(s,a),Dn.pc2(n,s,e.keys,i)}},"deriveKeys");Za.prototype._update=o(function(e,t,n,s){var i=this._desState,a=Dn.readUInt32BE(e,t),u=Dn.readUInt32BE(e,t+4);Dn.ip(a,u,i.tmp,0),a=i.tmp[0],u=i.tmp[1],this.type==="encrypt"?this._encrypt(i,a,u,i.tmp,0):this._decrypt(i,a,u,i.tmp,0),a=i.tmp[0],u=i.tmp[1],Dn.writeUInt32BE(n,a,s),Dn.writeUInt32BE(n,u,s+4)},"_update");Za.prototype._pad=o(function(e,t){if(this.padding===!1)return!1;for(var n=e.length-t,s=t;s<e.length;s++)e[s]=n;return!0},"_pad");Za.prototype._unpad=o(function(e){if(this.padding===!1)return e;for(var t=e[e.length-1],n=e.length-t;n<e.length;n++)lU.equal(e[n],t);return e.slice(0,e.length-t)},"_unpad");Za.prototype._encrypt=o(function(e,t,n,s,i){for(var a=t,u=n,c=0;c<e.keys.length;c+=2){var l=e.keys[c],h=e.keys[c+1];Dn.expand(u,e.tmp,0),l^=e.tmp[0],h^=e.tmp[1];var m=Dn.substitute(l,h),g=Dn.permute(m),y=u;u=(a^g)>>>0,a=y}Dn.rip(u,a,s,i)},"_encrypt");Za.prototype._decrypt=o(function(e,t,n,s,i){for(var a=n,u=t,c=e.keys.length-2;c>=0;c-=2){var l=e.keys[c],h=e.keys[c+1];Dn.expand(a,e.tmp,0),l^=e.tmp[0],h^=e.tmp[1];var m=Dn.substitute(l,h),g=Dn.permute(m),y=a;a=(u^g)>>>0,u=y}Dn.rip(a,u,s,i)},"_decrypt")});var dU=te(pU=>{"use strict";var Hae=rv(),Kae=sS(),iS={};function $ae(r){Hae.equal(r.length,8,"Invalid IV length"),this.iv=new Array(8);for(var e=0;e<this.iv.length;e++)this.iv[e]=r[e]}o($ae,"CBCState");function Gae(r){function e(i){r.call(this,i),this._cbcInit()}o(e,"CBC"),Kae(e,r);for(var t=Object.keys(iS),n=0;n<t.length;n++){var s=t[n];e.prototype[s]=iS[s]}return e.create=o(function(a){return new e(a)},"create"),e}o(Gae,"instantiate");pU.instantiate=Gae;iS._cbcInit=o(function(){var e=new $ae(this.options.iv);this._cbcState=e},"_cbcInit");iS._update=o(function(e,t,n,s){var i=this._cbcState,a=this.constructor.super_.prototype,u=i.iv;if(this.type==="encrypt"){for(var c=0;c<this.blockSize;c++)u[c]^=e[t+c];a._update.call(this,u,0,n,s);for(var c=0;c<this.blockSize;c++)u[c]=n[s+c]}else{a._update.call(this,e,t,n,s);for(var c=0;c<this.blockSize;c++)n[s+c]^=u[c];for(var c=0;c<this.blockSize;c++)u[c]=e[t+c]}},"_update")});var vU=te((mwe,gU)=>{"use strict";var Xae=rv(),Wae=sS(),mU=nS(),ac=c_();function zae(r,e){Xae.equal(e.length,24,"Invalid key length");var t=e.slice(0,8),n=e.slice(8,16),s=e.slice(16,24);r==="encrypt"?this.ciphers=[ac.create({type:"encrypt",key:t}),ac.create({type:"decrypt",key:n}),ac.create({type:"encrypt",key:s})]:this.ciphers=[ac.create({type:"decrypt",key:s}),ac.create({type:"encrypt",key:n}),ac.create({type:"decrypt",key:t})]}o(zae,"EDEState");function hf(r){mU.call(this,r);var e=new zae(this.type,this.options.key);this._edeState=e}o(hf,"EDE");Wae(hf,mU);gU.exports=hf;hf.create=o(function(e){return new hf(e)},"create");hf.prototype._update=o(function(e,t,n,s){var i=this._edeState;i.ciphers[0]._update(e,t,n,s),i.ciphers[1]._update(n,s,n,s),i.ciphers[2]._update(n,s,n,s)},"_update");hf.prototype._pad=ac.prototype._pad;hf.prototype._unpad=ac.prototype._unpad});var yU=te(od=>{"use strict";od.utils=i_();od.Cipher=nS();od.DES=c_();od.CBC=dU();od.EDE=vU()});var xU=te((ywe,aS)=>{"use strict";(function(){"use strict";var r=typeof window=="object"?window:{},e=!r.JS_MD4_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;e&&(r=global);var t=!r.JS_MD4_NO_COMMON_JS&&typeof aS=="object"&&aS.exports,n=typeof define=="function"&&define.amd,s=!r.JS_MD4_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",i="0123456789abcdef".split(""),a=[128,32768,8388608,-2147483648],u=[0,8,16,24],c=["hex","array","digest","buffer","arrayBuffer"],l=[],h;if(s){var m=new ArrayBuffer(68);h=new Uint8Array(m),l=new Uint32Array(m)}var g=o(function(C){return function(_){return new E(!0).update(_)[C]()}},"createOutputMethod"),y=o(function(){var C=g("hex");e&&(C=v(C)),C.create=function(){return new E},C.update=function(A){return C.create().update(A)};for(var _=0;_<c.length;++_){var b=c[_];C[b]=g(b)}return C},"createMethod"),v=o(function(C){var _=Ge("crypto"),b=Ge("buffer").Buffer,A=o(function(T){if(typeof T=="string")return _.createHash("md4").update(T,"utf8").digest("hex");if(s&&T instanceof ArrayBuffer)T=new Uint8Array(T);else if(T.length===void 0)return C(T);return _.createHash("md4").update(new b(T)).digest("hex")},"nodeMethod");return A},"nodeWrap");function E(C){if(C)l[0]=l[16]=l[1]=l[2]=l[3]=l[4]=l[5]=l[6]=l[7]=l[8]=l[9]=l[10]=l[11]=l[12]=l[13]=l[14]=l[15]=0,this.blocks=l,this.buffer8=h;else if(s){var _=new ArrayBuffer(68);this.buffer8=new Uint8Array(_),this.blocks=new Uint32Array(_)}else this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.h0=this.h1=this.h2=this.h3=this.start=this.bytes=0,this.finalized=this.hashed=!1,this.first=!0}o(E,"Md4"),E.prototype.update=function(C){if(!this.finalized){var _=typeof C!="string";_&&s&&C instanceof ArrayBuffer&&(C=new Uint8Array(C));for(var b,A=0,T,B=C.length||0,M=this.blocks,I=this.buffer8;A<B;){if(this.hashed&&(this.hashed=!1,M[0]=M[16],M[16]=M[1]=M[2]=M[3]=M[4]=M[5]=M[6]=M[7]=M[8]=M[9]=M[10]=M[11]=M[12]=M[13]=M[14]=M[15]=0),_)if(s)for(T=this.start;A<B&&T<64;++A)I[T++]=C[A];else for(T=this.start;A<B&&T<64;++A)M[T>>2]|=C[A]<<u[T++&3];else if(s)for(T=this.start;A<B&&T<64;++A)b=C.charCodeAt(A),b<128?I[T++]=b:b<2048?(I[T++]=192|b>>6,I[T++]=128|b&63):b<55296||b>=57344?(I[T++]=224|b>>12,I[T++]=128|b>>6&63,I[T++]=128|b&63):(b=65536+((b&1023)<<10|C.charCodeAt(++A)&1023),I[T++]=240|b>>18,I[T++]=128|b>>12&63,I[T++]=128|b>>6&63,I[T++]=128|b&63);else for(T=this.start;A<B&&T<64;++A)b=C.charCodeAt(A),b<128?M[T>>2]|=b<<u[T++&3]:b<2048?(M[T>>2]|=(192|b>>6)<<u[T++&3],M[T>>2]|=(128|b&63)<<u[T++&3]):b<55296||b>=57344?(M[T>>2]|=(224|b>>12)<<u[T++&3],M[T>>2]|=(128|b>>6&63)<<u[T++&3],M[T>>2]|=(128|b&63)<<u[T++&3]):(b=65536+((b&1023)<<10|C.charCodeAt(++A)&1023),M[T>>2]|=(240|b>>18)<<u[T++&3],M[T>>2]|=(128|b>>12&63)<<u[T++&3],M[T>>2]|=(128|b>>6&63)<<u[T++&3],M[T>>2]|=(128|b&63)<<u[T++&3]);this.lastByteIndex=T,this.bytes+=T-this.start,T>=64?(this.start=T-64,this.hash(),this.hashed=!0):this.start=T}return this}},E.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var C=this.blocks,_=this.lastByteIndex;C[_>>2]|=a[_&3],_>=56&&(this.hashed||this.hash(),C[0]=C[16],C[16]=C[1]=C[2]=C[3]=C[4]=C[5]=C[6]=C[7]=C[8]=C[9]=C[10]=C[11]=C[12]=C[13]=C[14]=C[15]=0),C[14]=this.bytes<<3,this.hash()}},E.prototype.hash=function(){var C,_,b,A,T,B,M,I,H=this.blocks;this.first?(C=H[0]-1,C=C<<3|C>>>29,A=(C&4023233417|~C&2562383102)+H[1]+271733878,A=A<<7|A>>>25,b=(A&C|~A&4023233417)+H[2]-1732584194,b=b<<11|b>>>21,_=(b&A|~b&C)+H[3]-271733879,_=_<<19|_>>>13):(C=this.h0,_=this.h1,b=this.h2,A=this.h3,C+=(_&b|~_&A)+H[0],C=C<<3|C>>>29,A+=(C&_|~C&b)+H[1],A=A<<7|A>>>25,b+=(A&C|~A&_)+H[2],b=b<<11|b>>>21,_+=(b&A|~b&C)+H[3],_=_<<19|_>>>13),C+=(_&b|~_&A)+H[4],C=C<<3|C>>>29,A+=(C&_|~C&b)+H[5],A=A<<7|A>>>25,b+=(A&C|~A&_)+H[6],b=b<<11|b>>>21,_+=(b&A|~b&C)+H[7],_=_<<19|_>>>13,C+=(_&b|~_&A)+H[8],C=C<<3|C>>>29,A+=(C&_|~C&b)+H[9],A=A<<7|A>>>25,b+=(A&C|~A&_)+H[10],b=b<<11|b>>>21,_+=(b&A|~b&C)+H[11],_=_<<19|_>>>13,C+=(_&b|~_&A)+H[12],C=C<<3|C>>>29,A+=(C&_|~C&b)+H[13],A=A<<7|A>>>25,b+=(A&C|~A&_)+H[14],b=b<<11|b>>>21,_+=(b&A|~b&C)+H[15],_=_<<19|_>>>13,B=_&b,C+=(B|_&A|b&A)+H[0]+1518500249,C=C<<3|C>>>29,T=C&_,A+=(T|C&b|B)+H[4]+1518500249,A=A<<5|A>>>27,I=A&C,b+=(I|A&_|T)+H[8]+1518500249,b=b<<9|b>>>23,M=b&A,_+=(M|b&C|I)+H[12]+1518500249,_=_<<13|_>>>19,B=_&b,C+=(B|_&A|M)+H[1]+1518500249,C=C<<3|C>>>29,T=C&_,A+=(T|C&b|B)+H[5]+1518500249,A=A<<5|A>>>27,I=A&C,b+=(I|A&_|T)+H[9]+1518500249,b=b<<9|b>>>23,M=b&A,_+=(M|b&C|I)+H[13]+1518500249,_=_<<13|_>>>19,B=_&b,C+=(B|_&A|M)+H[2]+1518500249,C=C<<3|C>>>29,T=C&_,A+=(T|C&b|B)+H[6]+1518500249,A=A<<5|A>>>27,I=A&C,b+=(I|A&_|T)+H[10]+1518500249,b=b<<9|b>>>23,M=b&A,_+=(M|b&C|I)+H[14]+1518500249,_=_<<13|_>>>19,B=_&b,C+=(B|_&A|M)+H[3]+1518500249,C=C<<3|C>>>29,T=C&_,A+=(T|C&b|B)+H[7]+1518500249,A=A<<5|A>>>27,I=A&C,b+=(I|A&_|T)+H[11]+1518500249,b=b<<9|b>>>23,_+=(b&A|b&C|I)+H[15]+1518500249,_=_<<13|_>>>19,B=_^b,C+=(B^A)+H[0]+1859775393,C=C<<3|C>>>29,A+=(B^C)+H[8]+1859775393,A=A<<9|A>>>23,I=A^C,b+=(I^_)+H[4]+1859775393,b=b<<11|b>>>21,_+=(I^b)+H[12]+1859775393,_=_<<15|_>>>17,B=_^b,C+=(B^A)+H[2]+1859775393,C=C<<3|C>>>29,A+=(B^C)+H[10]+1859775393,A=A<<9|A>>>23,I=A^C,b+=(I^_)+H[6]+1859775393,b=b<<11|b>>>21,_+=(I^b)+H[14]+1859775393,_=_<<15|_>>>17,B=_^b,C+=(B^A)+H[1]+1859775393,C=C<<3|C>>>29,A+=(B^C)+H[9]+1859775393,A=A<<9|A>>>23,I=A^C,b+=(I^_)+H[5]+1859775393,b=b<<11|b>>>21,_+=(I^b)+H[13]+1859775393,_=_<<15|_>>>17,B=_^b,C+=(B^A)+H[3]+1859775393,C=C<<3|C>>>29,A+=(B^C)+H[11]+1859775393,A=A<<9|A>>>23,I=A^C,b+=(I^_)+H[7]+1859775393,b=b<<11|b>>>21,_+=(I^b)+H[15]+1859775393,_=_<<15|_>>>17,this.first?(this.h0=C+1732584193<<0,this.h1=_-271733879<<0,this.h2=b-1732584194<<0,this.h3=A+271733878<<0,this.first=!1):(this.h0=this.h0+C<<0,this.h1=this.h1+_<<0,this.h2=this.h2+b<<0,this.h3=this.h3+A<<0)},E.prototype.hex=function(){this.finalize();var C=this.h0,_=this.h1,b=this.h2,A=this.h3;return i[C>>4&15]+i[C&15]+i[C>>12&15]+i[C>>8&15]+i[C>>20&15]+i[C>>16&15]+i[C>>28&15]+i[C>>24&15]+i[_>>4&15]+i[_&15]+i[_>>12&15]+i[_>>8&15]+i[_>>20&15]+i[_>>16&15]+i[_>>28&15]+i[_>>24&15]+i[b>>4&15]+i[b&15]+i[b>>12&15]+i[b>>8&15]+i[b>>20&15]+i[b>>16&15]+i[b>>28&15]+i[b>>24&15]+i[A>>4&15]+i[A&15]+i[A>>12&15]+i[A>>8&15]+i[A>>20&15]+i[A>>16&15]+i[A>>28&15]+i[A>>24&15]},E.prototype.toString=E.prototype.hex,E.prototype.digest=function(){this.finalize();var C=this.h0,_=this.h1,b=this.h2,A=this.h3;return[C&255,C>>8&255,C>>16&255,C>>24&255,_&255,_>>8&255,_>>16&255,_>>24&255,b&255,b>>8&255,b>>16&255,b>>24&255,A&255,A>>8&255,A>>16&255,A>>24&255]},E.prototype.array=E.prototype.digest,E.prototype.arrayBuffer=function(){this.finalize();var C=new ArrayBuffer(16),_=new Uint32Array(C);return _[0]=this.h0,_[1]=this.h1,_[2]=this.h2,_[3]=this.h3,C},E.prototype.buffer=E.prototype.arrayBuffer;var w=y();t?aS.exports=w:(r.md4=w,n&&define(function(){return w}))})()});var SU=te((Ewe,EU)=>{"use strict";var l_=Ge("crypto"),wwe=yU(),Jae=xU();function Yae(r,e){var t=new Buffer.alloc(24),n=new Buffer.alloc(21).fill(0);return e.copy(n),oc(n.slice(0,7),r).copy(t),oc(n.slice(7,14),r).copy(t,8),oc(n.slice(14),r).copy(t,16),t}o(Yae,"createLMResponse");function Qae(r){var e=new Buffer.alloc(16),t=new Buffer.alloc(14),n=new Buffer.from("KGS!@#$%","ascii");return r.length>14?(e.fill(0),e):(t.fill(0),t.write(r.toUpperCase(),0,"ascii"),Buffer.concat([oc(t.slice(0,7),n),oc(t.slice(7),n)]))}o(Qae,"createLMHash");function oc(r,e){var t=new Buffer.alloc(8);t[0]=r[0]&254,t[1]=r[0]<<7&255|r[1]>>1,t[2]=r[1]<<6&255|r[2]>>2,t[3]=r[2]<<5&255|r[3]>>3,t[4]=r[3]<<4&255|r[4]>>4,t[5]=r[4]<<3&255|r[5]>>5,t[6]=r[5]<<2&255|r[6]>>6,t[7]=r[6]<<1&255;for(var n=0;n<8;n++){for(var s=0,i=1;i<8;i++)s+=(t[n]>>i)%2;t[n]|=s%2===0?1:0}var a=a.DES.create({type:"encrypt",ley:t});return a.update(e)}o(oc,"calculateDES");function Zae(r,e){var t=new Buffer.alloc(24),n=new Buffer.alloc(21).fill(0);return e.copy(n),oc(n.slice(0,7),r).copy(t),oc(n.slice(7,14),r).copy(t,8),oc(n.slice(14),r).copy(t,16),t}o(Zae,"createNTLMResponse");function eoe(r){var e=Jae.create();return e.update(new Buffer.from(r,"ucs2")),e.buffer()}o(eoe,"createNTLMHash");function wU(r,e,t){var n=l_.createHmac("md5",r);return n.update(new Buffer.from(e.toUpperCase()+t,"ucs2")),n.digest()}o(wU,"createNTLMv2Hash");function toe(r,e,t,n,s){var i=new Buffer.alloc(24),a=wU(t,e,s),u=l_.createHmac("md5",a);r.challenge.copy(i,8),i.write(n||f_(16),16,"hex"),u.update(i.slice(8));var c=u.digest();return c.copy(i),i}o(toe,"createLMv2Response");function roe(r,e,t,n,s){var i=new Buffer.alloc(48+r.targetInfo.buffer.length),a=wU(t,e,s),u=l_.createHmac("md5",a);r.challenge.copy(i,8),i.writeUInt32BE(16842752,16),i.writeUInt32LE(0,20);var c=((Date.now()+116444736e5)*1e4).toString(16),l=+("0x"+c.substring(Math.max(0,c.length-8))),h=+("0x"+c.substring(0,Math.max(0,c.length-8)));i.writeUInt32LE(l,24,!1),i.writeUInt32LE(h,28,!1),i.write(n||f_(16),32,"hex"),i.writeUInt32LE(0,40),r.targetInfo.buffer.copy(i,44),i.writeUInt32LE(0,44+r.targetInfo.buffer.length),u.update(i.slice(8));var m=u.digest();return m.copy(i),i}o(roe,"createNTLMv2Response");function f_(r){for(var e="";e.length<r;)e+=Math.floor(Math.random()*16).toString(16);return e}o(f_,"createPseudoRandomValue");EU.exports={createLMHash:Qae,createNTLMHash:eoe,createLMResponse:Yae,createNTLMResponse:Zae,createLMv2Response:toe,createNTLMv2Response:roe,createPseudoRandomValue:f_}});var CU=te((bwe,AU)=>{"use strict";var bU=Ge("os"),cc=nU(),uc=SU(),lc="NTLMSSP\0";function noe(r,e){var t=32,n=0,s=new Buffer.alloc(1024);return r=r===void 0?bU.hostname():r,e=e===void 0?"":e,s.write(lc,n,lc.length,"ascii"),n+=lc.length,s.writeUInt32LE(1,n),n+=4,s.writeUInt32LE(cc.NTLMFLAG_NEGOTIATE_OEM|cc.NTLMFLAG_REQUEST_TARGET|cc.NTLMFLAG_NEGOTIATE_NTLM_KEY|cc.NTLMFLAG_NEGOTIATE_NTLM2_KEY|cc.NTLMFLAG_NEGOTIATE_ALWAYS_SIGN,n),n+=4,s.writeUInt16LE(e.length,n),n+=2,s.writeUInt16LE(e.length,n),n+=2,s.writeUInt32LE(e.length===0?0:t,n),n+=4,e.length>0&&(t+=s.write(e,t,"ascii")),s.writeUInt16LE(r.length,n),n+=2,s.writeUInt16LE(r.length,n),n+=2,s.writeUInt32LE(r.length===0?0:t,n),n+=4,r.length>0&&(t+=s.write(r,t,"ascii")),"NTLM "+s.toString("base64",0,t)}o(noe,"createType1Message");function soe(r){if(r===void 0)throw new Error("Invalid argument");if(Object.prototype.toString.call(r)!=="[object String]")if(r.hasOwnProperty("headers")&&r.headers.hasOwnProperty("www-authenticate"))r=r.headers["www-authenticate"];else throw new Error("Invalid argument");var e=/^NTLM ([^,\s]+)/.exec(r);e&&(r=e[1]);var t=new Buffer.from(r,"base64"),n={};if(t.toString("ascii",0,lc.length)!==lc)throw new Error("Invalid message signature: "+r);if(t.readUInt32LE(lc.length)!==2)throw new Error("Invalid message type (no type 2)");return n.flags=t.readUInt32LE(20),n.encoding=n.flags&cc.NTLMFLAG_NEGOTIATE_OEM?"ascii":"ucs2",n.version=n.flags&cc.NTLMFLAG_NEGOTIATE_NTLM2_KEY?2:1,n.challenge=t.slice(24,32),n.targetName=(function(){var s=t.readUInt16LE(12),i=t.readUInt32LE(16);if(s===0)return"";if(i+s>t.length||i<32)throw new Error("Bad type 2 message");return t.toString(n.encoding,i,i+s)})(),n.flags&cc.NTLMFLAG_NEGOTIATE_TARGET_INFO&&(n.targetInfo=(function(){var s={},i=t.readUInt16LE(40),a=t.readUInt32LE(44),u=new Buffer.alloc(i);if(t.copy(u,0,a,a+i),i===0)return s;if(a+i>t.length||a<32)throw new Error("Bad type 2 message");for(var c=a;c<a+i;){var l=t.readUInt16LE(c);c+=2;var h=t.readUInt16LE(c);if(c+=2,l===0)break;var m=void 0;switch(l){case 1:m="SERVER";break;case 2:m="DOMAIN";break;case 3:m="FQDN";break;case 4:m="DNS";break;case 5:m="PARENT_DNS";break;default:m="";break}m&&(s[m]=t.toString("ucs2",c,c+h)),c+=h}return{parsed:s,buffer:u}})()),n}o(soe,"decodeType2Message");function ioe(r,e,t,n,s){var i=52,a=new Buffer.alloc(1024);if(n===void 0&&(n=bU.hostname()),s===void 0&&(s=r.targetName),a.write(lc,0,lc.length,"ascii"),a.writeUInt32LE(3,8),r.version===2){i=64;var u=uc.createNTLMHash(t),c=uc.createPseudoRandomValue(16),l=uc.createLMv2Response(r,e,u,c,s),h=uc.createNTLMv2Response(r,e,u,c,s);a.writeUInt16LE(l.length,12),a.writeUInt16LE(l.length,14),a.writeUInt32LE(i,16),l.copy(a,i),i+=l.length,a.writeUInt16LE(h.length,20),a.writeUInt16LE(h.length,22),a.writeUInt32LE(i,24),h.copy(a,i),i+=h.length}else{var m=uc.createLMHash(t),u=uc.createNTLMHash(t),g=uc.createLMResponse(r.challenge,m),y=uc.createNTLMResponse(r.challenge,u);a.writeUInt16LE(g.length,12),a.writeUInt16LE(g.length,14),a.writeUInt32LE(i,16),g.copy(a,i),i+=g.length,a.writeUInt16LE(y.length,20),a.writeUInt16LE(y.length,22),a.writeUInt32LE(i,24),y.copy(a,i),i+=y.length}return a.writeUInt16LE(r.encoding==="ascii"?s.length:s.length*2,28),a.writeUInt16LE(r.encoding==="ascii"?s.length:s.length*2,30),a.writeUInt32LE(i,32),i+=a.write(s,i,r.encoding),a.writeUInt16LE(r.encoding==="ascii"?e.length:e.length*2,36),a.writeUInt16LE(r.encoding==="ascii"?e.length:e.length*2,38),a.writeUInt32LE(i,40),i+=a.write(e,i,r.encoding),a.writeUInt16LE(r.encoding==="ascii"?n.length:n.length*2,44),a.writeUInt16LE(r.encoding==="ascii"?n.length:n.length*2,46),a.writeUInt32LE(i,48),i+=a.write(n,i,r.encoding),r.version===2&&(a.writeUInt16LE(0,52),a.writeUInt16LE(0,54),a.writeUInt32LE(0,56),a.writeUInt32LE(r.flags,60)),"NTLM "+a.toString("base64",0,i)}o(ioe,"createType3Message");AU.exports={createType1Message:noe,decodeType2Message:soe,createType3Message:ioe}});var _U=te((Cwe,IU)=>{"use strict";var aoe=Ge("util"),ooe=Ge("stream"),NU=ooe.Writable,TU=TU||function(r){setTimeout(r,0)};IU.exports=nv;aoe.inherits(nv,NU);function nv(r){if(!(this instanceof nv))return new nv(r);r=r||{},NU.call(this,r)}o(nv,"DevNull");nv.prototype._write=function(r,e,t){TU(t)}});var BU=te(Zn=>{"use strict";var uoe=Zn&&Zn.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(r,n,s)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),coe=Zn&&Zn.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),oS=Zn&&Zn.__importStar||(function(){var r=o(function(e){return r=Object.getOwnPropertyNames||function(t){var n=[];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(n[n.length]=s);return n},r(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n=r(e),s=0;s<n.length;s++)n[s]!=="default"&&uoe(t,e,n[s]);return coe(t,e),t}})(),loe=Zn&&Zn.__awaiter||function(r,e,t,n){function s(i){return i instanceof t?i:new t(function(a){a(i)})}return o(s,"adopt"),new(t||(t=Promise))(function(i,a){function u(h){try{l(n.next(h))}catch(m){a(m)}}o(u,"fulfilled");function c(h){try{l(n.throw(h))}catch(m){a(m)}}o(c,"rejected");function l(h){h.done?i(h.value):s(h.value).then(u,c)}o(l,"step"),l((n=n.apply(r,e||[])).next())})},foe=Zn&&Zn.__generator||function(r,e){var t={label:0,sent:o(function(){if(i[0]&1)throw i[1];return i[1]},"sent"),trys:[],ops:[]},n,s,i,a=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return a.next=u(0),a.throw=u(1),a.return=u(2),typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(l){return function(h){return c([l,h])}}function c(l){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(t=0)),t;)try{if(n=1,s&&(i=l[0]&2?s.return:l[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,l[1])).done)return i;switch(s=0,i&&(l=[l[0]&2,i.value]),l[0]){case 0:case 1:i=l;break;case 4:return t.label++,{value:l[1],done:!1};case 5:t.label++,s=l[1],l=[0];continue;case 7:l=t.ops.pop(),t.trys.pop();continue;default:if(i=t.trys,!(i=i.length>0&&i[i.length-1])&&(l[0]===6||l[0]===2)){t=0;continue}if(l[0]===3&&(!i||l[1]>i[0]&&l[1]<i[3])){t.label=l[1];break}if(l[0]===6&&t.label<i[1]){t.label=i[1],i=l;break}if(i&&t.label<i[2]){t.label=i[2],t.ops.push(l);break}i[2]&&t.ops.pop(),t.trys.pop();continue}l=e.call(r,t)}catch(h){l=[6,h],s=0}finally{n=i=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},hoe=Zn&&Zn.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Zn,"__esModule",{value:!0});Zn.AxiosError=void 0;Zn.NtlmClient=goe;var DU=oS(s_());Object.defineProperty(Zn,"AxiosError",{enumerable:!0,get:o(function(){return DU.AxiosError},"get")});var h_=oS(CU()),poe=oS(Ge("https")),doe=oS(Ge("http")),moe=hoe(_U());function goe(r,e){var t=this,n=e??{};n.httpAgent||(n.httpAgent=new doe.Agent({keepAlive:!0})),n.httpsAgent||(n.httpsAgent=new poe.Agent({keepAlive:!0}));var s=DU.default.create(n);return s.interceptors.response.use(function(i){return i},function(i){return loe(t,void 0,void 0,function(){var a,u,c,l,h,m,g,y;return foe(this,function(v){switch(v.label){case 0:return a=i.response,a&&a.status===401&&a.headers["www-authenticate"]&&a.headers["www-authenticate"].includes("NTLM")&&(!a.config.headers["X-retry"]||a.config.headers["X-retry"]!=="false")?(u=((g=a.headers["www-authenticate"].split(",").find(function(E){return E.match(/ *NTLM/)}))===null||g===void 0?void 0:g.trim())||"",a.config.headers||(a.config.headers={}),u.length<50?(c=h_.createType1Message(r.workstation,r.domain),a.config.headers.Authorization=c):(l=h_.decodeType2Message((u.match(/^NTLM\s+(.+?)(,|\s+|$)/)||[])[1]),h=h_.createType3Message(l,r.username,r.password,r.workstation,r.domain),a.config.headers["X-retry"]="false",a.config.headers.Authorization=h),a.config.responseType!=="stream"?[3,2]:(m=(y=i.response)===null||y===void 0?void 0:y.data,m&&!m.readableEnded?[4,new Promise(function(E){m.pipe((0,moe.default)()),m.once("close",E)})]:[3,2])):[3,3];case 1:v.sent(),v.label=2;case 2:return[2,s(a.config)];case 3:throw i}})})}),s}o(goe,"NtlmClient")});var sv=te(fc=>{"use strict";fc.removeLeadingAndTrailingHTTPWhitespace=r=>r.replace(/^[ \t\n\r]+/u,"").replace(/[ \t\n\r]+$/u,"");fc.removeTrailingHTTPWhitespace=r=>r.replace(/[ \t\n\r]+$/u,"");fc.isHTTPWhitespaceChar=r=>r===" "||r===" "||r===`
|
|
54
|
-
`||r==="\r";fc.solelyContainsHTTPTokenCodePoints=r=>/^[-!#$%&'*+.^_`|~A-Za-z0-9]*$/u.test(r);fc.soleyContainsHTTPQuotedStringTokenCodePoints=r=>/^[\t\u0020-\u007E\u0080-\u00FF]*$/u.test(r);fc.asciiLowercase=r=>r.replace(/[A-Z]/ug,e=>e.toLowerCase());fc.collectAnHTTPQuotedString=(r,e)=>{let t="";for(e++;;){for(;e<r.length&&r[e]!=='"'&&r[e]!=="\\";)t+=r[e],++e;if(e>=r.length)break;let n=r[e];if(++e,n==="\\"){if(e>=r.length){t+="\\";break}t+=r[e],++e}else break}return[t,e]}});var OU=te((Bwe,RU)=>{"use strict";var{asciiLowercase:uS,solelyContainsHTTPTokenCodePoints:voe,soleyContainsHTTPQuotedStringTokenCodePoints:yoe}=sv();RU.exports=class{static{o(this,"MIMETypeParameters")}constructor(e){this._map=e}get size(){return this._map.size}get(e){return e=uS(String(e)),this._map.get(e)}has(e){return e=uS(String(e)),this._map.has(e)}set(e,t){if(e=uS(String(e)),t=String(t),!voe(e))throw new Error(`Invalid MIME type parameter name "${e}": only HTTP token code points are valid.`);if(!yoe(t))throw new Error(`Invalid MIME type parameter value "${t}": only HTTP quoted-string token code points are valid.`);return this._map.set(e,t)}clear(){this._map.clear()}delete(e){return e=uS(String(e)),this._map.delete(e)}forEach(e,t){this._map.forEach(e,t)}keys(){return this._map.keys()}values(){return this._map.values()}entries(){return this._map.entries()}[Symbol.iterator](){return this._map[Symbol.iterator]()}}});var LU=te((Owe,kU)=>{"use strict";var{removeLeadingAndTrailingHTTPWhitespace:xoe,removeTrailingHTTPWhitespace:PU,isHTTPWhitespaceChar:woe,solelyContainsHTTPTokenCodePoints:p_,soleyContainsHTTPQuotedStringTokenCodePoints:Eoe,asciiLowercase:d_,collectAnHTTPQuotedString:Soe}=sv();kU.exports=r=>{r=xoe(r);let e=0,t="";for(;e<r.length&&r[e]!=="/";)t+=r[e],++e;if(t.length===0||!p_(t)||e>=r.length)return null;++e;let n="";for(;e<r.length&&r[e]!==";";)n+=r[e],++e;if(n=PU(n),n.length===0||!p_(n))return null;let s={type:d_(t),subtype:d_(n),parameters:new Map};for(;e<r.length;){for(++e;woe(r[e]);)++e;let i="";for(;e<r.length&&r[e]!==";"&&r[e]!=="=";)i+=r[e],++e;if(i=d_(i),e<r.length){if(r[e]===";")continue;++e}let a=null;if(r[e]==='"')for([a,e]=Soe(r,e);e<r.length&&r[e]!==";";)++e;else{for(a="";e<r.length&&r[e]!==";";)a+=r[e],++e;if(a=PU(a),a==="")continue}i.length>0&&p_(i)&&Eoe(a)&&!s.parameters.has(i)&&s.parameters.set(i,a)}return s}});var UU=te((Pwe,VU)=>{"use strict";var{solelyContainsHTTPTokenCodePoints:boe}=sv();VU.exports=r=>{let e=`${r.type}/${r.subtype}`;if(r.parameters.size===0)return e;for(let[t,n]of r.parameters)e+=";",e+=t,e+="=",(!boe(n)||n.length===0)&&(n=n.replace(/(["\\])/ug,"\\$1"),n=`"${n}"`),e+=n;return e}});var qU=te((Lwe,MU)=>{"use strict";var Aoe=OU(),Coe=LU(),Noe=UU(),{asciiLowercase:jU,solelyContainsHTTPTokenCodePoints:FU}=sv();MU.exports=class{static{o(this,"MIMEType")}constructor(e){e=String(e);let t=Coe(e);if(t===null)throw new Error(`Could not parse MIME type string "${e}"`);this._type=t.type,this._subtype=t.subtype,this._parameters=new Aoe(t.parameters)}static parse(e){try{return new this(e)}catch{return null}}get essence(){return`${this.type}/${this.subtype}`}get type(){return this._type}set type(e){if(e=jU(String(e)),e.length===0)throw new Error("Invalid type: must be a non-empty string");if(!FU(e))throw new Error(`Invalid type ${e}: must contain only HTTP token code points`);this._type=e}get subtype(){return this._subtype}set subtype(e){if(e=jU(String(e)),e.length===0)throw new Error("Invalid subtype: must be a non-empty string");if(!FU(e))throw new Error(`Invalid subtype ${e}: must contain only HTTP token code points`);this._subtype=e}get parameters(){return this._parameters}toString(){return Noe(this)}isJavaScript({prohibitParameters:e=!1}={}){switch(this._type){case"text":switch(this._subtype){case"ecmascript":case"javascript":case"javascript1.0":case"javascript1.1":case"javascript1.2":case"javascript1.3":case"javascript1.4":case"javascript1.5":case"jscript":case"livescript":case"x-ecmascript":case"x-javascript":return!e||this._parameters.size===0;default:return!1}case"application":switch(this._subtype){case"ecmascript":case"javascript":case"x-ecmascript":case"x-javascript":return!e||this._parameters.size===0;default:return!1}default:return!1}}isXML(){return this._subtype==="xml"&&(this._type==="text"||this._type==="application")||this._subtype.endsWith("+xml")}isHTML(){return this._subtype==="html"&&this._type==="text"}}});var hc=te(Sn=>{"use strict";var Toe=Sn&&Sn.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(r,n,s)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),Ioe=Sn&&Sn.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),_oe=Sn&&Sn.__importStar||(function(){var r=o(function(e){return r=Object.getOwnPropertyNames||function(t){var n=[];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(n[n.length]=s);return n},r(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n=r(e),s=0;s<n.length;s++)n[s]!=="default"&&Toe(t,e,n[s]);return Ioe(t,e),t}})();Object.defineProperty(Sn,"__esModule",{value:!0});Sn.wsdlCacheSingleton=Sn.TNS_PREFIX=void 0;Sn.passwordDigest=Boe;Sn.findPrefix=Roe;Sn.splitQName=Ooe;Sn.xmlEscape=Poe;Sn.parseMTOMResp=koe;var Doe=_oe(Ge("crypto"));function Boe(r,e,t){let n=Doe.createHash("sha1"),s=Buffer.from(r||"","base64"),i=Buffer.from(e||"","utf8"),a=Buffer.from(t||"","utf8"),u=Buffer.concat([s,i,a]);return n.update(u),n.digest("base64")}o(Boe,"passwordDigest");Sn.TNS_PREFIX="__tns__";function Roe(r,e){for(let t in r)if(t!==Sn.TNS_PREFIX&&r[t]===e)return t}o(Roe,"findPrefix");function Ooe(r){if(typeof r!="string")return{prefix:Sn.TNS_PREFIX,name:r};let[e]=r.split("|",1),t=e.indexOf(":");return{prefix:e.substring(0,t)||Sn.TNS_PREFIX,name:e.substring(t+1)}}o(Ooe,"splitQName");function Poe(r){return typeof r=="string"?r.substr(0,9)==="<![CDATA["&&r.substr(-3)==="]]>"?r:r.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"):r}o(Poe,"xmlEscape");function koe(r,e,t){return import("./src-NRIPS2N7.mjs").then(({MultipartParser:n})=>{let s={parts:[]},i="",a="",u,c=0,l=new n;return l.initWithBoundary(e),l.on("data",({name:h,buffer:m,start:g,end:y})=>{switch(h){case"partBegin":s.parts[c]={body:null,headers:{}},u=Buffer.from("");break;case"headerField":i=m.slice(g,y).toString();break;case"headerValue":a=m.slice(g,y).toString();break;case"headerEnd":s.parts[c].headers[i.toLowerCase()]=a;break;case"partData":u=Buffer.concat([u,m.slice(g,y)]);break;case"partEnd":s.parts[c].body=u,c++;break}}),l.write(r),t(null,s)}).catch(t)}o(koe,"parseMTOMResp");var Loe=class{static{o(this,"DefaultWSDLCache")}constructor(){this.cache={}}has(e){return!!this.cache[e]}get(e){return this.cache[e]}set(e,t){this.cache[e]=t}clear(){this.cache={}}};Sn.wsdlCacheSingleton=new Loe});var HU=te((Mwe,Voe)=>{Voe.exports={name:"soap",version:"1.6.3",description:"A minimal node SOAP client",engines:{node:">=20.9.0"},author:"Vinay Pulim <v@pulim.com>",dependencies:{axios:"^1.13.1","axios-ntlm":"^1.4.6",debug:"^4.4.3",formidable:"^3.5.4","get-stream":"^6.0.1",lodash:"^4.17.21",sax:"^1.4.1","strip-bom":"^3.0.0","whatwg-mimetype":"4.0.0","xml-crypto":"^6.1.2"},repository:{type:"git",url:"https://github.com/vpulim/node-soap.git"},main:"./lib/soap.js",types:"./lib/soap.d.ts",directories:{lib:"./lib",test:"./test"},scripts:{build:"tsc -p .",watch:"tsc -w -p .",lint:"eslint .",format:"prettier --write .","format:check":"prettier --check .",toc:"./node_modules/.bin/doctoc Readme.md --github --maxlevel 3",cover:"OPENSSL_ENABLE_SHA1_SIGNATURES=1 nyc --extension=.ts --reporter=lcov --reporter=html --reporter=text mocha --no-parallel --timeout 30000 --exit test/*-test.js test/security/*.js",coveralls:"cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js -v",docs:"typedoc --out docs",test:"mocha --timeout 15000 --bail --exit test/*-test.js test/security/*.js"},keywords:["soap"],license:"MIT",devDependencies:{"@eslint/js":"^9.38.0","@types/debug":"^4.1.12","@types/formidable":"^3.4.6","@types/lodash":"^4.17.20","@types/node":"^14.0.0","@types/sax":"^1.2.7","@types/whatwg-mimetype":"^3.0.2","body-parser":"^2.2.0",colors:"^1.4.0",diff:"^8.0.2",doctoc:"^2.2.1",duplexer:"~0.1.2",eslint:"^9.38.0",express:"^5.1.0",finalhandler:"^2.1.0",glob:"^13.0.0",mocha:"^11.7.4",nyc:"^17.1.0",prettier:"^3.6.2","readable-stream":"^4.7.0",semver:"^7.7.3","serve-static":"^2.2.0",should:"^13.2.3",sinon:"^21.0.0","source-map-support":"^0.5.21",timekeeper:"^2.3.1",typedoc:"^0.28.14",typescript:"^5.9.3","typescript-eslint":"^8.46.1"}}});var cS=te(Mi=>{"use strict";var Uoe=Mi&&Mi.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(r,n,s)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),joe=Mi&&Mi.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),GU=Mi&&Mi.__importStar||(function(){var r=o(function(e){return r=Object.getOwnPropertyNames||function(t){var n=[];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(n[n.length]=s);return n},r(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n=r(e),s=0;s<n.length;s++)n[s]!=="default"&&Uoe(t,e,n[s]);return joe(t,e),t}})(),XU=Mi&&Mi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Mi,"__esModule",{value:!0});Mi.HttpClient=void 0;var Foe=GU(s_()),Moe=BU(),KU=Ge("crypto"),qoe=XU(Wp()),Hoe=GU(Ge("url")),Koe=XU(qU()),$oe=Ge("zlib"),Goe=hc(),$U=(0,qoe.default)("node-soap"),Xoe=HU(),Woe=class{static{o(this,"HttpClient")}constructor(e){e=e||{},this.options=e,this._request=e.request||Foe.create()}buildRequest(e,t,n,s={}){let i=Hoe.parse(e),a=t?"POST":"GET",u=i.hostname,c=parseInt(i.port,10),l={"User-Agent":"node-soap/"+Xoe.version,Accept:"text/html,application/xhtml+xml,application/xml,text/xml;q=0.9,*/*;q=0.8","Accept-Encoding":"none","Accept-Charset":"utf-8",...s.forever&&{Connection:"keep-alive"},Host:u+(isNaN(c)?"":":"+c)},h=["headers"],{attachments:m,...g}=s,y=m||[];typeof t=="string"&&y.length===0&&!s.forceMTOM&&(l["Content-Length"]=Buffer.byteLength(t,"utf8"),l["Content-Type"]="application/x-www-form-urlencoded"),n=n||{};for(let E in n)l[E]=n[E];let v={url:i.href,method:a,headers:l,transformResponse:o(E=>E,"transformResponse")};if(s.ntlm||(v.validateStatus=null),s.forceMTOM||y.length>0){let E=(0,KU.randomUUID)(),w=null;if(l["Content-Type"].indexOf("action")>-1)for(let A of l["Content-Type"].split("; "))A.indexOf("action")>-1&&(w=A);let C=(0,KU.randomUUID)();l["Content-Type"]='multipart/related; type="application/xop+xml"; start="<'+E+'>"; start-info="text/xml"; boundary='+C,w&&(l["Content-Type"]=l["Content-Type"]+"; "+w);let _=[{"Content-Type":'application/xop+xml; charset=UTF-8; type="text/xml"',"Content-ID":"<"+E+">",body:t}];y.forEach(A=>{_.push({"Content-Type":A.mimetype,"Content-Transfer-Encoding":"binary","Content-ID":"<"+A.contentId+">","Content-Disposition":'attachment; filename="'+A.name+'"',body:A.body})}),v.data=[Buffer.from(`--${C}\r
|
|
55
|
-
`)];let b=0;_.forEach(A=>{Object.keys(A).forEach(T=>{T!=="body"&&v.data.push(Buffer.from(`${T}: ${A[T]}\r
|
|
56
|
-
`))}),v.data.push(Buffer.from(`\r
|
|
57
|
-
`),Buffer.from(A.body),Buffer.from(`\r
|
|
58
|
-
--${C}${b===_.length-1?"--":""}\r
|
|
59
|
-
`)),b++}),v.data=Buffer.concat(v.data)}else v.data=t;s.forceGzip&&(v.decompress=!0,v.data=(0,$oe.gzipSync)(v.data),v.headers["Accept-Encoding"]="gzip,deflate",v.headers["Content-Encoding"]="gzip");for(let E in g)if(h.indexOf(E)!==-1)for(let w in s[E])v[E][w]=s[E][w];else v[E]=s[E];return $U("Http request: %j",v),v}handleResponse(e,t,n){if($U("Http response body: %j",n),typeof n=="string"){let s=/(?:<\?[^?]*\?>[\s]*)?<([^:]*):Envelope([\S\s]*)<\/\1:Envelope>/i,i=n.replace(/<!--[\s\S]*?-->/,"").match(s);i&&(n=i[0])}return n}request(e,t,n,s,i){let a=this.buildRequest(e,t,s,i),u;i!==void 0&&i.ntlm?u=(0,Moe.NtlmClient)({username:i.username,password:i.password,workstation:i.workstation||"",domain:i.domain||""})(a):(this.options.parseReponseAttachments&&(a.responseType="arraybuffer",a.responseEncoding="binary"),u=this._request(a));let c=this;return u.then(l=>{let h=o(m=>(l.data=this.handleResponse(u,l,m||l.data),n(null,l,l.data),l),"handleBody");if(c.options.parseReponseAttachments)if(l.headers["content-type"]&&l.headers["content-type"].toLowerCase().indexOf("multipart/related")>-1){let g,y=Koe.default.parse(l.headers["content-type"]);return y&&(g=y.parameters.get("boundary")),g?(0,Goe.parseMTOMResp)(l.data,g,(v,E)=>{if(v)return n(v);let w=E.parts.shift();return!w||!w.body?n(new Error("Cannot parse multipart response")):(l.mtomResponseAttachments=E,h(w.body.toString(c.options.encoding||"utf8")))}):n(new Error("Missing boundary from content-type"))}else return h(l.data.toString(c.options.encoding||"utf8"));else return h()},l=>n(l)),u}requestStream(e,t,n,s){let i=this.buildRequest(e,t,n,s);i.responseType="stream";let a=this._request(i).then(u=>(u.data=this.handleResponse(a,u,u.data),u));return a}};Mi.HttpClient=Woe});var m_=te(qi=>{"use strict";var zoe=qi&&qi.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(r,n,s)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),Joe=qi&&qi.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),YU=qi&&qi.__importStar||(function(){var r=o(function(e){return r=Object.getOwnPropertyNames||function(t){var n=[];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(n[n.length]=s);return n},r(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n=r(e),s=0;s<n.length;s++)n[s]!=="default"&&zoe(t,e,n[s]);return Joe(t,e),t}})(),QU=qi&&qi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(qi,"__esModule",{value:!0});qi.Client=void 0;var WU=YU(Ge("assert")),Yoe=Ge("crypto"),Qoe=QU(Wp()),Zoe=Ge("events"),eue=QU(t8()),zU=YU(Ho()),tue=cS(),rue=hc(),nue=(0,Qoe.default)("node-soap"),JU=/[^a-z$_0-9]/i,sue=class extends Zoe.EventEmitter{static{o(this,"Client")}constructor(e,t,n){super(),n=n||{},this.wsdl=e,this._initializeOptions(n),this._initializeServices(t),this.httpClient=n.httpClient||new tue.HttpClient(n)}addSoapHeader(e,t,n,s){return this.soapHeaders||(this.soapHeaders=[]),e=this._processSoapHeader(e,t,n,s),this.soapHeaders.push(e)-1}changeSoapHeader(e,t,n,s,i){this.soapHeaders||(this.soapHeaders=[]),t=this._processSoapHeader(t,n,s,i),this.soapHeaders[e]=t}getSoapHeaders(){return this.soapHeaders}clearSoapHeaders(){this.soapHeaders=null}addHttpHeader(e,t){this.httpHeaders||(this.httpHeaders={}),this.httpHeaders[e]=t}getHttpHeaders(){return this.httpHeaders}clearHttpHeaders(){this.httpHeaders=null}addBodyAttribute(e){if(this.bodyAttributes||(this.bodyAttributes=[]),typeof e=="object"){let t="";Object.getOwnPropertyNames(e).forEach(n=>{t+=" "+n+'="'+e[n]+'"'}),e=t}e.substr(0,1)!==" "&&(e=" "+e),this.bodyAttributes.push(e)}getBodyAttributes(){return this.bodyAttributes}clearBodyAttributes(){this.bodyAttributes=null}setEndpoint(e){this.endpoint=e,this._initializeServices(e)}describe(){return this.wsdl.describeServices()}setSecurity(e){this.security=e}setSOAPAction(e){this.SOAPAction=e}_initializeServices(e){let n=this.wsdl.definitions.services;for(let s in n)this[s]=this._defineService(n[s],e)}_initializeOptions(e){this.streamAllowed=e.stream,this.returnSaxStream=e.returnSaxStream,this.normalizeNames=e.normalizeNames,this.overridePromiseSuffix=e.overridePromiseSuffix||"Async",this.wsdl.options.attributesKey=e.attributesKey||"attributes",this.wsdl.options.envelopeKey=e.envelopeKey||"soap",this.wsdl.options.envelopeSoapUrl=e.envelopeSoapUrl||"http://schemas.xmlsoap.org/soap/envelope/",this.wsdl.options.preserveWhitespace=!!e.preserveWhitespace,this.wsdl.options.forceUseSchemaXmlns=!!e.forceUseSchemaXmlns;let t=e.ignoredNamespaces;t!==void 0&&typeof t=="object"&&"override"in t&&t.override===!0&&t.namespaces!==void 0&&(this.wsdl.options.ignoredNamespaces=t.namespaces),e.overrideElementKey!==void 0&&(this.wsdl.options.overrideElementKey=e.overrideElementKey),e.overrideRootElement!==void 0&&(this.wsdl.options.overrideRootElement=e.overrideRootElement),this.wsdl.options.forceSoap12Headers=!!e.forceSoap12Headers}_defineService(e,t){let n=e.ports,s={};for(let i in n)s[i]=this._definePort(n[i],t||n[i].location);return s}_definePort(e,t){let n=t,i=e.binding.methods,a={};for(let u in i){a[u]=this._defineMethod(i[u],n);let c=this.normalizeNames?u.replace(JU,"_"):u;if(this[c]=a[u],!JU.test(c)){let l=this.overridePromiseSuffix;this[c+l]=this._promisifyMethod(a[u])}}return a}_promisifyMethod(e){return(t,n,s)=>new Promise((i,a)=>{e(t,o((c,l,h,m,g,y)=>{c?a(c):i([l,h,m,g,y])},"callback"),n,s)})}_defineMethod(e,t){let n;return(s,i,a,u)=>{typeof s=="function"?(i=s,s={}):typeof a=="function"?(n=i,i=a,a=n):typeof u=="function"&&(n=i,i=u,u=a,a=n),this._invoke(e,s,t,(c,l,h,m,g,y)=>{i(c,l,h,m,g,y)},a,u)}}_processSoapHeader(e,t,n,s){switch(typeof e){case"object":return this.wsdl.objectToXML(e,t,n,s,!0);case"function":{let i=this;return(...a)=>{let u=e.apply(null,[...a]);return typeof u=="object"?i.wsdl.objectToXML(u,t,n,s,!0):u}}default:return e}}_invoke(e,t,n,s,i,a){let u=e.$name,c=e.input,l=e.output,h=e.style,m=this.wsdl.definitions,g=this.wsdl.options.envelopeKey,y=this.wsdl.options.envelopeSoapUrl,v=m.$targetNamespace,E="",w="",C=null,_,b=(0,rue.findPrefix)(m.xmlns,v),A={"Content-Type":"text/xml; charset=utf-8"},T="xmlns:"+g+'="'+y+'"',B=o((W,he,pe)=>{let ue;if(!l)return s(null,null,he,W.Header,C,pe.mtomResponseAttachments);if(!W.html&&!W.Body){if(pe.status>=400){let Y=new Error("Error http status codes");return Y.response=pe,Y.body=he,this.emit("soapError",Y,H),s(Y,W,he,W.Header)}return s(null,W,he,W.Header)}if(typeof W.Body!="object"){let Y=new Error("Cannot parse response");return Y.response=pe,Y.body=he,s(Y,W,he,void 0,C)}ue=W.Body[l.$name],ue||(ue=W.Body[l.$name.replace(/(?:Out(?:put)?|Response)$/,"")]),ue||["Response","Out","Output"].forEach(Y=>{if(Object.hasOwnProperty.call(W.Body,u+Y))return ue=W.Body[u+Y]}),s(null,ue,he,W.Header,C,pe.mtomResponseAttachments)},"finish"),M=o((W,he)=>{let pe;try{pe=this.wsdl.xmlToObject(W)}catch(ue){if(!l||!l.$lookupTypes){nue("Response element is not present. Unable to convert response xml to json.");let Y=zU.isObject(W)?W:K(W);if(Y)return s(null,he,Y,void 0,C)}return ue.response=he,ue.body=W,this.emit("soapError",ue,H),s(ue,he,W,void 0,C,he.mtomResponseAttachments)}return B(pe,W,he)},"parseSync");this.SOAPAction?_=this.SOAPAction:e.soapAction!==void 0&&e.soapAction!==null?_=e.soapAction:_=(v.lastIndexOf("/")!==v.length-1?v+"/":v)+u,this.wsdl.options.forceSoap12Headers?(A["Content-Type"]=`application/soap+xml; charset=utf-8; action="${_}"`,T="xmlns:"+g+'="http://www.w3.org/2003/05/soap-envelope"'):A.SOAPAction='"'+_+'"',i=i||{},this.security&&this.security.addHeaders&&this.security.addHeaders(A),this.security&&this.security.addOptions&&this.security.addOptions(i),h==="rpc"&&(c.parts||c.name==="element"||t===null)?(WU.ok(!h||h==="rpc","invalid message definition for document style binding"),w=this.wsdl.objectToRpcXML(u,t,b,v,c.name!=="element"),e.inputSoap==="encoded"&&(E='soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" ')):(WU.ok(!h||h==="document","invalid message definition for rpc style binding"),w=this.wsdl.objectToDocumentXML(c.$name,t,c.targetNSAlias,c.targetNamespace,c.$type||c.$lookupType));let I;this.soapHeaders&&(I=this.soapHeaders.map(W=>typeof W=="function"?W(e,n,_,t):W).join(" ")),C='<?xml version="1.0" encoding="utf-8"?><'+g+":Envelope "+T+' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" '+E+this.wsdl.xmlnsInEnvelope+">"+(I||this.security&&this.security.toXML()?"<"+g+":Header"+(this.wsdl.xmlnsInHeader?" "+this.wsdl.xmlnsInHeader:"")+">"+(I||"")+(this.security&&!this.security.postProcess?this.security.toXML():"")+"</"+g+":Header>":"")+"<"+g+":Body"+(this.bodyAttributes?this.bodyAttributes.join(" "):"")+">"+w+"</"+g+":Body></"+g+":Envelope>",this.security&&this.security.postProcess&&(C=this.security.postProcess(C,g)),i&&i.postProcess&&(C=i.postProcess(C)),this.lastMessage=w,this.lastRequest=C,this.lastEndpoint=n;let H=i.exchangeId||(0,Yoe.randomUUID)();if(this.emit("message",w,H),this.emit("request",C,H),this.httpHeaders===null)A={};else{for(let W in this.httpHeaders)A[W]=this.httpHeaders[W];for(let W in a)A[W]=a[W]}let K=o(W=>{try{return JSON.parse(W)}catch{return}},"tryJSONparse");if(this.streamAllowed&&typeof this.httpClient.requestStream=="function"){s=zU.once(s);let W=Date.now(),he=o(pe=>{this.lastResponse=null,this.lastResponseHeaders=null,this.lastElapsedTime=null,this.lastRequestHeaders=pe.config&&pe.config.headers,this.emit("response",null,null,H),this.returnSaxStream||!pe.response||!pe.response.data?s(pe,void 0,void 0,void 0,C):(pe.response.data.on("close",()=>{s(pe,void 0,void 0,void 0,C)}),pe.response.data.on("data",ue=>{pe.response.data=ue.toString()}))},"onError");this.httpClient.requestStream(n,C,A,i,this).then(pe=>{if(this.lastRequestHeaders=pe.headers,pe.data.on&&pe.data.on("error",ue=>he(ue)),pe.status!==200||!l||!l.$lookupTypes){(0,eue.default)(pe.data).then(ue=>(this.lastResponse=ue,this.lastElapsedTime=Date.now()-W,this.lastResponseHeaders=pe&&pe.headers,this.lastRequestHeaders=pe.config&&pe.config.headers||pe.headers,this.emit("response",ue,pe,H),M(ue,pe)));return}if(this.returnSaxStream){let ue=this.wsdl.getSaxStream(pe.data);return B({saxStream:ue},"<stream>",pe.data)}else this.wsdl.xmlToObject(pe.data,(ue,Y)=>(this.lastResponse=pe,this.lastElapsedTime=Date.now()-W,this.lastResponseHeaders=pe&&pe.headers,this.lastRequestHeaders=pe.config.headers,this.emit("response","<stream>",pe.data,H),ue?(ue.response=pe,ue.body="<stream>",this.emit("soapError",ue,H),s(ue,pe,void 0,void 0,C)):B(Y,"<stream>",pe)))},he);return}let q=Date.now();return this.httpClient.request(n,C,(W,he,pe)=>{if(this.lastResponse=pe,he&&(this.lastResponseHeaders=he.headers,this.lastElapsedTime=Date.now()-q,this.lastResponseAttachments=he.mtomResponseAttachments,this.lastRequestHeaders=he.config&&he.config.headers),this.emit("response",pe,he,H),W){this.lastRequestHeaders=W.config&&W.config.headers;try{W.response&&W.response.data&&this.wsdl.xmlToObject(W.response.data)}catch(ue){W.root=ue.root||ue}s(W,void 0,void 0,void 0,C)}else return M(pe,he)},A,i,this)}};qi.Client=sue});var e6=te(eo=>{"use strict";var iue=eo&&eo.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(r,n,s)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),aue=eo&&eo.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),oue=eo&&eo.__importStar||(function(){var r=o(function(e){return r=Object.getOwnPropertyNames||function(t){var n=[];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(n[n.length]=s);return n},r(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n=r(e),s=0;s<n.length;s++)n[s]!=="default"&&iue(t,e,n[s]);return aue(t,e),t}})();Object.defineProperty(eo,"__esModule",{value:!0});eo.BasicAuthSecurity=void 0;var ZU=oue(Ho()),uue=class{static{o(this,"BasicAuthSecurity")}constructor(e,t,n){this._username=e,this._password=t,this.defaults={},ZU.merge(this.defaults,n)}addHeaders(e){e.Authorization="Basic "+Buffer.from(this._username+":"+this._password||"").toString("base64")}toXML(){return""}addOptions(e){ZU.merge(e,this.defaults)}};eo.BasicAuthSecurity=uue});var r6=te(to=>{"use strict";var cue=to&&to.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(r,n,s)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),lue=to&&to.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),fue=to&&to.__importStar||(function(){var r=o(function(e){return r=Object.getOwnPropertyNames||function(t){var n=[];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(n[n.length]=s);return n},r(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n=r(e),s=0;s<n.length;s++)n[s]!=="default"&&cue(t,e,n[s]);return lue(t,e),t}})();Object.defineProperty(to,"__esModule",{value:!0});to.BearerSecurity=void 0;var t6=fue(Ho()),hue=class{static{o(this,"BearerSecurity")}constructor(e,t){this._token=e,this.defaults={},t6.merge(this.defaults,t)}addHeaders(e){e.Authorization="Bearer "+this._token}toXML(){return""}addOptions(e){t6.merge(e,this.defaults)}};to.BearerSecurity=hue});var i6=te(ro=>{"use strict";var pue=ro&&ro.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(r,n,s)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),due=ro&&ro.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),v_=ro&&ro.__importStar||(function(){var r=o(function(e){return r=Object.getOwnPropertyNames||function(t){var n=[];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(n[n.length]=s);return n},r(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n=r(e),s=0;s<n.length;s++)n[s]!=="default"&&pue(t,e,n[s]);return due(t,e),t}})();Object.defineProperty(ro,"__esModule",{value:!0});ro.ClientSSLSecurity=void 0;var g_=v_(Ge("fs")),n6=v_(Ge("https")),s6=v_(Ho()),mue=class{static{o(this,"ClientSSLSecurity")}constructor(e,t,n,s){if(e)if(Buffer.isBuffer(e))this.key=e;else if(typeof e=="string")this.key=g_.readFileSync(e);else throw new Error("key should be a buffer or a string!");if(t)if(Buffer.isBuffer(t))this.cert=t;else if(typeof t=="string")this.cert=g_.readFileSync(t);else throw new Error("cert should be a buffer or a string!");n&&(Buffer.isBuffer(n)||Array.isArray(n)?this.ca=n:typeof n=="string"?this.ca=g_.readFileSync(n):(s=n,this.ca=null)),this.defaults={},s6.merge(this.defaults,s),this.agent=null}toXML(){return""}addOptions(e){let t=null;e.key=this.key,e.cert=this.cert,e.ca=this.ca,s6.merge(e,this.defaults),e.forever?(this.agent||(e.keepAlive=!0,this.agent=new n6.Agent(e)),t=this.agent):t=new n6.Agent(e),e.httpsAgent=t}};ro.ClientSSLSecurity=mue});var o6=te(no=>{"use strict";var gue=no&&no.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(r,n,s)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),vue=no&&no.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),y_=no&&no.__importStar||(function(){var r=o(function(e){return r=Object.getOwnPropertyNames||function(t){var n=[];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(n[n.length]=s);return n},r(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n=r(e),s=0;s<n.length;s++)n[s]!=="default"&&gue(t,e,n[s]);return vue(t,e),t}})();Object.defineProperty(no,"__esModule",{value:!0});no.ClientSSLSecurityPFX=void 0;var yue=y_(Ge("fs")),xue=y_(Ge("https")),a6=y_(Ho()),wue=class{static{o(this,"ClientSSLSecurityPFX")}constructor(e,t,n){if(typeof t=="object"&&(n=t),e)if(Buffer.isBuffer(e))this.pfx=e;else if(typeof e=="string")this.pfx=yue.readFileSync(e);else throw new Error("supplied pfx file should be a buffer or a file location");t&&typeof t=="string"&&(this.passphrase=t),this.defaults={},a6.merge(this.defaults,n)}toXML(){return""}addOptions(e){e.pfx=this.pfx,this.passphrase&&(e.passphrase=this.passphrase),a6.merge(e,this.defaults),e.httpsAgent=new xue.Agent(e)}};no.ClientSSLSecurityPFX=wue});var u6=te(so=>{"use strict";var Eue=so&&so.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(r,n,s)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),Sue=so&&so.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),bue=so&&so.__importStar||(function(){var r=o(function(e){return r=Object.getOwnPropertyNames||function(t){var n=[];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(n[n.length]=s);return n},r(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n=r(e),s=0;s<n.length;s++)n[s]!=="default"&&Eue(t,e,n[s]);return Sue(t,e),t}})();Object.defineProperty(so,"__esModule",{value:!0});so.NTLMSecurity=void 0;var Aue=bue(Ho()),Cue=class{static{o(this,"NTLMSecurity")}constructor(e,t,n,s){typeof e=="object"?(this.defaults=e,this.defaults.ntlm=!0):this.defaults={ntlm:!0,username:e,password:t,domain:n,workstation:s}}addHeaders(e){e.Connection="keep-alive"}toXML(){return""}addOptions(e){Aue.merge(e,this.defaults)}};so.NTLMSecurity=Cue});var c6=te(io=>{"use strict";var Nue=io&&io.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(r,n,s)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),Tue=io&&io.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),Iue=io&&io.__importStar||(function(){var r=o(function(e){return r=Object.getOwnPropertyNames||function(t){var n=[];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(n[n.length]=s);return n},r(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n=r(e),s=0;s<n.length;s++)n[s]!=="default"&&Nue(t,e,n[s]);return Tue(t,e),t}})();Object.defineProperty(io,"__esModule",{value:!0});io.WSSecurity=void 0;var _ue=Iue(Ge("crypto")),x_=hc(),Due=["PasswordDigest","PasswordText"],Bue=class{static{o(this,"WSSecurity")}constructor(e,t,n){n=n||{},this._username=e,this._password=t,this._envelopeKey="soap",this._appendElement="",typeof n=="string"?(this._passwordType=n||"PasswordText",n={}):this._passwordType=n.passwordType?n.passwordType:"PasswordText",Due.indexOf(this._passwordType)===-1&&(this._passwordType="PasswordText"),this._hasTimeStamp=n.hasTimeStamp||typeof n.hasTimeStamp=="boolean"?!!n.hasTimeStamp:!0,n.hasNonce!=null&&(this._hasNonce=!!n.hasNonce),this._hasTokenCreated=n.hasTokenCreated||typeof n.hasTokenCreated=="boolean"?!!n.hasTokenCreated:!0,n.actor!=null&&(this._actor=n.actor),n.mustUnderstand!=null&&(this._mustUnderstand=!!n.mustUnderstand),n.envelopeKey&&(this._envelopeKey=n.envelopeKey),n.appendElement&&(this._appendElement=n.appendElement)}toXML(){function e(u){function c(l){return l<10?"0"+l:l}return o(c,"pad"),u.getUTCFullYear()+"-"+c(u.getUTCMonth()+1)+"-"+c(u.getUTCDate())+"T"+c(u.getUTCHours())+":"+c(u.getUTCMinutes())+":"+c(u.getUTCSeconds())+"Z"}o(e,"getDate");let t=new Date,n=e(t),s="";if(this._hasTimeStamp){let u=e(new Date(t.getTime()+6e5));s='<wsu:Timestamp wsu:Id="Timestamp-'+n+'"><wsu:Created>'+n+"</wsu:Created><wsu:Expires>"+u+"</wsu:Expires></wsu:Timestamp>"}let i,a;if(this._hasNonce||this._passwordType!=="PasswordText"){let u=_ue.createHash("sha1");u.update(n+Math.random()),a=u.digest("base64")}return this._passwordType==="PasswordText"?(i='<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">'+(0,x_.xmlEscape)(this._password)+"</wsse:Password>",a&&(i+='<wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">'+a+"</wsse:Nonce>")):i='<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">'+(0,x_.passwordDigest)(a,n,this._password)+'</wsse:Password><wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">'+a+"</wsse:Nonce>","<wsse:Security "+(this._actor?`${this._envelopeKey}:actor="${this._actor}" `:"")+(this._mustUnderstand?`${this._envelopeKey}:mustUnderstand="1" `:"")+'xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">'+s+'<wsse:UsernameToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="SecurityToken-'+n+'"><wsse:Username>'+(0,x_.xmlEscape)(this._username)+"</wsse:Username>"+i+(this._hasTokenCreated?"<wsu:Created>"+n+"</wsu:Created>":"")+"</wsse:UsernameToken>"+this._appendElement+"</wsse:Security>"}};io.WSSecurity=Bue});var lS=te(w_=>{"use strict";var Rue=typeof w_>"u"?{}:w_;(function(r){"use strict";function e(d){var R=Array.prototype.slice,X=d.length,ae=o(function(z,ut){return function(){return ut.apply(this,z.concat(R.call(arguments)))}},"partial"),le=o(function(){var z=R.call(arguments);return z.length<X?ae(z,le):d.apply(this,R.apply(arguments,[0,X]))},"fn1");return le}o(e,"curry");var t=o(function(d,R){for(var X=0;X<R.length;X+=1)d(R[X],X,R)},"forEach"),n=o(function(d,R,X){var ae=R;return t(function(le,z){ae=d(ae,le,z)},X),ae},"reduce"),s=o(function(d,R){var X=new Array(R.length);return t(function(ae,le){X[le]=d(ae)},R),X},"map"),i=o(function(d,R){var X=[];return t(function(ae,le){d(ae,le)&&X.push(ae)},R),X},"filter"),a=o(function(d,R){for(var X=0;X<d.length;X+=1)if(d[X]===R)return!0;return!1},"includes");function u(d){return function(){return d}}o(u,"always");function c(d){return d.toString()}o(c,"toString");var l=o(function(d,R){return R.join(d)},"join"),h=o(function(d,R,X){return d+X+R},"wrap"),m=Array.prototype.concat,g=32767;function y(d){for(var R=[],X=0;X<d.length;X+=g){var ae=d.slice(X,X+g);R=m.apply(R,ae)}return R}o(y,"flatten");function v(d,R){for(var X=Object(d),ae=1;ae<arguments.length;ae++){var le=arguments[ae];if(le!=null)for(var z in le)Object.prototype.hasOwnProperty.call(le,z)&&(X[z]=le[z])}return X}o(v,"assign");var E={ELEMENT_NODE:1,ATTRIBUTE_NODE:2,TEXT_NODE:3,CDATA_SECTION_NODE:4,PROCESSING_INSTRUCTION_NODE:7,COMMENT_NODE:8,DOCUMENT_NODE:9,DOCUMENT_TYPE_NODE:10,DOCUMENT_FRAGMENT_NODE:11};w.prototype=new Object,w.prototype.constructor=w,w.superclass=Object.prototype;function w(){this.init()}o(w,"XPathParser"),w.prototype.init=function(){this.reduceActions=[],this.reduceActions[3]=function(d){return new M(d[0],d[2])},this.reduceActions[5]=function(d){return new I(d[0],d[2])},this.reduceActions[7]=function(d){return new H(d[0],d[2])},this.reduceActions[8]=function(d){return new K(d[0],d[2])},this.reduceActions[10]=function(d){return new q(d[0],d[2])},this.reduceActions[11]=function(d){return new W(d[0],d[2])},this.reduceActions[12]=function(d){return new he(d[0],d[2])},this.reduceActions[13]=function(d){return new pe(d[0],d[2])},this.reduceActions[15]=function(d){return new ue(d[0],d[2])},this.reduceActions[16]=function(d){return new Y(d[0],d[2])},this.reduceActions[18]=function(d){return new ve(d[0],d[2])},this.reduceActions[19]=function(d){return new Oe(d[0],d[2])},this.reduceActions[20]=function(d){return new Je(d[0],d[2])},this.reduceActions[22]=function(d){return new T(d[1])},this.reduceActions[24]=function(d){return new ne(d[0],d[2])},this.reduceActions[25]=function(d){return new Z(void 0,void 0,d[0])},this.reduceActions[27]=function(d){return d[0].locationPath=d[2],d[0]},this.reduceActions[28]=function(d){return d[0].locationPath=d[2],d[0].locationPath.steps.unshift(new N(N.DESCENDANTORSELF,S.nodeTest,[])),d[0]},this.reduceActions[29]=function(d){return new Z(d[0],[],void 0)},this.reduceActions[30]=function(d){return st.instance_of(d[0],Z)?(d[0].filterPredicates==null&&(d[0].filterPredicates=[]),d[0].filterPredicates.push(d[1]),d[0]):new Z(d[0],[d[1]],void 0)},this.reduceActions[32]=function(d){return d[1]},this.reduceActions[33]=function(d){return new Ce(d[0])},this.reduceActions[34]=function(d){return new Ae(d[0])},this.reduceActions[36]=function(d){return new P(d[0],[])},this.reduceActions[37]=function(d){return new P(d[0],d[2])},this.reduceActions[38]=function(d){return[d[0]]},this.reduceActions[39]=function(d){return d[2].unshift(d[0]),d[2]},this.reduceActions[43]=function(d){return new rt(!0,[])},this.reduceActions[44]=function(d){return d[1].absolute=!0,d[1]},this.reduceActions[46]=function(d){return new rt(!1,[d[0]])},this.reduceActions[47]=function(d){return d[0].steps.push(d[2]),d[0]},this.reduceActions[49]=function(d){return new N(d[0],d[1],[])},this.reduceActions[50]=function(d){return new N(N.CHILD,d[0],[])},this.reduceActions[51]=function(d){return new N(d[0],d[1],d[2])},this.reduceActions[52]=function(d){return new N(N.CHILD,d[0],d[1])},this.reduceActions[54]=function(d){return[d[0]]},this.reduceActions[55]=function(d){return d[1].unshift(d[0]),d[1]},this.reduceActions[56]=function(d){return d[0]=="ancestor"?N.ANCESTOR:d[0]=="ancestor-or-self"?N.ANCESTORORSELF:d[0]=="attribute"?N.ATTRIBUTE:d[0]=="child"?N.CHILD:d[0]=="descendant"?N.DESCENDANT:d[0]=="descendant-or-self"?N.DESCENDANTORSELF:d[0]=="following"?N.FOLLOWING:d[0]=="following-sibling"?N.FOLLOWINGSIBLING:d[0]=="namespace"?N.NAMESPACE:d[0]=="parent"?N.PARENT:d[0]=="preceding"?N.PRECEDING:d[0]=="preceding-sibling"?N.PRECEDINGSIBLING:d[0]=="self"?N.SELF:-1},this.reduceActions[57]=function(d){return N.ATTRIBUTE},this.reduceActions[59]=function(d){return d[0]=="comment"?S.commentTest:d[0]=="text"?S.textTest:d[0]=="processing-instruction"?S.anyPiTest:d[0]=="node"?S.nodeTest:new S(-1,void 0)},this.reduceActions[60]=function(d){return new S.PITest(d[2])},this.reduceActions[61]=function(d){return d[1]},this.reduceActions[63]=function(d){return d[1].absolute=!0,d[1].steps.unshift(new N(N.DESCENDANTORSELF,S.nodeTest,[])),d[1]},this.reduceActions[64]=function(d){return d[0].steps.push(new N(N.DESCENDANTORSELF,S.nodeTest,[])),d[0].steps.push(d[2]),d[0]},this.reduceActions[65]=function(d){return new N(N.SELF,S.nodeTest,[])},this.reduceActions[66]=function(d){return new N(N.PARENT,S.nodeTest,[])},this.reduceActions[67]=function(d){return new G(d[1])},this.reduceActions[68]=function(d){return S.nameTestAny},this.reduceActions[69]=function(d){return new S.NameTestPrefixAny(d[0].split(":")[0])},this.reduceActions[70]=function(d){return new S.NameTestQName(d[0])}},w.actionTable=[" s s sssssssss s ss s ss"," s ","r rrrrrrrrr rrrrrrr rr r "," rrrrr "," s s sssssssss s ss s ss","rs rrrrrrrr s sssssrrrrrr rrs rs "," s s sssssssss s ss s ss"," s "," s ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrrr rrrrrrr rr rr "," s "," s "," s s sssss s s ","r rrrrrrrrr rrrrrrr rr r ","a ","r s rr r ","r sr rr r ","r s rr s rr r ","r rssrr rss rr r ","r rrrrr rrrss rr r ","r rrrrrsss rrrrr rr r ","r rrrrrrrr rrrrr rr r ","r rrrrrrrr rrrrrs rr r ","r rrrrrrrr rrrrrr rr r ","r rrrrrrrr rrrrrr rr r ","r srrrrrrrr rrrrrrs rr sr ","r srrrrrrrr rrrrrrs rr r ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrr rrrrrr rr r ","r rrrrrrrr rrrrrr rr r ","r rrrrrrrrr rrrrrrr rr r ","r rrrrrrrrr rrrrrrr rr r "," sssss ","r rrrrrrrrr rrrrrrr rr sr ","r rrrrrrrrr rrrrrrr rr r ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrrr rrrrrrr rr rr "," s ","r srrrrrrrr rrrrrrs rr r ","r rrrrrrrr rrrrr rr r "," s "," s "," rrrrr "," s s sssssssss s sss s ss","r srrrrrrrr rrrrrrs rr r "," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss ss s ss"," s s sssssssss s ss s ss"," s s sssss s s "," s s sssss s s ","r rrrrrrrrr rrrrrrr rr rr "," s s sssss s s "," s s sssss s s ","r rrrrrrrrr rrrrrrr rr sr ","r rrrrrrrrr rrrrrrr rr sr ","r rrrrrrrrr rrrrrrr rr r ","r rrrrrrrrr rrrrrrr rr rr "," s ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrrr rrrrrrr rr rr "," rr "," s "," rs ","r sr rr r ","r s rr s rr r ","r rssrr rss rr r ","r rssrr rss rr r ","r rrrrr rrrss rr r ","r rrrrr rrrss rr r ","r rrrrr rrrss rr r ","r rrrrr rrrss rr r ","r rrrrrsss rrrrr rr r ","r rrrrrsss rrrrr rr r ","r rrrrrrrr rrrrr rr r ","r rrrrrrrr rrrrr rr r ","r rrrrrrrr rrrrr rr r ","r rrrrrrrr rrrrrr rr r "," r "," s ","r srrrrrrrr rrrrrrs rr r ","r srrrrrrrr rrrrrrs rr r ","r rrrrrrrrr rrrrrrr rr r ","r rrrrrrrrr rrrrrrr rr r ","r rrrrrrrrr rrrrrrr rr r ","r rrrrrrrrr rrrrrrr rr r ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrrr rrrrrrr rr rr "," s s sssssssss s ss s ss","r rrrrrrrrr rrrrrrr rr rr "," r "],w.actionTableNumber=[` 1 0 /.-,+*)(' & %$ # "!`," J ","a aaaaaaaaa aaaaaaa aa a "," YYYYY ",` 1 0 /.-,+*)(' & %$ # "!`,`K1 KKKKKKKK . +*)('KKKKKK KK# K" `,` 1 0 /.-,+*)(' & %$ # "!`," N "," O ","e eeeeeeeee eeeeeee ee ee ","f fffffffff fffffff ff ff ","d ddddddddd ddddddd dd dd ","B BBBBBBBBB BBBBBBB BB BB ","A AAAAAAAAA AAAAAAA AA AA "," P "," Q ",` 1 . +*)(' # " `,"b bbbbbbbbb bbbbbbb bb b "," ","! S !! ! ",'" T" "" " ',"$ V $$ U $$ $ ","& &ZY&& &XW && & ",") ))))) )))\\[ )) ) ",". ....._^] ..... .. . ","1 11111111 11111 11 1 ","5 55555555 55555` 55 5 ","7 77777777 777777 77 7 ","9 99999999 999999 99 9 ",": c:::::::: ::::::b :: a: ","I fIIIIIIII IIIIIIe II I ","= ========= ======= == == ","? ????????? ??????? ?? ?? ","C CCCCCCCCC CCCCCCC CC CC ","J JJJJJJJJ JJJJJJ JJ J ","M MMMMMMMM MMMMMM MM M ","N NNNNNNNNN NNNNNNN NN N ","P PPPPPPPPP PPPPPPP PP P "," +*)(' ","R RRRRRRRRR RRRRRRR RR aR ","U UUUUUUUUU UUUUUUU UU U ","Z ZZZZZZZZZ ZZZZZZZ ZZ ZZ ","c ccccccccc ccccccc cc cc "," j ","L fLLLLLLLL LLLLLLe LL L ","6 66666666 66666 66 6 "," k "," l "," XXXXX ",` 1 0 /.-,+*)(' & %$m # "!`,"_ f________ ______e __ _ ",` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 . +*)(' # " `,` 1 . +*)(' # " `,"> >>>>>>>>> >>>>>>> >> >> ",` 1 . +*)(' # " `,` 1 . +*)(' # " `,"Q QQQQQQQQQ QQQQQQQ QQ aQ ","V VVVVVVVVV VVVVVVV VV aV ","T TTTTTTTTT TTTTTTT TT T ","@ @@@@@@@@@ @@@@@@@ @@ @@ "," \x87 ","[ [[[[[[[[[ [[[[[[[ [[ [[ ","D DDDDDDDDD DDDDDDD DD DD "," HH "," \x88 "," F\x89 ","# T# ## # ","% V %% U %% % ","' 'ZY'' 'XW '' ' ","( (ZY(( (XW (( ( ","+ +++++ +++\\[ ++ + ","* ***** ***\\[ ** * ","- ----- ---\\[ -- - ",", ,,,,, ,,,\\[ ,, , ","0 00000_^] 00000 00 0 ","/ /////_^] ///// // / ","2 22222222 22222 22 2 ","3 33333333 33333 33 3 ","4 44444444 44444 44 4 ","8 88888888 888888 88 8 "," ^ "," \x8A ","; f;;;;;;;; ;;;;;;e ;; ; ","< f<<<<<<<< <<<<<<e << < ","O OOOOOOOOO OOOOOOO OO O ","` ````````` ``````` `` ` ","S SSSSSSSSS SSSSSSS SS S ","W WWWWWWWWW WWWWWWW WW W ","\\ \\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\ \\\\ \\\\ ","E EEEEEEEEE EEEEEEE EE EE ",` 1 0 /.-,+*)(' & %$ # "!`,"] ]]]]]]]]] ]]]]]]] ]] ]] "," G "],w.gotoTable=["3456789:;<=>?@ AB CDEFGH IJ "," "," "," ","L456789:;<=>?@ AB CDEFGH IJ "," M EFGH IJ "," N;<=>?@ AB CDEFGH IJ "," "," "," "," "," "," "," "," "," "," S EFGH IJ "," "," "," "," "," "," "," "," "," "," "," "," "," e "," "," "," "," "," "," "," "," "," h J "," i j "," "," "," "," "," "," "," "," "," ","o456789:;<=>?@ ABpqCDEFGH IJ "," "," r6789:;<=>?@ AB CDEFGH IJ "," s789:;<=>?@ AB CDEFGH IJ "," t89:;<=>?@ AB CDEFGH IJ "," u89:;<=>?@ AB CDEFGH IJ "," v9:;<=>?@ AB CDEFGH IJ "," w9:;<=>?@ AB CDEFGH IJ "," x9:;<=>?@ AB CDEFGH IJ "," y9:;<=>?@ AB CDEFGH IJ "," z:;<=>?@ AB CDEFGH IJ "," {:;<=>?@ AB CDEFGH IJ "," |;<=>?@ AB CDEFGH IJ "," };<=>?@ AB CDEFGH IJ "," ~;<=>?@ AB CDEFGH IJ "," \x7F=>?@ AB CDEFGH IJ ","\x80456789:;<=>?@ AB CDEFGH IJ\x81"," \x82 EFGH IJ "," \x83 EFGH IJ "," "," \x84 GH IJ "," \x85 GH IJ "," i \x86 "," i \x87 "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," ","o456789:;<=>?@ AB\x8CqCDEFGH IJ "," "," "],w.productions=[[1,1,2],[2,1,3],[3,1,4],[3,3,3,-9,4],[4,1,5],[4,3,4,-8,5],[5,1,6],[5,3,5,-22,6],[5,3,5,-5,6],[6,1,7],[6,3,6,-23,7],[6,3,6,-24,7],[6,3,6,-6,7],[6,3,6,-7,7],[7,1,8],[7,3,7,-25,8],[7,3,7,-26,8],[8,1,9],[8,3,8,-12,9],[8,3,8,-11,9],[8,3,8,-10,9],[9,1,10],[9,2,-26,9],[10,1,11],[10,3,10,-27,11],[11,1,12],[11,1,13],[11,3,13,-28,14],[11,3,13,-4,14],[13,1,15],[13,2,13,16],[15,1,17],[15,3,-29,2,-30],[15,1,-15],[15,1,-16],[15,1,18],[18,3,-13,-29,-30],[18,4,-13,-29,19,-30],[19,1,20],[19,3,20,-31,19],[20,1,2],[12,1,14],[12,1,21],[21,1,-28],[21,2,-28,14],[21,1,22],[14,1,23],[14,3,14,-28,23],[14,1,24],[23,2,25,26],[23,1,26],[23,3,25,26,27],[23,2,26,27],[23,1,28],[27,1,16],[27,2,16,27],[25,2,-14,-3],[25,1,-32],[26,1,29],[26,3,-20,-29,-30],[26,4,-21,-29,-15,-30],[16,3,-33,30,-34],[30,1,2],[22,2,-4,14],[24,3,14,-4,23],[28,1,-35],[28,1,-2],[17,2,-36,-18],[29,1,-17],[29,1,-19],[29,1,-18]],w.DOUBLEDOT=2,w.DOUBLECOLON=3,w.DOUBLESLASH=4,w.NOTEQUAL=5,w.LESSTHANOREQUAL=6,w.GREATERTHANOREQUAL=7,w.AND=8,w.OR=9,w.MOD=10,w.DIV=11,w.MULTIPLYOPERATOR=12,w.FUNCTIONNAME=13,w.AXISNAME=14,w.LITERAL=15,w.NUMBER=16,w.ASTERISKNAMETEST=17,w.QNAME=18,w.NCNAMECOLONASTERISK=19,w.NODETYPE=20,w.PROCESSINGINSTRUCTIONWITHLITERAL=21,w.EQUALS=22,w.LESSTHAN=23,w.GREATERTHAN=24,w.PLUS=25,w.MINUS=26,w.BAR=27,w.SLASH=28,w.LEFTPARENTHESIS=29,w.RIGHTPARENTHESIS=30,w.COMMA=31,w.AT=32,w.LEFTBRACKET=33,w.RIGHTBRACKET=34,w.DOT=35,w.DOLLAR=36,w.prototype.tokenize=function(d){for(var R=[],X=[],ae=d+"\0",le=0,z=ae.charAt(le++);;){for(;z==" "||z==" "||z=="\r"||z==`
|
|
60
|
-
`;)z=ae.charAt(le++);if(z=="\0"||le>=ae.length)break;if(z=="("){R.push(w.LEFTPARENTHESIS),X.push(z),z=ae.charAt(le++);continue}if(z==")"){R.push(w.RIGHTPARENTHESIS),X.push(z),z=ae.charAt(le++);continue}if(z=="["){R.push(w.LEFTBRACKET),X.push(z),z=ae.charAt(le++);continue}if(z=="]"){R.push(w.RIGHTBRACKET),X.push(z),z=ae.charAt(le++);continue}if(z=="@"){R.push(w.AT),X.push(z),z=ae.charAt(le++);continue}if(z==","){R.push(w.COMMA),X.push(z),z=ae.charAt(le++);continue}if(z=="|"){R.push(w.BAR),X.push(z),z=ae.charAt(le++);continue}if(z=="+"){R.push(w.PLUS),X.push(z),z=ae.charAt(le++);continue}if(z=="-"){R.push(w.MINUS),X.push(z),z=ae.charAt(le++);continue}if(z=="="){R.push(w.EQUALS),X.push(z),z=ae.charAt(le++);continue}if(z=="$"){R.push(w.DOLLAR),X.push(z),z=ae.charAt(le++);continue}if(z=="."){if(z=ae.charAt(le++),z=="."){R.push(w.DOUBLEDOT),X.push(".."),z=ae.charAt(le++);continue}if(z>="0"&&z<="9"){var ut="."+z;for(z=ae.charAt(le++);z>="0"&&z<="9";)ut+=z,z=ae.charAt(le++);R.push(w.NUMBER),X.push(ut);continue}R.push(w.DOT),X.push(".");continue}if(z=="'"||z=='"'){for(var jt=z,Qt="";le<ae.length&&(z=ae.charAt(le))!==jt;)Qt+=z,le+=1;if(z!==jt)throw Gn.fromMessage("Unterminated string literal: "+jt+Qt);le+=1,R.push(w.LITERAL),X.push(Qt),z=ae.charAt(le++);continue}if(z>="0"&&z<="9"){var ut=z;for(z=ae.charAt(le++);z>="0"&&z<="9";)ut+=z,z=ae.charAt(le++);if(z=="."&&ae.charAt(le)>="0"&&ae.charAt(le)<="9")for(ut+=z,ut+=ae.charAt(le++),z=ae.charAt(le++);z>="0"&&z<="9";)ut+=z,z=ae.charAt(le++);R.push(w.NUMBER),X.push(ut);continue}if(z=="*"){if(R.length>0){var it=R[R.length-1];if(it!=w.AT&&it!=w.DOUBLECOLON&&it!=w.LEFTPARENTHESIS&&it!=w.LEFTBRACKET&&it!=w.AND&&it!=w.OR&&it!=w.MOD&&it!=w.DIV&&it!=w.MULTIPLYOPERATOR&&it!=w.SLASH&&it!=w.DOUBLESLASH&&it!=w.BAR&&it!=w.PLUS&&it!=w.MINUS&&it!=w.EQUALS&&it!=w.NOTEQUAL&&it!=w.LESSTHAN&&it!=w.LESSTHANOREQUAL&&it!=w.GREATERTHAN&&it!=w.GREATERTHANOREQUAL){R.push(w.MULTIPLYOPERATOR),X.push(z),z=ae.charAt(le++);continue}}R.push(w.ASTERISKNAMETEST),X.push(z),z=ae.charAt(le++);continue}if(z==":"&&ae.charAt(le)==":"){R.push(w.DOUBLECOLON),X.push("::"),le++,z=ae.charAt(le++);continue}if(z=="/"){if(z=ae.charAt(le++),z=="/"){R.push(w.DOUBLESLASH),X.push("//"),z=ae.charAt(le++);continue}R.push(w.SLASH),X.push("/");continue}if(z=="!"&&ae.charAt(le)=="="){R.push(w.NOTEQUAL),X.push("!="),le++,z=ae.charAt(le++);continue}if(z=="<"){if(ae.charAt(le)=="="){R.push(w.LESSTHANOREQUAL),X.push("<="),le++,z=ae.charAt(le++);continue}R.push(w.LESSTHAN),X.push("<"),z=ae.charAt(le++);continue}if(z==">"){if(ae.charAt(le)=="="){R.push(w.GREATERTHANOREQUAL),X.push(">="),le++,z=ae.charAt(le++);continue}R.push(w.GREATERTHAN),X.push(">"),z=ae.charAt(le++);continue}if(z=="_"||st.isLetter(z.charCodeAt(0))){var Pt=z;for(z=ae.charAt(le++);st.isNCNameChar(z.charCodeAt(0));)Pt+=z,z=ae.charAt(le++);if(R.length>0){var it=R[R.length-1];if(it!=w.AT&&it!=w.DOUBLECOLON&&it!=w.LEFTPARENTHESIS&&it!=w.LEFTBRACKET&&it!=w.AND&&it!=w.OR&&it!=w.MOD&&it!=w.DIV&&it!=w.MULTIPLYOPERATOR&&it!=w.SLASH&&it!=w.DOUBLESLASH&&it!=w.BAR&&it!=w.PLUS&&it!=w.MINUS&&it!=w.EQUALS&&it!=w.NOTEQUAL&&it!=w.LESSTHAN&&it!=w.LESSTHANOREQUAL&&it!=w.GREATERTHAN&&it!=w.GREATERTHANOREQUAL){if(Pt=="and"){R.push(w.AND),X.push(Pt);continue}if(Pt=="or"){R.push(w.OR),X.push(Pt);continue}if(Pt=="mod"){R.push(w.MOD),X.push(Pt);continue}if(Pt=="div"){R.push(w.DIV),X.push(Pt);continue}}}if(z==":"){if(ae.charAt(le)=="*"){R.push(w.NCNAMECOLONASTERISK),X.push(Pt+":*"),le++,z=ae.charAt(le++);continue}if(ae.charAt(le)=="_"||st.isLetter(ae.charCodeAt(le))){for(Pt+=":",z=ae.charAt(le++);st.isNCNameChar(z.charCodeAt(0));)Pt+=z,z=ae.charAt(le++);if(z=="("){R.push(w.FUNCTIONNAME),X.push(Pt);continue}R.push(w.QNAME),X.push(Pt);continue}if(ae.charAt(le)==":"){R.push(w.AXISNAME),X.push(Pt);continue}}if(z=="("){if(Pt=="comment"||Pt=="text"||Pt=="node"){R.push(w.NODETYPE),X.push(Pt);continue}if(Pt=="processing-instruction"){ae.charAt(le)==")"?R.push(w.NODETYPE):R.push(w.PROCESSINGINSTRUCTIONWITHLITERAL),X.push(Pt);continue}R.push(w.FUNCTIONNAME),X.push(Pt);continue}R.push(w.QNAME),X.push(Pt);continue}throw new Error("Unexpected character "+z)}return R.push(1),X.push("[EOF]"),[R,X]},w.SHIFT="s",w.REDUCE="r",w.ACCEPT="a",w.prototype.parse=function(Qt){var R,X,ae=this.tokenize(Qt);if(ae!=null){R=ae[0],X=ae[1];var le=0,z=[],ut=[],jt=[],Qt,it,Pt;for(z.push(0),ut.push(1),jt.push("_S"),it=R[le],Pt=X[le++];;)switch(Qt=z[z.length-1],w.actionTable[Qt].charAt(it-1)){case w.SHIFT:ut.push(-it),jt.push(Pt),z.push(w.actionTableNumber[Qt].charCodeAt(it-1)-32),it=R[le],Pt=X[le++];break;case w.REDUCE:for(var Xn=w.productions[w.actionTableNumber[Qt].charCodeAt(it-1)-32][1],Si=[],hr=0;hr<Xn;hr++)ut.pop(),Si.unshift(jt.pop()),z.pop();var ka=z[z.length-1];ut.push(w.productions[w.actionTableNumber[Qt].charCodeAt(it-1)-32][0]),this.reduceActions[w.actionTableNumber[Qt].charCodeAt(it-1)-32]==null?jt.push(Si[0]):jt.push(this.reduceActions[w.actionTableNumber[Qt].charCodeAt(it-1)-32](Si)),z.push(w.gotoTable[ka].charCodeAt(w.productions[w.actionTableNumber[Qt].charCodeAt(it-1)-32][0]-2)-33);break;case w.ACCEPT:return new C(jt.pop());default:throw new Error("XPath parse error")}}},C.prototype=new Object,C.prototype.constructor=C,C.superclass=Object.prototype;function C(d){this.expression=d}o(C,"XPath"),C.prototype.toString=function(){return this.expression.toString()};function _(d,R,X){R in d||(d[R]=X)}o(_,"setIfUnset"),C.prototype.evaluate=function(d){return d.contextNode=d.expressionContextNode,d.contextSize=1,d.contextPosition=1,d.isHtml&&(_(d,"caseInsensitive",!0),_(d,"allowAnyNamespaceForNoPrefix",!0)),_(d,"caseInsensitive",!1),this.expression.evaluate(d)},C.XML_NAMESPACE_URI="http://www.w3.org/XML/1998/namespace",C.XMLNS_NAMESPACE_URI="http://www.w3.org/2000/xmlns/",b.prototype=new Object,b.prototype.constructor=b,b.superclass=Object.prototype;function b(){}o(b,"Expression"),b.prototype.init=function(){},b.prototype.toString=function(){return"<Expression>"},b.prototype.evaluate=function(d){throw new Error("Could not evaluate expression.")},A.prototype=new b,A.prototype.constructor=A,A.superclass=b.prototype;function A(d){arguments.length>0&&this.init(d)}o(A,"UnaryOperation"),A.prototype.init=function(d){this.rhs=d},T.prototype=new A,T.prototype.constructor=T,T.superclass=A.prototype;function T(d){arguments.length>0&&this.init(d)}o(T,"UnaryMinusOperation"),T.prototype.init=function(d){T.superclass.init.call(this,d)},T.prototype.evaluate=function(d){return this.rhs.evaluate(d).number().negate()},T.prototype.toString=function(){return"-"+this.rhs.toString()},B.prototype=new b,B.prototype.constructor=B,B.superclass=b.prototype;function B(d,R){arguments.length>0&&this.init(d,R)}o(B,"BinaryOperation"),B.prototype.init=function(d,R){this.lhs=d,this.rhs=R},M.prototype=new B,M.prototype.constructor=M,M.superclass=B.prototype;function M(d,R){arguments.length>0&&this.init(d,R)}o(M,"OrOperation"),M.prototype.init=function(d,R){M.superclass.init.call(this,d,R)},M.prototype.toString=function(){return"("+this.lhs.toString()+" or "+this.rhs.toString()+")"},M.prototype.evaluate=function(d){var R=this.lhs.evaluate(d).bool();return R.booleanValue()?R:this.rhs.evaluate(d).bool()},I.prototype=new B,I.prototype.constructor=I,I.superclass=B.prototype;function I(d,R){arguments.length>0&&this.init(d,R)}o(I,"AndOperation"),I.prototype.init=function(d,R){I.superclass.init.call(this,d,R)},I.prototype.toString=function(){return"("+this.lhs.toString()+" and "+this.rhs.toString()+")"},I.prototype.evaluate=function(d){var R=this.lhs.evaluate(d).bool();return R.booleanValue()?this.rhs.evaluate(d).bool():R},H.prototype=new B,H.prototype.constructor=H,H.superclass=B.prototype;function H(d,R){arguments.length>0&&this.init(d,R)}o(H,"EqualsOperation"),H.prototype.init=function(d,R){H.superclass.init.call(this,d,R)},H.prototype.toString=function(){return"("+this.lhs.toString()+" = "+this.rhs.toString()+")"},H.prototype.evaluate=function(d){return this.lhs.evaluate(d).equals(this.rhs.evaluate(d))},K.prototype=new B,K.prototype.constructor=K,K.superclass=B.prototype;function K(d,R){arguments.length>0&&this.init(d,R)}o(K,"NotEqualOperation"),K.prototype.init=function(d,R){K.superclass.init.call(this,d,R)},K.prototype.toString=function(){return"("+this.lhs.toString()+" != "+this.rhs.toString()+")"},K.prototype.evaluate=function(d){return this.lhs.evaluate(d).notequal(this.rhs.evaluate(d))},q.prototype=new B,q.prototype.constructor=q,q.superclass=B.prototype;function q(d,R){arguments.length>0&&this.init(d,R)}o(q,"LessThanOperation"),q.prototype.init=function(d,R){q.superclass.init.call(this,d,R)},q.prototype.evaluate=function(d){return this.lhs.evaluate(d).lessthan(this.rhs.evaluate(d))},q.prototype.toString=function(){return"("+this.lhs.toString()+" < "+this.rhs.toString()+")"},W.prototype=new B,W.prototype.constructor=W,W.superclass=B.prototype;function W(d,R){arguments.length>0&&this.init(d,R)}o(W,"GreaterThanOperation"),W.prototype.init=function(d,R){W.superclass.init.call(this,d,R)},W.prototype.evaluate=function(d){return this.lhs.evaluate(d).greaterthan(this.rhs.evaluate(d))},W.prototype.toString=function(){return"("+this.lhs.toString()+" > "+this.rhs.toString()+")"},he.prototype=new B,he.prototype.constructor=he,he.superclass=B.prototype;function he(d,R){arguments.length>0&&this.init(d,R)}o(he,"LessThanOrEqualOperation"),he.prototype.init=function(d,R){he.superclass.init.call(this,d,R)},he.prototype.evaluate=function(d){return this.lhs.evaluate(d).lessthanorequal(this.rhs.evaluate(d))},he.prototype.toString=function(){return"("+this.lhs.toString()+" <= "+this.rhs.toString()+")"},pe.prototype=new B,pe.prototype.constructor=pe,pe.superclass=B.prototype;function pe(d,R){arguments.length>0&&this.init(d,R)}o(pe,"GreaterThanOrEqualOperation"),pe.prototype.init=function(d,R){pe.superclass.init.call(this,d,R)},pe.prototype.evaluate=function(d){return this.lhs.evaluate(d).greaterthanorequal(this.rhs.evaluate(d))},pe.prototype.toString=function(){return"("+this.lhs.toString()+" >= "+this.rhs.toString()+")"},ue.prototype=new B,ue.prototype.constructor=ue,ue.superclass=B.prototype;function ue(d,R){arguments.length>0&&this.init(d,R)}o(ue,"PlusOperation"),ue.prototype.init=function(d,R){ue.superclass.init.call(this,d,R)},ue.prototype.evaluate=function(d){return this.lhs.evaluate(d).number().plus(this.rhs.evaluate(d).number())},ue.prototype.toString=function(){return"("+this.lhs.toString()+" + "+this.rhs.toString()+")"},Y.prototype=new B,Y.prototype.constructor=Y,Y.superclass=B.prototype;function Y(d,R){arguments.length>0&&this.init(d,R)}o(Y,"MinusOperation"),Y.prototype.init=function(d,R){Y.superclass.init.call(this,d,R)},Y.prototype.evaluate=function(d){return this.lhs.evaluate(d).number().minus(this.rhs.evaluate(d).number())},Y.prototype.toString=function(){return"("+this.lhs.toString()+" - "+this.rhs.toString()+")"},ve.prototype=new B,ve.prototype.constructor=ve,ve.superclass=B.prototype;function ve(d,R){arguments.length>0&&this.init(d,R)}o(ve,"MultiplyOperation"),ve.prototype.init=function(d,R){ve.superclass.init.call(this,d,R)},ve.prototype.evaluate=function(d){return this.lhs.evaluate(d).number().multiply(this.rhs.evaluate(d).number())},ve.prototype.toString=function(){return"("+this.lhs.toString()+" * "+this.rhs.toString()+")"},Oe.prototype=new B,Oe.prototype.constructor=Oe,Oe.superclass=B.prototype;function Oe(d,R){arguments.length>0&&this.init(d,R)}o(Oe,"DivOperation"),Oe.prototype.init=function(d,R){Oe.superclass.init.call(this,d,R)},Oe.prototype.evaluate=function(d){return this.lhs.evaluate(d).number().div(this.rhs.evaluate(d).number())},Oe.prototype.toString=function(){return"("+this.lhs.toString()+" div "+this.rhs.toString()+")"},Je.prototype=new B,Je.prototype.constructor=Je,Je.superclass=B.prototype;function Je(d,R){arguments.length>0&&this.init(d,R)}o(Je,"ModOperation"),Je.prototype.init=function(d,R){Je.superclass.init.call(this,d,R)},Je.prototype.evaluate=function(d){return this.lhs.evaluate(d).number().mod(this.rhs.evaluate(d).number())},Je.prototype.toString=function(){return"("+this.lhs.toString()+" mod "+this.rhs.toString()+")"},ne.prototype=new B,ne.prototype.constructor=ne,ne.superclass=B.prototype;function ne(d,R){arguments.length>0&&this.init(d,R)}o(ne,"BarOperation"),ne.prototype.init=function(d,R){ne.superclass.init.call(this,d,R)},ne.prototype.evaluate=function(d){return this.lhs.evaluate(d).nodeset().union(this.rhs.evaluate(d).nodeset())},ne.prototype.toString=function(){return s(c,[this.lhs,this.rhs]).join(" | ")},Z.prototype=new b,Z.prototype.constructor=Z,Z.superclass=b.prototype;function Z(d,R,X){arguments.length>0&&this.init(d,R,X)}o(Z,"PathExpr"),Z.prototype.init=function(d,R,X){Z.superclass.init.call(this),this.filter=d,this.filterPredicates=R,this.locationPath=X};function Se(d){for(;d&&d.parentNode;)d=d.parentNode;return d}o(Se,"findRoot"),Z.applyPredicates=function(d,R,X){if(d.length===0)return X;var ae=R.extend({});return n(function(le,z){return ae.contextSize=le.length,i(function(ut,jt){return ae.contextNode=ut,ae.contextPosition=jt+1,Z.predicateMatches(z,ae)},le)},X,d)},Z.getRoot=function(d,R){var X=R[0];if(X.nodeType===E.DOCUMENT_NODE)return X;if(d.virtualRoot)return d.virtualRoot;var ae=X.ownerDocument;if(ae)return ae;for(var le=X;le.parentNode!=null;)le=le.parentNode;return le},Z.applyStep=function(d,R,X){var ae=this,le=[];switch(R.contextNode=X,d.axis){case N.ANCESTOR:if(R.contextNode===R.virtualRoot)break;var z;for(R.contextNode.nodeType==E.ATTRIBUTE_NODE?z=Z.getOwnerElement(R.contextNode):z=R.contextNode.parentNode;z!=null&&(d.nodeTest.matches(z,R)&&le.push(z),z!==R.virtualRoot);)z=z.parentNode;break;case N.ANCESTORORSELF:for(var z=R.contextNode;z!=null&&(d.nodeTest.matches(z,R)&&le.push(z),z!==R.virtualRoot);z=z.nodeType==E.ATTRIBUTE_NODE?Z.getOwnerElement(z):z.parentNode);break;case N.ATTRIBUTE:var ut=R.contextNode.attributes;if(ut!=null)for(var jt=0;jt<ut.length;jt++){var z=ut.item(jt);d.nodeTest.matches(z,R)&&le.push(z)}break;case N.CHILD:for(var z=R.contextNode.firstChild;z!=null;z=z.nextSibling)d.nodeTest.matches(z,R)&&le.push(z);break;case N.DESCENDANT:for(var hr=[R.contextNode.firstChild];hr.length>0;)for(var z=hr.pop();z!=null;)d.nodeTest.matches(z,R)&&le.push(z),z.firstChild!=null?(hr.push(z.nextSibling),z=z.firstChild):z=z.nextSibling;break;case N.DESCENDANTORSELF:d.nodeTest.matches(R.contextNode,R)&&le.push(R.contextNode);for(var hr=[R.contextNode.firstChild];hr.length>0;)for(var z=hr.pop();z!=null;)d.nodeTest.matches(z,R)&&le.push(z),z.firstChild!=null?(hr.push(z.nextSibling),z=z.firstChild):z=z.nextSibling;break;case N.FOLLOWING:if(R.contextNode===R.virtualRoot)break;var hr=[];R.contextNode.firstChild!=null?hr.unshift(R.contextNode.firstChild):hr.unshift(R.contextNode.nextSibling);for(var z=R.contextNode.parentNode;z!=null&&z.nodeType!=E.DOCUMENT_NODE&&z!==R.virtualRoot;z=z.parentNode)hr.unshift(z.nextSibling);do for(var z=hr.pop();z!=null;)d.nodeTest.matches(z,R)&&le.push(z),z.firstChild!=null?(hr.push(z.nextSibling),z=z.firstChild):z=z.nextSibling;while(hr.length>0);break;case N.FOLLOWINGSIBLING:if(R.contextNode===R.virtualRoot)break;for(var z=R.contextNode.nextSibling;z!=null;z=z.nextSibling)d.nodeTest.matches(z,R)&&le.push(z);break;case N.NAMESPACE:var Qt={};if(R.contextNode.nodeType==E.ELEMENT_NODE){Qt.xml=C.XML_NAMESPACE_URI,Qt.xmlns=C.XMLNS_NAMESPACE_URI;for(var z=R.contextNode;z!=null&&z.nodeType==E.ELEMENT_NODE;z=z.parentNode)for(var jt=0;jt<z.attributes.length;jt++){var it=z.attributes.item(jt),Pt=String(it.name);if(Pt=="xmlns")Qt[""]==null&&(Qt[""]=it.value);else if(Pt.length>6&&Pt.substring(0,6)=="xmlns:"){var Xn=Pt.substring(6,Pt.length);Qt[Xn]==null&&(Qt[Xn]=it.value)}}for(var Xn in Qt){var Si=new Dr(Xn,Qt[Xn],R.contextNode);d.nodeTest.matches(Si,R)&&le.push(Si)}}break;case N.PARENT:z=null,R.contextNode!==R.virtualRoot&&(R.contextNode.nodeType==E.ATTRIBUTE_NODE?z=Z.getOwnerElement(R.contextNode):z=R.contextNode.parentNode),z!=null&&d.nodeTest.matches(z,R)&&le.push(z);break;case N.PRECEDING:var hr;R.virtualRoot!=null?hr=[R.virtualRoot]:hr=[Se(R.contextNode)];e:for(;hr.length>0;)for(var z=hr.pop();z!=null;){if(z==R.contextNode)break e;d.nodeTest.matches(z,R)&&le.unshift(z),z.firstChild!=null?(hr.push(z.nextSibling),z=z.firstChild):z=z.nextSibling}break;case N.PRECEDINGSIBLING:if(R.contextNode===R.virtualRoot)break;for(var z=R.contextNode.previousSibling;z!=null;z=z.previousSibling)d.nodeTest.matches(z,R)&&le.push(z);break;case N.SELF:d.nodeTest.matches(R.contextNode,R)&&le.push(R.contextNode);break;default:}return le};function He(d,R,X){return Z.applyPredicates(d.predicates,R,Z.applyStep(d,R,X))}o(He,"applyStepWithPredicates");function Le(d,R,X){return y(s(He.bind(null,X,d),R))}o(Le,"applyStepToNodes"),Z.applySteps=function(d,R,X){return n(Le.bind(null,R),X,d)},Z.prototype.applyFilter=function(d,R){if(!this.filter)return{nodes:[d.contextNode]};var X=this.filter.evaluate(d);if(!st.instance_of(X,Qe)){if(this.filterPredicates!=null&&this.filterPredicates.length>0||this.locationPath!=null)throw new Error("Path expression filter must evaluate to a nodeset if predicates or location path are used");return{nonNodes:X}}return{nodes:Z.applyPredicates(this.filterPredicates||[],R,X.toUnsortedArray())}},Z.applyLocationPath=function(d,R,X){if(!d)return X;var ae=d.absolute?[Z.getRoot(R,X)]:X;return Z.applySteps(d.steps,R,ae)},Z.prototype.evaluate=function(d){var R=v(new Gr,d),X=this.applyFilter(d,R);if("nonNodes"in X)return X.nonNodes;var ae=new Qe;return ae.addArray(Z.applyLocationPath(this.locationPath,R,X.nodes)),ae},Z.predicateMatches=function(d,R){var X=d.evaluate(R);return st.instance_of(X,Ae)?R.contextPosition===X.numberValue():X.booleanValue()},Z.predicateString=function(d){return h("[","]",d.toString())},Z.predicatesString=function(d){return l("",s(Z.predicateString,d))},Z.prototype.toString=function(){if(this.filter!=null){var d=c(this.filter);return st.instance_of(this.filter,Ce)?h("'","'",d):this.filterPredicates!=null&&this.filterPredicates.length?h("(",")",d)+Z.predicatesString(this.filterPredicates):this.locationPath!=null?d+(this.locationPath.absolute?"":"/")+c(this.locationPath):d}return c(this.locationPath)},Z.getOwnerElement=function(d){if(d.ownerElement)return d.ownerElement;try{if(d.selectSingleNode)return d.selectSingleNode("..")}catch{}for(var R=d.nodeType==E.DOCUMENT_NODE?d:d.ownerDocument,X=R.getElementsByTagName("*"),ae=0;ae<X.length;ae++)for(var le=X.item(ae),z=le.attributes,ut=0;ut<z.length;ut++){var jt=z.item(ut);if(jt===d)return le}return null},rt.prototype=new Object,rt.prototype.constructor=rt,rt.superclass=Object.prototype;function rt(d,R){arguments.length>0&&this.init(d,R)}o(rt,"LocationPath"),rt.prototype.init=function(d,R){this.absolute=d,this.steps=R},rt.prototype.toString=function(){return(this.absolute?"/":"")+s(c,this.steps).join("/")},N.prototype=new Object,N.prototype.constructor=N,N.superclass=Object.prototype;function N(d,R,X){arguments.length>0&&this.init(d,R,X)}o(N,"Step"),N.prototype.init=function(d,R,X){this.axis=d,this.nodeTest=R,this.predicates=X},N.prototype.toString=function(){return N.STEPNAMES[this.axis]+"::"+this.nodeTest.toString()+Z.predicatesString(this.predicates)},N.ANCESTOR=0,N.ANCESTORORSELF=1,N.ATTRIBUTE=2,N.CHILD=3,N.DESCENDANT=4,N.DESCENDANTORSELF=5,N.FOLLOWING=6,N.FOLLOWINGSIBLING=7,N.NAMESPACE=8,N.PARENT=9,N.PRECEDING=10,N.PRECEDINGSIBLING=11,N.SELF=12,N.STEPNAMES=n(function(d,R){return d[R[0]]=R[1],d},{},[[N.ANCESTOR,"ancestor"],[N.ANCESTORORSELF,"ancestor-or-self"],[N.ATTRIBUTE,"attribute"],[N.CHILD,"child"],[N.DESCENDANT,"descendant"],[N.DESCENDANTORSELF,"descendant-or-self"],[N.FOLLOWING,"following"],[N.FOLLOWINGSIBLING,"following-sibling"],[N.NAMESPACE,"namespace"],[N.PARENT,"parent"],[N.PRECEDING,"preceding"],[N.PRECEDINGSIBLING,"preceding-sibling"],[N.SELF,"self"]]),S.prototype=new Object,S.prototype.constructor=S,S.superclass=Object.prototype;function S(d,R){arguments.length>0&&this.init(d,R)}o(S,"NodeTest"),S.prototype.init=function(d,R){this.type=d,this.value=R},S.prototype.toString=function(){return"<unknown nodetest type>"},S.prototype.matches=function(d,R){console.warn("unknown node test type")},S.NAMETESTANY=0,S.NAMETESTPREFIXANY=1,S.NAMETESTQNAME=2,S.COMMENT=3,S.TEXT=4,S.PI=5,S.NODE=6,S.isNodeType=function(d){return function(R){return a(d,R.nodeType)}},S.makeNodeTestType=function(d,R,X){var ae=X||function(){};return ae.prototype=new S(d),ae.prototype.constructor=ae,v(ae.prototype,R),ae},S.makeNodeTypeTest=function(d,R,X){return new(S.makeNodeTestType(d,{matches:S.isNodeType(R),toString:u(X)}))},S.hasPrefix=function(d){return d.prefix||(d.nodeName||d.tagName).indexOf(":")!==-1},S.isElementOrAttribute=S.isNodeType([1,2]),S.nameSpaceMatches=function(d,R,X){var ae=X.namespaceURI||"";if(!d)return!ae||R.allowAnyNamespaceForNoPrefix&&!S.hasPrefix(X);var le=R.namespaceResolver.getNamespace(d,R.expressionContextNode);if(le==null)throw new Error("Cannot resolve QName "+d);return le===ae},S.localNameMatches=function(d,R,X){var ae=X.localName||X.nodeName;return R.caseInsensitive?d.toLowerCase()===ae.toLowerCase():d===ae},S.NameTestPrefixAny=S.makeNodeTestType(S.NAMETESTPREFIXANY,{matches:o(function(d,R){return S.isElementOrAttribute(d)&&S.nameSpaceMatches(this.prefix,R,d)},"matches"),toString:o(function(){return this.prefix+":*"},"toString")},o(function(R){this.prefix=R},"NameTestPrefixAny")),S.NameTestQName=S.makeNodeTestType(S.NAMETESTQNAME,{matches:o(function(d,R){return S.isNodeType([E.ELEMENT_NODE,E.ATTRIBUTE_NODE,Dr.XPATH_NAMESPACE_NODE])(d)&&S.nameSpaceMatches(this.prefix,R,d)&&S.localNameMatches(this.localName,R,d)},"matches"),toString:o(function(){return this.name},"toString")},o(function(R){var X=R.split(":");this.name=R,this.prefix=X.length>1?X[0]:null,this.localName=X[X.length>1?1:0]},"NameTestQName")),S.PITest=S.makeNodeTestType(S.PI,{matches:o(function(d,R){return S.isNodeType([E.PROCESSING_INSTRUCTION_NODE])(d)&&(d.target||d.nodeName)===this.name},"matches"),toString:o(function(){return h('processing-instruction("','")',this.name)},"toString")},function(d){this.name=d}),S.nameTestAny=S.makeNodeTypeTest(S.NAMETESTANY,[E.ELEMENT_NODE,E.ATTRIBUTE_NODE,Dr.XPATH_NAMESPACE_NODE],"*"),S.textTest=S.makeNodeTypeTest(S.TEXT,[E.TEXT_NODE,E.CDATA_SECTION_NODE],"text()"),S.commentTest=S.makeNodeTypeTest(S.COMMENT,[E.COMMENT_NODE],"comment()"),S.nodeTest=S.makeNodeTypeTest(S.NODE,[E.ELEMENT_NODE,E.ATTRIBUTE_NODE,E.TEXT_NODE,E.CDATA_SECTION_NODE,E.PROCESSING_INSTRUCTION_NODE,E.COMMENT_NODE,E.DOCUMENT_NODE],"node()"),S.anyPiTest=S.makeNodeTypeTest(S.PI,[E.PROCESSING_INSTRUCTION_NODE],"processing-instruction()"),G.prototype=new b,G.prototype.constructor=G,G.superclass=b.prototype;function G(d){arguments.length>0&&this.init(d)}o(G,"VariableReference"),G.prototype.init=function(d){this.variable=d},G.prototype.toString=function(){return"$"+this.variable},G.prototype.evaluate=function(d){var R=st.resolveQName(this.variable,d.namespaceResolver,d.contextNode,!1);if(R[0]==null)throw new Error("Cannot resolve QName "+fn);var X=d.variableResolver.getVariable(R[1],R[0]);if(!X)throw Gn.fromMessage("Undeclared variable: "+this.toString());return X},P.prototype=new b,P.prototype.constructor=P,P.superclass=b.prototype;function P(d,R){arguments.length>0&&this.init(d,R)}o(P,"FunctionCall"),P.prototype.init=function(d,R){this.functionName=d,this.arguments=R},P.prototype.toString=function(){for(var d=this.functionName+"(",R=0;R<this.arguments.length;R++)R>0&&(d+=", "),d+=this.arguments[R].toString();return d+")"},P.prototype.evaluate=function(d){var R=Bs.getFunctionFromContext(this.functionName,d);if(!R)throw new Error("Unknown function "+this.functionName);var X=[d].concat(this.arguments);return R.apply(d.functionResolver.thisArg,X)};var Ee=new Object;Ee.equals=function(d,R){return d.equals(R)},Ee.notequal=function(d,R){return d.notequal(R)},Ee.lessthan=function(d,R){return d.lessthan(R)},Ee.greaterthan=function(d,R){return d.greaterthan(R)},Ee.lessthanorequal=function(d,R){return d.lessthanorequal(R)},Ee.greaterthanorequal=function(d,R){return d.greaterthanorequal(R)},Ce.prototype=new b,Ce.prototype.constructor=Ce,Ce.superclass=b.prototype;function Ce(d){arguments.length>0&&this.init(d)}o(Ce,"XString"),Ce.prototype.init=function(d){this.str=String(d)},Ce.prototype.toString=function(){return this.str},Ce.prototype.evaluate=function(d){return this},Ce.prototype.string=function(){return this},Ce.prototype.number=function(){return new Ae(this.str)},Ce.prototype.bool=function(){return new Me(this.str)},Ce.prototype.nodeset=function(){throw new Error("Cannot convert string to nodeset")},Ce.prototype.stringValue=function(){return this.str},Ce.prototype.numberValue=function(){return this.number().numberValue()},Ce.prototype.booleanValue=function(){return this.bool().booleanValue()},Ce.prototype.equals=function(d){return st.instance_of(d,Me)?this.bool().equals(d):st.instance_of(d,Ae)?this.number().equals(d):st.instance_of(d,Qe)?d.compareWithString(this,Ee.equals):new Me(this.str==d.str)},Ce.prototype.notequal=function(d){return st.instance_of(d,Me)?this.bool().notequal(d):st.instance_of(d,Ae)?this.number().notequal(d):st.instance_of(d,Qe)?d.compareWithString(this,Ee.notequal):new Me(this.str!=d.str)},Ce.prototype.lessthan=function(d){return this.number().lessthan(d)},Ce.prototype.greaterthan=function(d){return this.number().greaterthan(d)},Ce.prototype.lessthanorequal=function(d){return this.number().lessthanorequal(d)},Ce.prototype.greaterthanorequal=function(d){return this.number().greaterthanorequal(d)},Ae.prototype=new b,Ae.prototype.constructor=Ae,Ae.superclass=b.prototype;function Ae(d){arguments.length>0&&this.init(d)}o(Ae,"XNumber"),Ae.prototype.init=function(d){this.num=typeof d=="string"?this.parse(d):Number(d)},Ae.prototype.numberFormat=/^\s*-?[0-9]*\.?[0-9]+\s*$/,Ae.prototype.parse=function(d){return this.numberFormat.test(d)?parseFloat(d):Number.NaN};function Ye(d){for(var R=d.split("e-"),X=R[0].replace(".",""),ae=Number(R[1]),le=0;le<ae-1;le+=1)X="0"+X;return"0."+X}o(Ye,"padSmallNumber");function Tt(d){for(var R=d.split("e"),X=R[0].replace(".",""),ae=Number(R[1]),le=ae+1-X.length,z=0;z<le;z+=1)X+="0";return X}o(Tt,"padLargeNumber"),Ae.prototype.toString=function(){var d=this.num.toString();return d.indexOf("e-")!==-1?Ye(d):d.indexOf("e")!==-1?Tt(d):d},Ae.prototype.evaluate=function(d){return this},Ae.prototype.string=function(){return new Ce(this.toString())},Ae.prototype.number=function(){return this},Ae.prototype.bool=function(){return new Me(this.num)},Ae.prototype.nodeset=function(){throw new Error("Cannot convert number to nodeset")},Ae.prototype.stringValue=function(){return this.string().stringValue()},Ae.prototype.numberValue=function(){return this.num},Ae.prototype.booleanValue=function(){return this.bool().booleanValue()},Ae.prototype.negate=function(){return new Ae(-this.num)},Ae.prototype.equals=function(d){return st.instance_of(d,Me)?this.bool().equals(d):st.instance_of(d,Ce)?this.equals(d.number()):st.instance_of(d,Qe)?d.compareWithNumber(this,Ee.equals):new Me(this.num==d.num)},Ae.prototype.notequal=function(d){return st.instance_of(d,Me)?this.bool().notequal(d):st.instance_of(d,Ce)?this.notequal(d.number()):st.instance_of(d,Qe)?d.compareWithNumber(this,Ee.notequal):new Me(this.num!=d.num)},Ae.prototype.lessthan=function(d){return st.instance_of(d,Qe)?d.compareWithNumber(this,Ee.greaterthan):st.instance_of(d,Me)||st.instance_of(d,Ce)?this.lessthan(d.number()):new Me(this.num<d.num)},Ae.prototype.greaterthan=function(d){return st.instance_of(d,Qe)?d.compareWithNumber(this,Ee.lessthan):st.instance_of(d,Me)||st.instance_of(d,Ce)?this.greaterthan(d.number()):new Me(this.num>d.num)},Ae.prototype.lessthanorequal=function(d){return st.instance_of(d,Qe)?d.compareWithNumber(this,Ee.greaterthanorequal):st.instance_of(d,Me)||st.instance_of(d,Ce)?this.lessthanorequal(d.number()):new Me(this.num<=d.num)},Ae.prototype.greaterthanorequal=function(d){return st.instance_of(d,Qe)?d.compareWithNumber(this,Ee.lessthanorequal):st.instance_of(d,Me)||st.instance_of(d,Ce)?this.greaterthanorequal(d.number()):new Me(this.num>=d.num)},Ae.prototype.plus=function(d){return new Ae(this.num+d.num)},Ae.prototype.minus=function(d){return new Ae(this.num-d.num)},Ae.prototype.multiply=function(d){return new Ae(this.num*d.num)},Ae.prototype.div=function(d){return new Ae(this.num/d.num)},Ae.prototype.mod=function(d){return new Ae(this.num%d.num)},Me.prototype=new b,Me.prototype.constructor=Me,Me.superclass=b.prototype;function Me(d){arguments.length>0&&this.init(d)}o(Me,"XBoolean"),Me.prototype.init=function(d){this.b=!!d},Me.prototype.toString=function(){return this.b.toString()},Me.prototype.evaluate=function(d){return this},Me.prototype.string=function(){return new Ce(this.b)},Me.prototype.number=function(){return new Ae(this.b)},Me.prototype.bool=function(){return this},Me.prototype.nodeset=function(){throw new Error("Cannot convert boolean to nodeset")},Me.prototype.stringValue=function(){return this.string().stringValue()},Me.prototype.numberValue=function(){return this.number().numberValue()},Me.prototype.booleanValue=function(){return this.b},Me.prototype.not=function(){return new Me(!this.b)},Me.prototype.equals=function(d){return st.instance_of(d,Ce)||st.instance_of(d,Ae)?this.equals(d.bool()):st.instance_of(d,Qe)?d.compareWithBoolean(this,Ee.equals):new Me(this.b==d.b)},Me.prototype.notequal=function(d){return st.instance_of(d,Ce)||st.instance_of(d,Ae)?this.notequal(d.bool()):st.instance_of(d,Qe)?d.compareWithBoolean(this,Ee.notequal):new Me(this.b!=d.b)},Me.prototype.lessthan=function(d){return this.number().lessthan(d)},Me.prototype.greaterthan=function(d){return this.number().greaterthan(d)},Me.prototype.lessthanorequal=function(d){return this.number().lessthanorequal(d)},Me.prototype.greaterthanorequal=function(d){return this.number().greaterthanorequal(d)},Me.true_=new Me(!0),Me.false_=new Me(!1),St.prototype=new Object,St.prototype.constructor=St,St.superclass=Object.prototype;function St(d){this.init(d)}o(St,"AVLTree"),St.prototype.init=function(d){this.left=null,this.right=null,this.node=d,this.depth=1},St.prototype.balance=function(){var d=this.left==null?0:this.left.depth,R=this.right==null?0:this.right.depth;if(d>R+1){var X=this.left.left==null?0:this.left.left.depth,ae=this.left.right==null?0:this.left.right.depth;X<ae&&this.left.rotateRR(),this.rotateLL()}else if(d+1<R){var le=this.right.right==null?0:this.right.right.depth,z=this.right.left==null?0:this.right.left.depth;z>le&&this.right.rotateLL(),this.rotateRR()}},St.prototype.rotateLL=function(){var d=this.node,R=this.right;this.node=this.left.node,this.right=this.left,this.left=this.left.left,this.right.left=this.right.right,this.right.right=R,this.right.node=d,this.right.updateInNewLocation(),this.updateInNewLocation()},St.prototype.rotateRR=function(){var d=this.node,R=this.left;this.node=this.right.node,this.left=this.right,this.right=this.right.right,this.left.right=this.left.left,this.left.left=R,this.left.node=d,this.left.updateInNewLocation(),this.updateInNewLocation()},St.prototype.updateInNewLocation=function(){this.getDepthFromChildren()},St.prototype.getDepthFromChildren=function(){this.depth=this.node==null?0:1,this.left!=null&&(this.depth=this.left.depth+1),this.right!=null&&this.depth<=this.right.depth&&(this.depth=this.right.depth+1)};function Yr(d,R){if(d===R)return 0;if(d.compareDocumentPosition){var X=d.compareDocumentPosition(R);return X&1||X&10?1:X&20?-1:0}for(var ae=0,le=0,z=d;z!=null;z=z.parentNode||z.ownerElement)ae++;for(var ut=R;ut!=null;ut=ut.parentNode||ut.ownerElement)le++;if(ae>le){for(;ae>le;)d=d.parentNode||d.ownerElement,ae--;if(d===R)return 1}else if(le>ae){for(;le>ae;)R=R.parentNode||R.ownerElement,le--;if(d===R)return-1}for(var jt=d.parentNode||d.ownerElement,Qt=R.parentNode||R.ownerElement;jt!==Qt;)d=jt,R=Qt,jt=d.parentNode||d.ownerElement,Qt=R.parentNode||R.ownerElement;var it=st.isAttribute(d),Pt=st.isAttribute(R);if(it&&!Pt)return-1;if(!it&&Pt)return 1;if(jt)for(var Xn=it?jt.attributes:jt.childNodes,Si=Xn.length,hr=0;hr<Si;hr+=1){var ka=Xn[hr];if(ka===d)return-1;if(ka===R)return 1}throw new Error("Unexpected: could not determine node order")}o(Yr,"nodeOrder"),St.prototype.add=function(d){if(d===this.node)return!1;var R=Yr(d,this.node),X=!1;return R==-1?this.left==null?(this.left=new St(d),X=!0):(X=this.left.add(d),X&&this.balance()):R==1&&(this.right==null?(this.right=new St(d),X=!0):(X=this.right.add(d),X&&this.balance())),X&&this.getDepthFromChildren(),X},Qe.prototype=new b,Qe.prototype.constructor=Qe,Qe.superclass=b.prototype;function Qe(){this.init()}o(Qe,"XNodeSet"),Qe.prototype.init=function(){this.tree=null,this.nodes=[],this.size=0},Qe.prototype.toString=function(){var d=this.first();return d==null?"":this.stringForNode(d)},Qe.prototype.evaluate=function(d){return this},Qe.prototype.string=function(){return new Ce(this.toString())},Qe.prototype.stringValue=function(){return this.toString()},Qe.prototype.number=function(){return new Ae(this.string())},Qe.prototype.numberValue=function(){return Number(this.string())},Qe.prototype.bool=function(){return new Me(this.booleanValue())},Qe.prototype.booleanValue=function(){return!!this.size},Qe.prototype.nodeset=function(){return this},Qe.prototype.stringForNode=function(d){return d.nodeType==E.DOCUMENT_NODE||d.nodeType==E.ELEMENT_NODE||d.nodeType===E.DOCUMENT_FRAGMENT_NODE?this.stringForContainerNode(d):d.nodeType===E.ATTRIBUTE_NODE?d.value||d.nodeValue:d.isNamespaceNode?d.namespace:d.nodeValue},Qe.prototype.stringForContainerNode=function(d){for(var R="",X=d.firstChild;X!=null;X=X.nextSibling){var ae=X.nodeType;(ae===1||ae===3||ae===4||ae===9||ae===11)&&(R+=this.stringForNode(X))}return R},Qe.prototype.buildTree=function(){if(!this.tree&&this.nodes.length){this.tree=new St(this.nodes[0]);for(var d=1;d<this.nodes.length;d+=1)this.tree.add(this.nodes[d])}return this.tree},Qe.prototype.first=function(){var d=this.buildTree();if(d==null)return null;for(;d.left!=null;)d=d.left;return d.node},Qe.prototype.add=function(d){for(var R=0;R<this.nodes.length;R+=1)if(d===this.nodes[R])return;this.tree=null,this.nodes.push(d),this.size+=1},Qe.prototype.addArray=function(d){var R=this;t(function(X){R.add(X)},d)},Qe.prototype.toArray=function(){var d=[];return this.toArrayRec(this.buildTree(),d),d},Qe.prototype.toArrayRec=function(d,R){d!=null&&(this.toArrayRec(d.left,R),R.push(d.node),this.toArrayRec(d.right,R))},Qe.prototype.toUnsortedArray=function(){return this.nodes.slice()},Qe.prototype.compareWithString=function(d,R){for(var X=this.toUnsortedArray(),ae=0;ae<X.length;ae++){var le=X[ae],z=new Ce(this.stringForNode(le)),ut=R(z,d);if(ut.booleanValue())return ut}return new Me(!1)},Qe.prototype.compareWithNumber=function(d,R){for(var X=this.toUnsortedArray(),ae=0;ae<X.length;ae++){var le=X[ae],z=new Ae(this.stringForNode(le)),ut=R(z,d);if(ut.booleanValue())return ut}return new Me(!1)},Qe.prototype.compareWithBoolean=function(d,R){return R(this.bool(),d)},Qe.prototype.compareWithNodeSet=function(d,R){for(var X=this.toUnsortedArray(),ae=o(function(jt,Qt){return R(Qt,jt)},"oInvert"),le=0;le<X.length;le++){var z=new Ce(this.stringForNode(X[le])),ut=d.compareWithString(z,ae);if(ut.booleanValue())return ut}return new Me(!1)},Qe.compareWith=e(function(d,R){return st.instance_of(R,Ce)?this.compareWithString(R,d):st.instance_of(R,Ae)?this.compareWithNumber(R,d):st.instance_of(R,Me)?this.compareWithBoolean(R,d):this.compareWithNodeSet(R,d)}),Qe.prototype.equals=Qe.compareWith(Ee.equals),Qe.prototype.notequal=Qe.compareWith(Ee.notequal),Qe.prototype.lessthan=Qe.compareWith(Ee.lessthan),Qe.prototype.greaterthan=Qe.compareWith(Ee.greaterthan),Qe.prototype.lessthanorequal=Qe.compareWith(Ee.lessthanorequal),Qe.prototype.greaterthanorequal=Qe.compareWith(Ee.greaterthanorequal),Qe.prototype.union=function(d){var R=new Qe;return R.addArray(this.toUnsortedArray()),R.addArray(d.toUnsortedArray()),R},Dr.prototype=new Object,Dr.prototype.constructor=Dr,Dr.superclass=Object.prototype;function Dr(d,R,X){this.isXPathNamespace=!0,this.ownerDocument=X.ownerDocument,this.nodeName="#namespace",this.prefix=d,this.localName=d,this.namespaceURI=R,this.nodeValue=R,this.ownerElement=X,this.nodeType=Dr.XPATH_NAMESPACE_NODE}o(Dr,"XPathNamespace"),Dr.prototype.toString=function(){return'{ "'+this.prefix+'", "'+this.namespaceURI+'" }'},Gr.prototype=new Object,Gr.prototype.constructor=Gr,Gr.superclass=Object.prototype;function Gr(d,R,X){this.variableResolver=d??new Nn,this.namespaceResolver=R??new xs,this.functionResolver=X??new Bs}o(Gr,"XPathContext"),Gr.prototype.extend=function(d){return v(new Gr,this,d)},Nn.prototype=new Object,Nn.prototype.constructor=Nn,Nn.superclass=Object.prototype;function Nn(){}o(Nn,"VariableResolver"),Nn.prototype.getVariable=function(d,R){return null},Bs.prototype=new Object,Bs.prototype.constructor=Bs,Bs.superclass=Object.prototype;function Bs(d){this.thisArg=d??gt,this.functions=new Object,this.addStandardFunctions()}o(Bs,"FunctionResolver"),Bs.prototype.addStandardFunctions=function(){this.functions["{}last"]=gt.last,this.functions["{}position"]=gt.position,this.functions["{}count"]=gt.count,this.functions["{}id"]=gt.id,this.functions["{}local-name"]=gt.localName,this.functions["{}namespace-uri"]=gt.namespaceURI,this.functions["{}name"]=gt.name,this.functions["{}string"]=gt.string,this.functions["{}concat"]=gt.concat,this.functions["{}starts-with"]=gt.startsWith,this.functions["{}contains"]=gt.contains,this.functions["{}substring-before"]=gt.substringBefore,this.functions["{}substring-after"]=gt.substringAfter,this.functions["{}substring"]=gt.substring,this.functions["{}string-length"]=gt.stringLength,this.functions["{}normalize-space"]=gt.normalizeSpace,this.functions["{}translate"]=gt.translate,this.functions["{}boolean"]=gt.boolean_,this.functions["{}not"]=gt.not,this.functions["{}true"]=gt.true_,this.functions["{}false"]=gt.false_,this.functions["{}lang"]=gt.lang,this.functions["{}number"]=gt.number,this.functions["{}sum"]=gt.sum,this.functions["{}floor"]=gt.floor,this.functions["{}ceiling"]=gt.ceiling,this.functions["{}round"]=gt.round},Bs.prototype.addFunction=function(d,R,X){this.functions["{"+d+"}"+R]=X},Bs.getFunctionFromContext=function(d,R){var X=st.resolveQName(d,R.namespaceResolver,R.contextNode,!1);if(X[0]===null)throw new Error("Cannot resolve QName "+name);return R.functionResolver.getFunction(X[1],X[0])},Bs.prototype.getFunction=function(d,R){return this.functions["{"+R+"}"+d]},xs.prototype=new Object,xs.prototype.constructor=xs,xs.superclass=Object.prototype;function xs(){}o(xs,"NamespaceResolver"),xs.prototype.getNamespace=function(d,R){if(d=="xml")return C.XML_NAMESPACE_URI;if(d=="xmlns")return C.XMLNS_NAMESPACE_URI;for(R.nodeType==E.DOCUMENT_NODE?R=R.documentElement:R.nodeType==E.ATTRIBUTE_NODE?R=Z.getOwnerElement(R):R.nodeType!=E.ELEMENT_NODE&&(R=R.parentNode);R!=null&&R.nodeType==E.ELEMENT_NODE;){for(var X=R.attributes,ae=0;ae<X.length;ae++){var le=X.item(ae),z=le.name||le.nodeName;if(z==="xmlns"&&d===""||z==="xmlns:"+d)return String(le.value||le.nodeValue)}R=R.parentNode}return null};var gt=new Object;gt.last=function(d){if(arguments.length!=1)throw new Error("Function last expects ()");return new Ae(d.contextSize)},gt.position=function(d){if(arguments.length!=1)throw new Error("Function position expects ()");return new Ae(d.contextPosition)},gt.count=function(){var d=arguments[0],R;if(arguments.length!=2||!st.instance_of(R=arguments[1].evaluate(d),Qe))throw new Error("Function count expects (node-set)");return new Ae(R.size)},gt.id=function(){var d=arguments[0],R;if(arguments.length!=2)throw new Error("Function id expects (object)");R=arguments[1].evaluate(d),st.instance_of(R,Qe)?R=R.toArray().join(" "):R=R.stringValue();for(var X=R.split(/[\x0d\x0a\x09\x20]+/),ae=0,le=new Qe,z=d.contextNode.nodeType==E.DOCUMENT_NODE?d.contextNode:d.contextNode.ownerDocument,ut=0;ut<X.length;ut++){var jt;z.getElementById?jt=z.getElementById(X[ut]):jt=st.getElementById(z,X[ut]),jt!=null&&(le.add(jt),ae++)}return le},gt.localName=function(d,R){var X;if(arguments.length==1)X=d.contextNode;else if(arguments.length==2)X=R.evaluate(d).first();else throw new Error("Function local-name expects (node-set?)");return X==null?new Ce(""):new Ce(X.localName||X.baseName||X.target||X.nodeName||"")},gt.namespaceURI=function(){var d=arguments[0],R;if(arguments.length==1)R=d.contextNode;else if(arguments.length==2)R=arguments[1].evaluate(d).first();else throw new Error("Function namespace-uri expects (node-set?)");return R==null?new Ce(""):new Ce(R.namespaceURI)},gt.name=function(){var d=arguments[0],R;if(arguments.length==1)R=d.contextNode;else if(arguments.length==2)R=arguments[1].evaluate(d).first();else throw new Error("Function name expects (node-set?)");return R==null?new Ce(""):R.nodeType==E.ELEMENT_NODE?new Ce(R.nodeName):R.nodeType==E.ATTRIBUTE_NODE?new Ce(R.name||R.nodeName):R.nodeType===E.PROCESSING_INSTRUCTION_NODE?new Ce(R.target||R.nodeName):R.localName==null?new Ce(""):new Ce(R.localName)},gt.string=function(){var d=arguments[0];if(arguments.length==1)return new Ce(Qe.prototype.stringForNode(d.contextNode));if(arguments.length==2)return arguments[1].evaluate(d).string();throw new Error("Function string expects (object?)")},gt.concat=function(d){if(arguments.length<3)throw new Error("Function concat expects (string, string[, string]*)");for(var R="",X=1;X<arguments.length;X++)R+=arguments[X].evaluate(d).stringValue();return new Ce(R)},gt.startsWith=function(){var d=arguments[0];if(arguments.length!=3)throw new Error("Function startsWith expects (string, string)");var R=arguments[1].evaluate(d).stringValue(),X=arguments[2].evaluate(d).stringValue();return new Me(R.substring(0,X.length)==X)},gt.contains=function(){var d=arguments[0];if(arguments.length!=3)throw new Error("Function contains expects (string, string)");var R=arguments[1].evaluate(d).stringValue(),X=arguments[2].evaluate(d).stringValue();return new Me(R.indexOf(X)!==-1)},gt.substringBefore=function(){var d=arguments[0];if(arguments.length!=3)throw new Error("Function substring-before expects (string, string)");var R=arguments[1].evaluate(d).stringValue(),X=arguments[2].evaluate(d).stringValue();return new Ce(R.substring(0,R.indexOf(X)))},gt.substringAfter=function(){var d=arguments[0];if(arguments.length!=3)throw new Error("Function substring-after expects (string, string)");var R=arguments[1].evaluate(d).stringValue(),X=arguments[2].evaluate(d).stringValue();if(X.length==0)return new Ce(R);var ae=R.indexOf(X);return ae==-1?new Ce(""):new Ce(R.substring(ae+X.length))},gt.substring=function(){var d=arguments[0];if(!(arguments.length==3||arguments.length==4))throw new Error("Function substring expects (string, number, number?)");var R=arguments[1].evaluate(d).stringValue(),X=Math.round(arguments[2].evaluate(d).numberValue())-1,ae=arguments.length==4?X+Math.round(arguments[3].evaluate(d).numberValue()):void 0;return new Ce(R.substring(X,ae))},gt.stringLength=function(){var d=arguments[0],R;if(arguments.length==1)R=Qe.prototype.stringForNode(d.contextNode);else if(arguments.length==2)R=arguments[1].evaluate(d).stringValue();else throw new Error("Function string-length expects (string?)");return new Ae(R.length)},gt.normalizeSpace=function(){var d=arguments[0],R;if(arguments.length==1)R=Qe.prototype.stringForNode(d.contextNode);else if(arguments.length==2)R=arguments[1].evaluate(d).stringValue();else throw new Error("Function normalize-space expects (string?)");for(var X=0,ae=R.length-1;st.isSpace(R.charCodeAt(ae));)ae--;for(var le="";X<=ae&&st.isSpace(R.charCodeAt(X));)X++;for(;X<=ae;)if(st.isSpace(R.charCodeAt(X)))for(le+=" ";X<=ae&&st.isSpace(R.charCodeAt(X));)X++;else le+=R.charAt(X),X++;return new Ce(le)},gt.translate=function(d,R,X,ae){if(arguments.length!=4)throw new Error("Function translate expects (string, string, string)");var le=R.evaluate(d).stringValue(),z=X.evaluate(d).stringValue(),ut=ae.evaluate(d).stringValue(),jt=n(function(it,Pt,Xn){return Pt in it||(it[Pt]=Xn>ut.length?"":ut[Xn]),it},{},z),Qt=l("",s(function(it){return it in jt?jt[it]:it},le));return new Ce(Qt)},gt.boolean_=function(){var d=arguments[0];if(arguments.length!=2)throw new Error("Function boolean expects (object)");return arguments[1].evaluate(d).bool()},gt.not=function(d,R){if(arguments.length!=2)throw new Error("Function not expects (object)");return R.evaluate(d).bool().not()},gt.true_=function(){if(arguments.length!=1)throw new Error("Function true expects ()");return Me.true_},gt.false_=function(){if(arguments.length!=1)throw new Error("Function false expects ()");return Me.false_},gt.lang=function(){var d=arguments[0];if(arguments.length!=2)throw new Error("Function lang expects (string)");for(var R,X=d.contextNode;X!=null&&X.nodeType!=E.DOCUMENT_NODE;X=X.parentNode){var ae=X.getAttributeNS(C.XML_NAMESPACE_URI,"lang");if(ae!=null){R=String(ae);break}}if(R==null)return Me.false_;var le=arguments[1].evaluate(d).stringValue();return new Me(R.substring(0,le.length)==le&&(R.length==le.length||R.charAt(le.length)=="-"))},gt.number=function(){var d=arguments[0];if(!(arguments.length==1||arguments.length==2))throw new Error("Function number expects (object?)");return arguments.length==1?new Ae(Qe.prototype.stringForNode(d.contextNode)):arguments[1].evaluate(d).number()},gt.sum=function(){var d=arguments[0],R;if(arguments.length!=2||!st.instance_of(R=arguments[1].evaluate(d),Qe))throw new Error("Function sum expects (node-set)");R=R.toUnsortedArray();for(var X=0,ae=0;ae<R.length;ae++)X+=new Ae(Qe.prototype.stringForNode(R[ae])).numberValue();return new Ae(X)},gt.floor=function(){var d=arguments[0];if(arguments.length!=2)throw new Error("Function floor expects (number)");return new Ae(Math.floor(arguments[1].evaluate(d).numberValue()))},gt.ceiling=function(){var d=arguments[0];if(arguments.length!=2)throw new Error("Function ceiling expects (number)");return new Ae(Math.ceil(arguments[1].evaluate(d).numberValue()))},gt.round=function(){var d=arguments[0];if(arguments.length!=2)throw new Error("Function round expects (number)");return new Ae(Math.round(arguments[1].evaluate(d).numberValue()))};var st=new Object;st.isAttribute=function(d){return d&&(d.nodeType===E.ATTRIBUTE_NODE||d.ownerElement)},st.splitQName=function(d){var R=d.indexOf(":");return R==-1?[null,d]:[d.substring(0,R),d.substring(R+1)]},st.resolveQName=function(d,R,X,ae){var le=st.splitQName(d);return le[0]!=null?le[0]=R.getNamespace(le[0],X):ae?(le[0]=R.getNamespace("",X),le[0]==null&&(le[0]="")):le[0]="",le},st.isSpace=function(d){return d==9||d==13||d==10||d==32},st.isLetter=function(d){return d>=65&&d<=90||d>=97&&d<=122||d>=192&&d<=214||d>=216&&d<=246||d>=248&&d<=255||d>=256&&d<=305||d>=308&&d<=318||d>=321&&d<=328||d>=330&&d<=382||d>=384&&d<=451||d>=461&&d<=496||d>=500&&d<=501||d>=506&&d<=535||d>=592&&d<=680||d>=699&&d<=705||d==902||d>=904&&d<=906||d==908||d>=910&&d<=929||d>=931&&d<=974||d>=976&&d<=982||d==986||d==988||d==990||d==992||d>=994&&d<=1011||d>=1025&&d<=1036||d>=1038&&d<=1103||d>=1105&&d<=1116||d>=1118&&d<=1153||d>=1168&&d<=1220||d>=1223&&d<=1224||d>=1227&&d<=1228||d>=1232&&d<=1259||d>=1262&&d<=1269||d>=1272&&d<=1273||d>=1329&&d<=1366||d==1369||d>=1377&&d<=1414||d>=1488&&d<=1514||d>=1520&&d<=1522||d>=1569&&d<=1594||d>=1601&&d<=1610||d>=1649&&d<=1719||d>=1722&&d<=1726||d>=1728&&d<=1742||d>=1744&&d<=1747||d==1749||d>=1765&&d<=1766||d>=2309&&d<=2361||d==2365||d>=2392&&d<=2401||d>=2437&&d<=2444||d>=2447&&d<=2448||d>=2451&&d<=2472||d>=2474&&d<=2480||d==2482||d>=2486&&d<=2489||d>=2524&&d<=2525||d>=2527&&d<=2529||d>=2544&&d<=2545||d>=2565&&d<=2570||d>=2575&&d<=2576||d>=2579&&d<=2600||d>=2602&&d<=2608||d>=2610&&d<=2611||d>=2613&&d<=2614||d>=2616&&d<=2617||d>=2649&&d<=2652||d==2654||d>=2674&&d<=2676||d>=2693&&d<=2699||d==2701||d>=2703&&d<=2705||d>=2707&&d<=2728||d>=2730&&d<=2736||d>=2738&&d<=2739||d>=2741&&d<=2745||d==2749||d==2784||d>=2821&&d<=2828||d>=2831&&d<=2832||d>=2835&&d<=2856||d>=2858&&d<=2864||d>=2866&&d<=2867||d>=2870&&d<=2873||d==2877||d>=2908&&d<=2909||d>=2911&&d<=2913||d>=2949&&d<=2954||d>=2958&&d<=2960||d>=2962&&d<=2965||d>=2969&&d<=2970||d==2972||d>=2974&&d<=2975||d>=2979&&d<=2980||d>=2984&&d<=2986||d>=2990&&d<=2997||d>=2999&&d<=3001||d>=3077&&d<=3084||d>=3086&&d<=3088||d>=3090&&d<=3112||d>=3114&&d<=3123||d>=3125&&d<=3129||d>=3168&&d<=3169||d>=3205&&d<=3212||d>=3214&&d<=3216||d>=3218&&d<=3240||d>=3242&&d<=3251||d>=3253&&d<=3257||d==3294||d>=3296&&d<=3297||d>=3333&&d<=3340||d>=3342&&d<=3344||d>=3346&&d<=3368||d>=3370&&d<=3385||d>=3424&&d<=3425||d>=3585&&d<=3630||d==3632||d>=3634&&d<=3635||d>=3648&&d<=3653||d>=3713&&d<=3714||d==3716||d>=3719&&d<=3720||d==3722||d==3725||d>=3732&&d<=3735||d>=3737&&d<=3743||d>=3745&&d<=3747||d==3749||d==3751||d>=3754&&d<=3755||d>=3757&&d<=3758||d==3760||d>=3762&&d<=3763||d==3773||d>=3776&&d<=3780||d>=3904&&d<=3911||d>=3913&&d<=3945||d>=4256&&d<=4293||d>=4304&&d<=4342||d==4352||d>=4354&&d<=4355||d>=4357&&d<=4359||d==4361||d>=4363&&d<=4364||d>=4366&&d<=4370||d==4412||d==4414||d==4416||d==4428||d==4430||d==4432||d>=4436&&d<=4437||d==4441||d>=4447&&d<=4449||d==4451||d==4453||d==4455||d==4457||d>=4461&&d<=4462||d>=4466&&d<=4467||d==4469||d==4510||d==4520||d==4523||d>=4526&&d<=4527||d>=4535&&d<=4536||d==4538||d>=4540&&d<=4546||d==4587||d==4592||d==4601||d>=7680&&d<=7835||d>=7840&&d<=7929||d>=7936&&d<=7957||d>=7960&&d<=7965||d>=7968&&d<=8005||d>=8008&&d<=8013||d>=8016&&d<=8023||d==8025||d==8027||d==8029||d>=8031&&d<=8061||d>=8064&&d<=8116||d>=8118&&d<=8124||d==8126||d>=8130&&d<=8132||d>=8134&&d<=8140||d>=8144&&d<=8147||d>=8150&&d<=8155||d>=8160&&d<=8172||d>=8178&&d<=8180||d>=8182&&d<=8188||d==8486||d>=8490&&d<=8491||d==8494||d>=8576&&d<=8578||d>=12353&&d<=12436||d>=12449&&d<=12538||d>=12549&&d<=12588||d>=44032&&d<=55203||d>=19968&&d<=40869||d==12295||d>=12321&&d<=12329},st.isNCNameChar=function(d){return d>=48&&d<=57||d>=1632&&d<=1641||d>=1776&&d<=1785||d>=2406&&d<=2415||d>=2534&&d<=2543||d>=2662&&d<=2671||d>=2790&&d<=2799||d>=2918&&d<=2927||d>=3047&&d<=3055||d>=3174&&d<=3183||d>=3302&&d<=3311||d>=3430&&d<=3439||d>=3664&&d<=3673||d>=3792&&d<=3801||d>=3872&&d<=3881||d==46||d==45||d==95||st.isLetter(d)||d>=768&&d<=837||d>=864&&d<=865||d>=1155&&d<=1158||d>=1425&&d<=1441||d>=1443&&d<=1465||d>=1467&&d<=1469||d==1471||d>=1473&&d<=1474||d==1476||d>=1611&&d<=1618||d==1648||d>=1750&&d<=1756||d>=1757&&d<=1759||d>=1760&&d<=1764||d>=1767&&d<=1768||d>=1770&&d<=1773||d>=2305&&d<=2307||d==2364||d>=2366&&d<=2380||d==2381||d>=2385&&d<=2388||d>=2402&&d<=2403||d>=2433&&d<=2435||d==2492||d==2494||d==2495||d>=2496&&d<=2500||d>=2503&&d<=2504||d>=2507&&d<=2509||d==2519||d>=2530&&d<=2531||d==2562||d==2620||d==2622||d==2623||d>=2624&&d<=2626||d>=2631&&d<=2632||d>=2635&&d<=2637||d>=2672&&d<=2673||d>=2689&&d<=2691||d==2748||d>=2750&&d<=2757||d>=2759&&d<=2761||d>=2763&&d<=2765||d>=2817&&d<=2819||d==2876||d>=2878&&d<=2883||d>=2887&&d<=2888||d>=2891&&d<=2893||d>=2902&&d<=2903||d>=2946&&d<=2947||d>=3006&&d<=3010||d>=3014&&d<=3016||d>=3018&&d<=3021||d==3031||d>=3073&&d<=3075||d>=3134&&d<=3140||d>=3142&&d<=3144||d>=3146&&d<=3149||d>=3157&&d<=3158||d>=3202&&d<=3203||d>=3262&&d<=3268||d>=3270&&d<=3272||d>=3274&&d<=3277||d>=3285&&d<=3286||d>=3330&&d<=3331||d>=3390&&d<=3395||d>=3398&&d<=3400||d>=3402&&d<=3405||d==3415||d==3633||d>=3636&&d<=3642||d>=3655&&d<=3662||d==3761||d>=3764&&d<=3769||d>=3771&&d<=3772||d>=3784&&d<=3789||d>=3864&&d<=3865||d==3893||d==3895||d==3897||d==3902||d==3903||d>=3953&&d<=3972||d>=3974&&d<=3979||d>=3984&&d<=3989||d==3991||d>=3993&&d<=4013||d>=4017&&d<=4023||d==4025||d>=8400&&d<=8412||d==8417||d>=12330&&d<=12335||d==12441||d==12442||d==183||d==720||d==721||d==903||d==1600||d==3654||d==3782||d==12293||d>=12337&&d<=12341||d>=12445&&d<=12446||d>=12540&&d<=12542},st.coalesceText=function(d){for(var R=d.firstChild;R!=null;R=R.nextSibling)if(R.nodeType==E.TEXT_NODE||R.nodeType==E.CDATA_SECTION_NODE){var X=R.nodeValue,ae=R;for(R=R.nextSibling;R!=null&&(R.nodeType==E.TEXT_NODE||R.nodeType==E.CDATA_SECTION_NODE);){X+=R.nodeValue;var le=R;R=R.nextSibling,le.parentNode.removeChild(le)}if(ae.nodeType==E.CDATA_SECTION_NODE){var z=ae.parentNode;if(ae.nextSibling==null)z.removeChild(ae),z.appendChild(z.ownerDocument.createTextNode(X));else{var ut=ae.nextSibling;z.removeChild(ae),z.insertBefore(z.ownerDocument.createTextNode(X),ut)}}else ae.nodeValue=X;if(R==null)break}else R.nodeType==E.ELEMENT_NODE&&st.coalesceText(R)},st.instance_of=function(d,R){for(;d!=null;){if(d.constructor===R)return!0;if(d===Object)return!1;d=d.constructor.superclass}return!1},st.getElementById=function(d,R){if(d.nodeType==E.ELEMENT_NODE&&(d.getAttribute("id")==R||d.getAttributeNS(null,"id")==R))return d;for(var X=d.firstChild;X!=null;X=X.nextSibling){var ae=st.getElementById(X,R);if(ae!=null)return ae}return null};var Gn=(function(){function d(X,ae){var le=ae?": "+ae.toString():"";switch(X){case R.INVALID_EXPRESSION_ERR:return"Invalid expression"+le;case R.TYPE_ERR:return"Type error"+le}return null}o(d,"getMessage");function R(X,ae,le){var z=Error.call(this,d(X,ae)||le);return z.code=X,z.exception=ae,z}return o(R,"XPathException"),R.prototype=Object.create(Error.prototype),R.prototype.constructor=R,R.superclass=Error,R.prototype.toString=function(){return this.message},R.fromMessage=function(X,ae){return new R(null,ae,X)},R.INVALID_EXPRESSION_ERR=51,R.TYPE_ERR=52,R})();ws.prototype={},ws.prototype.constructor=ws,ws.superclass=Object.prototype;function ws(d,R,X){this.xpath=X.parse(d),this.context=new Gr,this.context.namespaceResolver=new Oa(R)}o(ws,"XPathExpression"),ws.getOwnerDocument=function(d){return d.nodeType===E.DOCUMENT_NODE?d:d.ownerDocument},ws.detectHtmlDom=function(d){if(!d)return!1;var R=ws.getOwnerDocument(d);try{return R.implementation.hasFeature("HTML","2.0")}catch{return!0}},ws.prototype.evaluate=function(d,R,X){this.context.expressionContextNode=d,this.context.caseInsensitive=ws.detectHtmlDom(d);var ae=this.xpath.evaluate(this.context);return new Lt(ae,R)},Oa.prototype={},Oa.prototype.constructor=Oa,Oa.superclass=Object.prototype;function Oa(d){this.xpathNSResolver=d}o(Oa,"XPathNSResolverWrapper"),Oa.prototype.getNamespace=function(d,R){return this.xpathNSResolver==null?null:this.xpathNSResolver.lookupNamespaceURI(d)},Pa.prototype={},Pa.prototype.constructor=Pa,Pa.superclass=Object.prototype;function Pa(d){this.node=d,this.namespaceResolver=new xs}o(Pa,"NodeXPathNSResolver"),Pa.prototype.lookupNamespaceURI=function(d){return this.namespaceResolver.getNamespace(d,this.node)},Lt.prototype={},Lt.prototype.constructor=Lt,Lt.superclass=Object.prototype;function Lt(d,R){switch(R==Lt.ANY_TYPE&&(d.constructor===Ce?R=Lt.STRING_TYPE:d.constructor===Ae?R=Lt.NUMBER_TYPE:d.constructor===Me?R=Lt.BOOLEAN_TYPE:d.constructor===Qe&&(R=Lt.UNORDERED_NODE_ITERATOR_TYPE)),this.resultType=R,R){case Lt.NUMBER_TYPE:this.numberValue=d.numberValue();return;case Lt.STRING_TYPE:this.stringValue=d.stringValue();return;case Lt.BOOLEAN_TYPE:this.booleanValue=d.booleanValue();return;case Lt.ANY_UNORDERED_NODE_TYPE:case Lt.FIRST_ORDERED_NODE_TYPE:if(d.constructor===Qe){this.singleNodeValue=d.first();return}break;case Lt.UNORDERED_NODE_ITERATOR_TYPE:case Lt.ORDERED_NODE_ITERATOR_TYPE:if(d.constructor===Qe){this.invalidIteratorState=!1,this.nodes=d.toArray(),this.iteratorIndex=0;return}break;case Lt.UNORDERED_NODE_SNAPSHOT_TYPE:case Lt.ORDERED_NODE_SNAPSHOT_TYPE:if(d.constructor===Qe){this.nodes=d.toArray(),this.snapshotLength=this.nodes.length;return}break}throw new Gn(Gn.TYPE_ERR)}o(Lt,"XPathResult"),Lt.prototype.iterateNext=function(){if(this.resultType!=Lt.UNORDERED_NODE_ITERATOR_TYPE&&this.resultType!=Lt.ORDERED_NODE_ITERATOR_TYPE)throw new Gn(Gn.TYPE_ERR);return this.nodes[this.iteratorIndex++]},Lt.prototype.snapshotItem=function(d){if(this.resultType!=Lt.UNORDERED_NODE_SNAPSHOT_TYPE&&this.resultType!=Lt.ORDERED_NODE_SNAPSHOT_TYPE)throw new Gn(Gn.TYPE_ERR);return this.nodes[d]},Lt.ANY_TYPE=0,Lt.NUMBER_TYPE=1,Lt.STRING_TYPE=2,Lt.BOOLEAN_TYPE=3,Lt.UNORDERED_NODE_ITERATOR_TYPE=4,Lt.ORDERED_NODE_ITERATOR_TYPE=5,Lt.UNORDERED_NODE_SNAPSHOT_TYPE=6,Lt.ORDERED_NODE_SNAPSHOT_TYPE=7,Lt.ANY_UNORDERED_NODE_TYPE=8,Lt.FIRST_ORDERED_NODE_TYPE=9;function lp(d,R){d.createExpression=function(X,ae){try{return new ws(X,ae,R)}catch(le){throw new Gn(Gn.INVALID_EXPRESSION_ERR,le)}},d.createNSResolver=function(X){return new Pa(X)},d.evaluate=function(X,ae,le,z,ut){if(z<0||z>9)throw{code:0,toString:o(function(){return"Request type not supported"},"toString")};return d.createExpression(X,le,R).evaluate(ae,z,ut)}}o(lp,"installDOM3XPathSupport");try{var fp=!0;try{document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("XPath",null)&&(fp=!1)}catch{}fp&&lp(document,new w)}catch{}lp(r,new w),(function(){var d=new w,R=new xs,X=new Bs,ae=new Nn;function le(Xe){return{getNamespace:o(function(sr,os){var na=Xe(sr,os);return na||R.getNamespace(sr,os)},"getNamespace")}}o(le,"makeNSResolverFromFunction");function z(Xe){return le(Xe.getNamespace.bind(Xe))}o(z,"makeNSResolverFromObject");function ut(Xe){return le(function(sr){return Xe[sr]})}o(ut,"makeNSResolverFromMap");function jt(Xe){return Xe&&typeof Xe.getNamespace=="function"?z(Xe):typeof Xe=="function"?le(Xe):typeof Xe=="object"?ut(Xe):R}o(jt,"makeNSResolver");function Qt(Xe){if(Xe===null||typeof Xe>"u"||Xe instanceof Ce||Xe instanceof Me||Xe instanceof Ae||Xe instanceof Qe)return Xe;switch(typeof Xe){case"string":return new Ce(Xe);case"boolean":return new Me(Xe);case"number":return new Ae(Xe)}var sr=new Qe;return sr.addArray([].concat(Xe)),sr}o(Qt,"convertValue");function it(Xe){return function(sr){var os=Array.prototype.slice.call(arguments,1).map(function(S2){return S2.evaluate(sr)}),na=Xe.apply(this,[].concat(sr,os));return Qt(na)}}o(it,"makeEvaluator");function Pt(Xe){return{getFunction:o(function(sr,os){var na=Xe(sr,os);return na?it(na):X.getFunction(sr,os)},"getFunction")}}o(Pt,"makeFunctionResolverFromFunction");function Xn(Xe){return Pt(Xe.getFunction.bind(Xe))}o(Xn,"makeFunctionResolverFromObject");function Si(Xe){return Pt(function(sr){return Xe[sr]})}o(Si,"makeFunctionResolverFromMap");function hr(Xe){return Xe&&typeof Xe.getFunction=="function"?Xn(Xe):typeof Xe=="function"?Pt(Xe):typeof Xe=="object"?Si(Xe):X}o(hr,"makeFunctionResolver");function ka(Xe){return{getVariable:o(function(sr,os){var na=Xe(sr,os);return Qt(na)},"getVariable")}}o(ka,"makeVariableResolverFromFunction");function ag(Xe){if(Xe){if(typeof Xe.getVariable=="function")return ka(Xe.getVariable.bind(Xe));if(typeof Xe=="function")return ka(Xe);if(typeof Xe=="object")return ka(function(sr){return Xe[sr]})}return ae}o(ag,"makeVariableResolver");function Qx(Xe,sr,os){Xe in os&&(sr[Xe]=os[Xe])}o(Qx,"copyIfPresent");function y2(Xe){var sr=new Gr;return Xe?(sr.namespaceResolver=jt(Xe.namespaces),sr.functionResolver=hr(Xe.functions),sr.variableResolver=ag(Xe.variables),sr.expressionContextNode=Xe.node,Qx("allowAnyNamespaceForNoPrefix",sr,Xe),Qx("isHtml",sr,Xe)):sr.namespaceResolver=R,sr}o(y2,"makeContext");function x2(Xe,sr){var os=y2(sr);return Xe.evaluate(os)}o(x2,"evaluate");var w2={evaluate:o(function(Xe){return x2(this.expression,Xe)},"evaluate"),evaluateNumber:o(function(Xe){return this.evaluate(Xe).numberValue()},"evaluateNumber"),evaluateString:o(function(Xe){return this.evaluate(Xe).stringValue()},"evaluateString"),evaluateBoolean:o(function(Xe){return this.evaluate(Xe).booleanValue()},"evaluateBoolean"),evaluateNodeSet:o(function(Xe){return this.evaluate(Xe).nodeset()},"evaluateNodeSet"),select:o(function(Xe){return this.evaluateNodeSet(Xe).toArray()},"select"),select1:o(function(Xe){return this.select(Xe)[0]},"select1")};function E2(Xe){var sr=d.parse(Xe);return Object.create(w2,{expression:{value:sr}})}o(E2,"parse"),r.parse=E2})(),v(r,{XPath:C,XPathParser:w,XPathResult:Lt,Step:N,PathExpr:Z,NodeTest:S,LocationPath:rt,OrOperation:M,AndOperation:I,BarOperation:ne,EqualsOperation:H,NotEqualOperation:K,LessThanOperation:q,GreaterThanOperation:W,LessThanOrEqualOperation:he,GreaterThanOrEqualOperation:pe,PlusOperation:ue,MinusOperation:Y,MultiplyOperation:ve,DivOperation:Oe,ModOperation:Je,UnaryMinusOperation:T,FunctionCall:P,VariableReference:G,XPathContext:Gr,XNodeSet:Qe,XBoolean:Me,XString:Ce,XNumber:Ae,NamespaceResolver:xs,FunctionResolver:Bs,VariableResolver:Nn,Utilities:st}),r.select=function(d,R,X){return r.selectWithResolver(d,R,null,X)},r.useNamespaces=function(d){var R={mappings:d||{},lookupNamespaceURI:o(function(X){return this.mappings[X]},"lookupNamespaceURI")};return function(X,ae,le){return r.selectWithResolver(X,ae,R,le)}},r.selectWithResolver=function(d,R,X,ae){var le=new ws(d,X,new w),z=Lt.ANY_TYPE,ut=le.evaluate(R,z,null);return ut.resultType==Lt.STRING_TYPE?ut=ut.stringValue:ut.resultType==Lt.NUMBER_TYPE?ut=ut.numberValue:ut.resultType==Lt.BOOLEAN_TYPE?ut=ut.booleanValue:(ut=ut.nodes,ae&&(ut=ut[0])),ut},r.select1=function(d,R){return r.select(d,R,!0)};var Vl=o(function(d){return d&&typeof d.nodeType=="number"&&Number.isInteger(d.nodeType)&&d.nodeType>=1&&d.nodeType<=11&&typeof d.nodeName=="string"},"isNodeLike"),ig=o(function(d){return Array.isArray(d)&&d.every(Vl)},"isArrayOfNodes"),ni=o(function(d){return function(R){return Vl(R)&&R.nodeType===d}},"isNodeOfType");v(r,{isNodeLike:Vl,isArrayOfNodes:ig,isElement:ni(E.ELEMENT_NODE),isAttribute:ni(E.ATTRIBUTE_NODE),isTextNode:ni(E.TEXT_NODE),isCDATASection:ni(E.CDATA_SECTION_NODE),isProcessingInstruction:ni(E.PROCESSING_INSTRUCTION_NODE),isComment:ni(E.COMMENT_NODE),isDocumentNode:ni(E.DOCUMENT_NODE),isDocumentTypeNode:ni(E.DOCUMENT_TYPE_NODE),isDocumentFragment:ni(E.DOCUMENT_FRAGMENT_NODE)})})(Rue)});var ud=te(Rt=>{"use strict";Object.defineProperty(Rt,"__esModule",{value:!0});Rt.assertIsDocumentFragmentNode=Rt.assertIsDocumentTypeNode=Rt.assertIsDocumentNode=Rt.assertIsCommentNode=Rt.assertIsProcessingInstructionNode=Rt.assertIsCDATASectionNode=Rt.assertIsTextNode=Rt.assertIsAttributeNode=Rt.assertIsElementNode=Rt.isDocumentFragmentNode=Rt.isDocumentTypeNode=Rt.isDocumentNode=Rt.isCommentNode=Rt.isProcessingInstructionNode=Rt.isCDATASectionNode=Rt.isTextNode=Rt.isAttributeNode=Rt.isElementNode=Rt.assertIsArrayOfNodes=Rt.isArrayOfNodes=Rt.assertIsNodeLike=Rt.isNodeLike=Rt.NodeTypes=void 0;var ln;(function(r){r[r.ELEMENT_NODE=1]="ELEMENT_NODE",r[r.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",r[r.TEXT_NODE=3]="TEXT_NODE",r[r.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",r[r.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",r[r.COMMENT_NODE=8]="COMMENT_NODE",r[r.DOCUMENT_NODE=9]="DOCUMENT_NODE",r[r.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",r[r.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE"})(ln||(Rt.NodeTypes=ln={}));function fS(r){return r&&typeof r=="object"&&Number.isInteger(r.nodeType)&&r.nodeType>=1&&r.nodeType<=11&&typeof r.nodeName=="string"&&typeof r.appendChild=="function"&&typeof r.removeChild=="function"}o(fS,"isNodeLike");Rt.isNodeLike=fS;function Oue(r){if(!fS(r))throw new Error(`Value is not a Node-like object. Received: ${r}`)}o(Oue,"assertIsNodeLike");Rt.assertIsNodeLike=Oue;function l6(r){return Array.isArray(r)&&r.every(fS)}o(l6,"isArrayOfNodes");Rt.isArrayOfNodes=l6;function Pue(r){if(!l6(r))throw new Error("Value is not an array of Nodes")}o(Pue,"assertIsArrayOfNodes");Rt.assertIsArrayOfNodes=Pue;function ao(r,e){return fS(e)&&e.nodeType===r}o(ao,"isNodeOfType");function Ko(r,e){let t=Object.keys(ln).find(n=>ln[n]===r);if(!ao(r,e))throw new Error(`Value is not of type ${t}`)}o(Ko,"assertIsNodeOfType");var kue=o(r=>ao(ln.ELEMENT_NODE,r),"isElementNode");Rt.isElementNode=kue;var Lue=o(r=>ao(ln.ATTRIBUTE_NODE,r),"isAttributeNode");Rt.isAttributeNode=Lue;var Vue=o(r=>ao(ln.TEXT_NODE,r),"isTextNode");Rt.isTextNode=Vue;var Uue=o(r=>ao(ln.CDATA_SECTION_NODE,r),"isCDATASectionNode");Rt.isCDATASectionNode=Uue;var jue=o(r=>ao(ln.PROCESSING_INSTRUCTION_NODE,r),"isProcessingInstructionNode");Rt.isProcessingInstructionNode=jue;var Fue=o(r=>ao(ln.COMMENT_NODE,r),"isCommentNode");Rt.isCommentNode=Fue;var Mue=o(r=>ao(ln.DOCUMENT_NODE,r),"isDocumentNode");Rt.isDocumentNode=Mue;var que=o(r=>ao(ln.DOCUMENT_TYPE_NODE,r),"isDocumentTypeNode");Rt.isDocumentTypeNode=que;var Hue=o(r=>ao(ln.DOCUMENT_FRAGMENT_NODE,r),"isDocumentFragmentNode");Rt.isDocumentFragmentNode=Hue;var Kue=o(r=>{Ko(ln.ELEMENT_NODE,r)},"assertIsElementNode");Rt.assertIsElementNode=Kue;var $ue=o(r=>Ko(ln.ATTRIBUTE_NODE,r),"assertIsAttributeNode");Rt.assertIsAttributeNode=$ue;var Gue=o(r=>Ko(ln.TEXT_NODE,r),"assertIsTextNode");Rt.assertIsTextNode=Gue;var Xue=o(r=>Ko(ln.CDATA_SECTION_NODE,r),"assertIsCDATASectionNode");Rt.assertIsCDATASectionNode=Xue;var Wue=o(r=>Ko(ln.PROCESSING_INSTRUCTION_NODE,r),"assertIsProcessingInstructionNode");Rt.assertIsProcessingInstructionNode=Wue;var zue=o(r=>Ko(ln.COMMENT_NODE,r),"assertIsCommentNode");Rt.assertIsCommentNode=zue;var Jue=o(r=>Ko(ln.DOCUMENT_NODE,r),"assertIsDocumentNode");Rt.assertIsDocumentNode=Jue;var Yue=o(r=>Ko(ln.DOCUMENT_TYPE_NODE,r),"assertIsDocumentTypeNode");Rt.assertIsDocumentTypeNode=Yue;var Que=o(r=>Ko(ln.DOCUMENT_FRAGMENT_NODE,r),"assertIsDocumentFragmentNode");Rt.assertIsDocumentFragmentNode=Que});var iv=te(mr=>{"use strict";Object.defineProperty(mr,"__esModule",{value:!0});mr.validateDigestValue=mr.findAncestorNs=mr.derToPem=mr.pemToDer=mr.normalizePem=mr.BASE64_REGEX=mr.EXTRACT_X509_CERTS=mr.PEM_FORMAT_REGEX=mr.encodeSpecialCharactersInText=mr.encodeSpecialCharactersInAttribute=mr.findChilds=mr.findChildren=mr.findAttr=mr.isArrayHasLength=void 0;var Zue=lS(),S_=ud();function f6(r){return Array.isArray(r)&&r.length>0}o(f6,"isArrayHasLength");mr.isArrayHasLength=f6;function ece(r,e,t){return r.localName===e&&(r.namespaceURI===t||t==null)}o(ece,"attrEqualsExplicitly");function tce(r,e,t,n){return r.localName===e&&(!r.namespaceURI&&n?.namespaceURI===t||t==null)}o(tce,"attrEqualsImplicitly");function rce(r,e,t){for(let n=0;n<r.attributes.length;n++){let s=r.attributes[n];if(ece(s,e,t)||tce(s,e,t,r))return s}return null}o(rce,"findAttr");mr.findAttr=rce;function h6(r,e,t){let n=r.documentElement??r,s=[];for(let i=0;i<n.childNodes.length;i++){let a=n.childNodes[i];S_.isElementNode(a)&&a.localName===e&&(a.namespaceURI===t||t==null)&&s.push(a)}return s}o(h6,"findChildren");mr.findChildren=h6;function nce(r,e,t){return h6(r,e,t)}o(nce,"findChilds");mr.findChilds=nce;var sce={"&":"&","<":"<",'"':""","\r":"
","\n":"
"," ":"	"},ice={"&":"&","<":"<",">":">","\r":"
"};function ace(r){return r.replace(/([&<"\r\n\t])/g,function(e,t){return sce[t]})}o(ace,"encodeSpecialCharactersInAttribute");mr.encodeSpecialCharactersInAttribute=ace;function oce(r){return r.replace(/([&<>\r])/g,function(e,t){return ice[t]})}o(oce,"encodeSpecialCharactersInText");mr.encodeSpecialCharactersInText=oce;mr.PEM_FORMAT_REGEX=new RegExp("^-----BEGIN [A-Z ]{1,48}-----([^-]*)-----END [A-Z ]{1,48}-----$","s");mr.EXTRACT_X509_CERTS=new RegExp("-----BEGIN CERTIFICATE-----[^-]*-----END CERTIFICATE-----","g");mr.BASE64_REGEX=new RegExp("^(?:[A-Za-z0-9\\+\\/]{4}\\n{0,1})*(?:[A-Za-z0-9\\+\\/]{2}==|[A-Za-z0-9\\+\\/]{3}=)?$","s");function E_(r){return`${(r.trim().replace(/(\r\n|\r)/g,`
|
|
61
|
-
`).match(/.{1,64}/g)??[]).join(`
|
|
62
|
-
`)}
|
|
63
|
-
`}o(E_,"normalizePem");mr.normalizePem=E_;function uce(r){if(!mr.PEM_FORMAT_REGEX.test(r.trim()))throw new Error("Invalid PEM format.");return Buffer.from(r.replace(/(\r\n|\r)/g,"").replace(/-----BEGIN [A-Z\x20]{1,48}-----\n?/,"").replace(/-----END [A-Z\x20]{1,48}-----\n?/,""),"base64")}o(uce,"pemToDer");mr.pemToDer=uce;function cce(r,e){let t=Buffer.isBuffer(r)?r.toString("base64").trim():r.replace(/(\r\n|\r)/g,"").trim();if(mr.PEM_FORMAT_REGEX.test(t))return E_(t);if(mr.BASE64_REGEX.test(t.replace(/ /g,""))){if(e==null)throw new Error("PEM label is required when DER is given.");let n=`-----BEGIN ${e}-----
|
|
64
|
-
${t.replace(/ /g,"")}
|
|
65
|
-
-----END ${e}-----`;return E_(n)}throw new Error("Unknown DER format.")}o(cce,"derToPem");mr.derToPem=cce;function p6(r,e=[]){if(!S_.isElementNode(r.parentNode))return e;let t=r.parentNode;if(!t)return e;if(t.attributes&&t.attributes.length>0)for(let n=0;n<t.attributes.length;n++){let s=t.attributes[n];s&&s.nodeName&&s.nodeName.search(/^xmlns:?/)!==-1&&e.push({prefix:s.nodeName.replace(/^xmlns:?/,""),namespaceURI:s.nodeValue||""})}return p6(t,e)}o(p6,"collectAncestorNamespaces");function lce(r){let e=r.attributes;for(let t=0;t<e.length;t++){let n=e[t].nodeName;if(n.search(/^xmlns:?/)!==-1)return n.replace(/^xmlns:?/,"")}return r.prefix||""}o(lce,"findNSPrefix");function fce(r){return r.every(e=>S_.isElementNode(e))}o(fce,"isElementSubset");function hce(r,e,t){if(e==null)return[];let n=Zue.selectWithResolver(e,r,t);if(!f6(n))return[];if(!fce(n))throw new Error("Document subset must be list of elements");let s=p6(n[0]),i=[];for(let c=0;c<s.length;c++){let l=!0;for(let h in i)if(i[h].prefix===s[c].prefix){l=!1;break}l&&i.push(s[c])}let a=[],u=lce(n[0]);for(let c of i)c.prefix!==u&&a.push(c);return a}o(hce,"findAncestorNs");mr.findAncestorNs=hce;function pce(r,e){let t=Buffer.from(r,"base64"),n=Buffer.from(e,"base64");if(typeof t.equals=="function")return t.equals(n);if(t.length!==n.length)return!1;for(let s=0;s<t.length;s++)if(t[s]!==n[s])return!1;return!0}o(pce,"validateDigestValue");mr.validateDigestValue=pce});var A_=te(cd=>{"use strict";Object.defineProperty(cd,"__esModule",{value:!0});cd.C14nCanonicalizationWithComments=cd.C14nCanonicalization=void 0;var hS=iv(),b_=ud(),d6=class{static{o(this,"C14nCanonicalization")}constructor(){this.includeComments=!1,this.includeComments=!1}attrCompare(e,t){if(!e.namespaceURI&&t.namespaceURI)return-1;if(!t.namespaceURI&&e.namespaceURI)return 1;let n=e.namespaceURI+e.localName,s=t.namespaceURI+t.localName;return n===s?0:n<s?-1:1}nsCompare(e,t){let n=e.prefix,s=t.prefix;return n===s?0:n.localeCompare(s)}renderAttrs(e){let t,n,s=[];if(b_.isCommentNode(e))return this.renderComment(e);if(e.attributes)for(t=0;t<e.attributes.length;++t)n=e.attributes[t],n.name.indexOf("xmlns")!==0&&s.push(n);return s.sort(this.attrCompare),s.map(a=>` ${a.name}="${hS.encodeSpecialCharactersInAttribute(a.value)}"`).join("")}renderNs(e,t,n,s,i){let a,u,c=[],l=n,h=[],m=e.namespaceURI||"";if(e.prefix?t.indexOf(e.prefix)===-1&&(h.push({prefix:e.prefix,namespaceURI:e.namespaceURI||s[e.prefix]}),t.push(e.prefix)):n!==m&&(l=e.namespaceURI||"",c.push(' xmlns="',l,'"')),e.attributes)for(a=0;a<e.attributes.length;++a)u=e.attributes[a],u.prefix==="xmlns"&&t.indexOf(u.localName)===-1&&(h.push({prefix:u.localName,namespaceURI:u.value}),t.push(u.localName)),u.prefix&&t.indexOf(u.prefix)===-1&&u.prefix!=="xmlns"&&u.prefix!=="xml"&&(h.push({prefix:u.prefix,namespaceURI:u.namespaceURI}),t.push(u.prefix));if(hS.isArrayHasLength(i))for(let g of i){let y=!1;for(let v of h)v.prefix===g.prefix&&v.namespaceURI===g.namespaceURI&&(y=!0);y||h.push(g)}return h.sort(this.nsCompare),c.push(...h.map(g=>g.prefix?` xmlns:${g.prefix}="${g.namespaceURI}"`:` xmlns="${g.namespaceURI}"`)),{rendered:c.join(""),newDefaultNs:l}}processInner(e,t,n,s,i){if(b_.isCommentNode(e))return this.renderComment(e);if(e.data)return hS.encodeSpecialCharactersInText(e.data);if(b_.isElementNode(e)){let a,u,c=this.renderNs(e,t,n,s,i),l=["<",e.tagName,c.rendered,this.renderAttrs(e),">"];for(a=0;a<e.childNodes.length;++a)u=t.slice(0),l.push(this.processInner(e.childNodes[a],u,c.newDefaultNs,s,[]));return l.push("</",e.tagName,">"),l.join("")}throw new Error(`Unable to canonicalize node type: ${e.nodeType}`)}renderComment(e){if(!this.includeComments)return"";let t=e.ownerDocument===e.parentNode,n=!1,s=!1;if(t){let c=e,l=e;for(;c!==null;){if(c===e.ownerDocument.documentElement){n=!0;break}c=c.nextSibling}for(;l!==null;){if(l===e.ownerDocument.documentElement){s=!0;break}l=l.previousSibling}}let i=s?`
|
|
66
|
-
`:"",a=n?`
|
|
67
|
-
`:"",u=hS.encodeSpecialCharactersInText(e.data);return`${i}<!--${u}-->${a}`}process(e,t){t=t||{};let n=t.defaultNs||"",s=t.defaultNsForPrefix||{},i=t.ancestorNamespaces||[],a=[];for(let c=0;c<i.length;c++)a.push(i[c].prefix);return this.processInner(e,a,n,s,i)}getAlgorithmName(){return"http://www.w3.org/TR/2001/REC-xml-c14n-20010315"}};cd.C14nCanonicalization=d6;var dce=class extends d6{static{o(this,"C14nCanonicalizationWithComments")}constructor(){super(),this.includeComments=!0}getAlgorithmName(){return"http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments"}};cd.C14nCanonicalizationWithComments=dce});var T_=te(ld=>{"use strict";Object.defineProperty(ld,"__esModule",{value:!0});ld.ExclusiveCanonicalizationWithComments=ld.ExclusiveCanonicalization=void 0;var pf=iv(),C_=ud();function N_(r,e,t){let n=!1;return r.forEach(function(s){s.prefix===e&&s.namespaceURI===t&&(n=!0)}),n}o(N_,"isPrefixInScope");var m6=class{static{o(this,"ExclusiveCanonicalization")}constructor(){this.includeComments=!1,this.includeComments=!1}attrCompare(e,t){if(!e.namespaceURI&&t.namespaceURI)return-1;if(!t.namespaceURI&&e.namespaceURI)return 1;let n=e.namespaceURI+e.localName,s=t.namespaceURI+t.localName;return n===s?0:n<s?-1:1}nsCompare(e,t){let n=e.prefix,s=t.prefix;return n===s?0:n.localeCompare(s)}renderAttrs(e){let t,n,s=[],i=[];if(C_.isCommentNode(e))return this.renderComment(e);if(e.attributes)for(t=0;t<e.attributes.length;++t)n=e.attributes[t],n.name.indexOf("xmlns")!==0&&i.push(n);i.sort(this.attrCompare);for(n of i)s.push(" ",n.name,'="',pf.encodeSpecialCharactersInAttribute(n.value),'"');return s.join("")}renderNs(e,t,n,s,i){let a,u,c=[],l=n,h=[],m=e.namespaceURI||"";if(e.prefix?N_(t,e.prefix,e.namespaceURI||s[e.prefix])||(h.push({prefix:e.prefix,namespaceURI:e.namespaceURI||s[e.prefix]}),t.push({prefix:e.prefix,namespaceURI:e.namespaceURI||s[e.prefix]})):n!==m&&(l=e.namespaceURI,c.push(' xmlns="',l,'"')),e.attributes)for(a=0;a<e.attributes.length;++a)u=e.attributes[a],u.prefix&&!N_(t,u.localName,u.value)&&i.indexOf(u.localName)>=0&&(h.push({prefix:u.localName,namespaceURI:u.value}),t.push({prefix:u.localName,namespaceURI:u.value})),u.prefix&&!N_(t,u.prefix,u.namespaceURI)&&u.prefix!=="xmlns"&&u.prefix!=="xml"&&(h.push({prefix:u.prefix,namespaceURI:u.namespaceURI}),t.push({prefix:u.prefix,namespaceURI:u.namespaceURI}));h.sort(this.nsCompare);for(let g of h)c.push(" xmlns:",g.prefix,'="',g.namespaceURI,'"');return{rendered:c.join(""),newDefaultNs:l}}processInner(e,t,n,s,i){if(C_.isCommentNode(e))return this.renderComment(e);if(e.data)return pf.encodeSpecialCharactersInText(e.data);if(C_.isElementNode(e)){let a,u,c=this.renderNs(e,t,n,s,i),l=["<",e.tagName,c.rendered,this.renderAttrs(e),">"];for(a=0;a<e.childNodes.length;++a)u=t.slice(0),l.push(this.processInner(e.childNodes[a],u,c.newDefaultNs,s,i));return l.push("</",e.tagName,">"),l.join("")}throw new Error(`Unable to exclusive canonicalize node type: ${e.nodeType}`)}renderComment(e){if(!this.includeComments)return"";let t=e.ownerDocument===e.parentNode,n=!1,s=!1;if(t){let c=e,l=e;for(;c!=null;){if(c===e.ownerDocument.documentElement){n=!0;break}c=c.nextSibling}for(;l!=null;){if(l===e.ownerDocument.documentElement){s=!0;break}l=l.previousSibling}}let i=s?`
|
|
68
|
-
`:"",a=n?`
|
|
69
|
-
`:"",u=pf.encodeSpecialCharactersInText(e.data);return`${i}<!--${u}-->${a}`}process(e,t){t=t||{};let n=t.inclusiveNamespacesPrefixList||[],s=t.defaultNs||"",i=t.defaultNsForPrefix||{},a=t.ancestorNamespaces||[];if(!pf.isArrayHasLength(n)){let c=pf.findChildren(e,"CanonicalizationMethod");if(c.length!==0){let l=pf.findChildren(c[0],"InclusiveNamespaces");l.length!==0&&(n=(l[0].getAttribute("PrefixList")||"").split(" "))}}return pf.isArrayHasLength(n)&&n.forEach(function(c){a&&a.forEach(function(l){c===l.prefix&&e.setAttributeNS("http://www.w3.org/2000/xmlns/",`xmlns:${c}`,l.namespaceURI)})}),this.processInner(e,[],s,i,n)}getAlgorithmName(){return"http://www.w3.org/2001/10/xml-exc-c14n#"}};ld.ExclusiveCanonicalization=m6;var mce=class extends m6{static{o(this,"ExclusiveCanonicalizationWithComments")}constructor(){super(),this.includeComments=!0}getAlgorithmName(){return"http://www.w3.org/2001/10/xml-exc-c14n#WithComments"}};ld.ExclusiveCanonicalizationWithComments=mce});var av=te(fd=>{"use strict";function gce(r,e,t){if(t===void 0&&(t=Array.prototype),r&&typeof t.find=="function")return t.find.call(r,e);for(var n=0;n<r.length;n++)if(Object.prototype.hasOwnProperty.call(r,n)){var s=r[n];if(e.call(void 0,s,n,r))return s}}o(gce,"find");function I_(r,e){return e===void 0&&(e=Object),e&&typeof e.freeze=="function"?e.freeze(r):r}o(I_,"freeze");function vce(r,e){if(r===null||typeof r!="object")throw new TypeError("target is not an object");for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=e[t]);return r}o(vce,"assign");var g6=I_({HTML:"text/html",isHTML:o(function(r){return r===g6.HTML},"isHTML"),XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),v6=I_({HTML:"http://www.w3.org/1999/xhtml",isHTML:o(function(r){return r===v6.HTML},"isHTML"),SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});fd.assign=vce;fd.find=gce;fd.freeze=I_;fd.MIME_TYPE=g6;fd.NAMESPACE=v6});var j_=te(pc=>{"use strict";var C6=av(),oo=C6.find,ov=C6.NAMESPACE;function yce(r){return r!==""}o(yce,"notEmptyString");function xce(r){return r?r.split(/[\t\n\f\r ]+/).filter(yce):[]}o(xce,"splitOnASCIIWhitespace");function wce(r,e){return r.hasOwnProperty(e)||(r[e]=!0),r}o(wce,"orderedSetReducer");function y6(r){if(!r)return[];var e=xce(r);return Object.keys(e.reduce(wce,{}))}o(y6,"toOrderedSet");function Ece(r){return function(e){return r&&r.indexOf(e)!==-1}}o(Ece,"arrayIncludes");function lv(r,e){for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t])}o(lv,"copy");function $s(r,e){var t=r.prototype;if(!(t instanceof e)){let s=function(){};var n=s;o(s,"t"),s.prototype=e.prototype,s=new s,lv(t,s),r.prototype=t=s}t.constructor!=r&&(typeof r!="function"&&console.error("unknown Class:"+r),t.constructor=r)}o($s,"_extends");var Gs={},Hi=Gs.ELEMENT_NODE=1,pd=Gs.ATTRIBUTE_NODE=2,pS=Gs.TEXT_NODE=3,N6=Gs.CDATA_SECTION_NODE=4,T6=Gs.ENTITY_REFERENCE_NODE=5,Sce=Gs.ENTITY_NODE=6,I6=Gs.PROCESSING_INSTRUCTION_NODE=7,_6=Gs.COMMENT_NODE=8,D6=Gs.DOCUMENT_NODE=9,B6=Gs.DOCUMENT_TYPE_NODE=10,Go=Gs.DOCUMENT_FRAGMENT_NODE=11,bce=Gs.NOTATION_NODE=12,hs={},qn={},IEe=hs.INDEX_SIZE_ERR=(qn[1]="Index size error",1),_Ee=hs.DOMSTRING_SIZE_ERR=(qn[2]="DOMString size error",2),Ks=hs.HIERARCHY_REQUEST_ERR=(qn[3]="Hierarchy request error",3),DEe=hs.WRONG_DOCUMENT_ERR=(qn[4]="Wrong document",4),BEe=hs.INVALID_CHARACTER_ERR=(qn[5]="Invalid character",5),REe=hs.NO_DATA_ALLOWED_ERR=(qn[6]="No data allowed",6),OEe=hs.NO_MODIFICATION_ALLOWED_ERR=(qn[7]="No modification allowed",7),R6=hs.NOT_FOUND_ERR=(qn[8]="Not found",8),PEe=hs.NOT_SUPPORTED_ERR=(qn[9]="Not supported",9),x6=hs.INUSE_ATTRIBUTE_ERR=(qn[10]="Attribute in use",10),kEe=hs.INVALID_STATE_ERR=(qn[11]="Invalid state",11),LEe=hs.SYNTAX_ERR=(qn[12]="Syntax error",12),VEe=hs.INVALID_MODIFICATION_ERR=(qn[13]="Invalid modification",13),UEe=hs.NAMESPACE_ERR=(qn[14]="Invalid namespace",14),jEe=hs.INVALID_ACCESS_ERR=(qn[15]="Invalid access",15);function gn(r,e){if(e instanceof Error)var t=e;else t=this,Error.call(this,qn[r]),this.message=qn[r],Error.captureStackTrace&&Error.captureStackTrace(this,gn);return t.code=r,e&&(this.message=this.message+": "+e),t}o(gn,"DOMException");gn.prototype=Error.prototype;lv(hs,gn);function $o(){}o($o,"NodeList");$o.prototype={length:0,item:o(function(r){return r>=0&&r<this.length?this[r]:null},"item"),toString:o(function(r,e){for(var t=[],n=0;n<this.length;n++)hd(this[n],t,r,e);return t.join("")},"toString"),filter:o(function(r){return Array.prototype.filter.call(this,r)},"filter"),indexOf:o(function(r){return Array.prototype.indexOf.call(this,r)},"indexOf")};function dd(r,e){this._node=r,this._refresh=e,B_(this)}o(dd,"LiveNodeList");function B_(r){var e=r._node._inc||r._node.ownerDocument._inc;if(r._inc!==e){var t=r._refresh(r._node);if(K6(r,"length",t.length),!r.$$length||t.length<r.$$length)for(var n=t.length;n in r;n++)Object.prototype.hasOwnProperty.call(r,n)&&delete r[n];lv(t,r),r._inc=e}}o(B_,"_updateLiveList");dd.prototype.item=function(r){return B_(this),this[r]||null};$s(dd,$o);function dS(){}o(dS,"NamedNodeMap");function O6(r,e){for(var t=r.length;t--;)if(r[t]===e)return t}o(O6,"_findNodeIndex");function w6(r,e,t,n){if(n?e[O6(e,n)]=t:e[e.length++]=t,r){t.ownerElement=r;var s=r.ownerDocument;s&&(n&&L6(s,r,n),Ace(s,r,t))}}o(w6,"_addNamedNode");function E6(r,e,t){var n=O6(e,t);if(n>=0){for(var s=e.length-1;n<s;)e[n]=e[++n];if(e.length=s,r){var i=r.ownerDocument;i&&(L6(i,r,t),t.ownerElement=null)}}else throw new gn(R6,new Error(r.tagName+"@"+t))}o(E6,"_removeNamedNode");dS.prototype={length:0,item:$o.prototype.item,getNamedItem:o(function(r){for(var e=this.length;e--;){var t=this[e];if(t.nodeName==r)return t}},"getNamedItem"),setNamedItem:o(function(r){var e=r.ownerElement;if(e&&e!=this._ownerElement)throw new gn(x6);var t=this.getNamedItem(r.nodeName);return w6(this._ownerElement,this,r,t),t},"setNamedItem"),setNamedItemNS:o(function(r){var e=r.ownerElement,t;if(e&&e!=this._ownerElement)throw new gn(x6);return t=this.getNamedItemNS(r.namespaceURI,r.localName),w6(this._ownerElement,this,r,t),t},"setNamedItemNS"),removeNamedItem:o(function(r){var e=this.getNamedItem(r);return E6(this._ownerElement,this,e),e},"removeNamedItem"),removeNamedItemNS:o(function(r,e){var t=this.getNamedItemNS(r,e);return E6(this._ownerElement,this,t),t},"removeNamedItemNS"),getNamedItemNS:o(function(r,e){for(var t=this.length;t--;){var n=this[t];if(n.localName==e&&n.namespaceURI==r)return n}return null},"getNamedItemNS")};function P6(){}o(P6,"DOMImplementation");P6.prototype={hasFeature:o(function(r,e){return!0},"hasFeature"),createDocument:o(function(r,e,t){var n=new fv;if(n.implementation=this,n.childNodes=new $o,n.doctype=t||null,t&&n.appendChild(t),e){var s=n.createElementNS(r,e);n.appendChild(s)}return n},"createDocument"),createDocumentType:o(function(r,e,t){var n=new vS;return n.name=r,n.nodeName=r,n.publicId=e||"",n.systemId=t||"",n},"createDocumentType")};function Tr(){}o(Tr,"Node");Tr.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:o(function(r,e){return mS(this,r,e)},"insertBefore"),replaceChild:o(function(r,e){mS(this,r,e,U6),e&&this.removeChild(e)},"replaceChild"),removeChild:o(function(r){return V6(this,r)},"removeChild"),appendChild:o(function(r){return this.insertBefore(r,null)},"appendChild"),hasChildNodes:o(function(){return this.firstChild!=null},"hasChildNodes"),cloneNode:o(function(r){return D_(this.ownerDocument||this,this,r)},"cloneNode"),normalize:o(function(){for(var r=this.firstChild;r;){var e=r.nextSibling;e&&e.nodeType==pS&&r.nodeType==pS?(this.removeChild(e),r.appendData(e.data)):(r.normalize(),r=e)}},"normalize"),isSupported:o(function(r,e){return this.ownerDocument.implementation.hasFeature(r,e)},"isSupported"),hasAttributes:o(function(){return this.attributes.length>0},"hasAttributes"),lookupPrefix:o(function(r){for(var e=this;e;){var t=e._nsMap;if(t){for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&t[n]===r)return n}e=e.nodeType==pd?e.ownerDocument:e.parentNode}return null},"lookupPrefix"),lookupNamespaceURI:o(function(r){for(var e=this;e;){var t=e._nsMap;if(t&&Object.prototype.hasOwnProperty.call(t,r))return t[r];e=e.nodeType==pd?e.ownerDocument:e.parentNode}return null},"lookupNamespaceURI"),isDefaultNamespace:o(function(r){var e=this.lookupPrefix(r);return e==null},"isDefaultNamespace")};function k6(r){return r=="<"&&"<"||r==">"&&">"||r=="&"&&"&"||r=='"'&&"""||"&#"+r.charCodeAt()+";"}o(k6,"_xmlEncoder");lv(Gs,Tr);lv(Gs,Tr.prototype);function uv(r,e){if(e(r))return!0;if(r=r.firstChild)do if(uv(r,e))return!0;while(r=r.nextSibling)}o(uv,"_visitNode");function fv(){this.ownerDocument=this}o(fv,"Document");function Ace(r,e,t){r&&r._inc++;var n=t.namespaceURI;n===ov.XMLNS&&(e._nsMap[t.prefix?t.localName:""]=t.value)}o(Ace,"_onAddAttribute");function L6(r,e,t,n){r&&r._inc++;var s=t.namespaceURI;s===ov.XMLNS&&delete e._nsMap[t.prefix?t.localName:""]}o(L6,"_onRemoveAttribute");function R_(r,e,t){if(r&&r._inc){r._inc++;var n=e.childNodes;if(t)n[n.length++]=t;else{for(var s=e.firstChild,i=0;s;)n[i++]=s,s=s.nextSibling;n.length=i,delete n[n.length]}}}o(R_,"_onUpdateChild");function V6(r,e){var t=e.previousSibling,n=e.nextSibling;return t?t.nextSibling=n:r.firstChild=n,n?n.previousSibling=t:r.lastChild=t,e.parentNode=null,e.previousSibling=null,e.nextSibling=null,R_(r.ownerDocument,r),e}o(V6,"_removeChild");function Cce(r){return r&&(r.nodeType===Tr.DOCUMENT_NODE||r.nodeType===Tr.DOCUMENT_FRAGMENT_NODE||r.nodeType===Tr.ELEMENT_NODE)}o(Cce,"hasValidParentNodeType");function Nce(r){return r&&(uo(r)||O_(r)||Xo(r)||r.nodeType===Tr.DOCUMENT_FRAGMENT_NODE||r.nodeType===Tr.COMMENT_NODE||r.nodeType===Tr.PROCESSING_INSTRUCTION_NODE)}o(Nce,"hasInsertableNodeType");function Xo(r){return r&&r.nodeType===Tr.DOCUMENT_TYPE_NODE}o(Xo,"isDocTypeNode");function uo(r){return r&&r.nodeType===Tr.ELEMENT_NODE}o(uo,"isElementNode");function O_(r){return r&&r.nodeType===Tr.TEXT_NODE}o(O_,"isTextNode");function S6(r,e){var t=r.childNodes||[];if(oo(t,uo)||Xo(e))return!1;var n=oo(t,Xo);return!(e&&n&&t.indexOf(n)>t.indexOf(e))}o(S6,"isElementInsertionPossible");function b6(r,e){var t=r.childNodes||[];function n(i){return uo(i)&&i!==e}if(o(n,"hasElementChildThatIsNotChild"),oo(t,n))return!1;var s=oo(t,Xo);return!(e&&s&&t.indexOf(s)>t.indexOf(e))}o(b6,"isElementReplacementPossible");function Tce(r,e,t){if(!Cce(r))throw new gn(Ks,"Unexpected parent node type "+r.nodeType);if(t&&t.parentNode!==r)throw new gn(R6,"child not in parent");if(!Nce(e)||Xo(e)&&r.nodeType!==Tr.DOCUMENT_NODE)throw new gn(Ks,"Unexpected node type "+e.nodeType+" for parent node type "+r.nodeType)}o(Tce,"assertPreInsertionValidity1to5");function Ice(r,e,t){var n=r.childNodes||[],s=e.childNodes||[];if(e.nodeType===Tr.DOCUMENT_FRAGMENT_NODE){var i=s.filter(uo);if(i.length>1||oo(s,O_))throw new gn(Ks,"More than one element or text in fragment");if(i.length===1&&!S6(r,t))throw new gn(Ks,"Element in fragment can not be inserted before doctype")}if(uo(e)&&!S6(r,t))throw new gn(Ks,"Only one element can be added and only after doctype");if(Xo(e)){if(oo(n,Xo))throw new gn(Ks,"Only one doctype is allowed");var a=oo(n,uo);if(t&&n.indexOf(a)<n.indexOf(t))throw new gn(Ks,"Doctype can only be inserted before an element");if(!t&&a)throw new gn(Ks,"Doctype can not be appended since element is present")}}o(Ice,"assertPreInsertionValidityInDocument");function U6(r,e,t){var n=r.childNodes||[],s=e.childNodes||[];if(e.nodeType===Tr.DOCUMENT_FRAGMENT_NODE){var i=s.filter(uo);if(i.length>1||oo(s,O_))throw new gn(Ks,"More than one element or text in fragment");if(i.length===1&&!b6(r,t))throw new gn(Ks,"Element in fragment can not be inserted before doctype")}if(uo(e)&&!b6(r,t))throw new gn(Ks,"Only one element can be added and only after doctype");if(Xo(e)){let c=function(l){return Xo(l)&&l!==t};var u=c;if(o(c,"hasDoctypeChildThatIsNotChild"),oo(n,c))throw new gn(Ks,"Only one doctype is allowed");var a=oo(n,uo);if(t&&n.indexOf(a)<n.indexOf(t))throw new gn(Ks,"Doctype can only be inserted before an element")}}o(U6,"assertPreReplacementValidityInDocument");function mS(r,e,t,n){Tce(r,e,t),r.nodeType===Tr.DOCUMENT_NODE&&(n||Ice)(r,e,t);var s=e.parentNode;if(s&&s.removeChild(e),e.nodeType===Go){var i=e.firstChild;if(i==null)return e;var a=e.lastChild}else i=a=e;var u=t?t.previousSibling:r.lastChild;i.previousSibling=u,a.nextSibling=t,u?u.nextSibling=i:r.firstChild=i,t==null?r.lastChild=a:t.previousSibling=a;do{i.parentNode=r;var c=r.ownerDocument||r;cv(i,c)}while(i!==a&&(i=i.nextSibling));return R_(r.ownerDocument||r,r),e.nodeType==Go&&(e.firstChild=e.lastChild=null),e}o(mS,"_insertBefore");function cv(r,e){if(r.ownerDocument!==e){if(r.ownerDocument=e,r.nodeType===Hi&&r.attributes)for(var t=0;t<r.attributes.length;t++){var n=r.attributes.item(t);n&&(n.ownerDocument=e)}for(var s=r.firstChild;s;)cv(s,e),s=s.nextSibling}}o(cv,"_updateOwnerDocument");function _ce(r,e){e.parentNode&&e.parentNode.removeChild(e),e.parentNode=r,e.previousSibling=r.lastChild,e.nextSibling=null,e.previousSibling?e.previousSibling.nextSibling=e:r.firstChild=e,r.lastChild=e,R_(r.ownerDocument,r,e);var t=r.ownerDocument||r;return cv(e,t),e}o(_ce,"_appendSingleChild");fv.prototype={nodeName:"#document",nodeType:D6,doctype:null,documentElement:null,_inc:1,insertBefore:o(function(r,e){if(r.nodeType==Go){for(var t=r.firstChild;t;){var n=t.nextSibling;this.insertBefore(t,e),t=n}return r}return mS(this,r,e),cv(r,this),this.documentElement===null&&r.nodeType===Hi&&(this.documentElement=r),r},"insertBefore"),removeChild:o(function(r){return this.documentElement==r&&(this.documentElement=null),V6(this,r)},"removeChild"),replaceChild:o(function(r,e){mS(this,r,e,U6),cv(r,this),e&&this.removeChild(e),uo(r)&&(this.documentElement=r)},"replaceChild"),importNode:o(function(r,e){return H6(this,r,e)},"importNode"),getElementById:o(function(r){var e=null;return uv(this.documentElement,function(t){if(t.nodeType==Hi&&t.getAttribute("id")==r)return e=t,!0}),e},"getElementById"),getElementsByClassName:o(function(r){var e=y6(r);return new dd(this,function(t){var n=[];return e.length>0&&uv(t.documentElement,function(s){if(s!==t&&s.nodeType===Hi){var i=s.getAttribute("class");if(i){var a=r===i;if(!a){var u=y6(i);a=e.every(Ece(u))}a&&n.push(s)}}}),n})},"getElementsByClassName"),createElement:o(function(r){var e=new df;e.ownerDocument=this,e.nodeName=r,e.tagName=r,e.localName=r,e.childNodes=new $o;var t=e.attributes=new dS;return t._ownerElement=e,e},"createElement"),createDocumentFragment:o(function(){var r=new yS;return r.ownerDocument=this,r.childNodes=new $o,r},"createDocumentFragment"),createTextNode:o(function(r){var e=new P_;return e.ownerDocument=this,e.appendData(r),e},"createTextNode"),createComment:o(function(r){var e=new k_;return e.ownerDocument=this,e.appendData(r),e},"createComment"),createCDATASection:o(function(r){var e=new L_;return e.ownerDocument=this,e.appendData(r),e},"createCDATASection"),createProcessingInstruction:o(function(r,e){var t=new U_;return t.ownerDocument=this,t.tagName=t.nodeName=t.target=r,t.nodeValue=t.data=e,t},"createProcessingInstruction"),createAttribute:o(function(r){var e=new gS;return e.ownerDocument=this,e.name=r,e.nodeName=r,e.localName=r,e.specified=!0,e},"createAttribute"),createEntityReference:o(function(r){var e=new V_;return e.ownerDocument=this,e.nodeName=r,e},"createEntityReference"),createElementNS:o(function(r,e){var t=new df,n=e.split(":"),s=t.attributes=new dS;return t.childNodes=new $o,t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.namespaceURI=r,n.length==2?(t.prefix=n[0],t.localName=n[1]):t.localName=e,s._ownerElement=t,t},"createElementNS"),createAttributeNS:o(function(r,e){var t=new gS,n=e.split(":");return t.ownerDocument=this,t.nodeName=e,t.name=e,t.namespaceURI=r,t.specified=!0,n.length==2?(t.prefix=n[0],t.localName=n[1]):t.localName=e,t},"createAttributeNS")};$s(fv,Tr);function df(){this._nsMap={}}o(df,"Element");df.prototype={nodeType:Hi,hasAttribute:o(function(r){return this.getAttributeNode(r)!=null},"hasAttribute"),getAttribute:o(function(r){var e=this.getAttributeNode(r);return e&&e.value||""},"getAttribute"),getAttributeNode:o(function(r){return this.attributes.getNamedItem(r)},"getAttributeNode"),setAttribute:o(function(r,e){var t=this.ownerDocument.createAttribute(r);t.value=t.nodeValue=""+e,this.setAttributeNode(t)},"setAttribute"),removeAttribute:o(function(r){var e=this.getAttributeNode(r);e&&this.removeAttributeNode(e)},"removeAttribute"),appendChild:o(function(r){return r.nodeType===Go?this.insertBefore(r,null):_ce(this,r)},"appendChild"),setAttributeNode:o(function(r){return this.attributes.setNamedItem(r)},"setAttributeNode"),setAttributeNodeNS:o(function(r){return this.attributes.setNamedItemNS(r)},"setAttributeNodeNS"),removeAttributeNode:o(function(r){return this.attributes.removeNamedItem(r.nodeName)},"removeAttributeNode"),removeAttributeNS:o(function(r,e){var t=this.getAttributeNodeNS(r,e);t&&this.removeAttributeNode(t)},"removeAttributeNS"),hasAttributeNS:o(function(r,e){return this.getAttributeNodeNS(r,e)!=null},"hasAttributeNS"),getAttributeNS:o(function(r,e){var t=this.getAttributeNodeNS(r,e);return t&&t.value||""},"getAttributeNS"),setAttributeNS:o(function(r,e,t){var n=this.ownerDocument.createAttributeNS(r,e);n.value=n.nodeValue=""+t,this.setAttributeNode(n)},"setAttributeNS"),getAttributeNodeNS:o(function(r,e){return this.attributes.getNamedItemNS(r,e)},"getAttributeNodeNS"),getElementsByTagName:o(function(r){return new dd(this,function(e){var t=[];return uv(e,function(n){n!==e&&n.nodeType==Hi&&(r==="*"||n.tagName==r)&&t.push(n)}),t})},"getElementsByTagName"),getElementsByTagNameNS:o(function(r,e){return new dd(this,function(t){var n=[];return uv(t,function(s){s!==t&&s.nodeType===Hi&&(r==="*"||s.namespaceURI===r)&&(e==="*"||s.localName==e)&&n.push(s)}),n})},"getElementsByTagNameNS")};fv.prototype.getElementsByTagName=df.prototype.getElementsByTagName;fv.prototype.getElementsByTagNameNS=df.prototype.getElementsByTagNameNS;$s(df,Tr);function gS(){}o(gS,"Attr");gS.prototype.nodeType=pd;$s(gS,Tr);function hv(){}o(hv,"CharacterData");hv.prototype={data:"",substringData:o(function(r,e){return this.data.substring(r,r+e)},"substringData"),appendData:o(function(r){r=this.data+r,this.nodeValue=this.data=r,this.length=r.length},"appendData"),insertData:o(function(r,e){this.replaceData(r,0,e)},"insertData"),appendChild:o(function(r){throw new Error(qn[Ks])},"appendChild"),deleteData:o(function(r,e){this.replaceData(r,e,"")},"deleteData"),replaceData:o(function(r,e,t){var n=this.data.substring(0,r),s=this.data.substring(r+e);t=n+t+s,this.nodeValue=this.data=t,this.length=t.length},"replaceData")};$s(hv,Tr);function P_(){}o(P_,"Text");P_.prototype={nodeName:"#text",nodeType:pS,splitText:o(function(r){var e=this.data,t=e.substring(r);e=e.substring(0,r),this.data=this.nodeValue=e,this.length=e.length;var n=this.ownerDocument.createTextNode(t);return this.parentNode&&this.parentNode.insertBefore(n,this.nextSibling),n},"splitText")};$s(P_,hv);function k_(){}o(k_,"Comment");k_.prototype={nodeName:"#comment",nodeType:_6};$s(k_,hv);function L_(){}o(L_,"CDATASection");L_.prototype={nodeName:"#cdata-section",nodeType:N6};$s(L_,hv);function vS(){}o(vS,"DocumentType");vS.prototype.nodeType=B6;$s(vS,Tr);function j6(){}o(j6,"Notation");j6.prototype.nodeType=bce;$s(j6,Tr);function F6(){}o(F6,"Entity");F6.prototype.nodeType=Sce;$s(F6,Tr);function V_(){}o(V_,"EntityReference");V_.prototype.nodeType=T6;$s(V_,Tr);function yS(){}o(yS,"DocumentFragment");yS.prototype.nodeName="#document-fragment";yS.prototype.nodeType=Go;$s(yS,Tr);function U_(){}o(U_,"ProcessingInstruction");U_.prototype.nodeType=I6;$s(U_,Tr);function M6(){}o(M6,"XMLSerializer");M6.prototype.serializeToString=function(r,e,t){return q6.call(r,e,t)};Tr.prototype.toString=q6;function q6(r,e){var t=[],n=this.nodeType==9&&this.documentElement||this,s=n.prefix,i=n.namespaceURI;if(i&&s==null){var s=n.lookupPrefix(i);if(s==null)var a=[{namespace:i,prefix:null}]}return hd(this,t,r,e,a),t.join("")}o(q6,"nodeSerializeToString");function A6(r,e,t){var n=r.prefix||"",s=r.namespaceURI;if(!s||n==="xml"&&s===ov.XML||s===ov.XMLNS)return!1;for(var i=t.length;i--;){var a=t[i];if(a.prefix===n)return a.namespace!==s}return!0}o(A6,"needNamespaceDefine");function __(r,e,t){r.push(" ",e,'="',t.replace(/[<>&"\t\n\r]/g,k6),'"')}o(__,"addSerializedAttribute");function hd(r,e,t,n,s){if(s||(s=[]),n)if(r=n(r),r){if(typeof r=="string"){e.push(r);return}}else return;switch(r.nodeType){case Hi:var i=r.attributes,a=i.length,C=r.firstChild,u=r.tagName;t=ov.isHTML(r.namespaceURI)||t;var c=u;if(!t&&!r.prefix&&r.namespaceURI){for(var l,h=0;h<i.length;h++)if(i.item(h).name==="xmlns"){l=i.item(h).value;break}if(!l)for(var m=s.length-1;m>=0;m--){var g=s[m];if(g.prefix===""&&g.namespace===r.namespaceURI){l=g.namespace;break}}if(l!==r.namespaceURI)for(var m=s.length-1;m>=0;m--){var g=s[m];if(g.namespace===r.namespaceURI){g.prefix&&(c=g.prefix+":"+u);break}}}e.push("<",c);for(var y=0;y<a;y++){var v=i.item(y);v.prefix=="xmlns"?s.push({prefix:v.localName,namespace:v.value}):v.nodeName=="xmlns"&&s.push({prefix:"",namespace:v.value})}for(var y=0;y<a;y++){var v=i.item(y);if(A6(v,t,s)){var E=v.prefix||"",w=v.namespaceURI;__(e,E?"xmlns:"+E:"xmlns",w),s.push({prefix:E,namespace:w})}hd(v,e,t,n,s)}if(u===c&&A6(r,t,s)){var E=r.prefix||"",w=r.namespaceURI;__(e,E?"xmlns:"+E:"xmlns",w),s.push({prefix:E,namespace:w})}if(C||t&&!/^(?:meta|link|img|br|hr|input)$/i.test(u)){if(e.push(">"),t&&/^script$/i.test(u))for(;C;)C.data?e.push(C.data):hd(C,e,t,n,s.slice()),C=C.nextSibling;else for(;C;)hd(C,e,t,n,s.slice()),C=C.nextSibling;e.push("</",c,">")}else e.push("/>");return;case D6:case Go:for(var C=r.firstChild;C;)hd(C,e,t,n,s.slice()),C=C.nextSibling;return;case pd:return __(e,r.name,r.value);case pS:return e.push(r.data.replace(/[<&>]/g,k6));case N6:return e.push("<![CDATA[",r.data,"]]>");case _6:return e.push("<!--",r.data,"-->");case B6:var _=r.publicId,b=r.systemId;if(e.push("<!DOCTYPE ",r.name),_)e.push(" PUBLIC ",_),b&&b!="."&&e.push(" ",b),e.push(">");else if(b&&b!=".")e.push(" SYSTEM ",b,">");else{var A=r.internalSubset;A&&e.push(" [",A,"]"),e.push(">")}return;case I6:return e.push("<?",r.target," ",r.data,"?>");case T6:return e.push("&",r.nodeName,";");default:e.push("??",r.nodeName)}}o(hd,"serializeToString");function H6(r,e,t){var n;switch(e.nodeType){case Hi:n=e.cloneNode(!1),n.ownerDocument=r;case Go:break;case pd:t=!0;break}if(n||(n=e.cloneNode(!1)),n.ownerDocument=r,n.parentNode=null,t)for(var s=e.firstChild;s;)n.appendChild(H6(r,s,t)),s=s.nextSibling;return n}o(H6,"importNode");function D_(r,e,t){var n=new e.constructor;for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s)){var i=e[s];typeof i!="object"&&i!=n[s]&&(n[s]=i)}switch(e.childNodes&&(n.childNodes=new $o),n.ownerDocument=r,n.nodeType){case Hi:var a=e.attributes,u=n.attributes=new dS,c=a.length;u._ownerElement=n;for(var l=0;l<c;l++)n.setAttributeNode(D_(r,a.item(l),!0));break;case pd:t=!0}if(t)for(var h=e.firstChild;h;)n.appendChild(D_(r,h,t)),h=h.nextSibling;return n}o(D_,"cloneNode");function K6(r,e,t){r[e]=t}o(K6,"__set__");try{if(Object.defineProperty){let r=function(e){switch(e.nodeType){case Hi:case Go:var t=[];for(e=e.firstChild;e;)e.nodeType!==7&&e.nodeType!==8&&t.push(r(e)),e=e.nextSibling;return t.join("");default:return e.nodeValue}};Dce=r,o(r,"getTextContent"),Object.defineProperty(dd.prototype,"length",{get:o(function(){return B_(this),this.$$length},"get")}),Object.defineProperty(Tr.prototype,"textContent",{get:o(function(){return r(this)},"get"),set:o(function(e){switch(this.nodeType){case Hi:case Go:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}},"set")}),K6=o(function(e,t,n){e["$$"+t]=n},"__set__")}}catch{}var Dce;pc.DocumentType=vS;pc.DOMException=gn;pc.DOMImplementation=P6;pc.Element=df;pc.Node=Tr;pc.NodeList=$o;pc.XMLSerializer=M6});var G6=te(pv=>{"use strict";var $6=av().freeze;pv.XML_ENTITIES=$6({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'});pv.HTML_ENTITIES=$6({Aacute:"\xC1",aacute:"\xE1",Abreve:"\u0102",abreve:"\u0103",ac:"\u223E",acd:"\u223F",acE:"\u223E\u0333",Acirc:"\xC2",acirc:"\xE2",acute:"\xB4",Acy:"\u0410",acy:"\u0430",AElig:"\xC6",aelig:"\xE6",af:"\u2061",Afr:"\u{1D504}",afr:"\u{1D51E}",Agrave:"\xC0",agrave:"\xE0",alefsym:"\u2135",aleph:"\u2135",Alpha:"\u0391",alpha:"\u03B1",Amacr:"\u0100",amacr:"\u0101",amalg:"\u2A3F",AMP:"&",amp:"&",And:"\u2A53",and:"\u2227",andand:"\u2A55",andd:"\u2A5C",andslope:"\u2A58",andv:"\u2A5A",ang:"\u2220",ange:"\u29A4",angle:"\u2220",angmsd:"\u2221",angmsdaa:"\u29A8",angmsdab:"\u29A9",angmsdac:"\u29AA",angmsdad:"\u29AB",angmsdae:"\u29AC",angmsdaf:"\u29AD",angmsdag:"\u29AE",angmsdah:"\u29AF",angrt:"\u221F",angrtvb:"\u22BE",angrtvbd:"\u299D",angsph:"\u2222",angst:"\xC5",angzarr:"\u237C",Aogon:"\u0104",aogon:"\u0105",Aopf:"\u{1D538}",aopf:"\u{1D552}",ap:"\u2248",apacir:"\u2A6F",apE:"\u2A70",ape:"\u224A",apid:"\u224B",apos:"'",ApplyFunction:"\u2061",approx:"\u2248",approxeq:"\u224A",Aring:"\xC5",aring:"\xE5",Ascr:"\u{1D49C}",ascr:"\u{1D4B6}",Assign:"\u2254",ast:"*",asymp:"\u2248",asympeq:"\u224D",Atilde:"\xC3",atilde:"\xE3",Auml:"\xC4",auml:"\xE4",awconint:"\u2233",awint:"\u2A11",backcong:"\u224C",backepsilon:"\u03F6",backprime:"\u2035",backsim:"\u223D",backsimeq:"\u22CD",Backslash:"\u2216",Barv:"\u2AE7",barvee:"\u22BD",Barwed:"\u2306",barwed:"\u2305",barwedge:"\u2305",bbrk:"\u23B5",bbrktbrk:"\u23B6",bcong:"\u224C",Bcy:"\u0411",bcy:"\u0431",bdquo:"\u201E",becaus:"\u2235",Because:"\u2235",because:"\u2235",bemptyv:"\u29B0",bepsi:"\u03F6",bernou:"\u212C",Bernoullis:"\u212C",Beta:"\u0392",beta:"\u03B2",beth:"\u2136",between:"\u226C",Bfr:"\u{1D505}",bfr:"\u{1D51F}",bigcap:"\u22C2",bigcirc:"\u25EF",bigcup:"\u22C3",bigodot:"\u2A00",bigoplus:"\u2A01",bigotimes:"\u2A02",bigsqcup:"\u2A06",bigstar:"\u2605",bigtriangledown:"\u25BD",bigtriangleup:"\u25B3",biguplus:"\u2A04",bigvee:"\u22C1",bigwedge:"\u22C0",bkarow:"\u290D",blacklozenge:"\u29EB",blacksquare:"\u25AA",blacktriangle:"\u25B4",blacktriangledown:"\u25BE",blacktriangleleft:"\u25C2",blacktriangleright:"\u25B8",blank:"\u2423",blk12:"\u2592",blk14:"\u2591",blk34:"\u2593",block:"\u2588",bne:"=\u20E5",bnequiv:"\u2261\u20E5",bNot:"\u2AED",bnot:"\u2310",Bopf:"\u{1D539}",bopf:"\u{1D553}",bot:"\u22A5",bottom:"\u22A5",bowtie:"\u22C8",boxbox:"\u29C9",boxDL:"\u2557",boxDl:"\u2556",boxdL:"\u2555",boxdl:"\u2510",boxDR:"\u2554",boxDr:"\u2553",boxdR:"\u2552",boxdr:"\u250C",boxH:"\u2550",boxh:"\u2500",boxHD:"\u2566",boxHd:"\u2564",boxhD:"\u2565",boxhd:"\u252C",boxHU:"\u2569",boxHu:"\u2567",boxhU:"\u2568",boxhu:"\u2534",boxminus:"\u229F",boxplus:"\u229E",boxtimes:"\u22A0",boxUL:"\u255D",boxUl:"\u255C",boxuL:"\u255B",boxul:"\u2518",boxUR:"\u255A",boxUr:"\u2559",boxuR:"\u2558",boxur:"\u2514",boxV:"\u2551",boxv:"\u2502",boxVH:"\u256C",boxVh:"\u256B",boxvH:"\u256A",boxvh:"\u253C",boxVL:"\u2563",boxVl:"\u2562",boxvL:"\u2561",boxvl:"\u2524",boxVR:"\u2560",boxVr:"\u255F",boxvR:"\u255E",boxvr:"\u251C",bprime:"\u2035",Breve:"\u02D8",breve:"\u02D8",brvbar:"\xA6",Bscr:"\u212C",bscr:"\u{1D4B7}",bsemi:"\u204F",bsim:"\u223D",bsime:"\u22CD",bsol:"\\",bsolb:"\u29C5",bsolhsub:"\u27C8",bull:"\u2022",bullet:"\u2022",bump:"\u224E",bumpE:"\u2AAE",bumpe:"\u224F",Bumpeq:"\u224E",bumpeq:"\u224F",Cacute:"\u0106",cacute:"\u0107",Cap:"\u22D2",cap:"\u2229",capand:"\u2A44",capbrcup:"\u2A49",capcap:"\u2A4B",capcup:"\u2A47",capdot:"\u2A40",CapitalDifferentialD:"\u2145",caps:"\u2229\uFE00",caret:"\u2041",caron:"\u02C7",Cayleys:"\u212D",ccaps:"\u2A4D",Ccaron:"\u010C",ccaron:"\u010D",Ccedil:"\xC7",ccedil:"\xE7",Ccirc:"\u0108",ccirc:"\u0109",Cconint:"\u2230",ccups:"\u2A4C",ccupssm:"\u2A50",Cdot:"\u010A",cdot:"\u010B",cedil:"\xB8",Cedilla:"\xB8",cemptyv:"\u29B2",cent:"\xA2",CenterDot:"\xB7",centerdot:"\xB7",Cfr:"\u212D",cfr:"\u{1D520}",CHcy:"\u0427",chcy:"\u0447",check:"\u2713",checkmark:"\u2713",Chi:"\u03A7",chi:"\u03C7",cir:"\u25CB",circ:"\u02C6",circeq:"\u2257",circlearrowleft:"\u21BA",circlearrowright:"\u21BB",circledast:"\u229B",circledcirc:"\u229A",circleddash:"\u229D",CircleDot:"\u2299",circledR:"\xAE",circledS:"\u24C8",CircleMinus:"\u2296",CirclePlus:"\u2295",CircleTimes:"\u2297",cirE:"\u29C3",cire:"\u2257",cirfnint:"\u2A10",cirmid:"\u2AEF",cirscir:"\u29C2",ClockwiseContourIntegral:"\u2232",CloseCurlyDoubleQuote:"\u201D",CloseCurlyQuote:"\u2019",clubs:"\u2663",clubsuit:"\u2663",Colon:"\u2237",colon:":",Colone:"\u2A74",colone:"\u2254",coloneq:"\u2254",comma:",",commat:"@",comp:"\u2201",compfn:"\u2218",complement:"\u2201",complexes:"\u2102",cong:"\u2245",congdot:"\u2A6D",Congruent:"\u2261",Conint:"\u222F",conint:"\u222E",ContourIntegral:"\u222E",Copf:"\u2102",copf:"\u{1D554}",coprod:"\u2210",Coproduct:"\u2210",COPY:"\xA9",copy:"\xA9",copysr:"\u2117",CounterClockwiseContourIntegral:"\u2233",crarr:"\u21B5",Cross:"\u2A2F",cross:"\u2717",Cscr:"\u{1D49E}",cscr:"\u{1D4B8}",csub:"\u2ACF",csube:"\u2AD1",csup:"\u2AD0",csupe:"\u2AD2",ctdot:"\u22EF",cudarrl:"\u2938",cudarrr:"\u2935",cuepr:"\u22DE",cuesc:"\u22DF",cularr:"\u21B6",cularrp:"\u293D",Cup:"\u22D3",cup:"\u222A",cupbrcap:"\u2A48",CupCap:"\u224D",cupcap:"\u2A46",cupcup:"\u2A4A",cupdot:"\u228D",cupor:"\u2A45",cups:"\u222A\uFE00",curarr:"\u21B7",curarrm:"\u293C",curlyeqprec:"\u22DE",curlyeqsucc:"\u22DF",curlyvee:"\u22CE",curlywedge:"\u22CF",curren:"\xA4",curvearrowleft:"\u21B6",curvearrowright:"\u21B7",cuvee:"\u22CE",cuwed:"\u22CF",cwconint:"\u2232",cwint:"\u2231",cylcty:"\u232D",Dagger:"\u2021",dagger:"\u2020",daleth:"\u2138",Darr:"\u21A1",dArr:"\u21D3",darr:"\u2193",dash:"\u2010",Dashv:"\u2AE4",dashv:"\u22A3",dbkarow:"\u290F",dblac:"\u02DD",Dcaron:"\u010E",dcaron:"\u010F",Dcy:"\u0414",dcy:"\u0434",DD:"\u2145",dd:"\u2146",ddagger:"\u2021",ddarr:"\u21CA",DDotrahd:"\u2911",ddotseq:"\u2A77",deg:"\xB0",Del:"\u2207",Delta:"\u0394",delta:"\u03B4",demptyv:"\u29B1",dfisht:"\u297F",Dfr:"\u{1D507}",dfr:"\u{1D521}",dHar:"\u2965",dharl:"\u21C3",dharr:"\u21C2",DiacriticalAcute:"\xB4",DiacriticalDot:"\u02D9",DiacriticalDoubleAcute:"\u02DD",DiacriticalGrave:"`",DiacriticalTilde:"\u02DC",diam:"\u22C4",Diamond:"\u22C4",diamond:"\u22C4",diamondsuit:"\u2666",diams:"\u2666",die:"\xA8",DifferentialD:"\u2146",digamma:"\u03DD",disin:"\u22F2",div:"\xF7",divide:"\xF7",divideontimes:"\u22C7",divonx:"\u22C7",DJcy:"\u0402",djcy:"\u0452",dlcorn:"\u231E",dlcrop:"\u230D",dollar:"$",Dopf:"\u{1D53B}",dopf:"\u{1D555}",Dot:"\xA8",dot:"\u02D9",DotDot:"\u20DC",doteq:"\u2250",doteqdot:"\u2251",DotEqual:"\u2250",dotminus:"\u2238",dotplus:"\u2214",dotsquare:"\u22A1",doublebarwedge:"\u2306",DoubleContourIntegral:"\u222F",DoubleDot:"\xA8",DoubleDownArrow:"\u21D3",DoubleLeftArrow:"\u21D0",DoubleLeftRightArrow:"\u21D4",DoubleLeftTee:"\u2AE4",DoubleLongLeftArrow:"\u27F8",DoubleLongLeftRightArrow:"\u27FA",DoubleLongRightArrow:"\u27F9",DoubleRightArrow:"\u21D2",DoubleRightTee:"\u22A8",DoubleUpArrow:"\u21D1",DoubleUpDownArrow:"\u21D5",DoubleVerticalBar:"\u2225",DownArrow:"\u2193",Downarrow:"\u21D3",downarrow:"\u2193",DownArrowBar:"\u2913",DownArrowUpArrow:"\u21F5",DownBreve:"\u0311",downdownarrows:"\u21CA",downharpoonleft:"\u21C3",downharpoonright:"\u21C2",DownLeftRightVector:"\u2950",DownLeftTeeVector:"\u295E",DownLeftVector:"\u21BD",DownLeftVectorBar:"\u2956",DownRightTeeVector:"\u295F",DownRightVector:"\u21C1",DownRightVectorBar:"\u2957",DownTee:"\u22A4",DownTeeArrow:"\u21A7",drbkarow:"\u2910",drcorn:"\u231F",drcrop:"\u230C",Dscr:"\u{1D49F}",dscr:"\u{1D4B9}",DScy:"\u0405",dscy:"\u0455",dsol:"\u29F6",Dstrok:"\u0110",dstrok:"\u0111",dtdot:"\u22F1",dtri:"\u25BF",dtrif:"\u25BE",duarr:"\u21F5",duhar:"\u296F",dwangle:"\u29A6",DZcy:"\u040F",dzcy:"\u045F",dzigrarr:"\u27FF",Eacute:"\xC9",eacute:"\xE9",easter:"\u2A6E",Ecaron:"\u011A",ecaron:"\u011B",ecir:"\u2256",Ecirc:"\xCA",ecirc:"\xEA",ecolon:"\u2255",Ecy:"\u042D",ecy:"\u044D",eDDot:"\u2A77",Edot:"\u0116",eDot:"\u2251",edot:"\u0117",ee:"\u2147",efDot:"\u2252",Efr:"\u{1D508}",efr:"\u{1D522}",eg:"\u2A9A",Egrave:"\xC8",egrave:"\xE8",egs:"\u2A96",egsdot:"\u2A98",el:"\u2A99",Element:"\u2208",elinters:"\u23E7",ell:"\u2113",els:"\u2A95",elsdot:"\u2A97",Emacr:"\u0112",emacr:"\u0113",empty:"\u2205",emptyset:"\u2205",EmptySmallSquare:"\u25FB",emptyv:"\u2205",EmptyVerySmallSquare:"\u25AB",emsp:"\u2003",emsp13:"\u2004",emsp14:"\u2005",ENG:"\u014A",eng:"\u014B",ensp:"\u2002",Eogon:"\u0118",eogon:"\u0119",Eopf:"\u{1D53C}",eopf:"\u{1D556}",epar:"\u22D5",eparsl:"\u29E3",eplus:"\u2A71",epsi:"\u03B5",Epsilon:"\u0395",epsilon:"\u03B5",epsiv:"\u03F5",eqcirc:"\u2256",eqcolon:"\u2255",eqsim:"\u2242",eqslantgtr:"\u2A96",eqslantless:"\u2A95",Equal:"\u2A75",equals:"=",EqualTilde:"\u2242",equest:"\u225F",Equilibrium:"\u21CC",equiv:"\u2261",equivDD:"\u2A78",eqvparsl:"\u29E5",erarr:"\u2971",erDot:"\u2253",Escr:"\u2130",escr:"\u212F",esdot:"\u2250",Esim:"\u2A73",esim:"\u2242",Eta:"\u0397",eta:"\u03B7",ETH:"\xD0",eth:"\xF0",Euml:"\xCB",euml:"\xEB",euro:"\u20AC",excl:"!",exist:"\u2203",Exists:"\u2203",expectation:"\u2130",ExponentialE:"\u2147",exponentiale:"\u2147",fallingdotseq:"\u2252",Fcy:"\u0424",fcy:"\u0444",female:"\u2640",ffilig:"\uFB03",fflig:"\uFB00",ffllig:"\uFB04",Ffr:"\u{1D509}",ffr:"\u{1D523}",filig:"\uFB01",FilledSmallSquare:"\u25FC",FilledVerySmallSquare:"\u25AA",fjlig:"fj",flat:"\u266D",fllig:"\uFB02",fltns:"\u25B1",fnof:"\u0192",Fopf:"\u{1D53D}",fopf:"\u{1D557}",ForAll:"\u2200",forall:"\u2200",fork:"\u22D4",forkv:"\u2AD9",Fouriertrf:"\u2131",fpartint:"\u2A0D",frac12:"\xBD",frac13:"\u2153",frac14:"\xBC",frac15:"\u2155",frac16:"\u2159",frac18:"\u215B",frac23:"\u2154",frac25:"\u2156",frac34:"\xBE",frac35:"\u2157",frac38:"\u215C",frac45:"\u2158",frac56:"\u215A",frac58:"\u215D",frac78:"\u215E",frasl:"\u2044",frown:"\u2322",Fscr:"\u2131",fscr:"\u{1D4BB}",gacute:"\u01F5",Gamma:"\u0393",gamma:"\u03B3",Gammad:"\u03DC",gammad:"\u03DD",gap:"\u2A86",Gbreve:"\u011E",gbreve:"\u011F",Gcedil:"\u0122",Gcirc:"\u011C",gcirc:"\u011D",Gcy:"\u0413",gcy:"\u0433",Gdot:"\u0120",gdot:"\u0121",gE:"\u2267",ge:"\u2265",gEl:"\u2A8C",gel:"\u22DB",geq:"\u2265",geqq:"\u2267",geqslant:"\u2A7E",ges:"\u2A7E",gescc:"\u2AA9",gesdot:"\u2A80",gesdoto:"\u2A82",gesdotol:"\u2A84",gesl:"\u22DB\uFE00",gesles:"\u2A94",Gfr:"\u{1D50A}",gfr:"\u{1D524}",Gg:"\u22D9",gg:"\u226B",ggg:"\u22D9",gimel:"\u2137",GJcy:"\u0403",gjcy:"\u0453",gl:"\u2277",gla:"\u2AA5",glE:"\u2A92",glj:"\u2AA4",gnap:"\u2A8A",gnapprox:"\u2A8A",gnE:"\u2269",gne:"\u2A88",gneq:"\u2A88",gneqq:"\u2269",gnsim:"\u22E7",Gopf:"\u{1D53E}",gopf:"\u{1D558}",grave:"`",GreaterEqual:"\u2265",GreaterEqualLess:"\u22DB",GreaterFullEqual:"\u2267",GreaterGreater:"\u2AA2",GreaterLess:"\u2277",GreaterSlantEqual:"\u2A7E",GreaterTilde:"\u2273",Gscr:"\u{1D4A2}",gscr:"\u210A",gsim:"\u2273",gsime:"\u2A8E",gsiml:"\u2A90",Gt:"\u226B",GT:">",gt:">",gtcc:"\u2AA7",gtcir:"\u2A7A",gtdot:"\u22D7",gtlPar:"\u2995",gtquest:"\u2A7C",gtrapprox:"\u2A86",gtrarr:"\u2978",gtrdot:"\u22D7",gtreqless:"\u22DB",gtreqqless:"\u2A8C",gtrless:"\u2277",gtrsim:"\u2273",gvertneqq:"\u2269\uFE00",gvnE:"\u2269\uFE00",Hacek:"\u02C7",hairsp:"\u200A",half:"\xBD",hamilt:"\u210B",HARDcy:"\u042A",hardcy:"\u044A",hArr:"\u21D4",harr:"\u2194",harrcir:"\u2948",harrw:"\u21AD",Hat:"^",hbar:"\u210F",Hcirc:"\u0124",hcirc:"\u0125",hearts:"\u2665",heartsuit:"\u2665",hellip:"\u2026",hercon:"\u22B9",Hfr:"\u210C",hfr:"\u{1D525}",HilbertSpace:"\u210B",hksearow:"\u2925",hkswarow:"\u2926",hoarr:"\u21FF",homtht:"\u223B",hookleftarrow:"\u21A9",hookrightarrow:"\u21AA",Hopf:"\u210D",hopf:"\u{1D559}",horbar:"\u2015",HorizontalLine:"\u2500",Hscr:"\u210B",hscr:"\u{1D4BD}",hslash:"\u210F",Hstrok:"\u0126",hstrok:"\u0127",HumpDownHump:"\u224E",HumpEqual:"\u224F",hybull:"\u2043",hyphen:"\u2010",Iacute:"\xCD",iacute:"\xED",ic:"\u2063",Icirc:"\xCE",icirc:"\xEE",Icy:"\u0418",icy:"\u0438",Idot:"\u0130",IEcy:"\u0415",iecy:"\u0435",iexcl:"\xA1",iff:"\u21D4",Ifr:"\u2111",ifr:"\u{1D526}",Igrave:"\xCC",igrave:"\xEC",ii:"\u2148",iiiint:"\u2A0C",iiint:"\u222D",iinfin:"\u29DC",iiota:"\u2129",IJlig:"\u0132",ijlig:"\u0133",Im:"\u2111",Imacr:"\u012A",imacr:"\u012B",image:"\u2111",ImaginaryI:"\u2148",imagline:"\u2110",imagpart:"\u2111",imath:"\u0131",imof:"\u22B7",imped:"\u01B5",Implies:"\u21D2",in:"\u2208",incare:"\u2105",infin:"\u221E",infintie:"\u29DD",inodot:"\u0131",Int:"\u222C",int:"\u222B",intcal:"\u22BA",integers:"\u2124",Integral:"\u222B",intercal:"\u22BA",Intersection:"\u22C2",intlarhk:"\u2A17",intprod:"\u2A3C",InvisibleComma:"\u2063",InvisibleTimes:"\u2062",IOcy:"\u0401",iocy:"\u0451",Iogon:"\u012E",iogon:"\u012F",Iopf:"\u{1D540}",iopf:"\u{1D55A}",Iota:"\u0399",iota:"\u03B9",iprod:"\u2A3C",iquest:"\xBF",Iscr:"\u2110",iscr:"\u{1D4BE}",isin:"\u2208",isindot:"\u22F5",isinE:"\u22F9",isins:"\u22F4",isinsv:"\u22F3",isinv:"\u2208",it:"\u2062",Itilde:"\u0128",itilde:"\u0129",Iukcy:"\u0406",iukcy:"\u0456",Iuml:"\xCF",iuml:"\xEF",Jcirc:"\u0134",jcirc:"\u0135",Jcy:"\u0419",jcy:"\u0439",Jfr:"\u{1D50D}",jfr:"\u{1D527}",jmath:"\u0237",Jopf:"\u{1D541}",jopf:"\u{1D55B}",Jscr:"\u{1D4A5}",jscr:"\u{1D4BF}",Jsercy:"\u0408",jsercy:"\u0458",Jukcy:"\u0404",jukcy:"\u0454",Kappa:"\u039A",kappa:"\u03BA",kappav:"\u03F0",Kcedil:"\u0136",kcedil:"\u0137",Kcy:"\u041A",kcy:"\u043A",Kfr:"\u{1D50E}",kfr:"\u{1D528}",kgreen:"\u0138",KHcy:"\u0425",khcy:"\u0445",KJcy:"\u040C",kjcy:"\u045C",Kopf:"\u{1D542}",kopf:"\u{1D55C}",Kscr:"\u{1D4A6}",kscr:"\u{1D4C0}",lAarr:"\u21DA",Lacute:"\u0139",lacute:"\u013A",laemptyv:"\u29B4",lagran:"\u2112",Lambda:"\u039B",lambda:"\u03BB",Lang:"\u27EA",lang:"\u27E8",langd:"\u2991",langle:"\u27E8",lap:"\u2A85",Laplacetrf:"\u2112",laquo:"\xAB",Larr:"\u219E",lArr:"\u21D0",larr:"\u2190",larrb:"\u21E4",larrbfs:"\u291F",larrfs:"\u291D",larrhk:"\u21A9",larrlp:"\u21AB",larrpl:"\u2939",larrsim:"\u2973",larrtl:"\u21A2",lat:"\u2AAB",lAtail:"\u291B",latail:"\u2919",late:"\u2AAD",lates:"\u2AAD\uFE00",lBarr:"\u290E",lbarr:"\u290C",lbbrk:"\u2772",lbrace:"{",lbrack:"[",lbrke:"\u298B",lbrksld:"\u298F",lbrkslu:"\u298D",Lcaron:"\u013D",lcaron:"\u013E",Lcedil:"\u013B",lcedil:"\u013C",lceil:"\u2308",lcub:"{",Lcy:"\u041B",lcy:"\u043B",ldca:"\u2936",ldquo:"\u201C",ldquor:"\u201E",ldrdhar:"\u2967",ldrushar:"\u294B",ldsh:"\u21B2",lE:"\u2266",le:"\u2264",LeftAngleBracket:"\u27E8",LeftArrow:"\u2190",Leftarrow:"\u21D0",leftarrow:"\u2190",LeftArrowBar:"\u21E4",LeftArrowRightArrow:"\u21C6",leftarrowtail:"\u21A2",LeftCeiling:"\u2308",LeftDoubleBracket:"\u27E6",LeftDownTeeVector:"\u2961",LeftDownVector:"\u21C3",LeftDownVectorBar:"\u2959",LeftFloor:"\u230A",leftharpoondown:"\u21BD",leftharpoonup:"\u21BC",leftleftarrows:"\u21C7",LeftRightArrow:"\u2194",Leftrightarrow:"\u21D4",leftrightarrow:"\u2194",leftrightarrows:"\u21C6",leftrightharpoons:"\u21CB",leftrightsquigarrow:"\u21AD",LeftRightVector:"\u294E",LeftTee:"\u22A3",LeftTeeArrow:"\u21A4",LeftTeeVector:"\u295A",leftthreetimes:"\u22CB",LeftTriangle:"\u22B2",LeftTriangleBar:"\u29CF",LeftTriangleEqual:"\u22B4",LeftUpDownVector:"\u2951",LeftUpTeeVector:"\u2960",LeftUpVector:"\u21BF",LeftUpVectorBar:"\u2958",LeftVector:"\u21BC",LeftVectorBar:"\u2952",lEg:"\u2A8B",leg:"\u22DA",leq:"\u2264",leqq:"\u2266",leqslant:"\u2A7D",les:"\u2A7D",lescc:"\u2AA8",lesdot:"\u2A7F",lesdoto:"\u2A81",lesdotor:"\u2A83",lesg:"\u22DA\uFE00",lesges:"\u2A93",lessapprox:"\u2A85",lessdot:"\u22D6",lesseqgtr:"\u22DA",lesseqqgtr:"\u2A8B",LessEqualGreater:"\u22DA",LessFullEqual:"\u2266",LessGreater:"\u2276",lessgtr:"\u2276",LessLess:"\u2AA1",lesssim:"\u2272",LessSlantEqual:"\u2A7D",LessTilde:"\u2272",lfisht:"\u297C",lfloor:"\u230A",Lfr:"\u{1D50F}",lfr:"\u{1D529}",lg:"\u2276",lgE:"\u2A91",lHar:"\u2962",lhard:"\u21BD",lharu:"\u21BC",lharul:"\u296A",lhblk:"\u2584",LJcy:"\u0409",ljcy:"\u0459",Ll:"\u22D8",ll:"\u226A",llarr:"\u21C7",llcorner:"\u231E",Lleftarrow:"\u21DA",llhard:"\u296B",lltri:"\u25FA",Lmidot:"\u013F",lmidot:"\u0140",lmoust:"\u23B0",lmoustache:"\u23B0",lnap:"\u2A89",lnapprox:"\u2A89",lnE:"\u2268",lne:"\u2A87",lneq:"\u2A87",lneqq:"\u2268",lnsim:"\u22E6",loang:"\u27EC",loarr:"\u21FD",lobrk:"\u27E6",LongLeftArrow:"\u27F5",Longleftarrow:"\u27F8",longleftarrow:"\u27F5",LongLeftRightArrow:"\u27F7",Longleftrightarrow:"\u27FA",longleftrightarrow:"\u27F7",longmapsto:"\u27FC",LongRightArrow:"\u27F6",Longrightarrow:"\u27F9",longrightarrow:"\u27F6",looparrowleft:"\u21AB",looparrowright:"\u21AC",lopar:"\u2985",Lopf:"\u{1D543}",lopf:"\u{1D55D}",loplus:"\u2A2D",lotimes:"\u2A34",lowast:"\u2217",lowbar:"_",LowerLeftArrow:"\u2199",LowerRightArrow:"\u2198",loz:"\u25CA",lozenge:"\u25CA",lozf:"\u29EB",lpar:"(",lparlt:"\u2993",lrarr:"\u21C6",lrcorner:"\u231F",lrhar:"\u21CB",lrhard:"\u296D",lrm:"\u200E",lrtri:"\u22BF",lsaquo:"\u2039",Lscr:"\u2112",lscr:"\u{1D4C1}",Lsh:"\u21B0",lsh:"\u21B0",lsim:"\u2272",lsime:"\u2A8D",lsimg:"\u2A8F",lsqb:"[",lsquo:"\u2018",lsquor:"\u201A",Lstrok:"\u0141",lstrok:"\u0142",Lt:"\u226A",LT:"<",lt:"<",ltcc:"\u2AA6",ltcir:"\u2A79",ltdot:"\u22D6",lthree:"\u22CB",ltimes:"\u22C9",ltlarr:"\u2976",ltquest:"\u2A7B",ltri:"\u25C3",ltrie:"\u22B4",ltrif:"\u25C2",ltrPar:"\u2996",lurdshar:"\u294A",luruhar:"\u2966",lvertneqq:"\u2268\uFE00",lvnE:"\u2268\uFE00",macr:"\xAF",male:"\u2642",malt:"\u2720",maltese:"\u2720",Map:"\u2905",map:"\u21A6",mapsto:"\u21A6",mapstodown:"\u21A7",mapstoleft:"\u21A4",mapstoup:"\u21A5",marker:"\u25AE",mcomma:"\u2A29",Mcy:"\u041C",mcy:"\u043C",mdash:"\u2014",mDDot:"\u223A",measuredangle:"\u2221",MediumSpace:"\u205F",Mellintrf:"\u2133",Mfr:"\u{1D510}",mfr:"\u{1D52A}",mho:"\u2127",micro:"\xB5",mid:"\u2223",midast:"*",midcir:"\u2AF0",middot:"\xB7",minus:"\u2212",minusb:"\u229F",minusd:"\u2238",minusdu:"\u2A2A",MinusPlus:"\u2213",mlcp:"\u2ADB",mldr:"\u2026",mnplus:"\u2213",models:"\u22A7",Mopf:"\u{1D544}",mopf:"\u{1D55E}",mp:"\u2213",Mscr:"\u2133",mscr:"\u{1D4C2}",mstpos:"\u223E",Mu:"\u039C",mu:"\u03BC",multimap:"\u22B8",mumap:"\u22B8",nabla:"\u2207",Nacute:"\u0143",nacute:"\u0144",nang:"\u2220\u20D2",nap:"\u2249",napE:"\u2A70\u0338",napid:"\u224B\u0338",napos:"\u0149",napprox:"\u2249",natur:"\u266E",natural:"\u266E",naturals:"\u2115",nbsp:"\xA0",nbump:"\u224E\u0338",nbumpe:"\u224F\u0338",ncap:"\u2A43",Ncaron:"\u0147",ncaron:"\u0148",Ncedil:"\u0145",ncedil:"\u0146",ncong:"\u2247",ncongdot:"\u2A6D\u0338",ncup:"\u2A42",Ncy:"\u041D",ncy:"\u043D",ndash:"\u2013",ne:"\u2260",nearhk:"\u2924",neArr:"\u21D7",nearr:"\u2197",nearrow:"\u2197",nedot:"\u2250\u0338",NegativeMediumSpace:"\u200B",NegativeThickSpace:"\u200B",NegativeThinSpace:"\u200B",NegativeVeryThinSpace:"\u200B",nequiv:"\u2262",nesear:"\u2928",nesim:"\u2242\u0338",NestedGreaterGreater:"\u226B",NestedLessLess:"\u226A",NewLine:`
|
|
70
|
-
`,nexist:"\u2204",nexists:"\u2204",Nfr:"\u{1D511}",nfr:"\u{1D52B}",ngE:"\u2267\u0338",nge:"\u2271",ngeq:"\u2271",ngeqq:"\u2267\u0338",ngeqslant:"\u2A7E\u0338",nges:"\u2A7E\u0338",nGg:"\u22D9\u0338",ngsim:"\u2275",nGt:"\u226B\u20D2",ngt:"\u226F",ngtr:"\u226F",nGtv:"\u226B\u0338",nhArr:"\u21CE",nharr:"\u21AE",nhpar:"\u2AF2",ni:"\u220B",nis:"\u22FC",nisd:"\u22FA",niv:"\u220B",NJcy:"\u040A",njcy:"\u045A",nlArr:"\u21CD",nlarr:"\u219A",nldr:"\u2025",nlE:"\u2266\u0338",nle:"\u2270",nLeftarrow:"\u21CD",nleftarrow:"\u219A",nLeftrightarrow:"\u21CE",nleftrightarrow:"\u21AE",nleq:"\u2270",nleqq:"\u2266\u0338",nleqslant:"\u2A7D\u0338",nles:"\u2A7D\u0338",nless:"\u226E",nLl:"\u22D8\u0338",nlsim:"\u2274",nLt:"\u226A\u20D2",nlt:"\u226E",nltri:"\u22EA",nltrie:"\u22EC",nLtv:"\u226A\u0338",nmid:"\u2224",NoBreak:"\u2060",NonBreakingSpace:"\xA0",Nopf:"\u2115",nopf:"\u{1D55F}",Not:"\u2AEC",not:"\xAC",NotCongruent:"\u2262",NotCupCap:"\u226D",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotEqualTilde:"\u2242\u0338",NotExists:"\u2204",NotGreater:"\u226F",NotGreaterEqual:"\u2271",NotGreaterFullEqual:"\u2267\u0338",NotGreaterGreater:"\u226B\u0338",NotGreaterLess:"\u2279",NotGreaterSlantEqual:"\u2A7E\u0338",NotGreaterTilde:"\u2275",NotHumpDownHump:"\u224E\u0338",NotHumpEqual:"\u224F\u0338",notin:"\u2209",notindot:"\u22F5\u0338",notinE:"\u22F9\u0338",notinva:"\u2209",notinvb:"\u22F7",notinvc:"\u22F6",NotLeftTriangle:"\u22EA",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangleEqual:"\u22EC",NotLess:"\u226E",NotLessEqual:"\u2270",NotLessGreater:"\u2278",NotLessLess:"\u226A\u0338",NotLessSlantEqual:"\u2A7D\u0338",NotLessTilde:"\u2274",NotNestedGreaterGreater:"\u2AA2\u0338",NotNestedLessLess:"\u2AA1\u0338",notni:"\u220C",notniva:"\u220C",notnivb:"\u22FE",notnivc:"\u22FD",NotPrecedes:"\u2280",NotPrecedesEqual:"\u2AAF\u0338",NotPrecedesSlantEqual:"\u22E0",NotReverseElement:"\u220C",NotRightTriangle:"\u22EB",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangleEqual:"\u22ED",NotSquareSubset:"\u228F\u0338",NotSquareSubsetEqual:"\u22E2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22E3",NotSubset:"\u2282\u20D2",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsEqual:"\u2AB0\u0338",NotSucceedsSlantEqual:"\u22E1",NotSucceedsTilde:"\u227F\u0338",NotSuperset:"\u2283\u20D2",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotTildeEqual:"\u2244",NotTildeFullEqual:"\u2247",NotTildeTilde:"\u2249",NotVerticalBar:"\u2224",npar:"\u2226",nparallel:"\u2226",nparsl:"\u2AFD\u20E5",npart:"\u2202\u0338",npolint:"\u2A14",npr:"\u2280",nprcue:"\u22E0",npre:"\u2AAF\u0338",nprec:"\u2280",npreceq:"\u2AAF\u0338",nrArr:"\u21CF",nrarr:"\u219B",nrarrc:"\u2933\u0338",nrarrw:"\u219D\u0338",nRightarrow:"\u21CF",nrightarrow:"\u219B",nrtri:"\u22EB",nrtrie:"\u22ED",nsc:"\u2281",nsccue:"\u22E1",nsce:"\u2AB0\u0338",Nscr:"\u{1D4A9}",nscr:"\u{1D4C3}",nshortmid:"\u2224",nshortparallel:"\u2226",nsim:"\u2241",nsime:"\u2244",nsimeq:"\u2244",nsmid:"\u2224",nspar:"\u2226",nsqsube:"\u22E2",nsqsupe:"\u22E3",nsub:"\u2284",nsubE:"\u2AC5\u0338",nsube:"\u2288",nsubset:"\u2282\u20D2",nsubseteq:"\u2288",nsubseteqq:"\u2AC5\u0338",nsucc:"\u2281",nsucceq:"\u2AB0\u0338",nsup:"\u2285",nsupE:"\u2AC6\u0338",nsupe:"\u2289",nsupset:"\u2283\u20D2",nsupseteq:"\u2289",nsupseteqq:"\u2AC6\u0338",ntgl:"\u2279",Ntilde:"\xD1",ntilde:"\xF1",ntlg:"\u2278",ntriangleleft:"\u22EA",ntrianglelefteq:"\u22EC",ntriangleright:"\u22EB",ntrianglerighteq:"\u22ED",Nu:"\u039D",nu:"\u03BD",num:"#",numero:"\u2116",numsp:"\u2007",nvap:"\u224D\u20D2",nVDash:"\u22AF",nVdash:"\u22AE",nvDash:"\u22AD",nvdash:"\u22AC",nvge:"\u2265\u20D2",nvgt:">\u20D2",nvHarr:"\u2904",nvinfin:"\u29DE",nvlArr:"\u2902",nvle:"\u2264\u20D2",nvlt:"<\u20D2",nvltrie:"\u22B4\u20D2",nvrArr:"\u2903",nvrtrie:"\u22B5\u20D2",nvsim:"\u223C\u20D2",nwarhk:"\u2923",nwArr:"\u21D6",nwarr:"\u2196",nwarrow:"\u2196",nwnear:"\u2927",Oacute:"\xD3",oacute:"\xF3",oast:"\u229B",ocir:"\u229A",Ocirc:"\xD4",ocirc:"\xF4",Ocy:"\u041E",ocy:"\u043E",odash:"\u229D",Odblac:"\u0150",odblac:"\u0151",odiv:"\u2A38",odot:"\u2299",odsold:"\u29BC",OElig:"\u0152",oelig:"\u0153",ofcir:"\u29BF",Ofr:"\u{1D512}",ofr:"\u{1D52C}",ogon:"\u02DB",Ograve:"\xD2",ograve:"\xF2",ogt:"\u29C1",ohbar:"\u29B5",ohm:"\u03A9",oint:"\u222E",olarr:"\u21BA",olcir:"\u29BE",olcross:"\u29BB",oline:"\u203E",olt:"\u29C0",Omacr:"\u014C",omacr:"\u014D",Omega:"\u03A9",omega:"\u03C9",Omicron:"\u039F",omicron:"\u03BF",omid:"\u29B6",ominus:"\u2296",Oopf:"\u{1D546}",oopf:"\u{1D560}",opar:"\u29B7",OpenCurlyDoubleQuote:"\u201C",OpenCurlyQuote:"\u2018",operp:"\u29B9",oplus:"\u2295",Or:"\u2A54",or:"\u2228",orarr:"\u21BB",ord:"\u2A5D",order:"\u2134",orderof:"\u2134",ordf:"\xAA",ordm:"\xBA",origof:"\u22B6",oror:"\u2A56",orslope:"\u2A57",orv:"\u2A5B",oS:"\u24C8",Oscr:"\u{1D4AA}",oscr:"\u2134",Oslash:"\xD8",oslash:"\xF8",osol:"\u2298",Otilde:"\xD5",otilde:"\xF5",Otimes:"\u2A37",otimes:"\u2297",otimesas:"\u2A36",Ouml:"\xD6",ouml:"\xF6",ovbar:"\u233D",OverBar:"\u203E",OverBrace:"\u23DE",OverBracket:"\u23B4",OverParenthesis:"\u23DC",par:"\u2225",para:"\xB6",parallel:"\u2225",parsim:"\u2AF3",parsl:"\u2AFD",part:"\u2202",PartialD:"\u2202",Pcy:"\u041F",pcy:"\u043F",percnt:"%",period:".",permil:"\u2030",perp:"\u22A5",pertenk:"\u2031",Pfr:"\u{1D513}",pfr:"\u{1D52D}",Phi:"\u03A6",phi:"\u03C6",phiv:"\u03D5",phmmat:"\u2133",phone:"\u260E",Pi:"\u03A0",pi:"\u03C0",pitchfork:"\u22D4",piv:"\u03D6",planck:"\u210F",planckh:"\u210E",plankv:"\u210F",plus:"+",plusacir:"\u2A23",plusb:"\u229E",pluscir:"\u2A22",plusdo:"\u2214",plusdu:"\u2A25",pluse:"\u2A72",PlusMinus:"\xB1",plusmn:"\xB1",plussim:"\u2A26",plustwo:"\u2A27",pm:"\xB1",Poincareplane:"\u210C",pointint:"\u2A15",Popf:"\u2119",popf:"\u{1D561}",pound:"\xA3",Pr:"\u2ABB",pr:"\u227A",prap:"\u2AB7",prcue:"\u227C",prE:"\u2AB3",pre:"\u2AAF",prec:"\u227A",precapprox:"\u2AB7",preccurlyeq:"\u227C",Precedes:"\u227A",PrecedesEqual:"\u2AAF",PrecedesSlantEqual:"\u227C",PrecedesTilde:"\u227E",preceq:"\u2AAF",precnapprox:"\u2AB9",precneqq:"\u2AB5",precnsim:"\u22E8",precsim:"\u227E",Prime:"\u2033",prime:"\u2032",primes:"\u2119",prnap:"\u2AB9",prnE:"\u2AB5",prnsim:"\u22E8",prod:"\u220F",Product:"\u220F",profalar:"\u232E",profline:"\u2312",profsurf:"\u2313",prop:"\u221D",Proportion:"\u2237",Proportional:"\u221D",propto:"\u221D",prsim:"\u227E",prurel:"\u22B0",Pscr:"\u{1D4AB}",pscr:"\u{1D4C5}",Psi:"\u03A8",psi:"\u03C8",puncsp:"\u2008",Qfr:"\u{1D514}",qfr:"\u{1D52E}",qint:"\u2A0C",Qopf:"\u211A",qopf:"\u{1D562}",qprime:"\u2057",Qscr:"\u{1D4AC}",qscr:"\u{1D4C6}",quaternions:"\u210D",quatint:"\u2A16",quest:"?",questeq:"\u225F",QUOT:'"',quot:'"',rAarr:"\u21DB",race:"\u223D\u0331",Racute:"\u0154",racute:"\u0155",radic:"\u221A",raemptyv:"\u29B3",Rang:"\u27EB",rang:"\u27E9",rangd:"\u2992",range:"\u29A5",rangle:"\u27E9",raquo:"\xBB",Rarr:"\u21A0",rArr:"\u21D2",rarr:"\u2192",rarrap:"\u2975",rarrb:"\u21E5",rarrbfs:"\u2920",rarrc:"\u2933",rarrfs:"\u291E",rarrhk:"\u21AA",rarrlp:"\u21AC",rarrpl:"\u2945",rarrsim:"\u2974",Rarrtl:"\u2916",rarrtl:"\u21A3",rarrw:"\u219D",rAtail:"\u291C",ratail:"\u291A",ratio:"\u2236",rationals:"\u211A",RBarr:"\u2910",rBarr:"\u290F",rbarr:"\u290D",rbbrk:"\u2773",rbrace:"}",rbrack:"]",rbrke:"\u298C",rbrksld:"\u298E",rbrkslu:"\u2990",Rcaron:"\u0158",rcaron:"\u0159",Rcedil:"\u0156",rcedil:"\u0157",rceil:"\u2309",rcub:"}",Rcy:"\u0420",rcy:"\u0440",rdca:"\u2937",rdldhar:"\u2969",rdquo:"\u201D",rdquor:"\u201D",rdsh:"\u21B3",Re:"\u211C",real:"\u211C",realine:"\u211B",realpart:"\u211C",reals:"\u211D",rect:"\u25AD",REG:"\xAE",reg:"\xAE",ReverseElement:"\u220B",ReverseEquilibrium:"\u21CB",ReverseUpEquilibrium:"\u296F",rfisht:"\u297D",rfloor:"\u230B",Rfr:"\u211C",rfr:"\u{1D52F}",rHar:"\u2964",rhard:"\u21C1",rharu:"\u21C0",rharul:"\u296C",Rho:"\u03A1",rho:"\u03C1",rhov:"\u03F1",RightAngleBracket:"\u27E9",RightArrow:"\u2192",Rightarrow:"\u21D2",rightarrow:"\u2192",RightArrowBar:"\u21E5",RightArrowLeftArrow:"\u21C4",rightarrowtail:"\u21A3",RightCeiling:"\u2309",RightDoubleBracket:"\u27E7",RightDownTeeVector:"\u295D",RightDownVector:"\u21C2",RightDownVectorBar:"\u2955",RightFloor:"\u230B",rightharpoondown:"\u21C1",rightharpoonup:"\u21C0",rightleftarrows:"\u21C4",rightleftharpoons:"\u21CC",rightrightarrows:"\u21C9",rightsquigarrow:"\u219D",RightTee:"\u22A2",RightTeeArrow:"\u21A6",RightTeeVector:"\u295B",rightthreetimes:"\u22CC",RightTriangle:"\u22B3",RightTriangleBar:"\u29D0",RightTriangleEqual:"\u22B5",RightUpDownVector:"\u294F",RightUpTeeVector:"\u295C",RightUpVector:"\u21BE",RightUpVectorBar:"\u2954",RightVector:"\u21C0",RightVectorBar:"\u2953",ring:"\u02DA",risingdotseq:"\u2253",rlarr:"\u21C4",rlhar:"\u21CC",rlm:"\u200F",rmoust:"\u23B1",rmoustache:"\u23B1",rnmid:"\u2AEE",roang:"\u27ED",roarr:"\u21FE",robrk:"\u27E7",ropar:"\u2986",Ropf:"\u211D",ropf:"\u{1D563}",roplus:"\u2A2E",rotimes:"\u2A35",RoundImplies:"\u2970",rpar:")",rpargt:"\u2994",rppolint:"\u2A12",rrarr:"\u21C9",Rrightarrow:"\u21DB",rsaquo:"\u203A",Rscr:"\u211B",rscr:"\u{1D4C7}",Rsh:"\u21B1",rsh:"\u21B1",rsqb:"]",rsquo:"\u2019",rsquor:"\u2019",rthree:"\u22CC",rtimes:"\u22CA",rtri:"\u25B9",rtrie:"\u22B5",rtrif:"\u25B8",rtriltri:"\u29CE",RuleDelayed:"\u29F4",ruluhar:"\u2968",rx:"\u211E",Sacute:"\u015A",sacute:"\u015B",sbquo:"\u201A",Sc:"\u2ABC",sc:"\u227B",scap:"\u2AB8",Scaron:"\u0160",scaron:"\u0161",sccue:"\u227D",scE:"\u2AB4",sce:"\u2AB0",Scedil:"\u015E",scedil:"\u015F",Scirc:"\u015C",scirc:"\u015D",scnap:"\u2ABA",scnE:"\u2AB6",scnsim:"\u22E9",scpolint:"\u2A13",scsim:"\u227F",Scy:"\u0421",scy:"\u0441",sdot:"\u22C5",sdotb:"\u22A1",sdote:"\u2A66",searhk:"\u2925",seArr:"\u21D8",searr:"\u2198",searrow:"\u2198",sect:"\xA7",semi:";",seswar:"\u2929",setminus:"\u2216",setmn:"\u2216",sext:"\u2736",Sfr:"\u{1D516}",sfr:"\u{1D530}",sfrown:"\u2322",sharp:"\u266F",SHCHcy:"\u0429",shchcy:"\u0449",SHcy:"\u0428",shcy:"\u0448",ShortDownArrow:"\u2193",ShortLeftArrow:"\u2190",shortmid:"\u2223",shortparallel:"\u2225",ShortRightArrow:"\u2192",ShortUpArrow:"\u2191",shy:"\xAD",Sigma:"\u03A3",sigma:"\u03C3",sigmaf:"\u03C2",sigmav:"\u03C2",sim:"\u223C",simdot:"\u2A6A",sime:"\u2243",simeq:"\u2243",simg:"\u2A9E",simgE:"\u2AA0",siml:"\u2A9D",simlE:"\u2A9F",simne:"\u2246",simplus:"\u2A24",simrarr:"\u2972",slarr:"\u2190",SmallCircle:"\u2218",smallsetminus:"\u2216",smashp:"\u2A33",smeparsl:"\u29E4",smid:"\u2223",smile:"\u2323",smt:"\u2AAA",smte:"\u2AAC",smtes:"\u2AAC\uFE00",SOFTcy:"\u042C",softcy:"\u044C",sol:"/",solb:"\u29C4",solbar:"\u233F",Sopf:"\u{1D54A}",sopf:"\u{1D564}",spades:"\u2660",spadesuit:"\u2660",spar:"\u2225",sqcap:"\u2293",sqcaps:"\u2293\uFE00",sqcup:"\u2294",sqcups:"\u2294\uFE00",Sqrt:"\u221A",sqsub:"\u228F",sqsube:"\u2291",sqsubset:"\u228F",sqsubseteq:"\u2291",sqsup:"\u2290",sqsupe:"\u2292",sqsupset:"\u2290",sqsupseteq:"\u2292",squ:"\u25A1",Square:"\u25A1",square:"\u25A1",SquareIntersection:"\u2293",SquareSubset:"\u228F",SquareSubsetEqual:"\u2291",SquareSuperset:"\u2290",SquareSupersetEqual:"\u2292",SquareUnion:"\u2294",squarf:"\u25AA",squf:"\u25AA",srarr:"\u2192",Sscr:"\u{1D4AE}",sscr:"\u{1D4C8}",ssetmn:"\u2216",ssmile:"\u2323",sstarf:"\u22C6",Star:"\u22C6",star:"\u2606",starf:"\u2605",straightepsilon:"\u03F5",straightphi:"\u03D5",strns:"\xAF",Sub:"\u22D0",sub:"\u2282",subdot:"\u2ABD",subE:"\u2AC5",sube:"\u2286",subedot:"\u2AC3",submult:"\u2AC1",subnE:"\u2ACB",subne:"\u228A",subplus:"\u2ABF",subrarr:"\u2979",Subset:"\u22D0",subset:"\u2282",subseteq:"\u2286",subseteqq:"\u2AC5",SubsetEqual:"\u2286",subsetneq:"\u228A",subsetneqq:"\u2ACB",subsim:"\u2AC7",subsub:"\u2AD5",subsup:"\u2AD3",succ:"\u227B",succapprox:"\u2AB8",succcurlyeq:"\u227D",Succeeds:"\u227B",SucceedsEqual:"\u2AB0",SucceedsSlantEqual:"\u227D",SucceedsTilde:"\u227F",succeq:"\u2AB0",succnapprox:"\u2ABA",succneqq:"\u2AB6",succnsim:"\u22E9",succsim:"\u227F",SuchThat:"\u220B",Sum:"\u2211",sum:"\u2211",sung:"\u266A",Sup:"\u22D1",sup:"\u2283",sup1:"\xB9",sup2:"\xB2",sup3:"\xB3",supdot:"\u2ABE",supdsub:"\u2AD8",supE:"\u2AC6",supe:"\u2287",supedot:"\u2AC4",Superset:"\u2283",SupersetEqual:"\u2287",suphsol:"\u27C9",suphsub:"\u2AD7",suplarr:"\u297B",supmult:"\u2AC2",supnE:"\u2ACC",supne:"\u228B",supplus:"\u2AC0",Supset:"\u22D1",supset:"\u2283",supseteq:"\u2287",supseteqq:"\u2AC6",supsetneq:"\u228B",supsetneqq:"\u2ACC",supsim:"\u2AC8",supsub:"\u2AD4",supsup:"\u2AD6",swarhk:"\u2926",swArr:"\u21D9",swarr:"\u2199",swarrow:"\u2199",swnwar:"\u292A",szlig:"\xDF",Tab:" ",target:"\u2316",Tau:"\u03A4",tau:"\u03C4",tbrk:"\u23B4",Tcaron:"\u0164",tcaron:"\u0165",Tcedil:"\u0162",tcedil:"\u0163",Tcy:"\u0422",tcy:"\u0442",tdot:"\u20DB",telrec:"\u2315",Tfr:"\u{1D517}",tfr:"\u{1D531}",there4:"\u2234",Therefore:"\u2234",therefore:"\u2234",Theta:"\u0398",theta:"\u03B8",thetasym:"\u03D1",thetav:"\u03D1",thickapprox:"\u2248",thicksim:"\u223C",ThickSpace:"\u205F\u200A",thinsp:"\u2009",ThinSpace:"\u2009",thkap:"\u2248",thksim:"\u223C",THORN:"\xDE",thorn:"\xFE",Tilde:"\u223C",tilde:"\u02DC",TildeEqual:"\u2243",TildeFullEqual:"\u2245",TildeTilde:"\u2248",times:"\xD7",timesb:"\u22A0",timesbar:"\u2A31",timesd:"\u2A30",tint:"\u222D",toea:"\u2928",top:"\u22A4",topbot:"\u2336",topcir:"\u2AF1",Topf:"\u{1D54B}",topf:"\u{1D565}",topfork:"\u2ADA",tosa:"\u2929",tprime:"\u2034",TRADE:"\u2122",trade:"\u2122",triangle:"\u25B5",triangledown:"\u25BF",triangleleft:"\u25C3",trianglelefteq:"\u22B4",triangleq:"\u225C",triangleright:"\u25B9",trianglerighteq:"\u22B5",tridot:"\u25EC",trie:"\u225C",triminus:"\u2A3A",TripleDot:"\u20DB",triplus:"\u2A39",trisb:"\u29CD",tritime:"\u2A3B",trpezium:"\u23E2",Tscr:"\u{1D4AF}",tscr:"\u{1D4C9}",TScy:"\u0426",tscy:"\u0446",TSHcy:"\u040B",tshcy:"\u045B",Tstrok:"\u0166",tstrok:"\u0167",twixt:"\u226C",twoheadleftarrow:"\u219E",twoheadrightarrow:"\u21A0",Uacute:"\xDA",uacute:"\xFA",Uarr:"\u219F",uArr:"\u21D1",uarr:"\u2191",Uarrocir:"\u2949",Ubrcy:"\u040E",ubrcy:"\u045E",Ubreve:"\u016C",ubreve:"\u016D",Ucirc:"\xDB",ucirc:"\xFB",Ucy:"\u0423",ucy:"\u0443",udarr:"\u21C5",Udblac:"\u0170",udblac:"\u0171",udhar:"\u296E",ufisht:"\u297E",Ufr:"\u{1D518}",ufr:"\u{1D532}",Ugrave:"\xD9",ugrave:"\xF9",uHar:"\u2963",uharl:"\u21BF",uharr:"\u21BE",uhblk:"\u2580",ulcorn:"\u231C",ulcorner:"\u231C",ulcrop:"\u230F",ultri:"\u25F8",Umacr:"\u016A",umacr:"\u016B",uml:"\xA8",UnderBar:"_",UnderBrace:"\u23DF",UnderBracket:"\u23B5",UnderParenthesis:"\u23DD",Union:"\u22C3",UnionPlus:"\u228E",Uogon:"\u0172",uogon:"\u0173",Uopf:"\u{1D54C}",uopf:"\u{1D566}",UpArrow:"\u2191",Uparrow:"\u21D1",uparrow:"\u2191",UpArrowBar:"\u2912",UpArrowDownArrow:"\u21C5",UpDownArrow:"\u2195",Updownarrow:"\u21D5",updownarrow:"\u2195",UpEquilibrium:"\u296E",upharpoonleft:"\u21BF",upharpoonright:"\u21BE",uplus:"\u228E",UpperLeftArrow:"\u2196",UpperRightArrow:"\u2197",Upsi:"\u03D2",upsi:"\u03C5",upsih:"\u03D2",Upsilon:"\u03A5",upsilon:"\u03C5",UpTee:"\u22A5",UpTeeArrow:"\u21A5",upuparrows:"\u21C8",urcorn:"\u231D",urcorner:"\u231D",urcrop:"\u230E",Uring:"\u016E",uring:"\u016F",urtri:"\u25F9",Uscr:"\u{1D4B0}",uscr:"\u{1D4CA}",utdot:"\u22F0",Utilde:"\u0168",utilde:"\u0169",utri:"\u25B5",utrif:"\u25B4",uuarr:"\u21C8",Uuml:"\xDC",uuml:"\xFC",uwangle:"\u29A7",vangrt:"\u299C",varepsilon:"\u03F5",varkappa:"\u03F0",varnothing:"\u2205",varphi:"\u03D5",varpi:"\u03D6",varpropto:"\u221D",vArr:"\u21D5",varr:"\u2195",varrho:"\u03F1",varsigma:"\u03C2",varsubsetneq:"\u228A\uFE00",varsubsetneqq:"\u2ACB\uFE00",varsupsetneq:"\u228B\uFE00",varsupsetneqq:"\u2ACC\uFE00",vartheta:"\u03D1",vartriangleleft:"\u22B2",vartriangleright:"\u22B3",Vbar:"\u2AEB",vBar:"\u2AE8",vBarv:"\u2AE9",Vcy:"\u0412",vcy:"\u0432",VDash:"\u22AB",Vdash:"\u22A9",vDash:"\u22A8",vdash:"\u22A2",Vdashl:"\u2AE6",Vee:"\u22C1",vee:"\u2228",veebar:"\u22BB",veeeq:"\u225A",vellip:"\u22EE",Verbar:"\u2016",verbar:"|",Vert:"\u2016",vert:"|",VerticalBar:"\u2223",VerticalLine:"|",VerticalSeparator:"\u2758",VerticalTilde:"\u2240",VeryThinSpace:"\u200A",Vfr:"\u{1D519}",vfr:"\u{1D533}",vltri:"\u22B2",vnsub:"\u2282\u20D2",vnsup:"\u2283\u20D2",Vopf:"\u{1D54D}",vopf:"\u{1D567}",vprop:"\u221D",vrtri:"\u22B3",Vscr:"\u{1D4B1}",vscr:"\u{1D4CB}",vsubnE:"\u2ACB\uFE00",vsubne:"\u228A\uFE00",vsupnE:"\u2ACC\uFE00",vsupne:"\u228B\uFE00",Vvdash:"\u22AA",vzigzag:"\u299A",Wcirc:"\u0174",wcirc:"\u0175",wedbar:"\u2A5F",Wedge:"\u22C0",wedge:"\u2227",wedgeq:"\u2259",weierp:"\u2118",Wfr:"\u{1D51A}",wfr:"\u{1D534}",Wopf:"\u{1D54E}",wopf:"\u{1D568}",wp:"\u2118",wr:"\u2240",wreath:"\u2240",Wscr:"\u{1D4B2}",wscr:"\u{1D4CC}",xcap:"\u22C2",xcirc:"\u25EF",xcup:"\u22C3",xdtri:"\u25BD",Xfr:"\u{1D51B}",xfr:"\u{1D535}",xhArr:"\u27FA",xharr:"\u27F7",Xi:"\u039E",xi:"\u03BE",xlArr:"\u27F8",xlarr:"\u27F5",xmap:"\u27FC",xnis:"\u22FB",xodot:"\u2A00",Xopf:"\u{1D54F}",xopf:"\u{1D569}",xoplus:"\u2A01",xotime:"\u2A02",xrArr:"\u27F9",xrarr:"\u27F6",Xscr:"\u{1D4B3}",xscr:"\u{1D4CD}",xsqcup:"\u2A06",xuplus:"\u2A04",xutri:"\u25B3",xvee:"\u22C1",xwedge:"\u22C0",Yacute:"\xDD",yacute:"\xFD",YAcy:"\u042F",yacy:"\u044F",Ycirc:"\u0176",ycirc:"\u0177",Ycy:"\u042B",ycy:"\u044B",yen:"\xA5",Yfr:"\u{1D51C}",yfr:"\u{1D536}",YIcy:"\u0407",yicy:"\u0457",Yopf:"\u{1D550}",yopf:"\u{1D56A}",Yscr:"\u{1D4B4}",yscr:"\u{1D4CE}",YUcy:"\u042E",yucy:"\u044E",Yuml:"\u0178",yuml:"\xFF",Zacute:"\u0179",zacute:"\u017A",Zcaron:"\u017D",zcaron:"\u017E",Zcy:"\u0417",zcy:"\u0437",Zdot:"\u017B",zdot:"\u017C",zeetrf:"\u2128",ZeroWidthSpace:"\u200B",Zeta:"\u0396",zeta:"\u03B6",Zfr:"\u2128",zfr:"\u{1D537}",ZHcy:"\u0416",zhcy:"\u0436",zigrarr:"\u21DD",Zopf:"\u2124",zopf:"\u{1D56B}",Zscr:"\u{1D4B5}",zscr:"\u{1D4CF}",zwj:"\u200D",zwnj:"\u200C"});pv.entityMap=pv.HTML_ENTITIES});var ej=te(M_=>{"use strict";var vv=av().NAMESPACE,F_=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,X6=new RegExp("[\\-\\.0-9"+F_.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),W6=new RegExp("^"+F_.source+X6.source+"*(?::"+F_.source+X6.source+"*)?$"),dv=0,dc=1,md=2,mv=3,gd=4,vd=5,gv=6,xS=7;function yd(r,e){this.message=r,this.locator=e,Error.captureStackTrace&&Error.captureStackTrace(this,yd)}o(yd,"ParseError");yd.prototype=new Error;yd.prototype.name=yd.name;function Y6(){}o(Y6,"XMLReader");Y6.prototype={parse:o(function(r,e,t){var n=this.domBuilder;n.startDocument(),Q6(e,e={}),Bce(r,e,t,n,this.errorHandler),n.endDocument()},"parse")};function Bce(r,e,t,n,s){function i(Y){if(Y>65535){Y-=65536;var ve=55296+(Y>>10),Oe=56320+(Y&1023);return String.fromCharCode(ve,Oe)}else return String.fromCharCode(Y)}o(i,"fixedFromCharCode");function a(Y){var ve=Y.slice(1,-1);return Object.hasOwnProperty.call(t,ve)?t[ve]:ve.charAt(0)==="#"?i(parseInt(ve.substr(1).replace("x","0x"))):(s.error("entity not found:"+Y),Y)}o(a,"entityReplacer");function u(Y){if(Y>E){var ve=r.substring(E,Y).replace(/&#?\w+;/g,a);g&&c(E),n.characters(ve,0,Y-E),E=Y}}o(u,"appendText");function c(Y,ve){for(;Y>=h&&(ve=m.exec(r));)l=ve.index,h=l+ve[0].length,g.lineNumber++;g.columnNumber=Y-l+1}o(c,"position");for(var l=0,h=0,m=/.*(?:\r\n?|\n)|.*$/g,g=n.locator,y=[{currentNSMap:e}],v={},E=0;;){try{var w=r.indexOf("<",E);if(w<0){if(!r.substr(E).match(/^\s*$/)){var C=n.doc,_=C.createTextNode(r.substr(E));C.appendChild(_),n.currentElement=_}return}switch(w>E&&u(w),r.charAt(w+1)){case"/":var q=r.indexOf(">",w+3),b=r.substring(w+2,q).replace(/[ \t\n\r]+$/g,""),A=y.pop();q<0?(b=r.substring(w+2).replace(/[\s<].*/,""),s.error("end tag name: "+b+" is not complete:"+A.tagName),q=w+1+b.length):b.match(/\s</)&&(b=b.replace(/[\s<].*/,""),s.error("end tag name: "+b+" maybe not complete"),q=w+1+b.length);var T=A.localNSMap,B=A.tagName==b,M=B||A.tagName&&A.tagName.toLowerCase()==b.toLowerCase();if(M){if(n.endElement(A.uri,A.localName,b),T)for(var I in T)Object.prototype.hasOwnProperty.call(T,I)&&n.endPrefixMapping(I);B||s.fatalError("end tag name: "+b+" is not match the current start tagName:"+A.tagName)}else y.push(A);q++;break;case"?":g&&c(w),q=Lce(r,w,n);break;case"!":g&&c(w),q=kce(r,w,n,s);break;default:g&&c(w);var H=new Z6,K=y[y.length-1].currentNSMap,q=Rce(r,w,H,K,a,s),W=H.length;if(!H.closed&&Pce(r,q,H.tagName,v)&&(H.closed=!0,t.nbsp||s.warning("unclosed xml attribute")),g&&W){for(var he=z6(g,{}),pe=0;pe<W;pe++){var ue=H[pe];c(ue.offset),ue.locator=z6(g,{})}n.locator=he,J6(H,n,K)&&y.push(H),n.locator=g}else J6(H,n,K)&&y.push(H);vv.isHTML(H.uri)&&!H.closed?q=Oce(r,q,H.tagName,a,n):q++}}catch(Y){if(Y instanceof yd)throw Y;s.error("element parse error: "+Y),q=-1}q>E?E=q:u(Math.max(w,E)+1)}}o(Bce,"parse");function z6(r,e){return e.lineNumber=r.lineNumber,e.columnNumber=r.columnNumber,e}o(z6,"copyLocator");function Rce(r,e,t,n,s,i){function a(y,v,E){t.attributeNames.hasOwnProperty(y)&&i.fatalError("Attribute "+y+" redefined"),t.addValue(y,v.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,s),E)}o(a,"addAttribute");for(var u,c,l=++e,h=dv;;){var m=r.charAt(l);switch(m){case"=":if(h===dc)u=r.slice(e,l),h=mv;else if(h===md)h=mv;else throw new Error("attribute equal must after attrName");break;case"'":case'"':if(h===mv||h===dc)if(h===dc&&(i.warning('attribute value must after "="'),u=r.slice(e,l)),e=l+1,l=r.indexOf(m,e),l>0)c=r.slice(e,l),a(u,c,e-1),h=vd;else throw new Error("attribute value no end '"+m+"' match");else if(h==gd)c=r.slice(e,l),a(u,c,e),i.warning('attribute "'+u+'" missed start quot('+m+")!!"),e=l+1,h=vd;else throw new Error('attribute value must after "="');break;case"/":switch(h){case dv:t.setTagName(r.slice(e,l));case vd:case gv:case xS:h=xS,t.closed=!0;case gd:case dc:break;case md:t.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return i.error("unexpected end of input"),h==dv&&t.setTagName(r.slice(e,l)),l;case">":switch(h){case dv:t.setTagName(r.slice(e,l));case vd:case gv:case xS:break;case gd:case dc:c=r.slice(e,l),c.slice(-1)==="/"&&(t.closed=!0,c=c.slice(0,-1));case md:h===md&&(c=u),h==gd?(i.warning('attribute "'+c+'" missed quot(")!'),a(u,c,e)):((!vv.isHTML(n[""])||!c.match(/^(?:disabled|checked|selected)$/i))&&i.warning('attribute "'+c+'" missed value!! "'+c+'" instead!!'),a(c,c,e));break;case mv:throw new Error("attribute value missed!!")}return l;case"\x80":m=" ";default:if(m<=" ")switch(h){case dv:t.setTagName(r.slice(e,l)),h=gv;break;case dc:u=r.slice(e,l),h=md;break;case gd:var c=r.slice(e,l);i.warning('attribute "'+c+'" missed quot(")!!'),a(u,c,e);case vd:h=gv;break}else switch(h){case md:var g=t.tagName;(!vv.isHTML(n[""])||!u.match(/^(?:disabled|checked|selected)$/i))&&i.warning('attribute "'+u+'" missed value!! "'+u+'" instead2!!'),a(u,u,e),e=l,h=dc;break;case vd:i.warning('attribute space is required"'+u+'"!!');case gv:h=dc,e=l;break;case mv:h=gd,e=l;break;case xS:throw new Error("elements closed character '/' and '>' must be connected to")}}l++}}o(Rce,"parseElementStartPart");function J6(r,e,t){for(var n=r.tagName,s=null,m=r.length;m--;){var i=r[m],a=i.qName,u=i.value,g=a.indexOf(":");if(g>0)var c=i.prefix=a.slice(0,g),l=a.slice(g+1),h=c==="xmlns"&&l;else l=a,c=null,h=a==="xmlns"&&"";i.localName=l,h!==!1&&(s==null&&(s={},Q6(t,t={})),t[h]=s[h]=u,i.uri=vv.XMLNS,e.startPrefixMapping(h,u))}for(var m=r.length;m--;){i=r[m];var c=i.prefix;c&&(c==="xml"&&(i.uri=vv.XML),c!=="xmlns"&&(i.uri=t[c||""]))}var g=n.indexOf(":");g>0?(c=r.prefix=n.slice(0,g),l=r.localName=n.slice(g+1)):(c=null,l=r.localName=n);var y=r.uri=t[c||""];if(e.startElement(y,l,n,r),r.closed){if(e.endElement(y,l,n),s)for(c in s)Object.prototype.hasOwnProperty.call(s,c)&&e.endPrefixMapping(c)}else return r.currentNSMap=t,r.localNSMap=s,!0}o(J6,"appendElement");function Oce(r,e,t,n,s){if(/^(?:script|textarea)$/i.test(t)){var i=r.indexOf("</"+t+">",e),a=r.substring(e+1,i);if(/[&<]/.test(a))return/^script$/i.test(t)?(s.characters(a,0,a.length),i):(a=a.replace(/&#?\w+;/g,n),s.characters(a,0,a.length),i)}return e+1}o(Oce,"parseHtmlSpecialContent");function Pce(r,e,t,n){var s=n[t];return s==null&&(s=r.lastIndexOf("</"+t+">"),s<e&&(s=r.lastIndexOf("</"+t)),n[t]=s),s<e}o(Pce,"fixSelfClosed");function Q6(r,e){for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t])}o(Q6,"_copy");function kce(r,e,t,n){var s=r.charAt(e+2);switch(s){case"-":if(r.charAt(e+3)==="-"){var i=r.indexOf("-->",e+4);return i>e?(t.comment(r,e+4,i-e-4),i+3):(n.error("Unclosed comment"),-1)}else return-1;default:if(r.substr(e+3,6)=="CDATA["){var i=r.indexOf("]]>",e+9);return t.startCDATA(),t.characters(r,e+9,i-e-9),t.endCDATA(),i+3}var a=Vce(r,e),u=a.length;if(u>1&&/!doctype/i.test(a[0][0])){var c=a[1][0],l=!1,h=!1;u>3&&(/^public$/i.test(a[2][0])?(l=a[3][0],h=u>4&&a[4][0]):/^system$/i.test(a[2][0])&&(h=a[3][0]));var m=a[u-1];return t.startDTD(c,l,h),t.endDTD(),m.index+m[0].length}}return-1}o(kce,"parseDCC");function Lce(r,e,t){var n=r.indexOf("?>",e);if(n){var s=r.substring(e,n).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);if(s){var i=s[0].length;return t.processingInstruction(s[1],s[2]),n+2}else return-1}return-1}o(Lce,"parseInstruction");function Z6(){this.attributeNames={}}o(Z6,"ElementAttributes");Z6.prototype={setTagName:o(function(r){if(!W6.test(r))throw new Error("invalid tagName:"+r);this.tagName=r},"setTagName"),addValue:o(function(r,e,t){if(!W6.test(r))throw new Error("invalid attribute:"+r);this.attributeNames[r]=this.length,this[this.length++]={qName:r,value:e,offset:t}},"addValue"),length:0,getLocalName:o(function(r){return this[r].localName},"getLocalName"),getLocator:o(function(r){return this[r].locator},"getLocator"),getQName:o(function(r){return this[r].qName},"getQName"),getURI:o(function(r){return this[r].uri},"getURI"),getValue:o(function(r){return this[r].value},"getValue")};function Vce(r,e){var t,n=[],s=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(s.lastIndex=e,s.exec(r);t=s.exec(r);)if(n.push(t),t[1])return n}o(Vce,"split");M_.XMLReader=Y6;M_.ParseError=yd});var oj=te(ES=>{"use strict";var Uce=av(),jce=j_(),tj=G6(),sj=ej(),Fce=jce.DOMImplementation,rj=Uce.NAMESPACE,Mce=sj.ParseError,qce=sj.XMLReader;function ij(r){return r.replace(/\r[\n\u0085]/g,`
|
|
71
|
-
`).replace(/[\r\u0085\u2028]/g,`
|
|
72
|
-
`)}o(ij,"normalizeLineEndings");function aj(r){this.options=r||{locator:{}}}o(aj,"DOMParser");aj.prototype.parseFromString=function(r,e){var t=this.options,n=new qce,s=t.domBuilder||new yv,i=t.errorHandler,a=t.locator,u=t.xmlns||{},c=/\/x?html?$/.test(e),l=c?tj.HTML_ENTITIES:tj.XML_ENTITIES;a&&s.setDocumentLocator(a),n.errorHandler=Hce(i,s,a),n.domBuilder=t.domBuilder||s,c&&(u[""]=rj.HTML),u.xml=u.xml||rj.XML;var h=t.normalizeLineEndings||ij;return r&&typeof r=="string"?n.parse(h(r),u,l):n.errorHandler.error("invalid doc source"),s.doc};function Hce(r,e,t){if(!r){if(e instanceof yv)return e;r=e}var n={},s=r instanceof Function;t=t||{};function i(a){var u=r[a];!u&&s&&(u=r.length==2?function(c){r(a,c)}:r),n[a]=u&&function(c){u("[xmldom "+a+"] "+c+q_(t))}||function(){}}return o(i,"build"),i("warning"),i("error"),i("fatalError"),n}o(Hce,"buildErrorHandler");function yv(){this.cdata=!1}o(yv,"DOMHandler");function xd(r,e){e.lineNumber=r.lineNumber,e.columnNumber=r.columnNumber}o(xd,"position");yv.prototype={startDocument:o(function(){this.doc=new Fce().createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},"startDocument"),startElement:o(function(r,e,t,n){var s=this.doc,i=s.createElementNS(r,t||e),a=n.length;wS(this,i),this.currentElement=i,this.locator&&xd(this.locator,i);for(var u=0;u<a;u++){var r=n.getURI(u),c=n.getValue(u),t=n.getQName(u),l=s.createAttributeNS(r,t);this.locator&&xd(n.getLocator(u),l),l.value=l.nodeValue=c,i.setAttributeNode(l)}},"startElement"),endElement:o(function(r,e,t){var n=this.currentElement,s=n.tagName;this.currentElement=n.parentNode},"endElement"),startPrefixMapping:o(function(r,e){},"startPrefixMapping"),endPrefixMapping:o(function(r){},"endPrefixMapping"),processingInstruction:o(function(r,e){var t=this.doc.createProcessingInstruction(r,e);this.locator&&xd(this.locator,t),wS(this,t)},"processingInstruction"),ignorableWhitespace:o(function(r,e,t){},"ignorableWhitespace"),characters:o(function(r,e,t){if(r=nj.apply(this,arguments),r){if(this.cdata)var n=this.doc.createCDATASection(r);else var n=this.doc.createTextNode(r);this.currentElement?this.currentElement.appendChild(n):/^\s*$/.test(r)&&this.doc.appendChild(n),this.locator&&xd(this.locator,n)}},"characters"),skippedEntity:o(function(r){},"skippedEntity"),endDocument:o(function(){this.doc.normalize()},"endDocument"),setDocumentLocator:o(function(r){(this.locator=r)&&(r.lineNumber=0)},"setDocumentLocator"),comment:o(function(r,e,t){r=nj.apply(this,arguments);var n=this.doc.createComment(r);this.locator&&xd(this.locator,n),wS(this,n)},"comment"),startCDATA:o(function(){this.cdata=!0},"startCDATA"),endCDATA:o(function(){this.cdata=!1},"endCDATA"),startDTD:o(function(r,e,t){var n=this.doc.implementation;if(n&&n.createDocumentType){var s=n.createDocumentType(r,e,t);this.locator&&xd(this.locator,s),wS(this,s),this.doc.doctype=s}},"startDTD"),warning:o(function(r){console.warn("[xmldom warning] "+r,q_(this.locator))},"warning"),error:o(function(r){console.error("[xmldom error] "+r,q_(this.locator))},"error"),fatalError:o(function(r){throw new Mce(r,this.locator)},"fatalError")};function q_(r){if(r)return`
|
|
73
|
-
@`+(r.systemId||"")+"#[line:"+r.lineNumber+",col:"+r.columnNumber+"]"}o(q_,"_locator");function nj(r,e,t){return typeof r=="string"?r.substr(e,t):r.length>=e+t||e?new java.lang.String(r,e,t)+"":r}o(nj,"_toString");"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(r){yv.prototype[r]=function(){return null}});function wS(r,e){r.currentElement?r.currentElement.appendChild(e):r.doc.appendChild(e)}o(wS,"appendElement");ES.__DOMHandler=yv;ES.normalizeLineEndings=ij;ES.DOMParser=aj});var H_=te(SS=>{"use strict";var uj=j_();SS.DOMImplementation=uj.DOMImplementation;SS.XMLSerializer=uj.XMLSerializer;SS.DOMParser=oj().DOMParser});var cj=te(AS=>{"use strict";Object.defineProperty(AS,"__esModule",{value:!0});AS.EnvelopedSignature=void 0;var bS=lS(),K_=ud(),Kce=class{static{o(this,"EnvelopedSignature")}constructor(){this.includeComments=!1,this.includeComments=!1}process(e,t){if(t.signatureNode==null){let i=bS.select1("./*[local-name(.)='Signature' and namespace-uri(.)='http://www.w3.org/2000/09/xmldsig#']",e);return K_.isNodeLike(i)&&i.parentNode&&i.parentNode.removeChild(i),e}let n=t.signatureNode,s=bS.select1(".//*[local-name(.)='SignatureValue']/text()",n);if(K_.isTextNode(s)){let i=s.data,a=bS.select(".//*[local-name(.)='Signature' and namespace-uri(.)='http://www.w3.org/2000/09/xmldsig#']",e);for(let u of Array.isArray(a)?a:[]){let c=bS.select1(".//*[local-name(.)='SignatureValue']/text()",u);if(K_.isTextNode(c)){let l=c.data;i===l&&u.parentNode&&u.parentNode.removeChild(u)}}}return e}getAlgorithmName(){return"http://www.w3.org/2000/09/xmldsig#enveloped-signature"}};AS.EnvelopedSignature=Kce});var lj=te(mc=>{"use strict";Object.defineProperty(mc,"__esModule",{value:!0});mc.Sha512=mc.Sha256=mc.Sha1=void 0;var $_=Ge("crypto"),$ce=class{static{o(this,"Sha1")}constructor(){this.getHash=function(e){let t=$_.createHash("sha1");return t.update(e,"utf8"),t.digest("base64")},this.getAlgorithmName=function(){return"http://www.w3.org/2000/09/xmldsig#sha1"}}};mc.Sha1=$ce;var Gce=class{static{o(this,"Sha256")}constructor(){this.getHash=function(e){let t=$_.createHash("sha256");return t.update(e,"utf8"),t.digest("base64")},this.getAlgorithmName=function(){return"http://www.w3.org/2001/04/xmlenc#sha256"}}};mc.Sha256=Gce;var Xce=class{static{o(this,"Sha512")}constructor(){this.getHash=function(e){let t=$_.createHash("sha512");return t.update(e,"utf8"),t.digest("base64")},this.getAlgorithmName=function(){return"http://www.w3.org/2001/04/xmlenc#sha512"}}};mc.Sha512=Xce});var G_=te(CS=>{"use strict";Object.defineProperty(CS,"__esModule",{value:!0});CS.createOptionalCallbackFunction=void 0;function Wce(r){return typeof r=="function"}o(Wce,"isErrorFirstCallback");function zce(r){return(...e)=>{let t=e[e.length-1];if(Wce(t))try{let n=r(...e.slice(0,-1));t(null,n)}catch(n){t(n instanceof Error?n:new Error("Unknown error"))}else return r(...e)}}o(zce,"createOptionalCallbackFunction");CS.createOptionalCallbackFunction=zce});var fj=te(co=>{"use strict";Object.defineProperty(co,"__esModule",{value:!0});co.HmacSha1=co.RsaSha512=co.RsaSha256=co.RsaSha1=void 0;var gc=Ge("crypto"),vc=G_(),Jce=class{static{o(this,"RsaSha1")}constructor(){this.getSignature=(0,vc.createOptionalCallbackFunction)((e,t)=>{let n=gc.createSign("RSA-SHA1");return n.update(e),n.sign(t,"base64")}),this.verifySignature=(0,vc.createOptionalCallbackFunction)((e,t,n)=>{let s=gc.createVerify("RSA-SHA1");return s.update(e),s.verify(t,n,"base64")}),this.getAlgorithmName=()=>"http://www.w3.org/2000/09/xmldsig#rsa-sha1"}};co.RsaSha1=Jce;var Yce=class{static{o(this,"RsaSha256")}constructor(){this.getSignature=(0,vc.createOptionalCallbackFunction)((e,t)=>{let n=gc.createSign("RSA-SHA256");return n.update(e),n.sign(t,"base64")}),this.verifySignature=(0,vc.createOptionalCallbackFunction)((e,t,n)=>{let s=gc.createVerify("RSA-SHA256");return s.update(e),s.verify(t,n,"base64")}),this.getAlgorithmName=()=>"http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"}};co.RsaSha256=Yce;var Qce=class{static{o(this,"RsaSha512")}constructor(){this.getSignature=(0,vc.createOptionalCallbackFunction)((e,t)=>{let n=gc.createSign("RSA-SHA512");return n.update(e),n.sign(t,"base64")}),this.verifySignature=(0,vc.createOptionalCallbackFunction)((e,t,n)=>{let s=gc.createVerify("RSA-SHA512");return s.update(e),s.verify(t,n,"base64")}),this.getAlgorithmName=()=>"http://www.w3.org/2001/04/xmldsig-more#rsa-sha512"}};co.RsaSha512=Qce;var Zce=class{static{o(this,"HmacSha1")}constructor(){this.getSignature=(0,vc.createOptionalCallbackFunction)((e,t)=>{let n=gc.createHmac("SHA1",t);return n.update(e),n.digest("base64")}),this.verifySignature=(0,vc.createOptionalCallbackFunction)((e,t,n)=>{let s=gc.createHmac("SHA1",t);return s.update(e),s.digest("base64")===n}),this.getAlgorithmName=()=>"http://www.w3.org/2000/09/xmldsig#hmac-sha1"}};co.HmacSha1=Zce});var dj=te(TS=>{"use strict";Object.defineProperty(TS,"__esModule",{value:!0});TS.SignedXml=void 0;var hi=ud(),mf=H_(),ele=Ge("util"),Ki=lS(),hj=A_(),tle=cj(),pj=T_(),X_=lj(),NS=fj(),yr=iv(),W_=class wd{static{o(this,"SignedXml")}constructor(e={}){this.signatureAlgorithm=void 0,this.canonicalizationAlgorithm=void 0,this.inclusiveNamespacesPrefixList=[],this.namespaceResolver={lookupNamespaceURI:o(function(){throw new Error("Not implemented")},"lookupNamespaceURI")},this.implicitTransforms=[],this.keyInfoAttributes={},this.getKeyInfoContent=wd.getKeyInfoContent,this.getCertFromKeyInfo=wd.getCertFromKeyInfo,this.id=0,this.signedXml="",this.signatureXml="",this.signatureNode=null,this.signatureValue="",this.originalXmlWithIds="",this.keyInfo=null,this.references=[],this.signedReferences=[],this.CanonicalizationAlgorithms={"http://www.w3.org/TR/2001/REC-xml-c14n-20010315":hj.C14nCanonicalization,"http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments":hj.C14nCanonicalizationWithComments,"http://www.w3.org/2001/10/xml-exc-c14n#":pj.ExclusiveCanonicalization,"http://www.w3.org/2001/10/xml-exc-c14n#WithComments":pj.ExclusiveCanonicalizationWithComments,"http://www.w3.org/2000/09/xmldsig#enveloped-signature":tle.EnvelopedSignature},this.HashAlgorithms={"http://www.w3.org/2000/09/xmldsig#sha1":X_.Sha1,"http://www.w3.org/2001/04/xmlenc#sha256":X_.Sha256,"http://www.w3.org/2001/04/xmlenc#sha512":X_.Sha512},this.SignatureAlgorithms={"http://www.w3.org/2000/09/xmldsig#rsa-sha1":NS.RsaSha1,"http://www.w3.org/2001/04/xmldsig-more#rsa-sha256":NS.RsaSha256,"http://www.w3.org/2001/04/xmldsig-more#rsa-sha512":NS.RsaSha512};let{idMode:t,idAttribute:n,privateKey:s,publicCert:i,signatureAlgorithm:a,canonicalizationAlgorithm:u,inclusiveNamespacesPrefixList:c,implicitTransforms:l,keyInfoAttributes:h,getKeyInfoContent:m,getCertFromKeyInfo:g}=e;this.idMode=t,this.idAttributes=["Id","ID","id"],n&&this.idAttributes.unshift(n),this.privateKey=s,this.publicCert=i,this.signatureAlgorithm=a??this.signatureAlgorithm,this.canonicalizationAlgorithm=u,typeof c=="string"?this.inclusiveNamespacesPrefixList=c.split(" "):yr.isArrayHasLength(c)&&(this.inclusiveNamespacesPrefixList=c),this.implicitTransforms=l??this.implicitTransforms,this.keyInfoAttributes=h??this.keyInfoAttributes,this.getKeyInfoContent=m??this.getKeyInfoContent,this.getCertFromKeyInfo=g??wd.noop,this.CanonicalizationAlgorithms,this.HashAlgorithms,this.SignatureAlgorithms}enableHMAC(){this.SignatureAlgorithms={"http://www.w3.org/2000/09/xmldsig#hmac-sha1":NS.HmacSha1},this.getKeyInfoContent=wd.noop}static getKeyInfoContent({publicCert:e,prefix:t}){if(e==null)return null;t=t?`${t}:`:"";let n="";Buffer.isBuffer(e)&&(e=e.toString("latin1"));let s=[];return typeof e=="string"&&(s=e.match(yr.EXTRACT_X509_CERTS)||[]),s.length>0&&(n=s.map(i=>`<${t}X509Certificate>${yr.pemToDer(i).toString("base64")}</${t}X509Certificate>`).join("")),`<${t}X509Data>${n}</${t}X509Data>`}static getCertFromKeyInfo(e){if(e!=null){let t=Ki.select1(".//*[local-name(.)='X509Certificate']",e);if(hi.isNodeLike(t))return yr.derToPem(t.textContent??"","CERTIFICATE")}return null}checkSignature(e,t){if(t!=null&&typeof t!="function")throw new Error("Last parameter must be a callback function");this.signedXml=e;let n=new mf.DOMParser().parseFromString(e);this.references=[];let s=this.getCanonSignedInfoXml(n);if(!s){if(t){t(new Error("Canonical signed info cannot be empty"),!1);return}throw new Error("Canonical signed info cannot be empty")}let a=new mf.DOMParser().parseFromString(s,"text/xml").documentElement;if(!a){if(t){t(new Error("Could not parse unverifiedSignedInfoCanon into a document"),!1);return}throw new Error("Could not parse unverifiedSignedInfoCanon into a document")}let u=yr.findChildren(a,"Reference");if(!yr.isArrayHasLength(u)){if(t){t(new Error("could not find any Reference elements"),!1);return}throw new Error("could not find any Reference elements")}for(let m of u)this.loadReference(m);if(!this.getReferences().every(m=>this.validateReference(m,n))){if(this.signedReferences=[],this.references.forEach(m=>{m.signedReference=void 0}),t){t(new Error("Could not validate all references"),!1);return}return!1}let c=this.findSignatureAlgorithm(this.signatureAlgorithm),l=this.getCertFromKeyInfo(this.keyInfo)||this.publicCert||this.privateKey;if(l==null)throw new Error("KeyInfo or publicCert or privateKey is required to validate signature");if(c.verifySignature(s,l,this.signatureValue)===!0)if(t)t(null,!0);else return!0;else if(this.signedReferences=[],this.references.forEach(m=>{m.signedReference=void 0}),t){t(new Error(`invalid signature: the signature value ${this.signatureValue} is incorrect`));return}else throw new Error(`invalid signature: the signature value ${this.signatureValue} is incorrect`)}getCanonSignedInfoXml(e){if(this.signatureNode==null)throw new Error("No signature found.");if(typeof this.canonicalizationAlgorithm!="string")throw new Error("Missing canonicalizationAlgorithm when trying to get signed info for XML");let t=yr.findChildren(this.signatureNode,"SignedInfo");if(t.length===0)throw new Error("could not find SignedInfo element in the message");if(t.length>1)throw new Error("could not get canonicalized signed info for a signature that contains multiple SignedInfo nodes");if((this.canonicalizationAlgorithm==="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"||this.canonicalizationAlgorithm==="http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments")&&(!e||typeof e!="object"))throw new Error("When canonicalization method is non-exclusive, whole xml dom must be provided as an argument");let s={ancestorNamespaces:yr.findAncestorNs(e,"//*[local-name()='SignedInfo']")};return this.getCanonXml([this.canonicalizationAlgorithm],t[0],s)}getCanonReferenceXml(e,t,n){Array.isArray(t.transforms)&&(t.ancestorNamespaces=yr.findAncestorNs(e,t.xpath,this.namespaceResolver));let s={inclusiveNamespacesPrefixList:t.inclusiveNamespacesPrefixList,ancestorNamespaces:t.ancestorNamespaces};return this.getCanonXml(t.transforms,n,s)}calculateSignatureValue(e,t){let n=this.getCanonSignedInfoXml(e),s=this.findSignatureAlgorithm(this.signatureAlgorithm);if(this.privateKey==null)throw new Error("Private key is required to compute signature");typeof t=="function"?s.getSignature(n,this.privateKey,t):this.signatureValue=s.getSignature(n,this.privateKey)}findSignatureAlgorithm(e){if(e==null)throw new Error("signatureAlgorithm is required");let t=this.SignatureAlgorithms[e];if(t)return new t;throw new Error(`signature algorithm '${e}' is not supported`)}findCanonicalizationAlgorithm(e){if(e!=null){let t=this.CanonicalizationAlgorithms[e];if(t)return new t}throw new Error(`canonicalization algorithm '${e}' is not supported`)}findHashAlgorithm(e){let t=this.HashAlgorithms[e];if(t)return new t;throw new Error(`hash algorithm '${e}' is not supported`)}validateElementAgainstReferences(e,t){let n;if(typeof e=="string"){let s=Ki.select1(e,t);hi.assertIsElementNode(s),n=s}else n=e;for(let s of this.getReferences()){let i=s.uri?.[0]==="#"?s.uri.substring(1):s.uri;for(let l of this.idAttributes){let h=n.getAttribute(l);if(i===h){s.xpath=`//*[@*[local-name(.)='${l}']='${i}']`;break}}let a=this.getCanonReferenceXml(t,s,n),c=this.findHashAlgorithm(s.digestAlgorithm).getHash(a);if(yr.validateDigestValue(c,s.digestValue))return s}throw new Error("No references passed validation")}validateReference(e,t){let n=e.uri?.[0]==="#"?e.uri.substring(1):e.uri,s=null;if(n==="")s=Ki.select1("//*",t);else{if(n?.indexOf("'")!==-1)throw new Error("Cannot validate a uri with quotes inside it");{let c=0;for(let l of this.idAttributes){let h=`//*[@*[local-name(.)='${l}']='${n}']`,m=Ki.select(h,t);if(yr.isArrayHasLength(m)){if(c+=m.length,c>1)throw new Error("Cannot validate a document which contains multiple elements with the same value for the ID / Id / Id attributes, in order to prevent signature wrapping attack.");s=m[0],e.xpath=h}}}}if(e.getValidatedNode=(0,ele.deprecate)(c=>{if(c=c||e.xpath,typeof c!="string"||e.validationError!=null)return null;let l=Ki.select1(c,t);return hi.isNodeLike(l)?l:null},"`ref.getValidatedNode()` is deprecated and insecure. Use `ref.signedReference` or `this.getSignedReferences()` instead."),!hi.isNodeLike(s)){let c=new Error(`invalid signature: the signature references an element with uri ${e.uri} but could not find such element in the xml`);return e.validationError=c,!1}let i=this.getCanonReferenceXml(t,e,s),u=this.findHashAlgorithm(e.digestAlgorithm).getHash(i);if(!yr.validateDigestValue(u,e.digestValue)){let c=new Error(`invalid signature: for uri ${e.uri} calculated digest is ${u} but the xml to validate supplies digest ${e.digestValue}`);return e.validationError=c,!1}return this.signedReferences.push(i),e.signedReference=i,!0}findSignatures(e){let t=Ki.select("//*[local-name(.)='Signature' and namespace-uri(.)='http://www.w3.org/2000/09/xmldsig#']",e);return hi.isArrayOfNodes(t)?t:[]}loadSignature(e){typeof e=="string"?this.signatureNode=e=new mf.DOMParser().parseFromString(e):this.signatureNode=e,this.signatureXml=e.toString();let t=Ki.select1(".//*[local-name(.)='CanonicalizationMethod']/@Algorithm",e);if(!hi.isNodeLike(t))throw new Error("could not find CanonicalizationMethod/@Algorithm element");hi.isAttributeNode(t)&&(this.canonicalizationAlgorithm=t.value);let n=Ki.select1(".//*[local-name(.)='SignatureMethod']/@Algorithm",e);hi.isAttributeNode(n)&&(this.signatureAlgorithm=n.value);let s=yr.findChildren(this.signatureNode,"SignedInfo");if(!yr.isArrayHasLength(s))throw new Error("no signed info node found");if(s.length>1)throw new Error("could not load signature that contains multiple SignedInfo nodes");let i=this.canonicalizationAlgorithm;(!i||i==="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"||i==="http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments")&&(i="http://www.w3.org/2001/10/xml-exc-c14n#");let a=this.getCanonXml([i],s[0]),c=new mf.DOMParser().parseFromString(a,"text/xml").documentElement;this.references=[];let l=yr.findChildren(c,"Reference");if(!yr.isArrayHasLength(l))throw new Error("could not find any Reference elements");for(let g of l)this.loadReference(g);let h=Ki.select1(".//*[local-name(.)='SignatureValue']/text()",e);hi.isTextNode(h)&&(this.signatureValue=h.data.replace(/\r?\n/g,""));let m=Ki.select1(".//*[local-name(.)='KeyInfo']",e);hi.isNodeLike(m)&&(this.keyInfo=m)}loadReference(e){let t=yr.findChildren(e,"DigestMethod");if(t.length===0)throw new Error(`could not find DigestMethod in reference ${e.toString()}`);let n=t[0],s=yr.findAttr(n,"Algorithm");if(!s)throw new Error(`could not find Algorithm attribute in node ${n.toString()}`);let i=s.value;if(t=yr.findChildren(e,"DigestValue"),t.length===0)throw new Error(`could not find DigestValue node in reference ${e.toString()}`);if(t.length>1)throw new Error(`could not load reference for a node that contains multiple DigestValue nodes: ${e.toString()}`);let a=t[0].textContent;if(!a)throw new Error(`could not find the value of DigestValue in ${e.toString()}`);let u=[],c=[];if(t=yr.findChildren(e,"Transforms"),t.length!==0){let h=t[0],m=yr.findChildren(h,"Transform");for(let y of m){let v=yr.findAttr(y,"Algorithm");v&&u.push(v.value)}let g=yr.findChildren(m[m.length-1],"InclusiveNamespaces");yr.isArrayHasLength(g)&&(c=g.flatMap(y=>(y.getAttribute("PrefixList")??"").split(" ")).filter(y=>y.length>0))}yr.isArrayHasLength(this.implicitTransforms)&&this.implicitTransforms.forEach(function(h){u.push(h)}),(u.length===0||u[u.length-1]==="http://www.w3.org/2000/09/xmldsig#enveloped-signature")&&u.push("http://www.w3.org/TR/2001/REC-xml-c14n-20010315");let l=hi.isElementNode(e)&&e.getAttribute("URI")||void 0;this.addReference({transforms:u,digestAlgorithm:i,uri:l,digestValue:a,inclusiveNamespacesPrefixList:c,isEmptyUri:!1})}addReference({xpath:e,transforms:t,digestAlgorithm:n,uri:s="",digestValue:i,inclusiveNamespacesPrefixList:a=[],isEmptyUri:u=!1}){if(n==null)throw new Error("digestAlgorithm is required");if(!yr.isArrayHasLength(t))throw new Error("transforms must contain at least one transform algorithm");this.references.push({xpath:e,transforms:t,digestAlgorithm:n,uri:s,digestValue:i,inclusiveNamespacesPrefixList:a,isEmptyUri:u,getValidatedNode:o(()=>{throw new Error("Reference has not been validated yet; Did you call `sig.checkSignature()`?")},"getValidatedNode")})}getReferences(){return this.references}getSignedReferences(){return[...this.signedReferences]}computeSignature(e,t,n){let s;typeof t=="function"&&n==null?(s=t,t={}):(s=n,t=t??{});let i=new mf.DOMParser().parseFromString(e),a="xmlns",u=[],c,l=["append","prepend","before","after"],h=t.prefix,m=t.attrs||{},g=t.location||{},y=t.existingPrefixes||{};if(this.namespaceResolver={lookupNamespaceURI:o(function(B){return B?y[B]:null},"lookupNamespaceURI")},g.reference=g.reference||"/*",g.action=g.action||"append",l.indexOf(g.action)===-1){let B=new Error(`location.action option has an invalid action: ${g.action}, must be any of the following values: ${l.join(", ")}`);if(s){s(B);return}else throw B}h?(a+=`:${h}`,c=`${h}:`):c="",Object.keys(m).forEach(function(B){B!=="xmlns"&&B!==a&&u.push(`${B}="${m[B]}"`)}),u.push(`${a}="http://www.w3.org/2000/09/xmldsig#"`);let v=`<${c}Signature ${u.join(" ")}>`;v+=this.createSignedInfo(i,h),v+=this.getKeyInfo(h),v+=`</${c}Signature>`,this.originalXmlWithIds=i.toString();let E="";Object.keys(y).forEach(function(B){E+=`xmlns:${B}="${y[B]}" `});let w=`<Dummy ${E}>${v}</Dummy>`,_=new mf.DOMParser().parseFromString(w).documentElement.firstChild,b=Ki.select1(g.reference,i);if(!hi.isNodeLike(b)){let B=new Error(`the following xpath cannot be used because it was not found: ${g.reference}`);if(s){s(B);return}else throw B}if(g.action==="append")b.appendChild(_);else if(g.action==="prepend")b.insertBefore(_,b.firstChild);else if(g.action==="before"){if(b.parentNode==null)throw new Error("`location.reference` refers to the root node (by default), so we can't insert `before`");b.parentNode.insertBefore(_,b)}else if(g.action==="after"){if(b.parentNode==null)throw new Error("`location.reference` refers to the root node (by default), so we can't insert `after`");b.parentNode.insertBefore(_,b.nextSibling)}this.signatureNode=_;let A=yr.findChildren(this.signatureNode,"SignedInfo");if(A.length===0){let B=new Error("could not find SignedInfo element in the message");if(s){s(B);return}else throw B}let T=A[0];typeof s=="function"?this.calculateSignatureValue(i,(B,M)=>{B?s(B):(this.signatureValue=M||"",_.insertBefore(this.createSignature(h),T.nextSibling),this.signatureXml=_.toString(),this.signedXml=i.toString(),s(null,this))}):(this.calculateSignatureValue(i),_.insertBefore(this.createSignature(h),T.nextSibling),this.signatureXml=_.toString(),this.signedXml=i.toString())}getKeyInfo(e){let t=e?`${e}:`:"",n="";this.keyInfoAttributes&&Object.keys(this.keyInfoAttributes).forEach(i=>{n+=` ${i}="${this.keyInfoAttributes[i]}"`});let s=this.getKeyInfoContent({publicCert:this.publicCert,prefix:e});return n||s?`<${t}KeyInfo${n}>${s}</${t}KeyInfo>`:""}createReferences(e,t){let n="";t=t||"",t=t&&`${t}:`;for(let s of this.getReferences()){let i=Ki.selectWithResolver(s.xpath??"",e,this.namespaceResolver);if(!yr.isArrayHasLength(i))throw new Error(`the following xpath cannot be signed because it was not found: ${s.xpath}`);for(let a of i){if(s.isEmptyUri)n+=`<${t}Reference URI="">`;else{let l=this.ensureHasId(a);s.uri=l,n+=`<${t}Reference URI="#${l}">`}n+=`<${t}Transforms>`;for(let l of s.transforms||[]){let h=this.findCanonicalizationAlgorithm(l);n+=`<${t}Transform Algorithm="${h.getAlgorithmName()}"`,yr.isArrayHasLength(s.inclusiveNamespacesPrefixList)?(n+=">",n+=`<InclusiveNamespaces PrefixList="${s.inclusiveNamespacesPrefixList.join(" ")}" xmlns="${h.getAlgorithmName()}"/>`,n+=`</${t}Transform>`):n+=" />"}let u=this.getCanonReferenceXml(e,s,a),c=this.findHashAlgorithm(s.digestAlgorithm);n+=`</${t}Transforms><${t}DigestMethod Algorithm="${c.getAlgorithmName()}" /><${t}DigestValue>${c.getHash(u)}</${t}DigestValue></${t}Reference>`}}return n}getCanonXml(e,t,n={}){n.defaultNsForPrefix=n.defaultNsForPrefix??wd.defaultNsForPrefix,n.signatureNode=this.signatureNode;let i=t.cloneNode(!0);return e.forEach(a=>{hi.isNodeLike(i)&&(i=this.findCanonicalizationAlgorithm(a).process(i,n))}),i.toString()}ensureHasId(e){let t;if(this.idMode==="wssecurity"?t=yr.findAttr(e,"Id","http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"):this.idAttributes.some(s=>(t=yr.findAttr(e,s),!!t)),t)return t.value;let n=`_${this.id++}`;return this.idMode==="wssecurity"?(e.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:wsu","http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"),e.setAttributeNS("http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd","wsu:Id",n)):e.setAttribute("Id",n),n}createSignedInfo(e,t){if(typeof this.canonicalizationAlgorithm!="string")throw new Error("Missing canonicalizationAlgorithm when trying to create signed info for XML");let n=this.findCanonicalizationAlgorithm(this.canonicalizationAlgorithm),s=this.findSignatureAlgorithm(this.signatureAlgorithm),i;i=t||"",i=i&&`${i}:`;let a=`<${i}SignedInfo>`;return a+=`<${i}CanonicalizationMethod Algorithm="${n.getAlgorithmName()}"`,yr.isArrayHasLength(this.inclusiveNamespacesPrefixList)?(a+=">",a+=`<InclusiveNamespaces PrefixList="${this.inclusiveNamespacesPrefixList.join(" ")}" xmlns="${n.getAlgorithmName()}"/>`,a+=`</${i}CanonicalizationMethod>`):a+=" />",a+=`<${i}SignatureMethod Algorithm="${s.getAlgorithmName()}" />`,a+=this.createReferences(e,t),a+=`</${i}SignedInfo>`,a}createSignature(e){let t="xmlns";e?(t+=`:${e}`,e+=":"):e="";let n=`<${e}SignatureValue>${this.signatureValue}</${e}SignatureValue>`,s=`<${e}Signature ${t}="http://www.w3.org/2000/09/xmldsig#">${n}</${e}Signature>`;return new mf.DOMParser().parseFromString(s).documentElement.firstChild}getSignatureXml(){return this.signatureXml}getOriginalXmlWithIds(){return this.originalXmlWithIds}getSignedXml(){return this.signedXml}};TS.SignedXml=W_;W_.defaultNsForPrefix={ds:"http://www.w3.org/2000/09/xmldsig#"};W_.noop=()=>null});var z_=te(Hn=>{"use strict";var rle=Hn&&Hn.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(r,n,s)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),mj=Hn&&Hn.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&rle(e,r,t)};Object.defineProperty(Hn,"__esModule",{value:!0});Hn.SignedXml=Hn.ExclusiveCanonicalizationWithComments=Hn.ExclusiveCanonicalization=Hn.C14nCanonicalizationWithComments=Hn.C14nCanonicalization=void 0;var gj=A_();Object.defineProperty(Hn,"C14nCanonicalization",{enumerable:!0,get:o(function(){return gj.C14nCanonicalization},"get")});Object.defineProperty(Hn,"C14nCanonicalizationWithComments",{enumerable:!0,get:o(function(){return gj.C14nCanonicalizationWithComments},"get")});var vj=T_();Object.defineProperty(Hn,"ExclusiveCanonicalization",{enumerable:!0,get:o(function(){return vj.ExclusiveCanonicalization},"get")});Object.defineProperty(Hn,"ExclusiveCanonicalizationWithComments",{enumerable:!0,get:o(function(){return vj.ExclusiveCanonicalizationWithComments},"get")});var nle=dj();Object.defineProperty(Hn,"SignedXml",{enumerable:!0,get:o(function(){return nle.SignedXml},"get")});mj(G_(),Hn);mj(iv(),Hn)});var wj=te(_S=>{"use strict";Object.defineProperty(_S,"__esModule",{value:!0});_S.WSSecurityCert=void 0;var sle=Ge("crypto"),ile=z_();function ale(r,e){return new Date(r.getTime()+e*6e4)}o(ale,"addMinutes");function yj(r){return r.getUTCFullYear()+"-"+("0"+(r.getUTCMonth()+1)).slice(-2)+"-"+("0"+r.getUTCDate()).slice(-2)+"T"+("0"+r.getUTCHours()).slice(-2)+":"+("0"+r.getUTCMinutes()).slice(-2)+":"+("0"+r.getUTCSeconds()).slice(-2)+"Z"}o(yj,"dateStringForSOAP");function ole(){return yj(new Date)}o(ole,"generateCreated");function ule(){return yj(ale(new Date,10))}o(ule,"generateExpires");function IS(r,e,t){return[e.slice(0,t),r,e.slice(t)].join("")}o(IS,"insertStr");function cle(){return(0,sle.randomUUID)().replace(/-/gm,"")}o(cle,"generateId");function lle(r,e){for(let t of r)t.xpath===xj&&(t.xpath=e)}o(lle,"resolvePlaceholderInReferences");var yc="http://docs.oasis-open.org/wss/2004/01",xj="[[bodyXpath]]",fle=class{static{o(this,"WSSecurityCert")}constructor(e,t,n,s={}){if(this.signerOptions={},this.additionalReferences=[],this.excludeReferencesFromSigning=[],this.publicP12PEM=t.toString().replace("-----BEGIN CERTIFICATE-----","").replace("-----END CERTIFICATE-----","").replace(/(\r\n|\n|\r)/gm,""),this.signer=new ile.SignedXml({idMode:s?.signerOptions?.idMode,signatureAlgorithm:s?.signatureAlgorithm}),this.signer.digestAlgorithm=s.digestAlgorithm??"http://www.w3.org/2001/04/xmlenc#sha256",this.appendElement="",s.appendElement&&(this.appendElement=s.appendElement),s.signatureAlgorithm==="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"&&(this.signer.signatureAlgorithm=s.signatureAlgorithm,this.signer.addReference({xpath:xj,transforms:["http://www.w3.org/2001/10/xml-exc-c14n#"],digestAlgorithm:"http://www.w3.org/2001/04/xmlenc#sha256"})),s.signatureAlgorithm||(this.signer.signatureAlgorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"),this.signer.canonicalizationAlgorithm="http://www.w3.org/2001/10/xml-exc-c14n#",s.additionalReferences&&s.additionalReferences.length>0&&(this.additionalReferences=s.additionalReferences),s.excludeReferencesFromSigning&&s.excludeReferencesFromSigning.length>0&&(this.excludeReferencesFromSigning=s.excludeReferencesFromSigning),s.signerOptions){let{signerOptions:i}=s;this.signerOptions=i,this.signerOptions.existingPrefixes||(this.signerOptions.existingPrefixes={}),this.signerOptions.existingPrefixes&&!this.signerOptions.existingPrefixes.wsse&&(this.signerOptions.existingPrefixes.wsse=`${yc}/oasis-200401-wss-wssecurity-secext-1.0.xsd`)}else this.signerOptions={existingPrefixes:{wsse:`${yc}/oasis-200401-wss-wssecurity-secext-1.0.xsd`}};this.signer.privateKey={key:e,passphrase:n},this.x509Id=`x509-${cle()}`,this.hasTimeStamp=typeof s.hasTimeStamp>"u"?!0:!!s.hasTimeStamp,this.signatureTransformations=Array.isArray(s.signatureTransformations)?s.signatureTransformations:["http://www.w3.org/2000/09/xmldsig#enveloped-signature","http://www.w3.org/2001/10/xml-exc-c14n#"],this.signer.getKeyInfoContent=()=>`<wsse:SecurityTokenReference><wsse:Reference URI="#${this.x509Id}" ValueType="${yc}/oasis-200401-wss-x509-token-profile-1.0#X509v3"/></wsse:SecurityTokenReference>`}postProcess(e,t){this.created=ole(),this.expires=ule();let n="";this.hasTimeStamp&&(n=`<Timestamp xmlns="${yc}/oasis-200401-wss-wssecurity-utility-1.0.xsd"><Created>${this.created}</Created><Expires>${this.expires}</Expires></Timestamp>`);let s=`<wsse:BinarySecurityToken EncodingType="${yc}/oasis-200401-wss-soap-message-security-1.0#Base64Binary" ValueType="${yc}/oasis-200401-wss-x509-token-profile-1.0#X509v3" wsu:Id="${this.x509Id}">${this.publicP12PEM}</wsse:BinarySecurityToken>`+n+this.appendElement,i,a=`xmlns:wsse="${yc}/oasis-200401-wss-wssecurity-secext-1.0.xsd"`,u=`xmlns:wsu="${yc}/oasis-200401-wss-wssecurity-utility-1.0.xsd"`,c=e.indexOf("</wsse:Security>");if(c>-1){let v=/<wsse:Security( [^>]*)?>/,E=e.match(v),w="";E[0].includes(` ${t}:mustUnderstand="`)||(w+=`${t}:mustUnderstand="1" `),E[0].includes(a.substring(0,a.indexOf("=")))||(w+=`${a} `),E[0].includes(u.substring(0,a.indexOf("=")))||(w+=`${u} `);let C="<wsse:Security ",_=e.indexOf(C);e=IS(s,e,c),i=IS(w,e,_+C.length)}else{let v=`<wsse:Security ${a} ${u} ${t}:mustUnderstand="1">`+s+"</wsse:Security>";i=IS(v,e,e.indexOf(`</${t}:Header>`))}let l=this.signatureTransformations,h=`//*[name(.)='${t}:Body']`;lle(this.signer.references,h),!this.excludeReferencesFromSigning.some(v=>v==="Body")&&!(this.signer.references.filter(v=>v.xpath===h).length>0)&&this.signer.addReference({xpath:h,transforms:l,digestAlgorithm:this.signer.digestAlgorithm});for(let v of this.additionalReferences){let E=`//*[name(.)='${v}']`;!this.excludeReferencesFromSigning.some(w=>w===v)&&!(this.signer.references.filter(w=>w.xpath===E).length>0)&&this.signer.addReference({xpath:E,transforms:l,digestAlgorithm:this.signer.digestAlgorithm})}let m="//*[name(.)='wsse:Security']/*[local-name(.)='Timestamp']";!this.excludeReferencesFromSigning.some(v=>v==="Timestamp")&&this.hasTimeStamp&&!(this.signer.references.filter(v=>v.xpath===m).length>0)&&this.signer.addReference({xpath:m,transforms:l,digestAlgorithm:this.signer.digestAlgorithm}),this.signer.computeSignature(i,this.signerOptions);let g=this.signer.getOriginalXmlWithIds(),y=this.signer.getSignatureXml();return IS(y,g,g.indexOf("</wsse:Security>"))}};_S.WSSecurityCert=fle});var Aj=te(DS=>{"use strict";Object.defineProperty(DS,"__esModule",{value:!0});DS.WSSecurityCertWithToken=void 0;var hle=Ge("crypto"),ple=z_();function dle(r,e){return new Date(r.getTime()+e*6e4)}o(dle,"addMinutes");function Sj(r){return r.getUTCFullYear()+"-"+("0"+(r.getUTCMonth()+1)).slice(-2)+"-"+("0"+r.getUTCDate()).slice(-2)+"T"+("0"+r.getUTCHours()).slice(-2)+":"+("0"+r.getUTCMinutes()).slice(-2)+":"+("0"+r.getUTCSeconds()).slice(-2)+"Z"}o(Sj,"dateStringForSOAP");function mle(){return Sj(new Date)}o(mle,"generateCreated");function gle(){return Sj(dle(new Date,10))}o(gle,"generateExpires");function Ej(r,e,t){return[e.slice(0,t),r,e.slice(t)].join("")}o(Ej,"insertStr");function vle(){return(0,hle.randomUUID)().replace(/-/gm,"")}o(vle,"generateId");function yle(r,e){for(let t of r)t.xpath===bj&&(t.xpath=e)}o(yle,"resolvePlaceholderInReferences");var xc="http://docs.oasis-open.org/wss/2004/01",bj="[[bodyXpath]]",xle=class{static{o(this,"WSSecurityCertWithToken")}constructor(e){this.signerOptions={},this.additionalReferences=[],this.publicP12PEM=e.publicKey.toString().replace("-----BEGIN CERTIFICATE-----","").replace("-----END CERTIFICATE-----","").replace(/(\r\n|\n|\r)/gm,""),this.username=e.username,this.password=e.password,this.signer=new ple.SignedXml;let t=e.options||{};if(this.appendElement="",t.appendElement&&(this.appendElement=t.appendElement),t.signatureAlgorithm==="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"&&(this.signer.signatureAlgorithm=t.signatureAlgorithm,this.signer.addReference({xpath:bj,transforms:["http://www.w3.org/2001/10/xml-exc-c14n#"],digestAlgorithm:"http://www.w3.org/2001/04/xmlenc#sha256"})),t.signatureAlgorithm||(this.signer.signatureAlgorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"),this.signer.canonicalizationAlgorithm="http://www.w3.org/2001/10/xml-exc-c14n#",t.additionalReferences&&t.additionalReferences.length>0&&(this.additionalReferences=t.additionalReferences),t.signerOptions){let{signerOptions:n}=e.options;this.signerOptions=n,this.signerOptions.existingPrefixes||(this.signerOptions.existingPrefixes={}),this.signerOptions.existingPrefixes&&!this.signerOptions.existingPrefixes.wsse&&(this.signerOptions.existingPrefixes.wsse=`${xc}/oasis-200401-wss-wssecurity-secext-1.0.xsd`)}else this.signerOptions={existingPrefixes:{wsse:`${xc}/oasis-200401-wss-wssecurity-secext-1.0.xsd`}};this.signer.privateKey={key:e.privateKey,passphrase:e.keyPassword},this.x509Id=`x509-${vle()}`,this.hasTimeStamp=typeof t.hasTimeStamp>"u"?!0:!!t.hasTimeStamp,this.signatureTransformations=Array.isArray(t.signatureTransformations)?t.signatureTransformations:["http://www.w3.org/2000/09/xmldsig#enveloped-signature","http://www.w3.org/2001/10/xml-exc-c14n#"],this.signer.keyInfoProvider={},this.signer.getKeyInfo=()=>`<wsse:SecurityTokenReference><wsse:Reference URI="#${this.x509Id}" ValueType="${xc}/oasis-200401-wss-x509-token-profile-1.0#X509v3"/></wsse:SecurityTokenReference>`}postProcess(e,t){this.created=mle(),this.expires=gle();let n="";this.hasTimeStamp&&(n=`<Timestamp xmlns="${xc}/oasis-200401-wss-wssecurity-utility-1.0.xsd" Id="_1"><Created>${this.created}</Created><Expires>${this.expires}</Expires></Timestamp>`);let s="";this.username&&(s=`<wsse:UsernameToken wsu:Id="SecurityToken-${this.created}" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"><wsse:Username>${this.username}</wsse:Username> <wsse:Password>${this.password}</wsse:Password> </wsse:UsernameToken>`);let i=`<wsse:Security xmlns:wsse="${xc}/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="${xc}/oasis-200401-wss-wssecurity-utility-1.0.xsd" ${t}:mustUnderstand="1"><wsse:BinarySecurityToken EncodingType="${xc}/oasis-200401-wss-soap-message-security-1.0#Base64Binary" ValueType="${xc}/oasis-200401-wss-x509-token-profile-1.0#X509v3" wsu:Id="${this.x509Id}">${this.publicP12PEM}</wsse:BinarySecurityToken>`+s+n+this.appendElement+"</wsse:Security>",a=Ej(i,e,e.indexOf(`</${t}:Header>`)),u=this.signatureTransformations,c=`//*[name(.)='${t}:Body']`;yle(this.signer.references,c),this.signer.references.filter(h=>h.xpath===c).length>0||this.signer.addReference({xpath:c,transforms:u,digestAlgorithm:"http://www.w3.org/2001/04/xmlenc#sha256"});for(let h of this.additionalReferences){let m=`//*[name(.)='${h}']`;this.signer.references.filter(g=>g.xpath===m).length>0||this.signer.addReference({xpath:m,transforms:u,digestAlgorithm:"http://www.w3.org/2001/04/xmlenc#sha256"})}let l="//*[name(.)='wsse:Security']/*[local-name(.)='Timestamp']";return this.hasTimeStamp&&!(this.signer.references.filter(h=>h.xpath===l).length>0)&&this.signer.addReference({xpath:l,transforms:u,digestAlgorithm:"http://www.w3.org/2001/04/xmlenc#sha256"}),this.signer.computeSignature(a,this.signerOptions),Ej(this.signer.getSignatureXml(),a,a.indexOf("</wsse:Security>"))}};DS.WSSecurityCertWithToken=xle});var Cj=te(BS=>{"use strict";Object.defineProperty(BS,"__esModule",{value:!0});BS.WSSecurityPlusCert=void 0;var wle=class{static{o(this,"WSSecurityPlusCert")}constructor(e,t){this.wsSecurity=e,this.wsSecurityCert=t}postProcess(e,t){let n=this.wsSecurity.toXML(),s=e.indexOf(`</${t}:Header>`);return e=[e.slice(0,s),n,e.slice(s)].join(""),this.wsSecurityCert.postProcess(e,t)}};BS.WSSecurityPlusCert=wle});var J_=te(Is=>{"use strict";var Ele=Is&&Is.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(r,n,s)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),Wo=Is&&Is.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&Ele(e,r,t)};Object.defineProperty(Is,"__esModule",{value:!0});Wo(e6(),Is);Wo(r6(),Is);Wo(i6(),Is);Wo(o6(),Is);Wo(u6(),Is);Wo(c6(),Is);Wo(wj(),Is);Wo(Aj(),Is);Wo(Cj(),Is)});var Y_=te($i=>{"use strict";var Sle=$i&&$i.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(r,n,s)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),ble=$i&&$i.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),Ale=$i&&$i.__importStar||(function(){var r=o(function(e){return r=Object.getOwnPropertyNames||function(t){var n=[];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(n[n.length]=s);return n},r(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n=r(e),s=0;s<n.length;s++)n[s]!=="default"&&Sle(t,e,n[s]);return ble(t,e),t}})(),Cle=$i&&$i.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty($i,"__esModule",{value:!0});$i.Server=void 0;var Nle=Ge("events"),RS=Ale(Ge("url")),Tle=Cle(Ge("zlib"));function Ile(r){return typeof r.route=="function"&&typeof r.use=="function"}o(Ile,"isExpress");function Nj(r){return!!r&&typeof r.then=="function"}o(Nj,"isPromiseLike");function Tj(r){function e(t){return t<10?"0"+t:t}return o(e,"pad"),r.getUTCFullYear()+"-"+e(r.getUTCMonth()+1)+"-"+e(r.getUTCDate())+"T"+e(r.getUTCHours())+":"+e(r.getUTCMinutes())+":"+e(r.getUTCSeconds())+"Z"}o(Tj,"getDateString");var _le=class extends Nle.EventEmitter{static{o(this,"Server")}constructor(e,t,n,s,i){super(),i=i||{path:t,services:n},this.path=t,this.services=n,this.wsdl=s,this.suppressStack=i&&i.suppressStack,this.returnFault=i&&i.returnFault,this.onewayOptions=i&&i.oneWay||{},this.enableChunkedEncoding=i.enableChunkedEncoding===void 0?!0:!!i.enableChunkedEncoding,this.callback=i.callback?i.callback:()=>{},typeof t=="string"&&t[t.length-1]!=="/"?t+="/":t instanceof RegExp&&t.source[t.source.length-1]!=="/"&&(t=new RegExp(t.source+"(?:\\/|)")),s.onReady(a=>{if(Ile(e))e.route(t).all((u,c)=>{if(typeof this.authorizeConnection=="function"&&!this.authorizeConnection(u,c)){c.end();return}this._requestListener(u,c)}),this.callback(a,this);else{let u=e.listeners("request").slice();e.removeAllListeners("request"),e.addListener("request",(c,l)=>{if(typeof this.authorizeConnection=="function"&&!this.authorizeConnection(c,l)){l.end();return}let h=RS.parse(c.url).pathname;if(h[h.length-1]!=="/"&&(h+="/"),t===h||t instanceof RegExp&&h.match(t))this._requestListener(c,l);else for(let m=0,g=u.length;m<g;m++)u[m].call(this,c,l)}),this.callback(a,this)}}),this._initializeOptions(i)}addSoapHeader(e,t,n,s){return this.soapHeaders||(this.soapHeaders=[]),e=this._processSoapHeader(e,t,n,s),this.soapHeaders.push(e)-1}changeSoapHeader(e,t,n,s,i){this.soapHeaders||(this.soapHeaders=[]),t=this._processSoapHeader(t,n,s,i),this.soapHeaders[e]=t}getSoapHeaders(){return this.soapHeaders}clearSoapHeaders(){this.soapHeaders=null}_processSoapHeader(e,t,n,s){switch(typeof e){case"object":return this.wsdl.objectToXML(e,t,n,s,!0);case"function":{let i=this;return(...a)=>{let u=e.apply(null,[...a]);return typeof u=="object"?i.wsdl.objectToXML(u,t,n,s,!0):u}}default:return e}}_initializeOptions(e){this.wsdl.options.attributesKey=e.attributesKey||"attributes",this.onewayOptions.statusCode=this.onewayOptions.responseCode||200,this.onewayOptions.emptyBody=!!this.onewayOptions.emptyBody,this.wsdl.options.envelopeKey=e.envelopeKey||"soap"}_processRequestXml(e,t,n){let s;try{typeof this.log=="function"&&this.log("received",n,e),this._process(n,e,t,(i,a)=>{this._sendHttpResponse(t,a,i),typeof this.log=="function"&&this.log("replied",i,e)})}catch(i){if(i.Fault!==void 0)return this._sendError(i.Fault,(a,u)=>{this._sendHttpResponse(t,u||500,a),typeof this.log=="function"&&this.log("error",i,e)},new Date().toISOString());s=i.stack?this.suppressStack===!0?i.message:i.stack:i,this._sendHttpResponse(t,500,s),typeof this.log=="function"&&this.log("error",i,e)}}_requestListener(e,t){let s=RS.parse(e.url).search;if(typeof this.log=="function"&&this.log("info","Handling "+e.method+" on "+e.url,e),e.method==="GET")s&&s.toLowerCase().startsWith("?wsdl")&&(typeof this.log=="function"&&this.log("info","Wants the WSDL",e),t.setHeader("Content-Type","application/xml"),t.write(this.wsdl.toXML())),t.end();else if(e.method==="POST"){if(typeof e.headers["content-type"]<"u"?t.setHeader("Content-Type",e.headers["content-type"]):t.setHeader("Content-Type","application/xml"),e.body&&e.body.length>0)return this._processRequestXml(e,t,e.body.toString());let i=[],a,u=e;e.headers["content-encoding"]==="gzip"&&(a=Tle.default.createGunzip(),e.pipe(a),u=a),u.on("data",c=>{i.push(c)}),u.on("end",()=>{let c=Buffer.concat(i).toString();this._processRequestXml(e,t,c)})}else t.end()}_getSoapAction(e){if(typeof e.headers.soapaction>"u")return;let t=e.headers.soapaction;return t.indexOf('"')===0?t.slice(1,-1):t}_process(e,t,n,s){let i=RS.parse(t.url).pathname.replace(/\/$/,""),a=this.wsdl.xmlToObject(e),u=a.Body,c=a.Header,l,h,m,g,y=a.Header&&a.Header.Security&&a.Header.Security.Timestamp,v=this.authenticate||o(function(){return!0},"defaultAuthenticate"),E=o((C,_)=>{let b={result:C};this.emit("response",b,h),s(b.result,_)},"callback"),w=o(()=>{if(typeof this.log=="function"&&this.log("info","Attempting to bind to "+i,t),!u)throw new Error("Failed to parse the SOAP Message body");if(l=(()=>{let C=this.wsdl.definitions.services,_,b;for(b in C){m=b;let T=C[m].ports;for(b in T){g=b;let B=T[g],M=RS.parse(B.location).pathname.replace(/\/$/,"");if(typeof this.log=="function"&&this.log("info","Trying "+g+" from path "+M,t),M===i)return B.binding;_||(_=B)}}return _?_.binding:void 0})(),!l)throw new Error("Failed to bind to WSDL");try{let C=this._getSoapAction(t),_=Object.keys(u)[0]==="attributes"?Object.keys(u)[1]:Object.keys(u)[0],b=l.topElements[_];C?h=this._getMethodNameBySoapAction(l,C):h=b?b.methodName:_;let A=l.methods[h].style||l.style;this.emit("request",a,h),c&&this.emit("headers",c,h),A==="rpc"?this._executeMethod({serviceName:m,portName:g,methodName:h,outputName:_+"Response",args:u[_],headers:c,style:"rpc"},t,n,E):this._executeMethod({serviceName:m,portName:g,methodName:h,outputName:b.outputName,args:u[_],headers:c,style:"document"},t,n,E,y)}catch(C){if(C.Fault!==void 0)return this._sendError(C.Fault,E,y);throw C}},"process");if(typeof v=="function"){let C=!1,_=o(A=>{if(!C){if(C=!0,A instanceof Error)return this._sendError({Code:{Value:"SOAP-ENV:Server",Subcode:{Value:"InternalServerError"}},Reason:{Text:A.toString()},statusCode:500},E,y);if(typeof A=="boolean")if(A===!0)try{w()}catch(T){return T.Fault!==void 0?this._sendError(T.Fault,E,y):this._sendError({Code:{Value:"SOAP-ENV:Server",Subcode:{Value:"InternalServerError"}},Reason:{Text:T.toString()},statusCode:500},E,y)}else return this._sendError({Code:{Value:"SOAP-ENV:Client",Subcode:{Value:"AuthenticationFailure"}},Reason:{Text:"Invalid username or password"},statusCode:401},E,y)}},"processAuthResult"),b=v(a.Header&&a.Header.Security,_,t,a);Nj(b)&&b.then(A=>{_(A)},A=>{_(A)}),typeof b=="boolean"&&_(b)}else throw new Error("Invalid authenticate function (not a function)")}_getMethodNameBySoapAction(e,t){for(let n in e.methods)if(e.methods[n].soapAction===t)return n}_executeMethod(e,t,n,s,i){e=e||{};let a,u,c,l=e.serviceName,h=e.portName,m=this.wsdl.definitions.services[l].ports[h].binding,g=e.methodName,y=e.outputName,v=e.args,E=e.style;this.soapHeaders&&(c=this.soapHeaders.map(A=>typeof A=="function"?A(g,v,e.headers,t,n,this):A).join(`
|
|
74
|
-
`));try{a=this.services[l][h][g]}catch{return s(this._envelope("",c,i))}let w=!1,C=o((A,T)=>{if(!w){if(w=!0,A)return A.Fault!==void 0?this._sendError(A.Fault,s,i):this._sendError({Code:{Value:"SOAP-ENV:Server",Subcode:{Value:"InternalServerError"}},Reason:{Text:A.toString()},statusCode:500},s,i);if(E==="rpc")u=this.wsdl.objectToRpcXML(y,T,"",this.wsdl.definitions.$targetNamespace);else if(E==="document"){let B=m.methods[g].output;u=this.wsdl.objectToDocumentXML(y,T,B.targetNSAlias,B.targetNamespace)}else{let B=m.methods[g].output,M=B.$targetNamespace,I=y;M&&(I=`${M}:${I}`),u=this.wsdl.objectToDocumentXML(I,T,B.targetNSAlias,B.targetNamespace)}s(this._envelope(u,c,i))}},"handleResult");m.methods[g].output||(w=!0,u="",this.onewayOptions.emptyBody&&(u=this._envelope("",c,i)),s(u,this.onewayOptions.responseCode));let _=o((A,T)=>{A&&A.Fault!==void 0||T===void 0&&(T=A,A=null),C(A,T)},"methodCallback"),b=a.apply(this,[v,_,e.headers,t,n]);typeof b<"u"&&(Nj(b)?b.then(A=>{C(null,A)},A=>{C(A)}):C(null,b))}_envelope(e,t,n){let i=this.wsdl.options.envelopeKey,a=this.wsdl.options.forceSoap12Headers?"http://www.w3.org/2003/05/soap-envelope":"http://schemas.xmlsoap.org/soap/envelope/",u='<?xml version="1.0" encoding="utf-8"?><'+i+":Envelope xmlns:"+i+'="'+a+'" '+this.wsdl.xmlnsInEnvelope+">";if(t=t||"",n){let c=new Date,l=Tj(c),h=Tj(new Date(c.getTime()+1e3*600));t+='<o:Security soap:mustUnderstand="1" xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"> <u:Timestamp u:Id="_0"> <u:Created>'+l+"</u:Created> <u:Expires>"+h+`</u:Expires> </u:Timestamp> </o:Security>
|
|
75
|
-
`}return t!==""&&(u+="<"+i+":Header>"+t+"</"+i+":Header>"),u+=e?"<"+i+":Body>"+e+"</"+i+":Body>":"<"+i+":Body/>",u+="</"+i+":Envelope>",u}_sendError(e,t,n){let s,i=this.wsdl.options.envelopeKey,a;return e.statusCode&&(a=e.statusCode,e.statusCode=void 0),"faultcode"in e?s=this.wsdl.objectToDocumentXML(i+":Fault",e,void 0):s=this.wsdl.objectToDocumentXML("Fault",e,i),t(this._envelope(s,"",n),a)}_sendHttpResponse(e,t,n){t&&(e.statusCode=t),this.enableChunkedEncoding?(e.write(n),e.end()):e.end(n)}};$i.Server=_le});var Ij=te(OS=>{"use strict";(function(r){r.parser=function(N,S){return new t(N,S)},r.SAXParser=t,r.SAXStream=l,r.createStream=c,r.MAX_BUFFER_LENGTH=64*1024;var e=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];r.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function t(N,S){if(!(this instanceof t))return new t(N,S);var G=this;s(G),G.q=G.c="",G.bufferCheckPosition=r.MAX_BUFFER_LENGTH,G.opt=S||{},G.opt.lowercase=G.opt.lowercase||G.opt.lowercasetags,G.looseCase=G.opt.lowercase?"toLowerCase":"toUpperCase",G.tags=[],G.closed=G.closedRoot=G.sawRoot=!1,G.tag=G.error=null,G.strict=!!N,G.noscript=!!(N||G.opt.noscript),G.state=I.BEGIN,G.strictEntities=G.opt.strictEntities,G.ENTITIES=G.strictEntities?Object.create(r.XML_ENTITIES):Object.create(r.ENTITIES),G.attribList=[],G.opt.xmlns&&(G.ns=Object.create(v)),G.opt.unquotedAttributeValues===void 0&&(G.opt.unquotedAttributeValues=!N),G.trackPosition=G.opt.position!==!1,G.trackPosition&&(G.position=G.line=G.column=0),K(G,"onready")}o(t,"SAXParser"),Object.create||(Object.create=function(N){function S(){}o(S,"F"),S.prototype=N;var G=new S;return G}),Object.keys||(Object.keys=function(N){var S=[];for(var G in N)N.hasOwnProperty(G)&&S.push(G);return S});function n(N){for(var S=Math.max(r.MAX_BUFFER_LENGTH,10),G=0,P=0,Ee=e.length;P<Ee;P++){var Ce=N[e[P]].length;if(Ce>S)switch(e[P]){case"textNode":W(N);break;case"cdata":q(N,"oncdata",N.cdata),N.cdata="";break;case"script":q(N,"onscript",N.script),N.script="";break;default:pe(N,"Max buffer length exceeded: "+e[P])}G=Math.max(G,Ce)}var Ae=r.MAX_BUFFER_LENGTH-G;N.bufferCheckPosition=Ae+N.position}o(n,"checkBufferLength");function s(N){for(var S=0,G=e.length;S<G;S++)N[e[S]]=""}o(s,"clearBuffers");function i(N){W(N),N.cdata!==""&&(q(N,"oncdata",N.cdata),N.cdata=""),N.script!==""&&(q(N,"onscript",N.script),N.script="")}o(i,"flushBuffers"),t.prototype={end:o(function(){ue(this)},"end"),write:rt,resume:o(function(){return this.error=null,this},"resume"),close:o(function(){return this.write(null)},"close"),flush:o(function(){i(this)},"flush")};var a;try{a=Ge("stream").Stream}catch{a=o(function(){},"Stream")}a||(a=o(function(){},"Stream"));var u=r.EVENTS.filter(function(N){return N!=="error"&&N!=="end"});function c(N,S){return new l(N,S)}o(c,"createStream");function l(N,S){if(!(this instanceof l))return new l(N,S);a.apply(this),this._parser=new t(N,S),this.writable=!0,this.readable=!0;var G=this;this._parser.onend=function(){G.emit("end")},this._parser.onerror=function(P){G.emit("error",P),G._parser.error=null},this._decoder=null,u.forEach(function(P){Object.defineProperty(G,"on"+P,{get:o(function(){return G._parser["on"+P]},"get"),set:o(function(Ee){if(!Ee)return G.removeAllListeners(P),G._parser["on"+P]=Ee,Ee;G.on(P,Ee)},"set"),enumerable:!0,configurable:!1})})}o(l,"SAXStream"),l.prototype=Object.create(a.prototype,{constructor:{value:l}}),l.prototype.write=function(N){return typeof Buffer=="function"&&typeof Buffer.isBuffer=="function"&&Buffer.isBuffer(N)&&(this._decoder||(this._decoder=new TextDecoder("utf8")),N=this._decoder.decode(N,{stream:!0})),this._parser.write(N.toString()),this.emit("data",N),!0},l.prototype.end=function(N){if(N&&N.length&&this.write(N),this._decoder){var S=this._decoder.decode();S&&(this._parser.write(S),this.emit("data",S))}return this._parser.end(),!0},l.prototype.on=function(N,S){var G=this;return!G._parser["on"+N]&&u.indexOf(N)!==-1&&(G._parser["on"+N]=function(){var P=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);P.splice(0,0,N),G.emit.apply(G,P)}),a.prototype.on.call(G,N,S)};var h="[CDATA[",m="DOCTYPE",g="http://www.w3.org/XML/1998/namespace",y="http://www.w3.org/2000/xmlns/",v={xml:g,xmlns:y},E=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,w=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,C=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,_=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function b(N){return N===" "||N===`
|
|
76
|
-
`||N==="\r"||N===" "}o(b,"isWhitespace");function A(N){return N==='"'||N==="'"}o(A,"isQuote");function T(N){return N===">"||b(N)}o(T,"isAttribEnd");function B(N,S){return N.test(S)}o(B,"isMatch");function M(N,S){return!B(N,S)}o(M,"notMatch");var I=0;r.STATE={BEGIN:I++,BEGIN_WHITESPACE:I++,TEXT:I++,TEXT_ENTITY:I++,OPEN_WAKA:I++,SGML_DECL:I++,SGML_DECL_QUOTED:I++,DOCTYPE:I++,DOCTYPE_QUOTED:I++,DOCTYPE_DTD:I++,DOCTYPE_DTD_QUOTED:I++,COMMENT_STARTING:I++,COMMENT:I++,COMMENT_ENDING:I++,COMMENT_ENDED:I++,CDATA:I++,CDATA_ENDING:I++,CDATA_ENDING_2:I++,PROC_INST:I++,PROC_INST_BODY:I++,PROC_INST_ENDING:I++,OPEN_TAG:I++,OPEN_TAG_SLASH:I++,ATTRIB:I++,ATTRIB_NAME:I++,ATTRIB_NAME_SAW_WHITE:I++,ATTRIB_VALUE:I++,ATTRIB_VALUE_QUOTED:I++,ATTRIB_VALUE_CLOSED:I++,ATTRIB_VALUE_UNQUOTED:I++,ATTRIB_VALUE_ENTITY_Q:I++,ATTRIB_VALUE_ENTITY_U:I++,CLOSE_TAG:I++,CLOSE_TAG_SAW_WHITE:I++,SCRIPT:I++,SCRIPT_ENDING:I++},r.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},r.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(r.ENTITIES).forEach(function(N){var S=r.ENTITIES[N],G=typeof S=="number"?String.fromCharCode(S):S;r.ENTITIES[N]=G});for(var H in r.STATE)r.STATE[r.STATE[H]]=H;I=r.STATE;function K(N,S,G){N[S]&&N[S](G)}o(K,"emit");function q(N,S,G){N.textNode&&W(N),K(N,S,G)}o(q,"emitNode");function W(N){N.textNode=he(N.opt,N.textNode),N.textNode&&K(N,"ontext",N.textNode),N.textNode=""}o(W,"closeText");function he(N,S){return N.trim&&(S=S.trim()),N.normalize&&(S=S.replace(/\s+/g," ")),S}o(he,"textopts");function pe(N,S){return W(N),N.trackPosition&&(S+=`
|
|
77
|
-
Line: `+N.line+`
|
|
78
|
-
Column: `+N.column+`
|
|
79
|
-
Char: `+N.c),S=new Error(S),N.error=S,K(N,"onerror",S),N}o(pe,"error");function ue(N){return N.sawRoot&&!N.closedRoot&&Y(N,"Unclosed root tag"),N.state!==I.BEGIN&&N.state!==I.BEGIN_WHITESPACE&&N.state!==I.TEXT&&pe(N,"Unexpected end"),W(N),N.c="",N.closed=!0,K(N,"onend"),t.call(N,N.strict,N.opt),N}o(ue,"end");function Y(N,S){if(typeof N!="object"||!(N instanceof t))throw new Error("bad call to strictFail");N.strict&&pe(N,S)}o(Y,"strictFail");function ve(N){N.strict||(N.tagName=N.tagName[N.looseCase]());var S=N.tags[N.tags.length-1]||N,G=N.tag={name:N.tagName,attributes:{}};N.opt.xmlns&&(G.ns=S.ns),N.attribList.length=0,q(N,"onopentagstart",G)}o(ve,"newTag");function Oe(N,S){var G=N.indexOf(":"),P=G<0?["",N]:N.split(":"),Ee=P[0],Ce=P[1];return S&&N==="xmlns"&&(Ee="xmlns",Ce=""),{prefix:Ee,local:Ce}}o(Oe,"qname");function Je(N){if(N.strict||(N.attribName=N.attribName[N.looseCase]()),N.attribList.indexOf(N.attribName)!==-1||N.tag.attributes.hasOwnProperty(N.attribName)){N.attribName=N.attribValue="";return}if(N.opt.xmlns){var S=Oe(N.attribName,!0),G=S.prefix,P=S.local;if(G==="xmlns")if(P==="xml"&&N.attribValue!==g)Y(N,"xml: prefix must be bound to "+g+`
|
|
80
|
-
Actual: `+N.attribValue);else if(P==="xmlns"&&N.attribValue!==y)Y(N,"xmlns: prefix must be bound to "+y+`
|
|
81
|
-
Actual: `+N.attribValue);else{var Ee=N.tag,Ce=N.tags[N.tags.length-1]||N;Ee.ns===Ce.ns&&(Ee.ns=Object.create(Ce.ns)),Ee.ns[P]=N.attribValue}N.attribList.push([N.attribName,N.attribValue])}else N.tag.attributes[N.attribName]=N.attribValue,q(N,"onattribute",{name:N.attribName,value:N.attribValue});N.attribName=N.attribValue=""}o(Je,"attrib");function ne(N,S){if(N.opt.xmlns){var G=N.tag,P=Oe(N.tagName);G.prefix=P.prefix,G.local=P.local,G.uri=G.ns[P.prefix]||"",G.prefix&&!G.uri&&(Y(N,"Unbound namespace prefix: "+JSON.stringify(N.tagName)),G.uri=P.prefix);var Ee=N.tags[N.tags.length-1]||N;G.ns&&Ee.ns!==G.ns&&Object.keys(G.ns).forEach(function(Nn){q(N,"onopennamespace",{prefix:Nn,uri:G.ns[Nn]})});for(var Ce=0,Ae=N.attribList.length;Ce<Ae;Ce++){var Ye=N.attribList[Ce],Tt=Ye[0],Me=Ye[1],St=Oe(Tt,!0),Yr=St.prefix,Qe=St.local,Dr=Yr===""?"":G.ns[Yr]||"",Gr={name:Tt,value:Me,prefix:Yr,local:Qe,uri:Dr};Yr&&Yr!=="xmlns"&&!Dr&&(Y(N,"Unbound namespace prefix: "+JSON.stringify(Yr)),Gr.uri=Yr),N.tag.attributes[Tt]=Gr,q(N,"onattribute",Gr)}N.attribList.length=0}N.tag.isSelfClosing=!!S,N.sawRoot=!0,N.tags.push(N.tag),q(N,"onopentag",N.tag),S||(!N.noscript&&N.tagName.toLowerCase()==="script"?N.state=I.SCRIPT:N.state=I.TEXT,N.tag=null,N.tagName=""),N.attribName=N.attribValue="",N.attribList.length=0}o(ne,"openTag");function Z(N){if(!N.tagName){Y(N,"Weird empty close tag."),N.textNode+="</>",N.state=I.TEXT;return}if(N.script){if(N.tagName!=="script"){N.script+="</"+N.tagName+">",N.tagName="",N.state=I.SCRIPT;return}q(N,"onscript",N.script),N.script=""}var S=N.tags.length,G=N.tagName;N.strict||(G=G[N.looseCase]());for(var P=G;S--;){var Ee=N.tags[S];if(Ee.name!==P)Y(N,"Unexpected close tag");else break}if(S<0){Y(N,"Unmatched closing tag: "+N.tagName),N.textNode+="</"+N.tagName+">",N.state=I.TEXT;return}N.tagName=G;for(var Ce=N.tags.length;Ce-- >S;){var Ae=N.tag=N.tags.pop();N.tagName=N.tag.name,q(N,"onclosetag",N.tagName);var Ye={};for(var Tt in Ae.ns)Ye[Tt]=Ae.ns[Tt];var Me=N.tags[N.tags.length-1]||N;N.opt.xmlns&&Ae.ns!==Me.ns&&Object.keys(Ae.ns).forEach(function(St){var Yr=Ae.ns[St];q(N,"onclosenamespace",{prefix:St,uri:Yr})})}S===0&&(N.closedRoot=!0),N.tagName=N.attribValue=N.attribName="",N.attribList.length=0,N.state=I.TEXT}o(Z,"closeTag");function Se(N){var S=N.entity,G=S.toLowerCase(),P,Ee="";return N.ENTITIES[S]?N.ENTITIES[S]:N.ENTITIES[G]?N.ENTITIES[G]:(S=G,S.charAt(0)==="#"&&(S.charAt(1)==="x"?(S=S.slice(2),P=parseInt(S,16),Ee=P.toString(16)):(S=S.slice(1),P=parseInt(S,10),Ee=P.toString(10))),S=S.replace(/^0+/,""),isNaN(P)||Ee.toLowerCase()!==S||P<0||P>1114111?(Y(N,"Invalid character entity"),"&"+N.entity+";"):String.fromCodePoint(P))}o(Se,"parseEntity");function He(N,S){S==="<"?(N.state=I.OPEN_WAKA,N.startTagPosition=N.position):b(S)||(Y(N,"Non-whitespace before first tag."),N.textNode=S,N.state=I.TEXT)}o(He,"beginWhiteSpace");function Le(N,S){var G="";return S<N.length&&(G=N.charAt(S)),G}o(Le,"charAt");function rt(N){var S=this;if(this.error)throw this.error;if(S.closed)return pe(S,"Cannot write after close. Assign an onready handler.");if(N===null)return ue(S);typeof N=="object"&&(N=N.toString());for(var G=0,P="";P=Le(N,G++),S.c=P,!!P;)switch(S.trackPosition&&(S.position++,P===`
|
|
82
|
-
`?(S.line++,S.column=0):S.column++),S.state){case I.BEGIN:if(S.state=I.BEGIN_WHITESPACE,P==="\uFEFF")continue;He(S,P);continue;case I.BEGIN_WHITESPACE:He(S,P);continue;case I.TEXT:if(S.sawRoot&&!S.closedRoot){for(var Ce=G-1;P&&P!=="<"&&P!=="&";)P=Le(N,G++),P&&S.trackPosition&&(S.position++,P===`
|
|
83
|
-
`?(S.line++,S.column=0):S.column++);S.textNode+=N.substring(Ce,G-1)}P==="<"&&!(S.sawRoot&&S.closedRoot&&!S.strict)?(S.state=I.OPEN_WAKA,S.startTagPosition=S.position):(!b(P)&&(!S.sawRoot||S.closedRoot)&&Y(S,"Text data outside of root node."),P==="&"?S.state=I.TEXT_ENTITY:S.textNode+=P);continue;case I.SCRIPT:P==="<"?S.state=I.SCRIPT_ENDING:S.script+=P;continue;case I.SCRIPT_ENDING:P==="/"?S.state=I.CLOSE_TAG:(S.script+="<"+P,S.state=I.SCRIPT);continue;case I.OPEN_WAKA:if(P==="!")S.state=I.SGML_DECL,S.sgmlDecl="";else if(!b(P))if(B(E,P))S.state=I.OPEN_TAG,S.tagName=P;else if(P==="/")S.state=I.CLOSE_TAG,S.tagName="";else if(P==="?")S.state=I.PROC_INST,S.procInstName=S.procInstBody="";else{if(Y(S,"Unencoded <"),S.startTagPosition+1<S.position){var Ee=S.position-S.startTagPosition;P=new Array(Ee).join(" ")+P}S.textNode+="<"+P,S.state=I.TEXT}continue;case I.SGML_DECL:if(S.sgmlDecl+P==="--"){S.state=I.COMMENT,S.comment="",S.sgmlDecl="";continue}S.doctype&&S.doctype!==!0&&S.sgmlDecl?(S.state=I.DOCTYPE_DTD,S.doctype+="<!"+S.sgmlDecl+P,S.sgmlDecl=""):(S.sgmlDecl+P).toUpperCase()===h?(q(S,"onopencdata"),S.state=I.CDATA,S.sgmlDecl="",S.cdata=""):(S.sgmlDecl+P).toUpperCase()===m?(S.state=I.DOCTYPE,(S.doctype||S.sawRoot)&&Y(S,"Inappropriately located doctype declaration"),S.doctype="",S.sgmlDecl=""):P===">"?(q(S,"onsgmldeclaration",S.sgmlDecl),S.sgmlDecl="",S.state=I.TEXT):(A(P)&&(S.state=I.SGML_DECL_QUOTED),S.sgmlDecl+=P);continue;case I.SGML_DECL_QUOTED:P===S.q&&(S.state=I.SGML_DECL,S.q=""),S.sgmlDecl+=P;continue;case I.DOCTYPE:P===">"?(S.state=I.TEXT,q(S,"ondoctype",S.doctype),S.doctype=!0):(S.doctype+=P,P==="["?S.state=I.DOCTYPE_DTD:A(P)&&(S.state=I.DOCTYPE_QUOTED,S.q=P));continue;case I.DOCTYPE_QUOTED:S.doctype+=P,P===S.q&&(S.q="",S.state=I.DOCTYPE);continue;case I.DOCTYPE_DTD:P==="]"?(S.doctype+=P,S.state=I.DOCTYPE):P==="<"?(S.state=I.OPEN_WAKA,S.startTagPosition=S.position):A(P)?(S.doctype+=P,S.state=I.DOCTYPE_DTD_QUOTED,S.q=P):S.doctype+=P;continue;case I.DOCTYPE_DTD_QUOTED:S.doctype+=P,P===S.q&&(S.state=I.DOCTYPE_DTD,S.q="");continue;case I.COMMENT:P==="-"?S.state=I.COMMENT_ENDING:S.comment+=P;continue;case I.COMMENT_ENDING:P==="-"?(S.state=I.COMMENT_ENDED,S.comment=he(S.opt,S.comment),S.comment&&q(S,"oncomment",S.comment),S.comment=""):(S.comment+="-"+P,S.state=I.COMMENT);continue;case I.COMMENT_ENDED:P!==">"?(Y(S,"Malformed comment"),S.comment+="--"+P,S.state=I.COMMENT):S.doctype&&S.doctype!==!0?S.state=I.DOCTYPE_DTD:S.state=I.TEXT;continue;case I.CDATA:for(var Ce=G-1;P&&P!=="]";)P=Le(N,G++),P&&S.trackPosition&&(S.position++,P===`
|
|
84
|
-
`?(S.line++,S.column=0):S.column++);S.cdata+=N.substring(Ce,G-1),P==="]"&&(S.state=I.CDATA_ENDING);continue;case I.CDATA_ENDING:P==="]"?S.state=I.CDATA_ENDING_2:(S.cdata+="]"+P,S.state=I.CDATA);continue;case I.CDATA_ENDING_2:P===">"?(S.cdata&&q(S,"oncdata",S.cdata),q(S,"onclosecdata"),S.cdata="",S.state=I.TEXT):P==="]"?S.cdata+="]":(S.cdata+="]]"+P,S.state=I.CDATA);continue;case I.PROC_INST:P==="?"?S.state=I.PROC_INST_ENDING:b(P)?S.state=I.PROC_INST_BODY:S.procInstName+=P;continue;case I.PROC_INST_BODY:if(!S.procInstBody&&b(P))continue;P==="?"?S.state=I.PROC_INST_ENDING:S.procInstBody+=P;continue;case I.PROC_INST_ENDING:P===">"?(q(S,"onprocessinginstruction",{name:S.procInstName,body:S.procInstBody}),S.procInstName=S.procInstBody="",S.state=I.TEXT):(S.procInstBody+="?"+P,S.state=I.PROC_INST_BODY);continue;case I.OPEN_TAG:B(w,P)?S.tagName+=P:(ve(S),P===">"?ne(S):P==="/"?S.state=I.OPEN_TAG_SLASH:(b(P)||Y(S,"Invalid character in tag name"),S.state=I.ATTRIB));continue;case I.OPEN_TAG_SLASH:P===">"?(ne(S,!0),Z(S)):(Y(S,"Forward-slash in opening tag not followed by >"),S.state=I.ATTRIB);continue;case I.ATTRIB:if(b(P))continue;P===">"?ne(S):P==="/"?S.state=I.OPEN_TAG_SLASH:B(E,P)?(S.attribName=P,S.attribValue="",S.state=I.ATTRIB_NAME):Y(S,"Invalid attribute name");continue;case I.ATTRIB_NAME:P==="="?S.state=I.ATTRIB_VALUE:P===">"?(Y(S,"Attribute without value"),S.attribValue=S.attribName,Je(S),ne(S)):b(P)?S.state=I.ATTRIB_NAME_SAW_WHITE:B(w,P)?S.attribName+=P:Y(S,"Invalid attribute name");continue;case I.ATTRIB_NAME_SAW_WHITE:if(P==="=")S.state=I.ATTRIB_VALUE;else{if(b(P))continue;Y(S,"Attribute without value"),S.tag.attributes[S.attribName]="",S.attribValue="",q(S,"onattribute",{name:S.attribName,value:""}),S.attribName="",P===">"?ne(S):B(E,P)?(S.attribName=P,S.state=I.ATTRIB_NAME):(Y(S,"Invalid attribute name"),S.state=I.ATTRIB)}continue;case I.ATTRIB_VALUE:if(b(P))continue;A(P)?(S.q=P,S.state=I.ATTRIB_VALUE_QUOTED):(S.opt.unquotedAttributeValues||pe(S,"Unquoted attribute value"),S.state=I.ATTRIB_VALUE_UNQUOTED,S.attribValue=P);continue;case I.ATTRIB_VALUE_QUOTED:if(P!==S.q){P==="&"?S.state=I.ATTRIB_VALUE_ENTITY_Q:S.attribValue+=P;continue}Je(S),S.q="",S.state=I.ATTRIB_VALUE_CLOSED;continue;case I.ATTRIB_VALUE_CLOSED:b(P)?S.state=I.ATTRIB:P===">"?ne(S):P==="/"?S.state=I.OPEN_TAG_SLASH:B(E,P)?(Y(S,"No whitespace between attributes"),S.attribName=P,S.attribValue="",S.state=I.ATTRIB_NAME):Y(S,"Invalid attribute name");continue;case I.ATTRIB_VALUE_UNQUOTED:if(!T(P)){P==="&"?S.state=I.ATTRIB_VALUE_ENTITY_U:S.attribValue+=P;continue}Je(S),P===">"?ne(S):S.state=I.ATTRIB;continue;case I.CLOSE_TAG:if(S.tagName)P===">"?Z(S):B(w,P)?S.tagName+=P:S.script?(S.script+="</"+S.tagName+P,S.tagName="",S.state=I.SCRIPT):(b(P)||Y(S,"Invalid tagname in closing tag"),S.state=I.CLOSE_TAG_SAW_WHITE);else{if(b(P))continue;M(E,P)?S.script?(S.script+="</"+P,S.state=I.SCRIPT):Y(S,"Invalid tagname in closing tag."):S.tagName=P}continue;case I.CLOSE_TAG_SAW_WHITE:if(b(P))continue;P===">"?Z(S):Y(S,"Invalid characters in closing tag");continue;case I.TEXT_ENTITY:case I.ATTRIB_VALUE_ENTITY_Q:case I.ATTRIB_VALUE_ENTITY_U:var Ae,Ye;switch(S.state){case I.TEXT_ENTITY:Ae=I.TEXT,Ye="textNode";break;case I.ATTRIB_VALUE_ENTITY_Q:Ae=I.ATTRIB_VALUE_QUOTED,Ye="attribValue";break;case I.ATTRIB_VALUE_ENTITY_U:Ae=I.ATTRIB_VALUE_UNQUOTED,Ye="attribValue";break}if(P===";"){var Tt=Se(S);S.opt.unparsedEntities&&!Object.values(r.XML_ENTITIES).includes(Tt)?(S.entity="",S.state=Ae,S.write(Tt)):(S[Ye]+=Tt,S.entity="",S.state=Ae)}else B(S.entity.length?_:C,P)?S.entity+=P:(Y(S,"Invalid character in entity name"),S[Ye]+="&"+S.entity+P,S.entity="",S.state=Ae);continue;default:throw new Error(S,"Unknown state: "+S.state)}return S.position>=S.bufferCheckPosition&&n(S),S}o(rt,"write");String.fromCodePoint||(function(){var N=String.fromCharCode,S=Math.floor,G=o(function(){var P=16384,Ee=[],Ce,Ae,Ye=-1,Tt=arguments.length;if(!Tt)return"";for(var Me="";++Ye<Tt;){var St=Number(arguments[Ye]);if(!isFinite(St)||St<0||St>1114111||S(St)!==St)throw RangeError("Invalid code point: "+St);St<=65535?Ee.push(St):(St-=65536,Ce=(St>>10)+55296,Ae=St%1024+56320,Ee.push(Ce,Ae)),(Ye+1===Tt||Ee.length>P)&&(Me+=N.apply(null,Ee),Ee.length=0)}return Me},"fromCodePoint");Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:G,configurable:!0,writable:!0}):String.fromCodePoint=G})()})(typeof OS>"u"?OS.sax={}:OS)});var Dj=te((DSe,_j)=>{"use strict";_j.exports=r=>{if(typeof r!="string")throw new TypeError("Expected a string, got "+typeof r);return r.charCodeAt(0)===65279?r.slice(1):r}});var Bj=te(PS=>{"use strict";Object.defineProperty(PS,"__esModule",{value:!0});PS.NamespaceContext=void 0;var Dle=class{static{o(this,"NamespaceScope")}constructor(e){this.parent=e,this.namespaces={}}getNamespaceURI(e,t){switch(e){case"xml":return"http://www.w3.org/XML/1998/namespace";case"xmlns":return"http://www.w3.org/2000/xmlns/";default:{let n=this.namespaces[e];return n!=null?n.uri:!t&&this.parent?this.parent.getNamespaceURI(e):null}}}getNamespaceMapping(e){switch(e){case"xml":return{uri:"http://www.w3.org/XML/1998/namespace",prefix:"xml",declared:!0};case"xmlns":return{uri:"http://www.w3.org/2000/xmlns/",prefix:"xmlns",declared:!0};default:{let t=this.namespaces[e];return t??(this.parent?this.parent.getNamespaceMapping(e):null)}}}getPrefix(e,t){switch(e){case"http://www.w3.org/XML/1998/namespace":return"xml";case"http://www.w3.org/2000/xmlns/":return"xmlns";default:for(let n in this.namespaces)if(this.namespaces[n].uri===e)return n;return!t&&this.parent?this.parent.getPrefix(e):null}}},Ble=class{static{o(this,"NamespaceContext")}constructor(){this.scopes=[],this.pushContext(),this.prefixCount=0}addNamespace(e,t,n){return this.getNamespaceURI(e,n)===t?!1:this.currentScope?(this.currentScope.namespaces[e]={uri:t,prefix:e,declared:!1},!0):!1}pushContext(){let e=new Dle(this.currentScope);return this.scopes.push(e),this.currentScope=e,e}popContext(){let e=this.scopes.pop();return e?this.currentScope=e.parent:this.currentScope=null,e}getNamespaceURI(e,t){return this.currentScope&&this.currentScope.getNamespaceURI(e,t)}getPrefix(e,t){return this.currentScope&&this.currentScope.getPrefix(e,t)}registerNamespace(e){let t=this.getPrefix(e);if(t)return t;for(;t="ns"+ ++this.prefixCount,!!this.getNamespaceURI(t););return this.addNamespace(t,e,!0),t}declareNamespace(e,t){if(this.currentScope){let n=this.currentScope.getNamespaceMapping(e);return n&&n.uri===t&&n.declared?!1:(this.currentScope.namespaces[e]={uri:t,prefix:e,declared:!0},!0)}return!1}};PS.NamespaceContext=Ble});var qj=te(ft=>{"use strict";var Rle=ft&&ft.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(r,n,s)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),Ole=ft&&ft.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),Ple=ft&&ft.__importStar||(function(){var r=o(function(e){return r=Object.getOwnPropertyNames||function(t){var n=[];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(n[n.length]=s);return n},r(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n=r(e),s=0;s<n.length;s++)n[s]!=="default"&&Rle(t,e,n[s]);return Ole(t,e),t}})(),kle=ft&&ft.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ft,"__esModule",{value:!0});ft.ImportElement=ft.IncludeElement=ft.BodyElement=ft.DefinitionsElement=ft.ServiceElement=ft.PortElement=ft.BindingElement=ft.PortTypeElement=ft.OperationElement=ft.TypesElement=ft.SchemaElement=ft.DocumentationElement=ft.MessageElement=ft.AllElement=ft.AttributeElement=ft.SequenceElement=ft.SimpleContentElement=ft.ComplexContentElement=ft.ComplexTypeElement=ft.EnumerationElement=ft.ChoiceElement=ft.ExtensionElement=ft.RestrictionElement=ft.SimpleTypeElement=ft.OutputElement=ft.InputElement=ft.AnyElement=ft.ElementElement=ft.UnexpectedElement=ft.Element=void 0;var Q_=Ge("assert"),Lle=kle(Wp()),ma=Ple(Ho()),ps=hc(),Vle=(0,Lle.default)("node-soap"),kS={string:1,boolean:1,decimal:1,float:1,double:1,anyType:1,byte:1,int:1,long:1,short:1,negativeInteger:1,nonNegativeInteger:1,positiveInteger:1,nonPositiveInteger:1,unsignedByte:1,unsignedInt:1,unsignedLong:1,unsignedShort:1,duration:0,dateTime:0,time:0,date:0,gYearMonth:0,gYear:0,gMonthDay:0,gDay:0,gMonth:0,hexBinary:0,base64Binary:0,anyURI:0,QName:0,NOTATION:0},xr=class{static{o(this,"Element")}constructor(e,t,n,s){this.allowedChildren={},this.children=[];let i=(0,ps.splitQName)(e);this.nsName=e,this.prefix=i.prefix,this.name=i.name,this.children=[],this.xmlns={},this.schemaXmlns={},this._initializeOptions(n);for(let a in t){let u=/^xmlns:?(.*)$/.exec(a);u?this.xmlns[u[1]?u[1]:ps.TNS_PREFIX]=t[a]:a==="value"?this[this.valueKey]=t[a]:this["$"+a]=t[a]}for(let a in s){let u=/^xmlns:?(.*)$/.exec(a);u&&u[1]&&(this.schemaXmlns[u[1]]=s[a])}this.$targetNamespace!==void 0&&(this.xmlns[ps.TNS_PREFIX]=this.$targetNamespace),this.init()}deleteFixedAttrs(){this.children&&this.children.length===0&&delete this.children,this.xmlns&&Object.keys(this.xmlns).length===0&&delete this.xmlns,delete this.nsName,delete this.prefix,delete this.name}startElement(e,t,n,s,i){if(!this.allowedChildren)return;let a=this.allowedChildren[(0,ps.splitQName)(t).name];if(a==null&&!this.strict&&(a=Rj),a){let u=new a(t,n,s,i);u.init();let c=e[0];c instanceof uD&&(u.definitionsXmlns=c.xmlns),e.push(u)}else this.unexpected(t)}endElement(e,t){if(this.nsName===t){if(e.length<2)return;let n=e[e.length-2];this!==e[0]&&(ma.defaultsDeep(e[0].xmlns,this.xmlns),n.children.push(this),n.addChild(this)),e.pop()}}addChild(e){}unexpected(e){throw new Error("Found unexpected element ("+e+") inside "+this.nsName)}description(e,t){return this.$name||this.name}init(){}_initializeOptions(e){e?(this.valueKey=e.valueKey||"$value",this.xmlKey=e.xmlKey||"$xml",this.ignoredNamespaces=e.ignoredNamespaces||[],this.strict=e.strict||!1,this.forceUseSchemaXmlns=e.forceUseSchemaXmlns||!1):(this.valueKey="$value",this.xmlKey="$xml",this.ignoredNamespaces=[],this.strict=!1,this.forceUseSchemaXmlns=!1)}};ft.Element=xr;var Rj=class Oj extends xr{static{o(this,"UnexpectedElement")}startElement(e,t,n,s,i){let a=new Oj(t,n,s,i);a.init(),e.push(a)}};ft.UnexpectedElement=Rj;var Z_=class extends xr{static{o(this,"ElementElement")}constructor(){super(...arguments),this.allowedChildren=vn(["annotation","complexType","simpleType"])}description(e,t){let n={},s=this.$name,i=1,a=1;this.$maxOccurs==="unbounded"?a=1/0:this.$maxOccurs&&(a=parseInt(this.$maxOccurs,10)),this.$minOccurs&&(i=parseInt(this.$minOccurs,10));let u=a>1;u&&s&&(s+="[]"),t&&t[ps.TNS_PREFIX]&&(this.$targetNamespace=t[ps.TNS_PREFIX]);let c=this.$type||this.$ref;if(c){c=(0,ps.splitQName)(c);let l=c.name,h=!!wc(c.prefix,this.definitionsXmlns,e.xmlns)||!!wc(this.targetNSAlias,this.definitionsXmlns,e.xmlns)||this.forceUseSchemaXmlns,m=wc(c.prefix,t,this.xmlns,h?this.schemaXmlns:void 0,this.definitionsXmlns,e.xmlns),g=e.schemas[m],y=g&&(this.$type?g.complexTypes[l]||g.types[l]:g.elements[l]),v=this.$type?e.descriptions.types:e.descriptions.elements,E=m?`${m}::${l}`:l;if(m&&e.schemas[m]&&(t=e.schemas[m].xmlns),y&&!(l in kS))if(E in v)if(this.$ref)if(u){let w=l+"[]",C=m?`${m}::${w}`:w;v[C]=v[E],n[w]=v[C]}else n=v[E];else n[s]=v[E];else{let w={};v[E]=w,u&&"maxOccurs"in y&&(y.maxOccurs=this.$maxOccurs),this.$minOccurs&&"minOccurs"in y&&(y.minOccurs=this.$minOccurs);let C=y.description(e,t);if(typeof C=="string")w=C;else{Object.keys(C).forEach(b=>{w[b]=C[b]});let _=C[ga.Symbol];_&&(w[ga.Symbol]=_)}this.$ref?n=w:n[s]=w,typeof w=="object"&&(w.targetNSAlias=c.prefix,w.targetNamespace=m),v[E]=w}else n[s]=this.$type}else{let l=this.children;n[s]={};for(let h of l)(h instanceof FS||h instanceof VS)&&(n[s]=h.description(e,t))}return n}};ft.ElementElement=Z_;var LS=class extends xr{static{o(this,"AnyElement")}};ft.AnyElement=LS;var Pj=class extends xr{static{o(this,"InputElement")}constructor(){super(...arguments),this.allowedChildren=vn(["body","documentation","header","SecuritySpecRef"])}addChild(e){e instanceof MS&&(this.use=e.$use,this.use==="encoded"&&(this.encodingStyle=e.$encodingStyle),this.children.pop())}};ft.InputElement=Pj;var kj=class extends xr{static{o(this,"OutputElement")}constructor(){super(...arguments),this.allowedChildren=vn(["body","documentation","header","SecuritySpecRef"])}addChild(e){e instanceof MS&&(this.use=e.$use,this.use==="encoded"&&(this.encodingStyle=e.$encodingStyle),this.children.pop())}};ft.OutputElement=kj;var VS=class extends xr{static{o(this,"SimpleTypeElement")}constructor(){super(...arguments),this.allowedChildren=vn(["restriction"])}description(e){for(let t of this.children)if(t instanceof US)return[this.$name,t.description()].filter(Boolean).join("|");return{}}};ft.SimpleTypeElement=VS;var US=class extends xr{static{o(this,"RestrictionElement")}constructor(){super(...arguments),this.allowedChildren=vn(["all","choice","enumeration","sequence","attribute"])}description(e,t){let n=this.children,s,i=!1,a={};for(let c of n){if(c instanceof ga){a[c.$name]=c.description(e);continue}!i&&(c instanceof Ev||c instanceof wv)&&(i=!0,s=c.description(e,t))}if(Object.keys(a).length>0&&(s=s??{},s[ga.Symbol]=a),s&&this.$base){let c=(0,ps.splitQName)(this.$base),l=c.name,h=wc(c.prefix,t,this.definitionsXmlns,e.xmlns),m=e.schemas[h],g=m&&(m.complexTypes[l]||m.types[l]||m.elements[l]);if(s.getBase=()=>g.description(e,m.xmlns),g){let y=g.description(e,m.xmlns);y[ga.Symbol]&&ma.defaults(a,y[ga.Symbol]),s=ma.defaults(s,y)}return s}let u=this.children.map(c=>c.description()).join(",");return[this.$base,u].filter(Boolean).join("|")}};ft.RestrictionElement=US;var jS=class extends xr{static{o(this,"ExtensionElement")}constructor(){super(...arguments),this.allowedChildren=vn(["all","choice","sequence"])}description(e,t){let n={};for(let s of this.children)(s instanceof Ev||s instanceof wv)&&(n=s.description(e,t));if(this.$base){let s=(0,ps.splitQName)(this.$base),i=s.name,a=wc(s.prefix,t,this.definitionsXmlns,e.xmlns),u=e.schemas[a];if(i in kS)return this.$base;{let c=u&&(u.complexTypes[i]||u.types[i]||u.elements[i]);if(c){let l=c.description(e,u.xmlns);n=typeof l=="string"?l:ma.defaults(l,n)}}}return n}};ft.ExtensionElement=jS;var wv=class extends xr{static{o(this,"ChoiceElement")}constructor(){super(...arguments),this.allowedChildren=vn(["any","choice","element","sequence"])}description(e,t){let n={};for(let s of this.children){let i=s.description(e,t);for(let a in i)n[a]=i[a]}return n}};ft.ChoiceElement=wv;var Lj=class extends xr{static{o(this,"EnumerationElement")}description(){return this[this.valueKey]}};ft.EnumerationElement=Lj;var FS=class extends xr{static{o(this,"ComplexTypeElement")}constructor(){super(...arguments),this.allowedChildren=vn(["all","annotation","choice","complexContent","sequence","simpleContent","attribute"])}description(e,t){let n={},s=!1,i={},a=this.children||[];for(let u of a){if(u instanceof ga){i[u.$name]=u.description(e);continue}!s&&(u instanceof wv||u instanceof Ev||u instanceof rD||u instanceof tD||u instanceof eD)&&(s=!0,n=u.description(e,t))}return Object.keys(i).length>0&&(n[ga.Symbol]=i),n}};ft.ComplexTypeElement=FS;var eD=class extends xr{static{o(this,"ComplexContentElement")}constructor(){super(...arguments),this.allowedChildren=vn(["extension","restriction"])}description(e,t){for(let n of this.children)if(n instanceof jS||n instanceof US)return n.description(e,t);return{}}};ft.ComplexContentElement=eD;var tD=class extends xr{static{o(this,"SimpleContentElement")}constructor(){super(...arguments),this.allowedChildren=vn(["extension"])}description(e,t){for(let n of this.children)if(n instanceof jS)return n.description(e,t);return{}}};ft.SimpleContentElement=tD;var Ev=class extends xr{static{o(this,"SequenceElement")}constructor(){super(...arguments),this.allowedChildren=vn(["any","choice","element","sequence"])}description(e,t){let n={};for(let s of this.children){if(s instanceof LS)continue;let i=s.description(e,t);for(let a in i)n[a]=i[a]}return n}};ft.SequenceElement=Ev;var ga=class extends xr{static{o(this,"AttributeElement")}description(e){return{type:this.$type,required:this.$use==="required"}}};ft.AttributeElement=ga;ga.Symbol=Symbol("$attributes");var rD=class extends xr{static{o(this,"AllElement")}constructor(){super(...arguments),this.allowedChildren=vn(["choice","element"])}description(e,t){let n={};for(let s of this.children){if(s instanceof LS)continue;let i=s.description(e,t);for(let a in i)n[a]=i[a]}return n}};ft.AllElement=rD;var nD=class extends xr{static{o(this,"MessageElement")}constructor(){super(...arguments),this.allowedChildren=vn(["part","documentation"]),this.element=null,this.parts=null}postProcess(e){let t=null,n=this.children||[];for(let s of n)if(s.name==="part"){t=s;break}if(t){if(t.$element){let s=[];delete this.parts;let i=(0,ps.splitQName)(t.$element),a=wc(i.prefix,this.definitionsXmlns,e.xmlns),u=e.schemas[a];if(this.element=u.elements[i.name],!this.element){Vle(i.name+" is not present in wsdl and cannot be processed correctly.");return}this.element.targetNSAlias=i.prefix,this.element.targetNamespace=a,this.element.$lookupType=t.$element;let c=this.element.children;if(c.length>0)for(let l of c)s.push(this._getNestedLookupTypeString(l));if(s.length>0){s=s.join("_").split("_").filter(o(function(m){return m!=="^"},"removeEmptyLookupTypes"));let l=e.schemas[this.element.targetNamespace].xmlns;for(let h=0;h<s.length;h++)s[h]=this._createLookupTypeObject(s[h],l)}if(this.element.$lookupTypes=s,this.element.$type){let l=(0,ps.splitQName)(this.element.$type),h=wc(l.prefix,u.xmlns,this.definitionsXmlns,e.xmlns);if(h&&!(l.name in kS)){u=e.schemas[h];let m=u.complexTypes[l.name]||u.types[l.name]||u.elements[l.name];m&&(this.parts=m.description(e,u.xmlns))}}else{let l=this.element.description(e,u.xmlns);this.parts=l[i.name]}this.children.splice(0,1)}else{this.parts={},delete this.element;for(let s=0;s<this.children.length;s++){let i=this.children[s];if(i.name==="documentation")continue;(0,Q_.ok)(i.name==="part","Expected part element");let a=(0,ps.splitQName)(i.$type),u=wc(a.prefix,this.definitionsXmlns,e.xmlns),c=a.name;typeof e.schemas[u]<"u"?this.parts[i.$name]=e.schemas[u].types[c]||e.schemas[u].complexTypes[c]:this.parts[i.$name]=i.$type,typeof this.parts[i.$name]=="object"&&(this.parts[i.$name].prefix=a.prefix,this.parts[i.$name].xmlns=u),this.children.splice(s--,1)}}this.deleteFixedAttrs()}}description(e){if(this.element)return this.element&&this.element.description(e);let t={};return t[this.$name]=this.parts,t}_createLookupTypeObject(e,t){let n=(0,ps.splitQName)(e),s=n.prefix,i=n.name.split("#"),a=i[0],u=i[1];return{$namespace:t[s],$type:s+":"+a,$name:u}}_getNestedLookupTypeString(e){let t="^",n=this.ignoredNamespaces.concat("xs");return Object.hasOwnProperty.call(e,"$type")&&typeof e.$type=="string"&&n.indexOf(e.$type.split(":")[0])===-1&&(t+="_"+e.$type+"#"+e.$name),e.children.length>0&&e.children.forEach(s=>{let i=this._getNestedLookupTypeString(s).replace(/\^_/,"");i&&typeof i=="string"&&(t+="_"+i)}),t}};ft.MessageElement=nD;var Vj=class extends xr{static{o(this,"DocumentationElement")}};ft.DocumentationElement=Vj;var xv=class Uj extends xr{static{o(this,"SchemaElement")}constructor(){super(...arguments),this.allowedChildren=vn(["complexType","element","import","include","simpleType"]),this.complexTypes={},this.types={},this.elements={},this.includes=[]}merge(e){return(0,Q_.ok)(e instanceof Uj),ma.merge(this.complexTypes,e.complexTypes),ma.merge(this.types,e.types),ma.merge(this.elements,e.elements),ma.merge(this.xmlns,e.xmlns),ma.merge(this,ma.pickBy(e,(t,n)=>n.startsWith("$")&&!Object.hasOwnProperty.call(this,n))),this}addChild(e){if(!(e.$name in kS)){if(e instanceof cD||e instanceof lD){let t=e.$schemaLocation||e.$location;t&&this.includes.push({namespace:e.$namespace||e.$targetNamespace||this.$targetNamespace,location:t})}else e instanceof FS?this.complexTypes[e.$name]=e:e instanceof Z_?this.elements[e.$name]=e:e instanceof VS&&(this.types[e.$name]=e);this.children.pop()}}};ft.SchemaElement=xv;var sD=class extends xr{static{o(this,"TypesElement")}constructor(){super(...arguments),this.allowedChildren=vn(["documentation","schema"]),this.schemas={}}addChild(e){(0,Q_.ok)(e instanceof xv);let t=e.includes.find(i=>Object.hasOwnProperty.call(i,"namespace")),n=typeof t<"u"&&Object.hasOwnProperty.call(t,"namespace")&&e instanceof xv?t.namespace:void 0,s=e.$targetNamespace||e.includes[0]?.namespace||n;Object.hasOwnProperty.call(this.schemas,s)?s===e.$targetNamespace?this.schemas[s]=e:console.error('Target-Namespace "'+s+'" already in use by another Schema!'):this.schemas[s]=e}};ft.TypesElement=sD;var jj=class Fj extends xr{static{o(this,"OperationElement")}constructor(){super(...arguments),this.allowedChildren=vn(["documentation","fault","input","operation","output"]),this.input=null,this.output=null,this.inputSoap=null,this.outputSoap=null,this.style="",this.soapAction=""}addChild(e){e instanceof Fj&&(this.soapAction=e.$soapAction||"",this.style=e.$style||"",this.children.pop())}postProcess(e,t){let n=this.children;for(let s=0;s<n.length;s++){let i=n[s];if(i.name!=="input"&&i.name!=="output")continue;if(t==="binding"){this[i.name]=i,n.splice(s--,1);continue}let a=(0,ps.splitQName)(i.$message).name,u=e.messages[a];u&&(u.postProcess(e),u.element?(e.messages[u.element.$name]=u,this[i.name]=u.element):this[i.name]=u,n.splice(s--,1))}this.deleteFixedAttrs()}description(e){let t=this.input?this.input.description(e):null,n=this.output?this.output.description(e):null;return{input:t&&t[Object.keys(t)[0]],output:n&&n[Object.keys(n)[0]]}}};ft.OperationElement=jj;var iD=class extends xr{static{o(this,"PortTypeElement")}constructor(){super(...arguments),this.allowedChildren=vn(["documentation","operation"]),this.methods={}}postProcess(e){let t=this.children;if(!(typeof t>"u")){for(let n=0;n<t.length;n++){let s=t[n];s.name==="operation"&&(s.postProcess(e,"portType"),this.methods[s.$name]=s,t.splice(n--,1))}delete this.$name,this.deleteFixedAttrs()}}description(e){let t={};for(let n in this.methods){let s=this.methods[n];t[n]=s.description(e)}return t}};ft.PortTypeElement=iD;var aD=class extends xr{static{o(this,"BindingElement")}constructor(){super(...arguments),this.allowedChildren=vn(["binding","documentation","operation","SecuritySpec"]),this.transport="",this.style="",this.methods={}}addChild(e){e.name==="binding"&&(this.transport=e.$transport,this.style=e.$style,this.children.pop())}postProcess(e){let t=(0,ps.splitQName)(this.$type).name,n=e.portTypes[t],s=this.style,i=this.children;if(n){n.postProcess(e),this.methods=n.methods;for(let a=0;a<i.length;a++){let u=i[a];if(u.name!=="operation")continue;u.postProcess(e,"binding"),i.splice(a--,1),u.style||(u.style=s);let c=this.methods[u.$name];c&&(c.style=u.style,c.soapAction=u.soapAction,c.inputSoap=u.input||null,c.outputSoap=u.output||null,c.inputSoap&&c.inputSoap.deleteFixedAttrs(),c.outputSoap&&c.outputSoap.deleteFixedAttrs())}}delete this.$name,delete this.$type,this.deleteFixedAttrs()}description(e){let t={};for(let n in this.methods){let s=this.methods[n];t[n]=s.description(e)}return t}};ft.BindingElement=aD;var Mj=class extends xr{static{o(this,"PortElement")}constructor(){super(...arguments),this.allowedChildren=vn(["address","documentation"]),this.location=null}addChild(e){e.name==="address"&&typeof e.$location<"u"&&(this.location=e.$location)}};ft.PortElement=Mj;var oD=class extends xr{static{o(this,"ServiceElement")}constructor(){super(...arguments),this.allowedChildren=vn(["documentation","port"]),this.ports={}}postProcess(e){let t=this.children,n=e.bindings;if(t&&t.length>0)for(let s=0;s<t.length;s++){let i=t[s];if(i.name!=="port")continue;let a=(0,ps.splitQName)(i.$binding).name,u=n[a];u&&(u.postProcess(e),this.ports[i.$name]={location:i.location,binding:u},t.splice(s--,1))}delete this.$name,this.deleteFixedAttrs()}description(e){let t={};for(let n in this.ports){let s=this.ports[n];t[n]=s.binding.description(e)}return t}};ft.ServiceElement=oD;var uD=class extends xr{static{o(this,"DefinitionsElement")}constructor(){super(...arguments),this.allowedChildren=vn(["binding","documentation","import","message","portType","service","types"]),this.messages={},this.portTypes={},this.bindings={},this.services={},this.schemas={},this.descriptions={types:{},elements:{}}}init(){this.name!=="definitions"&&this.unexpected(this.nsName)}addChild(e){if(e instanceof sD)ma.merge(this.schemas,e.schemas);else if(e instanceof nD)this.messages[e.$name]=e;else if(e.name==="import"){let t=new xv(e.$namespace,{});t.init(),this.schemas[e.$namespace]=t,this.schemas[e.$namespace].addChild(e)}else e instanceof iD?this.portTypes[e.$name]=e:e instanceof aD?(e.transport==="http://schemas.xmlsoap.org/soap/http"||e.transport==="http://www.w3.org/2003/05/soap/bindings/HTTP/")&&(this.bindings[e.$name]=e):e instanceof oD&&(this.services[e.$name]=e);this.children.pop()}};ft.DefinitionsElement=uD;var MS=class extends xr{static{o(this,"BodyElement")}};ft.BodyElement=MS;var cD=class extends xr{static{o(this,"IncludeElement")}};ft.IncludeElement=cD;var lD=class extends xr{static{o(this,"ImportElement")}};ft.ImportElement=lD;var Ule={all:rD,any:LS,binding:aD,body:MS,choice:wv,complexContent:eD,complexType:FS,definitions:uD,documentation:Vj,element:Z_,enumeration:Lj,extension:jS,fault:xr,import:lD,include:cD,input:Pj,message:nD,operation:jj,output:kj,port:Mj,portType:iD,restriction:US,schema:xv,sequence:Ev,service:oD,simpleContent:tD,simpleType:VS,types:sD,attribute:ga};function vn(r){let e={};for(let t of r)e[t.replace(/^_/,"")]=Ule[t]||xr;return e}o(vn,"buildAllowedChildren");function wc(r,...e){for(let t of e)if(t?.[r])return t[r]}o(wc,"findNs")});var pD=te(Xs=>{"use strict";var jle=Xs&&Xs.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(r,n,s)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),Fle=Xs&&Xs.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),Ed=Xs&&Xs.__importStar||(function(){var r=o(function(e){return r=Object.getOwnPropertyNames||function(t){var n=[];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(n[n.length]=s);return n},r(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n=r(e),s=0;s<n.length;s++)n[s]!=="default"&&jle(t,e,n[s]);return Fle(t,e),t}})(),Gj=Xs&&Xs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Xs,"__esModule",{value:!0});Xs.WSDL=void 0;Xs.trim=hD;Xs.open_wsdl=Xj;var Mle=Ge("assert"),qle=Gj(Wp()),Hle=Ed(Ge("fs")),Hj=Ed(Ho()),Sv=Ed(Ge("path")),qS=Ed(Ij()),Kle=Gj(Dj()),$le=Ed(Ge("url")),Gle=cS(),Xle=Bj(),Pr=hc(),gf=Ed(qj()),Kj=(0,qle.default)("node-soap"),$j="http://www.w3.org/2001/XMLSchema-instance",Wle="http://schemas.xmlsoap.org/soap/envelope/";function hD(r){return r.trim()}o(hD,"trim");function HS(r){return r&&r.charAt(r.length-1)!==":"?r+":":r}o(HS,"appendColon");function fD(r){return r&&r.charAt(r.length-1)===":"?r.substring(0,r.length-1):r}o(fD,"noColonNameSpace");var KS=class{static{o(this,"WSDL")}constructor(e,t,n){this.ignoredNamespaces=["tns","targetNamespace","typedNamespace"],this.ignoreBaseNameSpaces=!1,this.valueKey="$value",this.xmlKey="$xml";let s;if(this.uri=t,this.callback=()=>{},this._includesWsdl=[],this.WSDL_CACHE={},n&&n.WSDL_CACHE&&(this.WSDL_CACHE=n.WSDL_CACHE),this._initializeOptions(n),typeof e=="string")e=(0,Kle.default)(e),s=this._fromXML;else if(typeof e=="object")s=this._fromServices;else throw new Error("WSDL constructor takes either an XML string or service definition");process.nextTick(()=>{try{s.call(this,e)}catch(i){return this.callback(i)}this.processIncludes(i=>{let a;if(i)return this.callback(i);try{this.definitions.deleteFixedAttrs();let u=this.services=this.definitions.services;if(u)for(a in u)u[a].postProcess(this.definitions);let c=this.definitions.complexTypes;if(c)for(a in c)c[a].deleteFixedAttrs();let l=this.definitions.bindings;for(let h in l){let m=l[h];typeof m.style>"u"&&(m.style="document");let g=m.methods,y=m.topElements={};for(let v in g)if((g[v].style||m.style)==="document"&&g[v].input){let E=g[v].input.$name,w="";g[v].output&&(w=g[v].output.$name),y[E]={methodName:v,outputName:w}}}this.xmlnsInEnvelope=this._xmlnsMap(),this.callback(i,this)}catch(u){this.callback(u)}})})}onReady(e){e&&(this.callback=e)}processIncludes(e){let t=this.definitions.schemas,n=[];for(let s in t){let i=t[s];n=n.concat(i.includes||[])}this._processNextInclude(n,e)}describeServices(){let e={};for(let t in this.services){let n=this.services[t];e[t]=n.description(this.definitions)}return e}toXML(){return this.xml||""}getSaxStream(e){let t=qS.createStream(!0,null);return e.pipe(t),t}xmlToObject(e,t){let n=typeof t=="function"?{}:qS.parser(!0,null),s=null,i={},u=[{name:null,object:i,schema:{Envelope:{Header:{Security:{UsernameToken:{Username:"string",Password:"string"}}},Body:{Fault:{faultcode:"string",faultstring:"string",detail:"string"}}}}}],c=new Map,l="soap",h={},m={};if(n.onopentag=y=>{let v=y.name,E=y.attributes,w=(0,Pr.splitQName)(v).name,C,_=u[u.length-1],b=_.schema,A={},T=!1,B=!1,M={},I=w;if(E.href){let q=E.href.substr(1);m[q]||(m[q]={hrefs:[],obj:null}),m[q].hrefs.push({par:_.object,key:w,obj:M})}E.id&&(m[E.id]||(m[E.id]={hrefs:[],obj:null}));for(C in E){let q=E[C];if(/^xmlns:|^xmlns$/.test(C)){let W=(0,Pr.splitQName)(C).name;h[W]=q,q===$j&&c.set(W,q),q===Wle&&(l=W);continue}T=!0,A[C]=q}for(C in A){let q=(0,Pr.splitQName)(C);if(q.name==="nil"&&h[q.prefix]===$j&&A[C]&&(A[C].toLowerCase()==="true"||A[C]==="1")){B=!0;break}}if(T&&(M[this.options.attributesKey]=A),!s&&h[l]&&_.name==="Body"&&w!=="Fault"){let q=this.definitions.messages[w];if(!q)try{let W=!1;/Response$/.test(w)?w=w.replace(/Response$/,""):/Request$/.test(w)?(W=!0,w=w.replace(/Request$/,"")):/Solicit$/.test(w)&&(W=!0,w=w.replace(/Solicit$/,""));let he=this.definitions.portTypes,pe=Object.keys(he);for(let ue of pe){let Y=he[ue];if(Y.methods[w])try{W?w=Y.methods[w].input.$name:w=Y.methods[w].output.$name,q=this.definitions.messages[w];break}catch{throw new Error(`Failed to lookup message ${w} in methods`)}}if(!q)throw new Error(`Could not find message ${w}`);this.definitions.messages[I]=q}catch(W){this.options.returnFault&&n.onerror(W)}b=q.description(this.definitions),s=I}let H,K;for(let q of c.keys())if(`${q}:type`in A){K=A[`${q}:type`];break}if(K){let q=(0,Pr.splitQName)(K),W;q.prefix===Pr.TNS_PREFIX?W=h[q.prefix]||h.xmlns:W=h[q.prefix];let he=this.findSchemaObject(W,q.name);he&&(H=he.description(this.definitions))}b&&b[w+"[]"]&&(w=w+"[]"),u.push({name:I,object:M,schema:H||b&&b[w],id:E.id,nil:B})},n.onclosetag=y=>{let v=u.pop(),E=v.object,w=u[u.length-1],C=w.object,_=w.schema,b=(0,Pr.splitQName)(y).name;if(typeof v.schema=="string"&&(v.schema==="string"||v.schema.split(":")[1]==="string")&&typeof E=="object"&&Object.keys(E).length===0&&(E=v.object=this.options.preserveWhitespace&&v.text||""),v.nil===!0)if(this.options.handleNilAsNull)E=null;else return;Hj.isPlainObject(E)&&!Object.keys(E).length&&(E=null),_&&_[b+"[]"]?(C[b]||(C[b]=[]),C[b].push(E)):b in C?(Array.isArray(C[b])||(C[b]=[C[b]]),C[b].push(E)):C[b]=E,v.id&&(m[v.id].obj=E)},n.oncdata=y=>{let v=y;if(y=hD(y),!!y.length)if(/<\?xml[\s\S]+\?>/.test(y)){let E=u[u.length-1],w=this.xmlToObject(y);E.object[this.options.attributesKey]?E.object[this.options.valueKey]=w:E.object=w}else n.ontext(v)},n.onerror=y=>{throw n.resume(),{Fault:{faultcode:500,faultstring:"Invalid XML",detail:new Error(y).message,statusCode:500}}},n.ontext=y=>{let v=u[u.length-1],E=y;if(y=hD(y),!y.length){this.options.preserveWhitespace&&(v.text=(v.text||"")+E);return}let w=(0,Pr.splitQName)(v.schema).name,C;this.options&&this.options.customDeserializer&&this.options.customDeserializer[w]?C=this.options.customDeserializer[w](y,v):w==="int"||w==="integer"||w==="short"||w==="long"?C=parseInt(y,10):w==="double"||w==="float"||w==="decimal"?C=Number(y):w==="bool"||w==="boolean"?C=y.toLowerCase()==="true"||y==="1":w==="dateTime"||w==="date"?C=new Date(y):(this.options.preserveWhitespace&&(y=E),typeof v.object!="string"?C=y:C=v.object+y),v.object[this.options.attributesKey]?v.object[this.options.valueKey]=C:v.object=C},typeof t=="function"){let y=qS.createStream(!0,null);y.on("opentag",n.onopentag),y.on("closetag",n.onclosetag),y.on("cdata",n.oncdata),y.on("text",n.ontext),e.pipe(y).on("error",v=>{t(v)}).on("end",()=>{let v;try{v=g()}catch(E){return t(E)}t(null,v)});return}return n.write(e).close(),g();function g(){for(let y in m){let v=m[y];for(let E of v.hrefs)Object.assign(E.obj,v.obj)}if(i.Envelope){let y=i.Envelope.Body;if(y&&y.Fault){let v=y.Fault,E=v.faultcode&&v.faultcode.$value,w=v.faultstring&&v.faultstring.$value,C=v.detail&&v.detail.$value;E=E||v.faultcode,w=w||v.faultstring,C=C||v.detail,E=E||v.Code&&`${v.Code.Value}: ${v.Code.Subcode&&v.Code.Subcode.Value}`,w=w||v.Reason&&v.Reason.Text.$value,w=w||v.Reason&&v.Reason.Text,C=C||v.Detail;let _=new Error(E+": "+w+(C?": "+JSON.stringify(C):""));throw _.root=i,_}return i.Envelope}return i}o(g,"finish")}findSchemaObject(e,t){if(!e||!t)return null;let n=null;if(this.definitions.schemas){let s=this.definitions.schemas[e];s&&(t.indexOf(":")!==-1&&(t=t.substring(t.indexOf(":")+1,t.length)),n=s.complexTypes[t]||s.types[t]||s.elements[t])}return n}objectToDocumentXML(e,t,n,s,i){if(t&&t._xml)return t._xml;let a={};a[e]=t;let u=i?this.findSchemaObject(s,i):null;return this.objectToXML(a,null,n,s,!0,null,u)}objectToRpcXML(e,t,n,s,i){let a=[],u=this.definitions,c="_xmlns";n=n||(0,Pr.findPrefix)(u.xmlns,s),s=s||u.xmlns[n],n=n===Pr.TNS_PREFIX?"":n+":",a.push(["<",n,e,">"].join(""));for(let l in t)if(Object.prototype.hasOwnProperty.call(t,l)&&l!==c){let h=t[l];if(l===this.options.xmlKey)a.push(this.objectToXML({[l]:h},null,n,s));else{let m=(i?"":n)+l,g=[];if(typeof h=="object"&&Object.prototype.hasOwnProperty.call(h,this.options.attributesKey)){let y=h[this.options.attributesKey];for(let v in y)g.push(" "+v+'="'+y[v]+'"')}a.push(["<",m].concat(g).concat(">").join("")),a.push(typeof h=="object"?this.objectToXML(h,l,n,s):(0,Pr.xmlEscape)(h)),a.push(["</",m,">"].join(""))}}return a.push(["</",n,e,">"].join("")),a.join("")}isIgnoredNameSpace(e){return this.options.ignoredNamespaces.indexOf(e)>-1}filterOutIgnoredNameSpace(e){let t=fD(e);return this.isIgnoredNameSpace(t)?"":t}objectToXML(e,t,n,s,i,a,u,c){let l=this.definitions.schemas[s];if(this.options.overrideElementKey&&Object.keys(this.options.overrideElementKey).length>0)for(let b in this.options.overrideElementKey){let A=this.options.overrideElementKey[b];e&&e[b]&&(Object.defineProperty(e,A,Object.getOwnPropertyDescriptor(e,b)),delete e[b])}let h=n?n.parent:void 0;typeof h<"u"&&(n=n.current),h=fD(h),this.isIgnoredNameSpace(h)&&(h="");let m=!l,g=l&&l.$elementFormDefault==="qualified",y=[],v=(n||g)&&n!==Pr.TNS_PREFIX,E="";s&&i&&(this.options.overrideRootElement&&this.options.overrideRootElement.xmlnsAttributes?this.options.overrideRootElement.xmlnsAttributes.forEach(b=>{E+=" "+b.name+'="'+b.value+'"'}):(v&&!this.isIgnoredNameSpace(n)&&(E+=" xmlns:"+n+'="'+s+'"'),(g||m)&&(E+=' xmlns="'+s+'"'))),c?c.pushContext():(c=new Xle.NamespaceContext,c.declareNamespace(n,s)),a&&!(this.options.overrideRootElement&&this.options.overrideRootElement.xmlnsAttributes)&&(E=a);let w="";this.options.overrideRootElement&&i?w=this.options.overrideRootElement.namespace:v&&(g||i||m)&&!this.isIgnoredNameSpace(n)&&(w=n);let C,_;if(Array.isArray(e)){let b="",A=!1,T=/^([^:]+):([^:]+)$/.exec(t);for(T?(b=T[1],t=T[2]):t[0]===":"&&(A=!0,t=t.substr(1)),C=0,_=e.length;C<_;C++){let B=e[C],M=this.processAttributes(B,c),I=b||h||w,H=this.objectToXML(B,t,n,s,!1,null,u,c),K=["<",t,M,E];A||(K=["<",HS(I),t,M,E]),H===""&&this.options.useEmptyTag?(K.push(" />"),y.push(K.join(""))):(K.push(">"),(this.options.namespaceArrayElements||C===0)&&y.push(K.join("")),y.push(H),(this.options.namespaceArrayElements||C===_-1)&&(A?y.push(["</",t,">"].join("")):y.push(["</",HS(I),t,">"].join(""))))}}else if(typeof e=="object"){let b="";for(t in e){if(e.hasOwnProperty||(e=Object.assign({},e)),!Object.prototype.hasOwnProperty.call(e,t)||t===this.options.attributesKey)continue;if(t===this.options.xmlKey)return c.popContext(),e[t];if(t===this.options.valueKey)return c.popContext(),(0,Pr.xmlEscape)(e[t]);let A=e[t];if(typeof A>"u")continue;let T=this.processAttributes(A,c),B="",M="",I=!1,H=/^([^:]+):([^:]+)$/.exec(t);if(H?(M=H[1]+":",t=H[2]):t[0]===":"&&(I=!0,t=t.substr(1)),i)B=this.objectToXML(A,t,n,s,!1,null,u,c);else if(this.definitions.schemas)if(l){let q=this.findChildSchemaObject(u,t);if(q&&(q.$type&&q.$type.indexOf("xsd:")===-1||q.$ref||q.$name)){let W="",he="",pe,ue="",Y=q.$ref||q.$name;if(Y){Y=(0,Pr.splitQName)(Y),he=Y.name,Y.prefix===Pr.TNS_PREFIX?(pe=q.$targetNamespace,W=c.registerNamespace(pe),this.isIgnoredNameSpace(W)&&(W=n)):(W=Y.prefix,this.isIgnoredNameSpace(W)&&(W=n),pe=l.xmlns[W]||this.definitions.xmlns[W]);let Oe=!1;q.$name&&q.targetNamespace===void 0&&(q.$form==="unqualified"?Oe=!0:q.$form==="qualified"?Oe=!1:Oe=l.$elementFormDefault!=="qualified"),Oe&&(W=""),pe&&W&&c.declareNamespace(W,pe)&&(ue=" xmlns:"+W+'="'+pe+'"',E.includes(W)||(b=ue,E+=ue))}let ve;if(q.$type){let Oe=(0,Pr.splitQName)(q.$type),Je=q.$baseNameSpace||Oe.prefix,ne=l.xmlns[Je]||this.definitions.xmlns[Je];pe=ne,ne!=="http://www.w3.org/2001/XMLSchema"&&Je!==Pr.TNS_PREFIX&&c.addNamespace(Je,ne),ve=this.findSchemaType(Oe.name,ne)||q}else ve=this.findSchemaObject(pe,he)||q;q.$baseNameSpace&&this.options.ignoreBaseNameSpaces&&(W=n,pe=s),this.options.ignoreBaseNameSpaces&&(W="",pe=""),w=W,Array.isArray(A)?(W={current:W,parent:w},ue=ue&&ue.length?ue:b):ue=null,B=this.objectToXML(A,t,W,pe,!1,ue,ve,c)}else e[this.options.attributesKey]&&e[this.options.attributesKey].xsi_type?(M=e[this.options.attributesKey].xsi_type.prefix,c.addNamespace(e[this.options.attributesKey].xsi_type.prefix,e[this.options.attributesKey].xsi_type.xmlns),B=this.objectToXML(A,t,e[this.options.attributesKey].xsi_type.prefix,e[this.options.attributesKey].xsi_type.xmlns,!1,null,null,c)):(Array.isArray(A)&&(I?t=":"+t:t=M+t),B=this.objectToXML(A,t,n,s,!1,null,null,c))}else B=this.objectToXML(A,t,n,s,!1,null,null,c);w=fD(w),v&&!g&&i&&!this.options.overrideRootElement?w=n:this.isIgnoredNameSpace(w)&&(w="");let K=!B&&this.options.useEmptyTag;Array.isArray(A)||y.push(["<",I?"":HS(M||w),t,T,E,A===null?' xsi:nil="true"':"",K?" />":">"].join("")),K||(y.push(B),Array.isArray(A)||y.push(["</",I?"":HS(M||w),t,">"].join("")))}}else e!==void 0&&y.push(this.options.escapeXML?(0,Pr.xmlEscape)(e):e);return c.popContext(),y.join("")}processAttributes(e,t){let n="";e==null&&(e=[]);let s=e[this.options.attributesKey]||{};if(s&&s.xsi_type){let i=s.xsi_type,a=i.prefix||i.namespace;i.xmlns&&(a?t.declareNamespace(a,i.xmlns):a=t.registerNamespace(i.xmlns),i.prefix=a)}return Object.keys(s).forEach(i=>{let a=s[i];if(i==="xsi_type"){let u=a.type;a.prefix&&(u=`${a.prefix}:${u}`),n+=` xsi:type="${u}"`,a.xmlns&&(n+=` xmlns:${a.prefix}="${a.xmlns}"`)}else n+=` ${i}="${(0,Pr.xmlEscape)(a)}"`}),n}findSchemaType(e,t){if(!this.definitions.schemas||!e||!t)return null;let n=this.definitions.schemas[t];return!n||!n.complexTypes?null:n.complexTypes[e]}findChildSchemaObject(e,t,n){if(!e||!t||(n||(n=[]),n.indexOf(e)>=0))return null;n=n.concat([e]);let s=null,i=0,a;if(Array.isArray(e.$lookupTypes)&&e.$lookupTypes.length){let l=e.$lookupTypes;for(i=0;i<l.length;i++){let h=l[i];if(h.$name===t){s=h;break}}}let u=e;if(u.$name===t&&u.name==="element"||u.$ref&&(a=(0,Pr.splitQName)(u.$ref),a.name===t))return u;let c;if(u.$type&&n.length===1){let l=(0,Pr.splitQName)(u.$type);l.prefix===Pr.TNS_PREFIX?c=e.$targetNamespace:c=this.definitions.xmlns[l.prefix];let h=this.findSchemaType(l.name,c);if(h)return this.findChildSchemaObject(h,t,n)}if(u.$base&&(!Array.isArray(u.children)||!u.children.length)){let l=(0,Pr.splitQName)(u.$base);c=e.$targetNamespace,l.prefix!==Pr.TNS_PREFIX&&(c=this.definitions.xmlns[l.prefix]);let h=this.findSchemaType(l.name,c);if(h)return this.findChildSchemaObject(h,t,n)}if(Array.isArray(u.children)&&u.children.length>0)for(let l of u.children){if(s=this.findChildSchemaObject(l,t,n),s)break;if(l.$base){let h=(0,Pr.splitQName)(l.$base),m=h.prefix===Pr.TNS_PREFIX?"":h.prefix;c=l.xmlns[h.prefix]||l.schemaXmlns[h.prefix];let g=this.findSchemaType(h.name,c);if(g&&(s=this.findChildSchemaObject(g,t,n),s)){s.$baseNameSpace=m;break}}}return!s&&u.$name===t?u:s}_initializeOptions(e){this._originalIgnoredNamespaces=(e||{}).ignoredNamespaces,this.options={};let t=e?e.ignoredNamespaces:null;t&&(Array.isArray(t.namespaces)||typeof t.namespaces=="string")?t.override?this.options.ignoredNamespaces=t.namespaces:this.options.ignoredNamespaces=this.ignoredNamespaces.concat(t.namespaces):this.options.ignoredNamespaces=this.ignoredNamespaces,this.options.valueKey=e.valueKey||this.valueKey,this.options.xmlKey=e.xmlKey||this.xmlKey,e.escapeXML!==void 0?this.options.escapeXML=e.escapeXML:this.options.escapeXML=!0,e.returnFault!==void 0?this.options.returnFault=e.returnFault:this.options.returnFault=!1,this.options.handleNilAsNull=!!e.handleNilAsNull,e.namespaceArrayElements!==void 0?this.options.namespaceArrayElements=e.namespaceArrayElements:this.options.namespaceArrayElements=!0,this.options.wsdl_headers=e.wsdl_headers,this.options.wsdl_options=e.wsdl_options,e.httpClient&&(this.options.httpClient=e.httpClient),e.request&&(this.options.request=e.request);let n=e?e.ignoreBaseNameSpaces:null;n!==null&&typeof n<"u"?this.options.ignoreBaseNameSpaces=n:this.options.ignoreBaseNameSpaces=this.ignoreBaseNameSpaces,this.options.forceSoap12Headers=e.forceSoap12Headers,this.options.customDeserializer=e.customDeserializer,this.options.forceUseSchemaXmlns=e.forceUseSchemaXmlns,e.overrideElementKey!==void 0&&(this.options.overrideElementKey=e.overrideElementKey),e.overrideRootElement!==void 0&&(this.options.overrideRootElement=e.overrideRootElement),this.options.useEmptyTag=!!e.useEmptyTag}_processNextInclude(e,t){let n=e.shift();if(!n)return t();let s;!/^https?:/i.test(this.uri)&&!/^https?:/i.test(n.location)?(this.options.wsdl_options!==void 0&&Object.prototype.hasOwnProperty.call(this.options.wsdl_options,"fixedPath")?this.options.wsdl_options.fixedPath:!1)?s=Sv.resolve(Sv.dirname(this.uri),Sv.parse(n.location).base):s=Sv.resolve(Sv.dirname(this.uri),n.location):s=$le.resolve(this.uri||"",n.location);let i=Object.assign({},this.options);if(i.ignoredNamespaces=this._originalIgnoredNamespaces||this.options.ignoredNamespaces,i.WSDL_CACHE=this.WSDL_CACHE,this.options.wsdl_options!==void 0&&typeof this.options.wsdl_options.overrideImportLocation=="function")try{s=this.options.wsdl_options.overrideImportLocation(s,this.uri,n.location,i)}catch(a){return t(a)}zle(s,i,(a,u)=>{if(a)return t(a);if(this._includesWsdl.push(u),u.definitions instanceof gf.DefinitionsElement)Hj.mergeWith(this.definitions,u.definitions,(c,l)=>c instanceof gf.SchemaElement?c.merge(l):void 0);else return t(new Error("wsdl.defintions is not an instance of elements.DefinitionsElement"));this._processNextInclude(e,c=>{t(c)})})}_parse(e){let t=qS.parser(!0,null),n=[],s=null,i=null,a=null,u=null,c=this.options;return t.onopentag=l=>{let h=l.name,m=l.attributes,g=n[n.length-1],y=(0,Pr.splitQName)(h).name;if(y==="schema"&&(u=m),g)try{g.startElement(n,h,m,c,u)}catch(v){if(this.options.strict)throw v;n.push(new gf.Element(h,m,c,u))}else if(y==="definitions")s=new gf.DefinitionsElement(h,m,c),n.push(s);else if(y==="schema")s=new gf.DefinitionsElement("definitions",{},{}),i=new gf.TypesElement("types",{},{}),a=new gf.SchemaElement(h,m,c),i.addChild(a),s.addChild(i),n.push(a);else throw y==="html"?new Error("Root element of WSDL was <html>. This is likely an authentication issue."):new Error("Unexpected root element of WSDL or include")},t.onclosetag=l=>{let h=n[n.length-1];(0,Mle.ok)(h,"Unmatched close tag: "+l),h.endElement(n,l)},t.write(e).close(),s}_fromXML(e){this.definitions=this._parse(e),this.definitions.descriptions={types:{},elements:{}},this.xml=e}_fromServices(e){}_xmlnsMap(){let e=this.definitions.xmlns,t="";for(let n in e){if(n===""||n===Pr.TNS_PREFIX)continue;let s=e[n];switch(s){case"http://xml.apache.org/xml-soap":case"http://schemas.xmlsoap.org/wsdl/":case"http://schemas.xmlsoap.org/wsdl/soap/":case"http://schemas.xmlsoap.org/wsdl/soap12/":case"http://schemas.xmlsoap.org/soap/encoding/":case"http://www.w3.org/2001/XMLSchema":continue}~s.indexOf("http://schemas.xmlsoap.org/")||~s.indexOf("http://www.w3.org/")||~s.indexOf("http://xml.apache.org/")||(t+=" xmlns:"+n+'="'+s+'"')}return t}};Xs.WSDL=KS;function zle(r,e,t){let n,s;typeof e=="function"?(n={},s=e):(n=e,s=t);let i=n.WSDL_CACHE[r];return i?s.call(i,null,i):Xj(r,n,s)}o(zle,"open_wsdl_recursive");function Xj(r,e,t){let n,s;typeof e=="function"?(n={},s=e):typeof t=="function"&&(n=e,s=t);let i=n.WSDL_CACHE||{},a=n.wsdl_headers,u=n.wsdl_options,c;return/^<\?xml[^>]*?>/i.test(r)?(c=new KS(r,r,n),i[r]=c,c.WSDL_CACHE=i,c.onReady(s)):/^https?:/i.test(r)?(Kj("Reading url: %s",r),(n.httpClient||new Gle.HttpClient(n)).request(r,null,(h,m,g)=>{h?s(h):m&&m.status===200?(c=new KS(g,r,n),i[r]=c,c.WSDL_CACHE=i,c.onReady(s)):s(new Error("Invalid WSDL URL: "+r+`
|
|
85
|
-
|
|
86
|
-
\r Code: `+m.status+`
|
|
87
|
-
|
|
88
|
-
\r Response Body: `+m.data))},a,u)):(Kj("Reading file: %s",r),Hle.readFile(r,"utf8",(l,h)=>{l?s(l):(c=new KS(h,r,n),i[r]=c,c.WSDL_CACHE=i,c.onReady(s))})),c}o(Xj,"open_wsdl")});var zj=te(Wj=>{"use strict";Object.defineProperty(Wj,"__esModule",{value:!0})});var Zj=te(Ut=>{"use strict";var Jj=Ut&&Ut.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(r,n,s)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),Jle=Ut&&Ut.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),Yle=Ut&&Ut.__importStar||(function(){var r=o(function(e){return r=Object.getOwnPropertyNames||function(t){var n=[];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(n[n.length]=s);return n},r(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n=r(e),s=0;s<n.length;s++)n[s]!=="default"&&Jj(t,e,n[s]);return Jle(t,e),t}})(),Qle=Ut&&Ut.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&Jj(e,r,t)};Object.defineProperty(Ut,"__esModule",{value:!0});Ut.WSDL=Ut.passwordDigest=Ut.Server=Ut.WSSecurityCertWithToken=Ut.WSSecurityPlusCert=Ut.WSSecurityCert=Ut.WSSecurity=Ut.NTLMSecurity=Ut.ClientSSLSecurityPFX=Ut.ClientSSLSecurity=Ut.BearerSecurity=Ut.BasicAuthSecurity=Ut.HttpClient=Ut.Client=Ut.security=void 0;Ut.createClient=Qj;Ut.createClientAsync=lfe;Ut.listen=ffe;var Zle=m_(),efe=Yle(J_()),tfe=Y_(),rfe=hc(),Yj=pD();Ut.security=efe;var nfe=m_();Object.defineProperty(Ut,"Client",{enumerable:!0,get:o(function(){return nfe.Client},"get")});var sfe=cS();Object.defineProperty(Ut,"HttpClient",{enumerable:!0,get:o(function(){return sfe.HttpClient},"get")});var zo=J_();Object.defineProperty(Ut,"BasicAuthSecurity",{enumerable:!0,get:o(function(){return zo.BasicAuthSecurity},"get")});Object.defineProperty(Ut,"BearerSecurity",{enumerable:!0,get:o(function(){return zo.BearerSecurity},"get")});Object.defineProperty(Ut,"ClientSSLSecurity",{enumerable:!0,get:o(function(){return zo.ClientSSLSecurity},"get")});Object.defineProperty(Ut,"ClientSSLSecurityPFX",{enumerable:!0,get:o(function(){return zo.ClientSSLSecurityPFX},"get")});Object.defineProperty(Ut,"NTLMSecurity",{enumerable:!0,get:o(function(){return zo.NTLMSecurity},"get")});Object.defineProperty(Ut,"WSSecurity",{enumerable:!0,get:o(function(){return zo.WSSecurity},"get")});Object.defineProperty(Ut,"WSSecurityCert",{enumerable:!0,get:o(function(){return zo.WSSecurityCert},"get")});Object.defineProperty(Ut,"WSSecurityPlusCert",{enumerable:!0,get:o(function(){return zo.WSSecurityPlusCert},"get")});Object.defineProperty(Ut,"WSSecurityCertWithToken",{enumerable:!0,get:o(function(){return zo.WSSecurityCertWithToken},"get")});var ife=Y_();Object.defineProperty(Ut,"Server",{enumerable:!0,get:o(function(){return ife.Server},"get")});var afe=hc();Object.defineProperty(Ut,"passwordDigest",{enumerable:!0,get:o(function(){return afe.passwordDigest},"get")});Qle(zj(),Ut);var ofe=pD();Object.defineProperty(Ut,"WSDL",{enumerable:!0,get:o(function(){return ofe.WSDL},"get")});function ufe(r,e,t,n){e.has(r)?process.nextTick(()=>{n(null,e.get(r))}):t((s,i)=>{if(s)return n(s);e.set(r,i),n(null,i)})}o(ufe,"getFromCache");function cfe(r,e,t){typeof e=="function"&&(t=e,e={});let n=o(s=>{(0,Yj.open_wsdl)(r,e,s)},"openWsdl");if(e.disableCache===!0)n(t);else{let s;e.wsdlCache?s=e.wsdlCache:s=rfe.wsdlCacheSingleton,ufe(r,s,n,t)}}o(cfe,"_requestWSDL");function Qj(r,e,t,n){let s=n,i,a;typeof e=="function"?(i=e,s=t,a={}):typeof t=="function"&&(a=e,i=t,s=n),s=a.endpoint||s,cfe(r,a,(u,c)=>{i(u,c&&new Zle.Client(c,s,a))})}o(Qj,"createClient");function lfe(r,e,t){return typeof e>"u"&&(e={}),new Promise((n,s)=>{Qj(r,e,(i,a)=>{i&&s(i),n(a)},t)})}o(lfe,"createClientAsync");function ffe(r,e,t,n,s){let i,a,u="";typeof e=="object"&&!(e instanceof RegExp)?(i=e,a=i.path,t=i.services,n=i.xml,u=i.uri):(a=e,i={path:e,services:t,callback:s});let c=new Yj.WSDL(n||t,u,i);return new tfe.Server(r,a,t,c,i)}o(ffe,"listen")});var lF=te((Abe,cF)=>{"use strict";cF.exports=function(r,e){return Object.keys(e).forEach(function(t){r[t]=r[t]||e[t]}),r}});var hF=te((Cbe,fF)=>{"use strict";var xD=YT(),Yfe=Ge("util"),gD=Ge("path"),Qfe=Ge("http"),Zfe=Ge("https"),ehe=Ge("url").parse,the=Ge("fs"),rhe=Ge("stream").Stream,nhe=Ge("crypto"),vD=QT(),she=iI(),ihe=mI(),Ec=Hg(),yD=lF();function fr(r){if(!(this instanceof fr))return new fr(r);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],xD.call(this),r=r||{};for(var e in r)this[e]=r[e]}o(fr,"FormData");Yfe.inherits(fr,xD);fr.LINE_BREAK=`\r
|
|
89
|
-
`;fr.DEFAULT_CONTENT_TYPE="application/octet-stream";fr.prototype.append=function(r,e,t){t=t||{},typeof t=="string"&&(t={filename:t});var n=xD.prototype.append.bind(this);if((typeof e=="number"||e==null)&&(e=String(e)),Array.isArray(e)){this._error(new Error("Arrays are not supported."));return}var s=this._multiPartHeader(r,e,t),i=this._multiPartFooter();n(s),n(e),n(i),this._trackLength(s,e,t)};fr.prototype._trackLength=function(r,e,t){var n=0;t.knownLength!=null?n+=Number(t.knownLength):Buffer.isBuffer(e)?n=e.length:typeof e=="string"&&(n=Buffer.byteLength(e)),this._valueLength+=n,this._overheadLength+=Buffer.byteLength(r)+fr.LINE_BREAK.length,!(!e||!e.path&&!(e.readable&&Ec(e,"httpVersion"))&&!(e instanceof rhe))&&(t.knownLength||this._valuesToMeasure.push(e))};fr.prototype._lengthRetriever=function(r,e){Ec(r,"fd")?r.end!=null&&r.end!=1/0&&r.start!=null?e(null,r.end+1-(r.start?r.start:0)):the.stat(r.path,function(t,n){if(t){e(t);return}var s=n.size-(r.start?r.start:0);e(null,s)}):Ec(r,"httpVersion")?e(null,Number(r.headers["content-length"])):Ec(r,"httpModule")?(r.on("response",function(t){r.pause(),e(null,Number(t.headers["content-length"]))}),r.resume()):e("Unknown stream")};fr.prototype._multiPartHeader=function(r,e,t){if(typeof t.header=="string")return t.header;var n=this._getContentDisposition(e,t),s=this._getContentType(e,t),i="",a={"Content-Disposition":["form-data",'name="'+r+'"'].concat(n||[]),"Content-Type":[].concat(s||[])};typeof t.header=="object"&&yD(a,t.header);var u;for(var c in a)if(Ec(a,c)){if(u=a[c],u==null)continue;Array.isArray(u)||(u=[u]),u.length&&(i+=c+": "+u.join("; ")+fr.LINE_BREAK)}return"--"+this.getBoundary()+fr.LINE_BREAK+i+fr.LINE_BREAK};fr.prototype._getContentDisposition=function(r,e){var t;if(typeof e.filepath=="string"?t=gD.normalize(e.filepath).replace(/\\/g,"/"):e.filename||r&&(r.name||r.path)?t=gD.basename(e.filename||r&&(r.name||r.path)):r&&r.readable&&Ec(r,"httpVersion")&&(t=gD.basename(r.client._httpMessage.path||"")),t)return'filename="'+t+'"'};fr.prototype._getContentType=function(r,e){var t=e.contentType;return!t&&r&&r.name&&(t=vD.lookup(r.name)),!t&&r&&r.path&&(t=vD.lookup(r.path)),!t&&r&&r.readable&&Ec(r,"httpVersion")&&(t=r.headers["content-type"]),!t&&(e.filepath||e.filename)&&(t=vD.lookup(e.filepath||e.filename)),!t&&r&&typeof r=="object"&&(t=fr.DEFAULT_CONTENT_TYPE),t};fr.prototype._multiPartFooter=function(){return(function(r){var e=fr.LINE_BREAK,t=this._streams.length===0;t&&(e+=this._lastBoundary()),r(e)}).bind(this)};fr.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+fr.LINE_BREAK};fr.prototype.getHeaders=function(r){var e,t={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(e in r)Ec(r,e)&&(t[e.toLowerCase()]=r[e]);return t};fr.prototype.setBoundary=function(r){if(typeof r!="string")throw new TypeError("FormData boundary must be a string");this._boundary=r};fr.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};fr.prototype.getBuffer=function(){for(var r=new Buffer.alloc(0),e=this.getBoundary(),t=0,n=this._streams.length;t<n;t++)typeof this._streams[t]!="function"&&(Buffer.isBuffer(this._streams[t])?r=Buffer.concat([r,this._streams[t]]):r=Buffer.concat([r,Buffer.from(this._streams[t])]),(typeof this._streams[t]!="string"||this._streams[t].substring(2,e.length+2)!==e)&&(r=Buffer.concat([r,Buffer.from(fr.LINE_BREAK)])));return Buffer.concat([r,Buffer.from(this._lastBoundary())])};fr.prototype._generateBoundary=function(){this._boundary="--------------------------"+nhe.randomBytes(12).toString("hex")};fr.prototype.getLengthSync=function(){var r=this._overheadLength+this._valueLength;return this._streams.length&&(r+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),r};fr.prototype.hasKnownLength=function(){var r=!0;return this._valuesToMeasure.length&&(r=!1),r};fr.prototype.getLength=function(r){var e=this._overheadLength+this._valueLength;if(this._streams.length&&(e+=this._lastBoundary().length),!this._valuesToMeasure.length){process.nextTick(r.bind(this,null,e));return}she.parallel(this._valuesToMeasure,this._lengthRetriever,function(t,n){if(t){r(t);return}n.forEach(function(s){e+=s}),r(null,e)})};fr.prototype.submit=function(r,e){var t,n,s={method:"post"};return typeof r=="string"?(r=ehe(r),n=yD({port:r.port,path:r.pathname,host:r.hostname,protocol:r.protocol},s)):(n=yD(r,s),n.port||(n.port=n.protocol==="https:"?443:80)),n.headers=this.getHeaders(r.headers),n.protocol==="https:"?t=Zfe.request(n):t=Qfe.request(n),this.getLength((function(i,a){if(i&&i!=="Unknown stream"){this._error(i);return}if(a&&t.setHeader("Content-Length",a),this.pipe(t),e){var u,c=o(function(l,h){return t.removeListener("error",c),t.removeListener("response",u),e.call(this,l,h)},"callback");u=c.bind(this,null),t.on("error",c),t.on("response",u)}}).bind(this)),t};fr.prototype._error=function(r){this.error||(this.error=r,this.pause(),this.emit("error",r))};fr.prototype.toString=function(){return"[object FormData]"};ihe(fr.prototype,"FormData");fF.exports=fr});var lb=te($D=>{"use strict";(function(){$D.defaults={"0.1":{explicitCharkey:!1,trim:!0,normalize:!0,normalizeTags:!1,attrkey:"@",charkey:"#",explicitArray:!1,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!1,validator:null,xmlns:!1,explicitChildren:!1,childkey:"@@",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,emptyTag:""},"0.2":{explicitCharkey:!1,trim:!1,normalize:!1,normalizeTags:!1,attrkey:"$",charkey:"_",explicitArray:!0,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!0,validator:null,xmlns:!1,explicitChildren:!1,preserveChildrenOrder:!1,childkey:"$$",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,rootName:"root",xmldec:{version:"1.0",encoding:"UTF-8",standalone:!0},doctype:null,renderOpts:{pretty:!0,indent:" ",newline:`
|
|
90
|
-
`},headless:!1,chunkSize:1e4,emptyTag:"",cdata:!1}}}).call($D)});var fo=te((dM,Nc)=>{"use strict";(function(){var r,e,t,n,s,i,a,u=[].slice,c={}.hasOwnProperty;r=o(function(){var l,h,m,g,y,v;if(v=arguments[0],y=2<=arguments.length?u.call(arguments,1):[],s(Object.assign))Object.assign.apply(null,arguments);else for(l=0,m=y.length;l<m;l++)if(g=y[l],g!=null)for(h in g)c.call(g,h)&&(v[h]=g[h]);return v},"assign"),s=o(function(l){return!!l&&Object.prototype.toString.call(l)==="[object Function]"},"isFunction"),i=o(function(l){var h;return!!l&&((h=typeof l)=="function"||h==="object")},"isObject"),t=o(function(l){return s(Array.isArray)?Array.isArray(l):Object.prototype.toString.call(l)==="[object Array]"},"isArray"),n=o(function(l){var h;if(t(l))return!l.length;for(h in l)if(c.call(l,h))return!1;return!0},"isEmpty"),a=o(function(l){var h,m;return i(l)&&(m=Object.getPrototypeOf(l))&&(h=m.constructor)&&typeof h=="function"&&h instanceof h&&Function.prototype.toString.call(h)===Function.prototype.toString.call(Object)},"isPlainObject"),e=o(function(l){return s(l.valueOf)?l.valueOf():l},"getValue"),Nc.exports.assign=r,Nc.exports.isFunction=s,Nc.exports.isObject=i,Nc.exports.isArray=t,Nc.exports.isEmpty=n,Nc.exports.isPlainObject=a,Nc.exports.getValue=e}).call(dM)});var GD=te((mM,gM)=>{"use strict";(function(){var r;gM.exports=r=(function(){function e(){}return o(e,"XMLDOMImplementation"),e.prototype.hasFeature=function(t,n){return!0},e.prototype.createDocumentType=function(t,n,s){throw new Error("This DOM method is not implemented.")},e.prototype.createDocument=function(t,n,s){throw new Error("This DOM method is not implemented.")},e.prototype.createHTMLDocument=function(t){throw new Error("This DOM method is not implemented.")},e.prototype.getFeature=function(t,n){throw new Error("This DOM method is not implemented.")},e})()}).call(mM)});var xM=te((vM,yM)=>{"use strict";(function(){var r;yM.exports=r=(function(){function e(){}return o(e,"XMLDOMErrorHandler"),e.prototype.handleError=function(t){throw new Error(t)},e})()}).call(vM)});var SM=te((wM,EM)=>{"use strict";(function(){var r;EM.exports=r=(function(){function e(t){this.arr=t||[]}return o(e,"XMLDOMStringList"),Object.defineProperty(e.prototype,"length",{get:o(function(){return this.arr.length},"get")}),e.prototype.item=function(t){return this.arr[t]||null},e.prototype.contains=function(t){return this.arr.indexOf(t)!==-1},e})()}).call(wM)});var CM=te((bM,AM)=>{"use strict";(function(){var r,e,t;e=xM(),t=SM(),AM.exports=r=(function(){function n(){var s;this.defaultParams={"canonical-form":!1,"cdata-sections":!1,comments:!1,"datatype-normalization":!1,"element-content-whitespace":!0,entities:!0,"error-handler":new e,infoset:!0,"validate-if-schema":!1,namespaces:!0,"namespace-declarations":!0,"normalize-characters":!1,"schema-location":"","schema-type":"","split-cdata-sections":!0,validate:!1,"well-formed":!0},this.params=s=Object.create(this.defaultParams)}return o(n,"XMLDOMConfiguration"),Object.defineProperty(n.prototype,"parameterNames",{get:o(function(){return new t(Object.keys(this.defaultParams))},"get")}),n.prototype.getParameter=function(s){return this.params.hasOwnProperty(s)?this.params[s]:null},n.prototype.canSetParameter=function(s,i){return!0},n.prototype.setParameter=function(s,i){return i!=null?this.params[s]=i:delete this.params[s]},n})()}).call(bM)});var yn=te((NM,TM)=>{"use strict";(function(){TM.exports={Element:1,Attribute:2,Text:3,CData:4,EntityReference:5,EntityDeclaration:6,ProcessingInstruction:7,Comment:8,Document:9,DocType:10,DocumentFragment:11,NotationDeclaration:12,Declaration:201,Raw:202,AttributeDeclaration:203,ElementDeclaration:204,Dummy:205}}).call(NM)});var XD=te((IM,_M)=>{"use strict";(function(){var r,e,t;r=yn(),t=mi(),_M.exports=e=(function(){function n(s,i,a){if(this.parent=s,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),i==null)throw new Error("Missing attribute name. "+this.debugInfo(i));this.name=this.stringify.name(i),this.value=this.stringify.attValue(a),this.type=r.Attribute,this.isId=!1,this.schemaTypeInfo=null}return o(n,"XMLAttribute"),Object.defineProperty(n.prototype,"nodeType",{get:o(function(){return this.type},"get")}),Object.defineProperty(n.prototype,"ownerElement",{get:o(function(){return this.parent},"get")}),Object.defineProperty(n.prototype,"textContent",{get:o(function(){return this.value},"get"),set:o(function(s){return this.value=s||""},"set")}),Object.defineProperty(n.prototype,"namespaceURI",{get:o(function(){return""},"get")}),Object.defineProperty(n.prototype,"prefix",{get:o(function(){return""},"get")}),Object.defineProperty(n.prototype,"localName",{get:o(function(){return this.name},"get")}),Object.defineProperty(n.prototype,"specified",{get:o(function(){return!0},"get")}),n.prototype.clone=function(){return Object.create(this)},n.prototype.toString=function(s){return this.options.writer.attribute(this,this.options.writer.filterOptions(s))},n.prototype.debugInfo=function(s){return s=s||this.name,s==null?"parent: <"+this.parent.name+">":"attribute: {"+s+"}, parent: <"+this.parent.name+">"},n.prototype.isEqualNode=function(s){return!(s.namespaceURI!==this.namespaceURI||s.prefix!==this.prefix||s.localName!==this.localName||s.value!==this.value)},n})()}).call(IM)});var fb=te((DM,BM)=>{"use strict";(function(){var r;BM.exports=r=(function(){function e(t){this.nodes=t}return o(e,"XMLNamedNodeMap"),Object.defineProperty(e.prototype,"length",{get:o(function(){return Object.keys(this.nodes).length||0},"get")}),e.prototype.clone=function(){return this.nodes=null},e.prototype.getNamedItem=function(t){return this.nodes[t]},e.prototype.setNamedItem=function(t){var n;return n=this.nodes[t.nodeName],this.nodes[t.nodeName]=t,n||null},e.prototype.removeNamedItem=function(t){var n;return n=this.nodes[t],delete this.nodes[t],n||null},e.prototype.item=function(t){return this.nodes[Object.keys(this.nodes)[t]]||null},e.prototype.getNamedItemNS=function(t,n){throw new Error("This DOM method is not implemented.")},e.prototype.setNamedItemNS=function(t){throw new Error("This DOM method is not implemented.")},e.prototype.removeNamedItemNS=function(t,n){throw new Error("This DOM method is not implemented.")},e})()}).call(DM)});var hb=te((RM,OM)=>{"use strict";(function(){var r,e,t,n,s,i,a,u,c,l=o(function(m,g){for(var y in g)h.call(g,y)&&(m[y]=g[y]);function v(){this.constructor=m}return o(v,"ctor"),v.prototype=g.prototype,m.prototype=new v,m.__super__=g.prototype,m},"extend"),h={}.hasOwnProperty;c=fo(),u=c.isObject,a=c.isFunction,i=c.getValue,s=mi(),r=yn(),e=XD(),n=fb(),OM.exports=t=(function(m){l(g,m);function g(y,v,E){var w,C,_,b;if(g.__super__.constructor.call(this,y),v==null)throw new Error("Missing element name. "+this.debugInfo());if(this.name=this.stringify.name(v),this.type=r.Element,this.attribs={},this.schemaTypeInfo=null,E!=null&&this.attribute(E),y.type===r.Document&&(this.isRoot=!0,this.documentObject=y,y.rootObject=this,y.children)){for(b=y.children,C=0,_=b.length;C<_;C++)if(w=b[C],w.type===r.DocType){w.name=this.name;break}}}return o(g,"XMLElement"),Object.defineProperty(g.prototype,"tagName",{get:o(function(){return this.name},"get")}),Object.defineProperty(g.prototype,"namespaceURI",{get:o(function(){return""},"get")}),Object.defineProperty(g.prototype,"prefix",{get:o(function(){return""},"get")}),Object.defineProperty(g.prototype,"localName",{get:o(function(){return this.name},"get")}),Object.defineProperty(g.prototype,"id",{get:o(function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},"get")}),Object.defineProperty(g.prototype,"className",{get:o(function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},"get")}),Object.defineProperty(g.prototype,"classList",{get:o(function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},"get")}),Object.defineProperty(g.prototype,"attributes",{get:o(function(){return(!this.attributeMap||!this.attributeMap.nodes)&&(this.attributeMap=new n(this.attribs)),this.attributeMap},"get")}),g.prototype.clone=function(){var y,v,E,w;E=Object.create(this),E.isRoot&&(E.documentObject=null),E.attribs={},w=this.attribs;for(v in w)h.call(w,v)&&(y=w[v],E.attribs[v]=y.clone());return E.children=[],this.children.forEach(function(C){var _;return _=C.clone(),_.parent=E,E.children.push(_)}),E},g.prototype.attribute=function(y,v){var E,w;if(y!=null&&(y=i(y)),u(y))for(E in y)h.call(y,E)&&(w=y[E],this.attribute(E,w));else a(v)&&(v=v.apply()),this.options.keepNullAttributes&&v==null?this.attribs[y]=new e(this,y,""):v!=null&&(this.attribs[y]=new e(this,y,v));return this},g.prototype.removeAttribute=function(y){var v,E,w;if(y==null)throw new Error("Missing attribute name. "+this.debugInfo());if(y=i(y),Array.isArray(y))for(E=0,w=y.length;E<w;E++)v=y[E],delete this.attribs[v];else delete this.attribs[y];return this},g.prototype.toString=function(y){return this.options.writer.element(this,this.options.writer.filterOptions(y))},g.prototype.att=function(y,v){return this.attribute(y,v)},g.prototype.a=function(y,v){return this.attribute(y,v)},g.prototype.getAttribute=function(y){return this.attribs.hasOwnProperty(y)?this.attribs[y].value:null},g.prototype.setAttribute=function(y,v){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.getAttributeNode=function(y){return this.attribs.hasOwnProperty(y)?this.attribs[y]:null},g.prototype.setAttributeNode=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.removeAttributeNode=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.getElementsByTagName=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.getAttributeNS=function(y,v){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.setAttributeNS=function(y,v,E){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.removeAttributeNS=function(y,v){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.getAttributeNodeNS=function(y,v){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.setAttributeNodeNS=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.getElementsByTagNameNS=function(y,v){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.hasAttribute=function(y){return this.attribs.hasOwnProperty(y)},g.prototype.hasAttributeNS=function(y,v){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.setIdAttribute=function(y,v){return this.attribs.hasOwnProperty(y)?this.attribs[y].isId:v},g.prototype.setIdAttributeNS=function(y,v,E){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.setIdAttributeNode=function(y,v){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.getElementsByTagName=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.getElementsByTagNameNS=function(y,v){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.getElementsByClassName=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.isEqualNode=function(y){var v,E,w;if(!g.__super__.isEqualNode.apply(this,arguments).isEqualNode(y)||y.namespaceURI!==this.namespaceURI||y.prefix!==this.prefix||y.localName!==this.localName||y.attribs.length!==this.attribs.length)return!1;for(v=E=0,w=this.attribs.length-1;0<=w?E<=w:E>=w;v=0<=w?++E:--E)if(!this.attribs[v].isEqualNode(y.attribs[v]))return!1;return!0},g})(s)}).call(RM)});var Pv=te((PM,kM)=>{"use strict";(function(){var r,e,t=o(function(s,i){for(var a in i)n.call(i,a)&&(s[a]=i[a]);function u(){this.constructor=s}return o(u,"ctor"),u.prototype=i.prototype,s.prototype=new u,s.__super__=i.prototype,s},"extend"),n={}.hasOwnProperty;e=mi(),kM.exports=r=(function(s){t(i,s);function i(a){i.__super__.constructor.call(this,a),this.value=""}return o(i,"XMLCharacterData"),Object.defineProperty(i.prototype,"data",{get:o(function(){return this.value},"get"),set:o(function(a){return this.value=a||""},"set")}),Object.defineProperty(i.prototype,"length",{get:o(function(){return this.value.length},"get")}),Object.defineProperty(i.prototype,"textContent",{get:o(function(){return this.value},"get"),set:o(function(a){return this.value=a||""},"set")}),i.prototype.clone=function(){return Object.create(this)},i.prototype.substringData=function(a,u){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.appendData=function(a){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.insertData=function(a,u){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.deleteData=function(a,u){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.replaceData=function(a,u,c){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.isEqualNode=function(a){return!(!i.__super__.isEqualNode.apply(this,arguments).isEqualNode(a)||a.data!==this.data)},i})(e)}).call(PM)});var pb=te((LM,VM)=>{"use strict";(function(){var r,e,t,n=o(function(i,a){for(var u in a)s.call(a,u)&&(i[u]=a[u]);function c(){this.constructor=i}return o(c,"ctor"),c.prototype=a.prototype,i.prototype=new c,i.__super__=a.prototype,i},"extend"),s={}.hasOwnProperty;r=yn(),t=Pv(),VM.exports=e=(function(i){n(a,i);function a(u,c){if(a.__super__.constructor.call(this,u),c==null)throw new Error("Missing CDATA text. "+this.debugInfo());this.name="#cdata-section",this.type=r.CData,this.value=this.stringify.cdata(c)}return o(a,"XMLCData"),a.prototype.clone=function(){return Object.create(this)},a.prototype.toString=function(u){return this.options.writer.cdata(this,this.options.writer.filterOptions(u))},a})(t)}).call(LM)});var db=te((UM,jM)=>{"use strict";(function(){var r,e,t,n=o(function(i,a){for(var u in a)s.call(a,u)&&(i[u]=a[u]);function c(){this.constructor=i}return o(c,"ctor"),c.prototype=a.prototype,i.prototype=new c,i.__super__=a.prototype,i},"extend"),s={}.hasOwnProperty;r=yn(),e=Pv(),jM.exports=t=(function(i){n(a,i);function a(u,c){if(a.__super__.constructor.call(this,u),c==null)throw new Error("Missing comment text. "+this.debugInfo());this.name="#comment",this.type=r.Comment,this.value=this.stringify.comment(c)}return o(a,"XMLComment"),a.prototype.clone=function(){return Object.create(this)},a.prototype.toString=function(u){return this.options.writer.comment(this,this.options.writer.filterOptions(u))},a})(e)}).call(UM)});var mb=te((FM,MM)=>{"use strict";(function(){var r,e,t,n,s=o(function(a,u){for(var c in u)i.call(u,c)&&(a[c]=u[c]);function l(){this.constructor=a}return o(l,"ctor"),l.prototype=u.prototype,a.prototype=new l,a.__super__=u.prototype,a},"extend"),i={}.hasOwnProperty;n=fo().isObject,t=mi(),r=yn(),MM.exports=e=(function(a){s(u,a);function u(c,l,h,m){var g;u.__super__.constructor.call(this,c),n(l)&&(g=l,l=g.version,h=g.encoding,m=g.standalone),l||(l="1.0"),this.type=r.Declaration,this.version=this.stringify.xmlVersion(l),h!=null&&(this.encoding=this.stringify.xmlEncoding(h)),m!=null&&(this.standalone=this.stringify.xmlStandalone(m))}return o(u,"XMLDeclaration"),u.prototype.toString=function(c){return this.options.writer.declaration(this,this.options.writer.filterOptions(c))},u})(t)}).call(FM)});var gb=te((qM,HM)=>{"use strict";(function(){var r,e,t,n=o(function(i,a){for(var u in a)s.call(a,u)&&(i[u]=a[u]);function c(){this.constructor=i}return o(c,"ctor"),c.prototype=a.prototype,i.prototype=new c,i.__super__=a.prototype,i},"extend"),s={}.hasOwnProperty;t=mi(),r=yn(),HM.exports=e=(function(i){n(a,i);function a(u,c,l,h,m,g){if(a.__super__.constructor.call(this,u),c==null)throw new Error("Missing DTD element name. "+this.debugInfo());if(l==null)throw new Error("Missing DTD attribute name. "+this.debugInfo(c));if(!h)throw new Error("Missing DTD attribute type. "+this.debugInfo(c));if(!m)throw new Error("Missing DTD attribute default. "+this.debugInfo(c));if(m.indexOf("#")!==0&&(m="#"+m),!m.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. "+this.debugInfo(c));if(g&&!m.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT. "+this.debugInfo(c));this.elementName=this.stringify.name(c),this.type=r.AttributeDeclaration,this.attributeName=this.stringify.name(l),this.attributeType=this.stringify.dtdAttType(h),g&&(this.defaultValue=this.stringify.dtdAttDefault(g)),this.defaultValueType=m}return o(a,"XMLDTDAttList"),a.prototype.toString=function(u){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(u))},a})(t)}).call(qM)});var vb=te((KM,$M)=>{"use strict";(function(){var r,e,t,n,s=o(function(a,u){for(var c in u)i.call(u,c)&&(a[c]=u[c]);function l(){this.constructor=a}return o(l,"ctor"),l.prototype=u.prototype,a.prototype=new l,a.__super__=u.prototype,a},"extend"),i={}.hasOwnProperty;n=fo().isObject,t=mi(),r=yn(),$M.exports=e=(function(a){s(u,a);function u(c,l,h,m){if(u.__super__.constructor.call(this,c),h==null)throw new Error("Missing DTD entity name. "+this.debugInfo(h));if(m==null)throw new Error("Missing DTD entity value. "+this.debugInfo(h));if(this.pe=!!l,this.name=this.stringify.name(h),this.type=r.EntityDeclaration,!n(m))this.value=this.stringify.dtdEntityValue(m),this.internal=!0;else{if(!m.pubID&&!m.sysID)throw new Error("Public and/or system identifiers are required for an external entity. "+this.debugInfo(h));if(m.pubID&&!m.sysID)throw new Error("System identifier is required for a public external entity. "+this.debugInfo(h));if(this.internal=!1,m.pubID!=null&&(this.pubID=this.stringify.dtdPubID(m.pubID)),m.sysID!=null&&(this.sysID=this.stringify.dtdSysID(m.sysID)),m.nData!=null&&(this.nData=this.stringify.dtdNData(m.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity. "+this.debugInfo(h))}}return o(u,"XMLDTDEntity"),Object.defineProperty(u.prototype,"publicId",{get:o(function(){return this.pubID},"get")}),Object.defineProperty(u.prototype,"systemId",{get:o(function(){return this.sysID},"get")}),Object.defineProperty(u.prototype,"notationName",{get:o(function(){return this.nData||null},"get")}),Object.defineProperty(u.prototype,"inputEncoding",{get:o(function(){return null},"get")}),Object.defineProperty(u.prototype,"xmlEncoding",{get:o(function(){return null},"get")}),Object.defineProperty(u.prototype,"xmlVersion",{get:o(function(){return null},"get")}),u.prototype.toString=function(c){return this.options.writer.dtdEntity(this,this.options.writer.filterOptions(c))},u})(t)}).call(KM)});var yb=te((GM,XM)=>{"use strict";(function(){var r,e,t,n=o(function(i,a){for(var u in a)s.call(a,u)&&(i[u]=a[u]);function c(){this.constructor=i}return o(c,"ctor"),c.prototype=a.prototype,i.prototype=new c,i.__super__=a.prototype,i},"extend"),s={}.hasOwnProperty;t=mi(),r=yn(),XM.exports=e=(function(i){n(a,i);function a(u,c,l){if(a.__super__.constructor.call(this,u),c==null)throw new Error("Missing DTD element name. "+this.debugInfo());l||(l="(#PCDATA)"),Array.isArray(l)&&(l="("+l.join(",")+")"),this.name=this.stringify.name(c),this.type=r.ElementDeclaration,this.value=this.stringify.dtdElementValue(l)}return o(a,"XMLDTDElement"),a.prototype.toString=function(u){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(u))},a})(t)}).call(GM)});var xb=te((WM,zM)=>{"use strict";(function(){var r,e,t,n=o(function(i,a){for(var u in a)s.call(a,u)&&(i[u]=a[u]);function c(){this.constructor=i}return o(c,"ctor"),c.prototype=a.prototype,i.prototype=new c,i.__super__=a.prototype,i},"extend"),s={}.hasOwnProperty;t=mi(),r=yn(),zM.exports=e=(function(i){n(a,i);function a(u,c,l){if(a.__super__.constructor.call(this,u),c==null)throw new Error("Missing DTD notation name. "+this.debugInfo(c));if(!l.pubID&&!l.sysID)throw new Error("Public or system identifiers are required for an external entity. "+this.debugInfo(c));this.name=this.stringify.name(c),this.type=r.NotationDeclaration,l.pubID!=null&&(this.pubID=this.stringify.dtdPubID(l.pubID)),l.sysID!=null&&(this.sysID=this.stringify.dtdSysID(l.sysID))}return o(a,"XMLDTDNotation"),Object.defineProperty(a.prototype,"publicId",{get:o(function(){return this.pubID},"get")}),Object.defineProperty(a.prototype,"systemId",{get:o(function(){return this.sysID},"get")}),a.prototype.toString=function(u){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(u))},a})(t)}).call(WM)});var wb=te((JM,YM)=>{"use strict";(function(){var r,e,t,n,s,i,a,u,c,l=o(function(m,g){for(var y in g)h.call(g,y)&&(m[y]=g[y]);function v(){this.constructor=m}return o(v,"ctor"),v.prototype=g.prototype,m.prototype=new v,m.__super__=g.prototype,m},"extend"),h={}.hasOwnProperty;c=fo().isObject,u=mi(),r=yn(),e=gb(),n=vb(),t=yb(),s=xb(),a=fb(),YM.exports=i=(function(m){l(g,m);function g(y,v,E){var w,C,_,b,A,T;if(g.__super__.constructor.call(this,y),this.type=r.DocType,y.children){for(b=y.children,C=0,_=b.length;C<_;C++)if(w=b[C],w.type===r.Element){this.name=w.name;break}}this.documentObject=y,c(v)&&(A=v,v=A.pubID,E=A.sysID),E==null&&(T=[v,E],E=T[0],v=T[1]),v!=null&&(this.pubID=this.stringify.dtdPubID(v)),E!=null&&(this.sysID=this.stringify.dtdSysID(E))}return o(g,"XMLDocType"),Object.defineProperty(g.prototype,"entities",{get:o(function(){var y,v,E,w,C;for(w={},C=this.children,v=0,E=C.length;v<E;v++)y=C[v],y.type===r.EntityDeclaration&&!y.pe&&(w[y.name]=y);return new a(w)},"get")}),Object.defineProperty(g.prototype,"notations",{get:o(function(){var y,v,E,w,C;for(w={},C=this.children,v=0,E=C.length;v<E;v++)y=C[v],y.type===r.NotationDeclaration&&(w[y.name]=y);return new a(w)},"get")}),Object.defineProperty(g.prototype,"publicId",{get:o(function(){return this.pubID},"get")}),Object.defineProperty(g.prototype,"systemId",{get:o(function(){return this.sysID},"get")}),Object.defineProperty(g.prototype,"internalSubset",{get:o(function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},"get")}),g.prototype.element=function(y,v){var E;return E=new t(this,y,v),this.children.push(E),this},g.prototype.attList=function(y,v,E,w,C){var _;return _=new e(this,y,v,E,w,C),this.children.push(_),this},g.prototype.entity=function(y,v){var E;return E=new n(this,!1,y,v),this.children.push(E),this},g.prototype.pEntity=function(y,v){var E;return E=new n(this,!0,y,v),this.children.push(E),this},g.prototype.notation=function(y,v){var E;return E=new s(this,y,v),this.children.push(E),this},g.prototype.toString=function(y){return this.options.writer.docType(this,this.options.writer.filterOptions(y))},g.prototype.ele=function(y,v){return this.element(y,v)},g.prototype.att=function(y,v,E,w,C){return this.attList(y,v,E,w,C)},g.prototype.ent=function(y,v){return this.entity(y,v)},g.prototype.pent=function(y,v){return this.pEntity(y,v)},g.prototype.not=function(y,v){return this.notation(y,v)},g.prototype.up=function(){return this.root()||this.documentObject},g.prototype.isEqualNode=function(y){return!(!g.__super__.isEqualNode.apply(this,arguments).isEqualNode(y)||y.name!==this.name||y.publicId!==this.publicId||y.systemId!==this.systemId)},g})(u)}).call(JM)});var Eb=te((QM,ZM)=>{"use strict";(function(){var r,e,t,n=o(function(i,a){for(var u in a)s.call(a,u)&&(i[u]=a[u]);function c(){this.constructor=i}return o(c,"ctor"),c.prototype=a.prototype,i.prototype=new c,i.__super__=a.prototype,i},"extend"),s={}.hasOwnProperty;r=yn(),e=mi(),ZM.exports=t=(function(i){n(a,i);function a(u,c){if(a.__super__.constructor.call(this,u),c==null)throw new Error("Missing raw text. "+this.debugInfo());this.type=r.Raw,this.value=this.stringify.raw(c)}return o(a,"XMLRaw"),a.prototype.clone=function(){return Object.create(this)},a.prototype.toString=function(u){return this.options.writer.raw(this,this.options.writer.filterOptions(u))},a})(e)}).call(QM)});var Sb=te((e9,t9)=>{"use strict";(function(){var r,e,t,n=o(function(i,a){for(var u in a)s.call(a,u)&&(i[u]=a[u]);function c(){this.constructor=i}return o(c,"ctor"),c.prototype=a.prototype,i.prototype=new c,i.__super__=a.prototype,i},"extend"),s={}.hasOwnProperty;r=yn(),e=Pv(),t9.exports=t=(function(i){n(a,i);function a(u,c){if(a.__super__.constructor.call(this,u),c==null)throw new Error("Missing element text. "+this.debugInfo());this.name="#text",this.type=r.Text,this.value=this.stringify.text(c)}return o(a,"XMLText"),Object.defineProperty(a.prototype,"isElementContentWhitespace",{get:o(function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},"get")}),Object.defineProperty(a.prototype,"wholeText",{get:o(function(){var u,c,l;for(l="",c=this.previousSibling;c;)l=c.data+l,c=c.previousSibling;for(l+=this.data,u=this.nextSibling;u;)l=l+u.data,u=u.nextSibling;return l},"get")}),a.prototype.clone=function(){return Object.create(this)},a.prototype.toString=function(u){return this.options.writer.text(this,this.options.writer.filterOptions(u))},a.prototype.splitText=function(u){throw new Error("This DOM method is not implemented."+this.debugInfo())},a.prototype.replaceWholeText=function(u){throw new Error("This DOM method is not implemented."+this.debugInfo())},a})(e)}).call(e9)});var bb=te((r9,n9)=>{"use strict";(function(){var r,e,t,n=o(function(i,a){for(var u in a)s.call(a,u)&&(i[u]=a[u]);function c(){this.constructor=i}return o(c,"ctor"),c.prototype=a.prototype,i.prototype=new c,i.__super__=a.prototype,i},"extend"),s={}.hasOwnProperty;r=yn(),e=Pv(),n9.exports=t=(function(i){n(a,i);function a(u,c,l){if(a.__super__.constructor.call(this,u),c==null)throw new Error("Missing instruction target. "+this.debugInfo());this.type=r.ProcessingInstruction,this.target=this.stringify.insTarget(c),this.name=this.target,l&&(this.value=this.stringify.insValue(l))}return o(a,"XMLProcessingInstruction"),a.prototype.clone=function(){return Object.create(this)},a.prototype.toString=function(u){return this.options.writer.processingInstruction(this,this.options.writer.filterOptions(u))},a.prototype.isEqualNode=function(u){return!(!a.__super__.isEqualNode.apply(this,arguments).isEqualNode(u)||u.target!==this.target)},a})(e)}).call(r9)});var WD=te((s9,i9)=>{"use strict";(function(){var r,e,t,n=o(function(i,a){for(var u in a)s.call(a,u)&&(i[u]=a[u]);function c(){this.constructor=i}return o(c,"ctor"),c.prototype=a.prototype,i.prototype=new c,i.__super__=a.prototype,i},"extend"),s={}.hasOwnProperty;t=mi(),r=yn(),i9.exports=e=(function(i){n(a,i);function a(u){a.__super__.constructor.call(this,u),this.type=r.Dummy}return o(a,"XMLDummy"),a.prototype.clone=function(){return Object.create(this)},a.prototype.toString=function(u){return""},a})(t)}).call(s9)});var u9=te((a9,o9)=>{"use strict";(function(){var r;o9.exports=r=(function(){function e(t){this.nodes=t}return o(e,"XMLNodeList"),Object.defineProperty(e.prototype,"length",{get:o(function(){return this.nodes.length||0},"get")}),e.prototype.clone=function(){return this.nodes=null},e.prototype.item=function(t){return this.nodes[t]||null},e})()}).call(a9)});var f9=te((c9,l9)=>{"use strict";(function(){l9.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}).call(c9)});var mi=te((h9,p9)=>{"use strict";(function(){var r,e,t,n,s,i,a,u,c,l,h,m,g,y,v,E,w,C,_,b={}.hasOwnProperty;_=fo(),C=_.isObject,w=_.isFunction,E=_.isEmpty,v=_.getValue,u=null,t=null,n=null,s=null,i=null,g=null,y=null,m=null,a=null,e=null,h=null,c=null,r=null,p9.exports=l=(function(){function A(T){this.parent=T,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.value=null,this.children=[],this.baseURI=null,u||(u=hb(),t=pb(),n=db(),s=mb(),i=wb(),g=Eb(),y=Sb(),m=bb(),a=WD(),e=yn(),h=u9(),c=fb(),r=f9())}return o(A,"XMLNode"),Object.defineProperty(A.prototype,"nodeName",{get:o(function(){return this.name},"get")}),Object.defineProperty(A.prototype,"nodeType",{get:o(function(){return this.type},"get")}),Object.defineProperty(A.prototype,"nodeValue",{get:o(function(){return this.value},"get")}),Object.defineProperty(A.prototype,"parentNode",{get:o(function(){return this.parent},"get")}),Object.defineProperty(A.prototype,"childNodes",{get:o(function(){return(!this.childNodeList||!this.childNodeList.nodes)&&(this.childNodeList=new h(this.children)),this.childNodeList},"get")}),Object.defineProperty(A.prototype,"firstChild",{get:o(function(){return this.children[0]||null},"get")}),Object.defineProperty(A.prototype,"lastChild",{get:o(function(){return this.children[this.children.length-1]||null},"get")}),Object.defineProperty(A.prototype,"previousSibling",{get:o(function(){var T;return T=this.parent.children.indexOf(this),this.parent.children[T-1]||null},"get")}),Object.defineProperty(A.prototype,"nextSibling",{get:o(function(){var T;return T=this.parent.children.indexOf(this),this.parent.children[T+1]||null},"get")}),Object.defineProperty(A.prototype,"ownerDocument",{get:o(function(){return this.document()||null},"get")}),Object.defineProperty(A.prototype,"textContent",{get:o(function(){var T,B,M,I,H;if(this.nodeType===e.Element||this.nodeType===e.DocumentFragment){for(H="",I=this.children,B=0,M=I.length;B<M;B++)T=I[B],T.textContent&&(H+=T.textContent);return H}else return null},"get"),set:o(function(T){throw new Error("This DOM method is not implemented."+this.debugInfo())},"set")}),A.prototype.setParent=function(T){var B,M,I,H,K;for(this.parent=T,T&&(this.options=T.options,this.stringify=T.stringify),H=this.children,K=[],M=0,I=H.length;M<I;M++)B=H[M],K.push(B.setParent(this));return K},A.prototype.element=function(T,B,M){var I,H,K,q,W,he,pe,ue,Y,ve,Oe;if(he=null,B===null&&M==null&&(Y=[{},null],B=Y[0],M=Y[1]),B==null&&(B={}),B=v(B),C(B)||(ve=[B,M],M=ve[0],B=ve[1]),T!=null&&(T=v(T)),Array.isArray(T))for(K=0,pe=T.length;K<pe;K++)H=T[K],he=this.element(H);else if(w(T))he=this.element(T.apply());else if(C(T)){for(W in T)if(b.call(T,W))if(Oe=T[W],w(Oe)&&(Oe=Oe.apply()),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&W.indexOf(this.stringify.convertAttKey)===0)he=this.attribute(W.substr(this.stringify.convertAttKey.length),Oe);else if(!this.options.separateArrayItems&&Array.isArray(Oe)&&E(Oe))he=this.dummy();else if(C(Oe)&&E(Oe))he=this.element(W);else if(!this.options.keepNullNodes&&Oe==null)he=this.dummy();else if(!this.options.separateArrayItems&&Array.isArray(Oe))for(q=0,ue=Oe.length;q<ue;q++)H=Oe[q],I={},I[W]=H,he=this.element(I);else C(Oe)?!this.options.ignoreDecorators&&this.stringify.convertTextKey&&W.indexOf(this.stringify.convertTextKey)===0?he=this.element(Oe):(he=this.element(W),he.element(Oe)):he=this.element(W,Oe)}else!this.options.keepNullNodes&&M===null?he=this.dummy():!this.options.ignoreDecorators&&this.stringify.convertTextKey&&T.indexOf(this.stringify.convertTextKey)===0?he=this.text(M):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&T.indexOf(this.stringify.convertCDataKey)===0?he=this.cdata(M):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&T.indexOf(this.stringify.convertCommentKey)===0?he=this.comment(M):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&T.indexOf(this.stringify.convertRawKey)===0?he=this.raw(M):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&T.indexOf(this.stringify.convertPIKey)===0?he=this.instruction(T.substr(this.stringify.convertPIKey.length),M):he=this.node(T,B,M);if(he==null)throw new Error("Could not create any elements with: "+T+". "+this.debugInfo());return he},A.prototype.insertBefore=function(T,B,M){var I,H,K,q,W;if(T?.type)return K=T,q=B,K.setParent(this),q?(H=children.indexOf(q),W=children.splice(H),children.push(K),Array.prototype.push.apply(children,W)):children.push(K),K;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(T));return H=this.parent.children.indexOf(this),W=this.parent.children.splice(H),I=this.parent.element(T,B,M),Array.prototype.push.apply(this.parent.children,W),I},A.prototype.insertAfter=function(T,B,M){var I,H,K;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(T));return H=this.parent.children.indexOf(this),K=this.parent.children.splice(H+1),I=this.parent.element(T,B,M),Array.prototype.push.apply(this.parent.children,K),I},A.prototype.remove=function(){var T,B;if(this.isRoot)throw new Error("Cannot remove the root element. "+this.debugInfo());return T=this.parent.children.indexOf(this),[].splice.apply(this.parent.children,[T,T-T+1].concat(B=[])),this.parent},A.prototype.node=function(T,B,M){var I,H;return T!=null&&(T=v(T)),B||(B={}),B=v(B),C(B)||(H=[B,M],M=H[0],B=H[1]),I=new u(this,T,B),M!=null&&I.text(M),this.children.push(I),I},A.prototype.text=function(T){var B;return C(T)&&this.element(T),B=new y(this,T),this.children.push(B),this},A.prototype.cdata=function(T){var B;return B=new t(this,T),this.children.push(B),this},A.prototype.comment=function(T){var B;return B=new n(this,T),this.children.push(B),this},A.prototype.commentBefore=function(T){var B,M,I;return M=this.parent.children.indexOf(this),I=this.parent.children.splice(M),B=this.parent.comment(T),Array.prototype.push.apply(this.parent.children,I),this},A.prototype.commentAfter=function(T){var B,M,I;return M=this.parent.children.indexOf(this),I=this.parent.children.splice(M+1),B=this.parent.comment(T),Array.prototype.push.apply(this.parent.children,I),this},A.prototype.raw=function(T){var B;return B=new g(this,T),this.children.push(B),this},A.prototype.dummy=function(){var T;return T=new a(this),T},A.prototype.instruction=function(T,B){var M,I,H,K,q;if(T!=null&&(T=v(T)),B!=null&&(B=v(B)),Array.isArray(T))for(K=0,q=T.length;K<q;K++)M=T[K],this.instruction(M);else if(C(T))for(M in T)b.call(T,M)&&(I=T[M],this.instruction(M,I));else w(B)&&(B=B.apply()),H=new m(this,T,B),this.children.push(H);return this},A.prototype.instructionBefore=function(T,B){var M,I,H;return I=this.parent.children.indexOf(this),H=this.parent.children.splice(I),M=this.parent.instruction(T,B),Array.prototype.push.apply(this.parent.children,H),this},A.prototype.instructionAfter=function(T,B){var M,I,H;return I=this.parent.children.indexOf(this),H=this.parent.children.splice(I+1),M=this.parent.instruction(T,B),Array.prototype.push.apply(this.parent.children,H),this},A.prototype.declaration=function(T,B,M){var I,H;return I=this.document(),H=new s(I,T,B,M),I.children.length===0?I.children.unshift(H):I.children[0].type===e.Declaration?I.children[0]=H:I.children.unshift(H),I.root()||I},A.prototype.dtd=function(T,B){var M,I,H,K,q,W,he,pe,ue,Y;for(I=this.document(),H=new i(I,T,B),ue=I.children,K=q=0,he=ue.length;q<he;K=++q)if(M=ue[K],M.type===e.DocType)return I.children[K]=H,H;for(Y=I.children,K=W=0,pe=Y.length;W<pe;K=++W)if(M=Y[K],M.isRoot)return I.children.splice(K,0,H),H;return I.children.push(H),H},A.prototype.up=function(){if(this.isRoot)throw new Error("The root node has no parent. Use doc() if you need to get the document object.");return this.parent},A.prototype.root=function(){var T;for(T=this;T;){if(T.type===e.Document)return T.rootObject;if(T.isRoot)return T;T=T.parent}},A.prototype.document=function(){var T;for(T=this;T;){if(T.type===e.Document)return T;T=T.parent}},A.prototype.end=function(T){return this.document().end(T)},A.prototype.prev=function(){var T;if(T=this.parent.children.indexOf(this),T<1)throw new Error("Already at the first node. "+this.debugInfo());return this.parent.children[T-1]},A.prototype.next=function(){var T;if(T=this.parent.children.indexOf(this),T===-1||T===this.parent.children.length-1)throw new Error("Already at the last node. "+this.debugInfo());return this.parent.children[T+1]},A.prototype.importDocument=function(T){var B;return B=T.root().clone(),B.parent=this,B.isRoot=!1,this.children.push(B),this},A.prototype.debugInfo=function(T){var B,M;return T=T||this.name,T==null&&!((B=this.parent)!=null&&B.name)?"":T==null?"parent: <"+this.parent.name+">":(M=this.parent)!=null&&M.name?"node: <"+T+">, parent: <"+this.parent.name+">":"node: <"+T+">"},A.prototype.ele=function(T,B,M){return this.element(T,B,M)},A.prototype.nod=function(T,B,M){return this.node(T,B,M)},A.prototype.txt=function(T){return this.text(T)},A.prototype.dat=function(T){return this.cdata(T)},A.prototype.com=function(T){return this.comment(T)},A.prototype.ins=function(T,B){return this.instruction(T,B)},A.prototype.doc=function(){return this.document()},A.prototype.dec=function(T,B,M){return this.declaration(T,B,M)},A.prototype.e=function(T,B,M){return this.element(T,B,M)},A.prototype.n=function(T,B,M){return this.node(T,B,M)},A.prototype.t=function(T){return this.text(T)},A.prototype.d=function(T){return this.cdata(T)},A.prototype.c=function(T){return this.comment(T)},A.prototype.r=function(T){return this.raw(T)},A.prototype.i=function(T,B){return this.instruction(T,B)},A.prototype.u=function(){return this.up()},A.prototype.importXMLBuilder=function(T){return this.importDocument(T)},A.prototype.replaceChild=function(T,B){throw new Error("This DOM method is not implemented."+this.debugInfo())},A.prototype.removeChild=function(T){throw new Error("This DOM method is not implemented."+this.debugInfo())},A.prototype.appendChild=function(T){throw new Error("This DOM method is not implemented."+this.debugInfo())},A.prototype.hasChildNodes=function(){return this.children.length!==0},A.prototype.cloneNode=function(T){throw new Error("This DOM method is not implemented."+this.debugInfo())},A.prototype.normalize=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},A.prototype.isSupported=function(T,B){return!0},A.prototype.hasAttributes=function(){return this.attribs.length!==0},A.prototype.compareDocumentPosition=function(T){var B,M;return B=this,B===T?0:this.document()!==T.document()?(M=r.Disconnected|r.ImplementationSpecific,Math.random()<.5?M|=r.Preceding:M|=r.Following,M):B.isAncestor(T)?r.Contains|r.Preceding:B.isDescendant(T)?r.Contains|r.Following:B.isPreceding(T)?r.Preceding:r.Following},A.prototype.isSameNode=function(T){throw new Error("This DOM method is not implemented."+this.debugInfo())},A.prototype.lookupPrefix=function(T){throw new Error("This DOM method is not implemented."+this.debugInfo())},A.prototype.isDefaultNamespace=function(T){throw new Error("This DOM method is not implemented."+this.debugInfo())},A.prototype.lookupNamespaceURI=function(T){throw new Error("This DOM method is not implemented."+this.debugInfo())},A.prototype.isEqualNode=function(T){var B,M,I;if(T.nodeType!==this.nodeType||T.children.length!==this.children.length)return!1;for(B=M=0,I=this.children.length-1;0<=I?M<=I:M>=I;B=0<=I?++M:--M)if(!this.children[B].isEqualNode(T.children[B]))return!1;return!0},A.prototype.getFeature=function(T,B){throw new Error("This DOM method is not implemented."+this.debugInfo())},A.prototype.setUserData=function(T,B,M){throw new Error("This DOM method is not implemented."+this.debugInfo())},A.prototype.getUserData=function(T){throw new Error("This DOM method is not implemented."+this.debugInfo())},A.prototype.contains=function(T){return T?T===this||this.isDescendant(T):!1},A.prototype.isDescendant=function(T){var B,M,I,H,K;for(K=this.children,I=0,H=K.length;I<H;I++)if(B=K[I],T===B||(M=B.isDescendant(T),M))return!0;return!1},A.prototype.isAncestor=function(T){return T.isDescendant(this)},A.prototype.isPreceding=function(T){var B,M;return B=this.treePosition(T),M=this.treePosition(this),B===-1||M===-1?!1:B<M},A.prototype.isFollowing=function(T){var B,M;return B=this.treePosition(T),M=this.treePosition(this),B===-1||M===-1?!1:B>M},A.prototype.treePosition=function(T){var B,M;return M=0,B=!1,this.foreachTreeNode(this.document(),function(I){if(M++,!B&&I===T)return B=!0}),B?M:-1},A.prototype.foreachTreeNode=function(T,B){var M,I,H,K,q;for(T||(T=this.document()),K=T.children,I=0,H=K.length;I<H;I++){if(M=K[I],q=B(M))return q;if(q=this.foreachTreeNode(M,B),q)return q}},A})()}).call(h9)});var zD=te((d9,m9)=>{"use strict";(function(){var r,e=o(function(n,s){return function(){return n.apply(s,arguments)}},"bind"),t={}.hasOwnProperty;m9.exports=r=(function(){function n(s){this.assertLegalName=e(this.assertLegalName,this),this.assertLegalChar=e(this.assertLegalChar,this);var i,a,u;s||(s={}),this.options=s,this.options.version||(this.options.version="1.0"),a=s.stringify||{};for(i in a)t.call(a,i)&&(u=a[i],this[i]=u)}return o(n,"XMLStringifier"),n.prototype.name=function(s){return this.options.noValidation?s:this.assertLegalName(""+s||"")},n.prototype.text=function(s){return this.options.noValidation?s:this.assertLegalChar(this.textEscape(""+s||""))},n.prototype.cdata=function(s){return this.options.noValidation?s:(s=""+s||"",s=s.replace("]]>","]]]]><![CDATA[>"),this.assertLegalChar(s))},n.prototype.comment=function(s){if(this.options.noValidation)return s;if(s=""+s||"",s.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+s);return this.assertLegalChar(s)},n.prototype.raw=function(s){return this.options.noValidation?s:""+s||""},n.prototype.attValue=function(s){return this.options.noValidation?s:this.assertLegalChar(this.attEscape(s=""+s||""))},n.prototype.insTarget=function(s){return this.options.noValidation?s:this.assertLegalChar(""+s||"")},n.prototype.insValue=function(s){if(this.options.noValidation)return s;if(s=""+s||"",s.match(/\?>/))throw new Error("Invalid processing instruction value: "+s);return this.assertLegalChar(s)},n.prototype.xmlVersion=function(s){if(this.options.noValidation)return s;if(s=""+s||"",!s.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+s);return s},n.prototype.xmlEncoding=function(s){if(this.options.noValidation)return s;if(s=""+s||"",!s.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+s);return this.assertLegalChar(s)},n.prototype.xmlStandalone=function(s){return this.options.noValidation?s:s?"yes":"no"},n.prototype.dtdPubID=function(s){return this.options.noValidation?s:this.assertLegalChar(""+s||"")},n.prototype.dtdSysID=function(s){return this.options.noValidation?s:this.assertLegalChar(""+s||"")},n.prototype.dtdElementValue=function(s){return this.options.noValidation?s:this.assertLegalChar(""+s||"")},n.prototype.dtdAttType=function(s){return this.options.noValidation?s:this.assertLegalChar(""+s||"")},n.prototype.dtdAttDefault=function(s){return this.options.noValidation?s:this.assertLegalChar(""+s||"")},n.prototype.dtdEntityValue=function(s){return this.options.noValidation?s:this.assertLegalChar(""+s||"")},n.prototype.dtdNData=function(s){return this.options.noValidation?s:this.assertLegalChar(""+s||"")},n.prototype.convertAttKey="@",n.prototype.convertPIKey="?",n.prototype.convertTextKey="#text",n.prototype.convertCDataKey="#cdata",n.prototype.convertCommentKey="#comment",n.prototype.convertRawKey="#raw",n.prototype.assertLegalChar=function(s){var i,a;if(this.options.noValidation)return s;if(i="",this.options.version==="1.0"){if(i=/[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,a=s.match(i))throw new Error("Invalid character in string: "+s+" at index "+a.index)}else if(this.options.version==="1.1"&&(i=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,a=s.match(i)))throw new Error("Invalid character in string: "+s+" at index "+a.index);return s},n.prototype.assertLegalName=function(s){var i;if(this.options.noValidation)return s;if(this.assertLegalChar(s),i=/^([:A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])([\x2D\.0-:A-Z_a-z\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])*$/,!s.match(i))throw new Error("Invalid character in name");return s},n.prototype.textEscape=function(s){var i;return this.options.noValidation?s:(i=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,s.replace(i,"&").replace(/</g,"<").replace(/>/g,">").replace(/\r/g,"
"))},n.prototype.attEscape=function(s){var i;return this.options.noValidation?s:(i=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,s.replace(i,"&").replace(/</g,"<").replace(/"/g,""").replace(/\t/g,"	").replace(/\n/g,"
").replace(/\r/g,"
"))},n})()}).call(d9)});var kv=te((g9,v9)=>{"use strict";(function(){v9.exports={None:0,OpenTag:1,InsideTag:2,CloseTag:3}}).call(g9)});var JD=te((y9,x9)=>{"use strict";(function(){var r,e,t,n,s,i,a,u,c,l,h,m,g,y,v,E,w,C={}.hasOwnProperty;w=fo().assign,r=yn(),c=mb(),l=wb(),t=pb(),n=db(),m=hb(),y=Eb(),v=Sb(),g=bb(),h=WD(),s=gb(),i=yb(),a=vb(),u=xb(),e=kv(),x9.exports=E=(function(){function _(b){var A,T,B;b||(b={}),this.options=b,T=b.writer||{};for(A in T)C.call(T,A)&&(B=T[A],this["_"+A]=this[A],this[A]=B)}return o(_,"XMLWriterBase"),_.prototype.filterOptions=function(b){var A,T,B,M,I,H,K,q;return b||(b={}),b=w({},this.options,b),A={writer:this},A.pretty=b.pretty||!1,A.allowEmpty=b.allowEmpty||!1,A.indent=(T=b.indent)!=null?T:" ",A.newline=(B=b.newline)!=null?B:`
|
|
91
|
-
`,A.offset=(M=b.offset)!=null?M:0,A.dontPrettyTextNodes=(I=(H=b.dontPrettyTextNodes)!=null?H:b.dontprettytextnodes)!=null?I:0,A.spaceBeforeSlash=(K=(q=b.spaceBeforeSlash)!=null?q:b.spacebeforeslash)!=null?K:"",A.spaceBeforeSlash===!0&&(A.spaceBeforeSlash=" "),A.suppressPrettyCount=0,A.user={},A.state=e.None,A},_.prototype.indent=function(b,A,T){var B;return!A.pretty||A.suppressPrettyCount?"":A.pretty&&(B=(T||0)+A.offset+1,B>0)?new Array(B).join(A.indent):""},_.prototype.endline=function(b,A,T){return!A.pretty||A.suppressPrettyCount?"":A.newline},_.prototype.attribute=function(b,A,T){var B;return this.openAttribute(b,A,T),B=" "+b.name+'="'+b.value+'"',this.closeAttribute(b,A,T),B},_.prototype.cdata=function(b,A,T){var B;return this.openNode(b,A,T),A.state=e.OpenTag,B=this.indent(b,A,T)+"<![CDATA[",A.state=e.InsideTag,B+=b.value,A.state=e.CloseTag,B+="]]>"+this.endline(b,A,T),A.state=e.None,this.closeNode(b,A,T),B},_.prototype.comment=function(b,A,T){var B;return this.openNode(b,A,T),A.state=e.OpenTag,B=this.indent(b,A,T)+"<!-- ",A.state=e.InsideTag,B+=b.value,A.state=e.CloseTag,B+=" -->"+this.endline(b,A,T),A.state=e.None,this.closeNode(b,A,T),B},_.prototype.declaration=function(b,A,T){var B;return this.openNode(b,A,T),A.state=e.OpenTag,B=this.indent(b,A,T)+"<?xml",A.state=e.InsideTag,B+=' version="'+b.version+'"',b.encoding!=null&&(B+=' encoding="'+b.encoding+'"'),b.standalone!=null&&(B+=' standalone="'+b.standalone+'"'),A.state=e.CloseTag,B+=A.spaceBeforeSlash+"?>",B+=this.endline(b,A,T),A.state=e.None,this.closeNode(b,A,T),B},_.prototype.docType=function(b,A,T){var B,M,I,H,K;if(T||(T=0),this.openNode(b,A,T),A.state=e.OpenTag,H=this.indent(b,A,T),H+="<!DOCTYPE "+b.root().name,b.pubID&&b.sysID?H+=' PUBLIC "'+b.pubID+'" "'+b.sysID+'"':b.sysID&&(H+=' SYSTEM "'+b.sysID+'"'),b.children.length>0){for(H+=" [",H+=this.endline(b,A,T),A.state=e.InsideTag,K=b.children,M=0,I=K.length;M<I;M++)B=K[M],H+=this.writeChildNode(B,A,T+1);A.state=e.CloseTag,H+="]"}return A.state=e.CloseTag,H+=A.spaceBeforeSlash+">",H+=this.endline(b,A,T),A.state=e.None,this.closeNode(b,A,T),H},_.prototype.element=function(b,A,T){var B,M,I,H,K,q,W,he,pe,ue,Y,ve,Oe,Je;T||(T=0),ue=!1,Y="",this.openNode(b,A,T),A.state=e.OpenTag,Y+=this.indent(b,A,T)+"<"+b.name,ve=b.attribs;for(pe in ve)C.call(ve,pe)&&(B=ve[pe],Y+=this.attribute(B,A,T));if(I=b.children.length,H=I===0?null:b.children[0],I===0||b.children.every(function(ne){return(ne.type===r.Text||ne.type===r.Raw)&&ne.value===""}))A.allowEmpty?(Y+=">",A.state=e.CloseTag,Y+="</"+b.name+">"+this.endline(b,A,T)):(A.state=e.CloseTag,Y+=A.spaceBeforeSlash+"/>"+this.endline(b,A,T));else if(A.pretty&&I===1&&(H.type===r.Text||H.type===r.Raw)&&H.value!=null)Y+=">",A.state=e.InsideTag,A.suppressPrettyCount++,ue=!0,Y+=this.writeChildNode(H,A,T+1),A.suppressPrettyCount--,ue=!1,A.state=e.CloseTag,Y+="</"+b.name+">"+this.endline(b,A,T);else{if(A.dontPrettyTextNodes){for(Oe=b.children,K=0,W=Oe.length;K<W;K++)if(M=Oe[K],(M.type===r.Text||M.type===r.Raw)&&M.value!=null){A.suppressPrettyCount++,ue=!0;break}}for(Y+=">"+this.endline(b,A,T),A.state=e.InsideTag,Je=b.children,q=0,he=Je.length;q<he;q++)M=Je[q],Y+=this.writeChildNode(M,A,T+1);A.state=e.CloseTag,Y+=this.indent(b,A,T)+"</"+b.name+">",ue&&A.suppressPrettyCount--,Y+=this.endline(b,A,T),A.state=e.None}return this.closeNode(b,A,T),Y},_.prototype.writeChildNode=function(b,A,T){switch(b.type){case r.CData:return this.cdata(b,A,T);case r.Comment:return this.comment(b,A,T);case r.Element:return this.element(b,A,T);case r.Raw:return this.raw(b,A,T);case r.Text:return this.text(b,A,T);case r.ProcessingInstruction:return this.processingInstruction(b,A,T);case r.Dummy:return"";case r.Declaration:return this.declaration(b,A,T);case r.DocType:return this.docType(b,A,T);case r.AttributeDeclaration:return this.dtdAttList(b,A,T);case r.ElementDeclaration:return this.dtdElement(b,A,T);case r.EntityDeclaration:return this.dtdEntity(b,A,T);case r.NotationDeclaration:return this.dtdNotation(b,A,T);default:throw new Error("Unknown XML node type: "+b.constructor.name)}},_.prototype.processingInstruction=function(b,A,T){var B;return this.openNode(b,A,T),A.state=e.OpenTag,B=this.indent(b,A,T)+"<?",A.state=e.InsideTag,B+=b.target,b.value&&(B+=" "+b.value),A.state=e.CloseTag,B+=A.spaceBeforeSlash+"?>",B+=this.endline(b,A,T),A.state=e.None,this.closeNode(b,A,T),B},_.prototype.raw=function(b,A,T){var B;return this.openNode(b,A,T),A.state=e.OpenTag,B=this.indent(b,A,T),A.state=e.InsideTag,B+=b.value,A.state=e.CloseTag,B+=this.endline(b,A,T),A.state=e.None,this.closeNode(b,A,T),B},_.prototype.text=function(b,A,T){var B;return this.openNode(b,A,T),A.state=e.OpenTag,B=this.indent(b,A,T),A.state=e.InsideTag,B+=b.value,A.state=e.CloseTag,B+=this.endline(b,A,T),A.state=e.None,this.closeNode(b,A,T),B},_.prototype.dtdAttList=function(b,A,T){var B;return this.openNode(b,A,T),A.state=e.OpenTag,B=this.indent(b,A,T)+"<!ATTLIST",A.state=e.InsideTag,B+=" "+b.elementName+" "+b.attributeName+" "+b.attributeType,b.defaultValueType!=="#DEFAULT"&&(B+=" "+b.defaultValueType),b.defaultValue&&(B+=' "'+b.defaultValue+'"'),A.state=e.CloseTag,B+=A.spaceBeforeSlash+">"+this.endline(b,A,T),A.state=e.None,this.closeNode(b,A,T),B},_.prototype.dtdElement=function(b,A,T){var B;return this.openNode(b,A,T),A.state=e.OpenTag,B=this.indent(b,A,T)+"<!ELEMENT",A.state=e.InsideTag,B+=" "+b.name+" "+b.value,A.state=e.CloseTag,B+=A.spaceBeforeSlash+">"+this.endline(b,A,T),A.state=e.None,this.closeNode(b,A,T),B},_.prototype.dtdEntity=function(b,A,T){var B;return this.openNode(b,A,T),A.state=e.OpenTag,B=this.indent(b,A,T)+"<!ENTITY",A.state=e.InsideTag,b.pe&&(B+=" %"),B+=" "+b.name,b.value?B+=' "'+b.value+'"':(b.pubID&&b.sysID?B+=' PUBLIC "'+b.pubID+'" "'+b.sysID+'"':b.sysID&&(B+=' SYSTEM "'+b.sysID+'"'),b.nData&&(B+=" NDATA "+b.nData)),A.state=e.CloseTag,B+=A.spaceBeforeSlash+">"+this.endline(b,A,T),A.state=e.None,this.closeNode(b,A,T),B},_.prototype.dtdNotation=function(b,A,T){var B;return this.openNode(b,A,T),A.state=e.OpenTag,B=this.indent(b,A,T)+"<!NOTATION",A.state=e.InsideTag,B+=" "+b.name,b.pubID&&b.sysID?B+=' PUBLIC "'+b.pubID+'" "'+b.sysID+'"':b.pubID?B+=' PUBLIC "'+b.pubID+'"':b.sysID&&(B+=' SYSTEM "'+b.sysID+'"'),A.state=e.CloseTag,B+=A.spaceBeforeSlash+">"+this.endline(b,A,T),A.state=e.None,this.closeNode(b,A,T),B},_.prototype.openNode=function(b,A,T){},_.prototype.closeNode=function(b,A,T){},_.prototype.openAttribute=function(b,A,T){},_.prototype.closeAttribute=function(b,A,T){},_})()}).call(y9)});var Ab=te((w9,E9)=>{"use strict";(function(){var r,e,t=o(function(s,i){for(var a in i)n.call(i,a)&&(s[a]=i[a]);function u(){this.constructor=s}return o(u,"ctor"),u.prototype=i.prototype,s.prototype=new u,s.__super__=i.prototype,s},"extend"),n={}.hasOwnProperty;e=JD(),E9.exports=r=(function(s){t(i,s);function i(a){i.__super__.constructor.call(this,a)}return o(i,"XMLStringWriter"),i.prototype.document=function(a,u){var c,l,h,m,g;for(u=this.filterOptions(u),m="",g=a.children,l=0,h=g.length;l<h;l++)c=g[l],m+=this.writeChildNode(c,u,0);return u.pretty&&m.slice(-u.newline.length)===u.newline&&(m=m.slice(0,-u.newline.length)),m},i})(e)}).call(w9)});var YD=te((S9,b9)=>{"use strict";(function(){var r,e,t,n,s,i,a,u,c=o(function(h,m){for(var g in m)l.call(m,g)&&(h[g]=m[g]);function y(){this.constructor=h}return o(y,"ctor"),y.prototype=m.prototype,h.prototype=new y,h.__super__=m.prototype,h},"extend"),l={}.hasOwnProperty;u=fo().isPlainObject,t=GD(),e=CM(),s=mi(),r=yn(),a=zD(),i=Ab(),b9.exports=n=(function(h){c(m,h);function m(g){m.__super__.constructor.call(this,null),this.name="#document",this.type=r.Document,this.documentURI=null,this.domConfig=new e,g||(g={}),g.writer||(g.writer=new i),this.options=g,this.stringify=new a(g)}return o(m,"XMLDocument"),Object.defineProperty(m.prototype,"implementation",{value:new t}),Object.defineProperty(m.prototype,"doctype",{get:o(function(){var g,y,v,E;for(E=this.children,y=0,v=E.length;y<v;y++)if(g=E[y],g.type===r.DocType)return g;return null},"get")}),Object.defineProperty(m.prototype,"documentElement",{get:o(function(){return this.rootObject||null},"get")}),Object.defineProperty(m.prototype,"inputEncoding",{get:o(function(){return null},"get")}),Object.defineProperty(m.prototype,"strictErrorChecking",{get:o(function(){return!1},"get")}),Object.defineProperty(m.prototype,"xmlEncoding",{get:o(function(){return this.children.length!==0&&this.children[0].type===r.Declaration?this.children[0].encoding:null},"get")}),Object.defineProperty(m.prototype,"xmlStandalone",{get:o(function(){return this.children.length!==0&&this.children[0].type===r.Declaration?this.children[0].standalone==="yes":!1},"get")}),Object.defineProperty(m.prototype,"xmlVersion",{get:o(function(){return this.children.length!==0&&this.children[0].type===r.Declaration?this.children[0].version:"1.0"},"get")}),Object.defineProperty(m.prototype,"URL",{get:o(function(){return this.documentURI},"get")}),Object.defineProperty(m.prototype,"origin",{get:o(function(){return null},"get")}),Object.defineProperty(m.prototype,"compatMode",{get:o(function(){return null},"get")}),Object.defineProperty(m.prototype,"characterSet",{get:o(function(){return null},"get")}),Object.defineProperty(m.prototype,"contentType",{get:o(function(){return null},"get")}),m.prototype.end=function(g){var y;return y={},g?u(g)&&(y=g,g=this.options.writer):g=this.options.writer,g.document(this,g.filterOptions(y))},m.prototype.toString=function(g){return this.options.writer.document(this,this.options.writer.filterOptions(g))},m.prototype.createElement=function(g){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.createDocumentFragment=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.createTextNode=function(g){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.createComment=function(g){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.createCDATASection=function(g){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.createProcessingInstruction=function(g,y){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.createAttribute=function(g){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.createEntityReference=function(g){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.getElementsByTagName=function(g){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.importNode=function(g,y){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.createElementNS=function(g,y){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.createAttributeNS=function(g,y){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.getElementsByTagNameNS=function(g,y){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.getElementById=function(g){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.adoptNode=function(g){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.normalizeDocument=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.renameNode=function(g,y,v){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.getElementsByClassName=function(g){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.createEvent=function(g){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.createRange=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.createNodeIterator=function(g,y,v){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.createTreeWalker=function(g,y,v){throw new Error("This DOM method is not implemented."+this.debugInfo())},m})(s)}).call(S9)});var N9=te((A9,C9)=>{"use strict";(function(){var r,e,t,n,s,i,a,u,c,l,h,m,g,y,v,E,w,C,_,b,A,T,B,M,I={}.hasOwnProperty;M=fo(),T=M.isObject,A=M.isFunction,B=M.isPlainObject,b=M.getValue,r=yn(),m=YD(),y=hb(),n=pb(),s=db(),E=Eb(),_=Sb(),v=bb(),l=mb(),h=wb(),i=gb(),u=vb(),a=yb(),c=xb(),t=XD(),C=zD(),w=Ab(),e=kv(),C9.exports=g=(function(){function H(K,q,W){var he;this.name="?xml",this.type=r.Document,K||(K={}),he={},K.writer?B(K.writer)&&(he=K.writer,K.writer=new w):K.writer=new w,this.options=K,this.writer=K.writer,this.writerOptions=this.writer.filterOptions(he),this.stringify=new C(K),this.onDataCallback=q||function(){},this.onEndCallback=W||function(){},this.currentNode=null,this.currentLevel=-1,this.openTags={},this.documentStarted=!1,this.documentCompleted=!1,this.root=null}return o(H,"XMLDocumentCB"),H.prototype.createChildNode=function(K){var q,W,he,pe,ue,Y,ve,Oe;switch(K.type){case r.CData:this.cdata(K.value);break;case r.Comment:this.comment(K.value);break;case r.Element:he={},ve=K.attribs;for(W in ve)I.call(ve,W)&&(q=ve[W],he[W]=q.value);this.node(K.name,he);break;case r.Dummy:this.dummy();break;case r.Raw:this.raw(K.value);break;case r.Text:this.text(K.value);break;case r.ProcessingInstruction:this.instruction(K.target,K.value);break;default:throw new Error("This XML node type is not supported in a JS object: "+K.constructor.name)}for(Oe=K.children,ue=0,Y=Oe.length;ue<Y;ue++)pe=Oe[ue],this.createChildNode(pe),pe.type===r.Element&&this.up();return this},H.prototype.dummy=function(){return this},H.prototype.node=function(K,q,W){var he;if(K==null)throw new Error("Missing node name.");if(this.root&&this.currentLevel===-1)throw new Error("Document can only have one root node. "+this.debugInfo(K));return this.openCurrent(),K=b(K),q==null&&(q={}),q=b(q),T(q)||(he=[q,W],W=he[0],q=he[1]),this.currentNode=new y(this,K,q),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,W!=null&&this.text(W),this},H.prototype.element=function(K,q,W){var he,pe,ue,Y,ve,Oe;if(this.currentNode&&this.currentNode.type===r.DocType)this.dtdElement.apply(this,arguments);else if(Array.isArray(K)||T(K)||A(K))for(Y=this.options.noValidation,this.options.noValidation=!0,Oe=new m(this.options).element("TEMP_ROOT"),Oe.element(K),this.options.noValidation=Y,ve=Oe.children,pe=0,ue=ve.length;pe<ue;pe++)he=ve[pe],this.createChildNode(he),he.type===r.Element&&this.up();else this.node(K,q,W);return this},H.prototype.attribute=function(K,q){var W,he;if(!this.currentNode||this.currentNode.children)throw new Error("att() can only be used immediately after an ele() call in callback mode. "+this.debugInfo(K));if(K!=null&&(K=b(K)),T(K))for(W in K)I.call(K,W)&&(he=K[W],this.attribute(W,he));else A(q)&&(q=q.apply()),this.options.keepNullAttributes&&q==null?this.currentNode.attribs[K]=new t(this,K,""):q!=null&&(this.currentNode.attribs[K]=new t(this,K,q));return this},H.prototype.text=function(K){var q;return this.openCurrent(),q=new _(this,K),this.onData(this.writer.text(q,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},H.prototype.cdata=function(K){var q;return this.openCurrent(),q=new n(this,K),this.onData(this.writer.cdata(q,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},H.prototype.comment=function(K){var q;return this.openCurrent(),q=new s(this,K),this.onData(this.writer.comment(q,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},H.prototype.raw=function(K){var q;return this.openCurrent(),q=new E(this,K),this.onData(this.writer.raw(q,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},H.prototype.instruction=function(K,q){var W,he,pe,ue,Y;if(this.openCurrent(),K!=null&&(K=b(K)),q!=null&&(q=b(q)),Array.isArray(K))for(W=0,ue=K.length;W<ue;W++)he=K[W],this.instruction(he);else if(T(K))for(he in K)I.call(K,he)&&(pe=K[he],this.instruction(he,pe));else A(q)&&(q=q.apply()),Y=new v(this,K,q),this.onData(this.writer.processingInstruction(Y,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this},H.prototype.declaration=function(K,q,W){var he;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node.");return he=new l(this,K,q,W),this.onData(this.writer.declaration(he,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},H.prototype.doctype=function(K,q,W){if(this.openCurrent(),K==null)throw new Error("Missing root node name.");if(this.root)throw new Error("dtd() must come before the root node.");return this.currentNode=new h(this,q,W),this.currentNode.rootNodeName=K,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this},H.prototype.dtdElement=function(K,q){var W;return this.openCurrent(),W=new a(this,K,q),this.onData(this.writer.dtdElement(W,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},H.prototype.attList=function(K,q,W,he,pe){var ue;return this.openCurrent(),ue=new i(this,K,q,W,he,pe),this.onData(this.writer.dtdAttList(ue,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},H.prototype.entity=function(K,q){var W;return this.openCurrent(),W=new u(this,!1,K,q),this.onData(this.writer.dtdEntity(W,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},H.prototype.pEntity=function(K,q){var W;return this.openCurrent(),W=new u(this,!0,K,q),this.onData(this.writer.dtdEntity(W,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},H.prototype.notation=function(K,q){var W;return this.openCurrent(),W=new c(this,K,q),this.onData(this.writer.dtdNotation(W,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},H.prototype.up=function(){if(this.currentLevel<0)throw new Error("The document node has no parent.");return this.currentNode?(this.currentNode.children?this.closeNode(this.currentNode):this.openNode(this.currentNode),this.currentNode=null):this.closeNode(this.openTags[this.currentLevel]),delete this.openTags[this.currentLevel],this.currentLevel--,this},H.prototype.end=function(){for(;this.currentLevel>=0;)this.up();return this.onEnd()},H.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},H.prototype.openNode=function(K){var q,W,he,pe;if(!K.isOpen){if(!this.root&&this.currentLevel===0&&K.type===r.Element&&(this.root=K),W="",K.type===r.Element){this.writerOptions.state=e.OpenTag,W=this.writer.indent(K,this.writerOptions,this.currentLevel)+"<"+K.name,pe=K.attribs;for(he in pe)I.call(pe,he)&&(q=pe[he],W+=this.writer.attribute(q,this.writerOptions,this.currentLevel));W+=(K.children?">":"/>")+this.writer.endline(K,this.writerOptions,this.currentLevel),this.writerOptions.state=e.InsideTag}else this.writerOptions.state=e.OpenTag,W=this.writer.indent(K,this.writerOptions,this.currentLevel)+"<!DOCTYPE "+K.rootNodeName,K.pubID&&K.sysID?W+=' PUBLIC "'+K.pubID+'" "'+K.sysID+'"':K.sysID&&(W+=' SYSTEM "'+K.sysID+'"'),K.children?(W+=" [",this.writerOptions.state=e.InsideTag):(this.writerOptions.state=e.CloseTag,W+=">"),W+=this.writer.endline(K,this.writerOptions,this.currentLevel);return this.onData(W,this.currentLevel),K.isOpen=!0}},H.prototype.closeNode=function(K){var q;if(!K.isClosed)return q="",this.writerOptions.state=e.CloseTag,K.type===r.Element?q=this.writer.indent(K,this.writerOptions,this.currentLevel)+"</"+K.name+">"+this.writer.endline(K,this.writerOptions,this.currentLevel):q=this.writer.indent(K,this.writerOptions,this.currentLevel)+"]>"+this.writer.endline(K,this.writerOptions,this.currentLevel),this.writerOptions.state=e.None,this.onData(q,this.currentLevel),K.isClosed=!0},H.prototype.onData=function(K,q){return this.documentStarted=!0,this.onDataCallback(K,q+1)},H.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},H.prototype.debugInfo=function(K){return K==null?"":"node: <"+K+">"},H.prototype.ele=function(){return this.element.apply(this,arguments)},H.prototype.nod=function(K,q,W){return this.node(K,q,W)},H.prototype.txt=function(K){return this.text(K)},H.prototype.dat=function(K){return this.cdata(K)},H.prototype.com=function(K){return this.comment(K)},H.prototype.ins=function(K,q){return this.instruction(K,q)},H.prototype.dec=function(K,q,W){return this.declaration(K,q,W)},H.prototype.dtd=function(K,q,W){return this.doctype(K,q,W)},H.prototype.e=function(K,q,W){return this.element(K,q,W)},H.prototype.n=function(K,q,W){return this.node(K,q,W)},H.prototype.t=function(K){return this.text(K)},H.prototype.d=function(K){return this.cdata(K)},H.prototype.c=function(K){return this.comment(K)},H.prototype.r=function(K){return this.raw(K)},H.prototype.i=function(K,q){return this.instruction(K,q)},H.prototype.att=function(){return this.currentNode&&this.currentNode.type===r.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},H.prototype.a=function(){return this.currentNode&&this.currentNode.type===r.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},H.prototype.ent=function(K,q){return this.entity(K,q)},H.prototype.pent=function(K,q){return this.pEntity(K,q)},H.prototype.not=function(K,q){return this.notation(K,q)},H})()}).call(A9)});var _9=te((T9,I9)=>{"use strict";(function(){var r,e,t,n,s=o(function(a,u){for(var c in u)i.call(u,c)&&(a[c]=u[c]);function l(){this.constructor=a}return o(l,"ctor"),l.prototype=u.prototype,a.prototype=new l,a.__super__=u.prototype,a},"extend"),i={}.hasOwnProperty;r=yn(),n=JD(),e=kv(),I9.exports=t=(function(a){s(u,a);function u(c,l){this.stream=c,u.__super__.constructor.call(this,l)}return o(u,"XMLStreamWriter"),u.prototype.endline=function(c,l,h){return c.isLastRootNode&&l.state===e.CloseTag?"":u.__super__.endline.call(this,c,l,h)},u.prototype.document=function(c,l){var h,m,g,y,v,E,w,C,_;for(w=c.children,m=g=0,v=w.length;g<v;m=++g)h=w[m],h.isLastRootNode=m===c.children.length-1;for(l=this.filterOptions(l),C=c.children,_=[],y=0,E=C.length;y<E;y++)h=C[y],_.push(this.writeChildNode(h,l,0));return _},u.prototype.attribute=function(c,l,h){return this.stream.write(u.__super__.attribute.call(this,c,l,h))},u.prototype.cdata=function(c,l,h){return this.stream.write(u.__super__.cdata.call(this,c,l,h))},u.prototype.comment=function(c,l,h){return this.stream.write(u.__super__.comment.call(this,c,l,h))},u.prototype.declaration=function(c,l,h){return this.stream.write(u.__super__.declaration.call(this,c,l,h))},u.prototype.docType=function(c,l,h){var m,g,y,v;if(h||(h=0),this.openNode(c,l,h),l.state=e.OpenTag,this.stream.write(this.indent(c,l,h)),this.stream.write("<!DOCTYPE "+c.root().name),c.pubID&&c.sysID?this.stream.write(' PUBLIC "'+c.pubID+'" "'+c.sysID+'"'):c.sysID&&this.stream.write(' SYSTEM "'+c.sysID+'"'),c.children.length>0){for(this.stream.write(" ["),this.stream.write(this.endline(c,l,h)),l.state=e.InsideTag,v=c.children,g=0,y=v.length;g<y;g++)m=v[g],this.writeChildNode(m,l,h+1);l.state=e.CloseTag,this.stream.write("]")}return l.state=e.CloseTag,this.stream.write(l.spaceBeforeSlash+">"),this.stream.write(this.endline(c,l,h)),l.state=e.None,this.closeNode(c,l,h)},u.prototype.element=function(c,l,h){var m,g,y,v,E,w,C,_,b,A;h||(h=0),this.openNode(c,l,h),l.state=e.OpenTag,this.stream.write(this.indent(c,l,h)+"<"+c.name),b=c.attribs;for(C in b)i.call(b,C)&&(m=b[C],this.attribute(m,l,h));if(y=c.children.length,v=y===0?null:c.children[0],y===0||c.children.every(function(T){return(T.type===r.Text||T.type===r.Raw)&&T.value===""}))l.allowEmpty?(this.stream.write(">"),l.state=e.CloseTag,this.stream.write("</"+c.name+">")):(l.state=e.CloseTag,this.stream.write(l.spaceBeforeSlash+"/>"));else if(l.pretty&&y===1&&(v.type===r.Text||v.type===r.Raw)&&v.value!=null)this.stream.write(">"),l.state=e.InsideTag,l.suppressPrettyCount++,_=!0,this.writeChildNode(v,l,h+1),l.suppressPrettyCount--,_=!1,l.state=e.CloseTag,this.stream.write("</"+c.name+">");else{for(this.stream.write(">"+this.endline(c,l,h)),l.state=e.InsideTag,A=c.children,E=0,w=A.length;E<w;E++)g=A[E],this.writeChildNode(g,l,h+1);l.state=e.CloseTag,this.stream.write(this.indent(c,l,h)+"</"+c.name+">")}return this.stream.write(this.endline(c,l,h)),l.state=e.None,this.closeNode(c,l,h)},u.prototype.processingInstruction=function(c,l,h){return this.stream.write(u.__super__.processingInstruction.call(this,c,l,h))},u.prototype.raw=function(c,l,h){return this.stream.write(u.__super__.raw.call(this,c,l,h))},u.prototype.text=function(c,l,h){return this.stream.write(u.__super__.text.call(this,c,l,h))},u.prototype.dtdAttList=function(c,l,h){return this.stream.write(u.__super__.dtdAttList.call(this,c,l,h))},u.prototype.dtdElement=function(c,l,h){return this.stream.write(u.__super__.dtdElement.call(this,c,l,h))},u.prototype.dtdEntity=function(c,l,h){return this.stream.write(u.__super__.dtdEntity.call(this,c,l,h))},u.prototype.dtdNotation=function(c,l,h){return this.stream.write(u.__super__.dtdNotation.call(this,c,l,h))},u})(n)}).call(T9)});var B9=te((D9,Tc)=>{"use strict";(function(){var r,e,t,n,s,i,a,u,c,l;l=fo(),u=l.assign,c=l.isFunction,t=GD(),n=YD(),s=N9(),a=Ab(),i=_9(),r=yn(),e=kv(),Tc.exports.create=function(h,m,g,y){var v,E;if(h==null)throw new Error("Root element needs a name.");return y=u({},m,g,y),v=new n(y),E=v.element(h),y.headless||(v.declaration(y),(y.pubID!=null||y.sysID!=null)&&v.dtd(y)),E},Tc.exports.begin=function(h,m,g){var y;return c(h)&&(y=[h,m],m=y[0],g=y[1],h={}),m?new s(h,m,g):new n(h)},Tc.exports.stringWriter=function(h){return new a(h)},Tc.exports.streamWriter=function(h,m){return new i(h,m)},Tc.exports.implementation=new t,Tc.exports.nodeType=r,Tc.exports.writerState=e}).call(D9)});var R9=te(QD=>{"use strict";(function(){"use strict";var r,e,t,n,s,i={}.hasOwnProperty;r=B9(),e=lb().defaults,n=o(function(a){return typeof a=="string"&&(a.indexOf("&")>=0||a.indexOf(">")>=0||a.indexOf("<")>=0)},"requiresCDATA"),s=o(function(a){return"<![CDATA["+t(a)+"]]>"},"wrapCDATA"),t=o(function(a){return a.replace("]]>","]]]]><![CDATA[>")},"escapeCDATA"),QD.Builder=(function(){function a(u){var c,l,h;this.options={},l=e["0.2"];for(c in l)i.call(l,c)&&(h=l[c],this.options[c]=h);for(c in u)i.call(u,c)&&(h=u[c],this.options[c]=h)}return o(a,"Builder"),a.prototype.buildObject=function(u){var c,l,h,m,g;return c=this.options.attrkey,l=this.options.charkey,Object.keys(u).length===1&&this.options.rootName===e["0.2"].rootName?(g=Object.keys(u)[0],u=u[g]):g=this.options.rootName,h=(function(y){return function(v,E){var w,C,_,b,A,T;if(typeof E!="object")y.options.cdata&&n(E)?v.raw(s(E)):v.txt(E);else if(Array.isArray(E)){for(b in E)if(i.call(E,b)){C=E[b];for(A in C)_=C[A],v=h(v.ele(A),_).up()}}else for(A in E)if(i.call(E,A))if(C=E[A],A===c){if(typeof C=="object")for(w in C)T=C[w],v=v.att(w,T)}else if(A===l)y.options.cdata&&n(C)?v=v.raw(s(C)):v=v.txt(C);else if(Array.isArray(C))for(b in C)i.call(C,b)&&(_=C[b],typeof _=="string"?y.options.cdata&&n(_)?v=v.ele(A).raw(s(_)).up():v=v.ele(A,_).up():v=h(v.ele(A),_).up());else typeof C=="object"?v=h(v.ele(A),C).up():typeof C=="string"&&y.options.cdata&&n(C)?v=v.ele(A).raw(s(C)).up():(C==null&&(C=""),v=v.ele(A,C.toString()).up());return v}})(this),m=r.create(g,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),h(m,u).end(this.options.renderOpts)},a})()}).call(QD)});var O9=te(Cb=>{"use strict";(function(r){r.parser=function(N,S){return new t(N,S)},r.SAXParser=t,r.SAXStream=l,r.createStream=c,r.MAX_BUFFER_LENGTH=64*1024;var e=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];r.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function t(N,S){if(!(this instanceof t))return new t(N,S);var G=this;s(G),G.q=G.c="",G.bufferCheckPosition=r.MAX_BUFFER_LENGTH,G.opt=S||{},G.opt.lowercase=G.opt.lowercase||G.opt.lowercasetags,G.looseCase=G.opt.lowercase?"toLowerCase":"toUpperCase",G.tags=[],G.closed=G.closedRoot=G.sawRoot=!1,G.tag=G.error=null,G.strict=!!N,G.noscript=!!(N||G.opt.noscript),G.state=I.BEGIN,G.strictEntities=G.opt.strictEntities,G.ENTITIES=G.strictEntities?Object.create(r.XML_ENTITIES):Object.create(r.ENTITIES),G.attribList=[],G.opt.xmlns&&(G.ns=Object.create(v)),G.opt.unquotedAttributeValues===void 0&&(G.opt.unquotedAttributeValues=!N),G.trackPosition=G.opt.position!==!1,G.trackPosition&&(G.position=G.line=G.column=0),K(G,"onready")}o(t,"SAXParser"),Object.create||(Object.create=function(N){function S(){}o(S,"F"),S.prototype=N;var G=new S;return G}),Object.keys||(Object.keys=function(N){var S=[];for(var G in N)N.hasOwnProperty(G)&&S.push(G);return S});function n(N){for(var S=Math.max(r.MAX_BUFFER_LENGTH,10),G=0,P=0,Ee=e.length;P<Ee;P++){var Ce=N[e[P]].length;if(Ce>S)switch(e[P]){case"textNode":W(N);break;case"cdata":q(N,"oncdata",N.cdata),N.cdata="";break;case"script":q(N,"onscript",N.script),N.script="";break;default:pe(N,"Max buffer length exceeded: "+e[P])}G=Math.max(G,Ce)}var Ae=r.MAX_BUFFER_LENGTH-G;N.bufferCheckPosition=Ae+N.position}o(n,"checkBufferLength");function s(N){for(var S=0,G=e.length;S<G;S++)N[e[S]]=""}o(s,"clearBuffers");function i(N){W(N),N.cdata!==""&&(q(N,"oncdata",N.cdata),N.cdata=""),N.script!==""&&(q(N,"onscript",N.script),N.script="")}o(i,"flushBuffers"),t.prototype={end:o(function(){ue(this)},"end"),write:rt,resume:o(function(){return this.error=null,this},"resume"),close:o(function(){return this.write(null)},"close"),flush:o(function(){i(this)},"flush")};var a;try{a=Ge("stream").Stream}catch{a=o(function(){},"Stream")}a||(a=o(function(){},"Stream"));var u=r.EVENTS.filter(function(N){return N!=="error"&&N!=="end"});function c(N,S){return new l(N,S)}o(c,"createStream");function l(N,S){if(!(this instanceof l))return new l(N,S);a.apply(this),this._parser=new t(N,S),this.writable=!0,this.readable=!0;var G=this;this._parser.onend=function(){G.emit("end")},this._parser.onerror=function(P){G.emit("error",P),G._parser.error=null},this._decoder=null,u.forEach(function(P){Object.defineProperty(G,"on"+P,{get:o(function(){return G._parser["on"+P]},"get"),set:o(function(Ee){if(!Ee)return G.removeAllListeners(P),G._parser["on"+P]=Ee,Ee;G.on(P,Ee)},"set"),enumerable:!0,configurable:!1})})}o(l,"SAXStream"),l.prototype=Object.create(a.prototype,{constructor:{value:l}}),l.prototype.write=function(N){if(typeof Buffer=="function"&&typeof Buffer.isBuffer=="function"&&Buffer.isBuffer(N)){if(!this._decoder){var S=Ge("string_decoder").StringDecoder;this._decoder=new S("utf8")}N=this._decoder.write(N)}return this._parser.write(N.toString()),this.emit("data",N),!0},l.prototype.end=function(N){return N&&N.length&&this.write(N),this._parser.end(),!0},l.prototype.on=function(N,S){var G=this;return!G._parser["on"+N]&&u.indexOf(N)!==-1&&(G._parser["on"+N]=function(){var P=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);P.splice(0,0,N),G.emit.apply(G,P)}),a.prototype.on.call(G,N,S)};var h="[CDATA[",m="DOCTYPE",g="http://www.w3.org/XML/1998/namespace",y="http://www.w3.org/2000/xmlns/",v={xml:g,xmlns:y},E=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,w=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,C=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,_=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function b(N){return N===" "||N===`
|
|
92
|
-
`||N==="\r"||N===" "}o(b,"isWhitespace");function A(N){return N==='"'||N==="'"}o(A,"isQuote");function T(N){return N===">"||b(N)}o(T,"isAttribEnd");function B(N,S){return N.test(S)}o(B,"isMatch");function M(N,S){return!B(N,S)}o(M,"notMatch");var I=0;r.STATE={BEGIN:I++,BEGIN_WHITESPACE:I++,TEXT:I++,TEXT_ENTITY:I++,OPEN_WAKA:I++,SGML_DECL:I++,SGML_DECL_QUOTED:I++,DOCTYPE:I++,DOCTYPE_QUOTED:I++,DOCTYPE_DTD:I++,DOCTYPE_DTD_QUOTED:I++,COMMENT_STARTING:I++,COMMENT:I++,COMMENT_ENDING:I++,COMMENT_ENDED:I++,CDATA:I++,CDATA_ENDING:I++,CDATA_ENDING_2:I++,PROC_INST:I++,PROC_INST_BODY:I++,PROC_INST_ENDING:I++,OPEN_TAG:I++,OPEN_TAG_SLASH:I++,ATTRIB:I++,ATTRIB_NAME:I++,ATTRIB_NAME_SAW_WHITE:I++,ATTRIB_VALUE:I++,ATTRIB_VALUE_QUOTED:I++,ATTRIB_VALUE_CLOSED:I++,ATTRIB_VALUE_UNQUOTED:I++,ATTRIB_VALUE_ENTITY_Q:I++,ATTRIB_VALUE_ENTITY_U:I++,CLOSE_TAG:I++,CLOSE_TAG_SAW_WHITE:I++,SCRIPT:I++,SCRIPT_ENDING:I++},r.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},r.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(r.ENTITIES).forEach(function(N){var S=r.ENTITIES[N],G=typeof S=="number"?String.fromCharCode(S):S;r.ENTITIES[N]=G});for(var H in r.STATE)r.STATE[r.STATE[H]]=H;I=r.STATE;function K(N,S,G){N[S]&&N[S](G)}o(K,"emit");function q(N,S,G){N.textNode&&W(N),K(N,S,G)}o(q,"emitNode");function W(N){N.textNode=he(N.opt,N.textNode),N.textNode&&K(N,"ontext",N.textNode),N.textNode=""}o(W,"closeText");function he(N,S){return N.trim&&(S=S.trim()),N.normalize&&(S=S.replace(/\s+/g," ")),S}o(he,"textopts");function pe(N,S){return W(N),N.trackPosition&&(S+=`
|
|
93
|
-
Line: `+N.line+`
|
|
94
|
-
Column: `+N.column+`
|
|
95
|
-
Char: `+N.c),S=new Error(S),N.error=S,K(N,"onerror",S),N}o(pe,"error");function ue(N){return N.sawRoot&&!N.closedRoot&&Y(N,"Unclosed root tag"),N.state!==I.BEGIN&&N.state!==I.BEGIN_WHITESPACE&&N.state!==I.TEXT&&pe(N,"Unexpected end"),W(N),N.c="",N.closed=!0,K(N,"onend"),t.call(N,N.strict,N.opt),N}o(ue,"end");function Y(N,S){if(typeof N!="object"||!(N instanceof t))throw new Error("bad call to strictFail");N.strict&&pe(N,S)}o(Y,"strictFail");function ve(N){N.strict||(N.tagName=N.tagName[N.looseCase]());var S=N.tags[N.tags.length-1]||N,G=N.tag={name:N.tagName,attributes:{}};N.opt.xmlns&&(G.ns=S.ns),N.attribList.length=0,q(N,"onopentagstart",G)}o(ve,"newTag");function Oe(N,S){var G=N.indexOf(":"),P=G<0?["",N]:N.split(":"),Ee=P[0],Ce=P[1];return S&&N==="xmlns"&&(Ee="xmlns",Ce=""),{prefix:Ee,local:Ce}}o(Oe,"qname");function Je(N){if(N.strict||(N.attribName=N.attribName[N.looseCase]()),N.attribList.indexOf(N.attribName)!==-1||N.tag.attributes.hasOwnProperty(N.attribName)){N.attribName=N.attribValue="";return}if(N.opt.xmlns){var S=Oe(N.attribName,!0),G=S.prefix,P=S.local;if(G==="xmlns")if(P==="xml"&&N.attribValue!==g)Y(N,"xml: prefix must be bound to "+g+`
|
|
96
|
-
Actual: `+N.attribValue);else if(P==="xmlns"&&N.attribValue!==y)Y(N,"xmlns: prefix must be bound to "+y+`
|
|
97
|
-
Actual: `+N.attribValue);else{var Ee=N.tag,Ce=N.tags[N.tags.length-1]||N;Ee.ns===Ce.ns&&(Ee.ns=Object.create(Ce.ns)),Ee.ns[P]=N.attribValue}N.attribList.push([N.attribName,N.attribValue])}else N.tag.attributes[N.attribName]=N.attribValue,q(N,"onattribute",{name:N.attribName,value:N.attribValue});N.attribName=N.attribValue=""}o(Je,"attrib");function ne(N,S){if(N.opt.xmlns){var G=N.tag,P=Oe(N.tagName);G.prefix=P.prefix,G.local=P.local,G.uri=G.ns[P.prefix]||"",G.prefix&&!G.uri&&(Y(N,"Unbound namespace prefix: "+JSON.stringify(N.tagName)),G.uri=P.prefix);var Ee=N.tags[N.tags.length-1]||N;G.ns&&Ee.ns!==G.ns&&Object.keys(G.ns).forEach(function(Nn){q(N,"onopennamespace",{prefix:Nn,uri:G.ns[Nn]})});for(var Ce=0,Ae=N.attribList.length;Ce<Ae;Ce++){var Ye=N.attribList[Ce],Tt=Ye[0],Me=Ye[1],St=Oe(Tt,!0),Yr=St.prefix,Qe=St.local,Dr=Yr===""?"":G.ns[Yr]||"",Gr={name:Tt,value:Me,prefix:Yr,local:Qe,uri:Dr};Yr&&Yr!=="xmlns"&&!Dr&&(Y(N,"Unbound namespace prefix: "+JSON.stringify(Yr)),Gr.uri=Yr),N.tag.attributes[Tt]=Gr,q(N,"onattribute",Gr)}N.attribList.length=0}N.tag.isSelfClosing=!!S,N.sawRoot=!0,N.tags.push(N.tag),q(N,"onopentag",N.tag),S||(!N.noscript&&N.tagName.toLowerCase()==="script"?N.state=I.SCRIPT:N.state=I.TEXT,N.tag=null,N.tagName=""),N.attribName=N.attribValue="",N.attribList.length=0}o(ne,"openTag");function Z(N){if(!N.tagName){Y(N,"Weird empty close tag."),N.textNode+="</>",N.state=I.TEXT;return}if(N.script){if(N.tagName!=="script"){N.script+="</"+N.tagName+">",N.tagName="",N.state=I.SCRIPT;return}q(N,"onscript",N.script),N.script=""}var S=N.tags.length,G=N.tagName;N.strict||(G=G[N.looseCase]());for(var P=G;S--;){var Ee=N.tags[S];if(Ee.name!==P)Y(N,"Unexpected close tag");else break}if(S<0){Y(N,"Unmatched closing tag: "+N.tagName),N.textNode+="</"+N.tagName+">",N.state=I.TEXT;return}N.tagName=G;for(var Ce=N.tags.length;Ce-- >S;){var Ae=N.tag=N.tags.pop();N.tagName=N.tag.name,q(N,"onclosetag",N.tagName);var Ye={};for(var Tt in Ae.ns)Ye[Tt]=Ae.ns[Tt];var Me=N.tags[N.tags.length-1]||N;N.opt.xmlns&&Ae.ns!==Me.ns&&Object.keys(Ae.ns).forEach(function(St){var Yr=Ae.ns[St];q(N,"onclosenamespace",{prefix:St,uri:Yr})})}S===0&&(N.closedRoot=!0),N.tagName=N.attribValue=N.attribName="",N.attribList.length=0,N.state=I.TEXT}o(Z,"closeTag");function Se(N){var S=N.entity,G=S.toLowerCase(),P,Ee="";return N.ENTITIES[S]?N.ENTITIES[S]:N.ENTITIES[G]?N.ENTITIES[G]:(S=G,S.charAt(0)==="#"&&(S.charAt(1)==="x"?(S=S.slice(2),P=parseInt(S,16),Ee=P.toString(16)):(S=S.slice(1),P=parseInt(S,10),Ee=P.toString(10))),S=S.replace(/^0+/,""),isNaN(P)||Ee.toLowerCase()!==S?(Y(N,"Invalid character entity"),"&"+N.entity+";"):String.fromCodePoint(P))}o(Se,"parseEntity");function He(N,S){S==="<"?(N.state=I.OPEN_WAKA,N.startTagPosition=N.position):b(S)||(Y(N,"Non-whitespace before first tag."),N.textNode=S,N.state=I.TEXT)}o(He,"beginWhiteSpace");function Le(N,S){var G="";return S<N.length&&(G=N.charAt(S)),G}o(Le,"charAt");function rt(N){var S=this;if(this.error)throw this.error;if(S.closed)return pe(S,"Cannot write after close. Assign an onready handler.");if(N===null)return ue(S);typeof N=="object"&&(N=N.toString());for(var G=0,P="";P=Le(N,G++),S.c=P,!!P;)switch(S.trackPosition&&(S.position++,P===`
|
|
98
|
-
`?(S.line++,S.column=0):S.column++),S.state){case I.BEGIN:if(S.state=I.BEGIN_WHITESPACE,P==="\uFEFF")continue;He(S,P);continue;case I.BEGIN_WHITESPACE:He(S,P);continue;case I.TEXT:if(S.sawRoot&&!S.closedRoot){for(var Ee=G-1;P&&P!=="<"&&P!=="&";)P=Le(N,G++),P&&S.trackPosition&&(S.position++,P===`
|
|
99
|
-
`?(S.line++,S.column=0):S.column++);S.textNode+=N.substring(Ee,G-1)}P==="<"&&!(S.sawRoot&&S.closedRoot&&!S.strict)?(S.state=I.OPEN_WAKA,S.startTagPosition=S.position):(!b(P)&&(!S.sawRoot||S.closedRoot)&&Y(S,"Text data outside of root node."),P==="&"?S.state=I.TEXT_ENTITY:S.textNode+=P);continue;case I.SCRIPT:P==="<"?S.state=I.SCRIPT_ENDING:S.script+=P;continue;case I.SCRIPT_ENDING:P==="/"?S.state=I.CLOSE_TAG:(S.script+="<"+P,S.state=I.SCRIPT);continue;case I.OPEN_WAKA:if(P==="!")S.state=I.SGML_DECL,S.sgmlDecl="";else if(!b(P))if(B(E,P))S.state=I.OPEN_TAG,S.tagName=P;else if(P==="/")S.state=I.CLOSE_TAG,S.tagName="";else if(P==="?")S.state=I.PROC_INST,S.procInstName=S.procInstBody="";else{if(Y(S,"Unencoded <"),S.startTagPosition+1<S.position){var Ce=S.position-S.startTagPosition;P=new Array(Ce).join(" ")+P}S.textNode+="<"+P,S.state=I.TEXT}continue;case I.SGML_DECL:if(S.sgmlDecl+P==="--"){S.state=I.COMMENT,S.comment="",S.sgmlDecl="";continue}S.doctype&&S.doctype!==!0&&S.sgmlDecl?(S.state=I.DOCTYPE_DTD,S.doctype+="<!"+S.sgmlDecl+P,S.sgmlDecl=""):(S.sgmlDecl+P).toUpperCase()===h?(q(S,"onopencdata"),S.state=I.CDATA,S.sgmlDecl="",S.cdata=""):(S.sgmlDecl+P).toUpperCase()===m?(S.state=I.DOCTYPE,(S.doctype||S.sawRoot)&&Y(S,"Inappropriately located doctype declaration"),S.doctype="",S.sgmlDecl=""):P===">"?(q(S,"onsgmldeclaration",S.sgmlDecl),S.sgmlDecl="",S.state=I.TEXT):(A(P)&&(S.state=I.SGML_DECL_QUOTED),S.sgmlDecl+=P);continue;case I.SGML_DECL_QUOTED:P===S.q&&(S.state=I.SGML_DECL,S.q=""),S.sgmlDecl+=P;continue;case I.DOCTYPE:P===">"?(S.state=I.TEXT,q(S,"ondoctype",S.doctype),S.doctype=!0):(S.doctype+=P,P==="["?S.state=I.DOCTYPE_DTD:A(P)&&(S.state=I.DOCTYPE_QUOTED,S.q=P));continue;case I.DOCTYPE_QUOTED:S.doctype+=P,P===S.q&&(S.q="",S.state=I.DOCTYPE);continue;case I.DOCTYPE_DTD:P==="]"?(S.doctype+=P,S.state=I.DOCTYPE):P==="<"?(S.state=I.OPEN_WAKA,S.startTagPosition=S.position):A(P)?(S.doctype+=P,S.state=I.DOCTYPE_DTD_QUOTED,S.q=P):S.doctype+=P;continue;case I.DOCTYPE_DTD_QUOTED:S.doctype+=P,P===S.q&&(S.state=I.DOCTYPE_DTD,S.q="");continue;case I.COMMENT:P==="-"?S.state=I.COMMENT_ENDING:S.comment+=P;continue;case I.COMMENT_ENDING:P==="-"?(S.state=I.COMMENT_ENDED,S.comment=he(S.opt,S.comment),S.comment&&q(S,"oncomment",S.comment),S.comment=""):(S.comment+="-"+P,S.state=I.COMMENT);continue;case I.COMMENT_ENDED:P!==">"?(Y(S,"Malformed comment"),S.comment+="--"+P,S.state=I.COMMENT):S.doctype&&S.doctype!==!0?S.state=I.DOCTYPE_DTD:S.state=I.TEXT;continue;case I.CDATA:P==="]"?S.state=I.CDATA_ENDING:S.cdata+=P;continue;case I.CDATA_ENDING:P==="]"?S.state=I.CDATA_ENDING_2:(S.cdata+="]"+P,S.state=I.CDATA);continue;case I.CDATA_ENDING_2:P===">"?(S.cdata&&q(S,"oncdata",S.cdata),q(S,"onclosecdata"),S.cdata="",S.state=I.TEXT):P==="]"?S.cdata+="]":(S.cdata+="]]"+P,S.state=I.CDATA);continue;case I.PROC_INST:P==="?"?S.state=I.PROC_INST_ENDING:b(P)?S.state=I.PROC_INST_BODY:S.procInstName+=P;continue;case I.PROC_INST_BODY:if(!S.procInstBody&&b(P))continue;P==="?"?S.state=I.PROC_INST_ENDING:S.procInstBody+=P;continue;case I.PROC_INST_ENDING:P===">"?(q(S,"onprocessinginstruction",{name:S.procInstName,body:S.procInstBody}),S.procInstName=S.procInstBody="",S.state=I.TEXT):(S.procInstBody+="?"+P,S.state=I.PROC_INST_BODY);continue;case I.OPEN_TAG:B(w,P)?S.tagName+=P:(ve(S),P===">"?ne(S):P==="/"?S.state=I.OPEN_TAG_SLASH:(b(P)||Y(S,"Invalid character in tag name"),S.state=I.ATTRIB));continue;case I.OPEN_TAG_SLASH:P===">"?(ne(S,!0),Z(S)):(Y(S,"Forward-slash in opening tag not followed by >"),S.state=I.ATTRIB);continue;case I.ATTRIB:if(b(P))continue;P===">"?ne(S):P==="/"?S.state=I.OPEN_TAG_SLASH:B(E,P)?(S.attribName=P,S.attribValue="",S.state=I.ATTRIB_NAME):Y(S,"Invalid attribute name");continue;case I.ATTRIB_NAME:P==="="?S.state=I.ATTRIB_VALUE:P===">"?(Y(S,"Attribute without value"),S.attribValue=S.attribName,Je(S),ne(S)):b(P)?S.state=I.ATTRIB_NAME_SAW_WHITE:B(w,P)?S.attribName+=P:Y(S,"Invalid attribute name");continue;case I.ATTRIB_NAME_SAW_WHITE:if(P==="=")S.state=I.ATTRIB_VALUE;else{if(b(P))continue;Y(S,"Attribute without value"),S.tag.attributes[S.attribName]="",S.attribValue="",q(S,"onattribute",{name:S.attribName,value:""}),S.attribName="",P===">"?ne(S):B(E,P)?(S.attribName=P,S.state=I.ATTRIB_NAME):(Y(S,"Invalid attribute name"),S.state=I.ATTRIB)}continue;case I.ATTRIB_VALUE:if(b(P))continue;A(P)?(S.q=P,S.state=I.ATTRIB_VALUE_QUOTED):(S.opt.unquotedAttributeValues||pe(S,"Unquoted attribute value"),S.state=I.ATTRIB_VALUE_UNQUOTED,S.attribValue=P);continue;case I.ATTRIB_VALUE_QUOTED:if(P!==S.q){P==="&"?S.state=I.ATTRIB_VALUE_ENTITY_Q:S.attribValue+=P;continue}Je(S),S.q="",S.state=I.ATTRIB_VALUE_CLOSED;continue;case I.ATTRIB_VALUE_CLOSED:b(P)?S.state=I.ATTRIB:P===">"?ne(S):P==="/"?S.state=I.OPEN_TAG_SLASH:B(E,P)?(Y(S,"No whitespace between attributes"),S.attribName=P,S.attribValue="",S.state=I.ATTRIB_NAME):Y(S,"Invalid attribute name");continue;case I.ATTRIB_VALUE_UNQUOTED:if(!T(P)){P==="&"?S.state=I.ATTRIB_VALUE_ENTITY_U:S.attribValue+=P;continue}Je(S),P===">"?ne(S):S.state=I.ATTRIB;continue;case I.CLOSE_TAG:if(S.tagName)P===">"?Z(S):B(w,P)?S.tagName+=P:S.script?(S.script+="</"+S.tagName,S.tagName="",S.state=I.SCRIPT):(b(P)||Y(S,"Invalid tagname in closing tag"),S.state=I.CLOSE_TAG_SAW_WHITE);else{if(b(P))continue;M(E,P)?S.script?(S.script+="</"+P,S.state=I.SCRIPT):Y(S,"Invalid tagname in closing tag."):S.tagName=P}continue;case I.CLOSE_TAG_SAW_WHITE:if(b(P))continue;P===">"?Z(S):Y(S,"Invalid characters in closing tag");continue;case I.TEXT_ENTITY:case I.ATTRIB_VALUE_ENTITY_Q:case I.ATTRIB_VALUE_ENTITY_U:var Ae,Ye;switch(S.state){case I.TEXT_ENTITY:Ae=I.TEXT,Ye="textNode";break;case I.ATTRIB_VALUE_ENTITY_Q:Ae=I.ATTRIB_VALUE_QUOTED,Ye="attribValue";break;case I.ATTRIB_VALUE_ENTITY_U:Ae=I.ATTRIB_VALUE_UNQUOTED,Ye="attribValue";break}if(P===";"){var Tt=Se(S);S.opt.unparsedEntities&&!Object.values(r.XML_ENTITIES).includes(Tt)?(S.entity="",S.state=Ae,S.write(Tt)):(S[Ye]+=Tt,S.entity="",S.state=Ae)}else B(S.entity.length?_:C,P)?S.entity+=P:(Y(S,"Invalid character in entity name"),S[Ye]+="&"+S.entity+P,S.entity="",S.state=Ae);continue;default:throw new Error(S,"Unknown state: "+S.state)}return S.position>=S.bufferCheckPosition&&n(S),S}o(rt,"write");String.fromCodePoint||(function(){var N=String.fromCharCode,S=Math.floor,G=o(function(){var P=16384,Ee=[],Ce,Ae,Ye=-1,Tt=arguments.length;if(!Tt)return"";for(var Me="";++Ye<Tt;){var St=Number(arguments[Ye]);if(!isFinite(St)||St<0||St>1114111||S(St)!==St)throw RangeError("Invalid code point: "+St);St<=65535?Ee.push(St):(St-=65536,Ce=(St>>10)+55296,Ae=St%1024+56320,Ee.push(Ce,Ae)),(Ye+1===Tt||Ee.length>P)&&(Me+=N.apply(null,Ee),Ee.length=0)}return Me},"fromCodePoint");Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:G,configurable:!0,writable:!0}):String.fromCodePoint=G})()})(typeof Cb>"u"?Cb.sax={}:Cb)});var P9=te(ZD=>{"use strict";(function(){"use strict";ZD.stripBOM=function(r){return r[0]==="\uFEFF"?r.substring(1):r}}).call(ZD)});var eB=te(bf=>{"use strict";(function(){"use strict";var r;r=new RegExp(/(?!xmlns)^.*:/),bf.normalize=function(e){return e.toLowerCase()},bf.firstCharLowerCase=function(e){return e.charAt(0).toLowerCase()+e.slice(1)},bf.stripPrefix=function(e){return e.replace(r,"")},bf.parseNumbers=function(e){return isNaN(e)||(e=e%1===0?parseInt(e,10):parseFloat(e)),e},bf.parseBooleans=function(e){return/^(?:true|false)$/i.test(e)&&(e=e.toLowerCase()==="true"),e}}).call(bf)});var k9=te(Yo=>{"use strict";(function(){"use strict";var r,e,t,n,s,i,a,u,c,l=o(function(g,y){return function(){return g.apply(y,arguments)}},"bind"),h=o(function(g,y){for(var v in y)m.call(y,v)&&(g[v]=y[v]);function E(){this.constructor=g}return o(E,"ctor"),E.prototype=y.prototype,g.prototype=new E,g.__super__=y.prototype,g},"extend"),m={}.hasOwnProperty;u=O9(),n=Ge("events"),r=P9(),a=eB(),c=Ge("timers").setImmediate,e=lb().defaults,s=o(function(g){return typeof g=="object"&&g!=null&&Object.keys(g).length===0},"isEmpty"),i=o(function(g,y,v){var E,w,C;for(E=0,w=g.length;E<w;E++)C=g[E],y=C(y,v);return y},"processItem"),t=o(function(g,y,v){var E;return E=Object.create(null),E.value=v,E.writable=!0,E.enumerable=!0,E.configurable=!0,Object.defineProperty(g,y,E)},"defineProperty"),Yo.Parser=(function(g){h(y,g);function y(v){this.parseStringPromise=l(this.parseStringPromise,this),this.parseString=l(this.parseString,this),this.reset=l(this.reset,this),this.assignOrPush=l(this.assignOrPush,this),this.processAsync=l(this.processAsync,this);var E,w,C;if(!(this instanceof Yo.Parser))return new Yo.Parser(v);this.options={},w=e["0.2"];for(E in w)m.call(w,E)&&(C=w[E],this.options[E]=C);for(E in v)m.call(v,E)&&(C=v[E],this.options[E]=C);this.options.xmlns&&(this.options.xmlnskey=this.options.attrkey+"ns"),this.options.normalizeTags&&(this.options.tagNameProcessors||(this.options.tagNameProcessors=[]),this.options.tagNameProcessors.unshift(a.normalize)),this.reset()}return o(y,"Parser"),y.prototype.processAsync=function(){var v,E;try{return this.remaining.length<=this.options.chunkSize?(v=this.remaining,this.remaining="",this.saxParser=this.saxParser.write(v),this.saxParser.close()):(v=this.remaining.substr(0,this.options.chunkSize),this.remaining=this.remaining.substr(this.options.chunkSize,this.remaining.length),this.saxParser=this.saxParser.write(v),c(this.processAsync))}catch(w){if(E=w,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(E)}},y.prototype.assignOrPush=function(v,E,w){return E in v?(v[E]instanceof Array||t(v,E,[v[E]]),v[E].push(w)):this.options.explicitArray?t(v,E,[w]):t(v,E,w)},y.prototype.reset=function(){var v,E,w,C;return this.removeAllListeners(),this.saxParser=u.parser(this.options.strict,{trim:!1,normalize:!1,xmlns:this.options.xmlns}),this.saxParser.errThrown=!1,this.saxParser.onerror=(function(_){return function(b){if(_.saxParser.resume(),!_.saxParser.errThrown)return _.saxParser.errThrown=!0,_.emit("error",b)}})(this),this.saxParser.onend=(function(_){return function(){if(!_.saxParser.ended)return _.saxParser.ended=!0,_.emit("end",_.resultObject)}})(this),this.saxParser.ended=!1,this.EXPLICIT_CHARKEY=this.options.explicitCharkey,this.resultObject=null,C=[],v=this.options.attrkey,E=this.options.charkey,this.saxParser.onopentag=(function(_){return function(b){var A,T,B,M,I;if(B={},B[E]="",!_.options.ignoreAttrs){I=b.attributes;for(A in I)m.call(I,A)&&(!(v in B)&&!_.options.mergeAttrs&&(B[v]={}),T=_.options.attrValueProcessors?i(_.options.attrValueProcessors,b.attributes[A],A):b.attributes[A],M=_.options.attrNameProcessors?i(_.options.attrNameProcessors,A):A,_.options.mergeAttrs?_.assignOrPush(B,M,T):t(B[v],M,T))}return B["#name"]=_.options.tagNameProcessors?i(_.options.tagNameProcessors,b.name):b.name,_.options.xmlns&&(B[_.options.xmlnskey]={uri:b.uri,local:b.local}),C.push(B)}})(this),this.saxParser.onclosetag=(function(_){return function(){var b,A,T,B,M,I,H,K,q,W;if(I=C.pop(),M=I["#name"],(!_.options.explicitChildren||!_.options.preserveChildrenOrder)&&delete I["#name"],I.cdata===!0&&(b=I.cdata,delete I.cdata),q=C[C.length-1],I[E].match(/^\s*$/)&&!b?(A=I[E],delete I[E]):(_.options.trim&&(I[E]=I[E].trim()),_.options.normalize&&(I[E]=I[E].replace(/\s{2,}/g," ").trim()),I[E]=_.options.valueProcessors?i(_.options.valueProcessors,I[E],M):I[E],Object.keys(I).length===1&&E in I&&!_.EXPLICIT_CHARKEY&&(I=I[E])),s(I)&&(typeof _.options.emptyTag=="function"?I=_.options.emptyTag():I=_.options.emptyTag!==""?_.options.emptyTag:A),_.options.validator!=null&&(W="/"+(function(){var he,pe,ue;for(ue=[],he=0,pe=C.length;he<pe;he++)B=C[he],ue.push(B["#name"]);return ue})().concat(M).join("/"),(function(){var he;try{return I=_.options.validator(W,q&&q[M],I)}catch(pe){return he=pe,_.emit("error",he)}})()),_.options.explicitChildren&&!_.options.mergeAttrs&&typeof I=="object"){if(!_.options.preserveChildrenOrder)B={},_.options.attrkey in I&&(B[_.options.attrkey]=I[_.options.attrkey],delete I[_.options.attrkey]),!_.options.charsAsChildren&&_.options.charkey in I&&(B[_.options.charkey]=I[_.options.charkey],delete I[_.options.charkey]),Object.getOwnPropertyNames(I).length>0&&(B[_.options.childkey]=I),I=B;else if(q){q[_.options.childkey]=q[_.options.childkey]||[],H={};for(T in I)m.call(I,T)&&t(H,T,I[T]);q[_.options.childkey].push(H),delete I["#name"],Object.keys(I).length===1&&E in I&&!_.EXPLICIT_CHARKEY&&(I=I[E])}}return C.length>0?_.assignOrPush(q,M,I):(_.options.explicitRoot&&(K=I,I={},t(I,M,K)),_.resultObject=I,_.saxParser.ended=!0,_.emit("end",_.resultObject))}})(this),w=(function(_){return function(b){var A,T;if(T=C[C.length-1],T)return T[E]+=b,_.options.explicitChildren&&_.options.preserveChildrenOrder&&_.options.charsAsChildren&&(_.options.includeWhiteChars||b.replace(/\\n/g,"").trim()!=="")&&(T[_.options.childkey]=T[_.options.childkey]||[],A={"#name":"__text__"},A[E]=b,_.options.normalize&&(A[E]=A[E].replace(/\s{2,}/g," ").trim()),T[_.options.childkey].push(A)),T}})(this),this.saxParser.ontext=w,this.saxParser.oncdata=(function(_){return function(b){var A;if(A=w(b),A)return A.cdata=!0}})(this)},y.prototype.parseString=function(v,E){var w;E!=null&&typeof E=="function"&&(this.on("end",function(C){return this.reset(),E(null,C)}),this.on("error",function(C){return this.reset(),E(C)}));try{return v=v.toString(),v.trim()===""?(this.emit("end",null),!0):(v=r.stripBOM(v),this.options.async?(this.remaining=v,c(this.processAsync),this.saxParser):this.saxParser.write(v).close())}catch(C){if(w=C,this.saxParser.errThrown||this.saxParser.ended){if(this.saxParser.ended)throw w}else return this.emit("error",w),this.saxParser.errThrown=!0}},y.prototype.parseStringPromise=function(v){return new Promise((function(E){return function(w,C){return E.parseString(v,function(_,b){return _?C(_):w(b)})}})(this))},y})(n),Yo.parseString=function(g,y,v){var E,w,C;return v!=null?(typeof v=="function"&&(E=v),typeof y=="object"&&(w=y)):(typeof y=="function"&&(E=y),w={}),C=new Yo.Parser(w),C.parseString(g,E)},Yo.parseStringPromise=function(g,y){var v,E;return typeof y=="object"&&(v=y),E=new Yo.Parser(v),E.parseStringPromise(g)}}).call(Yo)});var L9=te(Qo=>{"use strict";(function(){"use strict";var r,e,t,n,s=o(function(a,u){for(var c in u)i.call(u,c)&&(a[c]=u[c]);function l(){this.constructor=a}return o(l,"ctor"),l.prototype=u.prototype,a.prototype=new l,a.__super__=u.prototype,a},"extend"),i={}.hasOwnProperty;e=lb(),r=R9(),t=k9(),n=eB(),Qo.defaults=e.defaults,Qo.processors=n,Qo.ValidationError=(function(a){s(u,a);function u(c){this.message=c}return o(u,"ValidationError"),u})(Error),Qo.Builder=r.Builder,Qo.Parser=t.Parser,Qo.parseString=t.parseString,Qo.parseStringPromise=t.parseStringPromise}).call(Qo)});var ON="http://www.w3.org/2000/09/xmldsig#",rk="http://www.w3.org/TR/2001/REC-xml-c14n-20010315",PN=(function(r){return r.RSA_SHA1="http://www.w3.org/2000/09/xmldsig#rsa-sha1",r.RSA_SHA256="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256",r})({}),Fu=(function(r){return r.SHA1="sha1",r.SHA256="sha256",r})({}),kN=(function(r){return r.SHA1="http://www.w3.org/2000/09/xmldsig#sha1",r.SHA256="http://www.w3.org/2001/04/xmlenc#sha256",r})({});var Nr={AC:"12",AL:"27",AM:"13",AP:"16",BA:"29",CE:"23",DF:"53",ES:"32",GO:"52",MA:"21",MG:"31",MS:"50",MT:"51",PA:"15",PB:"25",PE:"26",PI:"22",PR:"41",RJ:"33",RN:"24",RO:"11",RR:"14",RS:"43",SC:"42",SE:"28",SP:"35",TO:"17"},Vge=Object.keys(Nr);var jge={Production:"1",Homolog:"2"};var Wr=class extends Error{static{o(this,"NFeTsError")}};var nk=class extends Wr{static{o(this,"ValidationError")}};var Sg={includeComments:!1,exclusive:!0};var LN=o(r=>{throw new Wr("Didn't expect to get here")},"unreachable");var Cp=class{static{o(this,"Signer")}toolkit;certificateRepository;algorithm;canonical;constructor(e,t,n=Fu.SHA1,s=Sg){this.toolkit=e,this.certificateRepository=t,this.algorithm=n,this.canonical=s}assemble(e,t,n){let s=this.certificateRepository.getStringCertificate(n);return{$:{xmlns:ON},SignedInfo:e,SignatureValue:t,KeyInfo:{X509Data:{X509Certificate:s}}}}signedInfo(e,t){return{CanonicalizationMethod:{$:{Algorithm:rk}},SignatureMethod:{$:{Algorithm:this.signatureMethod}},Reference:{$:{URI:`#${this.toolkit.getAttribute(e,t)}`},Transforms:this.transforms,DigestMethod:{$:{Algorithm:this.digestAlgorithm}},DigestValue:this.digest(e)}}}digest(e){return this.toolkit.digest(e,this.algorithm,this.canonical)}async signOrLeft(e,t){let n=this.toolkit.canonicalize(await this.toolkit.build({$:{xmlns:ON},...e},{rootName:"SignedInfo"}),this.canonical);return this.certificateRepository.sign(n,t,this.algorithm)}get transforms(){return{Transform:[{$:{Algorithm:"http://www.w3.org/2000/09/xmldsig#enveloped-signature"}},{$:{Algorithm:"http://www.w3.org/TR/2001/REC-xml-c14n-20010315"}}]}}get digestAlgorithm(){switch(this.algorithm){case Fu.SHA256:return kN.SHA256;case Fu.SHA1:return kN.SHA1;default:return LN(this.algorithm)}}get signatureMethod(){switch(this.algorithm){case Fu.SHA256:return PN.RSA_SHA256;case Fu.SHA1:return PN.RSA_SHA1;default:return LN(this.algorithm)}}};var VN=class{static{o(this,"Left")}value;constructor(e){this.value=e}isLeft(){return!0}isRight(){return!1}},Mw=class{static{o(this,"Right")}value;constructor(e){this.value=e}isLeft(){return!1}isRight(){return!0}},ls=o(r=>new VN(r),"left"),Bi=o(r=>r===void 0?new Mw(void 0):new Mw(r),"right");var sk=class extends Cp{static{o(this,"EntitySigner")}async sign(e,t,n){let{tag:s,mark:i}=t,{certificate:a}=n;if(!e[s])return ls(new Wr(`Node ${String(s)} not found`));let u=await this.toolkit.build(this.ns(e,s),{headless:!0,rootName:String(s),renderOpts:{pretty:!1}}),c=this.signedInfo(u,i),l=await this.signOrLeft(c,n);if(l.isLeft())return l;let h=e;return h.Signature=this.assemble(c,l.value,a),Bi(h)}ns(e,t){let n=e.$?.xmlns,{$:s,...i}=e[t],{xmlns:a,...u}=s??{};return{$:{xmlns:n,...u},...i}}};var ik=class extends Cp{static{o(this,"XmlSigner")}async sign(e,t,n){let{tag:s,mark:i}=t,{certificate:a}=n,u=this.toolkit.getNode(e,s);if(!u)return ls(new Wr(`Node ${s} not found`));let c=this.signedInfo(u,i),l=await this.signOrLeft(c,n);if(l.isLeft())return l;let h=await this.toolkit.build(this.assemble(c,l.value,a),{rootName:"Signature"});return Bi(this.toolkit.appendNode(e,h))}};import"reflect-metadata";var bg="__SkipValidation__",dve=o(()=>(r,e)=>{Reflect.defineMetadata(bg,!0,r,e.toString())},"SkipValidation"),mve=o(()=>r=>{Reflect.defineMetadata(bg,!0,r)},"SkipAllValidations");import{plainToInstance as yY}from"class-transformer";var qw=o(r=>{for(let[e,t]of Object.entries(r))typeof t>"u"&&delete r[e],t===""&&delete r[e],t&&typeof t=="object"&&qw(t)},"clearEmptyValues"),ak=o((r,e,t={})=>{let n=yY(e,r);return t.clearEmptyValues&&qw(n),n},"plainToInstance");import"reflect-metadata";import{validateSync as xY}from"class-validator";var ok="__ValidateErrors__",uk=o((r,e)=>r.reduce((t,n)=>{if(n.children?.length)return t.concat(uk(n.children,e?`${e}.${n.property}`:n.property));let s=Object.values(n.constraints??{}).map(i=>e?`${e}.${i}`:i).join(", ");return s?t.concat(s):t},[]),"mapConstraintsToErrors"),Cve=o(r=>(e,t,n)=>{let s=n.value;n.value=function(...i){let a=Reflect.getMetadata(bg,this.constructor);if(Reflect.getMetadata(bg,this.constructor.prototype,t.toString())===!0||a===!0)return s?.apply(this,i);let[c,...l]=i;if(!c)return s?.apply(this,i);let h=ak(c,r),m=xY(h,{whitelist:!0});if(qw(h),m.length){let g=Reflect.getMetadata(ok,this)??[];Reflect.defineMetadata(ok,g.concat(uk(m,s?.name)),this)}return s?.apply(this,[h,...l])}},"Validates");var Np=9e15,Ku=1e9,UN="0123456789abcdef",$w="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",Gw="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",jN={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-Np,maxE:Np,crypto:!1},hk,Uo,Ot=!0,Ww="[DecimalError] ",Hu=Ww+"Invalid argument: ",pk=Ww+"Precision limit exceeded",dk=Ww+"crypto unavailable",mk="[object Decimal]",fs=Math.floor,_n=Math.pow,wY=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,EY=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,SY=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,gk=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,ua=1e7,Ct=7,bY=9007199254740991,AY=$w.length-1,FN=Gw.length-1,Ve={toStringTag:mk};Ve.absoluteValue=Ve.abs=function(){var r=new this.constructor(this);return r.s<0&&(r.s=1),yt(r)};Ve.ceil=function(){return yt(new this.constructor(this),this.e+1,2)};Ve.clampedTo=Ve.clamp=function(r,e){var t,n=this,s=n.constructor;if(r=new s(r),e=new s(e),!r.s||!e.s)return new s(NaN);if(r.gt(e))throw Error(Hu+e);return t=n.cmp(r),t<0?r:n.cmp(e)>0?e:new s(n)};Ve.comparedTo=Ve.cmp=function(r){var e,t,n,s,i=this,a=i.d,u=(r=new i.constructor(r)).d,c=i.s,l=r.s;if(!a||!u)return!c||!l?NaN:c!==l?c:a===u?0:!a^c<0?1:-1;if(!a[0]||!u[0])return a[0]?c:u[0]?-l:0;if(c!==l)return c;if(i.e!==r.e)return i.e>r.e^c<0?1:-1;for(n=a.length,s=u.length,e=0,t=n<s?n:s;e<t;++e)if(a[e]!==u[e])return a[e]>u[e]^c<0?1:-1;return n===s?0:n>s^c<0?1:-1};Ve.cosine=Ve.cos=function(){var r,e,t=this,n=t.constructor;return t.d?t.d[0]?(r=n.precision,e=n.rounding,n.precision=r+Math.max(t.e,t.sd())+Ct,n.rounding=1,t=CY(n,Ek(n,t)),n.precision=r,n.rounding=e,yt(Uo==2||Uo==3?t.neg():t,r,e,!0)):new n(1):new n(NaN)};Ve.cubeRoot=Ve.cbrt=function(){var r,e,t,n,s,i,a,u,c,l,h=this,m=h.constructor;if(!h.isFinite()||h.isZero())return new m(h);for(Ot=!1,i=h.s*_n(h.s*h,1/3),!i||Math.abs(i)==1/0?(t=zn(h.d),r=h.e,(i=(r-t.length+1)%3)&&(t+=i==1||i==-2?"0":"00"),i=_n(t,1/3),r=fs((r+1)/3)-(r%3==(r<0?-1:2)),i==1/0?t="5e"+r:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+r),n=new m(t),n.s=h.s):n=new m(i.toString()),a=(r=m.precision)+3;;)if(u=n,c=u.times(u).times(u),l=c.plus(h),n=Rr(l.plus(h).times(u),l.plus(c),a+2,1),zn(u.d).slice(0,a)===(t=zn(n.d)).slice(0,a))if(t=t.slice(a-3,a+1),t=="9999"||!s&&t=="4999"){if(!s&&(yt(u,r+1,0),u.times(u).times(u).eq(h))){n=u;break}a+=4,s=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(yt(n,r+1,1),e=!n.times(n).times(n).eq(h));break}return Ot=!0,yt(n,r,m.rounding,e)};Ve.decimalPlaces=Ve.dp=function(){var r,e=this.d,t=NaN;if(e){if(r=e.length-1,t=(r-fs(this.e/Ct))*Ct,r=e[r],r)for(;r%10==0;r/=10)t--;t<0&&(t=0)}return t};Ve.dividedBy=Ve.div=function(r){return Rr(this,new this.constructor(r))};Ve.dividedToIntegerBy=Ve.divToInt=function(r){var e=this,t=e.constructor;return yt(Rr(e,new t(r),0,1,1),t.precision,t.rounding)};Ve.equals=Ve.eq=function(r){return this.cmp(r)===0};Ve.floor=function(){return yt(new this.constructor(this),this.e+1,3)};Ve.greaterThan=Ve.gt=function(r){return this.cmp(r)>0};Ve.greaterThanOrEqualTo=Ve.gte=function(r){var e=this.cmp(r);return e==1||e===0};Ve.hyperbolicCosine=Ve.cosh=function(){var r,e,t,n,s,i=this,a=i.constructor,u=new a(1);if(!i.isFinite())return new a(i.s?1/0:NaN);if(i.isZero())return u;t=a.precision,n=a.rounding,a.precision=t+Math.max(i.e,i.sd())+4,a.rounding=1,s=i.d.length,s<32?(r=Math.ceil(s/3),e=(1/Jw(4,r)).toString()):(r=16,e="2.3283064365386962890625e-10"),i=Tp(a,1,i.times(e),new a(1),!0);for(var c,l=r,h=new a(8);l--;)c=i.times(i),i=u.minus(c.times(h.minus(c.times(h))));return yt(i,a.precision=t,a.rounding=n,!0)};Ve.hyperbolicSine=Ve.sinh=function(){var r,e,t,n,s=this,i=s.constructor;if(!s.isFinite()||s.isZero())return new i(s);if(e=i.precision,t=i.rounding,i.precision=e+Math.max(s.e,s.sd())+4,i.rounding=1,n=s.d.length,n<3)s=Tp(i,2,s,s,!0);else{r=1.4*Math.sqrt(n),r=r>16?16:r|0,s=s.times(1/Jw(5,r)),s=Tp(i,2,s,s,!0);for(var a,u=new i(5),c=new i(16),l=new i(20);r--;)a=s.times(s),s=s.times(u.plus(a.times(c.times(a).plus(l))))}return i.precision=e,i.rounding=t,yt(s,e,t,!0)};Ve.hyperbolicTangent=Ve.tanh=function(){var r,e,t=this,n=t.constructor;return t.isFinite()?t.isZero()?new n(t):(r=n.precision,e=n.rounding,n.precision=r+7,n.rounding=1,Rr(t.sinh(),t.cosh(),n.precision=r,n.rounding=e)):new n(t.s)};Ve.inverseCosine=Ve.acos=function(){var r=this,e=r.constructor,t=r.abs().cmp(1),n=e.precision,s=e.rounding;return t!==-1?t===0?r.isNeg()?ja(e,n,s):new e(0):new e(NaN):r.isZero()?ja(e,n+4,s).times(.5):(e.precision=n+6,e.rounding=1,r=new e(1).minus(r).div(r.plus(1)).sqrt().atan(),e.precision=n,e.rounding=s,r.times(2))};Ve.inverseHyperbolicCosine=Ve.acosh=function(){var r,e,t=this,n=t.constructor;return t.lte(1)?new n(t.eq(1)?0:NaN):t.isFinite()?(r=n.precision,e=n.rounding,n.precision=r+Math.max(Math.abs(t.e),t.sd())+4,n.rounding=1,Ot=!1,t=t.times(t).minus(1).sqrt().plus(t),Ot=!0,n.precision=r,n.rounding=e,t.ln()):new n(t)};Ve.inverseHyperbolicSine=Ve.asinh=function(){var r,e,t=this,n=t.constructor;return!t.isFinite()||t.isZero()?new n(t):(r=n.precision,e=n.rounding,n.precision=r+2*Math.max(Math.abs(t.e),t.sd())+6,n.rounding=1,Ot=!1,t=t.times(t).plus(1).sqrt().plus(t),Ot=!0,n.precision=r,n.rounding=e,t.ln())};Ve.inverseHyperbolicTangent=Ve.atanh=function(){var r,e,t,n,s=this,i=s.constructor;return s.isFinite()?s.e>=0?new i(s.abs().eq(1)?s.s/0:s.isZero()?s:NaN):(r=i.precision,e=i.rounding,n=s.sd(),Math.max(n,r)<2*-s.e-1?yt(new i(s),r,e,!0):(i.precision=t=n-s.e,s=Rr(s.plus(1),new i(1).minus(s),t+r,1),i.precision=r+4,i.rounding=1,s=s.ln(),i.precision=r,i.rounding=e,s.times(.5))):new i(NaN)};Ve.inverseSine=Ve.asin=function(){var r,e,t,n,s=this,i=s.constructor;return s.isZero()?new i(s):(e=s.abs().cmp(1),t=i.precision,n=i.rounding,e!==-1?e===0?(r=ja(i,t+4,n).times(.5),r.s=s.s,r):new i(NaN):(i.precision=t+6,i.rounding=1,s=s.div(new i(1).minus(s.times(s)).sqrt().plus(1)).atan(),i.precision=t,i.rounding=n,s.times(2)))};Ve.inverseTangent=Ve.atan=function(){var r,e,t,n,s,i,a,u,c,l=this,h=l.constructor,m=h.precision,g=h.rounding;if(l.isFinite()){if(l.isZero())return new h(l);if(l.abs().eq(1)&&m+4<=FN)return a=ja(h,m+4,g).times(.25),a.s=l.s,a}else{if(!l.s)return new h(NaN);if(m+4<=FN)return a=ja(h,m+4,g).times(.5),a.s=l.s,a}for(h.precision=u=m+10,h.rounding=1,t=Math.min(28,u/Ct+2|0),r=t;r;--r)l=l.div(l.times(l).plus(1).sqrt().plus(1));for(Ot=!1,e=Math.ceil(u/Ct),n=1,c=l.times(l),a=new h(l),s=l;r!==-1;)if(s=s.times(c),i=a.minus(s.div(n+=2)),s=s.times(c),a=i.plus(s.div(n+=2)),a.d[e]!==void 0)for(r=e;a.d[r]===i.d[r]&&r--;);return t&&(a=a.times(2<<t-1)),Ot=!0,yt(a,h.precision=m,h.rounding=g,!0)};Ve.isFinite=function(){return!!this.d};Ve.isInteger=Ve.isInt=function(){return!!this.d&&fs(this.e/Ct)>this.d.length-2};Ve.isNaN=function(){return!this.s};Ve.isNegative=Ve.isNeg=function(){return this.s<0};Ve.isPositive=Ve.isPos=function(){return this.s>0};Ve.isZero=function(){return!!this.d&&this.d[0]===0};Ve.lessThan=Ve.lt=function(r){return this.cmp(r)<0};Ve.lessThanOrEqualTo=Ve.lte=function(r){return this.cmp(r)<1};Ve.logarithm=Ve.log=function(r){var e,t,n,s,i,a,u,c,l=this,h=l.constructor,m=h.precision,g=h.rounding,y=5;if(r==null)r=new h(10),e=!0;else{if(r=new h(r),t=r.d,r.s<0||!t||!t[0]||r.eq(1))return new h(NaN);e=r.eq(10)}if(t=l.d,l.s<0||!t||!t[0]||l.eq(1))return new h(t&&!t[0]?-1/0:l.s!=1?NaN:t?0:1/0);if(e)if(t.length>1)i=!0;else{for(s=t[0];s%10===0;)s/=10;i=s!==1}if(Ot=!1,u=m+y,a=qu(l,u),n=e?Xw(h,u+10):qu(r,u),c=Rr(a,n,u,1),Ag(c.d,s=m,g))do if(u+=10,a=qu(l,u),n=e?Xw(h,u+10):qu(r,u),c=Rr(a,n,u,1),!i){+zn(c.d).slice(s+1,s+15)+1==1e14&&(c=yt(c,m+1,0));break}while(Ag(c.d,s+=10,g));return Ot=!0,yt(c,m,g)};Ve.minus=Ve.sub=function(r){var e,t,n,s,i,a,u,c,l,h,m,g,y=this,v=y.constructor;if(r=new v(r),!y.d||!r.d)return!y.s||!r.s?r=new v(NaN):y.d?r.s=-r.s:r=new v(r.d||y.s!==r.s?y:NaN),r;if(y.s!=r.s)return r.s=-r.s,y.plus(r);if(l=y.d,g=r.d,u=v.precision,c=v.rounding,!l[0]||!g[0]){if(g[0])r.s=-r.s;else if(l[0])r=new v(y);else return new v(c===3?-0:0);return Ot?yt(r,u,c):r}if(t=fs(r.e/Ct),h=fs(y.e/Ct),l=l.slice(),i=h-t,i){for(m=i<0,m?(e=l,i=-i,a=g.length):(e=g,t=h,a=l.length),n=Math.max(Math.ceil(u/Ct),a)+2,i>n&&(i=n,e.length=1),e.reverse(),n=i;n--;)e.push(0);e.reverse()}else{for(n=l.length,a=g.length,m=n<a,m&&(a=n),n=0;n<a;n++)if(l[n]!=g[n]){m=l[n]<g[n];break}i=0}for(m&&(e=l,l=g,g=e,r.s=-r.s),a=l.length,n=g.length-a;n>0;--n)l[a++]=0;for(n=g.length;n>i;){if(l[--n]<g[n]){for(s=n;s&&l[--s]===0;)l[s]=ua-1;--l[s],l[n]+=ua}l[n]-=g[n]}for(;l[--a]===0;)l.pop();for(;l[0]===0;l.shift())--t;return l[0]?(r.d=l,r.e=zw(l,t),Ot?yt(r,u,c):r):new v(c===3?-0:0)};Ve.modulo=Ve.mod=function(r){var e,t=this,n=t.constructor;return r=new n(r),!t.d||!r.s||r.d&&!r.d[0]?new n(NaN):!r.d||t.d&&!t.d[0]?yt(new n(t),n.precision,n.rounding):(Ot=!1,n.modulo==9?(e=Rr(t,r.abs(),0,3,1),e.s*=r.s):e=Rr(t,r,0,n.modulo,1),e=e.times(r),Ot=!0,t.minus(e))};Ve.naturalExponential=Ve.exp=function(){return MN(this)};Ve.naturalLogarithm=Ve.ln=function(){return qu(this)};Ve.negated=Ve.neg=function(){var r=new this.constructor(this);return r.s=-r.s,yt(r)};Ve.plus=Ve.add=function(r){var e,t,n,s,i,a,u,c,l,h,m=this,g=m.constructor;if(r=new g(r),!m.d||!r.d)return!m.s||!r.s?r=new g(NaN):m.d||(r=new g(r.d||m.s===r.s?m:NaN)),r;if(m.s!=r.s)return r.s=-r.s,m.minus(r);if(l=m.d,h=r.d,u=g.precision,c=g.rounding,!l[0]||!h[0])return h[0]||(r=new g(m)),Ot?yt(r,u,c):r;if(i=fs(m.e/Ct),n=fs(r.e/Ct),l=l.slice(),s=i-n,s){for(s<0?(t=l,s=-s,a=h.length):(t=h,n=i,a=l.length),i=Math.ceil(u/Ct),a=i>a?i+1:a+1,s>a&&(s=a,t.length=1),t.reverse();s--;)t.push(0);t.reverse()}for(a=l.length,s=h.length,a-s<0&&(s=a,t=h,h=l,l=t),e=0;s;)e=(l[--s]=l[s]+h[s]+e)/ua|0,l[s]%=ua;for(e&&(l.unshift(e),++n),a=l.length;l[--a]==0;)l.pop();return r.d=l,r.e=zw(l,n),Ot?yt(r,u,c):r};Ve.precision=Ve.sd=function(r){var e,t=this;if(r!==void 0&&r!==!!r&&r!==1&&r!==0)throw Error(Hu+r);return t.d?(e=vk(t.d),r&&t.e+1>e&&(e=t.e+1)):e=NaN,e};Ve.round=function(){var r=this,e=r.constructor;return yt(new e(r),r.e+1,e.rounding)};Ve.sine=Ve.sin=function(){var r,e,t=this,n=t.constructor;return t.isFinite()?t.isZero()?new n(t):(r=n.precision,e=n.rounding,n.precision=r+Math.max(t.e,t.sd())+Ct,n.rounding=1,t=TY(n,Ek(n,t)),n.precision=r,n.rounding=e,yt(Uo>2?t.neg():t,r,e,!0)):new n(NaN)};Ve.squareRoot=Ve.sqrt=function(){var r,e,t,n,s,i,a=this,u=a.d,c=a.e,l=a.s,h=a.constructor;if(l!==1||!u||!u[0])return new h(!l||l<0&&(!u||u[0])?NaN:u?a:1/0);for(Ot=!1,l=Math.sqrt(+a),l==0||l==1/0?(e=zn(u),(e.length+c)%2==0&&(e+="0"),l=Math.sqrt(e),c=fs((c+1)/2)-(c<0||c%2),l==1/0?e="5e"+c:(e=l.toExponential(),e=e.slice(0,e.indexOf("e")+1)+c),n=new h(e)):n=new h(l.toString()),t=(c=h.precision)+3;;)if(i=n,n=i.plus(Rr(a,i,t+2,1)).times(.5),zn(i.d).slice(0,t)===(e=zn(n.d)).slice(0,t))if(e=e.slice(t-3,t+1),e=="9999"||!s&&e=="4999"){if(!s&&(yt(i,c+1,0),i.times(i).eq(a))){n=i;break}t+=4,s=1}else{(!+e||!+e.slice(1)&&e.charAt(0)=="5")&&(yt(n,c+1,1),r=!n.times(n).eq(a));break}return Ot=!0,yt(n,c,h.rounding,r)};Ve.tangent=Ve.tan=function(){var r,e,t=this,n=t.constructor;return t.isFinite()?t.isZero()?new n(t):(r=n.precision,e=n.rounding,n.precision=r+10,n.rounding=1,t=t.sin(),t.s=1,t=Rr(t,new n(1).minus(t.times(t)).sqrt(),r+10,0),n.precision=r,n.rounding=e,yt(Uo==2||Uo==4?t.neg():t,r,e,!0)):new n(NaN)};Ve.times=Ve.mul=function(r){var e,t,n,s,i,a,u,c,l,h=this,m=h.constructor,g=h.d,y=(r=new m(r)).d;if(r.s*=h.s,!g||!g[0]||!y||!y[0])return new m(!r.s||g&&!g[0]&&!y||y&&!y[0]&&!g?NaN:!g||!y?r.s/0:r.s*0);for(t=fs(h.e/Ct)+fs(r.e/Ct),c=g.length,l=y.length,c<l&&(i=g,g=y,y=i,a=c,c=l,l=a),i=[],a=c+l,n=a;n--;)i.push(0);for(n=l;--n>=0;){for(e=0,s=c+n;s>n;)u=i[s]+y[n]*g[s-n-1]+e,i[s--]=u%ua|0,e=u/ua|0;i[s]=(i[s]+e)%ua|0}for(;!i[--a];)i.pop();return e?++t:i.shift(),r.d=i,r.e=zw(i,t),Ot?yt(r,m.precision,m.rounding):r};Ve.toBinary=function(r,e){return qN(this,2,r,e)};Ve.toDecimalPlaces=Ve.toDP=function(r,e){var t=this,n=t.constructor;return t=new n(t),r===void 0?t:(Ls(r,0,Ku),e===void 0?e=n.rounding:Ls(e,0,8),yt(t,r+t.e+1,e))};Ve.toExponential=function(r,e){var t,n=this,s=n.constructor;return r===void 0?t=Fa(n,!0):(Ls(r,0,Ku),e===void 0?e=s.rounding:Ls(e,0,8),n=yt(new s(n),r+1,e),t=Fa(n,!0,r+1)),n.isNeg()&&!n.isZero()?"-"+t:t};Ve.toFixed=function(r,e){var t,n,s=this,i=s.constructor;return r===void 0?t=Fa(s):(Ls(r,0,Ku),e===void 0?e=i.rounding:Ls(e,0,8),n=yt(new i(s),r+s.e+1,e),t=Fa(n,!1,r+n.e+1)),s.isNeg()&&!s.isZero()?"-"+t:t};Ve.toFraction=function(r){var e,t,n,s,i,a,u,c,l,h,m,g,y=this,v=y.d,E=y.constructor;if(!v)return new E(y);if(l=t=new E(1),n=c=new E(0),e=new E(n),i=e.e=vk(v)-y.e-1,a=i%Ct,e.d[0]=_n(10,a<0?Ct+a:a),r==null)r=i>0?e:l;else{if(u=new E(r),!u.isInt()||u.lt(l))throw Error(Hu+u);r=u.gt(e)?i>0?e:l:u}for(Ot=!1,u=new E(zn(v)),h=E.precision,E.precision=i=v.length*Ct*2;m=Rr(u,e,0,1,1),s=t.plus(m.times(n)),s.cmp(r)!=1;)t=n,n=s,s=l,l=c.plus(m.times(s)),c=s,s=e,e=u.minus(m.times(s)),u=s;return s=Rr(r.minus(t),n,0,1,1),c=c.plus(s.times(l)),t=t.plus(s.times(n)),c.s=l.s=y.s,g=Rr(l,n,i,1).minus(y).abs().cmp(Rr(c,t,i,1).minus(y).abs())<1?[l,n]:[c,t],E.precision=h,Ot=!0,g};Ve.toHexadecimal=Ve.toHex=function(r,e){return qN(this,16,r,e)};Ve.toNearest=function(r,e){var t=this,n=t.constructor;if(t=new n(t),r==null){if(!t.d)return t;r=new n(1),e=n.rounding}else{if(r=new n(r),e===void 0?e=n.rounding:Ls(e,0,8),!t.d)return r.s?t:r;if(!r.d)return r.s&&(r.s=t.s),r}return r.d[0]?(Ot=!1,t=Rr(t,r,0,e,1).times(r),Ot=!0,yt(t)):(r.s=t.s,t=r),t};Ve.toNumber=function(){return+this};Ve.toOctal=function(r,e){return qN(this,8,r,e)};Ve.toPower=Ve.pow=function(r){var e,t,n,s,i,a,u=this,c=u.constructor,l=+(r=new c(r));if(!u.d||!r.d||!u.d[0]||!r.d[0])return new c(_n(+u,l));if(u=new c(u),u.eq(1))return u;if(n=c.precision,i=c.rounding,r.eq(1))return yt(u,n,i);if(e=fs(r.e/Ct),e>=r.d.length-1&&(t=l<0?-l:l)<=bY)return s=yk(c,u,t,n),r.s<0?new c(1).div(s):yt(s,n,i);if(a=u.s,a<0){if(e<r.d.length-1)return new c(NaN);if((r.d[e]&1)==0&&(a=1),u.e==0&&u.d[0]==1&&u.d.length==1)return u.s=a,u}return t=_n(+u,l),e=t==0||!isFinite(t)?fs(l*(Math.log("0."+zn(u.d))/Math.LN10+u.e+1)):new c(t+"").e,e>c.maxE+1||e<c.minE-1?new c(e>0?a/0:0):(Ot=!1,c.rounding=u.s=1,t=Math.min(12,(e+"").length),s=MN(r.times(qu(u,n+t)),n),s.d&&(s=yt(s,n+5,1),Ag(s.d,n,i)&&(e=n+10,s=yt(MN(r.times(qu(u,e+t)),e),e+5,1),+zn(s.d).slice(n+1,n+15)+1==1e14&&(s=yt(s,n+1,0)))),s.s=a,Ot=!0,c.rounding=i,yt(s,n,i))};Ve.toPrecision=function(r,e){var t,n=this,s=n.constructor;return r===void 0?t=Fa(n,n.e<=s.toExpNeg||n.e>=s.toExpPos):(Ls(r,1,Ku),e===void 0?e=s.rounding:Ls(e,0,8),n=yt(new s(n),r,e),t=Fa(n,r<=n.e||n.e<=s.toExpNeg,r)),n.isNeg()&&!n.isZero()?"-"+t:t};Ve.toSignificantDigits=Ve.toSD=function(r,e){var t=this,n=t.constructor;return r===void 0?(r=n.precision,e=n.rounding):(Ls(r,1,Ku),e===void 0?e=n.rounding:Ls(e,0,8)),yt(new n(t),r,e)};Ve.toString=function(){var r=this,e=r.constructor,t=Fa(r,r.e<=e.toExpNeg||r.e>=e.toExpPos);return r.isNeg()&&!r.isZero()?"-"+t:t};Ve.truncated=Ve.trunc=function(){return yt(new this.constructor(this),this.e+1,1)};Ve.valueOf=Ve.toJSON=function(){var r=this,e=r.constructor,t=Fa(r,r.e<=e.toExpNeg||r.e>=e.toExpPos);return r.isNeg()?"-"+t:t};function zn(r){var e,t,n,s=r.length-1,i="",a=r[0];if(s>0){for(i+=a,e=1;e<s;e++)n=r[e]+"",t=Ct-n.length,t&&(i+=Mu(t)),i+=n;a=r[e],n=a+"",t=Ct-n.length,t&&(i+=Mu(t))}else if(a===0)return"0";for(;a%10===0;)a/=10;return i+a}o(zn,"digitsToString");function Ls(r,e,t){if(r!==~~r||r<e||r>t)throw Error(Hu+r)}o(Ls,"checkInt32");function Ag(r,e,t,n){var s,i,a,u;for(i=r[0];i>=10;i/=10)--e;return--e<0?(e+=Ct,s=0):(s=Math.ceil((e+1)/Ct),e%=Ct),i=_n(10,Ct-e),u=r[s]%i|0,n==null?e<3?(e==0?u=u/100|0:e==1&&(u=u/10|0),a=t<4&&u==99999||t>3&&u==49999||u==5e4||u==0):a=(t<4&&u+1==i||t>3&&u+1==i/2)&&(r[s+1]/i/100|0)==_n(10,e-2)-1||(u==i/2||u==0)&&(r[s+1]/i/100|0)==0:e<4?(e==0?u=u/1e3|0:e==1?u=u/100|0:e==2&&(u=u/10|0),a=(n||t<4)&&u==9999||!n&&t>3&&u==4999):a=((n||t<4)&&u+1==i||!n&&t>3&&u+1==i/2)&&(r[s+1]/i/1e3|0)==_n(10,e-3)-1,a}o(Ag,"checkRoundingDigits");function Hw(r,e,t){for(var n,s=[0],i,a=0,u=r.length;a<u;){for(i=s.length;i--;)s[i]*=e;for(s[0]+=UN.indexOf(r.charAt(a++)),n=0;n<s.length;n++)s[n]>t-1&&(s[n+1]===void 0&&(s[n+1]=0),s[n+1]+=s[n]/t|0,s[n]%=t)}return s.reverse()}o(Hw,"convertBase");function CY(r,e){var t,n,s;if(e.isZero())return e;n=e.d.length,n<32?(t=Math.ceil(n/3),s=(1/Jw(4,t)).toString()):(t=16,s="2.3283064365386962890625e-10"),r.precision+=t,e=Tp(r,1,e.times(s),new r(1));for(var i=t;i--;){var a=e.times(e);e=a.times(a).minus(a).times(8).plus(1)}return r.precision-=t,e}o(CY,"cosine");var Rr=(function(){function r(n,s,i){var a,u=0,c=n.length;for(n=n.slice();c--;)a=n[c]*s+u,n[c]=a%i|0,u=a/i|0;return u&&n.unshift(u),n}o(r,"multiplyInteger");function e(n,s,i,a){var u,c;if(i!=a)c=i>a?1:-1;else for(u=c=0;u<i;u++)if(n[u]!=s[u]){c=n[u]>s[u]?1:-1;break}return c}o(e,"compare");function t(n,s,i,a){for(var u=0;i--;)n[i]-=u,u=n[i]<s[i]?1:0,n[i]=u*a+n[i]-s[i];for(;!n[0]&&n.length>1;)n.shift()}return o(t,"subtract"),function(n,s,i,a,u,c){var l,h,m,g,y,v,E,w,C,_,b,A,T,B,M,I,H,K,q,W,he=n.constructor,pe=n.s==s.s?1:-1,ue=n.d,Y=s.d;if(!ue||!ue[0]||!Y||!Y[0])return new he(!n.s||!s.s||(ue?Y&&ue[0]==Y[0]:!Y)?NaN:ue&&ue[0]==0||!Y?pe*0:pe/0);for(c?(y=1,h=n.e-s.e):(c=ua,y=Ct,h=fs(n.e/y)-fs(s.e/y)),q=Y.length,H=ue.length,C=new he(pe),_=C.d=[],m=0;Y[m]==(ue[m]||0);m++);if(Y[m]>(ue[m]||0)&&h--,i==null?(B=i=he.precision,a=he.rounding):u?B=i+(n.e-s.e)+1:B=i,B<0)_.push(1),v=!0;else{if(B=B/y+2|0,m=0,q==1){for(g=0,Y=Y[0],B++;(m<H||g)&&B--;m++)M=g*c+(ue[m]||0),_[m]=M/Y|0,g=M%Y|0;v=g||m<H}else{for(g=c/(Y[0]+1)|0,g>1&&(Y=r(Y,g,c),ue=r(ue,g,c),q=Y.length,H=ue.length),I=q,b=ue.slice(0,q),A=b.length;A<q;)b[A++]=0;W=Y.slice(),W.unshift(0),K=Y[0],Y[1]>=c/2&&++K;do g=0,l=e(Y,b,q,A),l<0?(T=b[0],q!=A&&(T=T*c+(b[1]||0)),g=T/K|0,g>1?(g>=c&&(g=c-1),E=r(Y,g,c),w=E.length,A=b.length,l=e(E,b,w,A),l==1&&(g--,t(E,q<w?W:Y,w,c))):(g==0&&(l=g=1),E=Y.slice()),w=E.length,w<A&&E.unshift(0),t(b,E,A,c),l==-1&&(A=b.length,l=e(Y,b,q,A),l<1&&(g++,t(b,q<A?W:Y,A,c))),A=b.length):l===0&&(g++,b=[0]),_[m++]=g,l&&b[0]?b[A++]=ue[I]||0:(b=[ue[I]],A=1);while((I++<H||b[0]!==void 0)&&B--);v=b[0]!==void 0}_[0]||_.shift()}if(y==1)C.e=h,hk=v;else{for(m=1,g=_[0];g>=10;g/=10)m++;C.e=m+h*y-1,yt(C,u?i+C.e+1:i,a,v)}return C}})();function yt(r,e,t,n){var s,i,a,u,c,l,h,m,g,y=r.constructor;e:if(e!=null){if(m=r.d,!m)return r;for(s=1,u=m[0];u>=10;u/=10)s++;if(i=e-s,i<0)i+=Ct,a=e,h=m[g=0],c=h/_n(10,s-a-1)%10|0;else if(g=Math.ceil((i+1)/Ct),u=m.length,g>=u)if(n){for(;u++<=g;)m.push(0);h=c=0,s=1,i%=Ct,a=i-Ct+1}else break e;else{for(h=u=m[g],s=1;u>=10;u/=10)s++;i%=Ct,a=i-Ct+s,c=a<0?0:h/_n(10,s-a-1)%10|0}if(n=n||e<0||m[g+1]!==void 0||(a<0?h:h%_n(10,s-a-1)),l=t<4?(c||n)&&(t==0||t==(r.s<0?3:2)):c>5||c==5&&(t==4||n||t==6&&(i>0?a>0?h/_n(10,s-a):0:m[g-1])%10&1||t==(r.s<0?8:7)),e<1||!m[0])return m.length=0,l?(e-=r.e+1,m[0]=_n(10,(Ct-e%Ct)%Ct),r.e=-e||0):m[0]=r.e=0,r;if(i==0?(m.length=g,u=1,g--):(m.length=g+1,u=_n(10,Ct-i),m[g]=a>0?(h/_n(10,s-a)%_n(10,a)|0)*u:0),l)for(;;)if(g==0){for(i=1,a=m[0];a>=10;a/=10)i++;for(a=m[0]+=u,u=1;a>=10;a/=10)u++;i!=u&&(r.e++,m[0]==ua&&(m[0]=1));break}else{if(m[g]+=u,m[g]!=ua)break;m[g--]=0,u=1}for(i=m.length;m[--i]===0;)m.pop()}return Ot&&(r.e>y.maxE?(r.d=null,r.e=NaN):r.e<y.minE&&(r.e=0,r.d=[0])),r}o(yt,"finalise");function Fa(r,e,t){if(!r.isFinite())return wk(r);var n,s=r.e,i=zn(r.d),a=i.length;return e?(t&&(n=t-a)>0?i=i.charAt(0)+"."+i.slice(1)+Mu(n):a>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(r.e<0?"e":"e+")+r.e):s<0?(i="0."+Mu(-s-1)+i,t&&(n=t-a)>0&&(i+=Mu(n))):s>=a?(i+=Mu(s+1-a),t&&(n=t-s-1)>0&&(i=i+"."+Mu(n))):((n=s+1)<a&&(i=i.slice(0,n)+"."+i.slice(n)),t&&(n=t-a)>0&&(s+1===a&&(i+="."),i+=Mu(n))),i}o(Fa,"finiteToString");function zw(r,e){var t=r[0];for(e*=Ct;t>=10;t/=10)e++;return e}o(zw,"getBase10Exponent");function Xw(r,e,t){if(e>AY)throw Ot=!0,t&&(r.precision=t),Error(pk);return yt(new r($w),e,1,!0)}o(Xw,"getLn10");function ja(r,e,t){if(e>FN)throw Error(pk);return yt(new r(Gw),e,t,!0)}o(ja,"getPi");function vk(r){var e=r.length-1,t=e*Ct+1;if(e=r[e],e){for(;e%10==0;e/=10)t--;for(e=r[0];e>=10;e/=10)t++}return t}o(vk,"getPrecision");function Mu(r){for(var e="";r--;)e+="0";return e}o(Mu,"getZeroString");function yk(r,e,t,n){var s,i=new r(1),a=Math.ceil(n/Ct+4);for(Ot=!1;;){if(t%2&&(i=i.times(e),lk(i.d,a)&&(s=!0)),t=fs(t/2),t===0){t=i.d.length-1,s&&i.d[t]===0&&++i.d[t];break}e=e.times(e),lk(e.d,a)}return Ot=!0,i}o(yk,"intPow");function ck(r){return r.d[r.d.length-1]&1}o(ck,"isOdd");function xk(r,e,t){for(var n,s,i=new r(e[0]),a=0;++a<e.length;){if(s=new r(e[a]),!s.s){i=s;break}n=i.cmp(s),(n===t||n===0&&i.s===t)&&(i=s)}return i}o(xk,"maxOrMin");function MN(r,e){var t,n,s,i,a,u,c,l=0,h=0,m=0,g=r.constructor,y=g.rounding,v=g.precision;if(!r.d||!r.d[0]||r.e>17)return new g(r.d?r.d[0]?r.s<0?0:1/0:1:r.s?r.s<0?0:r:NaN);for(e==null?(Ot=!1,c=v):c=e,u=new g(.03125);r.e>-2;)r=r.times(u),m+=5;for(n=Math.log(_n(2,m))/Math.LN10*2+5|0,c+=n,t=i=a=new g(1),g.precision=c;;){if(i=yt(i.times(r),c,1),t=t.times(++h),u=a.plus(Rr(i,t,c,1)),zn(u.d).slice(0,c)===zn(a.d).slice(0,c)){for(s=m;s--;)a=yt(a.times(a),c,1);if(e==null)if(l<3&&Ag(a.d,c-n,y,l))g.precision=c+=10,t=i=u=new g(1),h=0,l++;else return yt(a,g.precision=v,y,Ot=!0);else return g.precision=v,a}a=u}}o(MN,"naturalExponential");function qu(r,e){var t,n,s,i,a,u,c,l,h,m,g,y=1,v=10,E=r,w=E.d,C=E.constructor,_=C.rounding,b=C.precision;if(E.s<0||!w||!w[0]||!E.e&&w[0]==1&&w.length==1)return new C(w&&!w[0]?-1/0:E.s!=1?NaN:w?0:E);if(e==null?(Ot=!1,h=b):h=e,C.precision=h+=v,t=zn(w),n=t.charAt(0),Math.abs(i=E.e)<15e14){for(;n<7&&n!=1||n==1&&t.charAt(1)>3;)E=E.times(r),t=zn(E.d),n=t.charAt(0),y++;i=E.e,n>1?(E=new C("0."+t),i++):E=new C(n+"."+t.slice(1))}else return l=Xw(C,h+2,b).times(i+""),E=qu(new C(n+"."+t.slice(1)),h-v).plus(l),C.precision=b,e==null?yt(E,b,_,Ot=!0):E;for(m=E,c=a=E=Rr(E.minus(1),E.plus(1),h,1),g=yt(E.times(E),h,1),s=3;;){if(a=yt(a.times(g),h,1),l=c.plus(Rr(a,new C(s),h,1)),zn(l.d).slice(0,h)===zn(c.d).slice(0,h))if(c=c.times(2),i!==0&&(c=c.plus(Xw(C,h+2,b).times(i+""))),c=Rr(c,new C(y),h,1),e==null)if(Ag(c.d,h-v,_,u))C.precision=h+=v,l=a=E=Rr(m.minus(1),m.plus(1),h,1),g=yt(E.times(E),h,1),s=u=1;else return yt(c,C.precision=b,_,Ot=!0);else return C.precision=b,c;c=l,s+=2}}o(qu,"naturalLogarithm");function wk(r){return String(r.s*r.s/0)}o(wk,"nonFiniteToString");function Kw(r,e){var t,n,s;for((t=e.indexOf("."))>-1&&(e=e.replace(".","")),(n=e.search(/e/i))>0?(t<0&&(t=n),t+=+e.slice(n+1),e=e.substring(0,n)):t<0&&(t=e.length),n=0;e.charCodeAt(n)===48;n++);for(s=e.length;e.charCodeAt(s-1)===48;--s);if(e=e.slice(n,s),e){if(s-=n,r.e=t=t-n-1,r.d=[],n=(t+1)%Ct,t<0&&(n+=Ct),n<s){for(n&&r.d.push(+e.slice(0,n)),s-=Ct;n<s;)r.d.push(+e.slice(n,n+=Ct));e=e.slice(n),n=Ct-e.length}else n-=s;for(;n--;)e+="0";r.d.push(+e),Ot&&(r.e>r.constructor.maxE?(r.d=null,r.e=NaN):r.e<r.constructor.minE&&(r.e=0,r.d=[0]))}else r.e=0,r.d=[0];return r}o(Kw,"parseDecimal");function NY(r,e){var t,n,s,i,a,u,c,l,h;if(e.indexOf("_")>-1){if(e=e.replace(/(\d)_(?=\d)/g,"$1"),gk.test(e))return Kw(r,e)}else if(e==="Infinity"||e==="NaN")return+e||(r.s=NaN),r.e=NaN,r.d=null,r;if(EY.test(e))t=16,e=e.toLowerCase();else if(wY.test(e))t=2;else if(SY.test(e))t=8;else throw Error(Hu+e);for(i=e.search(/p/i),i>0?(c=+e.slice(i+1),e=e.substring(2,i)):e=e.slice(2),i=e.indexOf("."),a=i>=0,n=r.constructor,a&&(e=e.replace(".",""),u=e.length,i=u-i,s=yk(n,new n(t),i,i*2)),l=Hw(e,t,ua),h=l.length-1,i=h;l[i]===0;--i)l.pop();return i<0?new n(r.s*0):(r.e=zw(l,h),r.d=l,Ot=!1,a&&(r=Rr(r,s,u*4)),c&&(r=r.times(Math.abs(c)<54?_n(2,c):Ip.pow(2,c))),Ot=!0,r)}o(NY,"parseOther");function TY(r,e){var t,n=e.d.length;if(n<3)return e.isZero()?e:Tp(r,2,e,e);t=1.4*Math.sqrt(n),t=t>16?16:t|0,e=e.times(1/Jw(5,t)),e=Tp(r,2,e,e);for(var s,i=new r(5),a=new r(16),u=new r(20);t--;)s=e.times(e),e=e.times(i.plus(s.times(a.times(s).minus(u))));return e}o(TY,"sine");function Tp(r,e,t,n,s){var i,a,u,c,l=1,h=r.precision,m=Math.ceil(h/Ct);for(Ot=!1,c=t.times(t),u=new r(n);;){if(a=Rr(u.times(c),new r(e++*e++),h,1),u=s?n.plus(a):n.minus(a),n=Rr(a.times(c),new r(e++*e++),h,1),a=u.plus(n),a.d[m]!==void 0){for(i=m;a.d[i]===u.d[i]&&i--;);if(i==-1)break}i=u,u=n,n=a,a=i,l++}return Ot=!0,a.d.length=m+1,a}o(Tp,"taylorSeries");function Jw(r,e){for(var t=r;--e;)t*=r;return t}o(Jw,"tinyPow");function Ek(r,e){var t,n=e.s<0,s=ja(r,r.precision,1),i=s.times(.5);if(e=e.abs(),e.lte(i))return Uo=n?4:1,e;if(t=e.divToInt(s),t.isZero())Uo=n?3:2;else{if(e=e.minus(t.times(s)),e.lte(i))return Uo=ck(t)?n?2:3:n?4:1,e;Uo=ck(t)?n?1:4:n?3:2}return e.minus(s).abs()}o(Ek,"toLessThanHalfPi");function qN(r,e,t,n){var s,i,a,u,c,l,h,m,g,y=r.constructor,v=t!==void 0;if(v?(Ls(t,1,Ku),n===void 0?n=y.rounding:Ls(n,0,8)):(t=y.precision,n=y.rounding),!r.isFinite())h=wk(r);else{for(h=Fa(r),a=h.indexOf("."),v?(s=2,e==16?t=t*4-3:e==8&&(t=t*3-2)):s=e,a>=0&&(h=h.replace(".",""),g=new y(1),g.e=h.length-a,g.d=Hw(Fa(g),10,s),g.e=g.d.length),m=Hw(h,10,s),i=c=m.length;m[--c]==0;)m.pop();if(!m[0])h=v?"0p+0":"0";else{if(a<0?i--:(r=new y(r),r.d=m,r.e=i,r=Rr(r,g,t,n,0,s),m=r.d,i=r.e,l=hk),a=m[t],u=s/2,l=l||m[t+1]!==void 0,l=n<4?(a!==void 0||l)&&(n===0||n===(r.s<0?3:2)):a>u||a===u&&(n===4||l||n===6&&m[t-1]&1||n===(r.s<0?8:7)),m.length=t,l)for(;++m[--t]>s-1;)m[t]=0,t||(++i,m.unshift(1));for(c=m.length;!m[c-1];--c);for(a=0,h="";a<c;a++)h+=UN.charAt(m[a]);if(v){if(c>1)if(e==16||e==8){for(a=e==16?4:3,--c;c%a;c++)h+="0";for(m=Hw(h,s,e),c=m.length;!m[c-1];--c);for(a=1,h="1.";a<c;a++)h+=UN.charAt(m[a])}else h=h.charAt(0)+"."+h.slice(1);h=h+(i<0?"p":"p+")+i}else if(i<0){for(;++i;)h="0"+h;h="0."+h}else if(++i>c)for(i-=c;i--;)h+="0";else i<c&&(h=h.slice(0,i)+"."+h.slice(i))}h=(e==16?"0x":e==2?"0b":e==8?"0o":"")+h}return r.s<0?"-"+h:h}o(qN,"toStringBinary");function lk(r,e){if(r.length>e)return r.length=e,!0}o(lk,"truncate");function IY(r){return new this(r).abs()}o(IY,"abs");function _Y(r){return new this(r).acos()}o(_Y,"acos");function DY(r){return new this(r).acosh()}o(DY,"acosh");function BY(r,e){return new this(r).plus(e)}o(BY,"add");function RY(r){return new this(r).asin()}o(RY,"asin");function OY(r){return new this(r).asinh()}o(OY,"asinh");function PY(r){return new this(r).atan()}o(PY,"atan");function kY(r){return new this(r).atanh()}o(kY,"atanh");function LY(r,e){r=new this(r),e=new this(e);var t,n=this.precision,s=this.rounding,i=n+4;return!r.s||!e.s?t=new this(NaN):!r.d&&!e.d?(t=ja(this,i,1).times(e.s>0?.25:.75),t.s=r.s):!e.d||r.isZero()?(t=e.s<0?ja(this,n,s):new this(0),t.s=r.s):!r.d||e.isZero()?(t=ja(this,i,1).times(.5),t.s=r.s):e.s<0?(this.precision=i,this.rounding=1,t=this.atan(Rr(r,e,i,1)),e=ja(this,i,1),this.precision=n,this.rounding=s,t=r.s<0?t.minus(e):t.plus(e)):t=this.atan(Rr(r,e,i,1)),t}o(LY,"atan2");function VY(r){return new this(r).cbrt()}o(VY,"cbrt");function UY(r){return yt(r=new this(r),r.e+1,2)}o(UY,"ceil");function jY(r,e,t){return new this(r).clamp(e,t)}o(jY,"clamp");function FY(r){if(!r||typeof r!="object")throw Error(Ww+"Object expected");var e,t,n,s=r.defaults===!0,i=["precision",1,Ku,"rounding",0,8,"toExpNeg",-Np,0,"toExpPos",0,Np,"maxE",0,Np,"minE",-Np,0,"modulo",0,9];for(e=0;e<i.length;e+=3)if(t=i[e],s&&(this[t]=jN[t]),(n=r[t])!==void 0)if(fs(n)===n&&n>=i[e+1]&&n<=i[e+2])this[t]=n;else throw Error(Hu+t+": "+n);if(t="crypto",s&&(this[t]=jN[t]),(n=r[t])!==void 0)if(n===!0||n===!1||n===0||n===1)if(n)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[t]=!0;else throw Error(dk);else this[t]=!1;else throw Error(Hu+t+": "+n);return this}o(FY,"config");function MY(r){return new this(r).cos()}o(MY,"cos");function qY(r){return new this(r).cosh()}o(qY,"cosh");function Sk(r){var e,t,n;function s(i){var a,u,c,l=this;if(!(l instanceof s))return new s(i);if(l.constructor=s,fk(i)){l.s=i.s,Ot?!i.d||i.e>s.maxE?(l.e=NaN,l.d=null):i.e<s.minE?(l.e=0,l.d=[0]):(l.e=i.e,l.d=i.d.slice()):(l.e=i.e,l.d=i.d?i.d.slice():i.d);return}if(c=typeof i,c==="number"){if(i===0){l.s=1/i<0?-1:1,l.e=0,l.d=[0];return}if(i<0?(i=-i,l.s=-1):l.s=1,i===~~i&&i<1e7){for(a=0,u=i;u>=10;u/=10)a++;Ot?a>s.maxE?(l.e=NaN,l.d=null):a<s.minE?(l.e=0,l.d=[0]):(l.e=a,l.d=[i]):(l.e=a,l.d=[i]);return}if(i*0!==0){i||(l.s=NaN),l.e=NaN,l.d=null;return}return Kw(l,i.toString())}if(c==="string")return(u=i.charCodeAt(0))===45?(i=i.slice(1),l.s=-1):(u===43&&(i=i.slice(1)),l.s=1),gk.test(i)?Kw(l,i):NY(l,i);if(c==="bigint")return i<0?(i=-i,l.s=-1):l.s=1,Kw(l,i.toString());throw Error(Hu+i)}if(o(s,"Decimal"),s.prototype=Ve,s.ROUND_UP=0,s.ROUND_DOWN=1,s.ROUND_CEIL=2,s.ROUND_FLOOR=3,s.ROUND_HALF_UP=4,s.ROUND_HALF_DOWN=5,s.ROUND_HALF_EVEN=6,s.ROUND_HALF_CEIL=7,s.ROUND_HALF_FLOOR=8,s.EUCLID=9,s.config=s.set=FY,s.clone=Sk,s.isDecimal=fk,s.abs=IY,s.acos=_Y,s.acosh=DY,s.add=BY,s.asin=RY,s.asinh=OY,s.atan=PY,s.atanh=kY,s.atan2=LY,s.cbrt=VY,s.ceil=UY,s.clamp=jY,s.cos=MY,s.cosh=qY,s.div=HY,s.exp=KY,s.floor=$Y,s.hypot=GY,s.ln=XY,s.log=WY,s.log10=JY,s.log2=zY,s.max=YY,s.min=QY,s.mod=ZY,s.mul=eQ,s.pow=tQ,s.random=rQ,s.round=nQ,s.sign=sQ,s.sin=iQ,s.sinh=aQ,s.sqrt=oQ,s.sub=uQ,s.sum=cQ,s.tan=lQ,s.tanh=fQ,s.trunc=hQ,r===void 0&&(r={}),r&&r.defaults!==!0)for(n=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],e=0;e<n.length;)r.hasOwnProperty(t=n[e++])||(r[t]=this[t]);return s.config(r),s}o(Sk,"clone");function HY(r,e){return new this(r).div(e)}o(HY,"div");function KY(r){return new this(r).exp()}o(KY,"exp");function $Y(r){return yt(r=new this(r),r.e+1,3)}o($Y,"floor");function GY(){var r,e,t=new this(0);for(Ot=!1,r=0;r<arguments.length;)if(e=new this(arguments[r++]),e.d)t.d&&(t=t.plus(e.times(e)));else{if(e.s)return Ot=!0,new this(1/0);t=e}return Ot=!0,t.sqrt()}o(GY,"hypot");function fk(r){return r instanceof Ip||r&&r.toStringTag===mk||!1}o(fk,"isDecimalInstance");function XY(r){return new this(r).ln()}o(XY,"ln");function WY(r,e){return new this(r).log(e)}o(WY,"log");function zY(r){return new this(r).log(2)}o(zY,"log2");function JY(r){return new this(r).log(10)}o(JY,"log10");function YY(){return xk(this,arguments,-1)}o(YY,"max");function QY(){return xk(this,arguments,1)}o(QY,"min");function ZY(r,e){return new this(r).mod(e)}o(ZY,"mod");function eQ(r,e){return new this(r).mul(e)}o(eQ,"mul");function tQ(r,e){return new this(r).pow(e)}o(tQ,"pow");function rQ(r){var e,t,n,s,i=0,a=new this(1),u=[];if(r===void 0?r=this.precision:Ls(r,1,Ku),n=Math.ceil(r/Ct),this.crypto)if(crypto.getRandomValues)for(e=crypto.getRandomValues(new Uint32Array(n));i<n;)s=e[i],s>=429e7?e[i]=crypto.getRandomValues(new Uint32Array(1))[0]:u[i++]=s%1e7;else if(crypto.randomBytes){for(e=crypto.randomBytes(n*=4);i<n;)s=e[i]+(e[i+1]<<8)+(e[i+2]<<16)+((e[i+3]&127)<<24),s>=214e7?crypto.randomBytes(4).copy(e,i):(u.push(s%1e7),i+=4);i=n/4}else throw Error(dk);else for(;i<n;)u[i++]=Math.random()*1e7|0;for(n=u[--i],r%=Ct,n&&r&&(s=_n(10,Ct-r),u[i]=(n/s|0)*s);u[i]===0;i--)u.pop();if(i<0)t=0,u=[0];else{for(t=-1;u[0]===0;t-=Ct)u.shift();for(n=1,s=u[0];s>=10;s/=10)n++;n<Ct&&(t-=Ct-n)}return a.e=t,a.d=u,a}o(rQ,"random");function nQ(r){return yt(r=new this(r),r.e+1,this.rounding)}o(nQ,"round");function sQ(r){return r=new this(r),r.d?r.d[0]?r.s:0*r.s:r.s||NaN}o(sQ,"sign");function iQ(r){return new this(r).sin()}o(iQ,"sin");function aQ(r){return new this(r).sinh()}o(aQ,"sinh");function oQ(r){return new this(r).sqrt()}o(oQ,"sqrt");function uQ(r,e){return new this(r).sub(e)}o(uQ,"sub");function cQ(){var r=0,e=arguments,t=new this(e[r]);for(Ot=!1;t.s&&++r<e.length;)t=t.plus(e[r]);return Ot=!0,yt(t,this.precision,this.rounding)}o(cQ,"sum");function lQ(r){return new this(r).tan()}o(lQ,"tan");function fQ(r){return new this(r).tanh()}o(fQ,"tanh");function hQ(r){return yt(r=new this(r),r.e+1,1)}o(hQ,"trunc");Ve[Symbol.for("nodejs.util.inspect.custom")]=Ve.toString;Ve[Symbol.toStringTag]="Decimal";var Ip=Ve.constructor=Sk(jN);$w=new Ip($w);Gw=new Ip(Gw);var _p=class r extends Ip{static{o(this,"Decimal")}static from(e){return new r(e)}static newOrZero(e){return e===void 0?r.from(0):r.from(e)}static newOrUndefined(e){if(e!==void 0)return r.from(e)}};import pQ from"pdfkit";var bk=class r{static{o(this,"PdfkitPdfBuilder")}defaults={autoFirstPage:!1};doc=new pQ(this.defaults);constructor(e){e&&this.configure(e)}static new(e){return new r(e)}configure(e){return this.doc.options={...this.doc.options,...e},this}pipe(e){return this.doc.pipe(e),this}end(){return this.doc.end()}restore(){return this.doc.restore(),this}save(){return this.doc.save(),this}stroke(e){return this.doc.stroke(e),this}page(e){return this.doc.addPage(e),this}table(e){return this.doc.table(e),this}text(e,t){let{x:n,y:s,...i}=t??{};return n||s?(this.doc.text(e,n,s,i),this):(this.doc.text(e,t),this)}fontSize(e){return this.doc.fontSize(e),this}font(e,t,n){return typeof t=="string"?(this.doc.font(e,t,n),this):typeof t=="number"?(this.doc.font(e,t),this):(this.doc.font(e),this)}image(e,t,n,s){return typeof t=="number"&&typeof n=="number"?(this.doc.image(e,t,n,s),this):(this.doc.image(e,t),this)}rect(e,t,n,s){return this.doc.rect(e,t,n,s),this}path(e){return this.doc.path(e),this}translate(e,t){return this.doc.translate(e,t),this}scale(e,t){return this.doc.scale(e,t),this}fill(e,t){return this.doc.fill(e,t),this}pageWidth(){return this.doc.page.width}pageHeight(){return this.doc.page.height}heightOfString(e,t){return this.doc.heightOfString(e,t)}widthOfString(e,t){return this.doc.widthOfString(e,t)}pageMargins(){return this.doc.page.margins}currentLineHeight(e){return this.doc.currentLineHeight(e)}x(){return this.doc.x}y(){return this.doc.y}moveDown(e){return this.doc.moveDown(e),this}row(e,...t){let n,s;typeof e=="function"?(n={},s=[e,...t]):(n=e??{},s=t),n.columns??=1;let i=this.y(),a=n.right??0,u=n.left??0,c=n.gap??0,l=this.pageWidth(),h=l-u-a-c*(n.columns-1);n.size??=Array(n.columns).fill(12/n.columns);let m=[];for(let g=0;g<n.columns;g++){let y=n.size[g]/12;m[g]=h*y}for(let g=0,y=u;g<n.columns;g++){let v=g===n.columns-1,E=m[g];if(v&&n.columns>1){let _=l-a-y;_>0&&Math.abs(_-E)>.01&&(E=_)}let w={y:i,x:y,width:E};s[g](w),y+=E,c>0&&!v&&(y+=c)}return this}};var Ak=class{static{o(this,"MemoryCacheAdapter")}cache=new Map;async get(e){return Promise.resolve(this.cache.get(e)??null)}has(e){return Promise.resolve(this.cache.has(e))}set(e,t){return this.cache.set(e,t),Promise.resolve(!0)}};var Yw=class{static{o(this,"NullCacheAdapter")}async get(e){return Promise.resolve(null)}has(e){return Promise.resolve(!1)}set(e,t){return Promise.resolve(!0)}};var Ll=Xl(FL(),1);import rK from"fs";import kge from"path";import v2 from"crypto";var Jte=o(r=>!!r&&typeof r=="object"&&"message"in r,"hasMessageInRecord"),nf=o(r=>typeof r=="string"?ls(new Wr(r)):r instanceof Error?ls(new Wr(r.message,{cause:r.cause})):Jte(r)?ls(new Wr(r.message)):ls(new Wr("unexpected error")),"leftFromError");import"reflect-metadata";var hM=Xl(Zj(),1);import Dpe from"os";import{constants as Bpe}from"crypto";import{Agent as KD}from"https";function bv(r,e){return o(function(){return r.apply(e,arguments)},"wrap")}o(bv,"bind");var{toString:hfe}=Object.prototype,{getPrototypeOf:mD}=Object,{iterator:GS,toStringTag:tF}=Symbol,XS=(r=>e=>{let t=hfe.call(e);return r[t]||(r[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),va=o(r=>(r=r.toLowerCase(),e=>XS(e)===r),"kindOfTest"),WS=o(r=>e=>typeof e===r,"typeOfTest"),{isArray:bd}=Array,Sd=WS("undefined");function Av(r){return r!==null&&!Sd(r)&&r.constructor!==null&&!Sd(r.constructor)&&Ws(r.constructor.isBuffer)&&r.constructor.isBuffer(r)}o(Av,"isBuffer");var rF=va("ArrayBuffer");function pfe(r){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(r):e=r&&r.buffer&&rF(r.buffer),e}o(pfe,"isArrayBufferView");var dfe=WS("string"),Ws=WS("function"),nF=WS("number"),Cv=o(r=>r!==null&&typeof r=="object","isObject"),mfe=o(r=>r===!0||r===!1,"isBoolean"),$S=o(r=>{if(XS(r)!=="object")return!1;let e=mD(r);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(tF in r)&&!(GS in r)},"isPlainObject"),gfe=o(r=>{if(!Cv(r)||Av(r))return!1;try{return Object.keys(r).length===0&&Object.getPrototypeOf(r)===Object.prototype}catch{return!1}},"isEmptyObject"),vfe=va("Date"),yfe=va("File"),xfe=va("Blob"),wfe=va("FileList"),Efe=o(r=>Cv(r)&&Ws(r.pipe),"isStream"),Sfe=o(r=>{let e;return r&&(typeof FormData=="function"&&r instanceof FormData||Ws(r.append)&&((e=XS(r))==="formdata"||e==="object"&&Ws(r.toString)&&r.toString()==="[object FormData]"))},"isFormData"),bfe=va("URLSearchParams"),[Afe,Cfe,Nfe,Tfe]=["ReadableStream","Request","Response","Headers"].map(va),Ife=o(r=>r.trim?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),"trim");function Nv(r,e,{allOwnKeys:t=!1}={}){if(r===null||typeof r>"u")return;let n,s;if(typeof r!="object"&&(r=[r]),bd(r))for(n=0,s=r.length;n<s;n++)e.call(null,r[n],n,r);else{if(Av(r))return;let i=t?Object.getOwnPropertyNames(r):Object.keys(r),a=i.length,u;for(n=0;n<a;n++)u=i[n],e.call(null,r[u],u,r)}}o(Nv,"forEach");function sF(r,e){if(Av(r))return null;e=e.toLowerCase();let t=Object.keys(r),n=t.length,s;for(;n-- >0;)if(s=t[n],e===s.toLowerCase())return s;return null}o(sF,"findKey");var vf=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,iF=o(r=>!Sd(r)&&r!==vf,"isContextDefined");function dD(){let{caseless:r,skipUndefined:e}=iF(this)&&this||{},t={},n=o((s,i)=>{if(i==="__proto__"||i==="constructor"||i==="prototype")return;let a=r&&sF(t,i)||i;$S(t[a])&&$S(s)?t[a]=dD(t[a],s):$S(s)?t[a]=dD({},s):bd(s)?t[a]=s.slice():(!e||!Sd(s))&&(t[a]=s)},"assignValue");for(let s=0,i=arguments.length;s<i;s++)arguments[s]&&Nv(arguments[s],n);return t}o(dD,"merge");var _fe=o((r,e,t,{allOwnKeys:n}={})=>(Nv(e,(s,i)=>{t&&Ws(s)?Object.defineProperty(r,i,{value:bv(s,t),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(r,i,{value:s,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:n}),r),"extend"),Dfe=o(r=>(r.charCodeAt(0)===65279&&(r=r.slice(1)),r),"stripBOM"),Bfe=o((r,e,t,n)=>{r.prototype=Object.create(e.prototype,n),Object.defineProperty(r.prototype,"constructor",{value:r,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(r,"super",{value:e.prototype}),t&&Object.assign(r.prototype,t)},"inherits"),Rfe=o((r,e,t,n)=>{let s,i,a,u={};if(e=e||{},r==null)return e;do{for(s=Object.getOwnPropertyNames(r),i=s.length;i-- >0;)a=s[i],(!n||n(a,r,e))&&!u[a]&&(e[a]=r[a],u[a]=!0);r=t!==!1&&mD(r)}while(r&&(!t||t(r,e))&&r!==Object.prototype);return e},"toFlatObject"),Ofe=o((r,e,t)=>{r=String(r),(t===void 0||t>r.length)&&(t=r.length),t-=e.length;let n=r.indexOf(e,t);return n!==-1&&n===t},"endsWith"),Pfe=o(r=>{if(!r)return null;if(bd(r))return r;let e=r.length;if(!nF(e))return null;let t=new Array(e);for(;e-- >0;)t[e]=r[e];return t},"toArray"),kfe=(r=>e=>r&&e instanceof r)(typeof Uint8Array<"u"&&mD(Uint8Array)),Lfe=o((r,e)=>{let n=(r&&r[GS]).call(r),s;for(;(s=n.next())&&!s.done;){let i=s.value;e.call(r,i[0],i[1])}},"forEachEntry"),Vfe=o((r,e)=>{let t,n=[];for(;(t=r.exec(e))!==null;)n.push(t);return n},"matchAll"),Ufe=va("HTMLFormElement"),jfe=o(r=>r.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,o(function(t,n,s){return n.toUpperCase()+s},"replacer")),"toCamelCase"),eF=(({hasOwnProperty:r})=>(e,t)=>r.call(e,t))(Object.prototype),Ffe=va("RegExp"),aF=o((r,e)=>{let t=Object.getOwnPropertyDescriptors(r),n={};Nv(t,(s,i)=>{let a;(a=e(s,i,r))!==!1&&(n[i]=a||s)}),Object.defineProperties(r,n)},"reduceDescriptors"),Mfe=o(r=>{aF(r,(e,t)=>{if(Ws(r)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;let n=r[t];if(Ws(n)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+t+"'")})}})},"freezeMethods"),qfe=o((r,e)=>{let t={},n=o(s=>{s.forEach(i=>{t[i]=!0})},"define");return bd(r)?n(r):n(String(r).split(e)),t},"toObjectSet"),Hfe=o(()=>{},"noop"),Kfe=o((r,e)=>r!=null&&Number.isFinite(r=+r)?r:e,"toFiniteNumber");function $fe(r){return!!(r&&Ws(r.append)&&r[tF]==="FormData"&&r[GS])}o($fe,"isSpecCompliantForm");var Gfe=o(r=>{let e=new Array(10),t=o((n,s)=>{if(Cv(n)){if(e.indexOf(n)>=0)return;if(Av(n))return n;if(!("toJSON"in n)){e[s]=n;let i=bd(n)?[]:{};return Nv(n,(a,u)=>{let c=t(a,s+1);!Sd(c)&&(i[u]=c)}),e[s]=void 0,i}}return n},"visit");return t(r,0)},"toJSONObject"),Xfe=va("AsyncFunction"),Wfe=o(r=>r&&(Cv(r)||Ws(r))&&Ws(r.then)&&Ws(r.catch),"isThenable"),oF=((r,e)=>r?setImmediate:e?((t,n)=>(vf.addEventListener("message",({source:s,data:i})=>{s===vf&&i===t&&n.length&&n.shift()()},!1),s=>{n.push(s),vf.postMessage(t,"*")}))(`axios@${Math.random()}`,[]):t=>setTimeout(t))(typeof setImmediate=="function",Ws(vf.postMessage)),zfe=typeof queueMicrotask<"u"?queueMicrotask.bind(vf):typeof process<"u"&&process.nextTick||oF,Jfe=o(r=>r!=null&&Ws(r[GS]),"isIterable"),ie={isArray:bd,isArrayBuffer:rF,isBuffer:Av,isFormData:Sfe,isArrayBufferView:pfe,isString:dfe,isNumber:nF,isBoolean:mfe,isObject:Cv,isPlainObject:$S,isEmptyObject:gfe,isReadableStream:Afe,isRequest:Cfe,isResponse:Nfe,isHeaders:Tfe,isUndefined:Sd,isDate:vfe,isFile:yfe,isBlob:xfe,isRegExp:Ffe,isFunction:Ws,isStream:Efe,isURLSearchParams:bfe,isTypedArray:kfe,isFileList:wfe,forEach:Nv,merge:dD,extend:_fe,trim:Ife,stripBOM:Dfe,inherits:Bfe,toFlatObject:Rfe,kindOf:XS,kindOfTest:va,endsWith:Ofe,toArray:Pfe,forEachEntry:Lfe,matchAll:Vfe,isHTMLForm:Ufe,hasOwnProperty:eF,hasOwnProp:eF,reduceDescriptors:aF,freezeMethods:Mfe,toObjectSet:qfe,toCamelCase:jfe,noop:Hfe,toFiniteNumber:Kfe,findKey:sF,global:vf,isContextDefined:iF,isSpecCompliantForm:$fe,toJSONObject:Gfe,isAsyncFn:Xfe,isThenable:Wfe,setImmediate:oF,asap:zfe,isIterable:Jfe};var pi=class uF extends Error{static{o(this,"AxiosError")}static from(e,t,n,s,i,a){let u=new uF(e.message,t||e.code,n,s,i);return u.cause=e,u.name=e.name,a&&Object.assign(u,a),u}constructor(e,t,n,s,i){super(e),this.name="AxiosError",this.isAxiosError=!0,t&&(this.code=t),n&&(this.config=n),s&&(this.request=s),i&&(this.response=i,this.status=i.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:ie.toJSONObject(this.config),code:this.code,status:this.status}}};pi.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";pi.ERR_BAD_OPTION="ERR_BAD_OPTION";pi.ECONNABORTED="ECONNABORTED";pi.ETIMEDOUT="ETIMEDOUT";pi.ERR_NETWORK="ERR_NETWORK";pi.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";pi.ERR_DEPRECATED="ERR_DEPRECATED";pi.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";pi.ERR_BAD_REQUEST="ERR_BAD_REQUEST";pi.ERR_CANCELED="ERR_CANCELED";pi.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";pi.ERR_INVALID_URL="ERR_INVALID_URL";var Ze=pi;var pF=Xl(hF(),1),zS=pF.default;function wD(r){return ie.isPlainObject(r)||ie.isArray(r)}o(wD,"isVisitable");function mF(r){return ie.endsWith(r,"[]")?r.slice(0,-2):r}o(mF,"removeBrackets");function dF(r,e,t){return r?r.concat(e).map(o(function(s,i){return s=mF(s),!t&&i?"["+s+"]":s},"each")).join(t?".":""):e}o(dF,"renderKey");function ahe(r){return ie.isArray(r)&&!r.some(wD)}o(ahe,"isFlatArray");var ohe=ie.toFlatObject(ie,{},null,o(function(e){return/^is[A-Z]/.test(e)},"filter"));function uhe(r,e,t){if(!ie.isObject(r))throw new TypeError("target must be an object");e=e||new(zS||FormData),t=ie.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,o(function(E,w){return!ie.isUndefined(w[E])},"defined"));let n=t.metaTokens,s=t.visitor||h,i=t.dots,a=t.indexes,c=(t.Blob||typeof Blob<"u"&&Blob)&&ie.isSpecCompliantForm(e);if(!ie.isFunction(s))throw new TypeError("visitor must be a function");function l(v){if(v===null)return"";if(ie.isDate(v))return v.toISOString();if(ie.isBoolean(v))return v.toString();if(!c&&ie.isBlob(v))throw new Ze("Blob is not supported. Use a Buffer instead.");return ie.isArrayBuffer(v)||ie.isTypedArray(v)?c&&typeof Blob=="function"?new Blob([v]):Buffer.from(v):v}o(l,"convertValue");function h(v,E,w){let C=v;if(v&&!w&&typeof v=="object"){if(ie.endsWith(E,"{}"))E=n?E:E.slice(0,-2),v=JSON.stringify(v);else if(ie.isArray(v)&&ahe(v)||(ie.isFileList(v)||ie.endsWith(E,"[]"))&&(C=ie.toArray(v)))return E=mF(E),C.forEach(o(function(b,A){!(ie.isUndefined(b)||b===null)&&e.append(a===!0?dF([E],A,i):a===null?E:E+"[]",l(b))},"each")),!1}return wD(v)?!0:(e.append(dF(w,E,i),l(v)),!1)}o(h,"defaultVisitor");let m=[],g=Object.assign(ohe,{defaultVisitor:h,convertValue:l,isVisitable:wD});function y(v,E){if(!ie.isUndefined(v)){if(m.indexOf(v)!==-1)throw Error("Circular reference detected in "+E.join("."));m.push(v),ie.forEach(v,o(function(C,_){(!(ie.isUndefined(C)||C===null)&&s.call(e,C,ie.isString(_)?_.trim():_,E,g))===!0&&y(C,E?E.concat(_):[_])},"each")),m.pop()}}if(o(y,"build"),!ie.isObject(r))throw new TypeError("data must be an object");return y(r),e}o(uhe,"toFormData");var Sc=uhe;function gF(r){let e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(r).replace(/[!'()~]|%20|%00/g,o(function(n){return e[n]},"replacer"))}o(gF,"encode");function vF(r,e){this._pairs=[],r&&Sc(r,this,e)}o(vF,"AxiosURLSearchParams");var yF=vF.prototype;yF.append=o(function(e,t){this._pairs.push([e,t])},"append");yF.toString=o(function(e){let t=e?function(n){return e.call(this,n,gF)}:gF;return this._pairs.map(o(function(s){return t(s[0])+"="+t(s[1])},"each"),"").join("&")},"toString");var xF=vF;function che(r){return encodeURIComponent(r).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}o(che,"encode");function yf(r,e,t){if(!e)return r;let n=t&&t.encode||che,s=ie.isFunction(t)?{serialize:t}:t,i=s&&s.serialize,a;if(i?a=i(e,s):a=ie.isURLSearchParams(e)?e.toString():new xF(e,s).toString(n),a){let u=r.indexOf("#");u!==-1&&(r=r.slice(0,u)),r+=(r.indexOf("?")===-1?"?":"&")+a}return r}o(yf,"buildURL");var lhe=class{static{o(this,"InterceptorManager")}constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){ie.forEach(this.handlers,o(function(n){n!==null&&e(n)},"forEachHandler"))}},ED=lhe;var bc={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0};import hhe from"crypto";import fhe from"url";var wF=fhe.URLSearchParams;var SD="abcdefghijklmnopqrstuvwxyz",EF="0123456789",SF={DIGIT:EF,ALPHA:SD,ALPHA_DIGIT:SD+SD.toUpperCase()+EF},phe=o((r=16,e=SF.ALPHA_DIGIT)=>{let t="",{length:n}=e,s=new Uint32Array(r);hhe.randomFillSync(s);for(let i=0;i<r;i++)t+=e[s[i]%n];return t},"generateString"),bF={isNode:!0,classes:{URLSearchParams:wF,FormData:zS,Blob:typeof Blob<"u"&&Blob||null},ALPHABET:SF,generateString:phe,protocols:["http","https","file","data"]};var CD={};vY(CD,{hasBrowserEnv:()=>AD,hasStandardBrowserEnv:()=>dhe,hasStandardBrowserWebWorkerEnv:()=>mhe,navigator:()=>bD,origin:()=>ghe});var AD=typeof window<"u"&&typeof document<"u",bD=typeof navigator=="object"&&navigator||void 0,dhe=AD&&(!bD||["ReactNative","NativeScript","NS"].indexOf(bD.product)<0),mhe=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",ghe=AD&&window.location.href||"http://localhost";var wr={...CD,...bF};function ND(r,e){return Sc(r,new wr.classes.URLSearchParams,{visitor:o(function(t,n,s,i){return wr.isNode&&ie.isBuffer(t)?(this.append(n,t.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},"visitor"),...e})}o(ND,"toURLEncodedForm");function vhe(r){return ie.matchAll(/\w+|\[(\w*)]/g,r).map(e=>e[0]==="[]"?"":e[1]||e[0])}o(vhe,"parsePropPath");function yhe(r){let e={},t=Object.keys(r),n,s=t.length,i;for(n=0;n<s;n++)i=t[n],e[i]=r[i];return e}o(yhe,"arrayToObject");function xhe(r){function e(t,n,s,i){let a=t[i++];if(a==="__proto__")return!0;let u=Number.isFinite(+a),c=i>=t.length;return a=!a&&ie.isArray(s)?s.length:a,c?(ie.hasOwnProp(s,a)?s[a]=[s[a],n]:s[a]=n,!u):((!s[a]||!ie.isObject(s[a]))&&(s[a]=[]),e(t,n,s[a],i)&&ie.isArray(s[a])&&(s[a]=yhe(s[a])),!u)}if(o(e,"buildPath"),ie.isFormData(r)&&ie.isFunction(r.entries)){let t={};return ie.forEachEntry(r,(n,s)=>{e(vhe(n),s,t,0)}),t}return null}o(xhe,"formDataToJSON");var JS=xhe;function whe(r,e,t){if(ie.isString(r))try{return(e||JSON.parse)(r),ie.trim(r)}catch(n){if(n.name!=="SyntaxError")throw n}return(t||JSON.stringify)(r)}o(whe,"stringifySafely");var TD={transitional:bc,adapter:["xhr","http","fetch"],transformRequest:[o(function(e,t){let n=t.getContentType()||"",s=n.indexOf("application/json")>-1,i=ie.isObject(e);if(i&&ie.isHTMLForm(e)&&(e=new FormData(e)),ie.isFormData(e))return s?JSON.stringify(JS(e)):e;if(ie.isArrayBuffer(e)||ie.isBuffer(e)||ie.isStream(e)||ie.isFile(e)||ie.isBlob(e)||ie.isReadableStream(e))return e;if(ie.isArrayBufferView(e))return e.buffer;if(ie.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let u;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return ND(e,this.formSerializer).toString();if((u=ie.isFileList(e))||n.indexOf("multipart/form-data")>-1){let c=this.env&&this.env.FormData;return Sc(u?{"files[]":e}:e,c&&new c,this.formSerializer)}}return i||s?(t.setContentType("application/json",!1),whe(e)):e},"transformRequest")],transformResponse:[o(function(e){let t=this.transitional||TD.transitional,n=t&&t.forcedJSONParsing,s=this.responseType==="json";if(ie.isResponse(e)||ie.isReadableStream(e))return e;if(e&&ie.isString(e)&&(n&&!this.responseType||s)){let a=!(t&&t.silentJSONParsing)&&s;try{return JSON.parse(e,this.parseReviver)}catch(u){if(a)throw u.name==="SyntaxError"?Ze.from(u,Ze.ERR_BAD_RESPONSE,this,null,this.response):u}}return e},"transformResponse")],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:wr.classes.FormData,Blob:wr.classes.Blob},validateStatus:o(function(e){return e>=200&&e<300},"validateStatus"),headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ie.forEach(["delete","get","head","post","put","patch"],r=>{TD.headers[r]={}});var Ad=TD;var Ehe=ie.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),AF=o((r=>{let e={},t,n,s;return r&&r.split(`
|
|
100
|
-
`).forEach(o(function(a){s=a.indexOf(":"),t=a.substring(0,s).trim().toLowerCase(),n=a.substring(s+1).trim(),!(!t||e[t]&&Ehe[t])&&(t==="set-cookie"?e[t]?e[t].push(n):e[t]=[n]:e[t]=e[t]?e[t]+", "+n:n)},"parser")),e}),"default");var CF=Symbol("internals");function Tv(r){return r&&String(r).trim().toLowerCase()}o(Tv,"normalizeHeader");function YS(r){return r===!1||r==null?r:ie.isArray(r)?r.map(YS):String(r)}o(YS,"normalizeValue");function She(r){let e=Object.create(null),t=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,n;for(;n=t.exec(r);)e[n[1]]=n[2];return e}o(She,"parseTokens");var bhe=o(r=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(r.trim()),"isValidHeaderName");function ID(r,e,t,n,s){if(ie.isFunction(n))return n.call(this,e,t);if(s&&(e=t),!!ie.isString(e)){if(ie.isString(n))return e.indexOf(n)!==-1;if(ie.isRegExp(n))return n.test(e)}}o(ID,"matchHeaderValue");function Ahe(r){return r.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}o(Ahe,"formatHeader");function Che(r,e){let t=ie.toCamelCase(" "+e);["get","set","has"].forEach(n=>{Object.defineProperty(r,n+t,{value:o(function(s,i,a){return this[n].call(this,e,s,i,a)},"value"),configurable:!0})})}o(Che,"buildAccessors");var QS=class{static{o(this,"AxiosHeaders")}constructor(e){e&&this.set(e)}set(e,t,n){let s=this;function i(u,c,l){let h=Tv(c);if(!h)throw new Error("header name must be a non-empty string");let m=ie.findKey(s,h);(!m||s[m]===void 0||l===!0||l===void 0&&s[m]!==!1)&&(s[m||c]=YS(u))}o(i,"setHeader");let a=o((u,c)=>ie.forEach(u,(l,h)=>i(l,h,c)),"setHeaders");if(ie.isPlainObject(e)||e instanceof this.constructor)a(e,t);else if(ie.isString(e)&&(e=e.trim())&&!bhe(e))a(AF(e),t);else if(ie.isObject(e)&&ie.isIterable(e)){let u={},c,l;for(let h of e){if(!ie.isArray(h))throw TypeError("Object iterator must return a key-value pair");u[l=h[0]]=(c=u[l])?ie.isArray(c)?[...c,h[1]]:[c,h[1]]:h[1]}a(u,t)}else e!=null&&i(t,e,n);return this}get(e,t){if(e=Tv(e),e){let n=ie.findKey(this,e);if(n){let s=this[n];if(!t)return s;if(t===!0)return She(s);if(ie.isFunction(t))return t.call(this,s,n);if(ie.isRegExp(t))return t.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Tv(e),e){let n=ie.findKey(this,e);return!!(n&&this[n]!==void 0&&(!t||ID(this,this[n],n,t)))}return!1}delete(e,t){let n=this,s=!1;function i(a){if(a=Tv(a),a){let u=ie.findKey(n,a);u&&(!t||ID(n,n[u],u,t))&&(delete n[u],s=!0)}}return o(i,"deleteHeader"),ie.isArray(e)?e.forEach(i):i(e),s}clear(e){let t=Object.keys(this),n=t.length,s=!1;for(;n--;){let i=t[n];(!e||ID(this,this[i],i,e,!0))&&(delete this[i],s=!0)}return s}normalize(e){let t=this,n={};return ie.forEach(this,(s,i)=>{let a=ie.findKey(n,i);if(a){t[a]=YS(s),delete t[i];return}let u=e?Ahe(i):String(i).trim();u!==i&&delete t[i],t[u]=YS(s),n[u]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let t=Object.create(null);return ie.forEach(this,(n,s)=>{n!=null&&n!==!1&&(t[s]=e&&ie.isArray(n)?n.join(", "):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join(`
|
|
101
|
-
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){let n=new this(e);return t.forEach(s=>n.set(s)),n}static accessor(e){let n=(this[CF]=this[CF]={accessors:{}}).accessors,s=this.prototype;function i(a){let u=Tv(a);n[u]||(Che(s,a),n[u]=!0)}return o(i,"defineAccessor"),ie.isArray(e)?e.forEach(i):i(e),this}};QS.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);ie.reduceDescriptors(QS.prototype,({value:r},e)=>{let t=e[0].toUpperCase()+e.slice(1);return{get:o(()=>r,"get"),set(n){this[t]=n}}});ie.freezeMethods(QS);var Zr=QS;function Iv(r,e){let t=this||Ad,n=e||t,s=Zr.from(n.headers),i=n.data;return ie.forEach(r,o(function(u){i=u.call(t,i,s.normalize(),e?e.status:void 0)},"transform")),s.normalize(),i}o(Iv,"transformData");function _v(r){return!!(r&&r.__CANCEL__)}o(_v,"isCancel");var Nhe=class extends Ze{static{o(this,"CanceledError")}constructor(e,t,n){super(e??"canceled",Ze.ERR_CANCELED,t,n),this.name="CanceledError",this.__CANCEL__=!0}},di=Nhe;function lo(r,e,t){let n=t.config.validateStatus;!t.status||!n||n(t.status)?r(t):e(new Ze("Request failed with status code "+t.status,[Ze.ERR_BAD_REQUEST,Ze.ERR_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t))}o(lo,"settle");function _D(r){return typeof r!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(r)}o(_D,"isAbsoluteURL");function DD(r,e){return e?r.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):r}o(DD,"combineURLs");function xf(r,e,t){let n=!_D(e);return r&&(n||t==!1)?DD(r,e):e}o(xf,"buildFullPath");var VF=Xl(wI(),1),FF=Xl(OI(),1);import Hhe from"http";import Khe from"https";import UF from"http2";import jF from"util";import Cc from"zlib";var wf="1.13.5";function Dv(r){let e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(r);return e&&e[1]||""}o(Dv,"parseProtocol");var The=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;function BD(r,e,t){let n=t&&t.Blob||wr.classes.Blob,s=Dv(r);if(e===void 0&&n&&(e=!0),s==="data"){r=s.length?r.slice(s.length+1):r;let i=The.exec(r);if(!i)throw new Ze("Invalid URL",Ze.ERR_INVALID_URL);let a=i[1],u=i[2],c=i[3],l=Buffer.from(decodeURIComponent(c),u?"base64":"utf8");if(e){if(!n)throw new Ze("Blob is not supported",Ze.ERR_NOT_SUPPORT);return new n([l],{type:a})}return l}throw new Ze("Unsupported protocol "+s,Ze.ERR_NOT_SUPPORT)}o(BD,"fromDataURI");import Ac from"stream";import Ihe from"stream";var RD=Symbol("internals"),_he=class extends Ihe.Transform{static{o(this,"AxiosTransformStream")}constructor(e){e=ie.toFlatObject(e,{maxRate:0,chunkSize:64*1024,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(n,s)=>!ie.isUndefined(s[n])),super({readableHighWaterMark:e.chunkSize});let t=this[RD]={timeWindow:e.timeWindow,chunkSize:e.chunkSize,maxRate:e.maxRate,minChunkSize:e.minChunkSize,bytesSeen:0,isCaptured:!1,notifiedBytesLoaded:0,ts:Date.now(),bytes:0,onReadCallback:null};this.on("newListener",n=>{n==="progress"&&(t.isCaptured||(t.isCaptured=!0))})}_read(e){let t=this[RD];return t.onReadCallback&&t.onReadCallback(),super._read(e)}_transform(e,t,n){let s=this[RD],i=s.maxRate,a=this.readableHighWaterMark,u=s.timeWindow,c=1e3/u,l=i/c,h=s.minChunkSize!==!1?Math.max(s.minChunkSize,l*.01):0,m=o((y,v)=>{let E=Buffer.byteLength(y);s.bytesSeen+=E,s.bytes+=E,s.isCaptured&&this.emit("progress",s.bytesSeen),this.push(y)?process.nextTick(v):s.onReadCallback=()=>{s.onReadCallback=null,process.nextTick(v)}},"pushChunk"),g=o((y,v)=>{let E=Buffer.byteLength(y),w=null,C=a,_,b=0;if(i){let A=Date.now();(!s.ts||(b=A-s.ts)>=u)&&(s.ts=A,_=l-s.bytes,s.bytes=_<0?-_:0,b=0),_=l-s.bytes}if(i){if(_<=0)return setTimeout(()=>{v(null,y)},u-b);_<C&&(C=_)}C&&E>C&&E-C>h&&(w=y.subarray(C),y=y.subarray(0,C)),m(y,w?()=>{process.nextTick(v,null,w)}:v)},"transformChunk");g(e,o(function y(v,E){if(v)return n(v);E?g(E,y):n(null)},"transformNextChunk"))}},OD=_he;import{EventEmitter as $he}from"events";import Bhe from"util";import{Readable as Rhe}from"stream";var{asyncIterator:NF}=Symbol,Dhe=o(async function*(r){r.stream?yield*r.stream():r.arrayBuffer?yield await r.arrayBuffer():r[NF]?yield*r[NF]():yield r},"readBlob"),ZS=Dhe;var Ohe=wr.ALPHABET.ALPHA_DIGIT+"-_",Bv=typeof TextEncoder=="function"?new TextEncoder:new Bhe.TextEncoder,Ef=`\r
|
|
102
|
-
`,Phe=Bv.encode(Ef),khe=2,Lhe=class{static{o(this,"FormDataPart")}constructor(e,t){let{escapeName:n}=this.constructor,s=ie.isString(t),i=`Content-Disposition: form-data; name="${n(e)}"${!s&&t.name?`; filename="${n(t.name)}"`:""}${Ef}`;s?t=Bv.encode(String(t).replace(/\r?\n|\r\n?/g,Ef)):i+=`Content-Type: ${t.type||"application/octet-stream"}${Ef}`,this.headers=Bv.encode(i+Ef),this.contentLength=s?t.byteLength:t.size,this.size=this.headers.byteLength+this.contentLength+khe,this.name=e,this.value=t}async*encode(){yield this.headers;let{value:e}=this;ie.isTypedArray(e)?yield e:yield*ZS(e),yield Phe}static escapeName(e){return String(e).replace(/[\r\n"]/g,t=>({"\r":"%0D","\n":"%0A",'"':"%22"})[t])}},Vhe=o((r,e,t)=>{let{tag:n="form-data-boundary",size:s=25,boundary:i=n+"-"+wr.generateString(s,Ohe)}=t||{};if(!ie.isFormData(r))throw TypeError("FormData instance required");if(i.length<1||i.length>70)throw Error("boundary must be 10-70 characters long");let a=Bv.encode("--"+i+Ef),u=Bv.encode("--"+i+"--"+Ef),c=u.byteLength,l=Array.from(r.entries()).map(([m,g])=>{let y=new Lhe(m,g);return c+=y.size,y});c+=a.byteLength*l.length,c=ie.toFiniteNumber(c);let h={"Content-Type":`multipart/form-data; boundary=${i}`};return Number.isFinite(c)&&(h["Content-Length"]=c),e&&e(h),Rhe.from((async function*(){for(let m of l)yield a,yield*m.encode();yield u})())},"formDataToStream"),TF=Vhe;import Uhe from"stream";var jhe=class extends Uhe.Transform{static{o(this,"ZlibHeaderTransformStream")}__transform(e,t,n){this.push(e),n()}_transform(e,t,n){if(e.length!==0&&(this._transform=this.__transform,e[0]!==120)){let s=Buffer.alloc(2);s[0]=120,s[1]=156,this.push(s,t)}this.__transform(e,t,n)}},IF=jhe;var Fhe=o((r,e)=>ie.isAsyncFn(r)?function(...t){let n=t.pop();r.apply(this,t).then(s=>{try{e?n(null,...e(s)):n(null,s)}catch(i){n(i)}},n)}:r,"callbackify"),_F=Fhe;function Mhe(r,e){r=r||10;let t=new Array(r),n=new Array(r),s=0,i=0,a;return e=e!==void 0?e:1e3,o(function(c){let l=Date.now(),h=n[i];a||(a=l),t[s]=c,n[s]=l;let m=i,g=0;for(;m!==s;)g+=t[m++],m=m%r;if(s=(s+1)%r,s===i&&(i=(i+1)%r),l-a<e)return;let y=h&&l-h;return y?Math.round(g*1e3/y):void 0},"push")}o(Mhe,"speedometer");var DF=Mhe;function qhe(r,e){let t=0,n=1e3/e,s,i,a=o((l,h=Date.now())=>{t=h,s=null,i&&(clearTimeout(i),i=null),r(...l)},"invoke");return[o((...l)=>{let h=Date.now(),m=h-t;m>=n?a(l,h):(s=l,i||(i=setTimeout(()=>{i=null,a(s)},n-m)))},"throttled"),o(()=>s&&a(s),"flush")]}o(qhe,"throttle");var BF=qhe;var Jo=o((r,e,t=3)=>{let n=0,s=DF(50,250);return BF(i=>{let a=i.loaded,u=i.lengthComputable?i.total:void 0,c=a-n,l=s(c),h=a<=u;n=a;let m={loaded:a,total:u,progress:u?a/u:void 0,bytes:c,rate:l||void 0,estimated:l&&u&&h?(u-a)/l:void 0,event:i,lengthComputable:u!=null,[e?"download":"upload"]:!0};r(m)},t)},"progressEventReducer"),Cd=o((r,e)=>{let t=r!=null;return[n=>e[0]({lengthComputable:t,total:r,loaded:n}),e[1]]},"progressEventDecorator"),Nd=o(r=>(...e)=>ie.asap(()=>r(...e)),"asyncDecorator");function PD(r){if(!r||typeof r!="string"||!r.startsWith("data:"))return 0;let e=r.indexOf(",");if(e<0)return 0;let t=r.slice(5,e),n=r.slice(e+1);if(/;base64/i.test(t)){let i=n.length,a=n.length;for(let g=0;g<a;g++)if(n.charCodeAt(g)===37&&g+2<a){let y=n.charCodeAt(g+1),v=n.charCodeAt(g+2);(y>=48&&y<=57||y>=65&&y<=70||y>=97&&y<=102)&&(v>=48&&v<=57||v>=65&&v<=70||v>=97&&v<=102)&&(i-=2,g+=2)}let u=0,c=a-1,l=o(g=>g>=2&&n.charCodeAt(g-2)===37&&n.charCodeAt(g-1)===51&&(n.charCodeAt(g)===68||n.charCodeAt(g)===100),"tailIsPct3D");c>=0&&(n.charCodeAt(c)===61?(u++,c--):l(c)&&(u++,c-=3)),u===1&&c>=0&&(n.charCodeAt(c)===61||l(c))&&u++;let m=Math.floor(i/4)*3-(u||0);return m>0?m:0}return Buffer.byteLength(n,"utf8")}o(PD,"estimateDataURLDecodedBytes");var RF={flush:Cc.constants.Z_SYNC_FLUSH,finishFlush:Cc.constants.Z_SYNC_FLUSH},Ghe={flush:Cc.constants.BROTLI_OPERATION_FLUSH,finishFlush:Cc.constants.BROTLI_OPERATION_FLUSH},OF=ie.isFunction(Cc.createBrotliDecompress),{http:Xhe,https:Whe}=FF.default,zhe=/https:?/,PF=wr.protocols.map(r=>r+":"),kF=o((r,[e,t])=>(r.on("end",t).on("error",t),e),"flushOnFinish"),Jhe=class{static{o(this,"Http2Sessions")}constructor(){this.sessions=Object.create(null)}getSession(e,t){t=Object.assign({sessionTimeout:1e3},t);let n=this.sessions[e];if(n){let h=n.length;for(let m=0;m<h;m++){let[g,y]=n[m];if(!g.destroyed&&!g.closed&&jF.isDeepStrictEqual(y,t))return g}}let s=UF.connect(e,t),i,a=o(()=>{if(i)return;i=!0;let h=n,m=h.length,g=m;for(;g--;)if(h[g][0]===s){m===1?delete this.sessions[e]:h.splice(g,1);return}},"removeSession"),u=s.request,{sessionTimeout:c}=t;if(c!=null){let h,m=0;s.request=function(){let g=u.apply(this,arguments);return m++,h&&(clearTimeout(h),h=null),g.once("close",()=>{--m||(h=setTimeout(()=>{h=null,a()},c))}),g}}s.once("close",a);let l=[s,t];return n?n.push(l):n=this.sessions[e]=[l],s}},Yhe=new Jhe;function Qhe(r,e){r.beforeRedirects.proxy&&r.beforeRedirects.proxy(r),r.beforeRedirects.config&&r.beforeRedirects.config(r,e)}o(Qhe,"dispatchBeforeRedirect");function MF(r,e,t){let n=e;if(!n&&n!==!1){let s=VF.default.getProxyForUrl(t);s&&(n=new URL(s))}if(n){if(n.username&&(n.auth=(n.username||"")+":"+(n.password||"")),n.auth){if(!!(n.auth.username||n.auth.password))n.auth=(n.auth.username||"")+":"+(n.auth.password||"");else if(typeof n.auth=="object")throw new Ze("Invalid proxy authorization",Ze.ERR_BAD_OPTION,{proxy:n});let a=Buffer.from(n.auth,"utf8").toString("base64");r.headers["Proxy-Authorization"]="Basic "+a}r.headers.host=r.hostname+(r.port?":"+r.port:"");let s=n.hostname||n.host;r.hostname=s,r.host=s,r.port=n.port,r.path=t,n.protocol&&(r.protocol=n.protocol.includes(":")?n.protocol:`${n.protocol}:`)}r.beforeRedirects.proxy=o(function(i){MF(i,e,i.href)},"beforeRedirect")}o(MF,"setProxy");var Zhe=typeof process<"u"&&ie.kindOf(process)==="process",epe=o(r=>new Promise((e,t)=>{let n,s,i=o((c,l)=>{s||(s=!0,n&&n(c,l))},"done"),a=o(c=>{i(c),e(c)},"_resolve"),u=o(c=>{i(c,!0),t(c)},"_reject");r(a,u,c=>n=c).catch(u)}),"wrapAsync"),tpe=o(({address:r,family:e})=>{if(!ie.isString(r))throw TypeError("address must be a string");return{address:r,family:e||(r.indexOf(".")<0?6:4)}},"resolveFamily"),LF=o((r,e)=>tpe(ie.isObject(r)?r:{address:r,family:e}),"buildAddressEntry"),rpe={request(r,e){let t=r.protocol+"//"+r.hostname+":"+(r.port||(r.protocol==="https:"?443:80)),{http2Options:n,headers:s}=r,i=Yhe.getSession(t,n),{HTTP2_HEADER_SCHEME:a,HTTP2_HEADER_METHOD:u,HTTP2_HEADER_PATH:c,HTTP2_HEADER_STATUS:l}=UF.constants,h={[a]:r.protocol.replace(":",""),[u]:r.method,[c]:r.path};ie.forEach(s,(g,y)=>{y.charAt(0)!==":"&&(h[y]=g)});let m=i.request(h);return m.once("response",g=>{let y=m;g=Object.assign({},g);let v=g[l];delete g[l],y.headers=g,y.statusCode=+v,e(y)}),m}},qF=Zhe&&o(function(e){return epe(o(async function(n,s,i){let{data:a,lookup:u,family:c,httpVersion:l=1,http2Options:h}=e,{responseType:m,responseEncoding:g}=e,y=e.method.toUpperCase(),v,E=!1,w;if(l=+l,Number.isNaN(l))throw TypeError(`Invalid protocol version: '${e.httpVersion}' is not a number`);if(l!==1&&l!==2)throw TypeError(`Unsupported protocol version '${l}'`);let C=l===2;if(u){let ne=_F(u,Z=>ie.isArray(Z)?Z:[Z]);u=o((Z,Se,He)=>{ne(Z,Se,(Le,rt,N)=>{if(Le)return He(Le);let S=ie.isArray(rt)?rt.map(G=>LF(G)):[LF(rt,N)];Se.all?He(Le,S):He(Le,S[0].address,S[0].family)})},"lookup")}let _=new $he;function b(ne){try{_.emit("abort",!ne||ne.type?new di(null,e,w):ne)}catch(Z){console.warn("emit error",Z)}}o(b,"abort"),_.once("abort",s);let A=o(()=>{e.cancelToken&&e.cancelToken.unsubscribe(b),e.signal&&e.signal.removeEventListener("abort",b),_.removeAllListeners()},"onFinished");(e.cancelToken||e.signal)&&(e.cancelToken&&e.cancelToken.subscribe(b),e.signal&&(e.signal.aborted?b():e.signal.addEventListener("abort",b))),i((ne,Z)=>{if(v=!0,Z){E=!0,A();return}let{data:Se}=ne;if(Se instanceof Ac.Readable||Se instanceof Ac.Duplex){let He=Ac.finished(Se,()=>{He(),A()})}else A()});let T=xf(e.baseURL,e.url,e.allowAbsoluteUrls),B=new URL(T,wr.hasBrowserEnv?wr.origin:void 0),M=B.protocol||PF[0];if(M==="data:"){if(e.maxContentLength>-1){let Z=String(e.url||T||"");if(PD(Z)>e.maxContentLength)return s(new Ze("maxContentLength size of "+e.maxContentLength+" exceeded",Ze.ERR_BAD_RESPONSE,e))}let ne;if(y!=="GET")return lo(n,s,{status:405,statusText:"method not allowed",headers:{},config:e});try{ne=BD(e.url,m==="blob",{Blob:e.env&&e.env.Blob})}catch(Z){throw Ze.from(Z,Ze.ERR_BAD_REQUEST,e)}return m==="text"?(ne=ne.toString(g),(!g||g==="utf8")&&(ne=ie.stripBOM(ne))):m==="stream"&&(ne=Ac.Readable.from(ne)),lo(n,s,{data:ne,status:200,statusText:"OK",headers:new Zr,config:e})}if(PF.indexOf(M)===-1)return s(new Ze("Unsupported protocol "+M,Ze.ERR_BAD_REQUEST,e));let I=Zr.from(e.headers).normalize();I.set("User-Agent","axios/"+wf,!1);let{onUploadProgress:H,onDownloadProgress:K}=e,q=e.maxRate,W,he;if(ie.isSpecCompliantForm(a)){let ne=I.getContentType(/boundary=([-_\w\d]{10,70})/i);a=TF(a,Z=>{I.set(Z)},{tag:`axios-${wf}-boundary`,boundary:ne&&ne[1]||void 0})}else if(ie.isFormData(a)&&ie.isFunction(a.getHeaders)){if(I.set(a.getHeaders()),!I.hasContentLength())try{let ne=await jF.promisify(a.getLength).call(a);Number.isFinite(ne)&&ne>=0&&I.setContentLength(ne)}catch{}}else if(ie.isBlob(a)||ie.isFile(a))a.size&&I.setContentType(a.type||"application/octet-stream"),I.setContentLength(a.size||0),a=Ac.Readable.from(ZS(a));else if(a&&!ie.isStream(a)){if(!Buffer.isBuffer(a))if(ie.isArrayBuffer(a))a=Buffer.from(new Uint8Array(a));else if(ie.isString(a))a=Buffer.from(a,"utf-8");else return s(new Ze("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",Ze.ERR_BAD_REQUEST,e));if(I.setContentLength(a.length,!1),e.maxBodyLength>-1&&a.length>e.maxBodyLength)return s(new Ze("Request body larger than maxBodyLength limit",Ze.ERR_BAD_REQUEST,e))}let pe=ie.toFiniteNumber(I.getContentLength());ie.isArray(q)?(W=q[0],he=q[1]):W=he=q,a&&(H||W)&&(ie.isStream(a)||(a=Ac.Readable.from(a,{objectMode:!1})),a=Ac.pipeline([a,new OD({maxRate:ie.toFiniteNumber(W)})],ie.noop),H&&a.on("progress",kF(a,Cd(pe,Jo(Nd(H),!1,3)))));let ue;if(e.auth){let ne=e.auth.username||"",Z=e.auth.password||"";ue=ne+":"+Z}if(!ue&&B.username){let ne=B.username,Z=B.password;ue=ne+":"+Z}ue&&I.delete("authorization");let Y;try{Y=yf(B.pathname+B.search,e.params,e.paramsSerializer).replace(/^\?/,"")}catch(ne){let Z=new Error(ne.message);return Z.config=e,Z.url=e.url,Z.exists=!0,s(Z)}I.set("Accept-Encoding","gzip, compress, deflate"+(OF?", br":""),!1);let ve={path:Y,method:y,headers:I.toJSON(),agents:{http:e.httpAgent,https:e.httpsAgent},auth:ue,protocol:M,family:c,beforeRedirect:Qhe,beforeRedirects:{},http2Options:h};!ie.isUndefined(u)&&(ve.lookup=u),e.socketPath?ve.socketPath=e.socketPath:(ve.hostname=B.hostname.startsWith("[")?B.hostname.slice(1,-1):B.hostname,ve.port=B.port,MF(ve,e.proxy,M+"//"+B.hostname+(B.port?":"+B.port:"")+ve.path));let Oe,Je=zhe.test(ve.protocol);if(ve.agent=Je?e.httpsAgent:e.httpAgent,C?Oe=rpe:e.transport?Oe=e.transport:e.maxRedirects===0?Oe=Je?Khe:Hhe:(e.maxRedirects&&(ve.maxRedirects=e.maxRedirects),e.beforeRedirect&&(ve.beforeRedirects.config=e.beforeRedirect),Oe=Je?Whe:Xhe),e.maxBodyLength>-1?ve.maxBodyLength=e.maxBodyLength:ve.maxBodyLength=1/0,e.insecureHTTPParser&&(ve.insecureHTTPParser=e.insecureHTTPParser),w=Oe.request(ve,o(function(Z){if(w.destroyed)return;let Se=[Z],He=ie.toFiniteNumber(Z.headers["content-length"]);if(K||he){let S=new OD({maxRate:ie.toFiniteNumber(he)});K&&S.on("progress",kF(S,Cd(He,Jo(Nd(K),!0,3)))),Se.push(S)}let Le=Z,rt=Z.req||w;if(e.decompress!==!1&&Z.headers["content-encoding"])switch((y==="HEAD"||Z.statusCode===204)&&delete Z.headers["content-encoding"],(Z.headers["content-encoding"]||"").toLowerCase()){case"gzip":case"x-gzip":case"compress":case"x-compress":Se.push(Cc.createUnzip(RF)),delete Z.headers["content-encoding"];break;case"deflate":Se.push(new IF),Se.push(Cc.createUnzip(RF)),delete Z.headers["content-encoding"];break;case"br":OF&&(Se.push(Cc.createBrotliDecompress(Ghe)),delete Z.headers["content-encoding"])}Le=Se.length>1?Ac.pipeline(Se,ie.noop):Se[0];let N={status:Z.statusCode,statusText:Z.statusMessage,headers:new Zr(Z.headers),config:e,request:rt};if(m==="stream")N.data=Le,lo(n,s,N);else{let S=[],G=0;Le.on("data",o(function(Ee){S.push(Ee),G+=Ee.length,e.maxContentLength>-1&&G>e.maxContentLength&&(E=!0,Le.destroy(),b(new Ze("maxContentLength size of "+e.maxContentLength+" exceeded",Ze.ERR_BAD_RESPONSE,e,rt)))},"handleStreamData")),Le.on("aborted",o(function(){if(E)return;let Ee=new Ze("stream has been aborted",Ze.ERR_BAD_RESPONSE,e,rt);Le.destroy(Ee),s(Ee)},"handlerStreamAborted")),Le.on("error",o(function(Ee){w.destroyed||s(Ze.from(Ee,null,e,rt))},"handleStreamError")),Le.on("end",o(function(){try{let Ee=S.length===1?S[0]:Buffer.concat(S);m!=="arraybuffer"&&(Ee=Ee.toString(g),(!g||g==="utf8")&&(Ee=ie.stripBOM(Ee))),N.data=Ee}catch(Ee){return s(Ze.from(Ee,null,e,N.request,N))}lo(n,s,N)},"handleStreamEnd"))}_.once("abort",S=>{Le.destroyed||(Le.emit("error",S),Le.destroy())})},"handleResponse")),_.once("abort",ne=>{w.close?w.close():w.destroy(ne)}),w.on("error",o(function(Z){s(Ze.from(Z,null,e,w))},"handleRequestError")),w.on("socket",o(function(Z){Z.setKeepAlive(!0,1e3*60)},"handleRequestSocket")),e.timeout){let ne=parseInt(e.timeout,10);if(Number.isNaN(ne)){b(new Ze("error trying to parse `config.timeout` to int",Ze.ERR_BAD_OPTION_VALUE,e,w));return}w.setTimeout(ne,o(function(){if(v)return;let Se=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",He=e.transitional||bc;e.timeoutErrorMessage&&(Se=e.timeoutErrorMessage),b(new Ze(Se,He.clarifyTimeoutError?Ze.ETIMEDOUT:Ze.ECONNABORTED,e,w))},"handleRequestTimeout"))}else w.setTimeout(0);if(ie.isStream(a)){let ne=!1,Z=!1;a.on("end",()=>{ne=!0}),a.once("error",Se=>{Z=!0,w.destroy(Se)}),a.on("close",()=>{!ne&&!Z&&b(new di("Request stream has been aborted",e,w))}),a.pipe(w)}else a&&w.write(a),w.end()},"dispatchHttpRequest"))},"httpAdapter");var HF=wr.hasStandardBrowserEnv?((r,e)=>t=>(t=new URL(t,wr.origin),r.protocol===t.protocol&&r.host===t.host&&(e||r.port===t.port)))(new URL(wr.origin),wr.navigator&&/(msie|trident)/i.test(wr.navigator.userAgent)):()=>!0;var KF=wr.hasStandardBrowserEnv?{write(r,e,t,n,s,i,a){if(typeof document>"u")return;let u=[`${r}=${encodeURIComponent(e)}`];ie.isNumber(t)&&u.push(`expires=${new Date(t).toUTCString()}`),ie.isString(n)&&u.push(`path=${n}`),ie.isString(s)&&u.push(`domain=${s}`),i===!0&&u.push("secure"),ie.isString(a)&&u.push(`SameSite=${a}`),document.cookie=u.join("; ")},read(r){if(typeof document>"u")return null;let e=document.cookie.match(new RegExp("(?:^|; )"+r+"=([^;]*)"));return e?decodeURIComponent(e[1]):null},remove(r){this.write(r,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};var $F=o(r=>r instanceof Zr?{...r}:r,"headersToObject");function ya(r,e){e=e||{};let t={};function n(l,h,m,g){return ie.isPlainObject(l)&&ie.isPlainObject(h)?ie.merge.call({caseless:g},l,h):ie.isPlainObject(h)?ie.merge({},h):ie.isArray(h)?h.slice():h}o(n,"getMergedValue");function s(l,h,m,g){if(ie.isUndefined(h)){if(!ie.isUndefined(l))return n(void 0,l,m,g)}else return n(l,h,m,g)}o(s,"mergeDeepProperties");function i(l,h){if(!ie.isUndefined(h))return n(void 0,h)}o(i,"valueFromConfig2");function a(l,h){if(ie.isUndefined(h)){if(!ie.isUndefined(l))return n(void 0,l)}else return n(void 0,h)}o(a,"defaultToConfig2");function u(l,h,m){if(m in e)return n(l,h);if(m in r)return n(void 0,l)}o(u,"mergeDirectKeys");let c={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:u,headers:o((l,h,m)=>s($F(l),$F(h),m,!0),"headers")};return ie.forEach(Object.keys({...r,...e}),o(function(h){if(h==="__proto__"||h==="constructor"||h==="prototype")return;let m=ie.hasOwnProp(c,h)?c[h]:s,g=m(r[h],e[h],h);ie.isUndefined(g)&&m!==u||(t[h]=g)},"computeConfigValue")),t}o(ya,"mergeConfig");var eb=o((r=>{let e=ya({},r),{data:t,withXSRFToken:n,xsrfHeaderName:s,xsrfCookieName:i,headers:a,auth:u}=e;if(e.headers=a=Zr.from(a),e.url=yf(xf(e.baseURL,e.url,e.allowAbsoluteUrls),r.params,r.paramsSerializer),u&&a.set("Authorization","Basic "+btoa((u.username||"")+":"+(u.password?unescape(encodeURIComponent(u.password)):""))),ie.isFormData(t)){if(wr.hasStandardBrowserEnv||wr.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(ie.isFunction(t.getHeaders)){let c=t.getHeaders(),l=["content-type","content-length"];Object.entries(c).forEach(([h,m])=>{l.includes(h.toLowerCase())&&a.set(h,m)})}}if(wr.hasStandardBrowserEnv&&(n&&ie.isFunction(n)&&(n=n(e)),n||n!==!1&&HF(e.url))){let c=s&&i&&KF.read(i);c&&a.set(s,c)}return e}),"default");var npe=typeof XMLHttpRequest<"u",GF=npe&&function(r){return new Promise(o(function(t,n){let s=eb(r),i=s.data,a=Zr.from(s.headers).normalize(),{responseType:u,onUploadProgress:c,onDownloadProgress:l}=s,h,m,g,y,v;function E(){y&&y(),v&&v(),s.cancelToken&&s.cancelToken.unsubscribe(h),s.signal&&s.signal.removeEventListener("abort",h)}o(E,"done");let w=new XMLHttpRequest;w.open(s.method.toUpperCase(),s.url,!0),w.timeout=s.timeout;function C(){if(!w)return;let b=Zr.from("getAllResponseHeaders"in w&&w.getAllResponseHeaders()),T={data:!u||u==="text"||u==="json"?w.responseText:w.response,status:w.status,statusText:w.statusText,headers:b,config:r,request:w};lo(o(function(M){t(M),E()},"_resolve"),o(function(M){n(M),E()},"_reject"),T),w=null}o(C,"onloadend"),"onloadend"in w?w.onloadend=C:w.onreadystatechange=o(function(){!w||w.readyState!==4||w.status===0&&!(w.responseURL&&w.responseURL.indexOf("file:")===0)||setTimeout(C)},"handleLoad"),w.onabort=o(function(){w&&(n(new Ze("Request aborted",Ze.ECONNABORTED,r,w)),w=null)},"handleAbort"),w.onerror=o(function(A){let T=A&&A.message?A.message:"Network Error",B=new Ze(T,Ze.ERR_NETWORK,r,w);B.event=A||null,n(B),w=null},"handleError"),w.ontimeout=o(function(){let A=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded",T=s.transitional||bc;s.timeoutErrorMessage&&(A=s.timeoutErrorMessage),n(new Ze(A,T.clarifyTimeoutError?Ze.ETIMEDOUT:Ze.ECONNABORTED,r,w)),w=null},"handleTimeout"),i===void 0&&a.setContentType(null),"setRequestHeader"in w&&ie.forEach(a.toJSON(),o(function(A,T){w.setRequestHeader(T,A)},"setRequestHeader")),ie.isUndefined(s.withCredentials)||(w.withCredentials=!!s.withCredentials),u&&u!=="json"&&(w.responseType=s.responseType),l&&([g,v]=Jo(l,!0),w.addEventListener("progress",g)),c&&w.upload&&([m,y]=Jo(c),w.upload.addEventListener("progress",m),w.upload.addEventListener("loadend",y)),(s.cancelToken||s.signal)&&(h=o(b=>{w&&(n(!b||b.type?new di(null,r,w):b),w.abort(),w=null)},"onCanceled"),s.cancelToken&&s.cancelToken.subscribe(h),s.signal&&(s.signal.aborted?h():s.signal.addEventListener("abort",h)));let _=Dv(s.url);if(_&&wr.protocols.indexOf(_)===-1){n(new Ze("Unsupported protocol "+_+":",Ze.ERR_BAD_REQUEST,r));return}w.send(i||null)},"dispatchXhrRequest"))};var spe=o((r,e)=>{let{length:t}=r=r?r.filter(Boolean):[];if(e||t){let n=new AbortController,s,i=o(function(l){if(!s){s=!0,u();let h=l instanceof Error?l:this.reason;n.abort(h instanceof Ze?h:new di(h instanceof Error?h.message:h))}},"onabort"),a=e&&setTimeout(()=>{a=null,i(new Ze(`timeout of ${e}ms exceeded`,Ze.ETIMEDOUT))},e),u=o(()=>{r&&(a&&clearTimeout(a),a=null,r.forEach(l=>{l.unsubscribe?l.unsubscribe(i):l.removeEventListener("abort",i)}),r=null)},"unsubscribe");r.forEach(l=>l.addEventListener("abort",i));let{signal:c}=n;return c.unsubscribe=()=>ie.asap(u),c}},"composeSignals"),XF=spe;var ipe=o(function*(r,e){let t=r.byteLength;if(!e||t<e){yield r;return}let n=0,s;for(;n<t;)s=n+e,yield r.slice(n,s),n=s},"streamChunk"),ape=o(async function*(r,e){for await(let t of ope(r))yield*ipe(t,e)},"readBytes"),ope=o(async function*(r){if(r[Symbol.asyncIterator]){yield*r;return}let e=r.getReader();try{for(;;){let{done:t,value:n}=await e.read();if(t)break;yield n}}finally{await e.cancel()}},"readStream"),kD=o((r,e,t,n)=>{let s=ape(r,e),i=0,a,u=o(c=>{a||(a=!0,n&&n(c))},"_onFinish");return new ReadableStream({async pull(c){try{let{done:l,value:h}=await s.next();if(l){u(),c.close();return}let m=h.byteLength;if(t){let g=i+=m;t(g)}c.enqueue(new Uint8Array(h))}catch(l){throw u(l),l}},cancel(c){return u(c),s.return()}},{highWaterMark:2})},"trackStream");var WF=64*1024,{isFunction:tb}=ie,upe=(({Request:r,Response:e})=>({Request:r,Response:e}))(ie.global),{ReadableStream:zF,TextEncoder:JF}=ie.global,YF=o((r,...e)=>{try{return!!r(...e)}catch{return!1}},"test"),cpe=o(r=>{r=ie.merge.call({skipUndefined:!0},upe,r);let{fetch:e,Request:t,Response:n}=r,s=e?tb(e):typeof fetch=="function",i=tb(t),a=tb(n);if(!s)return!1;let u=s&&tb(zF),c=s&&(typeof JF=="function"?(v=>E=>v.encode(E))(new JF):async v=>new Uint8Array(await new t(v).arrayBuffer())),l=i&&u&&YF(()=>{let v=!1,E=new t(wr.origin,{body:new zF,method:"POST",get duplex(){return v=!0,"half"}}).headers.has("Content-Type");return v&&!E}),h=a&&u&&YF(()=>ie.isReadableStream(new n("").body)),m={stream:h&&(v=>v.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(v=>{!m[v]&&(m[v]=(E,w)=>{let C=E&&E[v];if(C)return C.call(E);throw new Ze(`Response type '${v}' is not supported`,Ze.ERR_NOT_SUPPORT,w)})});let g=o(async v=>{if(v==null)return 0;if(ie.isBlob(v))return v.size;if(ie.isSpecCompliantForm(v))return(await new t(wr.origin,{method:"POST",body:v}).arrayBuffer()).byteLength;if(ie.isArrayBufferView(v)||ie.isArrayBuffer(v))return v.byteLength;if(ie.isURLSearchParams(v)&&(v=v+""),ie.isString(v))return(await c(v)).byteLength},"getBodyLength"),y=o(async(v,E)=>{let w=ie.toFiniteNumber(v.getContentLength());return w??g(E)},"resolveBodyLength");return async v=>{let{url:E,method:w,data:C,signal:_,cancelToken:b,timeout:A,onDownloadProgress:T,onUploadProgress:B,responseType:M,headers:I,withCredentials:H="same-origin",fetchOptions:K}=eb(v),q=e||fetch;M=M?(M+"").toLowerCase():"text";let W=XF([_,b&&b.toAbortSignal()],A),he=null,pe=W&&W.unsubscribe&&(()=>{W.unsubscribe()}),ue;try{if(B&&l&&w!=="get"&&w!=="head"&&(ue=await y(I,C))!==0){let Z=new t(E,{method:"POST",body:C,duplex:"half"}),Se;if(ie.isFormData(C)&&(Se=Z.headers.get("content-type"))&&I.setContentType(Se),Z.body){let[He,Le]=Cd(ue,Jo(Nd(B)));C=kD(Z.body,WF,He,Le)}}ie.isString(H)||(H=H?"include":"omit");let Y=i&&"credentials"in t.prototype,ve={...K,signal:W,method:w.toUpperCase(),headers:I.normalize().toJSON(),body:C,duplex:"half",credentials:Y?H:void 0};he=i&&new t(E,ve);let Oe=await(i?q(he,K):q(E,ve)),Je=h&&(M==="stream"||M==="response");if(h&&(T||Je&&pe)){let Z={};["status","statusText","headers"].forEach(rt=>{Z[rt]=Oe[rt]});let Se=ie.toFiniteNumber(Oe.headers.get("content-length")),[He,Le]=T&&Cd(Se,Jo(Nd(T),!0))||[];Oe=new n(kD(Oe.body,WF,He,()=>{Le&&Le(),pe&&pe()}),Z)}M=M||"text";let ne=await m[ie.findKey(m,M)||"text"](Oe,v);return!Je&&pe&&pe(),await new Promise((Z,Se)=>{lo(Z,Se,{data:ne,headers:Zr.from(Oe.headers),status:Oe.status,statusText:Oe.statusText,config:v,request:he})})}catch(Y){throw pe&&pe(),Y&&Y.name==="TypeError"&&/Load failed|fetch/i.test(Y.message)?Object.assign(new Ze("Network Error",Ze.ERR_NETWORK,v,he,Y&&Y.response),{cause:Y.cause||Y}):Ze.from(Y,Y&&Y.code,v,he,Y&&Y.response)}}},"factory"),lpe=new Map,LD=o(r=>{let e=r&&r.env||{},{fetch:t,Request:n,Response:s}=e,i=[n,s,t],a=i.length,u=a,c,l,h=lpe;for(;u--;)c=i[u],l=h.get(c),l===void 0&&h.set(c,l=u?new Map:cpe(e)),h=l;return l},"getFetch"),tNe=LD();var VD={http:qF,xhr:GF,fetch:{get:LD}};ie.forEach(VD,(r,e)=>{if(r){try{Object.defineProperty(r,"name",{value:e})}catch{}Object.defineProperty(r,"adapterName",{value:e})}});var QF=o(r=>`- ${r}`,"renderReason"),hpe=o(r=>ie.isFunction(r)||r===null||r===!1,"isResolvedHandle");function ppe(r,e){r=ie.isArray(r)?r:[r];let{length:t}=r,n,s,i={};for(let a=0;a<t;a++){n=r[a];let u;if(s=n,!hpe(n)&&(s=VD[(u=String(n)).toLowerCase()],s===void 0))throw new Ze(`Unknown adapter '${u}'`);if(s&&(ie.isFunction(s)||(s=s.get(e))))break;i[u||"#"+a]=s}if(!s){let a=Object.entries(i).map(([c,l])=>`adapter ${c} `+(l===!1?"is not supported by the environment":"is not available in the build")),u=t?a.length>1?`since :
|
|
103
|
-
`+a.map(QF).join(`
|
|
104
|
-
`):" "+QF(a[0]):"as no adapter specified";throw new Ze("There is no suitable adapter to dispatch the request "+u,"ERR_NOT_SUPPORT")}return s}o(ppe,"getAdapter");var rb={getAdapter:ppe,adapters:VD};function UD(r){if(r.cancelToken&&r.cancelToken.throwIfRequested(),r.signal&&r.signal.aborted)throw new di(null,r)}o(UD,"throwIfCancellationRequested");function nb(r){return UD(r),r.headers=Zr.from(r.headers),r.data=Iv.call(r,r.transformRequest),["post","put","patch"].indexOf(r.method)!==-1&&r.headers.setContentType("application/x-www-form-urlencoded",!1),rb.getAdapter(r.adapter||Ad.adapter,r)(r).then(o(function(n){return UD(r),n.data=Iv.call(r,r.transformResponse,n),n.headers=Zr.from(n.headers),n},"onAdapterResolution"),o(function(n){return _v(n)||(UD(r),n&&n.response&&(n.response.data=Iv.call(r,r.transformResponse,n.response),n.response.headers=Zr.from(n.response.headers))),Promise.reject(n)},"onAdapterRejection"))}o(nb,"dispatchRequest");var sb={};["object","boolean","number","function","string","symbol"].forEach((r,e)=>{sb[r]=o(function(n){return typeof n===r||"a"+(e<1?"n ":" ")+r},"validator")});var ZF={};sb.transitional=o(function(e,t,n){function s(i,a){return"[Axios v"+wf+"] Transitional option '"+i+"'"+a+(n?". "+n:"")}return o(s,"formatMessage"),(i,a,u)=>{if(e===!1)throw new Ze(s(a," has been removed"+(t?" in "+t:"")),Ze.ERR_DEPRECATED);return t&&!ZF[a]&&(ZF[a]=!0,console.warn(s(a," has been deprecated since v"+t+" and will be removed in the near future"))),e?e(i,a,u):!0}},"transitional");sb.spelling=o(function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)},"spelling");function dpe(r,e,t){if(typeof r!="object")throw new Ze("options must be an object",Ze.ERR_BAD_OPTION_VALUE);let n=Object.keys(r),s=n.length;for(;s-- >0;){let i=n[s],a=e[i];if(a){let u=r[i],c=u===void 0||a(u,i,r);if(c!==!0)throw new Ze("option "+i+" must be "+c,Ze.ERR_BAD_OPTION_VALUE);continue}if(t!==!0)throw new Ze("Unknown option "+i,Ze.ERR_BAD_OPTION)}}o(dpe,"assertOptions");var Rv={assertOptions:dpe,validators:sb};var Gi=Rv.validators,ib=class{static{o(this,"Axios")}constructor(e){this.defaults=e||{},this.interceptors={request:new ED,response:new ED}}async request(e,t){try{return await this._request(e,t)}catch(n){if(n instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;let i=s.stack?s.stack.replace(/^.+\n/,""):"";try{n.stack?i&&!String(n.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(n.stack+=`
|
|
105
|
-
`+i):n.stack=i}catch{}}throw n}}_request(e,t){typeof e=="string"?(t=t||{},t.url=e):t=e||{},t=ya(this.defaults,t);let{transitional:n,paramsSerializer:s,headers:i}=t;n!==void 0&&Rv.assertOptions(n,{silentJSONParsing:Gi.transitional(Gi.boolean),forcedJSONParsing:Gi.transitional(Gi.boolean),clarifyTimeoutError:Gi.transitional(Gi.boolean),legacyInterceptorReqResOrdering:Gi.transitional(Gi.boolean)},!1),s!=null&&(ie.isFunction(s)?t.paramsSerializer={serialize:s}:Rv.assertOptions(s,{encode:Gi.function,serialize:Gi.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Rv.assertOptions(t,{baseUrl:Gi.spelling("baseURL"),withXsrfToken:Gi.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let a=i&&ie.merge(i.common,i[t.method]);i&&ie.forEach(["delete","get","head","post","put","patch","common"],v=>{delete i[v]}),t.headers=Zr.concat(a,i);let u=[],c=!0;this.interceptors.request.forEach(o(function(E){if(typeof E.runWhen=="function"&&E.runWhen(t)===!1)return;c=c&&E.synchronous;let w=t.transitional||bc;w&&w.legacyInterceptorReqResOrdering?u.unshift(E.fulfilled,E.rejected):u.push(E.fulfilled,E.rejected)},"unshiftRequestInterceptors"));let l=[];this.interceptors.response.forEach(o(function(E){l.push(E.fulfilled,E.rejected)},"pushResponseInterceptors"));let h,m=0,g;if(!c){let v=[nb.bind(this),void 0];for(v.unshift(...u),v.push(...l),g=v.length,h=Promise.resolve(t);m<g;)h=h.then(v[m++],v[m++]);return h}g=u.length;let y=t;for(;m<g;){let v=u[m++],E=u[m++];try{y=v(y)}catch(w){E.call(this,w);break}}try{h=nb.call(this,y)}catch(v){return Promise.reject(v)}for(m=0,g=l.length;m<g;)h=h.then(l[m++],l[m++]);return h}getUri(e){e=ya(this.defaults,e);let t=xf(e.baseURL,e.url,e.allowAbsoluteUrls);return yf(t,e.params,e.paramsSerializer)}};ie.forEach(["delete","get","head","options"],o(function(e){ib.prototype[e]=function(t,n){return this.request(ya(n||{},{method:e,url:t,data:(n||{}).data}))}},"forEachMethodNoData"));ie.forEach(["post","put","patch"],o(function(e){function t(n){return o(function(i,a,u){return this.request(ya(u||{},{method:e,headers:n?{"Content-Type":"multipart/form-data"}:{},url:i,data:a}))},"httpMethod")}o(t,"generateHTTPMethod"),ib.prototype[e]=t(),ib.prototype[e+"Form"]=t(!0)},"forEachMethodWithData"));var Ov=ib;var mpe=class eM{static{o(this,"CancelToken")}constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let t;this.promise=new Promise(o(function(i){t=i},"promiseExecutor"));let n=this;this.promise.then(s=>{if(!n._listeners)return;let i=n._listeners.length;for(;i-- >0;)n._listeners[i](s);n._listeners=null}),this.promise.then=s=>{let i,a=new Promise(u=>{n.subscribe(u),i=u}).then(s);return a.cancel=o(function(){n.unsubscribe(i)},"reject"),a},e(o(function(i,a,u){n.reason||(n.reason=new di(i,a,u),t(n.reason))},"cancel"))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){let e=new AbortController,t=o(n=>{e.abort(n)},"abort");return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new eM(o(function(s){e=s},"executor")),cancel:e}}},tM=mpe;function jD(r){return o(function(t){return r.apply(null,t)},"wrap")}o(jD,"spread");function FD(r){return ie.isObject(r)&&r.isAxiosError===!0}o(FD,"isAxiosError");var MD={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(MD).forEach(([r,e])=>{MD[e]=r});var rM=MD;function nM(r){let e=new Ov(r),t=bv(Ov.prototype.request,e);return ie.extend(t,Ov.prototype,e,{allOwnKeys:!0}),ie.extend(t,e,null,{allOwnKeys:!0}),t.create=o(function(s){return nM(ya(r,s))},"create"),t}o(nM,"createInstance");var bn=nM(Ad);bn.Axios=Ov;bn.CanceledError=di;bn.CancelToken=tM;bn.isCancel=_v;bn.VERSION=wf;bn.toFormData=Sc;bn.AxiosError=Ze;bn.Cancel=bn.CanceledError;bn.all=o(function(e){return Promise.all(e)},"all");bn.spread=jD;bn.isAxiosError=FD;bn.mergeConfig=ya;bn.AxiosHeaders=Zr;bn.formToJSON=r=>JS(ie.isHTMLForm(r)?new FormData(r):r);bn.getAdapter=rb.getAdapter;bn.HttpStatusCode=rM;bn.default=bn;var ab=bn;var{Axios:uTe,AxiosError:cTe,CanceledError:lTe,isCancel:fTe,CancelToken:hTe,VERSION:pTe,all:dTe,Cancel:mTe,isAxiosError:gTe,spread:vTe,toFormData:yTe,AxiosHeaders:xTe,HttpStatusCode:wTe,formToJSON:ETe,getAdapter:STe,mergeConfig:bTe}=ab;import _pe from"os";import{arch as Epe,platform as lM}from"os";import{dirname as Spe,join as bpe,resolve as Ape,normalize as Cpe,delimiter as Npe}from"path";import{resolve as iM}from"path";import{createRequire as sM}from"module";import{fileURLToPath as gpe,pathToFileURL as vpe}from"url";var ype=typeof jest<"u"||process.env.JEST_WORKER_ID!==void 0,Td,aM=o(()=>{if(Td!==void 0)return Td;if(ype){Td=void 0;return}try{Td=new Function("try { return import.meta.url; } catch { return undefined; }")()}catch{Td=void 0}return Td},"getImportMetaUrl"),oM=o(()=>{if(typeof Ge<"u")return Ge;let r=aM();if(r)return sM(r);let e=vpe(iM(process.cwd(),"package.json")).href;return sM(e)},"getRequireFn"),uM=o(()=>{if(typeof __filename<"u")return __filename;let r=aM();return r?gpe(r):iM(process.cwd())},"getCurrentFile");import{dirname as ob,resolve as Sf}from"path";import{existsSync as Id}from"fs";var cM=o(()=>typeof process<"u"&&typeof process.versions<"u"&&"electron"in process.versions,"isElectron"),xpe=o(()=>{if(!cM())return null;try{let e=Ge("electron").app;if(e?.getAppPath&&typeof e.getAppPath=="function")return{getAppPath:e.getAppPath}}catch{}return null},"getElectronApp"),wpe=o(()=>{if(!cM())return null;let r=process;if(r.resourcesPath)return r.resourcesPath;let e=xpe();if(e)try{let t=e.getAppPath();if(typeof t=="string")return ob(t.replace(/\.asar$/,""))}catch{}return null},"getElectronResourcesPath"),qD=o((r,{onFound:e,onNotFound:t})=>{let n=wpe();if(n){let l=Sf(n,"node_modules","nfets",r);if(Id(l))return e(l);let h=Sf(n,"app.asar.unpacked","node_modules","nfets",r);if(Id(h))return e(h)}let s=uM(),i=s.includes(".asar")?process.cwd():s,a=Sf(i,"../../../../"),u=Sf(a,r);if(Id(u))return e(u);let c=i;for(let l=0;l<5;l++){let h=Sf(c,r);if(Id(h))return e(h);let m=ob(c);if(m===c)break;c=m}c=i;for(let l=0;l<5;l++){let h=Sf(c,"node_modules","nfets",r);if(Id(h))return e(h);let m=ob(c);if(m===c)break;c=m}c=i;for(let l=0;l<5;l++){let h=Sf(c,r.replace(/^build\//,"Release/"));if(Id(h))return e(h);let m=ob(c);if(m===c)break;c=m}return t()},"search");var Tpe=o(r=>{let e=r.replace(/^\\\\\?\\/,"");return Ape(Cpe(e))},"normalizePath"),Ipe=o(r=>{lM()==="win32"&&(process.env.PATH=`${Spe(r)}${Npe}${process.env.PATH}`)},"addAddonDirToPath"),HD=o(r=>{let e=Tpe(r);return Ipe(e),oM()(e)},"exportRequireModule"),ub=o(r=>{if(r=`${r}.node`,process.env.NFETS_ADDONS_DIR)return HD(bpe(process.env.NFETS_ADDONS_DIR,r));let e=`${lM()}-${Epe()}`;try{return qD(`build/addons/${e}/${r}`,{onFound:o(t=>HD(t),"onFound"),onNotFound:o(()=>{throw new Error(`Addon ${e}/${r} not found`)},"onNotFound")})}catch{return qD(`build/Release/${r}`,{onFound:o(t=>HD(t),"onFound"),onNotFound:o(()=>{throw new Error(`Addon ${e}/${r} not found`)},"onNotFound")})}},"addon");var cb=class r{static{o(this,"WinHttpClient")}certificate;interceptors={request:{use:o(()=>0,"use"),eject:o(()=>{},"eject"),clear:o(()=>{},"clear")},response:{use:o(()=>0,"use"),eject:o(()=>{},"eject"),clear:o(()=>{},"clear")}};defaults={headers:{}};constructor(e){this.certificate=e}parseRequestHeaders(e){return e?Object.entries(e).filter(([t,n])=>n!=null).map(([t,n])=>`${t}: ${Array.isArray(n)?n.join(", "):String(n)}`).join(_pe.EOL):""}parseRequestBody(e){return e?Buffer.isBuffer(e)?e:typeof e=="string"?Buffer.from(e,"utf8"):Array.isArray(e)?Buffer.concat(e):Buffer.from(JSON.stringify(e),"utf8"):Buffer.from("")}parseResponseHeaders(e){return e?e.split(`\r
|
|
106
|
-
`).reduce((t,n)=>{if(!n.trim()||n.startsWith("HTTP/"))return t;let[s,i]=n.split(":").map(a=>a.trim());return t[s]=i,t},{}):{}}parseResponseBody(e){return e?Buffer.isBuffer(e)?e.toString("utf8"):e:""}async request(e){let t=e.url??"",n=(e.method??"GET").toUpperCase(),s=ub("winhttp_ssl_client"),{CN:i}=new _d().extractCertificateInfo(this.certificate.certificate),a=await s.request(i??"",n,t,{headers:this.parseRequestHeaders(e.headers),body:this.parseRequestBody(e.data),timeout:e.timeout});return{status:a.statusCode,data:this.parseResponseBody(a.body),statusText:this.getStatusText(a.statusCode),headers:this.parseResponseHeaders(a.headers),config:e,request:{}}}get(e,t){return this.request({...t,method:"GET",url:e})}post(e,t,n){return this.request({...n,method:"POST",url:e,data:t})}put(e,t,n){return this.request({...n,method:"PUT",url:e,data:t})}patch(e,t,n){return this.request({...n,method:"PATCH",url:e,data:t})}delete(e,t){return this.request({...t,method:"DELETE",url:e})}head(e,t){return this.request({...t,method:"HEAD",url:e})}options(e,t){return this.request({...t,method:"OPTIONS",url:e})}getUri(e){if(!e?.url)return"";try{return new URL(e.url).toString()}catch{return e.url}}static create(e){let t=new r(e),n=t.request.bind(t);return Object.setPrototypeOf(n,r.prototype),Object.assign(n,t),n}getStatusText(e){return{200:"OK",201:"Created",202:"Accepted",204:"No Content",400:"Bad Request",401:"Unauthorized",403:"Forbidden",404:"Not Found",500:"Internal Server Error",502:"Bad Gateway",503:"Service Unavailable"}[e]??"Unknown"}};var fM=class{static{o(this,"SoapRemoteTransmissionRepository")}toolkit;certificateRepository;constructor(e,t){this.toolkit=e,this.certificateRepository=t}setCertificate(e){return this.certificate=e,this}get httpsAgent(){let e={rejectUnauthorized:!1,secureOptions:Bpe.SSL_OP_LEGACY_SERVER_CONNECT};if(!this.certificate)return new KD({...e});let{ca:t,password:n,certificate:s,privateKey:i}=this.certificate;return i?new KD({passphrase:n,cert:s.toString(),ca:t.map(a=>a.toString()),key:this.certificateRepository.getStringPrivateKey(i),...e}):new KD({...e})}get defaultSoapHeaders(){return{"Content-Type":"application/soap+xml; charset=utf-8"}}getDefaultRequest(){let e=ab.create();return e.defaults.httpsAgent=this.httpsAgent,e}get request(){if(Dpe.platform()==="win32")try{return this.certificate?cb.create(this.certificate):this.getDefaultRequest()}catch{return this.getDefaultRequest()}return this.getDefaultRequest()}async send(e){try{let t=this.request,n=await(0,hM.createClientAsync)(`${e.url}?wsdl`,{request:t,attributesKey:"$",wsdl_options:{request:t},forceSoap12Headers:!0});e.payload.$={xmlns:n.wsdl.definitions.$targetNamespace,...e.payload.$};let s=await this.toolkit.build(e.payload,{headless:!0,renderOpts:{pretty:!1},rootName:e.root}),i=this.toolkit.getFirstNode(s)??"",a=e.xsd,u=await this.toolkit.validate(i,a);if(u.isLeft())return u;let[c]=await n[`${e.method}Async`]({_xml:s},{request:t});return Bi(c)}catch(t){return nf(t)}}};var Rpe=ub("xml_validator"),pM=Rpe;var Ige=Xl(L9(),1);import Tge from"crypto";var V9="application/xml";var qt;(function(r){r[r.None=0]="None",r[r.Element=1]="Element",r[r.Attribute=2]="Attribute",r[r.Text=3]="Text",r[r.CDATA=4]="CDATA",r[r.EntityReference=5]="EntityReference",r[r.Entity=6]="Entity",r[r.ProcessingInstruction=7]="ProcessingInstruction",r[r.Comment=8]="Comment",r[r.Document=9]="Document",r[r.DocumentType=10]="DocumentType",r[r.DocumentFragment=11]="DocumentFragment",r[r.Notation=12]="Notation",r[r.Whitespace=13]="Whitespace",r[r.SignificantWhitespace=14]="SignificantWhitespace",r[r.EndElement=15]="EndElement",r[r.EndEntity=16]="EndEntity",r[r.XmlDeclaration=17]="XmlDeclaration"})(qt||(qt={}));function Ope(r,e){let t=r.ownerDocument==null?r:r.ownerDocument,n=document.createNSResolver(r.ownerDocument==null?r.documentElement:r.ownerDocument.documentElement),s=t.evaluate(e,r,n,XPathResult.ANY_TYPE,null),i=[],a;for(;a=s.iterateNext();)i.push(a);return i}o(Ope,"SelectNodesEx");function Ppe(r,e){let t=Dd("xpath").select;return t(e,r)}o(Ppe,"SelectNodesNode");var U9=typeof self<"u"?Ope:Ppe;function zs(r){r=r.replace(/\r\n/g,`
|
|
107
|
-
`).replace(/\r/g,`
|
|
108
|
-
`);let e;return typeof DOMParser<"u"?e=DOMParser:e=Dd("DOMParser"),new e().parseFromString(r,V9)}o(zs,"Parse");function xa(r){let e;return typeof XMLSerializer<"u"?e=XMLSerializer:e=Dd("XMLSerializer"),new e().serializeToString(r)}o(xa,"Stringify");function Nb(r,e){let t=U9(r,e);return t&&t.length>0?t[0]:null}o(Nb,"SelectSingleNode");function j9(r,e){return r&&r.nodeType===e}o(j9,"isNodeType");function gi(r){return j9(r,qt.Element)}o(gi,"isElement");function Af(r){return j9(r,qt.Document)}o(Af,"isDocument");var F9=new Map;function M9(r){for(let e in r)F9.set(e,r[e])}o(M9,"setNodeDependencies");function Dd(r){let e=F9.get(r);if(!e)throw new Error(`Node dependency not found: ${r}. Please use 'setNodeDependencies' to register it.`);return e}o(Dd,"getNodeDependency");var Lv="element",Vv="attribute",Tb="content";var kpe=1e9;function tB(r,...e){let t=r;for(let n=0;n<e.length;n++){let s=e[n];for(let i in s)Object.prototype.hasOwnProperty.call(s,i)&&(t[i]=s[i])}return t}o(tB,"assign");function Ht(r){return e=>{let t=e;t.localName=r.localName||t.name,t.namespaceURI=r.namespaceURI||t.namespaceURI||null,t.prefix=r.prefix||t.prefix||null,t.parser=r.parser||t.parser,t.target!==t&&(t.items=tB({},t.items)),t.target=e}}o(Ht,"XmlElement");function Jt(r={}){return(e,t)=>{let n=e.constructor,s=t;n.items||(n.items={}),n.target!==n&&(n.items=tB({},n.items)),n.target=e;let i;r.parser?i={parser:r.parser,required:r.required||!1,maxOccurs:r.maxOccurs||kpe,minOccurs:r.minOccurs===void 0?0:r.minOccurs,noRoot:r.noRoot||!1}:i={namespaceURI:r.namespaceURI||null,required:r.required||!1,prefix:r.prefix||null,defaultValue:r.defaultValue,converter:r.converter,noRoot:r.noRoot||!1},r.localName=r.localName||r.parser&&r.parser.localName||s;let a=n.items,u=r.parser&&r.parser.namespaceURI;a[s]={...i,namespaceURI:r.namespaceURI||u||null,prefix:r.prefix||r.parser&&r.parser.prefix||null,localName:r.localName,type:Lv},H9(e,s,r)}}o(Jt,"XmlChildElement");function jr(r={required:!1,namespaceURI:null}){return(e,t)=>{let n=e.constructor,s=t;r.localName||(r.localName=t),n.items||(n.items={}),n.target!==n&&(n.items=tB({},n.items)),n.target=e;let i=n.items;i[t]=r,i[t].type=Vv,H9(e,s,r)}}o(jr,"XmlAttribute");function H9(r,e,t){let n=`_${e}`,s={set:o(function(i){this[n]!==i&&(this.element=null,this[n]=i)},"set"),get:o(function(){if(this[n]===void 0){let i=t.defaultValue;t.parser&&(i=new t.parser,i.localName=t.localName),this[n]=i}return this[n]},"get")};Object.defineProperty(r,n,{writable:!0,enumerable:!1}),Object.defineProperty(r,e,s)}o(H9,"defineProperty");var Ic=class r{static{o(this,"Collection")}constructor(e){this.items=[],e&&(this.items=e)}get Count(){return this.items.length}Item(e){return this.items[e]||null}Add(e){this.items.push(e)}Pop(){return this.items.pop()}RemoveAt(e){this.items=this.items.filter((t,n)=>n!==e)}Clear(){this.items=[]}GetIterator(){return this.items}ForEach(e){this.GetIterator().forEach(e)}Map(e){return new r(this.GetIterator().map(e))}Filter(e){return new r(this.GetIterator().filter(e))}Sort(e){return new r(this.GetIterator().sort(e))}Every(e){return this.GetIterator().every(e)}Some(e){return this.GetIterator().some(e)}IsEmpty(){return this.Count===0}};function Lpe(r,...e){let t=r.replace(/%([1-9]\d*)/g,(n,s)=>{let i=parseInt(s,10)-1;return e[i]!==void 0?e[i]:""});return t=t.replace(/%%/g,"%"),t}o(Lpe,"printf");function Vpe(r,e){let t=r+"";for(;t.length<e;)t="0"+t;return t}o(Vpe,"padNum");var $e=class{static{o(this,"XmlError")}constructor(e,...t){this.prefix="XMLJS",this.code=e,this.name=this.constructor.name;let n=Lpe(xn[e],...t);this.message=`${this.prefix}${Vpe(e,4)}: ${n}`,this.stack=new Error(this.message).stack}},De;(function(r){r[r.NONE=0]="NONE",r[r.NULL_REFERENCE=1]="NULL_REFERENCE",r[r.NULL_PARAM=2]="NULL_PARAM",r[r.DECORATOR_NULL_PARAM=3]="DECORATOR_NULL_PARAM",r[r.COLLECTION_LIMIT=4]="COLLECTION_LIMIT",r[r.METHOD_NOT_IMPLEMENTED=5]="METHOD_NOT_IMPLEMENTED",r[r.METHOD_NOT_SUPPORTED=6]="METHOD_NOT_SUPPORTED",r[r.PARAM_REQUIRED=7]="PARAM_REQUIRED",r[r.CONVERTER_UNSUPPORTED=8]="CONVERTER_UNSUPPORTED",r[r.ELEMENT_MALFORMED=9]="ELEMENT_MALFORMED",r[r.ELEMENT_MISSING=10]="ELEMENT_MISSING",r[r.ATTRIBUTE_MISSING=11]="ATTRIBUTE_MISSING",r[r.CONTENT_MISSING=12]="CONTENT_MISSING",r[r.CRYPTOGRAPHIC=13]="CRYPTOGRAPHIC",r[r.CRYPTOGRAPHIC_NO_MODULE=14]="CRYPTOGRAPHIC_NO_MODULE",r[r.CRYPTOGRAPHIC_UNKNOWN_TRANSFORM=15]="CRYPTOGRAPHIC_UNKNOWN_TRANSFORM",r[r.ALGORITHM_NOT_SUPPORTED=16]="ALGORITHM_NOT_SUPPORTED",r[r.ALGORITHM_WRONG_NAME=17]="ALGORITHM_WRONG_NAME",r[r.XML_EXCEPTION=18]="XML_EXCEPTION",r[r.KEY_INFO_CLAUSE_NOT_SUPPORTED=19]="KEY_INFO_CLAUSE_NOT_SUPPORTED"})(De||(De={}));var xn={};xn[De.NONE]="No description";xn[De.NULL_REFERENCE]="Null reference";xn[De.NULL_PARAM]="'%1' has empty '%2' object";xn[De.DECORATOR_NULL_PARAM]="Decorator '%1' has empty '%2' parameter";xn[De.COLLECTION_LIMIT]="Collection of '%1' in element '%2' has wrong amount of items";xn[De.METHOD_NOT_IMPLEMENTED]="Method is not implemented";xn[De.METHOD_NOT_SUPPORTED]="Method is not supported";xn[De.PARAM_REQUIRED]="Required parameter is missing '%1'";xn[De.CONVERTER_UNSUPPORTED]="Converter is not supported";xn[De.ELEMENT_MALFORMED]="Malformed element '%1'";xn[De.ELEMENT_MISSING]="Element '%1' is missing in '%2'";xn[De.ATTRIBUTE_MISSING]="Attribute '%1' is missing in '%2'";xn[De.CONTENT_MISSING]="Content is missing in '%1'";xn[De.CRYPTOGRAPHIC]="Cryptographic error: %1";xn[De.CRYPTOGRAPHIC_NO_MODULE]="WebCrypto module is not found";xn[De.CRYPTOGRAPHIC_UNKNOWN_TRANSFORM]="Unknown transform %1";xn[De.ALGORITHM_NOT_SUPPORTED]="Algorithm is not supported '%1'";xn[De.ALGORITHM_WRONG_NAME]="Algorithm wrong name in use '%1'";xn[De.XML_EXCEPTION]="XML exception: %1";xn[De.KEY_INFO_CLAUSE_NOT_SUPPORTED]="KeyInfoClause type '%1' is not supported";var Ar=class{static{o(this,"Convert")}static ToString(e,t="utf8"){let n=new Uint8Array(e);switch(t.toLowerCase()){case"utf8":return this.ToUtf8String(n);case"binary":return this.ToBinary(n);case"hex":return this.ToHex(n);case"base64":return this.ToBase64(n);case"base64url":return this.ToBase64Url(n);default:throw new $e(De.CONVERTER_UNSUPPORTED)}}static FromString(e,t="utf8"){switch(t.toLowerCase()){case"utf8":return this.FromUtf8String(e);case"binary":return this.FromBinary(e);case"hex":return this.FromHex(e);case"base64":return this.FromBase64(e);case"base64url":return this.FromBase64Url(e);default:throw new $e(De.CONVERTER_UNSUPPORTED)}}static ToBase64(e){if(typeof btoa<"u"){let t=this.ToString(e,"binary");return btoa(t)}else{if(typeof Buffer<"u")return Buffer.from(e).toString("base64");throw new $e(De.CONVERTER_UNSUPPORTED)}}static FromBase64(e){if(e=e.replace(/\n/g,"").replace(/\r/g,"").replace(/\t/g,"").replace(/\s/g,""),typeof atob<"u")return this.FromBinary(atob(e));if(typeof Buffer<"u")return new Uint8Array(Buffer.from(e,"base64"));throw new $e(De.CONVERTER_UNSUPPORTED)}static FromBase64Url(e){return this.FromBase64(this.Base64Padding(e.replace(/-/g,"+").replace(/_/g,"/")))}static ToBase64Url(e){return this.ToBase64(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}static FromUtf8String(e){let t=unescape(encodeURIComponent(e)),n=new Uint8Array(t.length);for(let s=0;s<t.length;s++)n[s]=t.charCodeAt(s);return n}static ToUtf8String(e){let t=String.fromCharCode.apply(null,e);return decodeURIComponent(escape(t))}static FromBinary(e){let t=e.length,n=new Uint8Array(t);for(let s=0;s<t;s++)n[s]=e.charCodeAt(s);return n}static ToBinary(e){let t="";for(let n=0;n<e.length;n++)t=t+String.fromCharCode(e[n]);return t}static ToHex(e){let n=[];for(let s=0;s<e.length;s++){let i=e[s].toString(16);n.push(i.length===1?"0"+i:i)}return n.join("")}static FromHex(e){let t=new Uint8Array(e.length/2);for(let n=0;n<e.length;n=n+2){let s=e.slice(n,n+2);t[n/2]=parseInt(s,16)}return t}static ToDateTime(e){return new Date(e)}static FromDateTime(e){return e.toISOString()}static Base64Padding(e){let t=4-e.length%4;if(t<4)for(let n=0;n<t;n++)e+="=";return e}};var Xi={get:o(r=>{if(r)return Ar.ToBase64(r)},"get"),set:o(r=>Ar.FromBase64(r),"set")},Uv={get:o(r=>r?r.toString():"0","get"),set:o(r=>Number(r),"set")};var Upe="xml_root",Js=class r{static{o(this,"XmlObject")}static LoadXml(e){let t=new this;return t.LoadXml(e),t}static GetElement(e,t,n=!0){let s=e.getElementsByTagName(t);if(n&&s.length===0)throw new $e(De.ELEMENT_MISSING,t,e.localName);return s[0]||null}static GetAttribute(e,t,n,s=!0){if(e.hasAttribute(t))return e.getAttribute(t);if(s)throw new $e(De.ATTRIBUTE_MISSING,t,e.localName);return n}static GetElementById(e,t){if(e==null||t==null)return null;let n=null;return Af(e)&&(n=e.getElementById(t)),n==null&&(n=Nb(e,`//*[@*[local-name()='Id']='${t}']`),n==null&&(n=Nb(e,`//*[@*[local-name()='ID']='${t}']`),n==null&&(n=Nb(e,`//*[@*[local-name()='id']='${t}']`)))),n}static CreateDocument(e=Upe,t=null,n=null){if(n&&!t)throw new $e(De.PARAM_REQUIRED,"namespaceUri",`Prefix '${n}' requires namespaceUri`);let s="",i="",a="";n&&(s=n+":",i=":"+n),t&&(a=` xmlns${i}="${t}"`);let u=`${s}${e}`;return zs(`<${u}${a}></${u}>`)}static GetChildren(e,t,n){e=Af(e)?e.documentElement:e;let s=[];for(let i=0;i<e.childNodes.length;i++){let a=e.childNodes[i];gi(a)&&a.localName===t&&(a.namespaceURI===n||!n)&&s.push(a)}return s}static GetFirstChild(e,t,n){e=Af(e)?e.documentElement:e;for(let s=0;s<e.childNodes.length;s++){let i=e.childNodes[s];if(gi(i)&&i.localName===t&&(i.namespaceURI===n||!n))return i}return null}static GetChild(e,t,n,s=!0){for(let i=0;i<e.childNodes.length;i++){let a=e.childNodes[i];if(gi(a)&&a.localName===t&&(a.namespaceURI===n||!n))return a}if(s)throw new $e(De.ELEMENT_MISSING,t,e.localName);return null}constructor(e={}){if(this.prefix=this.GetStatic().prefix||null,this.localName=this.GetStatic().localName,this.namespaceURI=this.GetStatic().namespaceURI,e)for(let[t,n]of Object.entries(e))n!==void 0&&(this[t]=n)}get Element(){return this.element}get Prefix(){return this.prefix}set Prefix(e){this.prefix=e}get LocalName(){return this.localName||""}get NamespaceURI(){return this.namespaceURI||null}HasChanged(){let e=this.GetStatic();if(e.items)for(let t in e.items){if(!Object.prototype.hasOwnProperty.call(e.items,t))continue;let n=e.items[t],s=this[t];if(n.parser&&s&&s.HasChanged())return!0}return this.element===null}GetXml(e){if(!(e||this.HasChanged()))return this.element||null;let t=this,n=this.CreateDocument(),s=this.CreateElement(),i=this.GetStatic(),a=this.localName||"";if(i.items)for(let u in i.items){if(!Object.prototype.hasOwnProperty.call(i.items,u))continue;let c=t[u],l=i.items[u];switch(l.type){case Tb:{let h=l,m=h.converter?h.converter.get(c):c;if(h.required&&m==null)throw new $e(De.CONTENT_MISSING,a);(h.defaultValue!==c||h.required)&&(s.textContent=m);break}case Vv:{let h=l,m=h.converter?h.converter.get(c):c;if(h.required&&m==null)throw new $e(De.ATTRIBUTE_MISSING,h.localName,a);(h.defaultValue!==c||h.required)&&(h.namespaceURI?s.setAttributeNS(h.namespaceURI,h.localName||"",m):s.setAttribute(h.localName||"",m));break}case Lv:{let h=l,m=null;if(h.parser){if(h.required&&!c||h.minOccurs&&!c.Count){let g=c?.localName||h.localName;throw new $e(De.ELEMENT_MISSING,g,a)}c&&(m=c.GetXml(c.element===void 0&&(h.required||c.Count)))}else{let g=h.converter?h.converter.get(c):c;if(h.required&&g===void 0)throw new $e(De.ELEMENT_MISSING,h.localName,a);if(c!==h.defaultValue||h.required)if(h.namespaceURI?m=n.createElementNS(h.namespaceURI,`${h.prefix?h.prefix+":":""}${h.localName}`):m=n.createElement(`${h.prefix?h.prefix+":":""}${h.localName}`),Array.isArray(g))for(let y of g){let v=y instanceof r?y.GetXml(!0):y;v!==null&&m&&m.appendChild(v)}else if(g instanceof r){let y=g.GetXml(!0);y&&m&&m.appendChild(y)}else m&&(m.textContent=g)}if(m)if(h.noRoot){let g=[];for(let E=0;E<m.childNodes.length;E++){let w=m.childNodes.item(E);gi(w)&&g.push(w)}let y=h.minOccurs||0,v=h.maxOccurs||1/0;if(g.length<y||g.length>v)throw new $e(De.COLLECTION_LIMIT,c.localName,i.localName);g.forEach(E=>s.appendChild(E.cloneNode(!0)))}else{if(m.childNodes.length<(h.minOccurs||0)||m.childNodes.length>(h.maxOccurs||1/0))throw new $e(De.COLLECTION_LIMIT,c.localName,i.localName);s.appendChild(m)}break}}}return this.OnGetXml(s),this.element=s,s}LoadXml(e){let t,n=this;if(typeof e=="string"?t=zs(e).documentElement:t=e,!t)throw new $e(De.PARAM_REQUIRED,"element");let s=this.GetStatic(),i=this.localName||"";if(!(t.localName===i&&t.namespaceURI==this.NamespaceURI))throw new $e(De.ELEMENT_MALFORMED,i);if(s.items)for(let a in s.items){if(!Object.prototype.hasOwnProperty.call(s.items,a))continue;let u=s.items[a];switch(u.type){case Tb:{let c=u;if(c.required&&!t.textContent)throw new $e(De.CONTENT_MISSING,i);if(!t.textContent)n[a]=c.defaultValue;else{let l=c.converter?c.converter.set(t.textContent):t.textContent;n[a]=l}break}case Vv:{let c=u,l,h;if(!c.localName)throw new $e(De.PARAM_REQUIRED,"localName");if(c.namespaceURI?(l=t.hasAttributeNS.bind(t,c.namespaceURI,c.localName),h=t.getAttributeNS.bind(t,c.namespaceURI,c.localName)):(l=t.hasAttribute.bind(t,c.localName),h=t.getAttribute.bind(t,c.localName)),c.required&&!l())throw new $e(De.ATTRIBUTE_MISSING,c.localName,i);if(!l())n[a]=c.defaultValue;else{let m=h(),g=c.converter&&m?c.converter.set(m):m;n[a]=g}break}case Lv:{let c=u;if(c.noRoot){if(!c.parser)throw new $e(De.XML_EXCEPTION,`Schema for '${c.localName}' with flag noRoot must have 'parser'`);let h=new c.parser;if(!(h instanceof Bd))throw new $e(De.XML_EXCEPTION,`Schema for '${c.localName}' with flag noRoot must have 'parser' like instance of XmlCollection`);h.OnLoadXml(t),delete h.element;let m=c.minOccurs||0,g=c.maxOccurs||1/0;if(h.Count<m||h.Count>g)throw new $e(De.COLLECTION_LIMIT,c.parser.localName,i);n[a]=h;continue}let l=null;for(let h=0;h<t.childNodes.length;h++){let m=t.childNodes.item(h);if(!gi(m))continue;let g=m;if(g.localName===c.localName&&g.namespaceURI==c.namespaceURI){l=g;break}}if(c.required&&!l)throw new $e(De.ELEMENT_MISSING,c.parser?c.parser.localName:c.localName,i);if(c.parser){if(l){let h=new c.parser;h.localName=c.localName,h.namespaceURI=c.namespaceURI,n[a]=h,h.LoadXml(l)}}else if(!l)n[a]=c.defaultValue;else{let h=l.textContent||"",m=c.converter?c.converter.set(h):h;n[a]=m}break}}}this.OnLoadXml(t),this.prefix=t.prefix||"",this.element=t}toString(){let e=this.GetXml();return e?xa(e):""}GetElement(e,t=!0){if(!this.element)throw new $e(De.NULL_PARAM,this.localName);return r.GetElement(this.element,e,t)}GetChildren(e,t){if(!this.element)throw new $e(De.NULL_PARAM,this.localName);return r.GetChildren(this.element,e,t||this.NamespaceURI||void 0)}GetChild(e,t=!0){if(!this.element)throw new $e(De.NULL_PARAM,this.localName);return r.GetChild(this.element,e,this.NamespaceURI||void 0,t)}GetFirstChild(e,t){if(!this.element)throw new $e(De.NULL_PARAM,this.localName);return r.GetFirstChild(this.element,e,t)}GetAttribute(e,t,n=!0){if(!this.element)throw new $e(De.NULL_PARAM,this.localName);return r.GetAttribute(this.element,e,t,n)}IsEmpty(){return this.Element===void 0}OnLoadXml(e){}GetStatic(){return this.constructor}GetPrefix(){return this.Prefix?this.prefix+":":""}OnGetXml(e){}CreateElement(e,t,n=null,s=null){if(!e){let u=this.CreateDocument();if(u)e=u;else throw new $e(De.XML_EXCEPTION,"Document not created")}t=t||this.localName,n=n||this.NamespaceURI,s=s||this.prefix;let i=(s?`${s}:`:"")+t,a=n&&e?e.createElementNS(n,i):e?.createElement(i);return e&&a&&e.importNode(a,!0),a}CreateDocument(){return r.CreateDocument(this.localName,this.NamespaceURI,this.Prefix)}};var Bd=class extends Js{static{o(this,"XmlCollection")}constructor(){super(...arguments),this.MaxOccurs=Number.MAX_VALUE,this.MinOccurs=0,this.items=[]}HasChanged(){let e=super.HasChanged(),t=this.Some(n=>n.HasChanged());return e||t}get Count(){return this.items.length}Item(e){return this.items[e]||null}Add(e){this.items.push(e),this.element=null}Pop(){return this.element=null,this.items.pop()}RemoveAt(e){this.items=this.items.filter((t,n)=>n!==e),this.element=null}Clear(){this.items=[],this.element=null}GetIterator(){return this.items}ForEach(e){this.GetIterator().forEach(e)}Map(e){return new Ic(this.GetIterator().map(e))}Filter(e){return new Ic(this.GetIterator().filter(e))}Sort(e){return new Ic(this.GetIterator().sort(e))}Every(e){return this.GetIterator().every(e)}Some(e){return this.GetIterator().some(e)}IsEmpty(){return this.Count===0}OnGetXml(e){for(let t of this.GetIterator()){let n=t.GetXml();n&&e.appendChild(n)}}OnLoadXml(e){let t=this.GetStatic();if(!t.parser)throw new $e(De.XML_EXCEPTION,`${t.localName} doesn't have required 'parser' in @XmlElement`);for(let n=0;n<e.childNodes.length;n++){let s=e.childNodes.item(n);if(!(gi(s)&&s.localName===t.parser.localName&&s.namespaceURI==t.namespaceURI))continue;let i=s,a=new t.parser;a.LoadXml(i),this.Add(a)}}};var Rd=class extends Ic{static{o(this,"NamespaceManager")}Add(e){e.prefix=e.prefix||"",e.namespace=e.namespace||"",super.Add(e)}GetPrefix(e,t=this.Count-1){let n=this.Count-1;e=e||"",t>n&&(t=n);for(let s=t;s>=0;s--){let i=this.items[s];if(i.prefix===e)return i}return null}GetNamespace(e,t=this.Count-1){let n=this.Count-1;e=e||"",t>n&&(t=n);for(let s=t;s>=0;s--){let i=this.items[s];if(i.namespace===e)return i}return null}};var jpe="[object ArrayBuffer]",vt=class sB{static{o(this,"BufferSourceConverter")}static isArrayBuffer(e){return Object.prototype.toString.call(e)===jpe}static toArrayBuffer(e){return this.isArrayBuffer(e)?e:e.byteLength===e.buffer.byteLength||e.byteOffset===0&&e.byteLength===e.buffer.byteLength?e.buffer:this.toUint8Array(e.buffer).slice(e.byteOffset,e.byteOffset+e.byteLength).buffer}static toUint8Array(e){return this.toView(e,Uint8Array)}static toView(e,t){if(e.constructor===t)return e;if(this.isArrayBuffer(e))return new t(e);if(this.isArrayBufferView(e))return new t(e.buffer,e.byteOffset,e.byteLength);throw new TypeError("The provided value is not of type '(ArrayBuffer or ArrayBufferView)'")}static isBufferSource(e){return this.isArrayBufferView(e)||this.isArrayBuffer(e)}static isArrayBufferView(e){return ArrayBuffer.isView(e)||e&&this.isArrayBuffer(e.buffer)}static isEqual(e,t){let n=sB.toUint8Array(e),s=sB.toUint8Array(t);if(n.length!==s.byteLength)return!1;for(let i=0;i<n.length;i++)if(n[i]!==s[i])return!1;return!0}static concat(...e){let t;Array.isArray(e[0])&&!(e[1]instanceof Function)||Array.isArray(e[0])&&e[1]instanceof Function?t=e[0]:e[e.length-1]instanceof Function?t=e.slice(0,e.length-1):t=e;let n=0;for(let a of t)n+=a.byteLength;let s=new Uint8Array(n),i=0;for(let a of t){let u=this.toUint8Array(a);s.set(u,i),i+=u.length}return e[e.length-1]instanceof Function?this.toView(s,e[e.length-1]):s.buffer}},nB="string",Fpe=/^[0-9a-f\s]+$/i,Mpe=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/,qpe=/^[a-zA-Z0-9-_]+$/,K9=class{static{o(this,"Utf8Converter")}static fromString(e){let t=unescape(encodeURIComponent(e)),n=new Uint8Array(t.length);for(let s=0;s<t.length;s++)n[s]=t.charCodeAt(s);return n.buffer}static toString(e){let t=vt.toUint8Array(e),n="";for(let i=0;i<t.length;i++)n+=String.fromCharCode(t[i]);return decodeURIComponent(escape(n))}},ho=class{static{o(this,"Utf16Converter")}static toString(e,t=!1){let n=vt.toArrayBuffer(e),s=new DataView(n),i="";for(let a=0;a<n.byteLength;a+=2){let u=s.getUint16(a,t);i+=String.fromCharCode(u)}return i}static fromString(e,t=!1){let n=new ArrayBuffer(e.length*2),s=new DataView(n);for(let i=0;i<e.length;i++)s.setUint16(i*2,e.charCodeAt(i),t);return n}},Nt=class Od{static{o(this,"Convert")}static isHex(e){return typeof e===nB&&Fpe.test(e)}static isBase64(e){return typeof e===nB&&Mpe.test(e)}static isBase64Url(e){return typeof e===nB&&qpe.test(e)}static ToString(e,t="utf8"){let n=vt.toUint8Array(e);switch(t.toLowerCase()){case"utf8":return this.ToUtf8String(n);case"binary":return this.ToBinary(n);case"hex":return this.ToHex(n);case"base64":return this.ToBase64(n);case"base64url":return this.ToBase64Url(n);case"utf16le":return ho.toString(n,!0);case"utf16":case"utf16be":return ho.toString(n);default:throw new Error(`Unknown type of encoding '${t}'`)}}static FromString(e,t="utf8"){if(!e)return new ArrayBuffer(0);switch(t.toLowerCase()){case"utf8":return this.FromUtf8String(e);case"binary":return this.FromBinary(e);case"hex":return this.FromHex(e);case"base64":return this.FromBase64(e);case"base64url":return this.FromBase64Url(e);case"utf16le":return ho.fromString(e,!0);case"utf16":case"utf16be":return ho.fromString(e);default:throw new Error(`Unknown type of encoding '${t}'`)}}static ToBase64(e){let t=vt.toUint8Array(e);if(typeof btoa<"u"){let n=this.ToString(t,"binary");return btoa(n)}else return Buffer.from(t).toString("base64")}static FromBase64(e){let t=this.formatString(e);if(!t)return new ArrayBuffer(0);if(!Od.isBase64(t))throw new TypeError("Argument 'base64Text' is not Base64 encoded");return typeof atob<"u"?this.FromBinary(atob(t)):new Uint8Array(Buffer.from(t,"base64")).buffer}static FromBase64Url(e){let t=this.formatString(e);if(!t)return new ArrayBuffer(0);if(!Od.isBase64Url(t))throw new TypeError("Argument 'base64url' is not Base64Url encoded");return this.FromBase64(this.Base64Padding(t.replace(/\-/g,"+").replace(/\_/g,"/")))}static ToBase64Url(e){return this.ToBase64(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/\=/g,"")}static FromUtf8String(e,t=Od.DEFAULT_UTF8_ENCODING){switch(t){case"ascii":return this.FromBinary(e);case"utf8":return K9.fromString(e);case"utf16":case"utf16be":return ho.fromString(e);case"utf16le":case"usc2":return ho.fromString(e,!0);default:throw new Error(`Unknown type of encoding '${t}'`)}}static ToUtf8String(e,t=Od.DEFAULT_UTF8_ENCODING){switch(t){case"ascii":return this.ToBinary(e);case"utf8":return K9.toString(e);case"utf16":case"utf16be":return ho.toString(e);case"utf16le":case"usc2":return ho.toString(e,!0);default:throw new Error(`Unknown type of encoding '${t}'`)}}static FromBinary(e){let t=e.length,n=new Uint8Array(t);for(let s=0;s<t;s++)n[s]=e.charCodeAt(s);return n.buffer}static ToBinary(e){let t=vt.toUint8Array(e),n="";for(let s=0;s<t.length;s++)n+=String.fromCharCode(t[s]);return n}static ToHex(e){let t=vt.toUint8Array(e),n="",s=t.length;for(let i=0;i<s;i++){let a=t[i];a<16&&(n+="0"),n+=a.toString(16)}return n}static FromHex(e){let t=this.formatString(e);if(!t)return new ArrayBuffer(0);if(!Od.isHex(t))throw new TypeError("Argument 'hexString' is not HEX encoded");t.length%2&&(t=`0${t}`);let n=new Uint8Array(t.length/2);for(let s=0;s<t.length;s=s+2){let i=t.slice(s,s+2);n[s/2]=parseInt(i,16)}return n.buffer}static ToUtf16String(e,t=!1){return ho.toString(e,t)}static FromUtf16String(e,t=!1){return ho.fromString(e,t)}static Base64Padding(e){let t=4-e.length%4;if(t<4)for(let n=0;n<t;n++)e+="=";return e}static formatString(e){return e?.replace(/[\n\r\t ]/g,"")||""}};Nt.DEFAULT_UTF8_ENCODING="utf8";function O(r,e,t){var n;return r instanceof Object&&(n=r[e])!==null&&n!==void 0?n:t}o(O,"getParametersValue");function Ib(r,e=0,t=r.byteLength-e,n=!1){let s="";for(let i of new Uint8Array(r,e,t)){let a=i.toString(16).toUpperCase();a.length===1&&(s+="0"),s+=a,n&&(s+=" ")}return s.trim()}o(Ib,"bufferToHexCodes");function Zo(r,e){let t=0;if(r.length===1)return r[0];for(let n=r.length-1;n>=0;n--)t+=r[r.length-1-n]*Math.pow(2,e*n);return t}o(Zo,"utilFromBase");function wa(r,e,t=-1){let n=t,s=r,i=0,a=Math.pow(2,e);for(let u=1;u<8;u++){if(r<a){let c;if(n<0)c=new ArrayBuffer(u),i=u;else{if(n<u)return new ArrayBuffer(0);c=new ArrayBuffer(n),i=n}let l=new Uint8Array(c);for(let h=u-1;h>=0;h--){let m=Math.pow(2,h*e);l[i-h-1]=Math.floor(s/m),s-=l[i-h-1]*m}return c}a*=Math.pow(2,e)}return new ArrayBuffer(0)}o(wa,"utilToBase");function Cf(...r){let e=0,t=0;for(let i of r)e+=i.byteLength;let n=new ArrayBuffer(e),s=new Uint8Array(n);for(let i of r)s.set(new Uint8Array(i),t),t+=i.byteLength;return n}o(Cf,"utilConcatBuf");function _b(...r){let e=0,t=0;for(let i of r)e+=i.length;let n=new ArrayBuffer(e),s=new Uint8Array(n);for(let i of r)s.set(i,t),t+=i.length;return s}o(_b,"utilConcatView");function iB(){let r=new Uint8Array(this.valueHex);if(this.valueHex.byteLength>=2){let u=r[0]===255&&r[1]&128,c=r[0]===0&&(r[1]&128)===0;(u||c)&&this.warnings.push("Needlessly long format")}let e=new ArrayBuffer(this.valueHex.byteLength),t=new Uint8Array(e);for(let u=0;u<this.valueHex.byteLength;u++)t[u]=0;t[0]=r[0]&128;let n=Zo(t,8),s=new ArrayBuffer(this.valueHex.byteLength),i=new Uint8Array(s);for(let u=0;u<this.valueHex.byteLength;u++)i[u]=r[u];return i[0]&=127,Zo(i,8)-n}o(iB,"utilDecodeTC");function G9(r){let e=r<0?r*-1:r,t=128;for(let n=1;n<8;n++){if(e<=t){if(r<0){let a=t-e,u=wa(a,8,n),c=new Uint8Array(u);return c[0]|=128,u}let s=wa(e,8,n),i=new Uint8Array(s);if(i[0]&128){let a=s.slice(0),u=new Uint8Array(a);s=new ArrayBuffer(s.byteLength+1),i=new Uint8Array(s);for(let c=0;c<a.byteLength;c++)i[c+1]=u[c];i[0]=0}return s}t*=Math.pow(2,8)}return new ArrayBuffer(0)}o(G9,"utilEncodeTC");function _c(r,e){if(r.byteLength!==e.byteLength)return!1;let t=new Uint8Array(r),n=new Uint8Array(e);for(let s=0;s<t.length;s++)if(t[s]!==n[s])return!1;return!0}o(_c,"isEqualBuffer");function Ys(r,e){let t=r.toString(10);if(e<t.length)return"";let n=e-t.length,s=new Array(n);for(let a=0;a<n;a++)s[a]="0";return s.join("").concat(t)}o(Ys,"padNumber");var X9="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",W9="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=";function Db(r,e=!1,t=!1,n=!1){let s=0,i=0,a=0,u="",c=e?W9:X9;if(n){let l=0;for(let h=0;h<r.length;h++)if(r.charCodeAt(h)!==0){l=h;break}r=r.slice(l)}for(;s<r.length;){let l=r.charCodeAt(s++);s>=r.length&&(i=1);let h=r.charCodeAt(s++);s>=r.length&&(a=1);let m=r.charCodeAt(s++),g=l>>2,y=(l&3)<<4|h>>4,v=(h&15)<<2|m>>6,E=m&63;i===1?v=E=64:a===1&&(E=64),t?v===64?u+=`${c.charAt(g)}${c.charAt(y)}`:E===64?u+=`${c.charAt(g)}${c.charAt(y)}${c.charAt(v)}`:u+=`${c.charAt(g)}${c.charAt(y)}${c.charAt(v)}${c.charAt(E)}`:u+=`${c.charAt(g)}${c.charAt(y)}${c.charAt(v)}${c.charAt(E)}`}return u}o(Db,"toBase64");function Pd(r,e=!1,t=!1){let n=e?W9:X9;function s(c){for(let l=0;l<64;l++)if(n.charAt(l)===c)return l;return 64}o(s,"indexOf");function i(c){return c===64?0:c}o(i,"test");let a=0,u="";for(;a<r.length;){let c=s(r.charAt(a++)),l=a>=r.length?0:s(r.charAt(a++)),h=a>=r.length?0:s(r.charAt(a++)),m=a>=r.length?0:s(r.charAt(a++)),g=i(c)<<2|i(l)>>4,y=(i(l)&15)<<4|i(h)>>2,v=(i(h)&3)<<6|i(m);u+=String.fromCharCode(g),h!==64&&(u+=String.fromCharCode(y)),m!==64&&(u+=String.fromCharCode(v))}if(t){let c=u.length,l=-1;for(let h=c-1;h>=0;h--)if(u.charCodeAt(h)!==0){l=h;break}l!==-1?u=u.slice(0,l+1):u=""}return u}o(Pd,"fromBase64");function jv(r){let e="",t=new Uint8Array(r);for(let n of t)e+=String.fromCharCode(n);return e}o(jv,"arrayBufferToString");function Nf(r){let e=r.length,t=new ArrayBuffer(e),n=new Uint8Array(t);for(let s=0;s<e;s++)n[s]=r.charCodeAt(s);return t}o(Nf,"stringToArrayBuffer");var Hpe=Math.log(2);function z9(r){let e=Math.log(r)/Hpe,t=Math.floor(e),n=Math.round(e);return t===n?t:n}o(z9,"nearestPowerOf2");function ke(r,e){for(let t of e)delete r[t]}o(ke,"clearProps");function Bb(){if(typeof BigInt>"u")throw new Error("BigInt is not defined. Your environment doesn't implement BigInt.")}o(Bb,"assertBigInt");function cB(r){let e=0,t=0;for(let s=0;s<r.length;s++){let i=r[s];e+=i.byteLength}let n=new Uint8Array(e);for(let s=0;s<r.length;s++){let i=r[s];n.set(new Uint8Array(i),t),t+=i.byteLength}return n.buffer}o(cB,"concat");function eu(r,e,t,n){return e instanceof Uint8Array?e.byteLength?t<0?(r.error="Wrong parameter: inputOffset less than zero",!1):n<0?(r.error="Wrong parameter: inputLength less than zero",!1):e.byteLength-t-n<0?(r.error="End of input reached before message was fully decoded (inconsistent offset and length values)",!1):!0:(r.error="Wrong parameter: inputBuffer has zero length",!1):(r.error="Wrong parameter: inputBuffer must be 'Uint8Array'",!1)}o(eu,"checkBufferParams");var lB=class{static{o(this,"ViewWriter")}constructor(){this.items=[]}write(e){this.items.push(e)}final(){return cB(this.items)}},Fv=[new Uint8Array([1])],Y9="0123456789",aB="name",Q9="valueHexView",Kpe="isHexOnly",$pe="idBlock",Gpe="tagClass",Xpe="tagNumber",Wpe="isConstructed",zpe="fromBER",Jpe="toBER",Ype="local",Qs="",po=new ArrayBuffer(0),Rb=new Uint8Array(0),qv="EndOfContent",eq="OCTET STRING",tq="BIT STRING";function tu(r){var e;return e=class extends r{static{o(this,"Some")}get valueHex(){return this.valueHexView.slice().buffer}set valueHex(n){this.valueHexView=new Uint8Array(n)}constructor(...n){var s;super(...n);let i=n[0]||{};this.isHexOnly=(s=i.isHexOnly)!==null&&s!==void 0?s:!1,this.valueHexView=i.valueHex?vt.toUint8Array(i.valueHex):Rb}fromBER(n,s,i){let a=n instanceof ArrayBuffer?new Uint8Array(n):n;if(!eu(this,a,s,i))return-1;let u=s+i;return this.valueHexView=a.subarray(s,u),this.valueHexView.length?(this.blockLength=i,u):(this.warnings.push("Zero buffer length"),s)}toBER(n=!1){return this.isHexOnly?n?new ArrayBuffer(this.valueHexView.byteLength):this.valueHexView.byteLength===this.valueHexView.buffer.byteLength?this.valueHexView.buffer:this.valueHexView.slice().buffer:(this.error="Flag 'isHexOnly' is not set, abort",po)}toJSON(){return{...super.toJSON(),isHexOnly:this.isHexOnly,valueHex:Nt.ToHex(this.valueHexView)}}},e.NAME="hexBlock",e}o(tu,"HexBlock");var Tf=class{static{o(this,"LocalBaseBlock")}static blockName(){return this.NAME}get valueBeforeDecode(){return this.valueBeforeDecodeView.slice().buffer}set valueBeforeDecode(e){this.valueBeforeDecodeView=new Uint8Array(e)}constructor({blockLength:e=0,error:t=Qs,warnings:n=[],valueBeforeDecode:s=Rb}={}){this.blockLength=e,this.error=t,this.warnings=n,this.valueBeforeDecodeView=vt.toUint8Array(s)}toJSON(){return{blockName:this.constructor.NAME,blockLength:this.blockLength,error:this.error,warnings:this.warnings,valueBeforeDecode:Nt.ToHex(this.valueBeforeDecodeView)}}};Tf.NAME="baseBlock";var Zs=class extends Tf{static{o(this,"ValueBlock")}fromBER(e,t,n){throw TypeError("User need to make a specific function in a class which extends 'ValueBlock'")}toBER(e,t){throw TypeError("User need to make a specific function in a class which extends 'ValueBlock'")}};Zs.NAME="valueBlock";var rq=class extends tu(Tf){static{o(this,"LocalIdentificationBlock")}constructor({idBlock:e={}}={}){var t,n,s,i;super(),e?(this.isHexOnly=(t=e.isHexOnly)!==null&&t!==void 0?t:!1,this.valueHexView=e.valueHex?vt.toUint8Array(e.valueHex):Rb,this.tagClass=(n=e.tagClass)!==null&&n!==void 0?n:-1,this.tagNumber=(s=e.tagNumber)!==null&&s!==void 0?s:-1,this.isConstructed=(i=e.isConstructed)!==null&&i!==void 0?i:!1):(this.tagClass=-1,this.tagNumber=-1,this.isConstructed=!1)}toBER(e=!1){let t=0;switch(this.tagClass){case 1:t|=0;break;case 2:t|=64;break;case 3:t|=128;break;case 4:t|=192;break;default:return this.error="Unknown tag class",po}if(this.isConstructed&&(t|=32),this.tagNumber<31&&!this.isHexOnly){let s=new Uint8Array(1);if(!e){let i=this.tagNumber;i&=31,t|=i,s[0]=t}return s.buffer}if(!this.isHexOnly){let s=wa(this.tagNumber,7),i=new Uint8Array(s),a=s.byteLength,u=new Uint8Array(a+1);if(u[0]=t|31,!e){for(let c=0;c<a-1;c++)u[c+1]=i[c]|128;u[a]=i[a-1]}return u.buffer}let n=new Uint8Array(this.valueHexView.byteLength+1);if(n[0]=t|31,!e){let s=this.valueHexView;for(let i=0;i<s.length-1;i++)n[i+1]=s[i]|128;n[this.valueHexView.byteLength]=s[s.length-1]}return n.buffer}fromBER(e,t,n){let s=vt.toUint8Array(e);if(!eu(this,s,t,n))return-1;let i=s.subarray(t,t+n);if(i.length===0)return this.error="Zero buffer length",-1;switch(i[0]&192){case 0:this.tagClass=1;break;case 64:this.tagClass=2;break;case 128:this.tagClass=3;break;case 192:this.tagClass=4;break;default:return this.error="Unknown tag class",-1}this.isConstructed=(i[0]&32)===32,this.isHexOnly=!1;let u=i[0]&31;if(u!==31)this.tagNumber=u,this.blockLength=1;else{let c=1,l=this.valueHexView=new Uint8Array(255),h=255;for(;i[c]&128;){if(l[c-1]=i[c]&127,c++,c>=i.length)return this.error="End of input reached before message was fully decoded",-1;if(c===h){h+=255;let g=new Uint8Array(h);for(let y=0;y<l.length;y++)g[y]=l[y];l=this.valueHexView=new Uint8Array(h)}}this.blockLength=c+1,l[c-1]=i[c]&127;let m=new Uint8Array(c);for(let g=0;g<c;g++)m[g]=l[g];l=this.valueHexView=new Uint8Array(c),l.set(m),this.blockLength<=9?this.tagNumber=Zo(l,7):(this.isHexOnly=!0,this.warnings.push("Tag too long, represented as hex-coded"))}if(this.tagClass===1&&this.isConstructed)switch(this.tagNumber){case 1:case 2:case 5:case 6:case 9:case 13:case 14:case 23:case 24:case 31:case 32:case 33:case 34:return this.error="Constructed encoding used for primitive type",-1}return t+this.blockLength}toJSON(){return{...super.toJSON(),tagClass:this.tagClass,tagNumber:this.tagNumber,isConstructed:this.isConstructed}}};rq.NAME="identificationBlock";var nq=class extends Tf{static{o(this,"LocalLengthBlock")}constructor({lenBlock:e={}}={}){var t,n,s;super(),this.isIndefiniteForm=(t=e.isIndefiniteForm)!==null&&t!==void 0?t:!1,this.longFormUsed=(n=e.longFormUsed)!==null&&n!==void 0?n:!1,this.length=(s=e.length)!==null&&s!==void 0?s:0}fromBER(e,t,n){let s=vt.toUint8Array(e);if(!eu(this,s,t,n))return-1;let i=s.subarray(t,t+n);if(i.length===0)return this.error="Zero buffer length",-1;if(i[0]===255)return this.error="Length block 0xFF is reserved by standard",-1;if(this.isIndefiniteForm=i[0]===128,this.isIndefiniteForm)return this.blockLength=1,t+this.blockLength;if(this.longFormUsed=!!(i[0]&128),this.longFormUsed===!1)return this.length=i[0],this.blockLength=1,t+this.blockLength;let a=i[0]&127;if(a>8)return this.error="Too big integer",-1;if(a+1>i.length)return this.error="End of input reached before message was fully decoded",-1;let u=t+1,c=s.subarray(u,u+a);return c[a-1]===0&&this.warnings.push("Needlessly long encoded length"),this.length=Zo(c,8),this.longFormUsed&&this.length<=127&&this.warnings.push("Unnecessary usage of long length form"),this.blockLength=a+1,t+this.blockLength}toBER(e=!1){let t,n;if(this.length>127&&(this.longFormUsed=!0),this.isIndefiniteForm)return t=new ArrayBuffer(1),e===!1&&(n=new Uint8Array(t),n[0]=128),t;if(this.longFormUsed){let s=wa(this.length,8);if(s.byteLength>127)return this.error="Too big length",po;if(t=new ArrayBuffer(s.byteLength+1),e)return t;let i=new Uint8Array(s);n=new Uint8Array(t),n[0]=s.byteLength|128;for(let a=0;a<s.byteLength;a++)n[a+1]=i[a];return t}return t=new ArrayBuffer(1),e===!1&&(n=new Uint8Array(t),n[0]=this.length),t}toJSON(){return{...super.toJSON(),isIndefiniteForm:this.isIndefiniteForm,longFormUsed:this.longFormUsed,length:this.length}}};nq.NAME="lengthBlock";var ht={},_s=class extends Tf{static{o(this,"BaseBlock")}constructor({name:e=Qs,optional:t=!1,primitiveSchema:n,...s}={},i){super(s),this.name=e,this.optional=t,n&&(this.primitiveSchema=n),this.idBlock=new rq(s),this.lenBlock=new nq(s),this.valueBlock=i?new i(s):new Zs(s)}fromBER(e,t,n){let s=this.valueBlock.fromBER(e,t,this.lenBlock.isIndefiniteForm?n:this.lenBlock.length);return s===-1?(this.error=this.valueBlock.error,s):(this.idBlock.error.length||(this.blockLength+=this.idBlock.blockLength),this.lenBlock.error.length||(this.blockLength+=this.lenBlock.blockLength),this.valueBlock.error.length||(this.blockLength+=this.valueBlock.blockLength),s)}toBER(e,t){let n=t||new lB;t||sq(this);let s=this.idBlock.toBER(e);if(n.write(s),this.lenBlock.isIndefiniteForm)n.write(new Uint8Array([128]).buffer),this.valueBlock.toBER(e,n),n.write(new ArrayBuffer(2));else{let i=this.valueBlock.toBER(e);this.lenBlock.length=i.byteLength;let a=this.lenBlock.toBER(e);n.write(a),n.write(i)}return t?po:n.final()}toJSON(){let e={...super.toJSON(),idBlock:this.idBlock.toJSON(),lenBlock:this.lenBlock.toJSON(),valueBlock:this.valueBlock.toJSON(),name:this.name,optional:this.optional};return this.primitiveSchema&&(e.primitiveSchema=this.primitiveSchema.toJSON()),e}toString(e="ascii"){return e==="ascii"?this.onAsciiEncoding():Nt.ToHex(this.toBER())}onAsciiEncoding(){let e=this.constructor.NAME,t=Nt.ToHex(this.valueBlock.valueBeforeDecodeView);return`${e} : ${t}`}isEqual(e){if(this===e)return!0;if(!(e instanceof this.constructor))return!1;let t=this.toBER(),n=e.toBER();return _c(t,n)}};_s.NAME="BaseBlock";function sq(r){var e;if(r instanceof ht.Constructed)for(let t of r.valueBlock.value)sq(t)&&(r.lenBlock.isIndefiniteForm=!0);return!!(!((e=r.lenBlock)===null||e===void 0)&&e.isIndefiniteForm)}o(sq,"prepareIndefiniteForm");var iq=class extends _s{static{o(this,"BaseStringBlock")}getValue(){return this.valueBlock.value}setValue(e){this.valueBlock.value=e}constructor({value:e=Qs,...t}={},n){super(t,n),e&&this.fromString(e)}fromBER(e,t,n){let s=this.valueBlock.fromBER(e,t,this.lenBlock.isIndefiniteForm?n:this.lenBlock.length);return s===-1?(this.error=this.valueBlock.error,s):(this.fromBuffer(this.valueBlock.valueHexView),this.idBlock.error.length||(this.blockLength+=this.idBlock.blockLength),this.lenBlock.error.length||(this.blockLength+=this.lenBlock.blockLength),this.valueBlock.error.length||(this.blockLength+=this.valueBlock.blockLength),s)}onAsciiEncoding(){return`${this.constructor.NAME} : '${this.valueBlock.value}'`}};iq.NAME="BaseStringBlock";var aq=class extends tu(Zs){static{o(this,"LocalPrimitiveValueBlock")}constructor({isHexOnly:e=!0,...t}={}){super(t),this.isHexOnly=e}};aq.NAME="PrimitiveValueBlock";var oq,xt=class extends _s{static{o(this,"Primitive")}constructor(e={}){super(e,aq),this.idBlock.isConstructed=!1}};oq=xt;ht.Primitive=oq;xt.NAME="PRIMITIVE";function Qpe(r,e){if(r instanceof e)return r;let t=new e;return t.idBlock=r.idBlock,t.lenBlock=r.lenBlock,t.warnings=r.warnings,t.valueBeforeDecodeView=r.valueBeforeDecodeView,t}o(Qpe,"localChangeType");function Hv(r,e=0,t=r.length){let n=e,s=new _s({},Zs),i=new Tf;if(!eu(i,r,e,t))return s.error=i.error,{offset:-1,result:s};if(!r.subarray(e,e+t).length)return s.error="Zero buffer length",{offset:-1,result:s};let u=s.idBlock.fromBER(r,e,t);if(s.idBlock.warnings.length&&s.warnings.concat(s.idBlock.warnings),u===-1)return s.error=s.idBlock.error,{offset:-1,result:s};if(e=u,t-=s.idBlock.blockLength,u=s.lenBlock.fromBER(r,e,t),s.lenBlock.warnings.length&&s.warnings.concat(s.lenBlock.warnings),u===-1)return s.error=s.lenBlock.error,{offset:-1,result:s};if(e=u,t-=s.lenBlock.blockLength,!s.idBlock.isConstructed&&s.lenBlock.isIndefiniteForm)return s.error="Indefinite length form used for primitive encoding form",{offset:-1,result:s};let c=_s;switch(s.idBlock.tagClass){case 1:if(s.idBlock.tagNumber>=37&&s.idBlock.isHexOnly===!1)return s.error="UNIVERSAL 37 and upper tags are reserved by ASN.1 standard",{offset:-1,result:s};switch(s.idBlock.tagNumber){case 0:if(s.idBlock.isConstructed&&s.lenBlock.length>0)return s.error="Type [UNIVERSAL 0] is reserved",{offset:-1,result:s};c=ht.EndOfContent;break;case 1:c=ht.Boolean;break;case 2:c=ht.Integer;break;case 3:c=ht.BitString;break;case 4:c=ht.OctetString;break;case 5:c=ht.Null;break;case 6:c=ht.ObjectIdentifier;break;case 10:c=ht.Enumerated;break;case 12:c=ht.Utf8String;break;case 13:c=ht.RelativeObjectIdentifier;break;case 14:c=ht.TIME;break;case 15:return s.error="[UNIVERSAL 15] is reserved by ASN.1 standard",{offset:-1,result:s};case 16:c=ht.Sequence;break;case 17:c=ht.Set;break;case 18:c=ht.NumericString;break;case 19:c=ht.PrintableString;break;case 20:c=ht.TeletexString;break;case 21:c=ht.VideotexString;break;case 22:c=ht.IA5String;break;case 23:c=ht.UTCTime;break;case 24:c=ht.GeneralizedTime;break;case 25:c=ht.GraphicString;break;case 26:c=ht.VisibleString;break;case 27:c=ht.GeneralString;break;case 28:c=ht.UniversalString;break;case 29:c=ht.CharacterString;break;case 30:c=ht.BmpString;break;case 31:c=ht.DATE;break;case 32:c=ht.TimeOfDay;break;case 33:c=ht.DateTime;break;case 34:c=ht.Duration;break;default:{let l=s.idBlock.isConstructed?new ht.Constructed:new ht.Primitive;l.idBlock=s.idBlock,l.lenBlock=s.lenBlock,l.warnings=s.warnings,s=l}}break;case 2:case 3:case 4:default:c=s.idBlock.isConstructed?ht.Constructed:ht.Primitive}return s=Qpe(s,c),u=s.fromBER(r,e,s.lenBlock.isIndefiniteForm?t:s.lenBlock.length),s.valueBeforeDecodeView=r.subarray(n,n+s.blockLength),{offset:u,result:s}}o(Hv,"localFromBER");function en(r){if(!r.byteLength){let e=new _s({},Zs);return e.error="Input buffer has zero length",{offset:-1,result:e}}return Hv(vt.toUint8Array(r).slice(),0,r.byteLength)}o(en,"fromBER");function Zpe(r,e){return r?1:e}o(Zpe,"checkLen");var Dc=class extends Zs{static{o(this,"LocalConstructedValueBlock")}constructor({value:e=[],isIndefiniteForm:t=!1,...n}={}){super(n),this.value=e,this.isIndefiniteForm=t}fromBER(e,t,n){let s=vt.toUint8Array(e);if(!eu(this,s,t,n))return-1;if(this.valueBeforeDecodeView=s.subarray(t,t+n),this.valueBeforeDecodeView.length===0)return this.warnings.push("Zero buffer length"),t;let i=t;for(;Zpe(this.isIndefiniteForm,n)>0;){let a=Hv(s,i,n);if(a.offset===-1)return this.error=a.result.error,this.warnings.concat(a.result.warnings),-1;if(i=a.offset,this.blockLength+=a.result.blockLength,n-=a.result.blockLength,this.value.push(a.result),this.isIndefiniteForm&&a.result.constructor.NAME===qv)break}return this.isIndefiniteForm&&(this.value[this.value.length-1].constructor.NAME===qv?this.value.pop():this.warnings.push("No EndOfContent block encoded")),i}toBER(e,t){let n=t||new lB;for(let s=0;s<this.value.length;s++)this.value[s].toBER(e,n);return t?po:n.final()}toJSON(){let e={...super.toJSON(),isIndefiniteForm:this.isIndefiniteForm,value:[]};for(let t of this.value)e.value.push(t.toJSON());return e}};Dc.NAME="ConstructedValueBlock";var uq,fe=class extends _s{static{o(this,"Constructed")}constructor(e={}){super(e,Dc),this.idBlock.isConstructed=!0}fromBER(e,t,n){this.valueBlock.isIndefiniteForm=this.lenBlock.isIndefiniteForm;let s=this.valueBlock.fromBER(e,t,this.lenBlock.isIndefiniteForm?n:this.lenBlock.length);return s===-1?(this.error=this.valueBlock.error,s):(this.idBlock.error.length||(this.blockLength+=this.idBlock.blockLength),this.lenBlock.error.length||(this.blockLength+=this.lenBlock.blockLength),this.valueBlock.error.length||(this.blockLength+=this.valueBlock.blockLength),s)}onAsciiEncoding(){let e=[];for(let n of this.valueBlock.value)e.push(n.toString("ascii").split(`
|
|
109
|
-
`).map(s=>` ${s}`).join(`
|
|
110
|
-
`));let t=this.idBlock.tagClass===3?`[${this.idBlock.tagNumber}]`:this.constructor.NAME;return e.length?`${t} :
|
|
111
|
-
${e.join(`
|
|
112
|
-
`)}`:`${t} :`}};uq=fe;ht.Constructed=uq;fe.NAME="CONSTRUCTED";var cq=class extends Zs{static{o(this,"LocalEndOfContentValueBlock")}fromBER(e,t,n){return t}toBER(e){return po}};cq.override="EndOfContentValueBlock";var lq,fq=class extends _s{static{o(this,"EndOfContent")}constructor(e={}){super(e,cq),this.idBlock.tagClass=1,this.idBlock.tagNumber=0}};lq=fq;ht.EndOfContent=lq;fq.NAME=qv;var hq,tn=class extends _s{static{o(this,"Null")}constructor(e={}){super(e,Zs),this.idBlock.tagClass=1,this.idBlock.tagNumber=5}fromBER(e,t,n){return this.lenBlock.length>0&&this.warnings.push("Non-zero length of value block for Null type"),this.idBlock.error.length||(this.blockLength+=this.idBlock.blockLength),this.lenBlock.error.length||(this.blockLength+=this.lenBlock.blockLength),this.blockLength+=n,t+n>e.byteLength?(this.error="End of input reached before message was fully decoded (inconsistent offset and length values)",-1):t+n}toBER(e,t){let n=new ArrayBuffer(2);if(!e){let s=new Uint8Array(n);s[0]=5,s[1]=0}return t&&t.write(n),n}onAsciiEncoding(){return`${this.constructor.NAME}`}};hq=tn;ht.Null=hq;tn.NAME="NULL";var pq=class extends tu(Zs){static{o(this,"LocalBooleanValueBlock")}get value(){for(let e of this.valueHexView)if(e>0)return!0;return!1}set value(e){this.valueHexView[0]=e?255:0}constructor({value:e,...t}={}){super(t),t.valueHex?this.valueHexView=vt.toUint8Array(t.valueHex):this.valueHexView=new Uint8Array(1),e&&(this.value=e)}fromBER(e,t,n){let s=vt.toUint8Array(e);return eu(this,s,t,n)?(this.valueHexView=s.subarray(t,t+n),n>1&&this.warnings.push("Boolean value encoded in more then 1 octet"),this.isHexOnly=!0,iB.call(this),this.blockLength=n,t+n):-1}toBER(){return this.valueHexView.slice()}toJSON(){return{...super.toJSON(),value:this.value}}};pq.NAME="BooleanValueBlock";var dq,Ea=class extends _s{static{o(this,"Boolean")}getValue(){return this.valueBlock.value}setValue(e){this.valueBlock.value=e}constructor(e={}){super(e,pq),this.idBlock.tagClass=1,this.idBlock.tagNumber=1}onAsciiEncoding(){return`${this.constructor.NAME} : ${this.getValue}`}};dq=Ea;ht.Boolean=dq;Ea.NAME="BOOLEAN";var mq=class extends tu(Dc){static{o(this,"LocalOctetStringValueBlock")}constructor({isConstructed:e=!1,...t}={}){super(t),this.isConstructed=e}fromBER(e,t,n){let s=0;if(this.isConstructed){if(this.isHexOnly=!1,s=Dc.prototype.fromBER.call(this,e,t,n),s===-1)return s;for(let i=0;i<this.value.length;i++){let a=this.value[i].constructor.NAME;if(a===qv){if(this.isIndefiniteForm)break;return this.error="EndOfContent is unexpected, OCTET STRING may consists of OCTET STRINGs only",-1}if(a!==eq)return this.error="OCTET STRING may consists of OCTET STRINGs only",-1}}else this.isHexOnly=!0,s=super.fromBER(e,t,n),this.blockLength=n;return s}toBER(e,t){return this.isConstructed?Dc.prototype.toBER.call(this,e,t):e?new ArrayBuffer(this.valueHexView.byteLength):this.valueHexView.slice().buffer}toJSON(){return{...super.toJSON(),isConstructed:this.isConstructed}}};mq.NAME="OctetStringValueBlock";var fB,qe=class extends _s{static{o(this,"OctetString")}constructor({idBlock:e={},lenBlock:t={},...n}={}){var s,i;(s=n.isConstructed)!==null&&s!==void 0||(n.isConstructed=!!(!((i=n.value)===null||i===void 0)&&i.length)),super({idBlock:{isConstructed:n.isConstructed,...e},lenBlock:{...t,isIndefiniteForm:!!n.isIndefiniteForm},...n},mq),this.idBlock.tagClass=1,this.idBlock.tagNumber=4}fromBER(e,t,n){if(this.valueBlock.isConstructed=this.idBlock.isConstructed,this.valueBlock.isIndefiniteForm=this.lenBlock.isIndefiniteForm,n===0)return this.idBlock.error.length===0&&(this.blockLength+=this.idBlock.blockLength),this.lenBlock.error.length===0&&(this.blockLength+=this.lenBlock.blockLength),t;if(!this.valueBlock.isConstructed){let i=(e instanceof ArrayBuffer?new Uint8Array(e):e).subarray(t,t+n);try{if(i.byteLength){let a=Hv(i,0,i.byteLength);a.offset!==-1&&a.offset===n&&(this.valueBlock.value=[a.result])}}catch{}}return super.fromBER(e,t,n)}onAsciiEncoding(){if(this.valueBlock.isConstructed||this.valueBlock.value&&this.valueBlock.value.length)return fe.prototype.onAsciiEncoding.call(this);let e=this.constructor.NAME,t=Nt.ToHex(this.valueBlock.valueHexView);return`${e} : ${t}`}getValue(){if(!this.idBlock.isConstructed)return this.valueBlock.valueHexView.slice().buffer;let e=[];for(let t of this.valueBlock.value)t instanceof fB&&e.push(t.valueBlock.valueHexView);return vt.concat(e)}};fB=qe;ht.OctetString=fB;qe.NAME=eq;var gq=class extends tu(Dc){static{o(this,"LocalBitStringValueBlock")}constructor({unusedBits:e=0,isConstructed:t=!1,...n}={}){super(n),this.unusedBits=e,this.isConstructed=t,this.blockLength=this.valueHexView.byteLength}fromBER(e,t,n){if(!n)return t;let s=-1;if(this.isConstructed){if(s=Dc.prototype.fromBER.call(this,e,t,n),s===-1)return s;for(let u of this.value){let c=u.constructor.NAME;if(c===qv){if(this.isIndefiniteForm)break;return this.error="EndOfContent is unexpected, BIT STRING may consists of BIT STRINGs only",-1}if(c!==tq)return this.error="BIT STRING may consists of BIT STRINGs only",-1;let l=u.valueBlock;if(this.unusedBits>0&&l.unusedBits>0)return this.error='Using of "unused bits" inside constructive BIT STRING allowed for least one only',-1;this.unusedBits=l.unusedBits}return s}let i=vt.toUint8Array(e);if(!eu(this,i,t,n))return-1;let a=i.subarray(t,t+n);if(this.unusedBits=a[0],this.unusedBits>7)return this.error="Unused bits for BitString must be in range 0-7",-1;if(!this.unusedBits){let u=a.subarray(1);try{if(u.byteLength){let c=Hv(u,0,u.byteLength);c.offset!==-1&&c.offset===n-1&&(this.value=[c.result])}}catch{}}return this.valueHexView=a.subarray(1),this.blockLength=a.length,t+n}toBER(e,t){if(this.isConstructed)return Dc.prototype.toBER.call(this,e,t);if(e)return new ArrayBuffer(this.valueHexView.byteLength+1);if(!this.valueHexView.byteLength){let s=new Uint8Array(1);return s[0]=0,s.buffer}let n=new Uint8Array(this.valueHexView.length+1);return n[0]=this.unusedBits,n.set(this.valueHexView,1),n.buffer}toJSON(){return{...super.toJSON(),unusedBits:this.unusedBits,isConstructed:this.isConstructed}}};gq.NAME="BitStringValueBlock";var vq,Gt=class extends _s{static{o(this,"BitString")}constructor({idBlock:e={},lenBlock:t={},...n}={}){var s,i;(s=n.isConstructed)!==null&&s!==void 0||(n.isConstructed=!!(!((i=n.value)===null||i===void 0)&&i.length)),super({idBlock:{isConstructed:n.isConstructed,...e},lenBlock:{...t,isIndefiniteForm:!!n.isIndefiniteForm},...n},gq),this.idBlock.tagClass=1,this.idBlock.tagNumber=3}fromBER(e,t,n){return this.valueBlock.isConstructed=this.idBlock.isConstructed,this.valueBlock.isIndefiniteForm=this.lenBlock.isIndefiniteForm,super.fromBER(e,t,n)}onAsciiEncoding(){if(this.valueBlock.isConstructed||this.valueBlock.value&&this.valueBlock.value.length)return fe.prototype.onAsciiEncoding.call(this);{let e=[],t=this.valueBlock.valueHexView;for(let a of t)e.push(a.toString(2).padStart(8,"0"));let n=e.join(""),s=this.constructor.NAME,i=n.substring(0,n.length-this.valueBlock.unusedBits);return`${s} : ${i}`}}};vq=Gt;ht.BitString=vq;Gt.NAME=tq;var yq;function ede(r,e){let t=new Uint8Array([0]),n=new Uint8Array(r),s=new Uint8Array(e),i=n.slice(0),a=i.length-1,u=s.slice(0),c=u.length-1,l=0,h=c<a?a:c,m=0;for(let g=h;g>=0;g--,m++){switch(!0){case m<u.length:l=i[a-m]+u[c-m]+t[0];break;default:l=i[a-m]+t[0]}switch(t[0]=l/10,!0){case m>=i.length:i=_b(new Uint8Array([l%10]),i);break;default:i[a-m]=l%10}}return t[0]>0&&(i=_b(t,i)),i}o(ede,"viewAdd");function Z9(r){if(r>=Fv.length)for(let e=Fv.length;e<=r;e++){let t=new Uint8Array([0]),n=Fv[e-1].slice(0);for(let s=n.length-1;s>=0;s--){let i=new Uint8Array([(n[s]<<1)+t[0]]);t[0]=i[0]/10,n[s]=i[0]%10}t[0]>0&&(n=_b(t,n)),Fv.push(n)}return Fv[r]}o(Z9,"power2");function tde(r,e){let t=0,n=new Uint8Array(r),s=new Uint8Array(e),i=n.slice(0),a=i.length-1,u=s.slice(0),c=u.length-1,l,h=0;for(let m=c;m>=0;m--,h++)switch(l=i[a-h]-u[c-h]-t,!0){case l<0:t=1,i[a-h]=l+10;break;default:t=0,i[a-h]=l}if(t>0)for(let m=a-c+1;m>=0;m--,h++)if(l=i[a-h]-t,l<0)t=1,i[a-h]=l+10;else{t=0,i[a-h]=l;break}return i.slice()}o(tde,"viewSub");var hB=class extends tu(Zs){static{o(this,"LocalIntegerValueBlock")}setValueHex(){this.valueHexView.length>=4?(this.warnings.push("Too big Integer for decoding, hex only"),this.isHexOnly=!0,this._valueDec=0):(this.isHexOnly=!1,this.valueHexView.length>0&&(this._valueDec=iB.call(this)))}constructor({value:e,...t}={}){super(t),this._valueDec=0,t.valueHex&&this.setValueHex(),e!==void 0&&(this.valueDec=e)}set valueDec(e){this._valueDec=e,this.isHexOnly=!1,this.valueHexView=new Uint8Array(G9(e))}get valueDec(){return this._valueDec}fromDER(e,t,n,s=0){let i=this.fromBER(e,t,n);if(i===-1)return i;let a=this.valueHexView;return a[0]===0&&(a[1]&128)!==0?this.valueHexView=a.subarray(1):s!==0&&a.length<s&&(s-a.length>1&&(s=a.length+1),this.valueHexView=a.subarray(s-a.length)),i}toDER(e=!1){let t=this.valueHexView;switch(!0){case(t[0]&128)!==0:{let n=new Uint8Array(this.valueHexView.length+1);n[0]=0,n.set(t,1),this.valueHexView=n}break;case(t[0]===0&&(t[1]&128)===0):this.valueHexView=this.valueHexView.subarray(1);break}return this.toBER(e)}fromBER(e,t,n){let s=super.fromBER(e,t,n);return s===-1||this.setValueHex(),s}toBER(e){return e?new ArrayBuffer(this.valueHexView.length):this.valueHexView.slice().buffer}toJSON(){return{...super.toJSON(),valueDec:this.valueDec}}toString(){let e=this.valueHexView.length*8-1,t=new Uint8Array(this.valueHexView.length*8/3),n=0,s,i=this.valueHexView,a="",u=!1;for(let c=i.byteLength-1;c>=0;c--){s=i[c];for(let l=0;l<8;l++){if((s&1)===1)switch(n){case e:t=tde(Z9(n),t),a="-";break;default:t=ede(t,Z9(n))}n++,s>>=1}}for(let c=0;c<t.length;c++)t[c]&&(u=!0),u&&(a+=Y9.charAt(t[c]));return u===!1&&(a+=Y9.charAt(0)),a}};yq=hB;hB.NAME="IntegerValueBlock";Object.defineProperty(yq.prototype,"valueHex",{set:o(function(r){this.valueHexView=new Uint8Array(r),this.setValueHex()},"set"),get:o(function(){return this.valueHexView.slice().buffer},"get")});var Mv,xe=class extends _s{static{o(this,"Integer")}constructor(e={}){super(e,hB),this.idBlock.tagClass=1,this.idBlock.tagNumber=2}toBigInt(){return Bb(),BigInt(this.valueBlock.toString())}static fromBigInt(e){Bb();let t=BigInt(e),n=new lB,s=t.toString(16).replace(/^-/,""),i=new Uint8Array(Nt.FromHex(s));if(t<0){let u=new Uint8Array(i.length+(i[0]&128?1:0));u[0]|=128;let l=BigInt(`0x${Nt.ToHex(u)}`)+t,h=vt.toUint8Array(Nt.FromHex(l.toString(16)));h[0]|=128,n.write(h)}else i[0]&128&&n.write(new Uint8Array([0])),n.write(i);return new Mv({valueHex:n.final()})}convertToDER(){let e=new Mv({valueHex:this.valueBlock.valueHexView});return e.valueBlock.toDER(),e}convertFromDER(){return new Mv({valueHex:this.valueBlock.valueHexView[0]===0?this.valueBlock.valueHexView.subarray(1):this.valueBlock.valueHexView})}onAsciiEncoding(){return`${this.constructor.NAME} : ${this.valueBlock.toString()}`}};Mv=xe;ht.Integer=Mv;xe.NAME="INTEGER";var xq,Bc=class extends xe{static{o(this,"Enumerated")}constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=10}};xq=Bc;ht.Enumerated=xq;Bc.NAME="ENUMERATED";var oB=class extends tu(Zs){static{o(this,"LocalSidValueBlock")}constructor({valueDec:e=-1,isFirstSid:t=!1,...n}={}){super(n),this.valueDec=e,this.isFirstSid=t}fromBER(e,t,n){if(!n)return t;let s=vt.toUint8Array(e);if(!eu(this,s,t,n))return-1;let i=s.subarray(t,t+n);this.valueHexView=new Uint8Array(n);for(let u=0;u<n&&(this.valueHexView[u]=i[u]&127,this.blockLength++,(i[u]&128)!==0);u++);let a=new Uint8Array(this.blockLength);for(let u=0;u<this.blockLength;u++)a[u]=this.valueHexView[u];return this.valueHexView=a,(i[this.blockLength-1]&128)!==0?(this.error="End of input reached before message was fully decoded",-1):(this.valueHexView[0]===0&&this.warnings.push("Needlessly long format of SID encoding"),this.blockLength<=8?this.valueDec=Zo(this.valueHexView,7):(this.isHexOnly=!0,this.warnings.push("Too big SID for decoding, hex only")),t+this.blockLength)}set valueBigInt(e){Bb();let t=BigInt(e).toString(2);for(;t.length%7;)t="0"+t;let n=new Uint8Array(t.length/7);for(let s=0;s<n.length;s++)n[s]=parseInt(t.slice(s*7,s*7+7),2)+(s+1<n.length?128:0);this.fromBER(n.buffer,0,n.length)}toBER(e){if(this.isHexOnly){if(e)return new ArrayBuffer(this.valueHexView.byteLength);let s=this.valueHexView,i=new Uint8Array(this.blockLength);for(let a=0;a<this.blockLength-1;a++)i[a]=s[a]|128;return i[this.blockLength-1]=s[this.blockLength-1],i.buffer}let t=wa(this.valueDec,7);if(t.byteLength===0)return this.error="Error during encoding SID value",po;let n=new Uint8Array(t.byteLength);if(!e){let s=new Uint8Array(t),i=t.byteLength-1;for(let a=0;a<i;a++)n[a]=s[a]|128;n[i]=s[i]}return n}toString(){let e="";if(this.isHexOnly)e=Nt.ToHex(this.valueHexView);else if(this.isFirstSid){let t=this.valueDec;this.valueDec<=39?e="0.":this.valueDec<=79?(e="1.",t-=40):(e="2.",t-=80),e+=t.toString()}else e=this.valueDec.toString();return e}toJSON(){return{...super.toJSON(),valueDec:this.valueDec,isFirstSid:this.isFirstSid}}};oB.NAME="sidBlock";var wq=class extends Zs{static{o(this,"LocalObjectIdentifierValueBlock")}constructor({value:e=Qs,...t}={}){super(t),this.value=[],e&&this.fromString(e)}fromBER(e,t,n){let s=t;for(;n>0;){let i=new oB;if(s=i.fromBER(e,s,n),s===-1)return this.blockLength=0,this.error=i.error,s;this.value.length===0&&(i.isFirstSid=!0),this.blockLength+=i.blockLength,n-=i.blockLength,this.value.push(i)}return s}toBER(e){let t=[];for(let n=0;n<this.value.length;n++){let s=this.value[n].toBER(e);if(s.byteLength===0)return this.error=this.value[n].error,po;t.push(s)}return cB(t)}fromString(e){this.value=[];let t=0,n=0,s="",i=!1;do if(n=e.indexOf(".",t),n===-1?s=e.substring(t):s=e.substring(t,n),t=n+1,i){let a=this.value[0],u=0;switch(a.valueDec){case 0:break;case 1:u=40;break;case 2:u=80;break;default:this.value=[];return}let c=parseInt(s,10);if(isNaN(c))return;a.valueDec=c+u,i=!1}else{let a=new oB;if(s>Number.MAX_SAFE_INTEGER){Bb();let u=BigInt(s);a.valueBigInt=u}else if(a.valueDec=parseInt(s,10),isNaN(a.valueDec))return;this.value.length||(a.isFirstSid=!0,i=!0),this.value.push(a)}while(n!==-1)}toString(){let e="",t=!1;for(let n=0;n<this.value.length;n++){t=this.value[n].isHexOnly;let s=this.value[n].toString();n!==0&&(e=`${e}.`),t?(s=`{${s}}`,this.value[n].isFirstSid?e=`2.{${s} - 80}`:e+=s):e+=s}return e}toJSON(){let e={...super.toJSON(),value:this.toString(),sidArray:[]};for(let t=0;t<this.value.length;t++)e.sidArray.push(this.value[t].toJSON());return e}};wq.NAME="ObjectIdentifierValueBlock";var Eq,ot=class extends _s{static{o(this,"ObjectIdentifier")}getValue(){return this.valueBlock.toString()}setValue(e){this.valueBlock.fromString(e)}constructor(e={}){super(e,wq),this.idBlock.tagClass=1,this.idBlock.tagNumber=6}onAsciiEncoding(){return`${this.constructor.NAME} : ${this.valueBlock.toString()||"empty"}`}toJSON(){return{...super.toJSON(),value:this.getValue()}}};Eq=ot;ht.ObjectIdentifier=Eq;ot.NAME="OBJECT IDENTIFIER";var uB=class extends tu(Tf){static{o(this,"LocalRelativeSidValueBlock")}constructor({valueDec:e=0,...t}={}){super(t),this.valueDec=e}fromBER(e,t,n){if(n===0)return t;let s=vt.toUint8Array(e);if(!eu(this,s,t,n))return-1;let i=s.subarray(t,t+n);this.valueHexView=new Uint8Array(n);for(let u=0;u<n&&(this.valueHexView[u]=i[u]&127,this.blockLength++,(i[u]&128)!==0);u++);let a=new Uint8Array(this.blockLength);for(let u=0;u<this.blockLength;u++)a[u]=this.valueHexView[u];return this.valueHexView=a,(i[this.blockLength-1]&128)!==0?(this.error="End of input reached before message was fully decoded",-1):(this.valueHexView[0]===0&&this.warnings.push("Needlessly long format of SID encoding"),this.blockLength<=8?this.valueDec=Zo(this.valueHexView,7):(this.isHexOnly=!0,this.warnings.push("Too big SID for decoding, hex only")),t+this.blockLength)}toBER(e){if(this.isHexOnly){if(e)return new ArrayBuffer(this.valueHexView.byteLength);let s=this.valueHexView,i=new Uint8Array(this.blockLength);for(let a=0;a<this.blockLength-1;a++)i[a]=s[a]|128;return i[this.blockLength-1]=s[this.blockLength-1],i.buffer}let t=wa(this.valueDec,7);if(t.byteLength===0)return this.error="Error during encoding SID value",po;let n=new Uint8Array(t.byteLength);if(!e){let s=new Uint8Array(t),i=t.byteLength-1;for(let a=0;a<i;a++)n[a]=s[a]|128;n[i]=s[i]}return n.buffer}toString(){let e="";return this.isHexOnly?e=Nt.ToHex(this.valueHexView):e=this.valueDec.toString(),e}toJSON(){return{...super.toJSON(),valueDec:this.valueDec}}};uB.NAME="relativeSidBlock";var Sq=class extends Zs{static{o(this,"LocalRelativeObjectIdentifierValueBlock")}constructor({value:e=Qs,...t}={}){super(t),this.value=[],e&&this.fromString(e)}fromBER(e,t,n){let s=t;for(;n>0;){let i=new uB;if(s=i.fromBER(e,s,n),s===-1)return this.blockLength=0,this.error=i.error,s;this.blockLength+=i.blockLength,n-=i.blockLength,this.value.push(i)}return s}toBER(e,t){let n=[];for(let s=0;s<this.value.length;s++){let i=this.value[s].toBER(e);if(i.byteLength===0)return this.error=this.value[s].error,po;n.push(i)}return cB(n)}fromString(e){this.value=[];let t=0,n=0,s="";do{n=e.indexOf(".",t),n===-1?s=e.substring(t):s=e.substring(t,n),t=n+1;let i=new uB;if(i.valueDec=parseInt(s,10),isNaN(i.valueDec))return!0;this.value.push(i)}while(n!==-1);return!0}toString(){let e="",t=!1;for(let n=0;n<this.value.length;n++){t=this.value[n].isHexOnly;let s=this.value[n].toString();n!==0&&(e=`${e}.`),t&&(s=`{${s}}`),e+=s}return e}toJSON(){let e={...super.toJSON(),value:this.toString(),sidArray:[]};for(let t=0;t<this.value.length;t++)e.sidArray.push(this.value[t].toJSON());return e}};Sq.NAME="RelativeObjectIdentifierValueBlock";var bq,Aq=class extends _s{static{o(this,"RelativeObjectIdentifier")}getValue(){return this.valueBlock.toString()}setValue(e){this.valueBlock.fromString(e)}constructor(e={}){super(e,Sq),this.idBlock.tagClass=1,this.idBlock.tagNumber=13}onAsciiEncoding(){return`${this.constructor.NAME} : ${this.valueBlock.toString()||"empty"}`}toJSON(){return{...super.toJSON(),value:this.getValue()}}};bq=Aq;ht.RelativeObjectIdentifier=bq;Aq.NAME="RelativeObjectIdentifier";var Cq,J=class extends fe{static{o(this,"Sequence")}constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=16}};Cq=J;ht.Sequence=Cq;J.NAME="SEQUENCE";var Nq,rn=class extends fe{static{o(this,"Set")}constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=17}};Nq=rn;ht.Set=Nq;rn.NAME="SET";var Tq=class extends tu(Zs){static{o(this,"LocalStringValueBlock")}constructor({...e}={}){super(e),this.isHexOnly=!0,this.value=Qs}toJSON(){return{...super.toJSON(),value:this.value}}};Tq.NAME="StringValueBlock";var Iq=class extends Tq{static{o(this,"LocalSimpleStringValueBlock")}};Iq.NAME="SimpleStringValueBlock";var vi=class extends iq{static{o(this,"LocalSimpleStringBlock")}constructor({...e}={}){super(e,Iq)}fromBuffer(e){this.valueBlock.value=String.fromCharCode.apply(null,vt.toUint8Array(e))}fromString(e){let t=e.length,n=this.valueBlock.valueHexView=new Uint8Array(t);for(let s=0;s<t;s++)n[s]=e.charCodeAt(s);this.valueBlock.value=e}};vi.NAME="SIMPLE STRING";var _q=class extends vi{static{o(this,"LocalUtf8StringValueBlock")}fromBuffer(e){this.valueBlock.valueHexView=vt.toUint8Array(e);try{this.valueBlock.value=Nt.ToUtf8String(e)}catch(t){this.warnings.push(`Error during "decodeURIComponent": ${t}, using raw string`),this.valueBlock.value=Nt.ToBinary(e)}}fromString(e){this.valueBlock.valueHexView=new Uint8Array(Nt.FromUtf8String(e)),this.valueBlock.value=e}};_q.NAME="Utf8StringValueBlock";var Dq,Wi=class extends _q{static{o(this,"Utf8String")}constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=12}};Dq=Wi;ht.Utf8String=Dq;Wi.NAME="UTF8String";var Bq=class extends vi{static{o(this,"LocalBmpStringValueBlock")}fromBuffer(e){this.valueBlock.value=Nt.ToUtf16String(e),this.valueBlock.valueHexView=vt.toUint8Array(e)}fromString(e){this.valueBlock.value=e,this.valueBlock.valueHexView=new Uint8Array(Nt.FromUtf16String(e))}};Bq.NAME="BmpStringValueBlock";var Rq,kd=class extends Bq{static{o(this,"BmpString")}constructor({...e}={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=30}};Rq=kd;ht.BmpString=Rq;kd.NAME="BMPString";var Oq=class extends vi{static{o(this,"LocalUniversalStringValueBlock")}fromBuffer(e){let t=ArrayBuffer.isView(e)?e.slice().buffer:e.slice(0),n=new Uint8Array(t);for(let s=0;s<n.length;s+=4)n[s]=n[s+3],n[s+1]=n[s+2],n[s+2]=0,n[s+3]=0;this.valueBlock.value=String.fromCharCode.apply(null,new Uint32Array(t))}fromString(e){let t=e.length,n=this.valueBlock.valueHexView=new Uint8Array(t*4);for(let s=0;s<t;s++){let i=wa(e.charCodeAt(s),8),a=new Uint8Array(i);if(a.length>4)continue;let u=4-a.length;for(let c=a.length-1;c>=0;c--)n[s*4+c+u]=a[c]}this.valueBlock.value=e}};Oq.NAME="UniversalStringValueBlock";var Pq,Ld=class extends Oq{static{o(this,"UniversalString")}constructor({...e}={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=28}};Pq=Ld;ht.UniversalString=Pq;Ld.NAME="UniversalString";var kq,If=class extends vi{static{o(this,"NumericString")}constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=18}};kq=If;ht.NumericString=kq;If.NAME="NumericString";var Lq,zi=class extends vi{static{o(this,"PrintableString")}constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=19}};Lq=zi;ht.PrintableString=Lq;zi.NAME="PrintableString";var Vq,Vd=class extends vi{static{o(this,"TeletexString")}constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=20}};Vq=Vd;ht.TeletexString=Vq;Vd.NAME="TeletexString";var Uq,Ob=class extends vi{static{o(this,"VideotexString")}constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=21}};Uq=Ob;ht.VideotexString=Uq;Ob.NAME="VideotexString";var jq,Kv=class extends vi{static{o(this,"IA5String")}constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=22}};jq=Kv;ht.IA5String=jq;Kv.NAME="IA5String";var Fq,Pb=class extends vi{static{o(this,"GraphicString")}constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=25}};Fq=Pb;ht.GraphicString=Fq;Pb.NAME="GraphicString";var Mq,$v=class extends vi{static{o(this,"VisibleString")}constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=26}};Mq=$v;ht.VisibleString=Mq;$v.NAME="VisibleString";var qq,kb=class extends vi{static{o(this,"GeneralString")}constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=27}};qq=kb;ht.GeneralString=qq;kb.NAME="GeneralString";var Hq,Lb=class extends vi{static{o(this,"CharacterString")}constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=29}};Hq=Lb;ht.CharacterString=Hq;Lb.NAME="CharacterString";var Kq,_f=class extends $v{static{o(this,"UTCTime")}constructor({value:e,valueDate:t,...n}={}){if(super(n),this.year=0,this.month=0,this.day=0,this.hour=0,this.minute=0,this.second=0,e){this.fromString(e),this.valueBlock.valueHexView=new Uint8Array(e.length);for(let s=0;s<e.length;s++)this.valueBlock.valueHexView[s]=e.charCodeAt(s)}t&&(this.fromDate(t),this.valueBlock.valueHexView=new Uint8Array(this.toBuffer())),this.idBlock.tagClass=1,this.idBlock.tagNumber=23}fromBuffer(e){this.fromString(String.fromCharCode.apply(null,vt.toUint8Array(e)))}toBuffer(){let e=this.toString(),t=new ArrayBuffer(e.length),n=new Uint8Array(t);for(let s=0;s<e.length;s++)n[s]=e.charCodeAt(s);return t}fromDate(e){this.year=e.getUTCFullYear(),this.month=e.getUTCMonth()+1,this.day=e.getUTCDate(),this.hour=e.getUTCHours(),this.minute=e.getUTCMinutes(),this.second=e.getUTCSeconds()}toDate(){return new Date(Date.UTC(this.year,this.month-1,this.day,this.hour,this.minute,this.second))}fromString(e){let n=/(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})Z/ig.exec(e);if(n===null){this.error="Wrong input string for conversion";return}let s=parseInt(n[1],10);s>=50?this.year=1900+s:this.year=2e3+s,this.month=parseInt(n[2],10),this.day=parseInt(n[3],10),this.hour=parseInt(n[4],10),this.minute=parseInt(n[5],10),this.second=parseInt(n[6],10)}toString(e="iso"){if(e==="iso"){let t=new Array(7);return t[0]=Ys(this.year<2e3?this.year-1900:this.year-2e3,2),t[1]=Ys(this.month,2),t[2]=Ys(this.day,2),t[3]=Ys(this.hour,2),t[4]=Ys(this.minute,2),t[5]=Ys(this.second,2),t[6]="Z",t.join("")}return super.toString(e)}onAsciiEncoding(){return`${this.constructor.NAME} : ${this.toDate().toISOString()}`}toJSON(){return{...super.toJSON(),year:this.year,month:this.month,day:this.day,hour:this.hour,minute:this.minute,second:this.second}}};Kq=_f;ht.UTCTime=Kq;_f.NAME="UTCTime";var $q,Fr=class extends _f{static{o(this,"GeneralizedTime")}constructor(e={}){var t;super(e),(t=this.millisecond)!==null&&t!==void 0||(this.millisecond=0),this.idBlock.tagClass=1,this.idBlock.tagNumber=24}fromDate(e){super.fromDate(e),this.millisecond=e.getUTCMilliseconds()}toDate(){let e=Date.UTC(this.year,this.month-1,this.day,this.hour,this.minute,this.second,this.millisecond);return new Date(e)}fromString(e){let t=!1,n="",s="",i=0,a,u=0,c=0;if(e[e.length-1]==="Z")n=e.substring(0,e.length-1),t=!0;else{let m=new Number(e[e.length-1]);if(isNaN(m.valueOf()))throw new Error("Wrong input string for conversion");n=e}if(t){if(n.indexOf("+")!==-1)throw new Error("Wrong input string for conversion");if(n.indexOf("-")!==-1)throw new Error("Wrong input string for conversion")}else{let m=1,g=n.indexOf("+"),y="";if(g===-1&&(g=n.indexOf("-"),m=-1),g!==-1){if(y=n.substring(g+1),n=n.substring(0,g),y.length!==2&&y.length!==4)throw new Error("Wrong input string for conversion");let v=parseInt(y.substring(0,2),10);if(isNaN(v.valueOf()))throw new Error("Wrong input string for conversion");if(u=m*v,y.length===4){if(v=parseInt(y.substring(2,4),10),isNaN(v.valueOf()))throw new Error("Wrong input string for conversion");c=m*v}}}let l=n.indexOf(".");if(l===-1&&(l=n.indexOf(",")),l!==-1){let m=new Number(`0${n.substring(l)}`);if(isNaN(m.valueOf()))throw new Error("Wrong input string for conversion");i=m.valueOf(),s=n.substring(0,l)}else s=n;switch(!0){case s.length===8:if(a=/(\d{4})(\d{2})(\d{2})/ig,l!==-1)throw new Error("Wrong input string for conversion");break;case s.length===10:if(a=/(\d{4})(\d{2})(\d{2})(\d{2})/ig,l!==-1){let m=60*i;this.minute=Math.floor(m),m=60*(m-this.minute),this.second=Math.floor(m),m=1e3*(m-this.second),this.millisecond=Math.floor(m)}break;case s.length===12:if(a=/(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})/ig,l!==-1){let m=60*i;this.second=Math.floor(m),m=1e3*(m-this.second),this.millisecond=Math.floor(m)}break;case s.length===14:if(a=/(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})/ig,l!==-1){let m=1e3*i;this.millisecond=Math.floor(m)}break;default:throw new Error("Wrong input string for conversion")}let h=a.exec(s);if(h===null)throw new Error("Wrong input string for conversion");for(let m=1;m<h.length;m++)switch(m){case 1:this.year=parseInt(h[m],10);break;case 2:this.month=parseInt(h[m],10);break;case 3:this.day=parseInt(h[m],10);break;case 4:this.hour=parseInt(h[m],10)+u;break;case 5:this.minute=parseInt(h[m],10)+c;break;case 6:this.second=parseInt(h[m],10);break;default:throw new Error("Wrong input string for conversion")}if(t===!1){let m=new Date(this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond);this.year=m.getUTCFullYear(),this.month=m.getUTCMonth(),this.day=m.getUTCDay(),this.hour=m.getUTCHours(),this.minute=m.getUTCMinutes(),this.second=m.getUTCSeconds(),this.millisecond=m.getUTCMilliseconds()}}toString(e="iso"){if(e==="iso"){let t=[];return t.push(Ys(this.year,4)),t.push(Ys(this.month,2)),t.push(Ys(this.day,2)),t.push(Ys(this.hour,2)),t.push(Ys(this.minute,2)),t.push(Ys(this.second,2)),this.millisecond!==0&&(t.push("."),t.push(Ys(this.millisecond,3))),t.push("Z"),t.join("")}return super.toString(e)}toJSON(){return{...super.toJSON(),millisecond:this.millisecond}}};$q=Fr;ht.GeneralizedTime=$q;Fr.NAME="GeneralizedTime";var Gq,Xq=class extends Wi{static{o(this,"DATE")}constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=31}};Gq=Xq;ht.DATE=Gq;Xq.NAME="DATE";var Wq,zq=class extends Wi{static{o(this,"TimeOfDay")}constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=32}};Wq=zq;ht.TimeOfDay=Wq;zq.NAME="TimeOfDay";var Jq,Yq=class extends Wi{static{o(this,"DateTime")}constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=33}};Jq=Yq;ht.DateTime=Jq;Yq.NAME="DateTime";var Qq,Zq=class extends Wi{static{o(this,"Duration")}constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=34}};Qq=Zq;ht.Duration=Qq;Zq.NAME="Duration";var e7,t7=class extends Wi{static{o(this,"TIME")}constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=14}};e7=t7;ht.TIME=e7;t7.NAME="TIME";var bt=class{static{o(this,"Any")}constructor({name:e=Qs,optional:t=!1}={}){this.name=e,this.optional=t}},Mr=class extends bt{static{o(this,"Choice")}constructor({value:e=[],...t}={}){super(t),this.value=e}},Bt=class extends bt{static{o(this,"Repeated")}constructor({value:e=new bt,local:t=!1,...n}={}){super(n),this.value=e,this.local=t}},Gv=class{static{o(this,"RawData")}get data(){return this.dataView.slice().buffer}set data(e){this.dataView=vt.toUint8Array(e)}constructor({data:e=Rb}={}){this.dataView=vt.toUint8Array(e)}fromBER(e,t,n){let s=t+n;return this.dataView=vt.toUint8Array(e).subarray(t,s),s}toBER(e){return this.dataView.slice().buffer}};function Be(r,e,t){if(t instanceof Mr){for(let i of t.value)if(Be(r,e,i).verified)return{verified:!0,result:r};{let i={verified:!1,result:{error:"Wrong values for Choice type"}};return t.hasOwnProperty(aB)&&(i.name=t.name),i}}if(t instanceof bt)return t.hasOwnProperty(aB)&&(r[t.name]=e),{verified:!0,result:r};if(!(r instanceof Object))return{verified:!1,result:{error:"Wrong root object"}};if(!(e instanceof Object))return{verified:!1,result:{error:"Wrong ASN.1 data"}};if(!(t instanceof Object))return{verified:!1,result:{error:"Wrong ASN.1 schema"}};if(!($pe in t))return{verified:!1,result:{error:"Wrong ASN.1 schema"}};if(!(zpe in t.idBlock))return{verified:!1,result:{error:"Wrong ASN.1 schema"}};if(!(Jpe in t.idBlock))return{verified:!1,result:{error:"Wrong ASN.1 schema"}};let n=t.idBlock.toBER(!1);if(n.byteLength===0)return{verified:!1,result:{error:"Error encoding idBlock for ASN.1 schema"}};if(t.idBlock.fromBER(n,0,n.byteLength)===-1)return{verified:!1,result:{error:"Error decoding idBlock for ASN.1 schema"}};if(t.idBlock.hasOwnProperty(Gpe)===!1)return{verified:!1,result:{error:"Wrong ASN.1 schema"}};if(t.idBlock.tagClass!==e.idBlock.tagClass)return{verified:!1,result:r};if(t.idBlock.hasOwnProperty(Xpe)===!1)return{verified:!1,result:{error:"Wrong ASN.1 schema"}};if(t.idBlock.tagNumber!==e.idBlock.tagNumber)return{verified:!1,result:r};if(t.idBlock.hasOwnProperty(Wpe)===!1)return{verified:!1,result:{error:"Wrong ASN.1 schema"}};if(t.idBlock.isConstructed!==e.idBlock.isConstructed)return{verified:!1,result:r};if(!(Kpe in t.idBlock))return{verified:!1,result:{error:"Wrong ASN.1 schema"}};if(t.idBlock.isHexOnly!==e.idBlock.isHexOnly)return{verified:!1,result:r};if(t.idBlock.isHexOnly){if(!(Q9 in t.idBlock))return{verified:!1,result:{error:"Wrong ASN.1 schema"}};let i=t.idBlock.valueHexView,a=e.idBlock.valueHexView;if(i.length!==a.length)return{verified:!1,result:r};for(let u=0;u<i.length;u++)if(i[u]!==a[1])return{verified:!1,result:r}}if(t.name&&(t.name=t.name.replace(/^\s+|\s+$/g,Qs),t.name&&(r[t.name]=e)),t instanceof ht.Constructed){let i=0,a={verified:!1,result:{error:"Unknown error"}},u=t.valueBlock.value.length;if(u>0&&t.valueBlock.value[0]instanceof Bt&&(u=e.valueBlock.value.length),u===0)return{verified:!0,result:r};if(e.valueBlock.value.length===0&&t.valueBlock.value.length!==0){let c=!0;for(let l=0;l<t.valueBlock.value.length;l++)c=c&&(t.valueBlock.value[l].optional||!1);return c?{verified:!0,result:r}:(t.name&&(t.name=t.name.replace(/^\s+|\s+$/g,Qs),t.name&&delete r[t.name]),r.error="Inconsistent object length",{verified:!1,result:r})}for(let c=0;c<u;c++)if(c-i>=e.valueBlock.value.length){if(t.valueBlock.value[c].optional===!1){let l={verified:!1,result:r};return r.error="Inconsistent length between ASN.1 data and schema",t.name&&(t.name=t.name.replace(/^\s+|\s+$/g,Qs),t.name&&(delete r[t.name],l.name=t.name)),l}}else if(t.valueBlock.value[0]instanceof Bt){if(a=Be(r,e.valueBlock.value[c],t.valueBlock.value[0].value),a.verified===!1)if(t.valueBlock.value[0].optional)i++;else return t.name&&(t.name=t.name.replace(/^\s+|\s+$/g,Qs),t.name&&delete r[t.name]),a;if(aB in t.valueBlock.value[0]&&t.valueBlock.value[0].name.length>0){let l={};Ype in t.valueBlock.value[0]&&t.valueBlock.value[0].local?l=e:l=r,typeof l[t.valueBlock.value[0].name]>"u"&&(l[t.valueBlock.value[0].name]=[]),l[t.valueBlock.value[0].name].push(e.valueBlock.value[c])}}else if(a=Be(r,e.valueBlock.value[c-i],t.valueBlock.value[c]),a.verified===!1)if(t.valueBlock.value[c].optional)i++;else return t.name&&(t.name=t.name.replace(/^\s+|\s+$/g,Qs),t.name&&delete r[t.name]),a;if(a.verified===!1){let c={verified:!1,result:r};return t.name&&(t.name=t.name.replace(/^\s+|\s+$/g,Qs),t.name&&(delete r[t.name],c.name=t.name)),c}return{verified:!0,result:r}}if(t.primitiveSchema&&Q9 in e.valueBlock){let i=Hv(e.valueBlock.valueHexView);if(i.offset===-1){let a={verified:!1,result:i.result};return t.name&&(t.name=t.name.replace(/^\s+|\s+$/g,Qs),t.name&&(delete r[t.name],a.name=t.name)),a}return Be(r,i.result,t.primitiveSchema)}return{verified:!0,result:r}}o(Be,"compareSchema");var es=class r{static{o(this,"ByteStream")}constructor(e={}){if("view"in e)this.fromUint8Array(e.view);else if("buffer"in e)this.fromArrayBuffer(e.buffer);else if("string"in e)this.fromString(e.string);else if("hexstring"in e)this.fromHexString(e.hexstring);else if("length"in e&&e.length>0){if(this.length=e.length,e.stub)for(let t=0;t<this._view.length;t++)this._view[t]=e.stub}else this.length=0}set buffer(e){this._buffer=e,this._view=new Uint8Array(this._buffer)}get buffer(){return this._buffer}set view(e){this._buffer=new ArrayBuffer(e.length),this._view=new Uint8Array(this._buffer),this._view.set(e)}get view(){return this._view}get length(){return this.view.byteLength}set length(e){this._buffer=new ArrayBuffer(e),this._view=new Uint8Array(this._buffer)}clear(){this._buffer=new ArrayBuffer(0),this._view=new Uint8Array(this._buffer)}fromArrayBuffer(e){this._buffer=e,this._view=new Uint8Array(this._buffer)}fromUint8Array(e){this.fromArrayBuffer(new Uint8Array(e).buffer)}fromString(e){let t=e.length;this.length=t;for(let n=0;n<t;n++)this.view[n]=e.charCodeAt(n)}toString(e=0,t=this.view.length-e){let n="";(e>=this.view.length||e<0)&&(e=0),(t>=this.view.length||t<0)&&(t=this.view.length-e);for(let s=e;s<e+t;s++)n+=String.fromCharCode(this.view[s]);return n}fromHexString(e){let t=e.length;this.buffer=new ArrayBuffer(t>>1),this.view=new Uint8Array(this.buffer);let n=new Map;n.set("0",0),n.set("1",1),n.set("2",2),n.set("3",3),n.set("4",4),n.set("5",5),n.set("6",6),n.set("7",7),n.set("8",8),n.set("9",9),n.set("A",10),n.set("a",10),n.set("B",11),n.set("b",11),n.set("C",12),n.set("c",12),n.set("D",13),n.set("d",13),n.set("E",14),n.set("e",14),n.set("F",15),n.set("f",15);let s=0,i=0;for(let a=0;a<t;a++)a%2?(i|=n.get(e.charAt(a)),this.view[s]=i,s++):i=n.get(e.charAt(a))<<4}toHexString(e=0,t=this.view.length-e){let n="";(e>=this.view.length||e<0)&&(e=0),(t>=this.view.length||t<0)&&(t=this.view.length-e);for(let s=e;s<e+t;s++){let i=this.view[s].toString(16).toUpperCase();n=n+(i.length==1?"0":"")+i}return n}copy(e=0,t=this.length-e){if(!e&&!this.length)return new r;if(e<0||e>this.length-1)throw new Error(`Wrong start position: ${e}`);return new r({buffer:this._buffer.slice(e,e+t)})}slice(e=0,t=this.length){if(!e&&!this.length)return new r;if(e<0||e>this.length-1)throw new Error(`Wrong start position: ${e}`);return new r({buffer:this._buffer.slice(e,t)})}realloc(e){let t=new ArrayBuffer(e),n=new Uint8Array(t);e>this._view.length?n.set(this._view):n.set(new Uint8Array(this._buffer,0,e)),this._buffer=t,this._view=new Uint8Array(this._buffer)}append(e){let t=this.length,n=e.length,s=e._view.subarray();this.realloc(t+n),this._view.set(s,t)}insert(e,t=0,n=this.length-t){return t>this.length-1?!1:(n>this.length-t&&(n=this.length-t),n>e.length&&(n=e.length),n==e.length?this._view.set(e._view,t):this._view.set(e._view.subarray(0,n),t),!0)}isEqual(e){if(this.length!=e.length)return!1;for(let t=0;t<e.length;t++)if(this.view[t]!=e.view[t])return!1;return!0}isEqualView(e){if(e.length!=this.view.length)return!1;for(let t=0;t<e.length;t++)if(this.view[t]!=e[t])return!1;return!0}findPattern(e,t,n,s){let{start:i,length:a,backward:u}=this.prepareFindParameters(t,n,s),c=e.length;if(c>a)return-1;let l=[];for(let h=0;h<c;h++)l.push(e.view[h]);for(let h=0;h<=a-c;h++){let m=!0,g=u?i-c-h:i+h;for(let y=0;y<c;y++)if(this.view[y+g]!=l[y]){m=!1;break}if(m)return u?i-c-h:i+c+h}return-1}findFirstIn(e,t,n,s){let{start:i,length:a,backward:u}=this.prepareFindParameters(t,n,s),c={id:-1,position:u?0:i+a,length:0};for(let l=0;l<e.length;l++){let h=this.findPattern(e[l],i,a,u);if(h!=-1){let m=!1,g=e[l].length;u?h-g>=c.position-c.length&&(m=!0):h-g<=c.position-c.length&&(m=!0),m&&(c.position=h,c.id=l,c.length=g)}}return c}findAllIn(e,t,n){let{start:s,length:i}=this.prepareFindParameters(t,n),a=[],u={id:-1,position:s};do{let c=u.position;if(u=this.findFirstIn(e,u.position,i),u.id==-1)break;i-=u.position-c,a.push({id:u.id,position:u.position})}while(!0);return a}findAllPatternIn(e,t,n){let{start:s,length:i}=this.prepareFindParameters(t,n),a=[],u=e.length;if(u>i)return-1;let c=Array.from(e.view);for(let l=0;l<=i-u;l++){let h=!0,m=s+l;for(let g=0;g<u;g++)if(this.view[g+m]!=c[g]){h=!1;break}h&&(a.push(s+u+l),l+=u-1)}return a}findFirstNotIn(e,t,n,s){let{start:i,length:a,backward:u}=this.prepareFindParameters(t,n,s),c={left:{id:-1,position:i},right:{id:-1,position:0},value:new r},l=a;for(;l>0;){if(c.right=this.findFirstIn(e,u?i-a+l:i+a-l,l,u),c.right.id==-1){a=l,u?i-=a:i=c.left.position,c.value=new r({buffer:this._buffer.slice(i,i+a)});break}if(c.right.position!=(u?c.left.position-e[c.right.id].length:c.left.position+e[c.right.id].length)){u?(i=c.right.position+e[c.right.id].length,a=c.left.position-c.right.position-e[c.right.id].length):(i=c.left.position,a=c.right.position-c.left.position-e[c.right.id].length),c.value=new r({buffer:this._buffer.slice(i,i+a)});break}c.left=c.right,l-=e[c.right.id].length}if(u){let h=c.right;c.right=c.left,c.left=h}return c}findAllNotIn(e,t,n){let{start:s,length:i}=this.prepareFindParameters(t,n),a=[],u={left:{id:-1,position:s},right:{id:-1,position:s},value:new r};do{let c=u.right.position;u=this.findFirstNotIn(e,u.right.position,i),i-=u.right.position-c,a.push({left:{id:u.left.id,position:u.left.position},right:{id:u.right.id,position:u.right.position},value:u.value})}while(u.right.id!=-1);return a}findFirstSequence(e,t,n,s){let{start:i,length:a,backward:u}=this.prepareFindParameters(t,n,s),c=this.skipNotPatterns(e,i,a,u);if(c==-1)return{position:-1,value:new r};let l=this.skipPatterns(e,c,a-(u?i-c:c-i),u);u?(i=l,a=c-l):(i=c,a=l-c);let h=new r({buffer:this._buffer.slice(i,i+a)});return{position:l,value:h}}findAllSequences(e,t,n){let{start:s,length:i}=this.prepareFindParameters(t,n),a=[],u={position:s,value:new r};do{let c=u.position;u=this.findFirstSequence(e,u.position,i),u.position!=-1&&(i-=u.position-c,a.push({position:u.position,value:u.value}))}while(u.position!=-1);return a}findPairedPatterns(e,t,n,s){let i=[];if(e.isEqual(t))return i;let{start:a,length:u}=this.prepareFindParameters(n,s),c=0,l=this.findAllPatternIn(e,a,u);if(!Array.isArray(l)||l.length==0)return i;let h=this.findAllPatternIn(t,a,u);if(!Array.isArray(h)||h.length==0)return i;for(;c<l.length&&h.length!=0;){if(l[0]==h[0]){i.push({left:l[0],right:h[0]}),l.splice(0,1),h.splice(0,1);continue}if(l[c]>h[0])break;for(;l[c]<h[0]&&(c++,!(c>=l.length)););i.push({left:l[c-1],right:h[0]}),l.splice(c-1,1),h.splice(0,1),c=0}return i.sort((m,g)=>m.left-g.left),i}findPairedArrays(e,t,n,s){let{start:i,length:a}=this.prepareFindParameters(n,s),u=[],c=0,l=this.findAllIn(e,i,a);if(l.length==0)return u;let h=this.findAllIn(t,i,a);if(h.length==0)return u;for(;c<l.length&&h.length!=0;){if(l[0].position==h[0].position){u.push({left:l[0],right:h[0]}),l.splice(0,1),h.splice(0,1);continue}if(l[c].position>h[0].position)break;for(;l[c].position<h[0].position&&(c++,!(c>=l.length)););u.push({left:l[c-1],right:h[0]}),l.splice(c-1,1),h.splice(0,1),c=0}return u.sort((m,g)=>m.left.position-g.left.position),u}replacePattern(e,t,n,s,i=null){let a=[],u,c={status:-1,searchPatternPositions:[],replacePatternPositions:[]},{start:l,length:h}=this.prepareFindParameters(n,s);if(i==null){if(a=this.findAllIn([e],l,h),a.length==0)return c}else a=i;c.searchPatternPositions.push(...Array.from(a,v=>v.position));let m=e.length-t.length,g=new ArrayBuffer(this.view.length-a.length*m),y=new Uint8Array(g);for(y.set(new Uint8Array(this.buffer,0,l)),u=0;u<a.length;u++){let v=u==0?l:a[u-1].position;y.set(new Uint8Array(this.buffer,v,a[u].position-e.length-v),v-u*m),y.set(t.view,a[u].position-e.length-u*m),c.replacePatternPositions.push(a[u].position-e.length-u*m)}return u--,y.set(new Uint8Array(this.buffer,a[u].position,this.length-a[u].position),a[u].position-e.length+t.length-u*m),this.buffer=g,this.view=new Uint8Array(this.buffer),c.status=1,c}skipPatterns(e,t,n,s){let{start:i,length:a,backward:u}=this.prepareFindParameters(t,n,s),c=i;for(let l=0;l<e.length;l++){let h=e[l].length,m=u?c-h:c,g=!0;for(let y=0;y<h;y++)if(this.view[y+m]!=e[l].view[y]){g=!1;break}if(g){if(l=-1,u){if(c-=h,c<=0)return c}else if(c+=h,c>=i+a)return c}}return c}skipNotPatterns(e,t,n,s){let{start:i,length:a,backward:u}=this.prepareFindParameters(t,n,s),c=-1;for(let l=0;l<a;l++){for(let h=0;h<e.length;h++){let m=e[h].length,g=u?i-l-m:i+l,y=!0;for(let v=0;v<m;v++)if(this.view[v+g]!=e[h].view[v]){y=!1;break}if(y){c=u?i-l:i+l;break}}if(c!=-1)break}return c}prepareFindParameters(e=null,t=null,n=!1){return e===null&&(e=n?this.length:0),e>this.length&&(e=this.length),n?(t===null&&(t=e),t>e&&(t=e)):(t===null&&(t=this.length-e),t>this.length-e&&(t=this.length-e)),{start:e,length:t,backward:n}}};var rde=16777216,ru=class r{static{o(this,"SeqStream")}constructor(e={}){this._stream=new es,this._length=0,this._start=0,this.backward=!1,this.appendBlock=0,this.prevLength=0,this.prevStart=0,"view"in e?this.stream=new es({view:e.view}):"buffer"in e?this.stream=new es({buffer:e.buffer}):"string"in e?this.stream=new es({string:e.string}):"hexstring"in e?this.stream=new es({hexstring:e.hexstring}):"stream"in e?this.stream=e.stream.slice():this.stream=new es,"backward"in e&&e.backward&&(this.backward=e.backward,this._start=this.stream.length),"length"in e&&e.length>0&&(this._length=e.length),"start"in e&&e.start&&e.start>0&&(this._start=e.start),"appendBlock"in e&&e.appendBlock&&e.appendBlock>0&&(this.appendBlock=e.appendBlock)}set stream(e){this._stream=e,this.prevLength=this._length,this._length=e.length,this.prevStart=this._start,this._start=0}get stream(){return this._stream}set length(e){this.prevLength=this._length,this._length=e}get length(){return this.appendBlock?this.start:this._length}set start(e){e>this.stream.length||(this.prevStart=this._start,this.prevLength=this._length,this._length-=this.backward?this._start-e:e-this._start,this._start=e)}get start(){return this._start}get buffer(){return this._stream.buffer.slice(0,this._length)}resetPosition(){this._start=this.prevStart,this._length=this.prevLength}findPattern(e,t=null){(t==null||t>this.length)&&(t=this.length);let n=this.stream.findPattern(e,this.start,this.length,this.backward);if(n==-1)return n;if(this.backward){if(n<this.start-e.length-t)return-1}else if(n>this.start+e.length+t)return-1;return this.start=n,n}findFirstIn(e,t=null){(t==null||t>this.length)&&(t=this.length);let n=this.stream.findFirstIn(e,this.start,this.length,this.backward);if(n.id==-1)return n;if(this.backward){if(n.position<this.start-e[n.id].length-t)return{id:-1,position:this.backward?0:this.start+this.length}}else if(n.position>this.start+e[n.id].length+t)return{id:-1,position:this.backward?0:this.start+this.length};return this.start=n.position,n}findAllIn(e){let t=this.backward?this.start-this.length:this.start;return this.stream.findAllIn(e,t,this.length)}findFirstNotIn(e,t=null){(t==null||t>this._length)&&(t=this._length);let n=this._stream.findFirstNotIn(e,this._start,this._length,this.backward);if(n.left.id==-1&&n.right.id==-1)return n;if(this.backward){if(n.right.id!=-1&&n.right.position<this._start-e[n.right.id].length-t)return{left:{id:-1,position:this._start},right:{id:-1,position:0},value:new es}}else if(n.left.id!=-1&&n.left.position>this._start+e[n.left.id].length+t)return{left:{id:-1,position:this._start},right:{id:-1,position:0},value:new es};return this.backward?n.left.id==-1?this.start=0:this.start=n.left.position:n.right.id==-1?this.start=this._start+this._length:this.start=n.right.position,n}findAllNotIn(e){let t=this.backward?this._start-this._length:this._start;return this._stream.findAllNotIn(e,t,this._length)}findFirstSequence(e,t=null,n=null){(t==null||t>this._length)&&(t=this._length),(n==null||n>t)&&(n=t);let s=this._stream.findFirstSequence(e,this._start,t,this.backward);if(s.value.length==0)return s;if(this.backward){if(s.position<this._start-s.value.length-n)return{position:-1,value:new es}}else if(s.position>this._start+s.value.length+n)return{position:-1,value:new es};return this.start=s.position,s}findAllSequences(e){let t=this.backward?this.start-this.length:this.start;return this.stream.findAllSequences(e,t,this.length)}findPairedPatterns(e,t,n=null){(n==null||n>this.length)&&(n=this.length);let s=this.backward?this.start-this.length:this.start,i=this.stream.findPairedPatterns(e,t,s,this.length);if(i.length){if(this.backward){if(i[0].right<this.start-t.length-n)return[]}else if(i[0].left>this.start+e.length+n)return[]}return i}findPairedArrays(e,t,n=null){(n==null||n>this.length)&&(n=this.length);let s=this.backward?this.start-this.length:this.start,i=this.stream.findPairedArrays(e,t,s,this.length);if(i.length){if(this.backward){if(i[0].right.position<this.start-t[i[0].right.id].length-n)return[]}else if(i[0].left.position>this.start+e[i[0].left.id].length+n)return[]}return i}replacePattern(e,t){let n=this.backward?this.start-this.length:this.start;return this.stream.replacePattern(e,t,n,this.length)}skipPatterns(e){let t=this.stream.skipPatterns(e,this.start,this.length,this.backward);return this.start=t,t}skipNotPatterns(e){let t=this.stream.skipNotPatterns(e,this.start,this.length,this.backward);return t==-1?-1:(this.start=t,t)}append(e){this.beforeAppend(e.length),this._stream.view.set(e.view,this._start),this._length+=e.length*2,this.start=this._start+e.length,this.prevLength-=e.length*2}appendView(e){this.beforeAppend(e.length),this._stream.view.set(e,this._start),this._length+=e.length*2,this.start=this._start+e.length,this.prevLength-=e.length*2}appendChar(e){this.beforeAppend(1),this._stream.view[this._start]=e,this._length+=2,this.start=this._start+1,this.prevLength-=2}appendUint16(e){this.beforeAppend(2);let t=new Uint16Array([e]),n=new Uint8Array(t.buffer);this.stream.view[this._start]=n[1],this._stream.view[this._start+1]=n[0],this._length+=4,this.start=this._start+2,this.prevLength-=4}appendUint24(e){this.beforeAppend(3);let t=new Uint32Array([e]),n=new Uint8Array(t.buffer);this._stream.view[this._start]=n[2],this._stream.view[this._start+1]=n[1],this._stream.view[this._start+2]=n[0],this._length+=6,this.start=this._start+3,this.prevLength-=6}appendUint32(e){this.beforeAppend(4);let t=new Uint32Array([e]),n=new Uint8Array(t.buffer);this._stream.view[this._start]=n[3],this._stream.view[this._start+1]=n[2],this._stream.view[this._start+2]=n[1],this._stream.view[this._start+3]=n[0],this._length+=8,this.start=this._start+4,this.prevLength-=8}appendInt16(e){this.beforeAppend(2);let t=new Int16Array([e]),n=new Uint8Array(t.buffer);this._stream.view[this._start]=n[1],this._stream.view[this._start+1]=n[0],this._length+=4,this.start=this._start+2,this.prevLength-=4}appendInt32(e){this.beforeAppend(4);let t=new Int32Array([e]),n=new Uint8Array(t.buffer);this._stream.view[this._start]=n[3],this._stream.view[this._start+1]=n[2],this._stream.view[this._start+2]=n[1],this._stream.view[this._start+3]=n[0],this._length+=8,this.start=this._start+4,this.prevLength-=8}getBlock(e,t=!0){if(this._length<=0)return new Uint8Array(0);this._length<e&&(e=this._length);let n;if(this.backward){let s=this._stream.view.subarray(this._length-e,this._length);n=new Uint8Array(e);for(let i=0;i<e;i++)n[e-1-i]=s[i]}else n=this._stream.view.subarray(this._start,this._start+e);return t&&(this.start+=this.backward?-1*e:e),n}getUint16(e=!0){let t=this.getBlock(2,e);return t.length<2?0:t[0]<<8|t[1]}getInt16(e=!0){let t=this.getUint16(e),n=32768;return t&n?-(n-(t^n)):t}getUint24(e=!0){let t=this.getBlock(4,e);return t.length<3?0:t[0]<<16|t[1]<<8|t[2]}getUint32(e=!0){let t=this.getBlock(4,e);return t.length<4?0:t[0]*rde+(t[1]<<16)+(t[2]<<8)+t[3]}getInt32(e=!0){let t=this.getUint32(e),n=2147483648;return t&n?-(n-(t^n)):t}beforeAppend(e){this._start+e>this._stream.length&&(e>this.appendBlock&&(this.appendBlock=e+r.APPEND_BLOCK),this._stream.realloc(this._stream.length+this.appendBlock))}};ru.APPEND_BLOCK=1e3;function sde(r){return r instanceof Uint8Array||r!=null&&typeof r=="object"&&r.constructor.name==="Uint8Array"}o(sde,"isBytes");function pB(r,...e){if(!sde(r))throw new Error("Uint8Array expected");if(e.length>0&&!e.includes(r.length))throw new Error(`Uint8Array expected of length ${e}, not of length=${r.length}`)}o(pB,"bytes");function dB(r,e=!0){if(r.destroyed)throw new Error("Hash instance has been destroyed");if(e&&r.finished)throw new Error("Hash#digest() has already been called")}o(dB,"exists");function n7(r,e){pB(r);let t=e.outputLen;if(r.length<t)throw new Error(`digestInto() expects output buffer of length at least ${t}`)}o(n7,"output");var Ub=o(r=>new DataView(r.buffer,r.byteOffset,r.byteLength),"createView"),Sa=o((r,e)=>r<<32-e|r>>>e,"rotr"),jb=o((r,e)=>r<<e|r>>>32-e>>>0,"rotl"),pBe=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function ide(r){if(typeof r!="string")throw new Error(`utf8ToBytes expected string, got ${typeof r}`);return new Uint8Array(new TextEncoder().encode(r))}o(ide,"utf8ToBytes");function mB(r){return typeof r=="string"&&(r=ide(r)),pB(r),r}o(mB,"toBytes");var Vb=class{static{o(this,"Hash")}clone(){return this._cloneInto()}},dBe={}.toString;function Df(r){let e=o(n=>r().update(mB(n)).digest(),"hashC"),t=r();return e.outputLen=t.outputLen,e.blockLen=t.blockLen,e.create=()=>r(),e}o(Df,"wrapConstructor");function ade(r,e,t,n){if(typeof r.setBigUint64=="function")return r.setBigUint64(e,t,n);let s=BigInt(32),i=BigInt(4294967295),a=Number(t>>s&i),u=Number(t&i),c=n?4:0,l=n?0:4;r.setUint32(e+c,a,n),r.setUint32(e+l,u,n)}o(ade,"setBigUint64");var Fb=o((r,e,t)=>r&e^~r&t,"Chi"),Mb=o((r,e,t)=>r&e^r&t^e&t,"Maj"),Rc=class extends Vb{static{o(this,"HashMD")}constructor(e,t,n,s){super(),this.blockLen=e,this.outputLen=t,this.padOffset=n,this.isLE=s,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=Ub(this.buffer)}update(e){dB(this);let{view:t,buffer:n,blockLen:s}=this;e=mB(e);let i=e.length;for(let a=0;a<i;){let u=Math.min(s-this.pos,i-a);if(u===s){let c=Ub(e);for(;s<=i-a;a+=s)this.process(c,a);continue}n.set(e.subarray(a,a+u),this.pos),this.pos+=u,a+=u,this.pos===s&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){dB(this),n7(e,this),this.finished=!0;let{buffer:t,view:n,blockLen:s,isLE:i}=this,{pos:a}=this;t[a++]=128,this.buffer.subarray(a).fill(0),this.padOffset>s-a&&(this.process(n,0),a=0);for(let m=a;m<s;m++)t[m]=0;ade(n,s-8,BigInt(this.length*8),i),this.process(n,0);let u=Ub(e),c=this.outputLen;if(c%4)throw new Error("_sha2: outputLen should be aligned to 32bit");let l=c/4,h=this.get();if(l>h.length)throw new Error("_sha2: outputLen bigger than state");for(let m=0;m<l;m++)u.setUint32(4*m,h[m],i)}digest(){let{buffer:e,outputLen:t}=this;this.digestInto(e);let n=e.slice(0,t);return this.destroy(),n}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());let{blockLen:t,buffer:n,length:s,finished:i,destroyed:a,pos:u}=this;return e.length=s,e.pos=u,e.finished=i,e.destroyed=a,s%t&&e.buffer.set(n),e}};var Xv=new Uint32Array([1732584193,4023233417,2562383102,271733878,3285377520]),Oc=new Uint32Array(80),ode=class extends Rc{static{o(this,"SHA1")}constructor(){super(64,20,8,!1),this.A=Xv[0]|0,this.B=Xv[1]|0,this.C=Xv[2]|0,this.D=Xv[3]|0,this.E=Xv[4]|0}get(){let{A:e,B:t,C:n,D:s,E:i}=this;return[e,t,n,s,i]}set(e,t,n,s,i){this.A=e|0,this.B=t|0,this.C=n|0,this.D=s|0,this.E=i|0}process(e,t){for(let c=0;c<16;c++,t+=4)Oc[c]=e.getUint32(t,!1);for(let c=16;c<80;c++)Oc[c]=jb(Oc[c-3]^Oc[c-8]^Oc[c-14]^Oc[c-16],1);let{A:n,B:s,C:i,D:a,E:u}=this;for(let c=0;c<80;c++){let l,h;c<20?(l=Fb(s,i,a),h=1518500249):c<40?(l=s^i^a,h=1859775393):c<60?(l=Mb(s,i,a),h=2400959708):(l=s^i^a,h=3395469782);let m=jb(n,5)+l+u+h+Oc[c]|0;u=a,a=i,i=jb(s,30),s=n,n=m}n=n+this.A|0,s=s+this.B|0,i=i+this.C|0,a=a+this.D|0,u=u+this.E|0,this.set(n,s,i,a,u)}roundClean(){Oc.fill(0)}destroy(){this.set(0,0,0,0,0),this.buffer.fill(0)}},s7=Df(()=>new ode);var ude=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),Pc=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),kc=new Uint32Array(64),cde=class extends Rc{static{o(this,"SHA256")}constructor(){super(64,32,8,!1),this.A=Pc[0]|0,this.B=Pc[1]|0,this.C=Pc[2]|0,this.D=Pc[3]|0,this.E=Pc[4]|0,this.F=Pc[5]|0,this.G=Pc[6]|0,this.H=Pc[7]|0}get(){let{A:e,B:t,C:n,D:s,E:i,F:a,G:u,H:c}=this;return[e,t,n,s,i,a,u,c]}set(e,t,n,s,i,a,u,c){this.A=e|0,this.B=t|0,this.C=n|0,this.D=s|0,this.E=i|0,this.F=a|0,this.G=u|0,this.H=c|0}process(e,t){for(let m=0;m<16;m++,t+=4)kc[m]=e.getUint32(t,!1);for(let m=16;m<64;m++){let g=kc[m-15],y=kc[m-2],v=Sa(g,7)^Sa(g,18)^g>>>3,E=Sa(y,17)^Sa(y,19)^y>>>10;kc[m]=E+kc[m-7]+v+kc[m-16]|0}let{A:n,B:s,C:i,D:a,E:u,F:c,G:l,H:h}=this;for(let m=0;m<64;m++){let g=Sa(u,6)^Sa(u,11)^Sa(u,25),y=h+g+Fb(u,c,l)+ude[m]+kc[m]|0,E=(Sa(n,2)^Sa(n,13)^Sa(n,22))+Mb(n,s,i)|0;h=l,l=c,c=u,u=a+y|0,a=i,i=s,s=n,n=y+E|0}n=n+this.A|0,s=s+this.B|0,i=i+this.C|0,a=a+this.D|0,u=u+this.E|0,c=c+this.F|0,l=l+this.G|0,h=h+this.H|0,this.set(n,s,i,a,u,c,l,h)}roundClean(){kc.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}};var gB=Df(()=>new cde);var qb=BigInt(4294967295),vB=BigInt(32);function i7(r,e=!1){return e?{h:Number(r&qb),l:Number(r>>vB&qb)}:{h:Number(r>>vB&qb)|0,l:Number(r&qb)|0}}o(i7,"fromBig");function lde(r,e=!1){let t=new Uint32Array(r.length),n=new Uint32Array(r.length);for(let s=0;s<r.length;s++){let{h:i,l:a}=i7(r[s],e);[t[s],n[s]]=[i,a]}return[t,n]}o(lde,"split");var fde=o((r,e)=>BigInt(r>>>0)<<vB|BigInt(e>>>0),"toBig"),hde=o((r,e,t)=>r>>>t,"shrSH"),pde=o((r,e,t)=>r<<32-t|e>>>t,"shrSL"),dde=o((r,e,t)=>r>>>t|e<<32-t,"rotrSH"),mde=o((r,e,t)=>r<<32-t|e>>>t,"rotrSL"),gde=o((r,e,t)=>r<<64-t|e>>>t-32,"rotrBH"),vde=o((r,e,t)=>r>>>t-32|e<<64-t,"rotrBL"),yde=o((r,e)=>e,"rotr32H"),xde=o((r,e)=>r,"rotr32L"),wde=o((r,e,t)=>r<<t|e>>>32-t,"rotlSH"),Ede=o((r,e,t)=>e<<t|r>>>32-t,"rotlSL"),Sde=o((r,e,t)=>e<<t-32|r>>>64-t,"rotlBH"),bde=o((r,e,t)=>r<<t-32|e>>>64-t,"rotlBL");function Ade(r,e,t,n){let s=(e>>>0)+(n>>>0);return{h:r+t+(s/2**32|0)|0,l:s|0}}o(Ade,"add");var Cde=o((r,e,t)=>(r>>>0)+(e>>>0)+(t>>>0),"add3L"),Nde=o((r,e,t,n)=>e+t+n+(r/2**32|0)|0,"add3H"),Tde=o((r,e,t,n)=>(r>>>0)+(e>>>0)+(t>>>0)+(n>>>0),"add4L"),Ide=o((r,e,t,n,s)=>e+t+n+s+(r/2**32|0)|0,"add4H"),_de=o((r,e,t,n,s)=>(r>>>0)+(e>>>0)+(t>>>0)+(n>>>0)+(s>>>0),"add5L"),Dde=o((r,e,t,n,s,i)=>e+t+n+s+i+(r/2**32|0)|0,"add5H");var Bde={fromBig:i7,split:lde,toBig:fde,shrSH:hde,shrSL:pde,rotrSH:dde,rotrSL:mde,rotrBH:gde,rotrBL:vde,rotr32H:yde,rotr32L:xde,rotlSH:wde,rotlSL:Ede,rotlBH:Sde,rotlBL:bde,add:Ade,add3L:Cde,add3H:Nde,add4L:Tde,add4H:Ide,add5H:Dde,add5L:_de},Xt=Bde;var[Rde,Ode]=Xt.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(r=>BigInt(r))),Lc=new Uint32Array(80),Vc=new Uint32Array(80),Hb=class extends Rc{static{o(this,"SHA512")}constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){let{Ah:e,Al:t,Bh:n,Bl:s,Ch:i,Cl:a,Dh:u,Dl:c,Eh:l,El:h,Fh:m,Fl:g,Gh:y,Gl:v,Hh:E,Hl:w}=this;return[e,t,n,s,i,a,u,c,l,h,m,g,y,v,E,w]}set(e,t,n,s,i,a,u,c,l,h,m,g,y,v,E,w){this.Ah=e|0,this.Al=t|0,this.Bh=n|0,this.Bl=s|0,this.Ch=i|0,this.Cl=a|0,this.Dh=u|0,this.Dl=c|0,this.Eh=l|0,this.El=h|0,this.Fh=m|0,this.Fl=g|0,this.Gh=y|0,this.Gl=v|0,this.Hh=E|0,this.Hl=w|0}process(e,t){for(let b=0;b<16;b++,t+=4)Lc[b]=e.getUint32(t),Vc[b]=e.getUint32(t+=4);for(let b=16;b<80;b++){let A=Lc[b-15]|0,T=Vc[b-15]|0,B=Xt.rotrSH(A,T,1)^Xt.rotrSH(A,T,8)^Xt.shrSH(A,T,7),M=Xt.rotrSL(A,T,1)^Xt.rotrSL(A,T,8)^Xt.shrSL(A,T,7),I=Lc[b-2]|0,H=Vc[b-2]|0,K=Xt.rotrSH(I,H,19)^Xt.rotrBH(I,H,61)^Xt.shrSH(I,H,6),q=Xt.rotrSL(I,H,19)^Xt.rotrBL(I,H,61)^Xt.shrSL(I,H,6),W=Xt.add4L(M,q,Vc[b-7],Vc[b-16]),he=Xt.add4H(W,B,K,Lc[b-7],Lc[b-16]);Lc[b]=he|0,Vc[b]=W|0}let{Ah:n,Al:s,Bh:i,Bl:a,Ch:u,Cl:c,Dh:l,Dl:h,Eh:m,El:g,Fh:y,Fl:v,Gh:E,Gl:w,Hh:C,Hl:_}=this;for(let b=0;b<80;b++){let A=Xt.rotrSH(m,g,14)^Xt.rotrSH(m,g,18)^Xt.rotrBH(m,g,41),T=Xt.rotrSL(m,g,14)^Xt.rotrSL(m,g,18)^Xt.rotrBL(m,g,41),B=m&y^~m&E,M=g&v^~g&w,I=Xt.add5L(_,T,M,Ode[b],Vc[b]),H=Xt.add5H(I,C,A,B,Rde[b],Lc[b]),K=I|0,q=Xt.rotrSH(n,s,28)^Xt.rotrBH(n,s,34)^Xt.rotrBH(n,s,39),W=Xt.rotrSL(n,s,28)^Xt.rotrBL(n,s,34)^Xt.rotrBL(n,s,39),he=n&i^n&u^i&u,pe=s&a^s&c^a&c;C=E|0,_=w|0,E=y|0,w=v|0,y=m|0,v=g|0,{h:m,l:g}=Xt.add(l|0,h|0,H|0,K|0),l=u|0,h=c|0,u=i|0,c=a|0,i=n|0,a=s|0;let ue=Xt.add3L(K,W,pe);n=Xt.add3H(ue,H,q,he),s=ue|0}({h:n,l:s}=Xt.add(this.Ah|0,this.Al|0,n|0,s|0)),{h:i,l:a}=Xt.add(this.Bh|0,this.Bl|0,i|0,a|0),{h:u,l:c}=Xt.add(this.Ch|0,this.Cl|0,u|0,c|0),{h:l,l:h}=Xt.add(this.Dh|0,this.Dl|0,l|0,h|0),{h:m,l:g}=Xt.add(this.Eh|0,this.El|0,m|0,g|0),{h:y,l:v}=Xt.add(this.Fh|0,this.Fl|0,y|0,v|0),{h:E,l:w}=Xt.add(this.Gh|0,this.Gl|0,E|0,w|0),{h:C,l:_}=Xt.add(this.Hh|0,this.Hl|0,C|0,_|0),this.set(n,s,i,a,u,c,l,h,m,g,y,v,E,w,C,_)}roundClean(){Lc.fill(0),Vc.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}};var Pde=class extends Hb{static{o(this,"SHA384")}constructor(){super(),this.Ah=-876896931,this.Al=-1056596264,this.Bh=1654270250,this.Bl=914150663,this.Ch=-1856437926,this.Cl=812702999,this.Dh=355462360,this.Dl=-150054599,this.Eh=1731405415,this.El=-4191439,this.Fh=-1900787065,this.Fl=1750603025,this.Gh=-619958771,this.Gl=1694076839,this.Hh=1203062813,this.Hl=-1090891868,this.outputLen=48}},yB=Df(()=>new Hb);var xB=Df(()=>new Pde);var hn=new ArrayBuffer(0),V="",Ir=class zB extends TypeError{static{o(this,"ArgumentError")}constructor(){super(...arguments),this.name=zB.NAME}static isType(e,t){if(typeof t=="string"){if(t==="Array"&&Array.isArray(e))return!0;if(t==="ArrayBuffer"&&e instanceof ArrayBuffer)return!0;if(t==="ArrayBufferView"&&ArrayBuffer.isView(e))return!0;if(typeof e===t)return!0}else if(e instanceof t)return!0;return!1}static assert(e,t,...n){for(let i of n)if(this.isType(e,i))return;let s=n.map(i=>i instanceof Function&&"name"in i?i.name:`${i}`);throw new zB(`Parameter '${t}' is not of type ${s.length>1?`(${s.join(" or ")})`:s[0]}`)}};Ir.NAME="ArgumentError";var gr=class gA extends TypeError{static{o(this,"ParameterError")}static assert(...e){let t=null,n,s;typeof e[0]=="string"?(t=e[0],n=e[1],s=e.slice(2)):(n=e[0],s=e.slice(1)),Ir.assert(n,"parameters","object");for(let i of s){let a=n[i];if(a==null)throw new gA(i,t)}}static assertEmpty(e,t,n){if(e==null)throw new gA(t,n)}constructor(e,t=null,n){super(),this.name=gA.NAME,this.field=e,t&&(this.target=t),n?this.message=n:this.message=`Absent mandatory parameter '${e}' ${t?` in '${t}'`:V}`}};gr.NAME="ParameterError";var Te=class D7 extends Error{static{o(this,"AsnError")}static assertSchema(e,t){if(!e.verified)throw new Error(`Object's schema was not verified against input data for ${t}`)}static assert(e,t){if(e.offset===-1)throw new D7(`Error during parsing of ASN.1 data. Data is not correct for '${t}'.`)}constructor(e){super(e),this.name="AsnError"}},Re=class{static{o(this,"PkiObject")}static blockName(){return this.CLASS_NAME}static fromBER(e){let t=en(e);Te.assert(t,this.name);try{return new this({schema:t.result})}catch{throw new Te(`Cannot create '${this.CLASS_NAME}' from ASN.1 object`)}}static defaultValues(e){throw new Error(`Invalid member name for ${this.CLASS_NAME} class: ${e}`)}static schema(e={}){throw new Error(`Method '${this.CLASS_NAME}.schema' should be overridden`)}get className(){return this.constructor.CLASS_NAME}toString(e="hex"){let t;try{t=this.toSchema()}catch{t=this.toSchema(!0)}return Nt.ToString(t.toBER(),e)}};Re.CLASS_NAME="PkiObject";function Dl(r){let e=!1,t=V,n=r.trim();for(let s=0;s<n.length;s++)n.charCodeAt(s)===32?e===!1&&(e=!0):(e&&(t+=" ",e=!1),t+=n[s]);return t.toLowerCase()}o(Dl,"stringPrep");var Wv="type",wB="value",JB=class oy extends Re{static{o(this,"AttributeTypeAndValue")}constructor(e={}){super(),this.type=O(e,Wv,oy.defaultValues(Wv)),this.value=O(e,wB,oy.defaultValues(wB)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Wv:return V;case wB:return{};default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new ot({name:t.type||V}),new bt({name:t.value||V})]})}fromSchema(e){ke(e,[Wv,"typeValue"]);let t=Be(e,e,oy.schema({names:{type:Wv,value:"typeValue"}}));Te.assertSchema(t,this.className),this.type=t.result.type.valueBlock.toString(),this.value=t.result.typeValue}toSchema(){return new J({value:[new ot({value:this.type}),this.value]})}toJSON(){let e={type:this.type};return Object.keys(this.value).length!==0?e.value=this.value.toJSON():e.value=this.value,e}isEqual(e){let t=[Wi.blockName(),kd.blockName(),Ld.blockName(),If.blockName(),zi.blockName(),Vd.blockName(),Ob.blockName(),Kv.blockName(),Pb.blockName(),$v.blockName(),kb.blockName(),Lb.blockName()];if(e instanceof ArrayBuffer)return vt.isEqual(this.value.valueBeforeDecodeView,e);if(e.constructor.blockName()===oy.blockName()){if(this.type!==e.type)return!1;let n=[!1,!1],s=this.value.constructor.blockName();for(let a of t)s===a&&(n[0]=!0),e.value.constructor.blockName()===a&&(n[1]=!0);if(n[0]!==n[1])return!1;if(n[0]&&n[1]){let a=Dl(this.value.valueBlock.value),u=Dl(e.value.valueBlock.value);if(a.localeCompare(u)!==0)return!1}else if(!vt.isEqual(this.value.valueBeforeDecodeView,e.value.valueBeforeDecodeView))return!1;return!0}return!1}};JB.CLASS_NAME="AttributeTypeAndValue";var Bf="typesAndValues",Kb="valueBeforeDecode",a7="RDN",qr=class uy extends Re{static{o(this,"RelativeDistinguishedNames")}constructor(e={}){super(),this.typesAndValues=O(e,Bf,uy.defaultValues(Bf)),this.valueBeforeDecode=O(e,Kb,uy.defaultValues(Kb)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Bf:return[];case Kb:return hn;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Bf:return t.length===0;case Kb:return t.byteLength===0;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new Bt({name:t.repeatedSequence||V,value:new rn({value:[new Bt({name:t.repeatedSet||V,value:JB.schema(t.typeAndValue||{})})]})})]})}fromSchema(e){ke(e,[a7,Bf]);let t=Be(e,e,uy.schema({names:{blockName:a7,repeatedSet:Bf}}));Te.assertSchema(t,this.className),Bf in t.result&&(this.typesAndValues=Array.from(t.result.typesAndValues,n=>new JB({schema:n}))),this.valueBeforeDecode=t.result.RDN.valueBeforeDecodeView.slice().buffer}toSchema(){if(this.valueBeforeDecode.byteLength===0)return new J({value:[new rn({value:Array.from(this.typesAndValues,t=>t.toSchema())})]});let e=en(this.valueBeforeDecode);if(Te.assert(e,"RelativeDistinguishedNames"),!(e.result instanceof J))throw new Error("ASN.1 result should be SEQUENCE");return e.result}toJSON(){return{typesAndValues:Array.from(this.typesAndValues,e=>e.toJSON())}}isEqual(e){if(e instanceof uy){if(this.typesAndValues.length!==e.typesAndValues.length)return!1;for(let[t,n]of this.typesAndValues.entries())if(n.isEqual(e.typesAndValues[t])===!1)return!1;return!0}return e instanceof ArrayBuffer?_c(this.valueBeforeDecode,e):!1}};qr.CLASS_NAME="RelativeDistinguishedNames";var cy="type",ly="value";function kde(r={},e=!1){let t=O(r,"names",{});return new J({optional:e,value:[new fe({optional:!0,idBlock:{tagClass:2,tagNumber:1},name:t.country_name||V,value:[new Mr({value:[new If,new zi]})]}),new fe({optional:!0,idBlock:{tagClass:2,tagNumber:2},name:t.administration_domain_name||V,value:[new Mr({value:[new If,new zi]})]}),new xt({optional:!0,idBlock:{tagClass:3,tagNumber:0},name:t.network_address||V,isHexOnly:!0}),new xt({optional:!0,idBlock:{tagClass:3,tagNumber:1},name:t.terminal_identifier||V,isHexOnly:!0}),new fe({optional:!0,idBlock:{tagClass:3,tagNumber:2},name:t.private_domain_name||V,value:[new Mr({value:[new If,new zi]})]}),new xt({optional:!0,idBlock:{tagClass:3,tagNumber:3},name:t.organization_name||V,isHexOnly:!0}),new xt({optional:!0,name:t.numeric_user_identifier||V,idBlock:{tagClass:3,tagNumber:4},isHexOnly:!0}),new fe({optional:!0,name:t.personal_name||V,idBlock:{tagClass:3,tagNumber:5},value:[new xt({idBlock:{tagClass:3,tagNumber:0},isHexOnly:!0}),new xt({optional:!0,idBlock:{tagClass:3,tagNumber:1},isHexOnly:!0}),new xt({optional:!0,idBlock:{tagClass:3,tagNumber:2},isHexOnly:!0}),new xt({optional:!0,idBlock:{tagClass:3,tagNumber:3},isHexOnly:!0})]}),new fe({optional:!0,name:t.organizational_unit_names||V,idBlock:{tagClass:3,tagNumber:6},value:[new Bt({value:new zi})]})]})}o(kde,"builtInStandardAttributes");function Lde(r=!1){return new J({optional:r,value:[new zi,new zi]})}o(Lde,"builtInDomainDefinedAttributes");function Vde(r=!1){return new rn({optional:r,value:[new xt({optional:!0,idBlock:{tagClass:3,tagNumber:0},isHexOnly:!0}),new fe({optional:!0,idBlock:{tagClass:3,tagNumber:1},value:[new bt]})]})}o(Vde,"extensionAttributes");var _r=class $d extends Re{static{o(this,"GeneralName")}constructor(e={}){super(),this.type=O(e,cy,$d.defaultValues(cy)),this.value=O(e,ly,$d.defaultValues(ly)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case cy:return 9;case ly:return{};default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case cy:return t===$d.defaultValues(e);case ly:return Object.keys(t).length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new Mr({value:[new fe({idBlock:{tagClass:3,tagNumber:0},name:t.blockName||V,value:[new ot,new fe({idBlock:{tagClass:3,tagNumber:0},value:[new bt]})]}),new xt({name:t.blockName||V,idBlock:{tagClass:3,tagNumber:1}}),new xt({name:t.blockName||V,idBlock:{tagClass:3,tagNumber:2}}),new fe({idBlock:{tagClass:3,tagNumber:3},name:t.blockName||V,value:[kde(t.builtInStandardAttributes||{},!1),Lde(!0),Vde(!0)]}),new fe({idBlock:{tagClass:3,tagNumber:4},name:t.blockName||V,value:[qr.schema(t.directoryName||{})]}),new fe({idBlock:{tagClass:3,tagNumber:5},name:t.blockName||V,value:[new fe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[new Mr({value:[new Vd,new zi,new Ld,new Wi,new kd]})]}),new fe({idBlock:{tagClass:3,tagNumber:1},value:[new Mr({value:[new Vd,new zi,new Ld,new Wi,new kd]})]})]}),new xt({name:t.blockName||V,idBlock:{tagClass:3,tagNumber:6}}),new xt({name:t.blockName||V,idBlock:{tagClass:3,tagNumber:7}}),new xt({name:t.blockName||V,idBlock:{tagClass:3,tagNumber:8}})]})}fromSchema(e){ke(e,["blockName","otherName","rfc822Name","dNSName","x400Address","directoryName","ediPartyName","uniformResourceIdentifier","iPAddress","registeredID"]);let t=Be(e,e,$d.schema({names:{blockName:"blockName",otherName:"otherName",rfc822Name:"rfc822Name",dNSName:"dNSName",x400Address:"x400Address",directoryName:{names:{blockName:"directoryName"}},ediPartyName:"ediPartyName",uniformResourceIdentifier:"uniformResourceIdentifier",iPAddress:"iPAddress",registeredID:"registeredID"}}));switch(Te.assertSchema(t,this.className),this.type=t.result.blockName.idBlock.tagNumber,this.type){case 0:this.value=t.result.blockName;break;case 1:case 2:case 6:{let n=t.result.blockName;n.idBlock.tagClass=1,n.idBlock.tagNumber=22;let s=n.toBER(!1),i=en(s);Te.assert(i,"GeneralName value"),this.value=i.result.valueBlock.value}break;case 3:this.value=t.result.blockName;break;case 4:this.value=new qr({schema:t.result.directoryName});break;case 5:this.value=t.result.ediPartyName;break;case 7:this.value=new qe({valueHex:t.result.blockName.valueBlock.valueHex});break;case 8:{let n=t.result.blockName;n.idBlock.tagClass=1,n.idBlock.tagNumber=6;let s=n.toBER(!1),i=en(s);Te.assert(i,"GeneralName registeredID"),this.value=i.result.valueBlock.toString()}break}}toSchema(){switch(this.type){case 0:case 3:case 5:return new fe({idBlock:{tagClass:3,tagNumber:this.type},value:[this.value]});case 1:case 2:case 6:{let e=new Kv({value:this.value});return e.idBlock.tagClass=3,e.idBlock.tagNumber=this.type,e}case 4:return new fe({idBlock:{tagClass:3,tagNumber:4},value:[this.value.toSchema()]});case 7:{let e=this.value;return e.idBlock.tagClass=3,e.idBlock.tagNumber=this.type,e}case 8:{let e=new ot({value:this.value});return e.idBlock.tagClass=3,e.idBlock.tagNumber=this.type,e}default:return $d.schema()}}toJSON(){let e={type:this.type,value:V};if(typeof this.value=="string")e.value=this.value;else try{e.value=this.value.toJSON()}catch{}return e}};_r.CLASS_NAME="GeneralName";var fy="accessMethod",hy="accessLocation",Ude=[fy,hy],YB=class vA extends Re{static{o(this,"AccessDescription")}constructor(e={}){super(),this.accessMethod=O(e,fy,vA.defaultValues(fy)),this.accessLocation=O(e,hy,vA.defaultValues(hy)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case fy:return V;case hy:return new _r;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new ot({name:t.accessMethod||V}),_r.schema(t.accessLocation||{})]})}fromSchema(e){ke(e,Ude);let t=Be(e,e,vA.schema({names:{accessMethod:fy,accessLocation:{names:{blockName:hy}}}}));Te.assertSchema(t,this.className),this.accessMethod=t.result.accessMethod.valueBlock.toString(),this.accessLocation=new _r({schema:t.result.accessLocation})}toSchema(){return new J({value:[new ot({value:this.accessMethod}),this.accessLocation.toSchema()]})}toJSON(){return{accessMethod:this.accessMethod,accessLocation:this.accessLocation.toJSON()}}};YB.CLASS_NAME="AccessDescription";var jc="seconds",Fc="millis",Mc="micros",kf=class Gd extends Re{static{o(this,"Accuracy")}constructor(e={}){super(),jc in e&&(this.seconds=O(e,jc,Gd.defaultValues(jc))),Fc in e&&(this.millis=O(e,Fc,Gd.defaultValues(Fc))),Mc in e&&(this.micros=O(e,Mc,Gd.defaultValues(Mc))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case jc:case Fc:case Mc:return 0;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case jc:case Fc:case Mc:return t===Gd.defaultValues(e);default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,optional:!0,value:[new xe({optional:!0,name:t.seconds||V}),new xt({name:t.millis||V,optional:!0,idBlock:{tagClass:3,tagNumber:0}}),new xt({name:t.micros||V,optional:!0,idBlock:{tagClass:3,tagNumber:1}})]})}fromSchema(e){ke(e,[jc,Fc,Mc]);let t=Be(e,e,Gd.schema({names:{seconds:jc,millis:Fc,micros:Mc}}));if(Te.assertSchema(t,this.className),"seconds"in t.result&&(this.seconds=t.result.seconds.valueBlock.valueDec),"millis"in t.result){let n=new xe({valueHex:t.result.millis.valueBlock.valueHex});this.millis=n.valueBlock.valueDec}if("micros"in t.result){let n=new xe({valueHex:t.result.micros.valueBlock.valueHex});this.micros=n.valueBlock.valueDec}}toSchema(){let e=[];if(this.seconds!==void 0&&e.push(new xe({value:this.seconds})),this.millis!==void 0){let t=new xe({value:this.millis});e.push(new xt({idBlock:{tagClass:3,tagNumber:0},valueHex:t.valueBlock.valueHexView}))}if(this.micros!==void 0){let t=new xe({value:this.micros});e.push(new xt({idBlock:{tagClass:3,tagNumber:1},valueHex:t.valueBlock.valueHexView}))}return new J({value:e})}toJSON(){let e={};return this.seconds!==void 0&&(e.seconds=this.seconds),this.millis!==void 0&&(e.millis=this.millis),this.micros!==void 0&&(e.micros=this.micros),e}};kf.CLASS_NAME="Accuracy";var $b="algorithmId",zv="algorithmParams",B7="algorithm",QB="params",jde=[B7,QB],we=class py extends Re{static{o(this,"AlgorithmIdentifier")}constructor(e={}){super(),this.algorithmId=O(e,$b,py.defaultValues($b)),zv in e&&(this.algorithmParams=O(e,zv,py.defaultValues(zv))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case $b:return V;case zv:return new bt;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case $b:return t===V;case zv:return t instanceof bt;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,optional:t.optional||!1,value:[new ot({name:t.algorithmIdentifier||V}),new bt({name:t.algorithmParams||V,optional:!0})]})}fromSchema(e){ke(e,jde);let t=Be(e,e,py.schema({names:{algorithmIdentifier:B7,algorithmParams:QB}}));Te.assertSchema(t,this.className),this.algorithmId=t.result.algorithm.valueBlock.toString(),QB in t.result&&(this.algorithmParams=t.result.params)}toSchema(){let e=[];return e.push(new ot({value:this.algorithmId})),this.algorithmParams&&!(this.algorithmParams instanceof bt)&&e.push(this.algorithmParams),new J({value:e})}toJSON(){let e={algorithmId:this.algorithmId};return this.algorithmParams&&!(this.algorithmParams instanceof bt)&&(e.algorithmParams=this.algorithmParams.toJSON()),e}isEqual(e){return!(e instanceof py)||this.algorithmId!==e.algorithmId?!1:this.algorithmParams?e.algorithmParams?JSON.stringify(this.algorithmParams)===JSON.stringify(e.algorithmParams):!1:!e.algorithmParams}};we.CLASS_NAME="AlgorithmIdentifier";var Xd="altNames",Fde=[Xd],ZB=class eR extends Re{static{o(this,"AltName")}constructor(e={}){super(),this.altNames=O(e,Xd,eR.defaultValues(Xd)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Xd:return[];default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new Bt({name:t.altNames||V,value:_r.schema()})]})}fromSchema(e){ke(e,Fde);let t=Be(e,e,eR.schema({names:{altNames:Xd}}));Te.assertSchema(t,this.className),Xd in t.result&&(this.altNames=Array.from(t.result.altNames,n=>new _r({schema:n})))}toSchema(){return new J({value:Array.from(this.altNames,e=>e.toSchema())})}toJSON(){return{altNames:Array.from(this.altNames,e=>e.toJSON())}}};ZB.CLASS_NAME="AltName";var Wd="type",zd="values",Mde=[Wd,zd],pn=class yA extends Re{static{o(this,"Attribute")}constructor(e={}){super(),this.type=O(e,Wd,yA.defaultValues(Wd)),this.values=O(e,zd,yA.defaultValues(zd)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Wd:return V;case zd:return[];default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Wd:return t===V;case zd:return t.length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new ot({name:t.type||V}),new rn({name:t.setName||V,value:[new Bt({name:t.values||V,value:new bt})]})]})}fromSchema(e){ke(e,Mde);let t=Be(e,e,yA.schema({names:{type:Wd,values:zd}}));Te.assertSchema(t,this.className),this.type=t.result.type.valueBlock.toString(),this.values=t.result.values}toSchema(){return new J({value:[new ot({value:this.type}),new rn({value:this.values})]})}toJSON(){return{type:this.type,values:Array.from(this.values,e=>e.toJSON())}}};pn.CLASS_NAME="Attribute";var dy="notBeforeTime",my="notAfterTime",qde=[dy,my],Jh=class xA extends Re{static{o(this,"AttCertValidityPeriod")}constructor(e={}){super(),this.notBeforeTime=O(e,dy,xA.defaultValues(dy)),this.notAfterTime=O(e,my,xA.defaultValues(my)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case dy:case my:return new Date(0,0,0);default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new Fr({name:t.notBeforeTime||V}),new Fr({name:t.notAfterTime||V})]})}fromSchema(e){ke(e,qde);let t=Be(e,e,xA.schema({names:{notBeforeTime:dy,notAfterTime:my}}));Te.assertSchema(t,this.className),this.notBeforeTime=t.result.notBeforeTime.toDate(),this.notAfterTime=t.result.notAfterTime.toDate()}toSchema(){return new J({value:[new Fr({valueDate:this.notBeforeTime}),new Fr({valueDate:this.notAfterTime})]})}toJSON(){return{notBeforeTime:this.notBeforeTime,notAfterTime:this.notAfterTime}}};Jh.CLASS_NAME="AttCertValidityPeriod";var Jv="names",o7="generalNames",ts=class tR extends Re{static{o(this,"GeneralNames")}constructor(e={}){super(),this.names=O(e,Jv,tR.defaultValues(Jv)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case"names":return[];default:return super.defaultValues(e)}}static schema(e={},t=!1){let n=O(e,Jv,{});return new J({optional:t,name:n.blockName||V,value:[new Bt({name:n.generalNames||V,value:_r.schema()})]})}fromSchema(e){ke(e,[Jv,o7]);let t=Be(e,e,tR.schema({names:{blockName:Jv,generalNames:o7}}));Te.assertSchema(t,this.className),this.names=Array.from(t.result.generalNames,n=>new _r({schema:n}))}toSchema(){return new J({value:Array.from(this.names,e=>e.toSchema())})}toJSON(){return{names:Array.from(this.names,e=>e.toJSON())}}};ts.CLASS_NAME="GeneralNames";var Hde="2.5.29.9",Kde="2.5.29.14",$de="2.5.29.15",Gde="2.5.29.16",R7="2.5.29.17",O7="2.5.29.18",rO="2.5.29.19",Xde="2.5.29.20",Wde="2.5.29.27",zde="2.5.29.21",Jde="2.5.29.24",P7="2.5.29.28",k7="2.5.29.29",L7="2.5.29.30",V7="2.5.29.31",nO="2.5.29.46",U7="2.5.29.32",Ji="2.5.29.32.0",Yde="1.3.6.1.4.1.311.21.10",j7="2.5.29.33",sO="2.5.29.35",F7="2.5.29.36",Qde="2.5.29.37",Zde="2.5.29.54",iO="1.3.6.1.5.5.7.1.1",eme="1.3.6.1.5.5.7.1.11",tme="1.3.6.1.4.1.11129.2.4.2";var rme="1.3.6.1.4.1.311.21.7",nme="1.3.6.1.4.1.311.21.1",sme="1.3.6.1.5.5.7.1.3",aO="1.2.840.113549.1.7.1",M7="1.2.840.113549.1.7.2",q7="1.2.840.113549.1.7.3",H7="1.2.840.113549.1.7.6",ime="1.2.840.113549.1.9.16.1.4",u7="1.2.840.113549.1.9.22.1",ame="1.2.840.113549.1.9.22.2",c7="1.2.840.113549.1.9.22.3",l7="1.2.840.113549.1.9.23.1",ome="1.3.6.1.5.5.7",oO=`${ome}.48`,wA=`${oO}.1.1`,zBe=`${oO}.2`,JBe=`${oO}.1`;var Lf="keyIdentifier",Vf="authorityCertIssuer",Uf="authorityCertSerialNumber",ume=[Lf,Vf,Uf],uO=class gy extends Re{static{o(this,"AuthorityKeyIdentifier")}constructor(e={}){super(),Lf in e&&(this.keyIdentifier=O(e,Lf,gy.defaultValues(Lf))),Vf in e&&(this.authorityCertIssuer=O(e,Vf,gy.defaultValues(Vf))),Uf in e&&(this.authorityCertSerialNumber=O(e,Uf,gy.defaultValues(Uf))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Lf:return new qe;case Vf:return[];case Uf:return new xe;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new xt({name:t.keyIdentifier||V,optional:!0,idBlock:{tagClass:3,tagNumber:0}}),new fe({optional:!0,idBlock:{tagClass:3,tagNumber:1},value:[new Bt({name:t.authorityCertIssuer||V,value:_r.schema()})]}),new xt({name:t.authorityCertSerialNumber||V,optional:!0,idBlock:{tagClass:3,tagNumber:2}})]})}fromSchema(e){ke(e,ume);let t=Be(e,e,gy.schema({names:{keyIdentifier:Lf,authorityCertIssuer:Vf,authorityCertSerialNumber:Uf}}));Te.assertSchema(t,this.className),Lf in t.result&&(this.keyIdentifier=new qe({valueHex:t.result.keyIdentifier.valueBlock.valueHex})),Vf in t.result&&(this.authorityCertIssuer=Array.from(t.result.authorityCertIssuer,n=>new _r({schema:n}))),Uf in t.result&&(this.authorityCertSerialNumber=new xe({valueHex:t.result.authorityCertSerialNumber.valueBlock.valueHex}))}toSchema(){let e=[];return this.keyIdentifier&&e.push(new xt({idBlock:{tagClass:3,tagNumber:0},valueHex:this.keyIdentifier.valueBlock.valueHexView})),this.authorityCertIssuer&&e.push(new fe({idBlock:{tagClass:3,tagNumber:1},value:Array.from(this.authorityCertIssuer,t=>t.toSchema())})),this.authorityCertSerialNumber&&e.push(new xt({idBlock:{tagClass:3,tagNumber:2},valueHex:this.authorityCertSerialNumber.valueBlock.valueHexView})),new J({value:e})}toJSON(){let e={};return this.keyIdentifier&&(e.keyIdentifier=this.keyIdentifier.toJSON()),this.authorityCertIssuer&&(e.authorityCertIssuer=Array.from(this.authorityCertIssuer,t=>t.toJSON())),this.authorityCertSerialNumber&&(e.authorityCertSerialNumber=this.authorityCertSerialNumber.toJSON()),e}};uO.CLASS_NAME="AuthorityKeyIdentifier";var Rf="pathLenConstraint",Of="cA",cO=class EA extends Re{static{o(this,"BasicConstraints")}constructor(e={}){super(),this.cA=O(e,Of,!1),Rf in e&&(this.pathLenConstraint=O(e,Rf,0)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Of:return!1;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new Ea({optional:!0,name:t.cA||V}),new xe({optional:!0,name:t.pathLenConstraint||V})]})}fromSchema(e){ke(e,[Of,Rf]);let t=Be(e,e,EA.schema({names:{cA:Of,pathLenConstraint:Rf}}));Te.assertSchema(t,this.className),Of in t.result&&(this.cA=t.result.cA.valueBlock.value),Rf in t.result&&(t.result.pathLenConstraint.valueBlock.isHexOnly?this.pathLenConstraint=t.result.pathLenConstraint:this.pathLenConstraint=t.result.pathLenConstraint.valueBlock.valueDec)}toSchema(){let e=[];return this.cA!==EA.defaultValues(Of)&&e.push(new Ea({value:this.cA})),Rf in this&&(this.pathLenConstraint instanceof xe?e.push(this.pathLenConstraint):e.push(new xe({value:this.pathLenConstraint}))),new J({value:e})}toJSON(){let e={};return this.cA!==EA.defaultValues(Of)&&(e.cA=this.cA),Rf in this&&(this.pathLenConstraint instanceof xe?e.pathLenConstraint=this.pathLenConstraint.toJSON():e.pathLenConstraint=this.pathLenConstraint),e}};cO.CLASS_NAME="BasicConstraints";var EB="certificateIndex",SB="keyIndex",K7=class rR extends Re{static{o(this,"CAVersion")}constructor(e={}){super(),this.certificateIndex=O(e,EB,rR.defaultValues(EB)),this.keyIndex=O(e,SB,rR.defaultValues(SB)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case EB:case SB:return 0;default:return super.defaultValues(e)}}static schema(){return new xe}fromSchema(e){if(e.constructor.blockName()!==xe.blockName())throw new Error("Object's schema was not verified against input data for CAVersion");let t=e.valueBlock.valueHex.slice(0),n=new Uint8Array(t);switch(!0){case t.byteLength<4:{let m=new ArrayBuffer(4);new Uint8Array(m).set(n,4-t.byteLength),t=m.slice(0)}break;case t.byteLength>4:{let m=new ArrayBuffer(4);new Uint8Array(m).set(n.slice(0,4)),t=m.slice(0)}break}let s=t.slice(0,2),i=new Uint8Array(s),a=i[0];i[0]=i[1],i[1]=a;let u=new Uint16Array(s);this.keyIndex=u[0];let c=t.slice(2),l=new Uint8Array(c);a=l[0],l[0]=l[1],l[1]=a;let h=new Uint16Array(c);this.certificateIndex=h[0]}toSchema(){let e=new ArrayBuffer(2),t=new Uint16Array(e);t[0]=this.certificateIndex;let n=new Uint8Array(e),s=n[0];n[0]=n[1],n[1]=s;let i=new ArrayBuffer(2),a=new Uint16Array(i);a[0]=this.keyIndex;let u=new Uint8Array(i);return s=u[0],u[0]=u[1],u[1]=s,new xe({valueHex:Cf(i,e)})}toJSON(){return{certificateIndex:this.certificateIndex,keyIndex:this.keyIndex}}};K7.CLASS_NAME="CAVersion";var vy="policyQualifierId",yy="qualifier",cme=[vy,yy],nR=class SA extends Re{static{o(this,"PolicyQualifierInfo")}constructor(e={}){super(),this.policyQualifierId=O(e,vy,SA.defaultValues(vy)),this.qualifier=O(e,yy,SA.defaultValues(yy)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case vy:return V;case yy:return new bt;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new ot({name:t.policyQualifierId||V}),new bt({name:t.qualifier||V})]})}fromSchema(e){ke(e,cme);let t=Be(e,e,SA.schema({names:{policyQualifierId:vy,qualifier:yy}}));Te.assertSchema(t,this.className),this.policyQualifierId=t.result.policyQualifierId.valueBlock.toString(),this.qualifier=t.result.qualifier}toSchema(){return new J({value:[new ot({value:this.policyQualifierId}),this.qualifier]})}toJSON(){return{policyQualifierId:this.policyQualifierId,qualifier:this.qualifier.toJSON()}}};nR.CLASS_NAME="PolicyQualifierInfo";var xy="policyIdentifier",jf="policyQualifiers",lme=[xy,jf],sR=class bA extends Re{static{o(this,"PolicyInformation")}constructor(e={}){super(),this.policyIdentifier=O(e,xy,bA.defaultValues(xy)),jf in e&&(this.policyQualifiers=O(e,jf,bA.defaultValues(jf))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case xy:return V;case jf:return[];default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new ot({name:t.policyIdentifier||V}),new J({optional:!0,value:[new Bt({name:t.policyQualifiers||V,value:nR.schema()})]})]})}fromSchema(e){ke(e,lme);let t=Be(e,e,bA.schema({names:{policyIdentifier:xy,policyQualifiers:jf}}));Te.assertSchema(t,this.className),this.policyIdentifier=t.result.policyIdentifier.valueBlock.toString(),jf in t.result&&(this.policyQualifiers=Array.from(t.result.policyQualifiers,n=>new nR({schema:n})))}toSchema(){let e=[];return e.push(new ot({value:this.policyIdentifier})),this.policyQualifiers&&e.push(new J({value:Array.from(this.policyQualifiers,t=>t.toSchema())})),new J({value:e})}toJSON(){let e={policyIdentifier:this.policyIdentifier};return this.policyQualifiers&&(e.policyQualifiers=Array.from(this.policyQualifiers,t=>t.toJSON())),e}};sR.CLASS_NAME="PolicyInformation";var wy="certificatePolicies",fme=[wy],iR=class aR extends Re{static{o(this,"CertificatePolicies")}constructor(e={}){super(),this.certificatePolicies=O(e,wy,aR.defaultValues(wy)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case wy:return[];default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new Bt({name:t.certificatePolicies||V,value:sR.schema()})]})}fromSchema(e){ke(e,fme);let t=Be(e,e,aR.schema({names:{certificatePolicies:wy}}));Te.assertSchema(t,this.className),this.certificatePolicies=Array.from(t.result.certificatePolicies,n=>new sR({schema:n}))}toSchema(){return new J({value:Array.from(this.certificatePolicies,e=>e.toSchema())})}toJSON(){return{certificatePolicies:Array.from(this.certificatePolicies,e=>e.toJSON())}}};iR.CLASS_NAME="CertificatePolicies";var Ey="templateID",su="templateMajorVersion",iu="templateMinorVersion",hme=[Ey,su,iu],pme=class Sy extends Re{static{o(this,"CertificateTemplate")}constructor(e={}){super(),this.templateID=O(e,Ey,Sy.defaultValues(Ey)),su in e&&(this.templateMajorVersion=O(e,su,Sy.defaultValues(su))),iu in e&&(this.templateMinorVersion=O(e,iu,Sy.defaultValues(iu))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Ey:return V;case su:case iu:return 0;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new ot({name:t.templateID||V}),new xe({name:t.templateMajorVersion||V,optional:!0}),new xe({name:t.templateMinorVersion||V,optional:!0})]})}fromSchema(e){ke(e,hme);let t=Be(e,e,Sy.schema({names:{templateID:Ey,templateMajorVersion:su,templateMinorVersion:iu}}));Te.assertSchema(t,this.className),this.templateID=t.result.templateID.valueBlock.toString(),su in t.result&&(this.templateMajorVersion=t.result.templateMajorVersion.valueBlock.valueDec),iu in t.result&&(this.templateMinorVersion=t.result.templateMinorVersion.valueBlock.valueDec)}toSchema(){let e=[];return e.push(new ot({value:this.templateID})),su in this&&e.push(new xe({value:this.templateMajorVersion})),iu in this&&e.push(new xe({value:this.templateMinorVersion})),new J({value:e})}toJSON(){let e={templateID:this.templateID};return su in this&&(e.templateMajorVersion=this.templateMajorVersion),iu in this&&(e.templateMinorVersion=this.templateMinorVersion),e}},Ff="distributionPoint",$7="distributionPointNames",Mf="reasons",qf="cRLIssuer",G7="cRLIssuerNames",dme=[Ff,$7,Mf,qf,G7],oR=class by extends Re{static{o(this,"DistributionPoint")}constructor(e={}){super(),Ff in e&&(this.distributionPoint=O(e,Ff,by.defaultValues(Ff))),Mf in e&&(this.reasons=O(e,Mf,by.defaultValues(Mf))),qf in e&&(this.cRLIssuer=O(e,qf,by.defaultValues(qf))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Ff:return[];case Mf:return new Gt;case qf:return[];default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new fe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[new Mr({value:[new fe({name:t.distributionPoint||V,optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[new Bt({name:t.distributionPointNames||V,value:_r.schema()})]}),new fe({name:t.distributionPoint||V,optional:!0,idBlock:{tagClass:3,tagNumber:1},value:qr.schema().valueBlock.value})]})]}),new xt({name:t.reasons||V,optional:!0,idBlock:{tagClass:3,tagNumber:1}}),new fe({name:t.cRLIssuer||V,optional:!0,idBlock:{tagClass:3,tagNumber:2},value:[new Bt({name:t.cRLIssuerNames||V,value:_r.schema()})]})]})}fromSchema(e){ke(e,dme);let t=Be(e,e,by.schema({names:{distributionPoint:Ff,distributionPointNames:$7,reasons:Mf,cRLIssuer:qf,cRLIssuerNames:G7}}));Te.assertSchema(t,this.className),Ff in t.result&&(t.result.distributionPoint.idBlock.tagNumber===0&&(this.distributionPoint=Array.from(t.result.distributionPointNames,n=>new _r({schema:n}))),t.result.distributionPoint.idBlock.tagNumber===1&&(this.distributionPoint=new qr({schema:new J({value:t.result.distributionPoint.valueBlock.value})}))),Mf in t.result&&(this.reasons=new Gt({valueHex:t.result.reasons.valueBlock.valueHex})),qf in t.result&&(this.cRLIssuer=Array.from(t.result.cRLIssuerNames,n=>new _r({schema:n})))}toSchema(){let e=[];if(this.distributionPoint){let t;this.distributionPoint instanceof Array?t=new fe({idBlock:{tagClass:3,tagNumber:0},value:Array.from(this.distributionPoint,n=>n.toSchema())}):t=new fe({idBlock:{tagClass:3,tagNumber:1},value:[this.distributionPoint.toSchema()]}),e.push(new fe({idBlock:{tagClass:3,tagNumber:0},value:[t]}))}return this.reasons&&e.push(new xt({idBlock:{tagClass:3,tagNumber:1},valueHex:this.reasons.valueBlock.valueHexView})),this.cRLIssuer&&e.push(new fe({idBlock:{tagClass:3,tagNumber:2},value:Array.from(this.cRLIssuer,t=>t.toSchema())})),new J({value:e})}toJSON(){let e={};return this.distributionPoint&&(this.distributionPoint instanceof Array?e.distributionPoint=Array.from(this.distributionPoint,t=>t.toJSON()):e.distributionPoint=this.distributionPoint.toJSON()),this.reasons&&(e.reasons=this.reasons.toJSON()),this.cRLIssuer&&(e.cRLIssuer=Array.from(this.cRLIssuer,t=>t.toJSON())),e}};oR.CLASS_NAME="DistributionPoint";var Ay="distributionPoints",mme=[Ay],uR=class cR extends Re{static{o(this,"CRLDistributionPoints")}constructor(e={}){super(),this.distributionPoints=O(e,Ay,cR.defaultValues(Ay)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Ay:return[];default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new Bt({name:t.distributionPoints||V,value:oR.schema()})]})}fromSchema(e){ke(e,mme);let t=Be(e,e,cR.schema({names:{distributionPoints:Ay}}));Te.assertSchema(t,this.className),this.distributionPoints=Array.from(t.result.distributionPoints,n=>new oR({schema:n}))}toSchema(){return new J({value:Array.from(this.distributionPoints,e=>e.toSchema())})}toJSON(){return{distributionPoints:Array.from(this.distributionPoints,e=>e.toJSON())}}};uR.CLASS_NAME="CRLDistributionPoints";var Cy="keyPurposes",gme=[Cy],X7=class lR extends Re{static{o(this,"ExtKeyUsage")}constructor(e={}){super(),this.keyPurposes=O(e,Cy,lR.defaultValues(Cy)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Cy:return[];default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new Bt({name:t.keyPurposes||V,value:new ot})]})}fromSchema(e){ke(e,gme);let t=Be(e,e,lR.schema({names:{keyPurposes:Cy}}));Te.assertSchema(t,this.className),this.keyPurposes=Array.from(t.result.keyPurposes,n=>n.valueBlock.toString())}toSchema(){return new J({value:Array.from(this.keyPurposes,e=>new ot({value:e}))})}toJSON(){return{keyPurposes:Array.from(this.keyPurposes)}}};X7.CLASS_NAME="ExtKeyUsage";var Yv="accessDescriptions",fR=class hR extends Re{static{o(this,"InfoAccess")}constructor(e={}){super(),this.accessDescriptions=O(e,Yv,hR.defaultValues(Yv)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Yv:return[];default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new Bt({name:t.accessDescriptions||V,value:YB.schema()})]})}fromSchema(e){ke(e,[Yv]);let t=Be(e,e,hR.schema({names:{accessDescriptions:Yv}}));Te.assertSchema(t,this.className),this.accessDescriptions=Array.from(t.result.accessDescriptions,n=>new YB({schema:n}))}toSchema(){return new J({value:Array.from(this.accessDescriptions,e=>e.toSchema())})}toJSON(){return{accessDescriptions:Array.from(this.accessDescriptions,e=>e.toJSON())}}};fR.CLASS_NAME="InfoAccess";var Hf="distributionPoint",W7="distributionPointNames",qc="onlyContainsUserCerts",Hc="onlyContainsCACerts",Kc="onlySomeReasons",$c="indirectCRL",Gc="onlyContainsAttributeCerts",vme=[Hf,W7,qc,Hc,Kc,$c,Gc],z7=class ms extends Re{static{o(this,"IssuingDistributionPoint")}constructor(e={}){super(),Hf in e&&(this.distributionPoint=O(e,Hf,ms.defaultValues(Hf))),this.onlyContainsUserCerts=O(e,qc,ms.defaultValues(qc)),this.onlyContainsCACerts=O(e,Hc,ms.defaultValues(Hc)),Kc in e&&(this.onlySomeReasons=O(e,Kc,ms.defaultValues(Kc))),this.indirectCRL=O(e,$c,ms.defaultValues($c)),this.onlyContainsAttributeCerts=O(e,Gc,ms.defaultValues(Gc)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Hf:return[];case qc:return!1;case Hc:return!1;case Kc:return 0;case $c:return!1;case Gc:return!1;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new fe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[new Mr({value:[new fe({name:t.distributionPoint||V,idBlock:{tagClass:3,tagNumber:0},value:[new Bt({name:t.distributionPointNames||V,value:_r.schema()})]}),new fe({name:t.distributionPoint||V,idBlock:{tagClass:3,tagNumber:1},value:qr.schema().valueBlock.value})]})]}),new xt({name:t.onlyContainsUserCerts||V,optional:!0,idBlock:{tagClass:3,tagNumber:1}}),new xt({name:t.onlyContainsCACerts||V,optional:!0,idBlock:{tagClass:3,tagNumber:2}}),new xt({name:t.onlySomeReasons||V,optional:!0,idBlock:{tagClass:3,tagNumber:3}}),new xt({name:t.indirectCRL||V,optional:!0,idBlock:{tagClass:3,tagNumber:4}}),new xt({name:t.onlyContainsAttributeCerts||V,optional:!0,idBlock:{tagClass:3,tagNumber:5}})]})}fromSchema(e){ke(e,vme);let t=Be(e,e,ms.schema({names:{distributionPoint:Hf,distributionPointNames:W7,onlyContainsUserCerts:qc,onlyContainsCACerts:Hc,onlySomeReasons:Kc,indirectCRL:$c,onlyContainsAttributeCerts:Gc}}));if(Te.assertSchema(t,this.className),Hf in t.result)switch(!0){case t.result.distributionPoint.idBlock.tagNumber===0:this.distributionPoint=Array.from(t.result.distributionPointNames,n=>new _r({schema:n}));break;case t.result.distributionPoint.idBlock.tagNumber===1:this.distributionPoint=new qr({schema:new J({value:t.result.distributionPoint.valueBlock.value})});break;default:throw new Error("Unknown tagNumber for distributionPoint: {$asn1.result.distributionPoint.idBlock.tagNumber}")}if(qc in t.result){let n=new Uint8Array(t.result.onlyContainsUserCerts.valueBlock.valueHex);this.onlyContainsUserCerts=n[0]!==0}if(Hc in t.result){let n=new Uint8Array(t.result.onlyContainsCACerts.valueBlock.valueHex);this.onlyContainsCACerts=n[0]!==0}if(Kc in t.result){let n=new Uint8Array(t.result.onlySomeReasons.valueBlock.valueHex);this.onlySomeReasons=n[0]}if($c in t.result){let n=new Uint8Array(t.result.indirectCRL.valueBlock.valueHex);this.indirectCRL=n[0]!==0}if(Gc in t.result){let n=new Uint8Array(t.result.onlyContainsAttributeCerts.valueBlock.valueHex);this.onlyContainsAttributeCerts=n[0]!==0}}toSchema(){let e=[];if(this.distributionPoint){let t;this.distributionPoint instanceof Array?t=new fe({idBlock:{tagClass:3,tagNumber:0},value:Array.from(this.distributionPoint,n=>n.toSchema())}):(t=this.distributionPoint.toSchema(),t.idBlock.tagClass=3,t.idBlock.tagNumber=1),e.push(new fe({idBlock:{tagClass:3,tagNumber:0},value:[t]}))}if(this.onlyContainsUserCerts!==ms.defaultValues(qc)&&e.push(new xt({idBlock:{tagClass:3,tagNumber:1},valueHex:new Uint8Array([255]).buffer})),this.onlyContainsCACerts!==ms.defaultValues(Hc)&&e.push(new xt({idBlock:{tagClass:3,tagNumber:2},valueHex:new Uint8Array([255]).buffer})),this.onlySomeReasons!==void 0){let t=new ArrayBuffer(1),n=new Uint8Array(t);n[0]=this.onlySomeReasons,e.push(new xt({idBlock:{tagClass:3,tagNumber:3},valueHex:t}))}return this.indirectCRL!==ms.defaultValues($c)&&e.push(new xt({idBlock:{tagClass:3,tagNumber:4},valueHex:new Uint8Array([255]).buffer})),this.onlyContainsAttributeCerts!==ms.defaultValues(Gc)&&e.push(new xt({idBlock:{tagClass:3,tagNumber:5},valueHex:new Uint8Array([255]).buffer})),new J({value:e})}toJSON(){let e={};return this.distributionPoint&&(this.distributionPoint instanceof Array?e.distributionPoint=Array.from(this.distributionPoint,t=>t.toJSON()):e.distributionPoint=this.distributionPoint.toJSON()),this.onlyContainsUserCerts!==ms.defaultValues(qc)&&(e.onlyContainsUserCerts=this.onlyContainsUserCerts),this.onlyContainsCACerts!==ms.defaultValues(Hc)&&(e.onlyContainsCACerts=this.onlyContainsCACerts),Kc in this&&(e.onlySomeReasons=this.onlySomeReasons),this.indirectCRL!==ms.defaultValues($c)&&(e.indirectCRL=this.indirectCRL),this.onlyContainsAttributeCerts!==ms.defaultValues(Gc)&&(e.onlyContainsAttributeCerts=this.onlyContainsAttributeCerts),e}};z7.CLASS_NAME="IssuingDistributionPoint";var Ny="base",Jd="minimum",Xc="maximum",yme=[Ny,Jd,Xc],Ty=class Iy extends Re{static{o(this,"GeneralSubtree")}constructor(e={}){super(),this.base=O(e,Ny,Iy.defaultValues(Ny)),this.minimum=O(e,Jd,Iy.defaultValues(Jd)),Xc in e&&(this.maximum=O(e,Xc,Iy.defaultValues(Xc))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Ny:return new _r;case Jd:return 0;case Xc:return 0;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[_r.schema(t.base||{}),new fe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[new xe({name:t.minimum||V})]}),new fe({optional:!0,idBlock:{tagClass:3,tagNumber:1},value:[new xe({name:t.maximum||V})]})]})}fromSchema(e){ke(e,yme);let t=Be(e,e,Iy.schema({names:{base:{names:{blockName:Ny}},minimum:Jd,maximum:Xc}}));Te.assertSchema(t,this.className),this.base=new _r({schema:t.result.base}),Jd in t.result&&(t.result.minimum.valueBlock.isHexOnly?this.minimum=t.result.minimum:this.minimum=t.result.minimum.valueBlock.valueDec),Xc in t.result&&(t.result.maximum.valueBlock.isHexOnly?this.maximum=t.result.maximum:this.maximum=t.result.maximum.valueBlock.valueDec)}toSchema(){let e=[];if(e.push(this.base.toSchema()),this.minimum!==0){let t=0;this.minimum instanceof xe?t=this.minimum:t=new xe({value:this.minimum}),e.push(new fe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[t]}))}if(Xc in this){let t=0;this.maximum instanceof xe?t=this.maximum:t=new xe({value:this.maximum}),e.push(new fe({optional:!0,idBlock:{tagClass:3,tagNumber:1},value:[t]}))}return new J({value:e})}toJSON(){let e={base:this.base.toJSON()};return this.minimum!==0&&(typeof this.minimum=="number"?e.minimum=this.minimum:e.minimum=this.minimum.toJSON()),this.maximum!==void 0&&(typeof this.maximum=="number"?e.maximum=this.maximum:e.maximum=this.maximum.toJSON()),e}};Ty.CLASS_NAME="GeneralSubtree";var Kf="permittedSubtrees",$f="excludedSubtrees",xme=[Kf,$f],J7=class AA extends Re{static{o(this,"NameConstraints")}constructor(e={}){super(),Kf in e&&(this.permittedSubtrees=O(e,Kf,AA.defaultValues(Kf))),$f in e&&(this.excludedSubtrees=O(e,$f,AA.defaultValues($f))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Kf:case $f:return[];default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new fe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[new Bt({name:t.permittedSubtrees||V,value:Ty.schema()})]}),new fe({optional:!0,idBlock:{tagClass:3,tagNumber:1},value:[new Bt({name:t.excludedSubtrees||V,value:Ty.schema()})]})]})}fromSchema(e){ke(e,xme);let t=Be(e,e,AA.schema({names:{permittedSubtrees:Kf,excludedSubtrees:$f}}));Te.assertSchema(t,this.className),Kf in t.result&&(this.permittedSubtrees=Array.from(t.result.permittedSubtrees,n=>new Ty({schema:n}))),$f in t.result&&(this.excludedSubtrees=Array.from(t.result.excludedSubtrees,n=>new Ty({schema:n})))}toSchema(){let e=[];return this.permittedSubtrees&&e.push(new fe({idBlock:{tagClass:3,tagNumber:0},value:Array.from(this.permittedSubtrees,t=>t.toSchema())})),this.excludedSubtrees&&e.push(new fe({idBlock:{tagClass:3,tagNumber:1},value:Array.from(this.excludedSubtrees,t=>t.toSchema())})),new J({value:e})}toJSON(){let e={};return this.permittedSubtrees&&(e.permittedSubtrees=Array.from(this.permittedSubtrees,t=>t.toJSON())),this.excludedSubtrees&&(e.excludedSubtrees=Array.from(this.excludedSubtrees,t=>t.toJSON())),e}};J7.CLASS_NAME="NameConstraints";var au="requireExplicitPolicy",ou="inhibitPolicyMapping",wme=[au,ou],Y7=class CA extends Re{static{o(this,"PolicyConstraints")}constructor(e={}){super(),au in e&&(this.requireExplicitPolicy=O(e,au,CA.defaultValues(au))),ou in e&&(this.inhibitPolicyMapping=O(e,ou,CA.defaultValues(ou))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case au:return 0;case ou:return 0;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new xt({name:t.requireExplicitPolicy||V,optional:!0,idBlock:{tagClass:3,tagNumber:0}}),new xt({name:t.inhibitPolicyMapping||V,optional:!0,idBlock:{tagClass:3,tagNumber:1}})]})}fromSchema(e){ke(e,wme);let t=Be(e,e,CA.schema({names:{requireExplicitPolicy:au,inhibitPolicyMapping:ou}}));if(Te.assertSchema(t,this.className),au in t.result){let n=t.result.requireExplicitPolicy;n.idBlock.tagClass=1,n.idBlock.tagNumber=2;let s=n.toBER(!1),i=en(s);Te.assert(i,"Integer"),this.requireExplicitPolicy=i.result.valueBlock.valueDec}if(ou in t.result){let n=t.result.inhibitPolicyMapping;n.idBlock.tagClass=1,n.idBlock.tagNumber=2;let s=n.toBER(!1),i=en(s);Te.assert(i,"Integer"),this.inhibitPolicyMapping=i.result.valueBlock.valueDec}}toSchema(){let e=[];if(au in this){let t=new xe({value:this.requireExplicitPolicy});t.idBlock.tagClass=3,t.idBlock.tagNumber=0,e.push(t)}if(ou in this){let t=new xe({value:this.inhibitPolicyMapping});t.idBlock.tagClass=3,t.idBlock.tagNumber=1,e.push(t)}return new J({value:e})}toJSON(){let e={};return au in this&&(e.requireExplicitPolicy=this.requireExplicitPolicy),ou in this&&(e.inhibitPolicyMapping=this.inhibitPolicyMapping),e}};Y7.CLASS_NAME="PolicyConstraints";var _y="issuerDomainPolicy",Dy="subjectDomainPolicy",Eme=[_y,Dy],pR=class NA extends Re{static{o(this,"PolicyMapping")}constructor(e={}){super(),this.issuerDomainPolicy=O(e,_y,NA.defaultValues(_y)),this.subjectDomainPolicy=O(e,Dy,NA.defaultValues(Dy)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case _y:return V;case Dy:return V;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new ot({name:t.issuerDomainPolicy||V}),new ot({name:t.subjectDomainPolicy||V})]})}fromSchema(e){ke(e,Eme);let t=Be(e,e,NA.schema({names:{issuerDomainPolicy:_y,subjectDomainPolicy:Dy}}));Te.assertSchema(t,this.className),this.issuerDomainPolicy=t.result.issuerDomainPolicy.valueBlock.toString(),this.subjectDomainPolicy=t.result.subjectDomainPolicy.valueBlock.toString()}toSchema(){return new J({value:[new ot({value:this.issuerDomainPolicy}),new ot({value:this.subjectDomainPolicy})]})}toJSON(){return{issuerDomainPolicy:this.issuerDomainPolicy,subjectDomainPolicy:this.subjectDomainPolicy}}};pR.CLASS_NAME="PolicyMapping";var By="mappings",Sme=[By],Q7=class dR extends Re{static{o(this,"PolicyMappings")}constructor(e={}){super(),this.mappings=O(e,By,dR.defaultValues(By)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case By:return[];default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new Bt({name:t.mappings||V,value:pR.schema()})]})}fromSchema(e){ke(e,Sme);let t=Be(e,e,dR.schema({names:{mappings:By}}));Te.assertSchema(t,this.className),this.mappings=Array.from(t.result.mappings,n=>new pR({schema:n}))}toSchema(){return new J({value:Array.from(this.mappings,e=>e.toSchema())})}toJSON(){return{mappings:Array.from(this.mappings,e=>e.toJSON())}}};Q7.CLASS_NAME="PolicyMappings";var Wc="notBefore",zc="notAfter",bme=[Wc,zc],Z7=class TA extends Re{static{o(this,"PrivateKeyUsagePeriod")}constructor(e={}){super(),Wc in e&&(this.notBefore=O(e,Wc,TA.defaultValues(Wc))),zc in e&&(this.notAfter=O(e,zc,TA.defaultValues(zc))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Wc:return new Date;case zc:return new Date;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new xt({name:t.notBefore||V,optional:!0,idBlock:{tagClass:3,tagNumber:0}}),new xt({name:t.notAfter||V,optional:!0,idBlock:{tagClass:3,tagNumber:1}})]})}fromSchema(e){ke(e,bme);let t=Be(e,e,TA.schema({names:{notBefore:Wc,notAfter:zc}}));if(Te.assertSchema(t,this.className),Wc in t.result){let n=new Fr;n.fromBuffer(t.result.notBefore.valueBlock.valueHex),this.notBefore=n.toDate()}if(zc in t.result){let n=new Fr({valueHex:t.result.notAfter.valueBlock.valueHex});n.fromBuffer(t.result.notAfter.valueBlock.valueHex),this.notAfter=n.toDate()}}toSchema(){let e=[];return Wc in this&&e.push(new xt({idBlock:{tagClass:3,tagNumber:0},valueHex:new Fr({valueDate:this.notBefore}).valueBlock.valueHexView})),zc in this&&e.push(new xt({idBlock:{tagClass:3,tagNumber:1},valueHex:new Fr({valueDate:this.notAfter}).valueBlock.valueHexView})),new J({value:e})}toJSON(){let e={};return this.notBefore&&(e.notBefore=this.notBefore),this.notAfter&&(e.notAfter=this.notAfter),e}};Z7.CLASS_NAME="PrivateKeyUsagePeriod";var Yd="id",uu="type",Qd="values",Ame=[Yd,uu],Cme=[Qd],mR=class IA extends Re{static{o(this,"QCStatement")}constructor(e={}){super(),this.id=O(e,Yd,IA.defaultValues(Yd)),uu in e&&(this.type=O(e,uu,IA.defaultValues(uu))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Yd:return V;case uu:return new tn;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Yd:return t===V;case uu:return t instanceof tn;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new ot({name:t.id||V}),new bt({name:t.type||V,optional:!0})]})}fromSchema(e){ke(e,Ame);let t=Be(e,e,IA.schema({names:{id:Yd,type:uu}}));Te.assertSchema(t,this.className),this.id=t.result.id.valueBlock.toString(),uu in t.result&&(this.type=t.result.type)}toSchema(){let e=[new ot({value:this.id})];return uu in this&&e.push(this.type),new J({value:e})}toJSON(){let e={id:this.id};return this.type&&(e.type=this.type.toJSON()),e}};mR.CLASS_NAME="QCStatement";var eH=class gR extends Re{static{o(this,"QCStatements")}constructor(e={}){super(),this.values=O(e,Qd,gR.defaultValues(Qd)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Qd:return[];default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Qd:return t.length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new Bt({name:t.values||V,value:mR.schema(t.value||{})})]})}fromSchema(e){ke(e,Cme);let t=Be(e,e,gR.schema({names:{values:Qd}}));Te.assertSchema(t,this.className),this.values=Array.from(t.result.values,n=>new mR({schema:n}))}toSchema(){return new J({value:Array.from(this.values,e=>e.toSchema())})}toJSON(){return{values:Array.from(this.values,e=>e.toJSON())}}};eH.CLASS_NAME="QCStatements";var Gf,Rl=class{static{o(this,"ECNamedCurves")}static register(e,t,n){this.namedCurves[e.toLowerCase()]=this.namedCurves[t]={name:e,id:t,size:n}}static find(e){return this.namedCurves[e.toLowerCase()]||null}};Gf=Rl;Rl.namedCurves={};Gf.register("P-256","1.2.840.10045.3.1.7",32),Gf.register("P-384","1.3.132.0.34",48),Gf.register("P-521","1.3.132.0.35",66),Gf.register("brainpoolP256r1","1.3.36.3.3.2.8.1.1.7",32),Gf.register("brainpoolP384r1","1.3.36.3.3.2.8.1.1.11",48),Gf.register("brainpoolP512r1","1.3.36.3.3.2.8.1.1.13",64);var Gb="x",Xb="y",Wb="namedCurve",Su=class Zd extends Re{static{o(this,"ECPublicKey")}constructor(e={}){super(),this.x=O(e,Gb,Zd.defaultValues(Gb)),this.y=O(e,Xb,Zd.defaultValues(Xb)),this.namedCurve=O(e,Wb,Zd.defaultValues(Wb)),e.json&&this.fromJSON(e.json),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Gb:case Xb:return hn;case Wb:return V;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Gb:case Xb:return t instanceof ArrayBuffer&&_c(t,Zd.defaultValues(e));case Wb:return typeof t=="string"&&t===Zd.defaultValues(e);default:return super.defaultValues(e)}}static schema(){return new Gv}fromSchema(e){let t=vt.toUint8Array(e);if(t[0]!==4)throw new Error("Object's schema was not verified against input data for ECPublicKey");let n=Rl.find(this.namedCurve);if(!n)throw new Error(`Incorrect curve OID: ${this.namedCurve}`);let s=n.size;if(t.byteLength!==s*2+1)throw new Error("Object's schema was not verified against input data for ECPublicKey");this.namedCurve=n.name,this.x=t.slice(1,s+1).buffer,this.y=t.slice(1+s,s*2+1).buffer}toSchema(){return new Gv({data:Cf(new Uint8Array([4]).buffer,this.x,this.y)})}toJSON(){let e=Rl.find(this.namedCurve);return{crv:e?e.name:this.namedCurve,x:Db(jv(this.x),!0,!0,!1),y:Db(jv(this.y),!0,!0,!1)}}fromJSON(e){gr.assert("json",e,"crv","x","y");let t=0,n=Rl.find(e.crv);n&&(this.namedCurve=n.id,t=n.size);let s=Nf(Pd(e.x,!0));if(s.byteLength<t){this.x=new ArrayBuffer(t);let a=new Uint8Array(this.x),u=new Uint8Array(s);a.set(u,1)}else this.x=s.slice(0,t);let i=Nf(Pd(e.y,!0));if(i.byteLength<t){this.y=new ArrayBuffer(t);let a=new Uint8Array(this.y),u=new Uint8Array(i);a.set(u,1)}else this.y=i.slice(0,t)}};Su.CLASS_NAME="ECPublicKey";var Ry="modulus",Oy="publicExponent",Nme=[Ry,Oy],vR=class _A extends Re{static{o(this,"RSAPublicKey")}constructor(e={}){super(),this.modulus=O(e,Ry,_A.defaultValues(Ry)),this.publicExponent=O(e,Oy,_A.defaultValues(Oy)),e.json&&this.fromJSON(e.json),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Ry:return new xe;case Oy:return new xe;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new xe({name:t.modulus||V}),new xe({name:t.publicExponent||V})]})}fromSchema(e){ke(e,Nme);let t=Be(e,e,_A.schema({names:{modulus:Ry,publicExponent:Oy}}));Te.assertSchema(t,this.className),this.modulus=t.result.modulus.convertFromDER(256),this.publicExponent=t.result.publicExponent}toSchema(){return new J({value:[this.modulus.convertToDER(),this.publicExponent]})}toJSON(){return{n:Nt.ToBase64Url(this.modulus.valueBlock.valueHexView),e:Nt.ToBase64Url(this.publicExponent.valueBlock.valueHexView)}}fromJSON(e){gr.assert("json",e,"n","e");let t=Nf(Pd(e.n,!0));this.modulus=new xe({valueHex:t.slice(0,Math.pow(2,z9(t.byteLength)))}),this.publicExponent=new xe({valueHex:Nf(Pd(e.e,!0)).slice(0,3)})}};vR.CLASS_NAME="RSAPublicKey";var Py="algorithm",ky="subjectPublicKey",Tme=[Py,ky],Da=class DA extends Re{static{o(this,"PublicKeyInfo")}get parsedKey(){if(this._parsedKey===void 0){switch(this.algorithm.algorithmId){case"1.2.840.10045.2.1":if("algorithmParams"in this.algorithm&&this.algorithm.algorithmParams.constructor.blockName()===ot.blockName())try{this._parsedKey=new Su({namedCurve:this.algorithm.algorithmParams.valueBlock.toString(),schema:this.subjectPublicKey.valueBlock.valueHexView})}catch{}break;case"1.2.840.113549.1.1.1":{let e=en(this.subjectPublicKey.valueBlock.valueHexView);if(e.offset!==-1)try{this._parsedKey=new vR({schema:e.result})}catch{}}break}this._parsedKey||(this._parsedKey=null)}return this._parsedKey||void 0}set parsedKey(e){this._parsedKey=e}constructor(e={}){super(),this.algorithm=O(e,Py,DA.defaultValues(Py)),this.subjectPublicKey=O(e,ky,DA.defaultValues(ky));let t=O(e,"parsedKey",null);t&&(this.parsedKey=t),e.json&&this.fromJSON(e.json),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Py:return new we;case ky:return new Gt;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[we.schema(t.algorithm||{}),new Gt({name:t.subjectPublicKey||V})]})}fromSchema(e){ke(e,Tme);let t=Be(e,e,DA.schema({names:{algorithm:{names:{blockName:Py}},subjectPublicKey:ky}}));Te.assertSchema(t,this.className),this.algorithm=new we({schema:t.result.algorithm}),this.subjectPublicKey=t.result.subjectPublicKey}toSchema(){return new J({value:[this.algorithm.toSchema(),this.subjectPublicKey]})}toJSON(){if(!this.parsedKey)return{algorithm:this.algorithm.toJSON(),subjectPublicKey:this.subjectPublicKey.toJSON()};let e={};switch(this.algorithm.algorithmId){case"1.2.840.10045.2.1":e.kty="EC";break;case"1.2.840.113549.1.1.1":e.kty="RSA";break}let t=this.parsedKey.toJSON();return Object.assign(e,t),e}fromJSON(e){if("kty"in e){switch(e.kty.toUpperCase()){case"EC":this.parsedKey=new Su({json:e}),this.algorithm=new we({algorithmId:"1.2.840.10045.2.1",algorithmParams:new ot({value:this.parsedKey.namedCurve})});break;case"RSA":this.parsedKey=new vR({json:e}),this.algorithm=new we({algorithmId:"1.2.840.113549.1.1.1",algorithmParams:new tn});break;default:throw new Error(`Invalid value for "kty" parameter: ${e.kty}`)}this.subjectPublicKey=new Gt({valueHex:this.parsedKey.toSchema().toBER(!1)})}}async importKey(e,t=kt(!0)){try{if(!e)throw new Error("Need to provide publicKey input parameter");let n=await t.exportKey("spki",e),s=en(n);try{this.fromSchema(s.result)}catch{throw new Error("Error during initializing object from schema")}}catch(n){let s=n instanceof Error?n.message:`${n}`;throw new Error(`Error during exporting public key: ${s}`)}}};Da.CLASS_NAME="PublicKeyInfo";var em="version",tm="privateKey",ba="namedCurve",Jc="publicKey",Ime=[em,tm,ba,Jc],yR=class cu extends Re{static{o(this,"ECPrivateKey")}constructor(e={}){super(),this.version=O(e,em,cu.defaultValues(em)),this.privateKey=O(e,tm,cu.defaultValues(tm)),ba in e&&(this.namedCurve=O(e,ba,cu.defaultValues(ba))),Jc in e&&(this.publicKey=O(e,Jc,cu.defaultValues(Jc))),e.json&&this.fromJSON(e.json),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case em:return 1;case tm:return new qe;case ba:return V;case Jc:return new Su;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case em:return t===cu.defaultValues(e);case tm:return t.isEqual(cu.defaultValues(e));case ba:return t===V;case Jc:return Su.compareWithDefault(ba,t.namedCurve)&&Su.compareWithDefault("x",t.x)&&Su.compareWithDefault("y",t.y);default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new xe({name:t.version||V}),new qe({name:t.privateKey||V}),new fe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[new ot({name:t.namedCurve||V})]}),new fe({optional:!0,idBlock:{tagClass:3,tagNumber:1},value:[new Gt({name:t.publicKey||V})]})]})}fromSchema(e){ke(e,Ime);let t=Be(e,e,cu.schema({names:{version:em,privateKey:tm,namedCurve:ba,publicKey:Jc}}));if(Te.assertSchema(t,this.className),this.version=t.result.version.valueBlock.valueDec,this.privateKey=t.result.privateKey,ba in t.result&&(this.namedCurve=t.result.namedCurve.valueBlock.toString()),Jc in t.result){let n={schema:t.result.publicKey.valueBlock.valueHex};ba in this&&(n.namedCurve=this.namedCurve),this.publicKey=new Su(n)}}toSchema(){let e=[new xe({value:this.version}),this.privateKey];return this.namedCurve&&e.push(new fe({idBlock:{tagClass:3,tagNumber:0},value:[new ot({value:this.namedCurve})]})),this.publicKey&&e.push(new fe({idBlock:{tagClass:3,tagNumber:1},value:[new Gt({valueHex:this.publicKey.toSchema().toBER(!1)})]})),new J({value:e})}toJSON(){if(!this.namedCurve||cu.compareWithDefault(ba,this.namedCurve))throw new Error('Not enough information for making JSON: absent "namedCurve" value');let e=Rl.find(this.namedCurve),t={crv:e?e.name:this.namedCurve,d:Nt.ToBase64Url(this.privateKey.valueBlock.valueHexView)};if(this.publicKey){let n=this.publicKey.toJSON();t.x=n.x,t.y=n.y}return t}fromJSON(e){gr.assert("json",e,"crv","d");let t=0,n=Rl.find(e.crv);n&&(this.namedCurve=n.id,t=n.size);let s=Nt.FromBase64Url(e.d);if(s.byteLength<t){let i=new ArrayBuffer(t),a=new Uint8Array(i),u=new Uint8Array(s);a.set(u,1),this.privateKey=new qe({valueHex:i})}else this.privateKey=new qe({valueHex:s.slice(0,t)});e.x&&e.y&&(this.publicKey=new Su({json:e}))}};yR.CLASS_NAME="ECPrivateKey";var Ly="prime",Vy="exponent",Uy="coefficient",_me=[Ly,Vy,Uy],BA=class jy extends Re{static{o(this,"OtherPrimeInfo")}constructor(e={}){super(),this.prime=O(e,Ly,jy.defaultValues(Ly)),this.exponent=O(e,Vy,jy.defaultValues(Vy)),this.coefficient=O(e,Uy,jy.defaultValues(Uy)),e.json&&this.fromJSON(e.json),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Ly:return new xe;case Vy:return new xe;case Uy:return new xe;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new xe({name:t.prime||V}),new xe({name:t.exponent||V}),new xe({name:t.coefficient||V})]})}fromSchema(e){ke(e,_me);let t=Be(e,e,jy.schema({names:{prime:Ly,exponent:Vy,coefficient:Uy}}));Te.assertSchema(t,this.className),this.prime=t.result.prime.convertFromDER(),this.exponent=t.result.exponent.convertFromDER(),this.coefficient=t.result.coefficient.convertFromDER()}toSchema(){return new J({value:[this.prime.convertToDER(),this.exponent.convertToDER(),this.coefficient.convertToDER()]})}toJSON(){return{r:Nt.ToBase64Url(this.prime.valueBlock.valueHexView),d:Nt.ToBase64Url(this.exponent.valueBlock.valueHexView),t:Nt.ToBase64Url(this.coefficient.valueBlock.valueHexView)}}fromJSON(e){gr.assert("json",e,"r","d","r"),this.prime=new xe({valueHex:Nt.FromBase64Url(e.r)}),this.exponent=new xe({valueHex:Nt.FromBase64Url(e.d)}),this.coefficient=new xe({valueHex:Nt.FromBase64Url(e.t)})}};BA.CLASS_NAME="OtherPrimeInfo";var Fy="version",My="modulus",qy="publicExponent",Hy="privateExponent",Ky="prime1",$y="prime2",Gy="exponent1",Xy="exponent2",Wy="coefficient",Xf="otherPrimeInfos",Dme=[Fy,My,qy,Hy,Ky,$y,Gy,Xy,Wy,Xf],xR=class Yi extends Re{static{o(this,"RSAPrivateKey")}constructor(e={}){super(),this.version=O(e,Fy,Yi.defaultValues(Fy)),this.modulus=O(e,My,Yi.defaultValues(My)),this.publicExponent=O(e,qy,Yi.defaultValues(qy)),this.privateExponent=O(e,Hy,Yi.defaultValues(Hy)),this.prime1=O(e,Ky,Yi.defaultValues(Ky)),this.prime2=O(e,$y,Yi.defaultValues($y)),this.exponent1=O(e,Gy,Yi.defaultValues(Gy)),this.exponent2=O(e,Xy,Yi.defaultValues(Xy)),this.coefficient=O(e,Wy,Yi.defaultValues(Wy)),Xf in e&&(this.otherPrimeInfos=O(e,Xf,Yi.defaultValues(Xf))),e.json&&this.fromJSON(e.json),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Fy:return 0;case My:return new xe;case qy:return new xe;case Hy:return new xe;case Ky:return new xe;case $y:return new xe;case Gy:return new xe;case Xy:return new xe;case Wy:return new xe;case Xf:return[];default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new xe({name:t.version||V}),new xe({name:t.modulus||V}),new xe({name:t.publicExponent||V}),new xe({name:t.privateExponent||V}),new xe({name:t.prime1||V}),new xe({name:t.prime2||V}),new xe({name:t.exponent1||V}),new xe({name:t.exponent2||V}),new xe({name:t.coefficient||V}),new J({optional:!0,value:[new Bt({name:t.otherPrimeInfosName||V,value:BA.schema(t.otherPrimeInfo||{})})]})]})}fromSchema(e){ke(e,Dme);let t=Be(e,e,Yi.schema({names:{version:Fy,modulus:My,publicExponent:qy,privateExponent:Hy,prime1:Ky,prime2:$y,exponent1:Gy,exponent2:Xy,coefficient:Wy,otherPrimeInfo:{names:{blockName:Xf}}}}));Te.assertSchema(t,this.className),this.version=t.result.version.valueBlock.valueDec,this.modulus=t.result.modulus.convertFromDER(256),this.publicExponent=t.result.publicExponent,this.privateExponent=t.result.privateExponent.convertFromDER(256),this.prime1=t.result.prime1.convertFromDER(128),this.prime2=t.result.prime2.convertFromDER(128),this.exponent1=t.result.exponent1.convertFromDER(128),this.exponent2=t.result.exponent2.convertFromDER(128),this.coefficient=t.result.coefficient.convertFromDER(128),Xf in t.result&&(this.otherPrimeInfos=Array.from(t.result.otherPrimeInfos,n=>new BA({schema:n})))}toSchema(){let e=[];return e.push(new xe({value:this.version})),e.push(this.modulus.convertToDER()),e.push(this.publicExponent),e.push(this.privateExponent.convertToDER()),e.push(this.prime1.convertToDER()),e.push(this.prime2.convertToDER()),e.push(this.exponent1.convertToDER()),e.push(this.exponent2.convertToDER()),e.push(this.coefficient.convertToDER()),this.otherPrimeInfos&&e.push(new J({value:Array.from(this.otherPrimeInfos,t=>t.toSchema())})),new J({value:e})}toJSON(){let e={n:Nt.ToBase64Url(this.modulus.valueBlock.valueHexView),e:Nt.ToBase64Url(this.publicExponent.valueBlock.valueHexView),d:Nt.ToBase64Url(this.privateExponent.valueBlock.valueHexView),p:Nt.ToBase64Url(this.prime1.valueBlock.valueHexView),q:Nt.ToBase64Url(this.prime2.valueBlock.valueHexView),dp:Nt.ToBase64Url(this.exponent1.valueBlock.valueHexView),dq:Nt.ToBase64Url(this.exponent2.valueBlock.valueHexView),qi:Nt.ToBase64Url(this.coefficient.valueBlock.valueHexView)};return this.otherPrimeInfos&&(e.oth=Array.from(this.otherPrimeInfos,t=>t.toJSON())),e}fromJSON(e){gr.assert("json",e,"n","e","d","p","q","dp","dq","qi"),this.modulus=new xe({valueHex:Nt.FromBase64Url(e.n)}),this.publicExponent=new xe({valueHex:Nt.FromBase64Url(e.e)}),this.privateExponent=new xe({valueHex:Nt.FromBase64Url(e.d)}),this.prime1=new xe({valueHex:Nt.FromBase64Url(e.p)}),this.prime2=new xe({valueHex:Nt.FromBase64Url(e.q)}),this.exponent1=new xe({valueHex:Nt.FromBase64Url(e.dp)}),this.exponent2=new xe({valueHex:Nt.FromBase64Url(e.dq)}),this.coefficient=new xe({valueHex:Nt.FromBase64Url(e.qi)}),e.oth&&(this.otherPrimeInfos=Array.from(e.oth,t=>new BA({json:t})))}};xR.CLASS_NAME="RSAPrivateKey";var zy="version",Jy="privateKeyAlgorithm",Yy="privateKey",Wf="attributes",zb="parsedKey",Bme=[zy,Jy,Yy,Wf],Ux=class zf extends Re{static{o(this,"PrivateKeyInfo")}constructor(e={}){super(),this.version=O(e,zy,zf.defaultValues(zy)),this.privateKeyAlgorithm=O(e,Jy,zf.defaultValues(Jy)),this.privateKey=O(e,Yy,zf.defaultValues(Yy)),Wf in e&&(this.attributes=O(e,Wf,zf.defaultValues(Wf))),zb in e&&(this.parsedKey=O(e,zb,zf.defaultValues(zb))),e.json&&this.fromJSON(e.json),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case zy:return 0;case Jy:return new we;case Yy:return new qe;case Wf:return[];case zb:return{};default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new xe({name:t.version||V}),we.schema(t.privateKeyAlgorithm||{}),new qe({name:t.privateKey||V}),new fe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[new Bt({name:t.attributes||V,value:pn.schema()})]})]})}fromSchema(e){ke(e,Bme);let t=Be(e,e,zf.schema({names:{version:zy,privateKeyAlgorithm:{names:{blockName:Jy}},privateKey:Yy,attributes:Wf}}));switch(Te.assertSchema(t,this.className),this.version=t.result.version.valueBlock.valueDec,this.privateKeyAlgorithm=new we({schema:t.result.privateKeyAlgorithm}),this.privateKey=t.result.privateKey,Wf in t.result&&(this.attributes=Array.from(t.result.attributes,n=>new pn({schema:n}))),this.privateKeyAlgorithm.algorithmId){case"1.2.840.113549.1.1.1":{let n=en(this.privateKey.valueBlock.valueHexView);n.offset!==-1&&(this.parsedKey=new xR({schema:n.result}))}break;case"1.2.840.10045.2.1":if("algorithmParams"in this.privateKeyAlgorithm&&this.privateKeyAlgorithm.algorithmParams instanceof ot){let n=en(this.privateKey.valueBlock.valueHexView);n.offset!==-1&&(this.parsedKey=new yR({namedCurve:this.privateKeyAlgorithm.algorithmParams.valueBlock.toString(),schema:n.result}))}break}}toSchema(){let e=[new xe({value:this.version}),this.privateKeyAlgorithm.toSchema(),this.privateKey];return this.attributes&&e.push(new fe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:Array.from(this.attributes,t=>t.toSchema())})),new J({value:e})}toJSON(){if(!this.parsedKey){let n={version:this.version,privateKeyAlgorithm:this.privateKeyAlgorithm.toJSON(),privateKey:this.privateKey.toJSON()};return this.attributes&&(n.attributes=Array.from(this.attributes,s=>s.toJSON())),n}let e={};switch(this.privateKeyAlgorithm.algorithmId){case"1.2.840.10045.2.1":e.kty="EC";break;case"1.2.840.113549.1.1.1":e.kty="RSA";break}let t=this.parsedKey.toJSON();return Object.assign(e,t),e}fromJSON(e){if("kty"in e){switch(e.kty.toUpperCase()){case"EC":this.parsedKey=new yR({json:e}),this.privateKeyAlgorithm=new we({algorithmId:"1.2.840.10045.2.1",algorithmParams:new ot({value:this.parsedKey.namedCurve})});break;case"RSA":this.parsedKey=new xR({json:e}),this.privateKeyAlgorithm=new we({algorithmId:"1.2.840.113549.1.1.1",algorithmParams:new tn});break;default:throw new Error(`Invalid value for "kty" parameter: ${e.kty}`)}this.privateKey=new qe({valueHex:this.parsedKey.toSchema().toBER(!1)})}}};Ux.CLASS_NAME="PrivateKeyInfo";var rm="contentType",nm="contentEncryptionAlgorithm",Jf="encryptedContent",Rme=[rm,nm,Jf],f7=1024,gs=class Qy extends Re{static{o(this,"EncryptedContentInfo")}constructor(e={}){if(super(),this.contentType=O(e,rm,Qy.defaultValues(rm)),this.contentEncryptionAlgorithm=O(e,nm,Qy.defaultValues(nm)),Jf in e&&e.encryptedContent&&(this.encryptedContent=e.encryptedContent,this.encryptedContent.idBlock.tagClass===1&&this.encryptedContent.idBlock.tagNumber===4&&this.encryptedContent.idBlock.isConstructed===!1&&!e.disableSplit)){let t=new qe({idBlock:{isConstructed:!0},isConstructed:!0}),n=0,s=this.encryptedContent.valueBlock.valueHexView.slice().buffer,i=s.byteLength;for(;i>0;){let a=new Uint8Array(s,n,n+f7>s.byteLength?s.byteLength-n:f7),u=new ArrayBuffer(a.length),c=new Uint8Array(u);for(let l=0;l<c.length;l++)c[l]=a[l];t.valueBlock.value.push(new qe({valueHex:u})),i-=a.length,n+=a.length}this.encryptedContent=t}e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case rm:return V;case nm:return new we;case Jf:return new qe;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case rm:return t===V;case nm:return t.algorithmId===V&&!("algorithmParams"in t);case Jf:return t.isEqual(Qy.defaultValues(Jf));default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new ot({name:t.contentType||V}),we.schema(t.contentEncryptionAlgorithm||{}),new Mr({value:[new fe({name:t.encryptedContent||V,idBlock:{tagClass:3,tagNumber:0},value:[new Bt({value:new qe})]}),new xt({name:t.encryptedContent||V,idBlock:{tagClass:3,tagNumber:0}})]})]})}fromSchema(e){ke(e,Rme);let t=Be(e,e,Qy.schema({names:{contentType:rm,contentEncryptionAlgorithm:{names:{blockName:nm}},encryptedContent:Jf}}));Te.assertSchema(t,this.className),this.contentType=t.result.contentType.valueBlock.toString(),this.contentEncryptionAlgorithm=new we({schema:t.result.contentEncryptionAlgorithm}),Jf in t.result&&(this.encryptedContent=t.result.encryptedContent,this.encryptedContent.idBlock.tagClass=1,this.encryptedContent.idBlock.tagNumber=4)}toSchema(){let e={isIndefiniteForm:!1},t=[];if(t.push(new ot({value:this.contentType})),t.push(this.contentEncryptionAlgorithm.toSchema()),this.encryptedContent){e.isIndefiniteForm=this.encryptedContent.idBlock.isConstructed;let n=this.encryptedContent;n.idBlock.tagClass=3,n.idBlock.tagNumber=0,n.lenBlock.isIndefiniteForm=this.encryptedContent.idBlock.isConstructed,t.push(n)}return new J({lenBlock:e,value:t})}toJSON(){let e={contentType:this.contentType,contentEncryptionAlgorithm:this.contentEncryptionAlgorithm.toJSON()};return this.encryptedContent&&(e.encryptedContent=this.encryptedContent.toJSON()),e}getEncryptedContent(){if(!this.encryptedContent)throw new Error("Parameter 'encryptedContent' is undefined");return qe.prototype.getValue.call(this.encryptedContent)}};gs.CLASS_NAME="EncryptedContentInfo";var Yc="hashAlgorithm",Qc="maskGenAlgorithm",Zc="saltLength",el="trailerField",Ome=[Yc,Qc,Zc,el],RA=class ei extends Re{static{o(this,"RSASSAPSSParams")}constructor(e={}){super(),this.hashAlgorithm=O(e,Yc,ei.defaultValues(Yc)),this.maskGenAlgorithm=O(e,Qc,ei.defaultValues(Qc)),this.saltLength=O(e,Zc,ei.defaultValues(Zc)),this.trailerField=O(e,el,ei.defaultValues(el)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Yc:return new we({algorithmId:"1.3.14.3.2.26",algorithmParams:new tn});case Qc:return new we({algorithmId:"1.2.840.113549.1.1.8",algorithmParams:new we({algorithmId:"1.3.14.3.2.26",algorithmParams:new tn}).toSchema()});case Zc:return 20;case el:return 1;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new fe({idBlock:{tagClass:3,tagNumber:0},optional:!0,value:[we.schema(t.hashAlgorithm||{})]}),new fe({idBlock:{tagClass:3,tagNumber:1},optional:!0,value:[we.schema(t.maskGenAlgorithm||{})]}),new fe({idBlock:{tagClass:3,tagNumber:2},optional:!0,value:[new xe({name:t.saltLength||V})]}),new fe({idBlock:{tagClass:3,tagNumber:3},optional:!0,value:[new xe({name:t.trailerField||V})]})]})}fromSchema(e){ke(e,Ome);let t=Be(e,e,ei.schema({names:{hashAlgorithm:{names:{blockName:Yc}},maskGenAlgorithm:{names:{blockName:Qc}},saltLength:Zc,trailerField:el}}));Te.assertSchema(t,this.className),Yc in t.result&&(this.hashAlgorithm=new we({schema:t.result.hashAlgorithm})),Qc in t.result&&(this.maskGenAlgorithm=new we({schema:t.result.maskGenAlgorithm})),Zc in t.result&&(this.saltLength=t.result.saltLength.valueBlock.valueDec),el in t.result&&(this.trailerField=t.result.trailerField.valueBlock.valueDec)}toSchema(){let e=[];return this.hashAlgorithm.isEqual(ei.defaultValues(Yc))||e.push(new fe({idBlock:{tagClass:3,tagNumber:0},value:[this.hashAlgorithm.toSchema()]})),this.maskGenAlgorithm.isEqual(ei.defaultValues(Qc))||e.push(new fe({idBlock:{tagClass:3,tagNumber:1},value:[this.maskGenAlgorithm.toSchema()]})),this.saltLength!==ei.defaultValues(Zc)&&e.push(new fe({idBlock:{tagClass:3,tagNumber:2},value:[new xe({value:this.saltLength})]})),this.trailerField!==ei.defaultValues(el)&&e.push(new fe({idBlock:{tagClass:3,tagNumber:3},value:[new xe({value:this.trailerField})]})),new J({value:e})}toJSON(){let e={};return this.hashAlgorithm.isEqual(ei.defaultValues(Yc))||(e.hashAlgorithm=this.hashAlgorithm.toJSON()),this.maskGenAlgorithm.isEqual(ei.defaultValues(Qc))||(e.maskGenAlgorithm=this.maskGenAlgorithm.toJSON()),this.saltLength!==ei.defaultValues(Zc)&&(e.saltLength=this.saltLength),this.trailerField!==ei.defaultValues(el)&&(e.trailerField=this.trailerField),e}};RA.CLASS_NAME="RSASSAPSSParams";var sm="salt",Zy="iterationCount",Aa="keyLength",lu="prf",Pme=[sm,Zy,Aa,lu],A0=class mo extends Re{static{o(this,"PBKDF2Params")}constructor(e={}){super(),this.salt=O(e,sm,mo.defaultValues(sm)),this.iterationCount=O(e,Zy,mo.defaultValues(Zy)),Aa in e&&(this.keyLength=O(e,Aa,mo.defaultValues(Aa))),lu in e&&(this.prf=O(e,lu,mo.defaultValues(lu))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case sm:return{};case Zy:return-1;case Aa:return 0;case lu:return new we({algorithmId:"1.3.14.3.2.26",algorithmParams:new tn});default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new Mr({value:[new qe({name:t.saltPrimitive||V}),we.schema(t.saltConstructed||{})]}),new xe({name:t.iterationCount||V}),new xe({name:t.keyLength||V,optional:!0}),we.schema(t.prf||{names:{optional:!0}})]})}fromSchema(e){ke(e,Pme);let t=Be(e,e,mo.schema({names:{saltPrimitive:sm,saltConstructed:{names:{blockName:sm}},iterationCount:Zy,keyLength:Aa,prf:{names:{blockName:lu,optional:!0}}}}));Te.assertSchema(t,this.className),this.salt=t.result.salt,this.iterationCount=t.result.iterationCount.valueBlock.valueDec,Aa in t.result&&(this.keyLength=t.result.keyLength.valueBlock.valueDec),lu in t.result&&(this.prf=new we({schema:t.result.prf}))}toSchema(){let e=[];return e.push(this.salt),e.push(new xe({value:this.iterationCount})),Aa in this&&mo.defaultValues(Aa)!==this.keyLength&&e.push(new xe({value:this.keyLength})),this.prf&&mo.defaultValues(lu).isEqual(this.prf)===!1&&e.push(this.prf.toSchema()),new J({value:e})}toJSON(){let e={salt:this.salt.toJSON(),iterationCount:this.iterationCount};return Aa in this&&mo.defaultValues(Aa)!==this.keyLength&&(e.keyLength=this.keyLength),this.prf&&mo.defaultValues(lu).isEqual(this.prf)===!1&&(e.prf=this.prf.toJSON()),e}};A0.CLASS_NAME="PBKDF2Params";var e1="keyDerivationFunc",t1="encryptionScheme",kme=[e1,t1],wR=class OA extends Re{static{o(this,"PBES2Params")}constructor(e={}){super(),this.keyDerivationFunc=O(e,e1,OA.defaultValues(e1)),this.encryptionScheme=O(e,t1,OA.defaultValues(t1)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case e1:return new we;case t1:return new we;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[we.schema(t.keyDerivationFunc||{}),we.schema(t.encryptionScheme||{})]})}fromSchema(e){ke(e,kme);let t=Be(e,e,OA.schema({names:{keyDerivationFunc:{names:{blockName:e1}},encryptionScheme:{names:{blockName:t1}}}}));Te.assertSchema(t,this.className),this.keyDerivationFunc=new we({schema:t.result.keyDerivationFunc}),this.encryptionScheme=new we({schema:t.result.encryptionScheme})}toSchema(){return new J({value:[this.keyDerivationFunc.toSchema(),this.encryptionScheme.toSchema()]})}toJSON(){return{keyDerivationFunc:this.keyDerivationFunc.toJSON(),encryptionScheme:this.encryptionScheme.toJSON()}}};wR.CLASS_NAME="PBES2Params";var Lme=class{static{o(this,"AbstractCryptoEngine")}constructor(e){this.crypto=e.crypto,this.subtle="webkitSubtle"in e.crypto?e.crypto.webkitSubtle:e.crypto.subtle,this.name=O(e,"name",V)}async encrypt(...e){return this.subtle.encrypt(...e)}async decrypt(...e){return this.subtle.decrypt(...e)}sign(...e){return this.subtle.sign(...e)}async verify(...e){return this.subtle.verify(...e)}async digest(...e){return this.subtle.digest(...e)}async generateKey(...e){return this.subtle.generateKey(...e)}async deriveKey(...e){return this.subtle.deriveKey(...e)}async deriveBits(...e){return this.subtle.deriveBits(...e)}async wrapKey(...e){return this.subtle.wrapKey(...e)}async unwrapKey(...e){return this.subtle.unwrapKey(...e)}exportKey(...e){return this.subtle.exportKey(...e)}importKey(...e){return this.subtle.importKey(...e)}getRandomValues(e){if(e===null)throw new Error('Argument "array" must not be null');return this.crypto.getRandomValues(e)}};async function h7(r,e,t,n,s){let i,a,u;switch(r.toUpperCase()){case"SHA-1":i=20,a=64,u=s7;break;case"SHA-256":i=32,a=64,u=gB;break;case"SHA-384":i=48,a=128,u=xB;break;case"SHA-512":i=64,a=128,u=yB;break;default:throw new Error("Unsupported hashing algorithm")}let c=new Uint8Array(t),l=new TextDecoder().decode(t);new TextEncoder().encode(l).some((A,T)=>A!==c[T])&&(l=String.fromCharCode(...c));let m=new Uint8Array(l.length*2+2),g=new DataView(m.buffer);for(let A=0;A<l.length;A++)g.setUint16(A*2,l.charCodeAt(A),!1);g.setUint16(l.length*2,0,!1);let y=new Uint8Array(a).fill(3),v=new Uint8Array(n),E=new Uint8Array(a*Math.ceil(v.length/a)).map((A,T)=>v[T%v.length]),w=new Uint8Array(a*Math.ceil(m.length/a)).map((A,T)=>m[T%m.length]),C=new Uint8Array(E.length+w.length);C.set(E),C.set(w,E.length);let _=Math.ceil((e>>3)/i),b=[];for(let A=0;A<_;A++){let T=new Uint8Array(y.length+C.length);T.set(y),T.set(C,y.length);for(let H=0;H<s;H++)T=u(T);let B=new Uint8Array(a).map((H,K)=>T[K%T.length]),M=Math.ceil(v.length/a)+Math.ceil(m.length/a),I=[];for(let H=0;H<M;H++){let K=Array.from(C.slice(H*a,(H+1)*a)),q=511;for(let W=B.length-1;W>=0;W--)q>>=8,q+=B[W]+(K[W]||0),K[W]=q&255;I.push(...K)}C=new Uint8Array(I),b.push(...T)}return new Uint8Array(b.slice(0,e>>3)).buffer}o(h7,"makePKCS12B2Key");function tH(r){let e=typeof r=="string"?{name:r}:r;return"hash"in e?{...e,hash:tH(e.hash)}:e}o(tH,"prepareAlgorithm");var N0=class extends Lme{static{o(this,"CryptoEngine")}async importKey(e,t,n,s,i){var a,u,c,l,h,m;let g={},y=tH(n);switch(e.toLowerCase()){case"raw":return this.subtle.importKey("raw",t,n,s,i);case"spki":{let v=en(vt.toArrayBuffer(t));Te.assert(v,"keyData");let E=new Da;try{E.fromSchema(v.result)}catch{throw new Ir("Incorrect keyData")}switch(y.name.toUpperCase()){case"RSA-PSS":{if(!y.hash)throw new gr("hash","algorithm.hash","Incorrect hash algorithm: Hash algorithm is missed");switch(y.hash.name.toUpperCase()){case"SHA-1":g.alg="PS1";break;case"SHA-256":g.alg="PS256";break;case"SHA-384":g.alg="PS384";break;case"SHA-512":g.alg="PS512";break;default:throw new Error(`Incorrect hash algorithm: ${y.hash.name.toUpperCase()}`)}}case"RSASSA-PKCS1-V1_5":{if(i=["verify"],g.kty="RSA",g.ext=s,g.key_ops=i,E.algorithm.algorithmId!=="1.2.840.113549.1.1.1")throw new Error(`Incorrect public key algorithm: ${E.algorithm.algorithmId}`);if(!g.alg){if(!y.hash)throw new gr("hash","algorithm.hash","Incorrect hash algorithm: Hash algorithm is missed");switch(y.hash.name.toUpperCase()){case"SHA-1":g.alg="RS1";break;case"SHA-256":g.alg="RS256";break;case"SHA-384":g.alg="RS384";break;case"SHA-512":g.alg="RS512";break;default:throw new Error(`Incorrect hash algorithm: ${y.hash.name.toUpperCase()}`)}}let w=E.toJSON();Object.assign(g,w)}break;case"ECDSA":i=["verify"];case"ECDH":{if(g={kty:"EC",ext:s,key_ops:i},E.algorithm.algorithmId!=="1.2.840.10045.2.1")throw new Error(`Incorrect public key algorithm: ${E.algorithm.algorithmId}`);let w=E.toJSON();Object.assign(g,w)}break;case"RSA-OAEP":{if(g.kty="RSA",g.ext=s,g.key_ops=i,this.name.toLowerCase()==="safari")g.alg="RSA-OAEP";else{if(!y.hash)throw new gr("hash","algorithm.hash","Incorrect hash algorithm: Hash algorithm is missed");switch(y.hash.name.toUpperCase()){case"SHA-1":g.alg="RSA-OAEP";break;case"SHA-256":g.alg="RSA-OAEP-256";break;case"SHA-384":g.alg="RSA-OAEP-384";break;case"SHA-512":g.alg="RSA-OAEP-512";break;default:throw new Error(`Incorrect hash algorithm: ${y.hash.name.toUpperCase()}`)}}let w=E.toJSON();Object.assign(g,w)}break;case"RSAES-PKCS1-V1_5":{g.kty="RSA",g.ext=s,g.key_ops=i,g.alg="PS1";let w=E.toJSON();Object.assign(g,w)}break;default:throw new Error(`Incorrect algorithm name: ${y.name.toUpperCase()}`)}}break;case"pkcs8":{let v=new Ux,E=en(vt.toArrayBuffer(t));Te.assert(E,"keyData");try{v.fromSchema(E.result)}catch{throw new Error("Incorrect keyData")}if(!v.parsedKey)throw new Error("Incorrect keyData");switch(y.name.toUpperCase()){case"RSA-PSS":switch((a=y.hash)===null||a===void 0?void 0:a.name.toUpperCase()){case"SHA-1":g.alg="PS1";break;case"SHA-256":g.alg="PS256";break;case"SHA-384":g.alg="PS384";break;case"SHA-512":g.alg="PS512";break;default:throw new Error(`Incorrect hash algorithm: ${(u=y.hash)===null||u===void 0?void 0:u.name.toUpperCase()}`)}case"RSASSA-PKCS1-V1_5":{if(i=["sign"],g.kty="RSA",g.ext=s,g.key_ops=i,v.privateKeyAlgorithm.algorithmId!=="1.2.840.113549.1.1.1")throw new Error(`Incorrect private key algorithm: ${v.privateKeyAlgorithm.algorithmId}`);if(!("alg"in g))switch((c=y.hash)===null||c===void 0?void 0:c.name.toUpperCase()){case"SHA-1":g.alg="RS1";break;case"SHA-256":g.alg="RS256";break;case"SHA-384":g.alg="RS384";break;case"SHA-512":g.alg="RS512";break;default:throw new Error(`Incorrect hash algorithm: ${(l=y.hash)===null||l===void 0?void 0:l.name.toUpperCase()}`)}let w=v.toJSON();Object.assign(g,w)}break;case"ECDSA":i=["sign"];case"ECDH":{if(g={kty:"EC",ext:s,key_ops:i},v.privateKeyAlgorithm.algorithmId!=="1.2.840.10045.2.1")throw new Error(`Incorrect algorithm: ${v.privateKeyAlgorithm.algorithmId}`);let w=v.toJSON();Object.assign(g,w)}break;case"RSA-OAEP":{if(g.kty="RSA",g.ext=s,g.key_ops=i,this.name.toLowerCase()==="safari")g.alg="RSA-OAEP";else switch((h=y.hash)===null||h===void 0?void 0:h.name.toUpperCase()){case"SHA-1":g.alg="RSA-OAEP";break;case"SHA-256":g.alg="RSA-OAEP-256";break;case"SHA-384":g.alg="RSA-OAEP-384";break;case"SHA-512":g.alg="RSA-OAEP-512";break;default:throw new Error(`Incorrect hash algorithm: ${(m=y.hash)===null||m===void 0?void 0:m.name.toUpperCase()}`)}let w=v.toJSON();Object.assign(g,w)}break;case"RSAES-PKCS1-V1_5":{i=["decrypt"],g.kty="RSA",g.ext=s,g.key_ops=i,g.alg="PS1";let w=v.toJSON();Object.assign(g,w)}break;default:throw new Error(`Incorrect algorithm name: ${y.name.toUpperCase()}`)}}break;case"jwk":g=t;break;default:throw new Error(`Incorrect format: ${e}`)}if(this.name.toLowerCase()==="safari")try{return this.subtle.importKey("jwk",Nf(JSON.stringify(g)),n,s,i)}catch{return this.subtle.importKey("jwk",g,n,s,i)}return this.subtle.importKey("jwk",g,n,s,i)}async exportKey(e,t){let n=await this.subtle.exportKey("jwk",t);switch(this.name.toLowerCase()==="safari"&&n instanceof ArrayBuffer&&(n=JSON.parse(jv(n))),e.toLowerCase()){case"raw":return this.subtle.exportKey("raw",t);case"spki":{let s=new Da;try{s.fromJSON(n)}catch{throw new Error("Incorrect key data")}return s.toSchema().toBER(!1)}case"pkcs8":{let s=new Ux;try{s.fromJSON(n)}catch{throw new Error("Incorrect key data")}return s.toSchema().toBER(!1)}case"jwk":return n;default:throw new Error(`Incorrect format: ${e}`)}}async convert(e,t,n,s,i,a){if(e.toLowerCase()===t.toLowerCase())return n;let u=await this.importKey(e,n,s,i,a);return this.exportKey(t,u)}getAlgorithmByOID(e,t=!1,n){switch(e){case"1.2.840.113549.1.1.1":return{name:"RSAES-PKCS1-v1_5"};case"1.2.840.113549.1.1.5":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-1"}};case"1.2.840.113549.1.1.11":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case"1.2.840.113549.1.1.12":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-384"}};case"1.2.840.113549.1.1.13":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-512"}};case"1.2.840.113549.1.1.10":return{name:"RSA-PSS"};case"1.2.840.113549.1.1.7":return{name:"RSA-OAEP"};case"1.2.840.10045.2.1":case"1.2.840.10045.4.1":return{name:"ECDSA",hash:{name:"SHA-1"}};case"1.2.840.10045.4.3.2":return{name:"ECDSA",hash:{name:"SHA-256"}};case"1.2.840.10045.4.3.3":return{name:"ECDSA",hash:{name:"SHA-384"}};case"1.2.840.10045.4.3.4":return{name:"ECDSA",hash:{name:"SHA-512"}};case"1.3.133.16.840.63.0.2":return{name:"ECDH",kdf:"SHA-1"};case"1.3.132.1.11.1":return{name:"ECDH",kdf:"SHA-256"};case"1.3.132.1.11.2":return{name:"ECDH",kdf:"SHA-384"};case"1.3.132.1.11.3":return{name:"ECDH",kdf:"SHA-512"};case"2.16.840.1.101.3.4.1.2":return{name:"AES-CBC",length:128};case"2.16.840.1.101.3.4.1.22":return{name:"AES-CBC",length:192};case"2.16.840.1.101.3.4.1.42":return{name:"AES-CBC",length:256};case"2.16.840.1.101.3.4.1.6":return{name:"AES-GCM",length:128};case"2.16.840.1.101.3.4.1.26":return{name:"AES-GCM",length:192};case"2.16.840.1.101.3.4.1.46":return{name:"AES-GCM",length:256};case"2.16.840.1.101.3.4.1.4":return{name:"AES-CFB",length:128};case"2.16.840.1.101.3.4.1.24":return{name:"AES-CFB",length:192};case"2.16.840.1.101.3.4.1.44":return{name:"AES-CFB",length:256};case"2.16.840.1.101.3.4.1.5":return{name:"AES-KW",length:128};case"2.16.840.1.101.3.4.1.25":return{name:"AES-KW",length:192};case"2.16.840.1.101.3.4.1.45":return{name:"AES-KW",length:256};case"1.2.840.113549.2.7":return{name:"HMAC",hash:{name:"SHA-1"}};case"1.2.840.113549.2.9":return{name:"HMAC",hash:{name:"SHA-256"}};case"1.2.840.113549.2.10":return{name:"HMAC",hash:{name:"SHA-384"}};case"1.2.840.113549.2.11":return{name:"HMAC",hash:{name:"SHA-512"}};case"1.2.840.113549.1.9.16.3.5":return{name:"DH"};case"1.3.14.3.2.26":return{name:"SHA-1"};case"2.16.840.1.101.3.4.2.1":return{name:"SHA-256"};case"2.16.840.1.101.3.4.2.2":return{name:"SHA-384"};case"2.16.840.1.101.3.4.2.3":return{name:"SHA-512"};case"1.2.840.113549.1.5.12":return{name:"PBKDF2"};case"1.2.840.10045.3.1.7":return{name:"P-256"};case"1.3.132.0.34":return{name:"P-384"};case"1.3.132.0.35":return{name:"P-521"}}if(t)throw new Error(`Unsupported algorithm identifier ${n?`for ${n} `:V}: ${e}`);return{}}getOIDByAlgorithm(e,t=!1,n){let s=V;switch(e.name.toUpperCase()){case"RSAES-PKCS1-V1_5":s="1.2.840.113549.1.1.1";break;case"RSASSA-PKCS1-V1_5":switch(e.hash.name.toUpperCase()){case"SHA-1":s="1.2.840.113549.1.1.5";break;case"SHA-256":s="1.2.840.113549.1.1.11";break;case"SHA-384":s="1.2.840.113549.1.1.12";break;case"SHA-512":s="1.2.840.113549.1.1.13";break}break;case"RSA-PSS":s="1.2.840.113549.1.1.10";break;case"RSA-OAEP":s="1.2.840.113549.1.1.7";break;case"ECDSA":switch(e.hash.name.toUpperCase()){case"SHA-1":s="1.2.840.10045.4.1";break;case"SHA-256":s="1.2.840.10045.4.3.2";break;case"SHA-384":s="1.2.840.10045.4.3.3";break;case"SHA-512":s="1.2.840.10045.4.3.4";break}break;case"ECDH":switch(e.kdf.toUpperCase()){case"SHA-1":s="1.3.133.16.840.63.0.2";break;case"SHA-256":s="1.3.132.1.11.1";break;case"SHA-384":s="1.3.132.1.11.2";break;case"SHA-512":s="1.3.132.1.11.3";break}break;case"AES-CTR":break;case"AES-CBC":switch(e.length){case 128:s="2.16.840.1.101.3.4.1.2";break;case 192:s="2.16.840.1.101.3.4.1.22";break;case 256:s="2.16.840.1.101.3.4.1.42";break}break;case"AES-CMAC":break;case"AES-GCM":switch(e.length){case 128:s="2.16.840.1.101.3.4.1.6";break;case 192:s="2.16.840.1.101.3.4.1.26";break;case 256:s="2.16.840.1.101.3.4.1.46";break}break;case"AES-CFB":switch(e.length){case 128:s="2.16.840.1.101.3.4.1.4";break;case 192:s="2.16.840.1.101.3.4.1.24";break;case 256:s="2.16.840.1.101.3.4.1.44";break}break;case"AES-KW":switch(e.length){case 128:s="2.16.840.1.101.3.4.1.5";break;case 192:s="2.16.840.1.101.3.4.1.25";break;case 256:s="2.16.840.1.101.3.4.1.45";break}break;case"HMAC":switch(e.hash.name.toUpperCase()){case"SHA-1":s="1.2.840.113549.2.7";break;case"SHA-256":s="1.2.840.113549.2.9";break;case"SHA-384":s="1.2.840.113549.2.10";break;case"SHA-512":s="1.2.840.113549.2.11";break}break;case"DH":s="1.2.840.113549.1.9.16.3.5";break;case"SHA-1":s="1.3.14.3.2.26";break;case"SHA-256":s="2.16.840.1.101.3.4.2.1";break;case"SHA-384":s="2.16.840.1.101.3.4.2.2";break;case"SHA-512":s="2.16.840.1.101.3.4.2.3";break;case"CONCAT":break;case"HKDF":break;case"PBKDF2":s="1.2.840.113549.1.5.12";break;case"P-256":s="1.2.840.10045.3.1.7";break;case"P-384":s="1.3.132.0.34";break;case"P-521":s="1.3.132.0.35";break}if(!s&&t)throw new Error(`Unsupported algorithm ${n?`for ${n} `:V}: ${e.name}`);return s}getAlgorithmParameters(e,t){let n={algorithm:{},usages:[]};switch(e.toUpperCase()){case"RSAES-PKCS1-V1_5":case"RSASSA-PKCS1-V1_5":switch(t.toLowerCase()){case"generatekey":n={algorithm:{name:"RSASSA-PKCS1-v1_5",modulusLength:2048,publicExponent:new Uint8Array([1,0,1]),hash:{name:"SHA-256"}},usages:["sign","verify"]};break;case"verify":case"sign":case"importkey":n={algorithm:{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},usages:["verify"]};break;case"exportkey":default:return{algorithm:{name:"RSASSA-PKCS1-v1_5"},usages:[]}}break;case"RSA-PSS":switch(t.toLowerCase()){case"sign":case"verify":n={algorithm:{name:"RSA-PSS",hash:{name:"SHA-1"},saltLength:20},usages:["sign","verify"]};break;case"generatekey":n={algorithm:{name:"RSA-PSS",modulusLength:2048,publicExponent:new Uint8Array([1,0,1]),hash:{name:"SHA-1"}},usages:["sign","verify"]};break;case"importkey":n={algorithm:{name:"RSA-PSS",hash:{name:"SHA-1"}},usages:["verify"]};break;case"exportkey":default:return{algorithm:{name:"RSA-PSS"},usages:[]}}break;case"RSA-OAEP":switch(t.toLowerCase()){case"encrypt":case"decrypt":n={algorithm:{name:"RSA-OAEP"},usages:["encrypt","decrypt"]};break;case"generatekey":n={algorithm:{name:"RSA-OAEP",modulusLength:2048,publicExponent:new Uint8Array([1,0,1]),hash:{name:"SHA-256"}},usages:["encrypt","decrypt","wrapKey","unwrapKey"]};break;case"importkey":n={algorithm:{name:"RSA-OAEP",hash:{name:"SHA-256"}},usages:["encrypt"]};break;case"exportkey":default:return{algorithm:{name:"RSA-OAEP"},usages:[]}}break;case"ECDSA":switch(t.toLowerCase()){case"generatekey":n={algorithm:{name:"ECDSA",namedCurve:"P-256"},usages:["sign","verify"]};break;case"importkey":n={algorithm:{name:"ECDSA",namedCurve:"P-256"},usages:["verify"]};break;case"verify":case"sign":n={algorithm:{name:"ECDSA",hash:{name:"SHA-256"}},usages:["sign"]};break;default:return{algorithm:{name:"ECDSA"},usages:[]}}break;case"ECDH":switch(t.toLowerCase()){case"exportkey":case"importkey":case"generatekey":n={algorithm:{name:"ECDH",namedCurve:"P-256"},usages:["deriveKey","deriveBits"]};break;case"derivekey":case"derivebits":n={algorithm:{name:"ECDH",namedCurve:"P-256",public:[]},usages:["encrypt","decrypt"]};break;default:return{algorithm:{name:"ECDH"},usages:[]}}break;case"AES-CTR":switch(t.toLowerCase()){case"importkey":case"exportkey":case"generatekey":n={algorithm:{name:"AES-CTR",length:256},usages:["encrypt","decrypt","wrapKey","unwrapKey"]};break;case"decrypt":case"encrypt":n={algorithm:{name:"AES-CTR",counter:new Uint8Array(16),length:10},usages:["encrypt","decrypt","wrapKey","unwrapKey"]};break;default:return{algorithm:{name:"AES-CTR"},usages:[]}}break;case"AES-CBC":switch(t.toLowerCase()){case"importkey":case"exportkey":case"generatekey":n={algorithm:{name:"AES-CBC",length:256},usages:["encrypt","decrypt","wrapKey","unwrapKey"]};break;case"decrypt":case"encrypt":n={algorithm:{name:"AES-CBC",iv:this.getRandomValues(new Uint8Array(16))},usages:["encrypt","decrypt","wrapKey","unwrapKey"]};break;default:return{algorithm:{name:"AES-CBC"},usages:[]}}break;case"AES-GCM":switch(t.toLowerCase()){case"importkey":case"exportkey":case"generatekey":n={algorithm:{name:"AES-GCM",length:256},usages:["encrypt","decrypt","wrapKey","unwrapKey"]};break;case"decrypt":case"encrypt":n={algorithm:{name:"AES-GCM",iv:this.getRandomValues(new Uint8Array(16))},usages:["encrypt","decrypt","wrapKey","unwrapKey"]};break;default:return{algorithm:{name:"AES-GCM"},usages:[]}}break;case"AES-KW":switch(t.toLowerCase()){case"importkey":case"exportkey":case"generatekey":case"wrapkey":case"unwrapkey":n={algorithm:{name:"AES-KW",length:256},usages:["wrapKey","unwrapKey"]};break;default:return{algorithm:{name:"AES-KW"},usages:[]}}break;case"HMAC":switch(t.toLowerCase()){case"sign":case"verify":n={algorithm:{name:"HMAC"},usages:["sign","verify"]};break;case"importkey":case"exportkey":case"generatekey":n={algorithm:{name:"HMAC",length:32,hash:{name:"SHA-256"}},usages:["sign","verify"]};break;default:return{algorithm:{name:"HMAC"},usages:[]}}break;case"HKDF":switch(t.toLowerCase()){case"derivekey":n={algorithm:{name:"HKDF",hash:"SHA-256",salt:new Uint8Array([]),info:new Uint8Array([])},usages:["encrypt","decrypt"]};break;default:return{algorithm:{name:"HKDF"},usages:[]}}break;case"PBKDF2":switch(t.toLowerCase()){case"derivekey":n={algorithm:{name:"PBKDF2",hash:{name:"SHA-256"},salt:new Uint8Array([]),iterations:1e4},usages:["encrypt","decrypt"]};break;default:return{algorithm:{name:"PBKDF2"},usages:[]}}break}return n}getHashAlgorithm(e){let t=V;switch(e.algorithmId){case"1.2.840.10045.4.1":case"1.2.840.113549.1.1.5":t="SHA-1";break;case"1.2.840.10045.4.3.2":case"1.2.840.113549.1.1.11":t="SHA-256";break;case"1.2.840.10045.4.3.3":case"1.2.840.113549.1.1.12":t="SHA-384";break;case"1.2.840.10045.4.3.4":case"1.2.840.113549.1.1.13":t="SHA-512";break;case"1.2.840.113549.1.1.10":try{let n=new RA({schema:e.algorithmParams});if(n.hashAlgorithm){let s=this.getAlgorithmByOID(n.hashAlgorithm.algorithmId);if("name"in s)t=s.name;else return V}else t="SHA-1"}catch{}break}return t}async encryptEncryptedContentInfo(e){gr.assert(e,"password","contentEncryptionAlgorithm","hmacHashAlgorithm","iterationCount","contentToEncrypt","contentToEncrypt","contentType");let t=this.getOIDByAlgorithm(e.contentEncryptionAlgorithm,!0,"contentEncryptionAlgorithm"),n=this.getOIDByAlgorithm({name:"PBKDF2"},!0,"PBKDF2"),s=this.getOIDByAlgorithm({name:"HMAC",hash:{name:e.hmacHashAlgorithm}},!0,"hmacHashAlgorithm"),i=new ArrayBuffer(16),a=new Uint8Array(i);this.getRandomValues(a);let u=new ArrayBuffer(64),c=new Uint8Array(u);this.getRandomValues(c);let l=new Uint8Array(e.contentToEncrypt),h=new A0({salt:new qe({valueHex:u}),iterationCount:e.iterationCount,prf:new we({algorithmId:s,algorithmParams:new tn})}),m=new Uint8Array(e.password),g=await this.importKey("raw",m,"PBKDF2",!1,["deriveKey"]),y=await this.deriveKey({name:"PBKDF2",hash:{name:e.hmacHashAlgorithm},salt:c,iterations:e.iterationCount},g,e.contentEncryptionAlgorithm,!1,["encrypt"]),v=await this.encrypt({name:e.contentEncryptionAlgorithm.name,iv:a},y,l),E=new wR({keyDerivationFunc:new we({algorithmId:n,algorithmParams:h.toSchema()}),encryptionScheme:new we({algorithmId:t,algorithmParams:new qe({valueHex:i})})});return new gs({contentType:e.contentType,contentEncryptionAlgorithm:new we({algorithmId:"1.2.840.113549.1.5.13",algorithmParams:E.toSchema()}),encryptedContent:new qe({valueHex:v})})}async decryptEncryptedContentInfo(e){if(gr.assert(e,"password","encryptedContentInfo"),e.encryptedContentInfo.contentEncryptionAlgorithm.algorithmId!=="1.2.840.113549.1.5.13")throw new Error(`Unknown "contentEncryptionAlgorithm": ${e.encryptedContentInfo.contentEncryptionAlgorithm.algorithmId}`);let t;try{t=new wR({schema:e.encryptedContentInfo.contentEncryptionAlgorithm.algorithmParams})}catch{throw new Error('Incorrectly encoded "pbes2Parameters"')}let n;try{n=new A0({schema:t.keyDerivationFunc.algorithmParams})}catch{throw new Error('Incorrectly encoded "pbkdf2Params"')}let s=this.getAlgorithmByOID(t.encryptionScheme.algorithmId,!0),i=t.encryptionScheme.algorithmParams.valueBlock.valueHex,a=new Uint8Array(i),u=n.salt.valueBlock.valueHex,c=new Uint8Array(u),l=n.iterationCount,h="SHA-1";n.prf&&(h=this.getAlgorithmByOID(n.prf.algorithmId,!0).hash.name);let m=await this.importKey("raw",e.password,"PBKDF2",!1,["deriveKey"]),g=await this.deriveKey({name:"PBKDF2",hash:{name:h},salt:c,iterations:l},m,s,!1,["decrypt"]),y=e.encryptedContentInfo.getEncryptedContent();return this.decrypt({name:s.name,iv:a},g,y)}async stampDataWithPassword(e){if(!(e instanceof Object))throw new Error('Parameters must have type "Object"');gr.assert(e,"password","hashAlgorithm","iterationCount","salt","contentToStamp");let t;switch(e.hashAlgorithm.toLowerCase()){case"sha-1":t=160;break;case"sha-256":t=256;break;case"sha-384":t=384;break;case"sha-512":t=512;break;default:throw new Error(`Incorrect "parameters.hashAlgorithm" parameter: ${e.hashAlgorithm}`)}let n={name:"HMAC",length:t,hash:{name:e.hashAlgorithm}},s=await h7(e.hashAlgorithm,t,e.password,e.salt,e.iterationCount),i=await this.importKey("raw",new Uint8Array(s),n,!1,["sign"]);return this.sign(n,i,new Uint8Array(e.contentToStamp))}async verifyDataStampedWithPassword(e){gr.assert(e,"password","hashAlgorithm","salt","iterationCount","contentToVerify","signatureToVerify");let t=0;switch(e.hashAlgorithm.toLowerCase()){case"sha-1":t=160;break;case"sha-256":t=256;break;case"sha-384":t=384;break;case"sha-512":t=512;break;default:throw new Error(`Incorrect "parameters.hashAlgorithm" parameter: ${e.hashAlgorithm}`)}let n={name:"HMAC",length:t,hash:{name:e.hashAlgorithm}},s=await h7(e.hashAlgorithm,t,e.password,e.salt,e.iterationCount),i=await this.importKey("raw",new Uint8Array(s),n,!1,["verify"]);return this.verify(n,i,new Uint8Array(e.signatureToVerify),new Uint8Array(e.contentToVerify))}async getSignatureParameters(e,t="SHA-1"){this.getOIDByAlgorithm({name:t},!0,"hashAlgorithm");let n=new we,s=this.getAlgorithmParameters(e.algorithm.name,"sign");if(!Object.keys(s.algorithm).length)throw new Error("Parameter 'algorithm' is empty");let i=s.algorithm;switch("hash"in e.algorithm&&e.algorithm.hash&&e.algorithm.hash.name?i.hash.name=e.algorithm.hash.name:i.hash.name=t,e.algorithm.name.toUpperCase()){case"RSASSA-PKCS1-V1_5":case"ECDSA":n.algorithmId=this.getOIDByAlgorithm(i,!0);break;case"RSA-PSS":{switch(i.hash.name.toUpperCase()){case"SHA-256":i.saltLength=32;break;case"SHA-384":i.saltLength=48;break;case"SHA-512":i.saltLength=64;break}let a={};if(i.hash.name.toUpperCase()!=="SHA-1"){let c=this.getOIDByAlgorithm({name:i.hash.name},!0,"hashAlgorithm");a.hashAlgorithm=new we({algorithmId:c,algorithmParams:new tn}),a.maskGenAlgorithm=new we({algorithmId:"1.2.840.113549.1.1.8",algorithmParams:a.hashAlgorithm.toSchema()})}i.saltLength!==20&&(a.saltLength=i.saltLength);let u=new RA(a);n.algorithmId="1.2.840.113549.1.1.10",n.algorithmParams=u.toSchema()}break;default:throw new Error(`Unsupported signature algorithm: ${e.algorithm.name}`)}return{signatureAlgorithm:n,parameters:s}}async signWithPrivateKey(e,t,n){let s=await this.sign(n.algorithm,t,e);return n.algorithm.name==="ECDSA"?Ume(s):s}fillPublicKeyParameters(e,t){let n={},s=this.getHashAlgorithm(t);if(s===V)throw new Error(`Unsupported signature algorithm: ${t.algorithmId}`);let i;t.algorithmId==="1.2.840.113549.1.1.10"?i=t.algorithmId:i=e.algorithm.algorithmId;let a=this.getAlgorithmByOID(i,!0);if(n.algorithm=this.getAlgorithmParameters(a.name,"importKey"),"hash"in n.algorithm.algorithm&&(n.algorithm.algorithm.hash.name=s),a.name==="ECDSA"){let u=e.algorithm;if(!u.algorithmParams)throw new Error("Algorithm parameters for ECDSA public key are missed");let c=u.algorithmParams;if("idBlock"in u.algorithmParams&&!(c.idBlock.tagClass===1&&c.idBlock.tagNumber===6))throw new Error("Incorrect type for ECDSA public key parameters");let l=this.getAlgorithmByOID(c.valueBlock.toString(),!0);n.algorithm.algorithm.namedCurve=l.name}return n}async getPublicKey(e,t,n){n||(n=this.fillPublicKeyParameters(e,t));let s=e.toSchema().toBER(!1);return this.importKey("spki",s,n.algorithm.algorithm,!0,n.algorithm.usages)}async verifyWithPublicKey(e,t,n,s,i){let a;if(i){let l={},h;s.algorithmId==="1.2.840.113549.1.1.10"?h=s.algorithmId:h=n.algorithm.algorithmId;let m=this.getAlgorithmByOID(h,!0);if(l.algorithm=this.getAlgorithmParameters(m.name,"importKey"),"hash"in l.algorithm.algorithm&&(l.algorithm.algorithm.hash.name=i),m.name==="ECDSA"){let g=!1;if("algorithmParams"in n.algorithm&&"idBlock"in n.algorithm.algorithmParams&&n.algorithm.algorithmParams.idBlock.tagClass===1&&n.algorithm.algorithmParams.idBlock.tagNumber===6&&(g=!0),g===!1)throw new Error("Incorrect type for ECDSA public key parameters");let y=this.getAlgorithmByOID(n.algorithm.algorithmParams.valueBlock.toString(),!0);l.algorithm.algorithm.namedCurve=y.name}a=await this.getPublicKey(n,null,l)}else{if(i=this.getHashAlgorithm(s),!i)throw new Error(`Unsupported signature algorithm: ${s.algorithmId}`);a=await this.getPublicKey(n,s)}let u=this.getAlgorithmParameters(a.algorithm.name,"verify");"hash"in u.algorithm&&(u.algorithm.hash.name=i);let c=t.valueBlock.valueHexView;if(a.algorithm.name==="ECDSA"){let l=Rl.find(a.algorithm.namedCurve);if(!l)throw new Error("Unsupported named curve in use");let h=en(c);Te.assert(h,"Signature value"),c=jme(h.result,l.size)}if(a.algorithm.name==="RSA-PSS"){let l=new RA({schema:s.algorithmParams});"saltLength"in l?u.algorithm.saltLength=l.saltLength:u.algorithm.saltLength=20;let h="SHA-1";"hashAlgorithm"in l&&(h=this.getAlgorithmByOID(l.hashAlgorithm.algorithmId,!0).name),u.algorithm.hash.name=h}return this.verify(u.algorithm,a,c,e)}},rH={name:"none",crypto:null};function p7(r){return!!(r&&typeof r=="object"&&"crypto"in r)}o(p7,"isCryptoEngine");function DC(r,...e){let t=null;if(e.length<2)e.length?t=e[0]:t=typeof self<"u"&&self.crypto?new N0({name:"browser",crypto:self.crypto}):null;else{let n=e[0],s=e[1];p7(s)?t=s:p7(n)?t=n:"subtle"in n&&"getRandomValues"in n&&(t=new N0({crypto:n}))}if(typeof process<"u"&&"pid"in process&&typeof global<"u"&&typeof window>"u"){if(typeof global[process.pid]>"u")global[process.pid]={};else if(typeof global[process.pid]!="object")throw new Error(`Name global.${process.pid} already exists and it is not an object`);if(typeof global[process.pid].pkijs>"u")global[process.pid].pkijs={};else if(typeof global[process.pid].pkijs!="object")throw new Error(`Name global.${process.pid}.pkijs already exists and it is not an object`);global[process.pid].pkijs.engine={name:r,crypto:t}}else rH={name:r,crypto:t}}o(DC,"setEngine");function Vme(){if(typeof process<"u"&&"pid"in process&&typeof global<"u"&&typeof window>"u"){let r;try{r=global[process.pid].pkijs.engine}catch{throw new Error("Please call 'setEngine' before call to 'getEngine'")}return r}return rH}o(Vme,"getEngine");function kt(r=!1){let e=Vme();if(!e.crypto&&r)throw new Error("Unable to create WebCrypto object");return e.crypto}o(kt,"getCrypto");function Ume(r){if(r.byteLength%2!==0)return hn;let e=r.byteLength/2,t=new ArrayBuffer(e);new Uint8Array(t).set(new Uint8Array(r,0,e));let s=new xe({valueHex:t}),i=new ArrayBuffer(e);new Uint8Array(i).set(new Uint8Array(r,e,e));let u=new xe({valueHex:i});return new J({value:[s.convertToDER(),u.convertToDER()]}).toBER(!1)}o(Ume,"createCMSECDSASignature");function jme(r,e){if(!(r instanceof J&&r.valueBlock.value.length===2&&r.valueBlock.value[0]instanceof xe&&r.valueBlock.value[1]instanceof xe))return hn;let t=r.valueBlock.value[0].convertFromDER().valueBlock.valueHexView,n=r.valueBlock.value[1].convertFromDER().valueBlock.valueHexView,s=new Uint8Array(e*2);return s.set(t,e-t.byteLength),s.set(n,2*e-n.byteLength),s.buffer}o(jme,"createECDSASignatureFromCMS");async function Fme(r,e,t,n,s){switch(r.toUpperCase()){case"SHA-1":case"SHA-256":case"SHA-384":case"SHA-512":break;default:throw new Ir(`Unknown hash function: ${r}`)}if(Ir.assert(e,"zBuffer","ArrayBuffer"),e.byteLength===0)throw new Ir("'zBuffer' has zero length, error");if(Ir.assert(n,"SharedInfo","ArrayBuffer"),t>255)throw new Ir("Please set 'Counter' argument to value less or equal to 255");let i=new ArrayBuffer(4),a=new Uint8Array(i);a[0]=0,a[1]=0,a[2]=0,a[3]=t;let u=hn;u=Cf(u,e),u=Cf(u,i),u=Cf(u,n);let c=await s.digest({name:r},u);return{counter:t,result:c}}o(Fme,"kdfWithCounter");async function d7(r,e,t,n,s=kt(!0)){let i=0,a=1;switch(r.toUpperCase()){case"SHA-1":i=160;break;case"SHA-256":i=256;break;case"SHA-384":i=384;break;case"SHA-512":i=512;break;default:throw new Ir(`Unknown hash function: ${r}`)}if(Ir.assert(e,"Zbuffer","ArrayBuffer"),e.byteLength===0)throw new Ir("'Zbuffer' has zero length, error");Ir.assert(n,"SharedInfo","ArrayBuffer");let u=t/i;Math.floor(u)>0&&(a=Math.floor(u),u-a>0&&a++);let c=[];for(let g=1;g<=a;g++)c.push(await Fme(r,e,g,n,s));let l=hn,h=1,m=!0;for(;m;){m=!1;for(let g of c)if(g.counter===h){l=Cf(l,g.result),m=!0;break}h++}if(t>>=3,l.byteLength>t){let g=new ArrayBuffer(t),y=new Uint8Array(g),v=new Uint8Array(l);for(let E=0;E<t;E++)y[E]=v[E];return g}return l}o(d7,"kdf");var bB="version",AB="logID",CB="extensions",NB="timestamp",TB="hashAlgorithm",IB="signatureAlgorithm",_B="signature",m7="none",g7="md5",v7="sha1",y7="sha224",x7="sha256",w7="sha384",E7="sha512",S7="anonymous",b7="rsa",A7="dsa",C7="ecdsa",nH=class tl extends Re{static{o(this,"SignedCertificateTimestamp")}constructor(e={}){super(),this.version=O(e,bB,tl.defaultValues(bB)),this.logID=O(e,AB,tl.defaultValues(AB)),this.timestamp=O(e,NB,tl.defaultValues(NB)),this.extensions=O(e,CB,tl.defaultValues(CB)),this.hashAlgorithm=O(e,TB,tl.defaultValues(TB)),this.signatureAlgorithm=O(e,IB,tl.defaultValues(IB)),this.signature=O(e,_B,tl.defaultValues(_B)),"stream"in e&&e.stream&&this.fromStream(e.stream),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case bB:return 0;case AB:case CB:return hn;case NB:return new Date(0);case TB:case IB:return V;case _B:return hn;default:return super.defaultValues(e)}}fromSchema(e){if(!(e instanceof Gv))throw new Error("Object's schema was not verified against input data for SignedCertificateTimestamp");let t=new ru({stream:new es({buffer:e.data})});this.fromStream(t)}fromStream(e){let t=e.getUint16();if(this.version=e.getBlock(1)[0],this.version===0){this.logID=new Uint8Array(e.getBlock(32)).buffer.slice(0),this.timestamp=new Date(Zo(new Uint8Array(e.getBlock(8)),8));let n=e.getUint16();switch(this.extensions=new Uint8Array(e.getBlock(n)).buffer.slice(0),e.getBlock(1)[0]){case 0:this.hashAlgorithm=m7;break;case 1:this.hashAlgorithm=g7;break;case 2:this.hashAlgorithm=v7;break;case 3:this.hashAlgorithm=y7;break;case 4:this.hashAlgorithm=x7;break;case 5:this.hashAlgorithm=w7;break;case 6:this.hashAlgorithm=E7;break;default:throw new Error("Object's stream was not correct for SignedCertificateTimestamp")}switch(e.getBlock(1)[0]){case 0:this.signatureAlgorithm=S7;break;case 1:this.signatureAlgorithm=b7;break;case 2:this.signatureAlgorithm=A7;break;case 3:this.signatureAlgorithm=C7;break;default:throw new Error("Object's stream was not correct for SignedCertificateTimestamp")}let s=e.getUint16();if(this.signature=new Uint8Array(e.getBlock(s)).buffer.slice(0),t!==47+n+s)throw new Error("Object's stream was not correct for SignedCertificateTimestamp")}}toSchema(){let e=this.toStream();return new Gv({data:e.stream.buffer})}toStream(){let e=new ru;e.appendUint16(47+this.extensions.byteLength+this.signature.byteLength),e.appendChar(this.version),e.appendView(new Uint8Array(this.logID));let t=new ArrayBuffer(8),n=new Uint8Array(t),s=wa(this.timestamp.valueOf(),8);n.set(new Uint8Array(s),8-s.byteLength),e.appendView(n),e.appendUint16(this.extensions.byteLength),this.extensions.byteLength&&e.appendView(new Uint8Array(this.extensions));let i;switch(this.hashAlgorithm.toLowerCase()){case m7:i=0;break;case g7:i=1;break;case v7:i=2;break;case y7:i=3;break;case x7:i=4;break;case w7:i=5;break;case E7:i=6;break;default:throw new Error(`Incorrect data for hashAlgorithm: ${this.hashAlgorithm}`)}e.appendChar(i);let a;switch(this.signatureAlgorithm.toLowerCase()){case S7:a=0;break;case b7:a=1;break;case A7:a=2;break;case C7:a=3;break;default:throw new Error(`Incorrect data for signatureAlgorithm: ${this.signatureAlgorithm}`)}return e.appendChar(a),e.appendUint16(this.signature.byteLength),e.appendView(new Uint8Array(this.signature)),e}toJSON(){return{version:this.version,logID:Ib(this.logID),timestamp:this.timestamp,extensions:Ib(this.extensions),hashAlgorithm:this.hashAlgorithm,signatureAlgorithm:this.signatureAlgorithm,signature:Ib(this.signature)}}async verify(e,t,n=0,s=kt(!0)){let i=Db(jv(this.logID)),a=null,u=new ru;for(let y of e)if(y.log_id===i){a=y.key;break}if(!a)throw new Error(`Public key not found for CT with logId: ${i}`);let c=Nf(Pd(a)),l=Da.fromBER(c);u.appendChar(0),u.appendChar(0);let h=new ArrayBuffer(8),m=new Uint8Array(h),g=wa(this.timestamp.valueOf(),8);return m.set(new Uint8Array(g),8-g.byteLength),u.appendView(m),u.appendUint16(n),n===0&&u.appendUint24(t.byteLength),u.appendView(new Uint8Array(t)),u.appendUint16(this.extensions.byteLength),this.extensions.byteLength!==0&&u.appendView(new Uint8Array(this.extensions)),s.verifyWithPublicKey(u.buffer.slice(0,u.length),new qe({valueHex:this.signature}),l,{algorithmId:V},"SHA-256")}};nH.CLASS_NAME="SignedCertificateTimestamp";var Jb="timestamps",sH=class iH extends Re{static{o(this,"SignedCertificateTimestampList")}constructor(e={}){super(),this.timestamps=O(e,Jb,iH.defaultValues(Jb)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Jb:return[];default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Jb:return t.length===0;default:return super.defaultValues(e)}}static schema(e={}){var t;let n=O(e,"names",{});return(t=n.optional)!==null&&t!==void 0||(n.optional=!1),new qe({name:n.blockName||"SignedCertificateTimestampList",optional:n.optional})}fromSchema(e){if(!(e instanceof qe))throw new Error("Object's schema was not verified against input data for SignedCertificateTimestampList");let t=new ru({stream:new es({buffer:e.valueBlock.valueHex})});if(t.getUint16()!==t.length)throw new Error("Object's schema was not verified against input data for SignedCertificateTimestampList");for(;t.length;)this.timestamps.push(new nH({stream:t}))}toSchema(){let e=new ru,t=0,n=[];for(let s of this.timestamps){let i=s.toStream();n.push(i),t+=i.stream.buffer.byteLength}e.appendUint16(t);for(let s of n)e.appendView(s.stream.view);return new qe({valueHex:e.stream.buffer.slice(0)})}toJSON(){return{timestamps:Array.from(this.timestamps,e=>e.toJSON())}}};sH.CLASS_NAME="SignedCertificateTimestampList";var r1="attributes",Mme=[r1],aH=class ER extends Re{static{o(this,"SubjectDirectoryAttributes")}constructor(e={}){super(),this.attributes=O(e,r1,ER.defaultValues(r1)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case r1:return[];default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new Bt({name:t.attributes||V,value:pn.schema()})]})}fromSchema(e){ke(e,Mme);let t=Be(e,e,ER.schema({names:{attributes:r1}}));Te.assertSchema(t,this.className),this.attributes=Array.from(t.result.attributes,n=>new pn({schema:n}))}toSchema(){return new J({value:Array.from(this.attributes,e=>e.toSchema())})}toJSON(){return{attributes:Array.from(this.attributes,e=>e.toJSON())}}};aH.CLASS_NAME="SubjectDirectoryAttributes";var qme=class nn{static{o(this,"ExtensionValueFactory")}static getItems(){return this.types||(this.types={},nn.register(R7,"SubjectAltName",ZB),nn.register(O7,"IssuerAltName",ZB),nn.register(sO,"AuthorityKeyIdentifier",uO),nn.register(rO,"BasicConstraints",cO),nn.register(nme,"MicrosoftCaVersion",K7),nn.register(U7,"CertificatePolicies",iR),nn.register(Yde,"CertificatePoliciesMicrosoft",iR),nn.register(rme,"MicrosoftCertTemplateV2",pme),nn.register(V7,"CRLDistributionPoints",uR),nn.register(nO,"FreshestCRL",uR),nn.register(Qde,"ExtKeyUsage",X7),nn.register(k7,"CertificateIssuer",ts),nn.register(iO,"AuthorityInfoAccess",fR),nn.register(eme,"SubjectInfoAccess",fR),nn.register(P7,"IssuingDistributionPoint",z7),nn.register(L7,"NameConstraints",J7),nn.register(F7,"PolicyConstraints",Y7),nn.register(j7,"PolicyMappings",Q7),nn.register(Gde,"PrivateKeyUsagePeriod",Z7),nn.register(sme,"QCStatements",eH),nn.register(tme,"SignedCertificateTimestampList",sH),nn.register(Hde,"SubjectDirectoryAttributes",aH)),this.types}static fromBER(e,t){let n=en(t);if(n.offset===-1)return null;let s=this.find(e);if(s)try{return new s.type({schema:n.result})}catch{let i=new s.type;return i.parsingError=`Incorrectly formatted value of extension ${s.name} (${e})`,i}return n.result}static find(e){return this.getItems()[e]||null}static register(e,t,n){this.getItems()[e]={name:t,type:n}}},n1="extnID",rl="critical",s1="extnValue",Yb="parsedValue",Hme=[n1,rl,s1],ea=class nl extends Re{static{o(this,"Extension")}get parsedValue(){if(this._parsedValue===void 0){let e=qme.fromBER(this.extnID,this.extnValue.valueBlock.valueHexView);this._parsedValue=e}return this._parsedValue||void 0}set parsedValue(e){this._parsedValue=e}constructor(e={}){super(),this.extnID=O(e,n1,nl.defaultValues(n1)),this.critical=O(e,rl,nl.defaultValues(rl)),s1 in e?this.extnValue=new qe({valueHex:e.extnValue}):this.extnValue=nl.defaultValues(s1),Yb in e&&(this.parsedValue=O(e,Yb,nl.defaultValues(Yb))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case n1:return V;case rl:return!1;case s1:return new qe;case Yb:return{};default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new ot({name:t.extnID||V}),new Ea({name:t.critical||V,optional:!0}),new qe({name:t.extnValue||V})]})}fromSchema(e){ke(e,Hme);let t=Be(e,e,nl.schema({names:{extnID:n1,critical:rl,extnValue:s1}}));Te.assertSchema(t,this.className),this.extnID=t.result.extnID.valueBlock.toString(),rl in t.result&&(this.critical=t.result.critical.valueBlock.value),this.extnValue=t.result.extnValue}toSchema(){let e=[];return e.push(new ot({value:this.extnID})),this.critical!==nl.defaultValues(rl)&&e.push(new Ea({value:this.critical})),e.push(this.extnValue),new J({value:e})}toJSON(){let e={extnID:this.extnID,extnValue:this.extnValue.toJSON()};return this.critical!==nl.defaultValues(rl)&&(e.critical=this.critical),this.parsedValue&&this.parsedValue.toJSON&&(e.parsedValue=this.parsedValue.toJSON()),e}};ea.CLASS_NAME="Extension";var i1="extensions",Kme=[i1],Rn=class SR extends Re{static{o(this,"Extensions")}constructor(e={}){super(),this.extensions=O(e,i1,SR.defaultValues(i1)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case i1:return[];default:return super.defaultValues(e)}}static schema(e={},t=!1){let n=O(e,"names",{});return new J({optional:t,name:n.blockName||V,value:[new Bt({name:n.extensions||V,value:ea.schema(n.extension||{})})]})}fromSchema(e){ke(e,Kme);let t=Be(e,e,SR.schema({names:{extensions:i1}}));Te.assertSchema(t,this.className),this.extensions=Array.from(t.result.extensions,n=>new ea({schema:n}))}toSchema(){return new J({value:Array.from(this.extensions,e=>e.toSchema())})}toJSON(){return{extensions:this.extensions.map(e=>e.toJSON())}}};Rn.CLASS_NAME="Extensions";var a1="issuer",o1="serialNumber",Yf="issuerUID",$me=[a1,o1,Yf],Eo=class u1 extends Re{static{o(this,"IssuerSerial")}constructor(e={}){super(),this.issuer=O(e,a1,u1.defaultValues(a1)),this.serialNumber=O(e,o1,u1.defaultValues(o1)),Yf in e&&(this.issuerUID=O(e,Yf,u1.defaultValues(Yf))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case a1:return new ts;case o1:return new xe;case Yf:return new Gt;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[ts.schema(t.issuer||{}),new xe({name:t.serialNumber||V}),new Gt({optional:!0,name:t.issuerUID||V})]})}fromSchema(e){ke(e,$me);let t=Be(e,e,u1.schema({names:{issuer:{names:{blockName:a1}},serialNumber:o1,issuerUID:Yf}}));Te.assertSchema(t,this.className),this.issuer=new ts({schema:t.result.issuer}),this.serialNumber=t.result.serialNumber,Yf in t.result&&(this.issuerUID=t.result.issuerUID)}toSchema(){let e=new J({value:[this.issuer.toSchema(),this.serialNumber]});return this.issuerUID&&e.valueBlock.value.push(this.issuerUID),e}toJSON(){let e={issuer:this.issuer.toJSON(),serialNumber:this.serialNumber.toJSON()};return this.issuerUID&&(e.issuerUID=this.issuerUID.toJSON()),e}};Eo.CLASS_NAME="IssuerSerial";var c1="version",Qf="baseCertificateID",Zf="subjectName",l1="issuer",f1="signature",h1="serialNumber",p1="attrCertValidityPeriod",d1="attributes",eh="issuerUniqueID",th="extensions",Gme=[c1,Qf,Zf,l1,f1,h1,p1,d1,eh,th],PA=class Qi extends Re{static{o(this,"AttributeCertificateInfoV1")}constructor(e={}){super(),this.version=O(e,c1,Qi.defaultValues(c1)),Qf in e&&(this.baseCertificateID=O(e,Qf,Qi.defaultValues(Qf))),Zf in e&&(this.subjectName=O(e,Zf,Qi.defaultValues(Zf))),this.issuer=O(e,l1,Qi.defaultValues(l1)),this.signature=O(e,f1,Qi.defaultValues(f1)),this.serialNumber=O(e,h1,Qi.defaultValues(h1)),this.attrCertValidityPeriod=O(e,p1,Qi.defaultValues(p1)),this.attributes=O(e,d1,Qi.defaultValues(d1)),eh in e&&(this.issuerUniqueID=O(e,eh,Qi.defaultValues(eh))),th in e&&(this.extensions=O(e,th,Qi.defaultValues(th))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case c1:return 0;case Qf:return new Eo;case Zf:return new ts;case l1:return new ts;case f1:return new we;case h1:return new xe;case p1:return new Jh;case d1:return[];case eh:return new Gt;case th:return new Rn;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new xe({name:t.version||V}),new Mr({value:[new fe({name:t.baseCertificateID||V,idBlock:{tagClass:3,tagNumber:0},value:Eo.schema().valueBlock.value}),new fe({name:t.subjectName||V,idBlock:{tagClass:3,tagNumber:1},value:ts.schema().valueBlock.value})]}),ts.schema({names:{blockName:t.issuer||V}}),we.schema(t.signature||{}),new xe({name:t.serialNumber||V}),Jh.schema(t.attrCertValidityPeriod||{}),new J({name:t.attributes||V,value:[new Bt({value:pn.schema()})]}),new Gt({optional:!0,name:t.issuerUniqueID||V}),Rn.schema(t.extensions||{},!0)]})}fromSchema(e){ke(e,Gme);let t=Be(e,e,Qi.schema({names:{version:c1,baseCertificateID:Qf,subjectName:Zf,issuer:l1,signature:{names:{blockName:f1}},serialNumber:h1,attrCertValidityPeriod:{names:{blockName:p1}},attributes:d1,issuerUniqueID:eh,extensions:{names:{blockName:th}}}}));Te.assertSchema(t,this.className),this.version=t.result.version.valueBlock.valueDec,Qf in t.result&&(this.baseCertificateID=new Eo({schema:new J({value:t.result.baseCertificateID.valueBlock.value})})),Zf in t.result&&(this.subjectName=new ts({schema:new J({value:t.result.subjectName.valueBlock.value})})),this.issuer=t.result.issuer,this.signature=new we({schema:t.result.signature}),this.serialNumber=t.result.serialNumber,this.attrCertValidityPeriod=new Jh({schema:t.result.attrCertValidityPeriod}),this.attributes=Array.from(t.result.attributes.valueBlock.value,n=>new pn({schema:n})),eh in t.result&&(this.issuerUniqueID=t.result.issuerUniqueID),th in t.result&&(this.extensions=new Rn({schema:t.result.extensions}))}toSchema(){let e=new J({value:[new xe({value:this.version})]});return this.baseCertificateID&&e.valueBlock.value.push(new fe({idBlock:{tagClass:3,tagNumber:0},value:this.baseCertificateID.toSchema().valueBlock.value})),this.subjectName&&e.valueBlock.value.push(new fe({idBlock:{tagClass:3,tagNumber:1},value:this.subjectName.toSchema().valueBlock.value})),e.valueBlock.value.push(this.issuer.toSchema()),e.valueBlock.value.push(this.signature.toSchema()),e.valueBlock.value.push(this.serialNumber),e.valueBlock.value.push(this.attrCertValidityPeriod.toSchema()),e.valueBlock.value.push(new J({value:Array.from(this.attributes,t=>t.toSchema())})),this.issuerUniqueID&&e.valueBlock.value.push(this.issuerUniqueID),this.extensions&&e.valueBlock.value.push(this.extensions.toSchema()),e}toJSON(){let e={version:this.version};return this.baseCertificateID&&(e.baseCertificateID=this.baseCertificateID.toJSON()),this.subjectName&&(e.subjectName=this.subjectName.toJSON()),e.issuer=this.issuer.toJSON(),e.signature=this.signature.toJSON(),e.serialNumber=this.serialNumber.toJSON(),e.attrCertValidityPeriod=this.attrCertValidityPeriod.toJSON(),e.attributes=Array.from(this.attributes,t=>t.toJSON()),this.issuerUniqueID&&(e.issuerUniqueID=this.issuerUniqueID.toJSON()),this.extensions&&(e.extensions=this.extensions.toJSON()),e}};PA.CLASS_NAME="AttributeCertificateInfoV1";var m1="acinfo",g1="signatureAlgorithm",v1="signatureValue",Xme=[m1,v1,g1],BC=class y1 extends Re{static{o(this,"AttributeCertificateV1")}constructor(e={}){super(),this.acinfo=O(e,m1,y1.defaultValues(m1)),this.signatureAlgorithm=O(e,g1,y1.defaultValues(g1)),this.signatureValue=O(e,v1,y1.defaultValues(v1)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case m1:return new PA;case g1:return new we;case v1:return new Gt;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[PA.schema(t.acinfo||{}),we.schema(t.signatureAlgorithm||{}),new Gt({name:t.signatureValue||V})]})}fromSchema(e){ke(e,Xme);let t=Be(e,e,y1.schema({names:{acinfo:{names:{blockName:m1}},signatureAlgorithm:{names:{blockName:g1}},signatureValue:v1}}));Te.assertSchema(t,this.className),this.acinfo=new PA({schema:t.result.acinfo}),this.signatureAlgorithm=new we({schema:t.result.signatureAlgorithm}),this.signatureValue=t.result.signatureValue}toSchema(){return new J({value:[this.acinfo.toSchema(),this.signatureAlgorithm.toSchema(),this.signatureValue]})}toJSON(){return{acinfo:this.acinfo.toJSON(),signatureAlgorithm:this.signatureAlgorithm.toJSON(),signatureValue:this.signatureValue.toJSON()}}};BC.CLASS_NAME="AttributeCertificateV1";var x1="digestedObjectType",rh="otherObjectTypeID",w1="digestAlgorithm",E1="objectDigest",Wme=[x1,rh,w1,E1],Yh=class im extends Re{static{o(this,"ObjectDigestInfo")}constructor(e={}){super(),this.digestedObjectType=O(e,x1,im.defaultValues(x1)),rh in e&&(this.otherObjectTypeID=O(e,rh,im.defaultValues(rh))),this.digestAlgorithm=O(e,w1,im.defaultValues(w1)),this.objectDigest=O(e,E1,im.defaultValues(E1)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case x1:return new Bc;case rh:return new ot;case w1:return new we;case E1:return new Gt;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new Bc({name:t.digestedObjectType||V}),new ot({optional:!0,name:t.otherObjectTypeID||V}),we.schema(t.digestAlgorithm||{}),new Gt({name:t.objectDigest||V})]})}fromSchema(e){ke(e,Wme);let t=Be(e,e,im.schema({names:{digestedObjectType:x1,otherObjectTypeID:rh,digestAlgorithm:{names:{blockName:w1}},objectDigest:E1}}));Te.assertSchema(t,this.className),this.digestedObjectType=t.result.digestedObjectType,rh in t.result&&(this.otherObjectTypeID=t.result.otherObjectTypeID),this.digestAlgorithm=new we({schema:t.result.digestAlgorithm}),this.objectDigest=t.result.objectDigest}toSchema(){let e=new J({value:[this.digestedObjectType]});return this.otherObjectTypeID&&e.valueBlock.value.push(this.otherObjectTypeID),e.valueBlock.value.push(this.digestAlgorithm.toSchema()),e.valueBlock.value.push(this.objectDigest),e}toJSON(){let e={digestedObjectType:this.digestedObjectType.toJSON(),digestAlgorithm:this.digestAlgorithm.toJSON(),objectDigest:this.objectDigest.toJSON()};return this.otherObjectTypeID&&(e.otherObjectTypeID=this.otherObjectTypeID.toJSON()),e}};Yh.CLASS_NAME="ObjectDigestInfo";var nh="issuerName",sh="baseCertificateID",ih="objectDigestInfo",zme=[nh,sh,ih],bR=class S1 extends Re{static{o(this,"V2Form")}constructor(e={}){super(),nh in e&&(this.issuerName=O(e,nh,S1.defaultValues(nh))),sh in e&&(this.baseCertificateID=O(e,sh,S1.defaultValues(sh))),ih in e&&(this.objectDigestInfo=O(e,ih,S1.defaultValues(ih))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case nh:return new ts;case sh:return new Eo;case ih:return new Yh;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[ts.schema({names:{blockName:t.issuerName}},!0),new fe({optional:!0,name:t.baseCertificateID||V,idBlock:{tagClass:3,tagNumber:0},value:Eo.schema().valueBlock.value}),new fe({optional:!0,name:t.objectDigestInfo||V,idBlock:{tagClass:3,tagNumber:1},value:Yh.schema().valueBlock.value})]})}fromSchema(e){ke(e,zme);let t=Be(e,e,S1.schema({names:{issuerName:nh,baseCertificateID:sh,objectDigestInfo:ih}}));Te.assertSchema(t,this.className),nh in t.result&&(this.issuerName=new ts({schema:t.result.issuerName})),sh in t.result&&(this.baseCertificateID=new Eo({schema:new J({value:t.result.baseCertificateID.valueBlock.value})})),ih in t.result&&(this.objectDigestInfo=new Yh({schema:new J({value:t.result.objectDigestInfo.valueBlock.value})}))}toSchema(){let e=new J;return this.issuerName&&e.valueBlock.value.push(this.issuerName.toSchema()),this.baseCertificateID&&e.valueBlock.value.push(new fe({idBlock:{tagClass:3,tagNumber:0},value:this.baseCertificateID.toSchema().valueBlock.value})),this.objectDigestInfo&&e.valueBlock.value.push(new fe({idBlock:{tagClass:3,tagNumber:1},value:this.objectDigestInfo.toSchema().valueBlock.value})),e}toJSON(){let e={};return this.issuerName&&(e.issuerName=this.issuerName.toJSON()),this.baseCertificateID&&(e.baseCertificateID=this.baseCertificateID.toJSON()),this.objectDigestInfo&&(e.objectDigestInfo=this.objectDigestInfo.toJSON()),e}};bR.CLASS_NAME="V2Form";var ah="baseCertificateID",oh="entityName",uh="objectDigestInfo",Jme=[ah,oh,uh],kA=class b1 extends Re{static{o(this,"Holder")}constructor(e={}){super(),ah in e&&(this.baseCertificateID=O(e,ah,b1.defaultValues(ah))),oh in e&&(this.entityName=O(e,oh,b1.defaultValues(oh))),uh in e&&(this.objectDigestInfo=O(e,uh,b1.defaultValues(uh))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case ah:return new Eo;case oh:return new ts;case uh:return new Yh;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new fe({optional:!0,name:t.baseCertificateID||V,idBlock:{tagClass:3,tagNumber:0},value:Eo.schema().valueBlock.value}),new fe({optional:!0,name:t.entityName||V,idBlock:{tagClass:3,tagNumber:1},value:ts.schema().valueBlock.value}),new fe({optional:!0,name:t.objectDigestInfo||V,idBlock:{tagClass:3,tagNumber:2},value:Yh.schema().valueBlock.value})]})}fromSchema(e){ke(e,Jme);let t=Be(e,e,b1.schema({names:{baseCertificateID:ah,entityName:oh,objectDigestInfo:uh}}));Te.assertSchema(t,this.className),ah in t.result&&(this.baseCertificateID=new Eo({schema:new J({value:t.result.baseCertificateID.valueBlock.value})})),oh in t.result&&(this.entityName=new ts({schema:new J({value:t.result.entityName.valueBlock.value})})),uh in t.result&&(this.objectDigestInfo=new Yh({schema:new J({value:t.result.objectDigestInfo.valueBlock.value})}))}toSchema(){let e=new J;return this.baseCertificateID&&e.valueBlock.value.push(new fe({idBlock:{tagClass:3,tagNumber:0},value:this.baseCertificateID.toSchema().valueBlock.value})),this.entityName&&e.valueBlock.value.push(new fe({idBlock:{tagClass:3,tagNumber:1},value:this.entityName.toSchema().valueBlock.value})),this.objectDigestInfo&&e.valueBlock.value.push(new fe({idBlock:{tagClass:3,tagNumber:2},value:this.objectDigestInfo.toSchema().valueBlock.value})),e}toJSON(){let e={};return this.baseCertificateID&&(e.baseCertificateID=this.baseCertificateID.toJSON()),this.entityName&&(e.entityName=this.entityName.toJSON()),this.objectDigestInfo&&(e.objectDigestInfo=this.objectDigestInfo.toJSON()),e}};kA.CLASS_NAME="Holder";var A1="version",C1="holder",N1="issuer",T1="signature",I1="serialNumber",_1="attrCertValidityPeriod",D1="attributes",ch="issuerUniqueID",lh="extensions",Yme=[A1,C1,N1,T1,I1,_1,D1,ch,lh],LA=class Ca extends Re{static{o(this,"AttributeCertificateInfoV2")}constructor(e={}){super(),this.version=O(e,A1,Ca.defaultValues(A1)),this.holder=O(e,C1,Ca.defaultValues(C1)),this.issuer=O(e,N1,Ca.defaultValues(N1)),this.signature=O(e,T1,Ca.defaultValues(T1)),this.serialNumber=O(e,I1,Ca.defaultValues(I1)),this.attrCertValidityPeriod=O(e,_1,Ca.defaultValues(_1)),this.attributes=O(e,D1,Ca.defaultValues(D1)),ch in e&&(this.issuerUniqueID=O(e,ch,Ca.defaultValues(ch))),lh in e&&(this.extensions=O(e,lh,Ca.defaultValues(lh))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case A1:return 1;case C1:return new kA;case N1:return{};case T1:return new we;case I1:return new xe;case _1:return new Jh;case D1:return[];case ch:return new Gt;case lh:return new Rn;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new xe({name:t.version||V}),kA.schema(t.holder||{}),new Mr({value:[ts.schema({names:{blockName:t.issuer||V}}),new fe({name:t.issuer||V,idBlock:{tagClass:3,tagNumber:0},value:bR.schema().valueBlock.value})]}),we.schema(t.signature||{}),new xe({name:t.serialNumber||V}),Jh.schema(t.attrCertValidityPeriod||{}),new J({name:t.attributes||V,value:[new Bt({value:pn.schema()})]}),new Gt({optional:!0,name:t.issuerUniqueID||V}),Rn.schema(t.extensions||{},!0)]})}fromSchema(e){ke(e,Yme);let t=Be(e,e,Ca.schema({names:{version:A1,holder:{names:{blockName:C1}},issuer:N1,signature:{names:{blockName:T1}},serialNumber:I1,attrCertValidityPeriod:{names:{blockName:_1}},attributes:D1,issuerUniqueID:ch,extensions:{names:{blockName:lh}}}}));switch(Te.assertSchema(t,this.className),this.version=t.result.version.valueBlock.valueDec,this.holder=new kA({schema:t.result.holder}),t.result.issuer.idBlock.tagClass){case 3:this.issuer=new bR({schema:new J({value:t.result.issuer.valueBlock.value})});break;case 1:default:throw new Error("Incorrect value for 'issuer' in AttributeCertificateInfoV2")}this.signature=new we({schema:t.result.signature}),this.serialNumber=t.result.serialNumber,this.attrCertValidityPeriod=new Jh({schema:t.result.attrCertValidityPeriod}),this.attributes=Array.from(t.result.attributes.valueBlock.value,n=>new pn({schema:n})),ch in t.result&&(this.issuerUniqueID=t.result.issuerUniqueID),lh in t.result&&(this.extensions=new Rn({schema:t.result.extensions}))}toSchema(){let e=new J({value:[new xe({value:this.version}),this.holder.toSchema(),new fe({idBlock:{tagClass:3,tagNumber:0},value:this.issuer.toSchema().valueBlock.value}),this.signature.toSchema(),this.serialNumber,this.attrCertValidityPeriod.toSchema(),new J({value:Array.from(this.attributes,t=>t.toSchema())})]});return this.issuerUniqueID&&e.valueBlock.value.push(this.issuerUniqueID),this.extensions&&e.valueBlock.value.push(this.extensions.toSchema()),e}toJSON(){let e={version:this.version,holder:this.holder.toJSON(),issuer:this.issuer.toJSON(),signature:this.signature.toJSON(),serialNumber:this.serialNumber.toJSON(),attrCertValidityPeriod:this.attrCertValidityPeriod.toJSON(),attributes:Array.from(this.attributes,t=>t.toJSON())};return this.issuerUniqueID&&(e.issuerUniqueID=this.issuerUniqueID.toJSON()),this.extensions&&(e.extensions=this.extensions.toJSON()),e}};LA.CLASS_NAME="AttributeCertificateInfoV2";var B1="acinfo",R1="signatureAlgorithm",O1="signatureValue",Qme=[B1,R1,O1],Bl=class P1 extends Re{static{o(this,"AttributeCertificateV2")}constructor(e={}){super(),this.acinfo=O(e,B1,P1.defaultValues(B1)),this.signatureAlgorithm=O(e,R1,P1.defaultValues(R1)),this.signatureValue=O(e,O1,P1.defaultValues(O1)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case B1:return new LA;case R1:return new we;case O1:return new Gt;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[LA.schema(t.acinfo||{}),we.schema(t.signatureAlgorithm||{}),new Gt({name:t.signatureValue||V})]})}fromSchema(e){ke(e,Qme);let t=Be(e,e,P1.schema({names:{acinfo:{names:{blockName:B1}},signatureAlgorithm:{names:{blockName:R1}},signatureValue:O1}}));Te.assertSchema(t,this.className),this.acinfo=new LA({schema:t.result.acinfo}),this.signatureAlgorithm=new we({schema:t.result.signatureAlgorithm}),this.signatureValue=t.result.signatureValue}toSchema(){return new J({value:[this.acinfo.toSchema(),this.signatureAlgorithm.toSchema(),this.signatureValue]})}toJSON(){return{acinfo:this.acinfo.toJSON(),signatureAlgorithm:this.signatureAlgorithm.toJSON(),signatureValue:this.signatureValue.toJSON()}}};Bl.CLASS_NAME="AttributeCertificateV2";var fh="contentType",am="content",Zme=[fh,am],sn=class VA extends Re{static{o(this,"ContentInfo")}constructor(e={}){super(),this.contentType=O(e,fh,VA.defaultValues(fh)),this.content=O(e,am,VA.defaultValues(am)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case fh:return V;case am:return new bt;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case fh:return typeof t=="string"&&t===this.defaultValues(fh);case am:return t instanceof bt;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return"optional"in t||(t.optional=!1),new J({name:t.blockName||"ContentInfo",optional:t.optional,value:[new ot({name:t.contentType||fh}),new fe({idBlock:{tagClass:3,tagNumber:0},value:[new bt({name:t.content||am})]})]})}fromSchema(e){ke(e,Zme);let t=Be(e,e,VA.schema());Te.assertSchema(t,this.className),this.contentType=t.result.contentType.valueBlock.toString(),this.content=t.result.content}toSchema(){return new J({value:[new ot({value:this.contentType}),new fe({idBlock:{tagClass:3,tagNumber:0},value:[this.content]})]})}toJSON(){let e={contentType:this.contentType};return this.content instanceof bt||(e.content=this.content.toJSON()),e}};sn.CLASS_NAME="ContentInfo";sn.DATA=aO;sn.SIGNED_DATA=M7;sn.ENVELOPED_DATA=q7;sn.ENCRYPTED_DATA=H7;var DB="type",BB="value",AR="utcTimeName",CR="generalTimeName",e0e=[AR,CR],N7;(function(r){r[r.UTCTime=0]="UTCTime",r[r.GeneralizedTime=1]="GeneralizedTime",r[r.empty=2]="empty"})(N7||(N7={}));var rs=class UA extends Re{static{o(this,"Time")}constructor(e={}){super(),this.type=O(e,DB,UA.defaultValues(DB)),this.value=O(e,BB,UA.defaultValues(BB)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case DB:return 0;case BB:return new Date(0,0,0);default:return super.defaultValues(e)}}static schema(e={},t=!1){let n=O(e,"names",{});return new Mr({optional:t,value:[new _f({name:n.utcTimeName||V}),new Fr({name:n.generalTimeName||V})]})}fromSchema(e){ke(e,e0e);let t=Be(e,e,UA.schema({names:{utcTimeName:AR,generalTimeName:CR}}));Te.assertSchema(t,this.className),AR in t.result&&(this.type=0,this.value=t.result.utcTimeName.toDate()),CR in t.result&&(this.type=1,this.value=t.result.generalTimeName.toDate())}toSchema(){return this.type===0?new _f({valueDate:this.value}):this.type===1?new Fr({valueDate:this.value}):{}}toJSON(){return{type:this.type,value:this.value}}};rs.CLASS_NAME="Time";var RB="tbs",sl="version",jA="serialNumber",FA="signature",MA="issuer",qA="notBefore",HA="notAfter",KA="subject",$A="subjectPublicKeyInfo",k1="issuerUniqueID",L1="subjectUniqueID",V1="extensions",U1="signatureAlgorithm",j1="signatureValue",xi="tbsCertificate",RC=`${xi}.${sl}`,lO=`${xi}.${jA}`,fO=`${xi}.${FA}`,hO=`${xi}.${MA}`,OC=`${xi}.${qA}`,PC=`${xi}.${HA}`,pO=`${xi}.${KA}`,dO=`${xi}.${$A}`,kC=`${xi}.${k1}`,LC=`${xi}.${L1}`,Bx=`${xi}.${V1}`,t0e=[xi,RC,lO,fO,hO,OC,PC,pO,dO,kC,LC,Bx,U1,j1];function r0e(r={}){let e=O(r,"names",{});return new J({name:e.blockName||xi,value:[new fe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[new xe({name:e.tbsCertificateVersion||RC})]}),new xe({name:e.tbsCertificateSerialNumber||lO}),we.schema(e.signature||{names:{blockName:fO}}),qr.schema(e.issuer||{names:{blockName:hO}}),new J({name:e.tbsCertificateValidity||"tbsCertificate.validity",value:[rs.schema(e.notBefore||{names:{utcTimeName:OC,generalTimeName:OC}}),rs.schema(e.notAfter||{names:{utcTimeName:PC,generalTimeName:PC}})]}),qr.schema(e.subject||{names:{blockName:pO}}),Da.schema(e.subjectPublicKeyInfo||{names:{blockName:dO}}),new xt({name:e.tbsCertificateIssuerUniqueID||kC,optional:!0,idBlock:{tagClass:3,tagNumber:1}}),new xt({name:e.tbsCertificateSubjectUniqueID||LC,optional:!0,idBlock:{tagClass:3,tagNumber:2}}),new fe({optional:!0,idBlock:{tagClass:3,tagNumber:3},value:[Rn.schema(e.extensions||{names:{blockName:Bx}})]})]})}o(r0e,"tbsCertificate");var vs=class Bn extends Re{static{o(this,"Certificate")}get tbs(){return vt.toArrayBuffer(this.tbsView)}set tbs(e){this.tbsView=new Uint8Array(e)}constructor(e={}){super(),this.tbsView=new Uint8Array(O(e,RB,Bn.defaultValues(RB))),this.version=O(e,sl,Bn.defaultValues(sl)),this.serialNumber=O(e,jA,Bn.defaultValues(jA)),this.signature=O(e,FA,Bn.defaultValues(FA)),this.issuer=O(e,MA,Bn.defaultValues(MA)),this.notBefore=O(e,qA,Bn.defaultValues(qA)),this.notAfter=O(e,HA,Bn.defaultValues(HA)),this.subject=O(e,KA,Bn.defaultValues(KA)),this.subjectPublicKeyInfo=O(e,$A,Bn.defaultValues($A)),k1 in e&&(this.issuerUniqueID=O(e,k1,Bn.defaultValues(k1))),L1 in e&&(this.subjectUniqueID=O(e,L1,Bn.defaultValues(L1))),V1 in e&&(this.extensions=O(e,V1,Bn.defaultValues(V1))),this.signatureAlgorithm=O(e,U1,Bn.defaultValues(U1)),this.signatureValue=O(e,j1,Bn.defaultValues(j1)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case RB:return hn;case sl:return 0;case jA:return new xe;case FA:return new we;case MA:return new qr;case qA:return new rs;case HA:return new rs;case KA:return new qr;case $A:return new Da;case k1:return hn;case L1:return hn;case V1:return[];case U1:return new we;case j1:return new Gt;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[r0e(t.tbsCertificate),we.schema(t.signatureAlgorithm||{names:{blockName:U1}}),new Gt({name:t.signatureValue||j1})]})}fromSchema(e){ke(e,t0e);let t=Be(e,e,Bn.schema({names:{tbsCertificate:{names:{extensions:{names:{extensions:Bx}}}}}}));Te.assertSchema(t,this.className),this.tbsView=t.result.tbsCertificate.valueBeforeDecodeView,RC in t.result&&(this.version=t.result[RC].valueBlock.valueDec),this.serialNumber=t.result[lO],this.signature=new we({schema:t.result[fO]}),this.issuer=new qr({schema:t.result[hO]}),this.notBefore=new rs({schema:t.result[OC]}),this.notAfter=new rs({schema:t.result[PC]}),this.subject=new qr({schema:t.result[pO]}),this.subjectPublicKeyInfo=new Da({schema:t.result[dO]}),kC in t.result&&(this.issuerUniqueID=t.result[kC].valueBlock.valueHex),LC in t.result&&(this.subjectUniqueID=t.result[LC].valueBlock.valueHex),Bx in t.result&&(this.extensions=Array.from(t.result[Bx],n=>new ea({schema:n}))),this.signatureAlgorithm=new we({schema:t.result.signatureAlgorithm}),this.signatureValue=t.result.signatureValue}encodeTBS(){let e=[];return sl in this&&this.version!==Bn.defaultValues(sl)&&e.push(new fe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[new xe({value:this.version})]})),e.push(this.serialNumber),e.push(this.signature.toSchema()),e.push(this.issuer.toSchema()),e.push(new J({value:[this.notBefore.toSchema(),this.notAfter.toSchema()]})),e.push(this.subject.toSchema()),e.push(this.subjectPublicKeyInfo.toSchema()),this.issuerUniqueID&&e.push(new xt({optional:!0,idBlock:{tagClass:3,tagNumber:1},valueHex:this.issuerUniqueID})),this.subjectUniqueID&&e.push(new xt({optional:!0,idBlock:{tagClass:3,tagNumber:2},valueHex:this.subjectUniqueID})),this.extensions&&e.push(new fe({optional:!0,idBlock:{tagClass:3,tagNumber:3},value:[new J({value:Array.from(this.extensions,t=>t.toSchema())})]})),new J({value:e})}toSchema(e=!1){let t;if(e===!1){if(!this.tbsView.byteLength)return Bn.schema().value[0];let n=en(this.tbsView);Te.assert(n,"TBS Certificate"),t=n.result}else t=this.encodeTBS();return new J({value:[t,this.signatureAlgorithm.toSchema(),this.signatureValue]})}toJSON(){let e={tbs:Nt.ToHex(this.tbsView),version:this.version,serialNumber:this.serialNumber.toJSON(),signature:this.signature.toJSON(),issuer:this.issuer.toJSON(),notBefore:this.notBefore.toJSON(),notAfter:this.notAfter.toJSON(),subject:this.subject.toJSON(),subjectPublicKeyInfo:this.subjectPublicKeyInfo.toJSON(),signatureAlgorithm:this.signatureAlgorithm.toJSON(),signatureValue:this.signatureValue.toJSON()};return sl in this&&this.version!==Bn.defaultValues(sl)&&(e.version=this.version),this.issuerUniqueID&&(e.issuerUniqueID=Nt.ToHex(this.issuerUniqueID)),this.subjectUniqueID&&(e.subjectUniqueID=Nt.ToHex(this.subjectUniqueID)),this.extensions&&(e.extensions=Array.from(this.extensions,t=>t.toJSON())),e}async getPublicKey(e,t=kt(!0)){return t.getPublicKey(this.subjectPublicKeyInfo,this.signatureAlgorithm,e)}async getKeyHash(e="SHA-1",t=kt(!0)){return t.digest({name:e},this.subjectPublicKeyInfo.subjectPublicKey.valueBlock.valueHexView)}async sign(e,t="SHA-1",n=kt(!0)){if(!e)throw new Error("Need to provide a private key for signing");let s=await n.getSignatureParameters(e,t),i=s.parameters;this.signature=s.signatureAlgorithm,this.signatureAlgorithm=s.signatureAlgorithm,this.tbsView=new Uint8Array(this.encodeTBS().toBER());let a=await n.signWithPrivateKey(this.tbsView,e,i);this.signatureValue=new Gt({valueHex:a})}async verify(e,t=kt(!0)){let n;if(e?n=e.subjectPublicKeyInfo:this.issuer.isEqual(this.subject)&&(n=this.subjectPublicKeyInfo),!(n instanceof Da))throw new Error("Please provide issuer certificate as a parameter");return t.verifyWithPublicKey(this.tbsView,this.signatureValue,n,this.signatureAlgorithm)}};vs.CLASS_NAME="Certificate";function oH(r,e=null){if(e&&r.issuer.isEqual(e.issuer)&&r.serialNumber.isEqual(e.serialNumber))return null;let t=!1;if(r.extensions){for(let n of r.extensions)if(n.extnID===rO&&n.parsedValue instanceof cO&&n.parsedValue.cA){t=!0;break}}return t?r:null}o(oH,"checkCA");var om="certId",um="certValue",Ud="parsedValue",n0e=[om,um],uH=class F1 extends Re{static{o(this,"CertBag")}constructor(e={}){super(),this.certId=O(e,om,F1.defaultValues(om)),this.certValue=O(e,um,F1.defaultValues(um)),Ud in e&&(this.parsedValue=O(e,Ud,F1.defaultValues(Ud))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case om:return V;case um:return new bt;case Ud:return{};default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case om:return t===V;case um:return t instanceof bt;case Ud:return t instanceof Object&&Object.keys(t).length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new ot({name:t.id||"id"}),new fe({idBlock:{tagClass:3,tagNumber:0},value:[new bt({name:t.value||"value"})]})]})}fromSchema(e){ke(e,n0e);let t=Be(e,e,F1.schema({names:{id:om,value:um}}));Te.assertSchema(t,this.className),this.certId=t.result.certId.valueBlock.toString(),this.certValue=t.result.certValue;let n=this.certValue.valueBlock.valueHexView;switch(this.certId){case u7:try{this.parsedValue=vs.fromBER(n)}catch{Bl.fromBER(n)}break;case c7:this.parsedValue=Bl.fromBER(n);break;case ame:default:throw new Error(`Incorrect CERT_ID value in CertBag: ${this.certId}`)}}toSchema(){return Ud in this&&("acinfo"in this.parsedValue?this.certId=c7:this.certId=u7,this.certValue=new qe({valueHex:this.parsedValue.toSchema().toBER(!1)})),new J({value:[new ot({value:this.certId}),new fe({idBlock:{tagClass:3,tagNumber:0},value:["toSchema"in this.certValue?this.certValue.toSchema():this.certValue]})]})}toJSON(){return{certId:this.certId,certValue:this.certValue.toJSON()}}};uH.CLASS_NAME="CertBag";var M1="userCertificate",cm="revocationDate",hh="crlEntryExtensions",s0e=[M1,cm,hh],cH=class q1 extends Re{static{o(this,"RevokedCertificate")}constructor(e={}){super(),this.userCertificate=O(e,M1,q1.defaultValues(M1)),this.revocationDate=O(e,cm,q1.defaultValues(cm)),hh in e&&(this.crlEntryExtensions=O(e,hh,q1.defaultValues(hh))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case M1:return new xe;case cm:return new rs;case hh:return new Rn;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new xe({name:t.userCertificate||M1}),rs.schema({names:{utcTimeName:t.revocationDate||cm,generalTimeName:t.revocationDate||cm}}),Rn.schema({names:{blockName:t.crlEntryExtensions||hh}},!0)]})}fromSchema(e){ke(e,s0e);let t=Be(e,e,q1.schema());Te.assertSchema(t,this.className),this.userCertificate=t.result.userCertificate,this.revocationDate=new rs({schema:t.result.revocationDate}),hh in t.result&&(this.crlEntryExtensions=new Rn({schema:t.result.crlEntryExtensions}))}toSchema(){let e=[this.userCertificate,this.revocationDate.toSchema()];return this.crlEntryExtensions&&e.push(this.crlEntryExtensions.toSchema()),new J({value:e})}toJSON(){let e={userCertificate:this.userCertificate.toJSON(),revocationDate:this.revocationDate.toJSON()};return this.crlEntryExtensions&&(e.crlEntryExtensions=this.crlEntryExtensions.toJSON()),e}};cH.CLASS_NAME="RevokedCertificate";var OB="tbs",Qv="version",PB="signature",kB="issuer",LB="thisUpdate",Qb="nextUpdate",Zb="revokedCertificates",eA="crlExtensions",H1="signatureAlgorithm",K1="signatureValue",bu="tbsCertList",VC=`${bu}.version`,mO=`${bu}.signature`,gO=`${bu}.issuer`,UC=`${bu}.thisUpdate`,jx=`${bu}.nextUpdate`,jC=`${bu}.revokedCertificates`,FC=`${bu}.extensions`,i0e=[bu,VC,mO,gO,UC,jx,jC,FC,H1,K1];function a0e(r={}){let e=O(r,"names",{});return new J({name:e.blockName||bu,value:[new xe({optional:!0,name:e.tbsCertListVersion||VC,value:2}),we.schema(e.signature||{names:{blockName:mO}}),qr.schema(e.issuer||{names:{blockName:gO}}),rs.schema(e.tbsCertListThisUpdate||{names:{utcTimeName:UC,generalTimeName:UC}}),rs.schema(e.tbsCertListNextUpdate||{names:{utcTimeName:jx,generalTimeName:jx}},!0),new J({optional:!0,value:[new Bt({name:e.tbsCertListRevokedCertificates||jC,value:new J({value:[new xe,rs.schema(),Rn.schema({},!0)]})})]}),new fe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[Rn.schema(e.crlExtensions||{names:{blockName:FC}})]})]})}o(a0e,"tbsCertList");var o0e=[sO,O7,Xde,Wde,P7,nO,iO,zde,Jde,k7],Fx=class Ds extends Re{static{o(this,"CertificateRevocationList")}get tbs(){return vt.toArrayBuffer(this.tbsView)}set tbs(e){this.tbsView=new Uint8Array(e)}constructor(e={}){super(),this.tbsView=new Uint8Array(O(e,OB,Ds.defaultValues(OB))),this.version=O(e,Qv,Ds.defaultValues(Qv)),this.signature=O(e,PB,Ds.defaultValues(PB)),this.issuer=O(e,kB,Ds.defaultValues(kB)),this.thisUpdate=O(e,LB,Ds.defaultValues(LB)),Qb in e&&(this.nextUpdate=O(e,Qb,Ds.defaultValues(Qb))),Zb in e&&(this.revokedCertificates=O(e,Zb,Ds.defaultValues(Zb))),eA in e&&(this.crlExtensions=O(e,eA,Ds.defaultValues(eA))),this.signatureAlgorithm=O(e,H1,Ds.defaultValues(H1)),this.signatureValue=O(e,K1,Ds.defaultValues(K1)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case OB:return hn;case Qv:return 0;case PB:return new we;case kB:return new qr;case LB:return new rs;case Qb:return new rs;case Zb:return[];case eA:return new Rn;case H1:return new we;case K1:return new Gt;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||"CertificateList",value:[a0e(e),we.schema(t.signatureAlgorithm||{names:{blockName:H1}}),new Gt({name:t.signatureValue||K1})]})}fromSchema(e){ke(e,i0e);let t=Be(e,e,Ds.schema());Te.assertSchema(t,this.className),this.tbsView=t.result.tbsCertList.valueBeforeDecodeView,VC in t.result&&(this.version=t.result[VC].valueBlock.valueDec),this.signature=new we({schema:t.result[mO]}),this.issuer=new qr({schema:t.result[gO]}),this.thisUpdate=new rs({schema:t.result[UC]}),jx in t.result&&(this.nextUpdate=new rs({schema:t.result[jx]})),jC in t.result&&(this.revokedCertificates=Array.from(t.result[jC],n=>new cH({schema:n}))),FC in t.result&&(this.crlExtensions=new Rn({schema:t.result[FC]})),this.signatureAlgorithm=new we({schema:t.result.signatureAlgorithm}),this.signatureValue=t.result.signatureValue}encodeTBS(){let e=[];return this.version!==Ds.defaultValues(Qv)&&e.push(new xe({value:this.version})),e.push(this.signature.toSchema()),e.push(this.issuer.toSchema()),e.push(this.thisUpdate.toSchema()),this.nextUpdate&&e.push(this.nextUpdate.toSchema()),this.revokedCertificates&&e.push(new J({value:Array.from(this.revokedCertificates,t=>t.toSchema())})),this.crlExtensions&&e.push(new fe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[this.crlExtensions.toSchema()]})),new J({value:e})}toSchema(e=!1){let t;if(e)t=this.encodeTBS();else{if(!this.tbsView.byteLength)return Ds.schema();let n=en(this.tbsView);Te.assert(n,"TBS Certificate Revocation List"),t=n.result}return new J({value:[t,this.signatureAlgorithm.toSchema(),this.signatureValue]})}toJSON(){let e={tbs:Nt.ToHex(this.tbsView),version:this.version,signature:this.signature.toJSON(),issuer:this.issuer.toJSON(),thisUpdate:this.thisUpdate.toJSON(),signatureAlgorithm:this.signatureAlgorithm.toJSON(),signatureValue:this.signatureValue.toJSON()};return this.version!==Ds.defaultValues(Qv)&&(e.version=this.version),this.nextUpdate&&(e.nextUpdate=this.nextUpdate.toJSON()),this.revokedCertificates&&(e.revokedCertificates=Array.from(this.revokedCertificates,t=>t.toJSON())),this.crlExtensions&&(e.crlExtensions=this.crlExtensions.toJSON()),e}isCertificateRevoked(e){if(!this.issuer.isEqual(e.issuer)||!this.revokedCertificates)return!1;for(let t of this.revokedCertificates)if(t.userCertificate.isEqual(e.serialNumber))return!0;return!1}async sign(e,t="SHA-1",n=kt(!0)){if(!e)throw new Error("Need to provide a private key for signing");let s=await n.getSignatureParameters(e,t),{parameters:i}=s;this.signature=s.signatureAlgorithm,this.signatureAlgorithm=s.signatureAlgorithm,this.tbsView=new Uint8Array(this.encodeTBS().toBER());let a=await n.signWithPrivateKey(this.tbsView,e,i);this.signatureValue=new Gt({valueHex:a})}async verify(e={},t=kt(!0)){let n;if(e.issuerCertificate&&(n=e.issuerCertificate.subjectPublicKeyInfo,!this.issuer.isEqual(e.issuerCertificate.subject)))return!1;if(e.publicKeyInfo&&(n=e.publicKeyInfo),!n)throw new Error("Issuer's certificate must be provided as an input parameter");if(this.crlExtensions){for(let s of this.crlExtensions.extensions)if(s.critical&&!o0e.includes(s.extnID))return!1}return t.verifyWithPublicKey(this.tbsView,this.signatureValue,n,this.signatureAlgorithm)}};Fx.CLASS_NAME="CertificateRevocationList";var lm="crlId",fm="crlValue",Zv="parsedValue",u0e=[lm,fm],lH=class $1 extends Re{static{o(this,"CRLBag")}constructor(e={}){super(),this.crlId=O(e,lm,$1.defaultValues(lm)),this.crlValue=O(e,fm,$1.defaultValues(fm)),Zv in e&&(this.parsedValue=O(e,Zv,$1.defaultValues(Zv))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case lm:return V;case fm:return new bt;case Zv:return{};default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case lm:return t===V;case fm:return t instanceof bt;case Zv:return t instanceof Object&&Object.keys(t).length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new ot({name:t.id||"id"}),new fe({idBlock:{tagClass:3,tagNumber:0},value:[new bt({name:t.value||"value"})]})]})}fromSchema(e){ke(e,u0e);let t=Be(e,e,$1.schema({names:{id:lm,value:fm}}));switch(Te.assertSchema(t,this.className),this.crlId=t.result.crlId.valueBlock.toString(),this.crlValue=t.result.crlValue,this.crlId){case l7:this.parsedValue=Fx.fromBER(this.certValue.valueBlock.valueHex);break;default:throw new Error(`Incorrect CRL_ID value in CRLBag: ${this.crlId}`)}}toSchema(){return this.parsedValue&&(this.crlId=l7,this.crlValue=new qe({valueHex:this.parsedValue.toSchema().toBER(!1)})),new J({value:[new ot({value:this.crlId}),new fe({idBlock:{tagClass:3,tagNumber:0},value:[this.crlValue.toSchema()]})]})}toJSON(){return{crlId:this.crlId,crlValue:this.crlValue.toJSON()}}};lH.CLASS_NAME="CRLBag";var hm="version",pm="encryptedContentInfo",il="unprotectedAttrs",c0e=[hm,pm,il],Mx=class G1 extends Re{static{o(this,"EncryptedData")}constructor(e={}){super(),this.version=O(e,hm,G1.defaultValues(hm)),this.encryptedContentInfo=O(e,pm,G1.defaultValues(pm)),il in e&&(this.unprotectedAttrs=O(e,il,G1.defaultValues(il))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case hm:return 0;case pm:return new gs;case il:return[];default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case hm:return t===0;case pm:return gs.compareWithDefault("contentType",t.contentType)&&gs.compareWithDefault("contentEncryptionAlgorithm",t.contentEncryptionAlgorithm)&&gs.compareWithDefault("encryptedContent",t.encryptedContent);case il:return t.length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new xe({name:t.version||V}),gs.schema(t.encryptedContentInfo||{}),new fe({optional:!0,idBlock:{tagClass:3,tagNumber:1},value:[new Bt({name:t.unprotectedAttrs||V,value:pn.schema()})]})]})}fromSchema(e){ke(e,c0e);let t=Be(e,e,G1.schema({names:{version:hm,encryptedContentInfo:{names:{blockName:pm}},unprotectedAttrs:il}}));Te.assertSchema(t,this.className),this.version=t.result.version.valueBlock.valueDec,this.encryptedContentInfo=new gs({schema:t.result.encryptedContentInfo}),il in t.result&&(this.unprotectedAttrs=Array.from(t.result.unprotectedAttrs,n=>new pn({schema:n})))}toSchema(){let e=[];return e.push(new xe({value:this.version})),e.push(this.encryptedContentInfo.toSchema()),this.unprotectedAttrs&&e.push(new fe({optional:!0,idBlock:{tagClass:3,tagNumber:1},value:Array.from(this.unprotectedAttrs,t=>t.toSchema())})),new J({value:e})}toJSON(){let e={version:this.version,encryptedContentInfo:this.encryptedContentInfo.toJSON()};return this.unprotectedAttrs&&(e.unprotectedAttrs=Array.from(this.unprotectedAttrs,t=>t.toJSON())),e}async encrypt(e,t=kt(!0)){Ir.assert(e,"parameters","object");let n={...e,contentType:"1.2.840.113549.1.7.1"};this.encryptedContentInfo=await t.encryptEncryptedContentInfo(n)}async decrypt(e,t=kt(!0)){Ir.assert(e,"parameters","object");let n={...e,encryptedContentInfo:this.encryptedContentInfo};return t.decryptEncryptedContentInfo(n)}};Mx.CLASS_NAME="EncryptedData";var ph="encryptionAlgorithm",al="encryptedData",ey="parsedValue",l0e=[ph,al],fH=class dm extends Re{static{o(this,"PKCS8ShroudedKeyBag")}constructor(e={}){super(),this.encryptionAlgorithm=O(e,ph,dm.defaultValues(ph)),this.encryptedData=O(e,al,dm.defaultValues(al)),ey in e&&(this.parsedValue=O(e,ey,dm.defaultValues(ey))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case ph:return new we;case al:return new qe;case ey:return{};default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case ph:return we.compareWithDefault("algorithmId",t.algorithmId)&&!("algorithmParams"in t);case al:return t.isEqual(dm.defaultValues(e));case ey:return t instanceof Object&&Object.keys(t).length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[we.schema(t.encryptionAlgorithm||{names:{blockName:ph}}),new Mr({value:[new qe({name:t.encryptedData||al}),new qe({idBlock:{isConstructed:!0},name:t.encryptedData||al})]})]})}fromSchema(e){ke(e,l0e);let t=Be(e,e,dm.schema({names:{encryptionAlgorithm:{names:{blockName:ph}},encryptedData:al}}));Te.assertSchema(t,this.className),this.encryptionAlgorithm=new we({schema:t.result.encryptionAlgorithm}),this.encryptedData=t.result.encryptedData}toSchema(){return new J({value:[this.encryptionAlgorithm.toSchema(),this.encryptedData]})}toJSON(){return{encryptionAlgorithm:this.encryptionAlgorithm.toJSON(),encryptedData:this.encryptedData.toJSON()}}async parseInternalValues(e,t=kt(!0)){let s=await new Mx({encryptedContentInfo:new gs({contentEncryptionAlgorithm:this.encryptionAlgorithm,encryptedContent:this.encryptedData})}).decrypt(e,t);this.parsedValue=Ux.fromBER(s)}async makeInternalValues(e,t=kt(!0)){if(!this.parsedValue)throw new Error('Please initialize "parsedValue" first');let n=new Mx,s={...e,contentToEncrypt:this.parsedValue.toSchema().toBER(!1)};if(await n.encrypt(s,t),!n.encryptedContentInfo.encryptedContent)throw new Error("The filed `encryptedContent` in EncryptedContentInfo is empty");this.encryptionAlgorithm=n.encryptedContentInfo.contentEncryptionAlgorithm,this.encryptedData=n.encryptedContentInfo.encryptedContent}};fH.CLASS_NAME="PKCS8ShroudedKeyBag";var mm="secretTypeId",gm="secretValue",f0e=[mm,gm],hH=class GA extends Re{static{o(this,"SecretBag")}constructor(e={}){super(),this.secretTypeId=O(e,mm,GA.defaultValues(mm)),this.secretValue=O(e,gm,GA.defaultValues(gm)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case mm:return V;case gm:return new bt;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case mm:return t===V;case gm:return t instanceof bt;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new ot({name:t.id||"id"}),new fe({idBlock:{tagClass:3,tagNumber:0},value:[new bt({name:t.value||"value"})]})]})}fromSchema(e){ke(e,f0e);let t=Be(e,e,GA.schema({names:{id:mm,value:gm}}));Te.assertSchema(t,this.className),this.secretTypeId=t.result.secretTypeId.valueBlock.toString(),this.secretValue=t.result.secretValue}toSchema(){return new J({value:[new ot({value:this.secretTypeId}),new fe({idBlock:{tagClass:3,tagNumber:0},value:[this.secretValue.toSchema()]})]})}toJSON(){return{secretTypeId:this.secretTypeId,secretValue:this.secretValue.toJSON()}}};hH.CLASS_NAME="SecretBag";var h0e=class dh{static{o(this,"SafeBagValueFactory")}static getItems(){return this.items||(this.items={},dh.register("1.2.840.113549.1.12.10.1.1",Ux),dh.register("1.2.840.113549.1.12.10.1.2",fH),dh.register("1.2.840.113549.1.12.10.1.3",uH),dh.register("1.2.840.113549.1.12.10.1.4",lH),dh.register("1.2.840.113549.1.12.10.1.5",hH),dh.register("1.2.840.113549.1.12.10.1.6",b0)),this.items}static register(e,t){this.getItems()[e]=t}static find(e){return this.getItems()[e]||null}},mh="bagId",gh="bagValue",fu="bagAttributes",p0e=[mh,gh,fu],NR=class X1 extends Re{static{o(this,"SafeBag")}constructor(e={}){super(),this.bagId=O(e,mh,X1.defaultValues(mh)),this.bagValue=O(e,gh,X1.defaultValues(gh)),fu in e&&(this.bagAttributes=O(e,fu,X1.defaultValues(fu))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case mh:return V;case gh:return new bt;case fu:return[];default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case mh:return t===V;case gh:return t instanceof bt;case fu:return t.length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new ot({name:t.bagId||mh}),new fe({idBlock:{tagClass:3,tagNumber:0},value:[new bt({name:t.bagValue||gh})]}),new rn({optional:!0,value:[new Bt({name:t.bagAttributes||fu,value:pn.schema()})]})]})}fromSchema(e){ke(e,p0e);let t=Be(e,e,X1.schema({names:{bagId:mh,bagValue:gh,bagAttributes:fu}}));Te.assertSchema(t,this.className),this.bagId=t.result.bagId.valueBlock.toString();let n=h0e.find(this.bagId);if(!n)throw new Error(`Invalid BAG_ID for SafeBag: ${this.bagId}`);this.bagValue=new n({schema:t.result.bagValue}),fu in t.result&&(this.bagAttributes=Array.from(t.result.bagAttributes,s=>new pn({schema:s})))}toSchema(){let e=[new ot({value:this.bagId}),new fe({idBlock:{tagClass:3,tagNumber:0},value:[this.bagValue.toSchema()]})];return this.bagAttributes&&e.push(new rn({value:Array.from(this.bagAttributes,t=>t.toSchema())})),new J({value:e})}toJSON(){let e={bagId:this.bagId,bagValue:this.bagValue.toJSON()};return this.bagAttributes&&(e.bagAttributes=Array.from(this.bagAttributes,t=>t.toJSON())),e}};NR.CLASS_NAME="SafeBag";var jd="safeBags",b0=class TR extends Re{static{o(this,"SafeContents")}constructor(e={}){super(),this.safeBags=O(e,jd,TR.defaultValues(jd)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case jd:return[];default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case jd:return t.length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new Bt({name:t.safeBags||V,value:NR.schema()})]})}fromSchema(e){ke(e,[jd]);let t=Be(e,e,TR.schema({names:{safeBags:jd}}));Te.assertSchema(t,this.className),this.safeBags=Array.from(t.result.safeBags,n=>new NR({schema:n}))}toSchema(){return new J({value:Array.from(this.safeBags,e=>e.toSchema())})}toJSON(){return{safeBags:Array.from(this.safeBags,e=>e.toJSON())}}};b0.CLASS_NAME="SafeContents";var W1="otherCertFormat",z1="otherCert",d0e=[W1,z1],XA=class WA extends Re{static{o(this,"OtherCertificateFormat")}constructor(e={}){super(),this.otherCertFormat=O(e,W1,WA.defaultValues(W1)),this.otherCert=O(e,z1,WA.defaultValues(z1)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case W1:return V;case z1:return new bt;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new ot({name:t.otherCertFormat||W1}),new bt({name:t.otherCert||z1})]})}fromSchema(e){ke(e,d0e);let t=Be(e,e,WA.schema());Te.assertSchema(t,this.className),this.otherCertFormat=t.result.otherCertFormat.valueBlock.toString(),this.otherCert=t.result.otherCert}toSchema(){return new J({value:[new ot({value:this.otherCertFormat}),this.otherCert]})}toJSON(){let e={otherCertFormat:this.otherCertFormat};return this.otherCert instanceof bt||(e.otherCert=this.otherCert.toJSON()),e}},J1="certificates",m0e=[J1],Qh=class IR extends Re{static{o(this,"CertificateSet")}constructor(e={}){super(),this.certificates=O(e,J1,IR.defaultValues(J1)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case J1:return[];default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new rn({name:t.blockName||V,value:[new Bt({name:t.certificates||J1,value:new Mr({value:[vs.schema(),new fe({idBlock:{tagClass:3,tagNumber:0},value:[new bt]}),new fe({idBlock:{tagClass:3,tagNumber:1},value:[new J]}),new fe({idBlock:{tagClass:3,tagNumber:2},value:Bl.schema().valueBlock.value}),new fe({idBlock:{tagClass:3,tagNumber:3},value:XA.schema().valueBlock.value})]})})]})}fromSchema(e){ke(e,m0e);let t=Be(e,e,IR.schema());Te.assertSchema(t,this.className),this.certificates=Array.from(t.result.certificates||[],n=>{let s=n.idBlock.tagNumber;if(n.idBlock.tagClass===1)return new vs({schema:n});let i=new J({value:n.valueBlock.value});switch(s){case 1:return i.valueBlock.value[0].valueBlock.value[0].valueBlock.valueDec===1?new Bl({schema:i}):new BC({schema:i});case 2:return new Bl({schema:i});case 3:return new XA({schema:i})}return n})}toSchema(){return new rn({value:Array.from(this.certificates,e=>{switch(!0){case e instanceof vs:return e.toSchema();case e instanceof BC:return new fe({idBlock:{tagClass:3,tagNumber:1},value:e.toSchema().valueBlock.value});case e instanceof Bl:return new fe({idBlock:{tagClass:3,tagNumber:2},value:e.toSchema().valueBlock.value});case e instanceof XA:return new fe({idBlock:{tagClass:3,tagNumber:3},value:e.toSchema().valueBlock.value})}return e.toSchema()})})}toJSON(){return{certificates:Array.from(this.certificates,e=>e.toJSON())}}};Qh.CLASS_NAME="CertificateSet";var Y1="otherRevInfoFormat",Q1="otherRevInfo",g0e=[Y1,Q1],Rx=class zA extends Re{static{o(this,"OtherRevocationInfoFormat")}constructor(e={}){super(),this.otherRevInfoFormat=O(e,Y1,zA.defaultValues(Y1)),this.otherRevInfo=O(e,Q1,zA.defaultValues(Q1)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Y1:return V;case Q1:return new bt;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new ot({name:t.otherRevInfoFormat||Y1}),new bt({name:t.otherRevInfo||Q1})]})}fromSchema(e){ke(e,g0e);let t=Be(e,e,zA.schema());Te.assertSchema(t,this.className),this.otherRevInfoFormat=t.result.otherRevInfoFormat.valueBlock.toString(),this.otherRevInfo=t.result.otherRevInfo}toSchema(){return new J({value:[new ot({value:this.otherRevInfoFormat}),this.otherRevInfo]})}toJSON(){let e={otherRevInfoFormat:this.otherRevInfoFormat};return this.otherRevInfo instanceof bt||(e.otherRevInfo=this.otherRevInfo.toJSON()),e}};Rx.CLASS_NAME="OtherRevocationInfoFormat";var Z1="crls",VB="otherRevocationInfos",v0e=[Z1],Ox=class JA extends Re{static{o(this,"RevocationInfoChoices")}constructor(e={}){super(),this.crls=O(e,Z1,JA.defaultValues(Z1)),this.otherRevocationInfos=O(e,VB,JA.defaultValues(VB)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Z1:return[];case VB:return[];default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new rn({name:t.blockName||V,value:[new Bt({name:t.crls||V,value:new Mr({value:[Fx.schema(),new fe({idBlock:{tagClass:3,tagNumber:1},value:[new ot,new bt]})]})})]})}fromSchema(e){ke(e,v0e);let t=Be(e,e,JA.schema({names:{crls:Z1}}));if(Te.assertSchema(t,this.className),t.result.crls)for(let n of t.result.crls)n.idBlock.tagClass===1?this.crls.push(new Fx({schema:n})):this.otherRevocationInfos.push(new Rx({schema:n}))}toSchema(){let e=[];return e.push(...Array.from(this.crls,t=>t.toSchema())),e.push(...Array.from(this.otherRevocationInfos,t=>{let n=t.toSchema();return n.idBlock.tagClass=3,n.idBlock.tagNumber=1,n})),new rn({value:e})}toJSON(){return{crls:Array.from(this.crls,e=>e.toJSON()),otherRevocationInfos:Array.from(this.otherRevocationInfos,e=>e.toJSON())}}};Ox.CLASS_NAME="RevocationInfoChoices";var ex="certs",vh="crls",y0e=[ex,vh],YA=class _R extends Re{static{o(this,"OriginatorInfo")}constructor(e={}){super(),this.crls=O(e,vh,_R.defaultValues(vh)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case ex:return new Qh;case vh:return new Ox;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case ex:return t.certificates.length===0;case vh:return t.crls.length===0&&t.otherRevocationInfos.length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new fe({name:t.certs||V,optional:!0,idBlock:{tagClass:3,tagNumber:0},value:Qh.schema().valueBlock.value}),new fe({name:t.crls||V,optional:!0,idBlock:{tagClass:3,tagNumber:1},value:Ox.schema().valueBlock.value})]})}fromSchema(e){ke(e,y0e);let t=Be(e,e,_R.schema({names:{certs:ex,crls:vh}}));Te.assertSchema(t,this.className),ex in t.result&&(this.certs=new Qh({schema:new rn({value:t.result.certs.valueBlock.value})})),vh in t.result&&(this.crls=new Ox({schema:new rn({value:t.result.crls.valueBlock.value})}))}toSchema(){let e=[];return this.certs&&e.push(new fe({idBlock:{tagClass:3,tagNumber:0},value:this.certs.toSchema().valueBlock.value})),this.crls&&e.push(new fe({idBlock:{tagClass:3,tagNumber:1},value:this.crls.toSchema().valueBlock.value})),new J({value:e})}toJSON(){let e={};return this.certs&&(e.certs=this.certs.toJSON()),this.crls&&(e.crls=this.crls.toJSON()),e}};YA.CLASS_NAME="OriginatorInfo";var tx="issuer",rx="serialNumber",x0e=[tx,rx],ns=class QA extends Re{static{o(this,"IssuerAndSerialNumber")}constructor(e={}){super(),this.issuer=O(e,tx,QA.defaultValues(tx)),this.serialNumber=O(e,rx,QA.defaultValues(rx)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case tx:return new qr;case rx:return new xe;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[qr.schema(t.issuer||{}),new xe({name:t.serialNumber||V})]})}fromSchema(e){ke(e,x0e);let t=Be(e,e,QA.schema({names:{issuer:{names:{blockName:tx}},serialNumber:rx}}));Te.assertSchema(t,this.className),this.issuer=new qr({schema:t.result.issuer}),this.serialNumber=t.result.serialNumber}toSchema(){return new J({value:[this.issuer.toSchema(),this.serialNumber]})}toJSON(){return{issuer:this.issuer.toJSON(),serialNumber:this.serialNumber.toJSON()}}};ns.CLASS_NAME="IssuerAndSerialNumber";var tA="variant",ty="value",w0e=["blockName"],pH=class ZA extends Re{static{o(this,"RecipientIdentifier")}constructor(e={}){super(),this.variant=O(e,tA,ZA.defaultValues(tA)),ty in e&&(this.value=O(e,ty,ZA.defaultValues(ty))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case tA:return-1;case ty:return{};default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case tA:return t===-1;case ty:return Object.keys(t).length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new Mr({value:[ns.schema({names:{blockName:t.blockName||V}}),new xt({name:t.blockName||V,idBlock:{tagClass:3,tagNumber:0}})]})}fromSchema(e){ke(e,w0e);let t=Be(e,e,ZA.schema({names:{blockName:"blockName"}}));Te.assertSchema(t,this.className),t.result.blockName.idBlock.tagClass===1?(this.variant=1,this.value=new ns({schema:t.result.blockName})):(this.variant=2,this.value=new qe({valueHex:t.result.blockName.valueBlock.valueHex}))}toSchema(){switch(this.variant){case 1:if(!(this.value instanceof ns))throw new Error("Incorrect type of RecipientIdentifier.value. It should be IssuerAndSerialNumber.");return this.value.toSchema();case 2:if(!(this.value instanceof qe))throw new Error("Incorrect type of RecipientIdentifier.value. It should be ASN.1 OctetString.");return new xt({idBlock:{tagClass:3,tagNumber:0},valueHex:this.value.valueBlock.valueHexView});default:return new bt}}toJSON(){let e={variant:this.variant};return(this.variant===1||this.variant===2)&&this.value&&(e.value=this.value.toJSON()),e}};pH.CLASS_NAME="RecipientIdentifier";var yh="version",vm="rid",ym="keyEncryptionAlgorithm",xm="encryptedKey",rA="recipientCertificate",E0e=[yh,vm,ym,xm],MC=class hu extends Re{static{o(this,"KeyTransRecipientInfo")}constructor(e={}){super(),this.version=O(e,yh,hu.defaultValues(yh)),this.rid=O(e,vm,hu.defaultValues(vm)),this.keyEncryptionAlgorithm=O(e,ym,hu.defaultValues(ym)),this.encryptedKey=O(e,xm,hu.defaultValues(xm)),this.recipientCertificate=O(e,rA,hu.defaultValues(rA)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case yh:return-1;case vm:return{};case ym:return new we;case xm:return new qe;case rA:return new vs;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case yh:return t===hu.defaultValues(yh);case vm:return Object.keys(t).length===0;case ym:case xm:return t.isEqual(hu.defaultValues(e));case rA:return!1;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new xe({name:t.version||V}),pH.schema(t.rid||{}),we.schema(t.keyEncryptionAlgorithm||{}),new qe({name:t.encryptedKey||V})]})}fromSchema(e){ke(e,E0e);let t=Be(e,e,hu.schema({names:{version:yh,rid:{names:{blockName:vm}},keyEncryptionAlgorithm:{names:{blockName:ym}},encryptedKey:xm}}));Te.assertSchema(t,this.className),this.version=t.result.version.valueBlock.valueDec,t.result.rid.idBlock.tagClass===3?this.rid=new qe({valueHex:t.result.rid.valueBlock.valueHex}):this.rid=new ns({schema:t.result.rid}),this.keyEncryptionAlgorithm=new we({schema:t.result.keyEncryptionAlgorithm}),this.encryptedKey=t.result.encryptedKey}toSchema(){let e=[];return this.rid instanceof ns?(this.version=0,e.push(new xe({value:this.version})),e.push(this.rid.toSchema())):(this.version=2,e.push(new xe({value:this.version})),e.push(new xt({idBlock:{tagClass:3,tagNumber:0},valueHex:this.rid.valueBlock.valueHexView}))),e.push(this.keyEncryptionAlgorithm.toSchema()),e.push(this.encryptedKey),new J({value:e})}toJSON(){return{version:this.version,rid:this.rid.toJSON(),keyEncryptionAlgorithm:this.keyEncryptionAlgorithm.toJSON(),encryptedKey:this.encryptedKey.toJSON()}}};MC.CLASS_NAME="KeyTransRecipientInfo";var wm="algorithm",Em="publicKey",S0e=[wm,Em],qC=class nx extends Re{static{o(this,"OriginatorPublicKey")}constructor(e={}){super(),this.algorithm=O(e,wm,nx.defaultValues(wm)),this.publicKey=O(e,Em,nx.defaultValues(Em)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case wm:return new we;case Em:return new Gt;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case wm:case Em:return t.isEqual(nx.defaultValues(e));default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[we.schema(t.algorithm||{}),new Gt({name:t.publicKey||V})]})}fromSchema(e){ke(e,S0e);let t=Be(e,e,nx.schema({names:{algorithm:{names:{blockName:wm}},publicKey:Em}}));Te.assertSchema(t,this.className),this.algorithm=new we({schema:t.result.algorithm}),this.publicKey=t.result.publicKey}toSchema(){return new J({value:[this.algorithm.toSchema(),this.publicKey]})}toJSON(){return{algorithm:this.algorithm.toJSON(),publicKey:this.publicKey.toJSON()}}};qC.CLASS_NAME="OriginatorPublicKey";var nA="variant",ry="value",b0e=["blockName"],Px=class eC extends Re{static{o(this,"OriginatorIdentifierOrKey")}constructor(e={}){super(),this.variant=O(e,nA,eC.defaultValues(nA)),ry in e&&(this.value=O(e,ry,eC.defaultValues(ry))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case nA:return-1;case ry:return{};default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case nA:return t===-1;case ry:return Object.keys(t).length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new Mr({value:[ns.schema({names:{blockName:t.blockName||V}}),new xt({idBlock:{tagClass:3,tagNumber:0},name:t.blockName||V}),new fe({idBlock:{tagClass:3,tagNumber:1},name:t.blockName||V,value:qC.schema().valueBlock.value})]})}fromSchema(e){ke(e,b0e);let t=Be(e,e,eC.schema({names:{blockName:"blockName"}}));Te.assertSchema(t,this.className),t.result.blockName.idBlock.tagClass===1?(this.variant=1,this.value=new ns({schema:t.result.blockName})):t.result.blockName.idBlock.tagNumber===0?(t.result.blockName.idBlock.tagClass=1,t.result.blockName.idBlock.tagNumber=4,this.variant=2,this.value=t.result.blockName):(this.variant=3,this.value=new qC({schema:new J({value:t.result.blockName.valueBlock.value})}))}toSchema(){switch(this.variant){case 1:return this.value.toSchema();case 2:return this.value.idBlock.tagClass=3,this.value.idBlock.tagNumber=0,this.value;case 3:{let e=this.value.toSchema();return e.idBlock.tagClass=3,e.idBlock.tagNumber=1,e}default:return new bt}}toJSON(){let e={variant:this.variant};return(this.variant===1||this.variant===2||this.variant===3)&&(e.value=this.value.toJSON()),e}};Px.CLASS_NAME="OriginatorIdentifierOrKey";var Sm="keyAttrId",go="keyAttr",A0e=[Sm,go],Zh=class tC extends Re{static{o(this,"OtherKeyAttribute")}constructor(e={}){super(),this.keyAttrId=O(e,Sm,tC.defaultValues(Sm)),go in e&&(this.keyAttr=O(e,go,tC.defaultValues(go))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Sm:return V;case go:return{};default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Sm:return typeof t=="string"&&t===V;case go:return Object.keys(t).length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({optional:t.optional||!0,name:t.blockName||V,value:[new ot({name:t.keyAttrId||V}),new bt({optional:!0,name:t.keyAttr||V})]})}fromSchema(e){ke(e,A0e);let t=Be(e,e,tC.schema({names:{keyAttrId:Sm,keyAttr:go}}));Te.assertSchema(t,this.className),this.keyAttrId=t.result.keyAttrId.valueBlock.toString(),go in t.result&&(this.keyAttr=t.result.keyAttr)}toSchema(){let e=[];return e.push(new ot({value:this.keyAttrId})),go in this&&e.push(this.keyAttr),new J({value:e})}toJSON(){let e={keyAttrId:this.keyAttrId};return go in this&&(e.keyAttr=this.keyAttr.toJSON()),e}};Zh.CLASS_NAME="OtherKeyAttribute";var xh="subjectKeyIdentifier",ol="date",ul="other",C0e=[xh,ol,ul],HC=class bm extends Re{static{o(this,"RecipientKeyIdentifier")}constructor(e={}){super(),this.subjectKeyIdentifier=O(e,xh,bm.defaultValues(xh)),ol in e&&(this.date=O(e,ol,bm.defaultValues(ol))),ul in e&&(this.other=O(e,ul,bm.defaultValues(ul))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case xh:return new qe;case ol:return new Fr;case ul:return new Zh;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case xh:return t.isEqual(bm.defaultValues(xh));case ol:return t.year===0&&t.month===0&&t.day===0&&t.hour===0&&t.minute===0&&t.second===0&&t.millisecond===0;case ul:return t.keyAttrId===V&&!("keyAttr"in t);default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new qe({name:t.subjectKeyIdentifier||V}),new Fr({optional:!0,name:t.date||V}),Zh.schema(t.other||{})]})}fromSchema(e){ke(e,C0e);let t=Be(e,e,bm.schema({names:{subjectKeyIdentifier:xh,date:ol,other:{names:{blockName:ul}}}}));Te.assertSchema(t,this.className),this.subjectKeyIdentifier=t.result.subjectKeyIdentifier,ol in t.result&&(this.date=t.result.date),ul in t.result&&(this.other=new Zh({schema:t.result.other}))}toSchema(){let e=[];return e.push(this.subjectKeyIdentifier),this.date&&e.push(this.date),this.other&&e.push(this.other.toSchema()),new J({value:e})}toJSON(){let e={subjectKeyIdentifier:this.subjectKeyIdentifier.toJSON()};return this.date&&(e.date=this.date.toJSON()),this.other&&(e.other=this.other.toJSON()),e}};HC.CLASS_NAME="RecipientKeyIdentifier";var sA="variant",iA="value",N0e=["blockName"],C0=class rC extends Re{static{o(this,"KeyAgreeRecipientIdentifier")}constructor(e={}){super(),this.variant=O(e,sA,rC.defaultValues(sA)),this.value=O(e,iA,rC.defaultValues(iA)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case sA:return-1;case iA:return{};default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case sA:return t===-1;case iA:return Object.keys(t).length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new Mr({value:[ns.schema(t.issuerAndSerialNumber||{names:{blockName:t.blockName||V}}),new fe({name:t.blockName||V,idBlock:{tagClass:3,tagNumber:0},value:HC.schema(t.rKeyId||{names:{blockName:t.blockName||V}}).valueBlock.value})]})}fromSchema(e){ke(e,N0e);let t=Be(e,e,rC.schema({names:{blockName:"blockName"}}));Te.assertSchema(t,this.className),t.result.blockName.idBlock.tagClass===1?(this.variant=1,this.value=new ns({schema:t.result.blockName})):(this.variant=2,this.value=new HC({schema:new J({value:t.result.blockName.valueBlock.value})}))}toSchema(){switch(this.variant){case 1:return this.value.toSchema();case 2:return new fe({idBlock:{tagClass:3,tagNumber:0},value:this.value.toSchema().valueBlock.value});default:return new bt}}toJSON(){let e={variant:this.variant};return(this.variant===1||this.variant===2)&&(e.value=this.value.toJSON()),e}};C0.CLASS_NAME="KeyAgreeRecipientIdentifier";var Am="rid",wh="encryptedKey",T0e=[Am,wh],KC=class sx extends Re{static{o(this,"RecipientEncryptedKey")}constructor(e={}){super(),this.rid=O(e,Am,sx.defaultValues(Am)),this.encryptedKey=O(e,wh,sx.defaultValues(wh)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Am:return new C0;case wh:return new qe;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Am:return t.variant===-1&&!("value"in t);case wh:return t.isEqual(sx.defaultValues(wh));default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[C0.schema(t.rid||{}),new qe({name:t.encryptedKey||V})]})}fromSchema(e){ke(e,T0e);let t=Be(e,e,sx.schema({names:{rid:{names:{blockName:Am}},encryptedKey:wh}}));Te.assertSchema(t,this.className),this.rid=new C0({schema:t.result.rid}),this.encryptedKey=t.result.encryptedKey}toSchema(){return new J({value:[this.rid.toSchema(),this.encryptedKey]})}toJSON(){return{rid:this.rid.toJSON(),encryptedKey:this.encryptedKey.toJSON()}}};KC.CLASS_NAME="RecipientEncryptedKey";var aA="encryptedKeys",dH="RecipientEncryptedKeys",I0e=[dH],kx=class DR extends Re{static{o(this,"RecipientEncryptedKeys")}constructor(e={}){super(),this.encryptedKeys=O(e,aA,DR.defaultValues(aA)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case aA:return[];default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case aA:return t.length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new Bt({name:t.RecipientEncryptedKeys||V,value:KC.schema()})]})}fromSchema(e){ke(e,I0e);let t=Be(e,e,DR.schema({names:{RecipientEncryptedKeys:dH}}));Te.assertSchema(t,this.className),this.encryptedKeys=Array.from(t.result.RecipientEncryptedKeys,n=>new KC({schema:n}))}toSchema(){return new J({value:Array.from(this.encryptedKeys,e=>e.toSchema())})}toJSON(){return{encryptedKeys:Array.from(this.encryptedKeys,e=>e.toJSON())}}};kx.CLASS_NAME="RecipientEncryptedKeys";var Cm="version",Nm="originator",pu="ukm",Tm="keyEncryptionAlgorithm",Im="recipientEncryptedKeys",oA="recipientCertificate",uA="recipientPublicKey",_0e=[Cm,Nm,pu,Tm,Im],$C=class vo extends Re{static{o(this,"KeyAgreeRecipientInfo")}constructor(e={}){super(),this.version=O(e,Cm,vo.defaultValues(Cm)),this.originator=O(e,Nm,vo.defaultValues(Nm)),pu in e&&(this.ukm=O(e,pu,vo.defaultValues(pu))),this.keyEncryptionAlgorithm=O(e,Tm,vo.defaultValues(Tm)),this.recipientEncryptedKeys=O(e,Im,vo.defaultValues(Im)),this.recipientCertificate=O(e,oA,vo.defaultValues(oA)),this.recipientPublicKey=O(e,uA,vo.defaultValues(uA)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Cm:return 0;case Nm:return new Px;case pu:return new qe;case Tm:return new we;case Im:return new kx;case oA:return new vs;case uA:return null;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Cm:return t===0;case Nm:return t.variant===-1&&!("value"in t);case pu:return t.isEqual(vo.defaultValues(pu));case Tm:return t.algorithmId===V&&!("algorithmParams"in t);case Im:return t.encryptedKeys.length===0;case oA:return!1;case uA:return!1;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new xe({name:t.version||V}),new fe({idBlock:{tagClass:3,tagNumber:0},value:[Px.schema(t.originator||{})]}),new fe({optional:!0,idBlock:{tagClass:3,tagNumber:1},value:[new qe({name:t.ukm||V})]}),we.schema(t.keyEncryptionAlgorithm||{}),kx.schema(t.recipientEncryptedKeys||{})]})}fromSchema(e){ke(e,_0e);let t=Be(e,e,vo.schema({names:{version:Cm,originator:{names:{blockName:Nm}},ukm:pu,keyEncryptionAlgorithm:{names:{blockName:Tm}},recipientEncryptedKeys:{names:{blockName:Im}}}}));Te.assertSchema(t,this.className),this.version=t.result.version.valueBlock.valueDec,this.originator=new Px({schema:t.result.originator}),pu in t.result&&(this.ukm=t.result.ukm),this.keyEncryptionAlgorithm=new we({schema:t.result.keyEncryptionAlgorithm}),this.recipientEncryptedKeys=new kx({schema:t.result.recipientEncryptedKeys})}toSchema(){let e=[];return e.push(new xe({value:this.version})),e.push(new fe({idBlock:{tagClass:3,tagNumber:0},value:[this.originator.toSchema()]})),this.ukm&&e.push(new fe({optional:!0,idBlock:{tagClass:3,tagNumber:1},value:[this.ukm]})),e.push(this.keyEncryptionAlgorithm.toSchema()),e.push(this.recipientEncryptedKeys.toSchema()),new J({value:e})}toJSON(){let e={version:this.version,originator:this.originator.toJSON(),keyEncryptionAlgorithm:this.keyEncryptionAlgorithm.toJSON(),recipientEncryptedKeys:this.recipientEncryptedKeys.toJSON()};return this.ukm&&(e.ukm=this.ukm.toJSON()),e}};$C.CLASS_NAME="KeyAgreeRecipientInfo";var Eh="keyIdentifier",cl="date",ll="other",D0e=[Eh,cl,ll],Lx=class _m extends Re{static{o(this,"KEKIdentifier")}constructor(e={}){super(),this.keyIdentifier=O(e,Eh,_m.defaultValues(Eh)),cl in e&&(this.date=O(e,cl,_m.defaultValues(cl))),ll in e&&(this.other=O(e,ll,_m.defaultValues(ll))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Eh:return new qe;case cl:return new Fr;case ll:return new Zh;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Eh:return t.isEqual(_m.defaultValues(Eh));case cl:return t.year===0&&t.month===0&&t.day===0&&t.hour===0&&t.minute===0&&t.second===0&&t.millisecond===0;case ll:return t.compareWithDefault("keyAttrId",t.keyAttrId)&&!("keyAttr"in t);default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new qe({name:t.keyIdentifier||V}),new Fr({optional:!0,name:t.date||V}),Zh.schema(t.other||{})]})}fromSchema(e){ke(e,D0e);let t=Be(e,e,_m.schema({names:{keyIdentifier:Eh,date:cl,other:{names:{blockName:ll}}}}));Te.assertSchema(t,this.className),this.keyIdentifier=t.result.keyIdentifier,cl in t.result&&(this.date=t.result.date),ll in t.result&&(this.other=new Zh({schema:t.result.other}))}toSchema(){let e=[];return e.push(this.keyIdentifier),this.date&&e.push(this.date),this.other&&e.push(this.other.toSchema()),new J({value:e})}toJSON(){let e={keyIdentifier:this.keyIdentifier.toJSON()};return this.date&&(e.date=this.date),this.other&&(e.other=this.other.toJSON()),e}};Lx.CLASS_NAME="KEKIdentifier";var Dm="version",Bm="kekid",Rm="keyEncryptionAlgorithm",Sh="encryptedKey",cA="preDefinedKEK",B0e=[Dm,Bm,Rm,Sh],GC=class du extends Re{static{o(this,"KEKRecipientInfo")}constructor(e={}){super(),this.version=O(e,Dm,du.defaultValues(Dm)),this.kekid=O(e,Bm,du.defaultValues(Bm)),this.keyEncryptionAlgorithm=O(e,Rm,du.defaultValues(Rm)),this.encryptedKey=O(e,Sh,du.defaultValues(Sh)),this.preDefinedKEK=O(e,cA,du.defaultValues(cA)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Dm:return 0;case Bm:return new Lx;case Rm:return new we;case Sh:return new qe;case cA:return hn;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case"KEKRecipientInfo":return t===du.defaultValues(Dm);case Bm:return t.compareWithDefault("keyIdentifier",t.keyIdentifier)&&!("date"in t)&&!("other"in t);case Rm:return t.algorithmId===V&&!("algorithmParams"in t);case Sh:return t.isEqual(du.defaultValues(Sh));case cA:return t.byteLength===0;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new xe({name:t.version||V}),Lx.schema(t.kekid||{}),we.schema(t.keyEncryptionAlgorithm||{}),new qe({name:t.encryptedKey||V})]})}fromSchema(e){ke(e,B0e);let t=Be(e,e,du.schema({names:{version:Dm,kekid:{names:{blockName:Bm}},keyEncryptionAlgorithm:{names:{blockName:Rm}},encryptedKey:Sh}}));Te.assertSchema(t,this.className),this.version=t.result.version.valueBlock.valueDec,this.kekid=new Lx({schema:t.result.kekid}),this.keyEncryptionAlgorithm=new we({schema:t.result.keyEncryptionAlgorithm}),this.encryptedKey=t.result.encryptedKey}toSchema(){return new J({value:[new xe({value:this.version}),this.kekid.toSchema(),this.keyEncryptionAlgorithm.toSchema(),this.encryptedKey]})}toJSON(){return{version:this.version,kekid:this.kekid.toJSON(),keyEncryptionAlgorithm:this.keyEncryptionAlgorithm.toJSON(),encryptedKey:this.encryptedKey.toJSON()}}};GC.CLASS_NAME="KEKRecipientInfo";var Om="version",fl="keyDerivationAlgorithm",Pm="keyEncryptionAlgorithm",bh="encryptedKey",lA="password",R0e=[Om,fl,Pm,bh],XC=class hl extends Re{static{o(this,"PasswordRecipientinfo")}constructor(e={}){super(),this.version=O(e,Om,hl.defaultValues(Om)),fl in e&&(this.keyDerivationAlgorithm=O(e,fl,hl.defaultValues(fl))),this.keyEncryptionAlgorithm=O(e,Pm,hl.defaultValues(Pm)),this.encryptedKey=O(e,bh,hl.defaultValues(bh)),this.password=O(e,lA,hl.defaultValues(lA)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Om:return-1;case fl:return new we;case Pm:return new we;case bh:return new qe;case lA:return hn;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Om:return t===-1;case fl:case Pm:return t.algorithmId===V&&!("algorithmParams"in t);case bh:return t.isEqual(hl.defaultValues(bh));case lA:return t.byteLength===0;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new xe({name:t.version||V}),new fe({name:t.keyDerivationAlgorithm||V,optional:!0,idBlock:{tagClass:3,tagNumber:0},value:we.schema().valueBlock.value}),we.schema(t.keyEncryptionAlgorithm||{}),new qe({name:t.encryptedKey||V})]})}fromSchema(e){ke(e,R0e);let t=Be(e,e,hl.schema({names:{version:Om,keyDerivationAlgorithm:fl,keyEncryptionAlgorithm:{names:{blockName:Pm}},encryptedKey:bh}}));Te.assertSchema(t,this.className),this.version=t.result.version.valueBlock.valueDec,fl in t.result&&(this.keyDerivationAlgorithm=new we({schema:new J({value:t.result.keyDerivationAlgorithm.valueBlock.value})})),this.keyEncryptionAlgorithm=new we({schema:t.result.keyEncryptionAlgorithm}),this.encryptedKey=t.result.encryptedKey}toSchema(){let e=[];return e.push(new xe({value:this.version})),this.keyDerivationAlgorithm&&e.push(new fe({idBlock:{tagClass:3,tagNumber:0},value:this.keyDerivationAlgorithm.toSchema().valueBlock.value})),e.push(this.keyEncryptionAlgorithm.toSchema()),e.push(this.encryptedKey),new J({value:e})}toJSON(){let e={version:this.version,keyEncryptionAlgorithm:this.keyEncryptionAlgorithm.toJSON(),encryptedKey:this.encryptedKey.toJSON()};return this.keyDerivationAlgorithm&&(e.keyDerivationAlgorithm=this.keyDerivationAlgorithm.toJSON()),e}};XC.CLASS_NAME="PasswordRecipientInfo";var km="oriType",Ah="oriValue",O0e=[km,Ah],BR=class ix extends Re{static{o(this,"OtherRecipientInfo")}constructor(e={}){super(),this.oriType=O(e,km,ix.defaultValues(km)),this.oriValue=O(e,Ah,ix.defaultValues(Ah)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case km:return V;case Ah:return{};default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case km:return t===V;case Ah:return Object.keys(t).length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new ot({name:t.oriType||V}),new bt({name:t.oriValue||V})]})}fromSchema(e){ke(e,O0e);let t=Be(e,e,ix.schema({names:{oriType:km,oriValue:Ah}}));Te.assertSchema(t,this.className),this.oriType=t.result.oriType.valueBlock.toString(),this.oriValue=t.result.oriValue}toSchema(){return new J({value:[new ot({value:this.oriType}),this.oriValue]})}toJSON(){let e={oriType:this.oriType};return ix.compareWithDefault(Ah,this.oriValue)||(e.oriValue=this.oriValue.toJSON()),e}};BR.CLASS_NAME="OtherRecipientInfo";var fA="variant",ny="value",P0e=["blockName"],Ch=class ax extends Re{static{o(this,"RecipientInfo")}constructor(e={}){super(),this.variant=O(e,fA,ax.defaultValues(fA)),ny in e&&(this.value=O(e,ny,ax.defaultValues(ny))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case fA:return-1;case ny:return{};default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case fA:return t===ax.defaultValues(e);case ny:return Object.keys(t).length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new Mr({value:[MC.schema({names:{blockName:t.blockName||V}}),new fe({name:t.blockName||V,idBlock:{tagClass:3,tagNumber:1},value:$C.schema().valueBlock.value}),new fe({name:t.blockName||V,idBlock:{tagClass:3,tagNumber:2},value:GC.schema().valueBlock.value}),new fe({name:t.blockName||V,idBlock:{tagClass:3,tagNumber:3},value:XC.schema().valueBlock.value}),new fe({name:t.blockName||V,idBlock:{tagClass:3,tagNumber:4},value:BR.schema().valueBlock.value})]})}fromSchema(e){ke(e,P0e);let t=Be(e,e,ax.schema({names:{blockName:"blockName"}}));if(Te.assertSchema(t,this.className),t.result.blockName.idBlock.tagClass===1)this.variant=1,this.value=new MC({schema:t.result.blockName});else{let n=new J({value:t.result.blockName.valueBlock.value});switch(t.result.blockName.idBlock.tagNumber){case 1:this.variant=2,this.value=new $C({schema:n});break;case 2:this.variant=3,this.value=new GC({schema:n});break;case 3:this.variant=4,this.value=new XC({schema:n});break;case 4:this.variant=5,this.value=new BR({schema:n});break;default:throw new Error("Incorrect structure of RecipientInfo block")}}}toSchema(){gr.assertEmpty(this.value,"value","RecipientInfo");let e=this.value.toSchema();switch(this.variant){case 1:return e;case 2:case 3:case 4:return e.idBlock.tagClass=3,e.idBlock.tagNumber=this.variant-1,e;default:return new bt}}toJSON(){let e={variant:this.variant};return this.value&&this.variant>=1&&this.variant<=4&&(e.value=this.value.toJSON()),e}};Ch.CLASS_NAME="RecipientInfo";var pl="hashAlgorithm",dl="maskGenAlgorithm",ml="pSourceAlgorithm",k0e=[pl,dl,ml],nC=class Na extends Re{static{o(this,"RSAESOAEPParams")}constructor(e={}){super(),this.hashAlgorithm=O(e,pl,Na.defaultValues(pl)),this.maskGenAlgorithm=O(e,dl,Na.defaultValues(dl)),this.pSourceAlgorithm=O(e,ml,Na.defaultValues(ml)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case pl:return new we({algorithmId:"1.3.14.3.2.26",algorithmParams:new tn});case dl:return new we({algorithmId:"1.2.840.113549.1.1.8",algorithmParams:new we({algorithmId:"1.3.14.3.2.26",algorithmParams:new tn}).toSchema()});case ml:return new we({algorithmId:"1.2.840.113549.1.1.9",algorithmParams:new qe({valueHex:new Uint8Array([218,57,163,238,94,107,75,13,50,85,191,239,149,96,24,144,175,216,7,9]).buffer})});default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new fe({idBlock:{tagClass:3,tagNumber:0},optional:!0,value:[we.schema(t.hashAlgorithm||{})]}),new fe({idBlock:{tagClass:3,tagNumber:1},optional:!0,value:[we.schema(t.maskGenAlgorithm||{})]}),new fe({idBlock:{tagClass:3,tagNumber:2},optional:!0,value:[we.schema(t.pSourceAlgorithm||{})]})]})}fromSchema(e){ke(e,k0e);let t=Be(e,e,Na.schema({names:{hashAlgorithm:{names:{blockName:pl}},maskGenAlgorithm:{names:{blockName:dl}},pSourceAlgorithm:{names:{blockName:ml}}}}));Te.assertSchema(t,this.className),pl in t.result&&(this.hashAlgorithm=new we({schema:t.result.hashAlgorithm})),dl in t.result&&(this.maskGenAlgorithm=new we({schema:t.result.maskGenAlgorithm})),ml in t.result&&(this.pSourceAlgorithm=new we({schema:t.result.pSourceAlgorithm}))}toSchema(){let e=[];return this.hashAlgorithm.isEqual(Na.defaultValues(pl))||e.push(new fe({idBlock:{tagClass:3,tagNumber:0},value:[this.hashAlgorithm.toSchema()]})),this.maskGenAlgorithm.isEqual(Na.defaultValues(dl))||e.push(new fe({idBlock:{tagClass:3,tagNumber:1},value:[this.maskGenAlgorithm.toSchema()]})),this.pSourceAlgorithm.isEqual(Na.defaultValues(ml))||e.push(new fe({idBlock:{tagClass:3,tagNumber:2},value:[this.pSourceAlgorithm.toSchema()]})),new J({value:e})}toJSON(){let e={};return this.hashAlgorithm.isEqual(Na.defaultValues(pl))||(e.hashAlgorithm=this.hashAlgorithm.toJSON()),this.maskGenAlgorithm.isEqual(Na.defaultValues(dl))||(e.maskGenAlgorithm=this.maskGenAlgorithm.toJSON()),this.pSourceAlgorithm.isEqual(Na.defaultValues(ml))||(e.pSourceAlgorithm=this.pSourceAlgorithm.toJSON()),e}};nC.CLASS_NAME="RSAESOAEPParams";var Lm="keyInfo",gl="entityUInfo",Vm="suppPubInfo",L0e=[Lm,gl,Vm],RR=class Um extends Re{static{o(this,"ECCCMSSharedInfo")}constructor(e={}){super(),this.keyInfo=O(e,Lm,Um.defaultValues(Lm)),gl in e&&(this.entityUInfo=O(e,gl,Um.defaultValues(gl))),this.suppPubInfo=O(e,Vm,Um.defaultValues(Vm)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Lm:return new we;case gl:return new qe;case Vm:return new qe;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Lm:case gl:case Vm:return t.isEqual(Um.defaultValues(e));default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[we.schema(t.keyInfo||{}),new fe({name:t.entityUInfo||V,idBlock:{tagClass:3,tagNumber:0},optional:!0,value:[new qe]}),new fe({name:t.suppPubInfo||V,idBlock:{tagClass:3,tagNumber:2},value:[new qe]})]})}fromSchema(e){ke(e,L0e);let t=Be(e,e,Um.schema({names:{keyInfo:{names:{blockName:Lm}},entityUInfo:gl,suppPubInfo:Vm}}));Te.assertSchema(t,this.className),this.keyInfo=new we({schema:t.result.keyInfo}),gl in t.result&&(this.entityUInfo=t.result.entityUInfo.valueBlock.value[0]),this.suppPubInfo=t.result.suppPubInfo.valueBlock.value[0]}toSchema(){let e=[];return e.push(this.keyInfo.toSchema()),this.entityUInfo&&e.push(new fe({idBlock:{tagClass:3,tagNumber:0},value:[this.entityUInfo]})),e.push(new fe({idBlock:{tagClass:3,tagNumber:2},value:[this.suppPubInfo]})),new J({value:e})}toJSON(){let e={keyInfo:this.keyInfo.toJSON(),suppPubInfo:this.suppPubInfo.toJSON()};return this.entityUInfo&&(e.entityUInfo=this.entityUInfo.toJSON()),e}};RR.CLASS_NAME="ECCCMSSharedInfo";var jm="version",vl="originatorInfo",Fm="recipientInfos",Mm="encryptedContentInfo",yl="unprotectedAttrs",V0e=[jm,vl,Fm,Mm,yl],T7={kdfAlgorithm:"SHA-512",kekEncryptionLength:256},U0e={"P-256":256,"P-384":384,"P-521":528},OR=class xl extends Re{static{o(this,"EnvelopedData")}constructor(e={}){super(),this.version=O(e,jm,xl.defaultValues(jm)),vl in e&&(this.originatorInfo=O(e,vl,xl.defaultValues(vl))),this.recipientInfos=O(e,Fm,xl.defaultValues(Fm)),this.encryptedContentInfo=O(e,Mm,xl.defaultValues(Mm)),yl in e&&(this.unprotectedAttrs=O(e,yl,xl.defaultValues(yl))),this.policy={disableSplit:!!e.disableSplit},e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case jm:return 0;case vl:return new YA;case Fm:return[];case Mm:return new gs;case yl:return[];default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case jm:return t===xl.defaultValues(e);case vl:return t.certs.certificates.length===0&&t.crls.crls.length===0;case Fm:case yl:return t.length===0;case Mm:return gs.compareWithDefault("contentType",t.contentType)&&gs.compareWithDefault("contentEncryptionAlgorithm",t.contentEncryptionAlgorithm)&&gs.compareWithDefault("encryptedContent",t.encryptedContent);default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new xe({name:t.version||V}),new fe({name:t.originatorInfo||V,optional:!0,idBlock:{tagClass:3,tagNumber:0},value:YA.schema().valueBlock.value}),new rn({value:[new Bt({name:t.recipientInfos||V,value:Ch.schema()})]}),gs.schema(t.encryptedContentInfo||{}),new fe({optional:!0,idBlock:{tagClass:3,tagNumber:1},value:[new Bt({name:t.unprotectedAttrs||V,value:pn.schema()})]})]})}fromSchema(e){ke(e,V0e);let t=Be(e,e,xl.schema({names:{version:jm,originatorInfo:vl,recipientInfos:Fm,encryptedContentInfo:{names:{blockName:Mm}},unprotectedAttrs:yl}}));Te.assertSchema(t,this.className),this.version=t.result.version.valueBlock.valueDec,vl in t.result&&(this.originatorInfo=new YA({schema:new J({value:t.result.originatorInfo.valueBlock.value})})),this.recipientInfos=Array.from(t.result.recipientInfos,n=>new Ch({schema:n})),this.encryptedContentInfo=new gs({schema:t.result.encryptedContentInfo}),yl in t.result&&(this.unprotectedAttrs=Array.from(t.result.unprotectedAttrs,n=>new pn({schema:n})))}toSchema(){let e=[];return e.push(new xe({value:this.version})),this.originatorInfo&&e.push(new fe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:this.originatorInfo.toSchema().valueBlock.value})),e.push(new rn({value:Array.from(this.recipientInfos,t=>t.toSchema())})),e.push(this.encryptedContentInfo.toSchema()),this.unprotectedAttrs&&e.push(new fe({optional:!0,idBlock:{tagClass:3,tagNumber:1},value:Array.from(this.unprotectedAttrs,t=>t.toSchema())})),new J({value:e})}toJSON(){let e={version:this.version,recipientInfos:Array.from(this.recipientInfos,t=>t.toJSON()),encryptedContentInfo:this.encryptedContentInfo.toJSON()};return this.originatorInfo&&(e.originatorInfo=this.originatorInfo.toJSON()),this.unprotectedAttrs&&(e.unprotectedAttrs=Array.from(this.unprotectedAttrs,t=>t.toJSON())),e}addRecipientByCertificate(e,t,n,s=kt(!0)){let i=Object.assign({useOAEP:!0,oaepHashAlgorithm:"SHA-512"},T7,t||{});if(e.subjectPublicKeyInfo.algorithm.algorithmId.indexOf("1.2.840.113549")!==-1)n=1;else if(e.subjectPublicKeyInfo.algorithm.algorithmId.indexOf("1.2.840.10045")!==-1)n=2;else throw new Error(`Unknown type of certificate's public key: ${e.subjectPublicKeyInfo.algorithm.algorithmId}`);switch(n){case 1:{let a,u;if(i.useOAEP===!0){a=s.getOIDByAlgorithm({name:"RSA-OAEP"},!0,"keyEncryptionAlgorithm");let l=s.getOIDByAlgorithm({name:i.oaepHashAlgorithm},!0,"RSAES-OAEP-params"),h=new we({algorithmId:l,algorithmParams:new tn});u=new nC({hashAlgorithm:h,maskGenAlgorithm:new we({algorithmId:"1.2.840.113549.1.1.8",algorithmParams:h.toSchema()})}).toSchema()}else{if(a=s.getOIDByAlgorithm({name:"RSAES-PKCS1-v1_5"}),a===V)throw new Error("Can not find OID for RSAES-PKCS1-v1_5");u=new tn}let c=new MC({version:0,rid:new ns({issuer:e.issuer,serialNumber:e.serialNumber}),keyEncryptionAlgorithm:new we({algorithmId:a,algorithmParams:u}),recipientCertificate:e});this.recipientInfos.push(new Ch({variant:1,value:c}))}break;case 2:{let a=new C0({variant:1,value:new ns({issuer:e.issuer,serialNumber:e.serialNumber})});this._addKeyAgreeRecipientInfo(a,i,{recipientCertificate:e},s)}break;default:throw new Error(`Unknown "variant" value: ${n}`)}return!0}addRecipientByPreDefinedData(e,t={},n,s=kt(!0)){if(Ir.assert(e,"preDefinedData","ArrayBuffer"),!e.byteLength)throw new Error("Pre-defined data could have zero length");if(!t.keyIdentifier){let i=new ArrayBuffer(16),a=new Uint8Array(i);s.getRandomValues(a),t.keyIdentifier=i}switch(t.hmacHashAlgorithm||(t.hmacHashAlgorithm="SHA-512"),t.iterationCount===void 0&&(t.iterationCount=2048),t.keyEncryptionAlgorithm||(t.keyEncryptionAlgorithm={name:"AES-KW",length:256}),t.keyEncryptionAlgorithmParams||(t.keyEncryptionAlgorithmParams=new tn),n){case 1:{let i=s.getOIDByAlgorithm(t.keyEncryptionAlgorithm,!0,"keyEncryptionAlgorithm"),a=new GC({version:4,kekid:new Lx({keyIdentifier:new qe({valueHex:t.keyIdentifier})}),keyEncryptionAlgorithm:new we({algorithmId:i,algorithmParams:t.keyEncryptionAlgorithmParams}),preDefinedKEK:e});this.recipientInfos.push(new Ch({variant:3,value:a}))}break;case 2:{let i=s.getOIDByAlgorithm({name:"PBKDF2"},!0,"keyDerivationAlgorithm"),a=new ArrayBuffer(64),u=new Uint8Array(a);s.getRandomValues(u);let c=s.getOIDByAlgorithm({name:"HMAC",hash:{name:t.hmacHashAlgorithm}},!0,"hmacHashAlgorithm"),l=new A0({salt:new qe({valueHex:a}),iterationCount:t.iterationCount,prf:new we({algorithmId:c,algorithmParams:new tn})}),h=s.getOIDByAlgorithm(t.keyEncryptionAlgorithm,!0,"keyEncryptionAlgorithm"),m=new XC({version:0,keyDerivationAlgorithm:new we({algorithmId:i,algorithmParams:l.toSchema()}),keyEncryptionAlgorithm:new we({algorithmId:h,algorithmParams:t.keyEncryptionAlgorithmParams}),password:e});this.recipientInfos.push(new Ch({variant:4,value:m}))}break;default:throw new Error(`Unknown value for "variant": ${n}`)}}addRecipientByKeyIdentifier(e,t,n,s=kt(!0)){let i=Object.assign({},T7,n||{}),a=new C0({variant:2,value:new HC({subjectKeyIdentifier:new qe({valueHex:t})})});this._addKeyAgreeRecipientInfo(a,i,{recipientPublicKey:e},s)}_addKeyAgreeRecipientInfo(e,t,n,s=kt(!0)){let i=new KC({rid:e}),a=s.getOIDByAlgorithm({name:"AES-KW",length:t.kekEncryptionLength},!0,"keyEncryptionAlgorithm"),u=new we({algorithmId:a}),c=s.getOIDByAlgorithm({name:"ECDH",kdf:t.kdfAlgorithm},!0,"KeyAgreeRecipientInfo"),l=new ArrayBuffer(64),h=new Uint8Array(l);s.getRandomValues(h);let m={version:3,ukm:new qe({valueHex:l}),keyEncryptionAlgorithm:new we({algorithmId:c,algorithmParams:u.toSchema()}),recipientEncryptedKeys:new kx({encryptedKeys:[i]})},g=new $C(Object.assign(m,n));this.recipientInfos.push(new Ch({variant:2,value:g}))}async encrypt(e,t,n=kt(!0)){let s=new ArrayBuffer(16),i=new Uint8Array(s);n.getRandomValues(i);let a=new Uint8Array(t),u=n.getOIDByAlgorithm(e,!0,"contentEncryptionAlgorithm"),c=await n.generateKey(e,!0,["encrypt"]),l=await n.encrypt({name:e.name,iv:i},c,a),h=await n.exportKey("raw",c);this.version=2,this.encryptedContentInfo=new gs({disableSplit:this.policy.disableSplit,contentType:"1.2.840.113549.1.7.1",contentEncryptionAlgorithm:new we({algorithmId:u,algorithmParams:new qe({valueHex:s})}),encryptedContent:new qe({valueHex:l})});let m=o(async w=>{let C=this.recipientInfos[w].value,_,b;if(C.recipientPublicKey)_=C.recipientPublicKey.algorithm.namedCurve,b=C.recipientPublicKey;else if(C.recipientCertificate){let ne=C.recipientCertificate.subjectPublicKeyInfo.algorithm.algorithmParams;if(ne.constructor.blockName()!==ot.blockName())throw new Error(`Incorrect "recipientCertificate" for index ${w}`);switch(ne.valueBlock.toString()){case"1.2.840.10045.3.1.7":_="P-256";break;case"1.3.132.0.34":_="P-384";break;case"1.3.132.0.35":_="P-521";break;default:throw new Error(`Incorrect curve OID for index ${w}`)}b=await C.recipientCertificate.getPublicKey({algorithm:{algorithm:{name:"ECDH",namedCurve:_},usages:[]}},n)}else throw new Error("Unsupported RecipientInfo");let A=U0e[_],T=await n.generateKey({name:"ECDH",namedCurve:_},!0,["deriveBits"]),B=await n.exportKey("spki",T.publicKey),M=await n.deriveBits({name:"ECDH",public:b},T.privateKey,A),I=new we({schema:C.keyEncryptionAlgorithm.algorithmParams}),H=n.getAlgorithmByOID(I.algorithmId,!0,"aesKWAlgorithm"),K=H.length,q=new ArrayBuffer(4),W=new Uint8Array(q);for(let ne=3;ne>=0;ne--)W[ne]=K,K>>=8;let pe=new RR({keyInfo:new we({algorithmId:I.algorithmId}),entityUInfo:C.ukm,suppPubInfo:new qe({valueHex:q})}).toSchema().toBER(!1),ue=n.getAlgorithmByOID(C.keyEncryptionAlgorithm.algorithmId,!0,"ecdhAlgorithm"),Y=await d7(ue.kdf,M,H.length,pe,n),ve=await n.importKey("raw",Y,{name:"AES-KW"},!0,["wrapKey"]),Oe=await n.wrapKey("raw",c,ve,{name:"AES-KW"}),Je=new Px;return Je.variant=3,Je.value=qC.fromBER(B),C.originator=Je,C.recipientEncryptedKeys.encryptedKeys[0].encryptedKey=new qe({valueHex:Oe}),{ecdhPrivateKey:T.privateKey}},"SubKeyAgreeRecipientInfo"),g=o(async w=>{let C=this.recipientInfos[w].value,_=n.getAlgorithmByOID(C.keyEncryptionAlgorithm.algorithmId,!0,"keyEncryptionAlgorithm");if(_.name==="RSA-OAEP"){let b=C.keyEncryptionAlgorithm.algorithmParams,A=new nC({schema:b});if(_.hash=n.getAlgorithmByOID(A.hashAlgorithm.algorithmId),!("name"in _.hash))throw new Error(`Incorrect OID for hash algorithm: ${A.hashAlgorithm.algorithmId}`)}try{let b=await C.recipientCertificate.getPublicKey({algorithm:{algorithm:_,usages:["encrypt","wrapKey"]}},n),A=await n.encrypt(b.algorithm,b,h);C.encryptedKey=new qe({valueHex:A})}catch{}},"SubKeyTransRecipientInfo"),y=o(async w=>{let C=this.recipientInfos[w].value,_=n.getAlgorithmByOID(C.keyEncryptionAlgorithm.algorithmId,!0,"kekAlgorithm"),b=await n.importKey("raw",new Uint8Array(C.preDefinedKEK),_,!0,["wrapKey"]),A=await n.wrapKey("raw",c,b,_);C.encryptedKey=new qe({valueHex:A})},"SubKEKRecipientInfo"),v=o(async w=>{let C=this.recipientInfos[w].value,_;if(!C.keyDerivationAlgorithm)throw new Error('Please append encoded "keyDerivationAlgorithm"');if(!C.keyDerivationAlgorithm.algorithmParams)throw new Error('Incorrectly encoded "keyDerivationAlgorithm"');try{_=new A0({schema:C.keyDerivationAlgorithm.algorithmParams})}catch{throw new Error('Incorrectly encoded "keyDerivationAlgorithm"')}let b=new Uint8Array(C.password),A=await n.importKey("raw",b,"PBKDF2",!1,["deriveKey"]),T=n.getAlgorithmByOID(C.keyEncryptionAlgorithm.algorithmId,!0,"kekAlgorithm"),B="SHA-1";_.prf&&(B=n.getAlgorithmByOID(_.prf.algorithmId,!0,"prfAlgorithm").hash.name);let M=new Uint8Array(_.salt.valueBlock.valueHex),I=_.iterationCount,H=await n.deriveKey({name:"PBKDF2",hash:{name:B},salt:M,iterations:I},A,T,!0,["wrapKey"]),K=await n.wrapKey("raw",c,H,T);C.encryptedKey=new qe({valueHex:K})},"SubPasswordRecipientinfo"),E=[];for(let w=0;w<this.recipientInfos.length;w++)switch(this.recipientInfos[w].variant){case 1:E.push(await g(w));break;case 2:E.push(await m(w));break;case 3:E.push(await y(w));break;case 4:E.push(await v(w));break;default:throw new Error(`Unknown recipient type in array with index ${w}`)}return E}async decrypt(e,t,n=kt(!0)){let s=t||{};if(e+1>this.recipientInfos.length)throw new Error(`Maximum value for "index" is: ${this.recipientInfos.length-1}`);let i=o(async E=>{let w=this.recipientInfos[E].value,C,_,b,A=w.originator;if(s.recipientCertificate){let ue=s.recipientCertificate.subjectPublicKeyInfo.algorithm.algorithmParams;if(ue.constructor.blockName()!==ot.blockName())throw new Error(`Incorrect "recipientCertificate" for index ${E}`);C=ue.valueBlock.toString()}else if(A.value.algorithm.algorithmParams){let ue=A.value.algorithm.algorithmParams;if(ue.constructor.blockName()!==ot.blockName())throw new Error(`Incorrect originator for index ${E}`);C=ue.valueBlock.toString()}else throw new Error('Parameter "recipientCertificate" is mandatory for "KeyAgreeRecipientInfo" if algorithm params are missing from originator');if(!s.recipientPrivateKey)throw new Error('Parameter "recipientPrivateKey" is mandatory for "KeyAgreeRecipientInfo"');switch(C){case"1.2.840.10045.3.1.7":_="P-256",b=256;break;case"1.3.132.0.34":_="P-384",b=384;break;case"1.3.132.0.35":_="P-521",b=528;break;default:throw new Error(`Incorrect curve OID for index ${E}`)}let T,B=n;vt.isBufferSource(s.recipientPrivateKey)?T=await n.importKey("pkcs8",s.recipientPrivateKey,{name:"ECDH",namedCurve:_},!0,["deriveBits"]):(T=s.recipientPrivateKey,"crypto"in s&&s.crypto&&(B=s.crypto.subtle)),"algorithmParams"in A.value.algorithm||(A.value.algorithm.algorithmParams=new ot({value:C}));let M=A.value.toSchema().toBER(!1),I=await n.importKey("spki",M,{name:"ECDH",namedCurve:_},!0,[]),H=await B.deriveBits({name:"ECDH",public:I},T,b);async function K(ue){ue=ue||!1;let Y=new we({schema:w.keyEncryptionAlgorithm.algorithmParams}),ve=n.getAlgorithmByOID(Y.algorithmId,!0,"kwAlgorithm"),Oe=ve.length,Je=new ArrayBuffer(4),ne=new Uint8Array(Je);for(let rt=3;rt>=0;rt--)ne[rt]=Oe,Oe>>=8;let Z={algorithmId:Y.algorithmId};ue&&(Z.algorithmParams=new tn);let He=new RR({keyInfo:new we(Z),entityUInfo:w.ukm,suppPubInfo:new qe({valueHex:Je})}).toSchema().toBER(!1),Le=n.getAlgorithmByOID(w.keyEncryptionAlgorithm.algorithmId,!0,"ecdhAlgorithm");if(!Le.name)throw new Error(`Incorrect OID for key encryption algorithm: ${w.keyEncryptionAlgorithm.algorithmId}`);return d7(Le.kdf,H,ve.length,He,n)}o(K,"applyKDF");let q=await K(),W=o(async ue=>n.importKey("raw",ue,{name:"AES-KW"},!0,["unwrapKey"]),"importAesKwKey"),he=await W(q),pe=o(async ue=>{let Y=this.encryptedContentInfo.contentEncryptionAlgorithm.algorithmId,ve=n.getAlgorithmByOID(Y,!0,"contentEncryptionAlgorithm");return n.unwrapKey("raw",w.recipientEncryptedKeys.encryptedKeys[0].encryptedKey.valueBlock.valueHexView,ue,{name:"AES-KW"},ve,!0,["decrypt"])},"unwrapSessionKey");try{return await pe(he)}catch{let ue=await K(!0),Y=await W(ue);return pe(Y)}},"SubKeyAgreeRecipientInfo"),a=o(async E=>{let w=this.recipientInfos[E].value;if(!s.recipientPrivateKey)throw new Error('Parameter "recipientPrivateKey" is mandatory for "KeyTransRecipientInfo"');let C=n.getAlgorithmByOID(w.keyEncryptionAlgorithm.algorithmId,!0,"keyEncryptionAlgorithm");if(C.name==="RSA-OAEP"){let M=w.keyEncryptionAlgorithm.algorithmParams,I=new nC({schema:M});if(C.hash=n.getAlgorithmByOID(I.hashAlgorithm.algorithmId),!("name"in C.hash))throw new Error(`Incorrect OID for hash algorithm: ${I.hashAlgorithm.algorithmId}`)}let _,b=n;vt.isBufferSource(s.recipientPrivateKey)?_=await n.importKey("pkcs8",s.recipientPrivateKey,C,!0,["decrypt"]):(_=s.recipientPrivateKey,"crypto"in s&&s.crypto&&(b=s.crypto.subtle));let A=await b.decrypt(_.algorithm,_,w.encryptedKey.valueBlock.valueHexView),T=this.encryptedContentInfo.contentEncryptionAlgorithm.algorithmId,B=n.getAlgorithmByOID(T,!0,"contentEncryptionAlgorithm");if(!("name"in B))throw new Error(`Incorrect "contentEncryptionAlgorithm": ${T}`);return n.importKey("raw",A,B,!0,["decrypt"])},"SubKeyTransRecipientInfo"),u=o(async E=>{let w=this.recipientInfos[E].value;if(!s.preDefinedData)throw new Error('Parameter "preDefinedData" is mandatory for "KEKRecipientInfo"');let C=n.getAlgorithmByOID(w.keyEncryptionAlgorithm.algorithmId,!0,"kekAlgorithm"),_=await n.importKey("raw",s.preDefinedData,C,!0,["unwrapKey"]),b=this.encryptedContentInfo.contentEncryptionAlgorithm.algorithmId,A=n.getAlgorithmByOID(b,!0,"contentEncryptionAlgorithm");if(!A.name)throw new Error(`Incorrect "contentEncryptionAlgorithm": ${b}`);return n.unwrapKey("raw",w.encryptedKey.valueBlock.valueHexView,_,C,A,!0,["decrypt"])},"SubKEKRecipientInfo"),c=o(async E=>{let w=this.recipientInfos[E].value,C;if(!s.preDefinedData)throw new Error('Parameter "preDefinedData" is mandatory for "KEKRecipientInfo"');if(!w.keyDerivationAlgorithm)throw new Error('Please append encoded "keyDerivationAlgorithm"');if(!w.keyDerivationAlgorithm.algorithmParams)throw new Error('Incorrectly encoded "keyDerivationAlgorithm"');try{C=new A0({schema:w.keyDerivationAlgorithm.algorithmParams})}catch{throw new Error('Incorrectly encoded "keyDerivationAlgorithm"')}let _=await n.importKey("raw",s.preDefinedData,"PBKDF2",!1,["deriveKey"]),b=n.getAlgorithmByOID(w.keyEncryptionAlgorithm.algorithmId,!0,"keyEncryptionAlgorithm"),A=C.prf?n.getAlgorithmByOID(C.prf.algorithmId,!0,"prfAlgorithm").hash.name:"SHA-1",T=new Uint8Array(C.salt.valueBlock.valueHex),B=C.iterationCount,M=await n.deriveKey({name:"PBKDF2",hash:{name:A},salt:T,iterations:B},_,b,!0,["unwrapKey"]),I=this.encryptedContentInfo.contentEncryptionAlgorithm.algorithmId,H=n.getAlgorithmByOID(I,!0,"contentEncryptionAlgorithm");return n.unwrapKey("raw",w.encryptedKey.valueBlock.valueHexView,M,b,H,!0,["decrypt"])},"SubPasswordRecipientinfo"),l;switch(this.recipientInfos[e].variant){case 1:l=await a(e);break;case 2:l=await i(e);break;case 3:l=await u(e);break;case 4:l=await c(e);break;default:throw new Error(`Unknown recipient type in array with index ${e}`)}let h=this.encryptedContentInfo.contentEncryptionAlgorithm.algorithmId,m=n.getAlgorithmByOID(h,!0,"contentEncryptionAlgorithm"),g=this.encryptedContentInfo.contentEncryptionAlgorithm.algorithmParams.valueBlock.valueHex,y=new Uint8Array(g);if(!this.encryptedContentInfo.encryptedContent)throw new Error("Required property `encryptedContent` is empty");let v=this.encryptedContentInfo.getEncryptedContent();return n.decrypt({name:m.name,iv:y},l,v)}};OR.CLASS_NAME="EnvelopedData";var Fd="safeContents",sy="parsedValue",I7="contentInfos",PR=class sC extends Re{static{o(this,"AuthenticatedSafe")}constructor(e={}){super(),this.safeContents=O(e,Fd,sC.defaultValues(Fd)),sy in e&&(this.parsedValue=O(e,sy,sC.defaultValues(sy))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Fd:return[];case sy:return{};default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Fd:return t.length===0;case sy:return t instanceof Object&&Object.keys(t).length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new Bt({name:t.contentInfos||V,value:sn.schema()})]})}fromSchema(e){ke(e,[I7]);let t=Be(e,e,sC.schema({names:{contentInfos:I7}}));Te.assertSchema(t,this.className),this.safeContents=Array.from(t.result.contentInfos,n=>new sn({schema:n}))}toSchema(){return new J({value:Array.from(this.safeContents,e=>e.toSchema())})}toJSON(){return{safeContents:Array.from(this.safeContents,e=>e.toJSON())}}async parseInternalValues(e,t=kt(!0)){if(gr.assert(e,Fd),Ir.assert(e.safeContents,Fd,"Array"),e.safeContents.length!==this.safeContents.length)throw new Ir('Length of "parameters.safeContents" must be equal to "this.safeContents.length"');this.parsedValue={safeContents:[]};for(let[n,s]of this.safeContents.entries()){let i=e.safeContents[n],a=`parameters.safeContents[${n}]`;switch(s.contentType){case aO:{Ir.assert(s.content,"this.safeContents[j].content",qe);let u=s.content.getValue();this.parsedValue.safeContents.push({privacyMode:0,value:b0.fromBER(u)})}break;case q7:{let u=new OR({schema:s.content});gr.assert(a,i,"recipientCertificate","recipientKey");let c=i,l=c.recipientCertificate,h=c.recipientKey,m=await u.decrypt(0,{recipientCertificate:l,recipientPrivateKey:h},t);this.parsedValue.safeContents.push({privacyMode:2,value:b0.fromBER(m)})}break;case H7:{let u=new Mx({schema:s.content});gr.assert(a,i,"password");let c=i.password,l=await u.decrypt({password:c},t);this.parsedValue.safeContents.push({privacyMode:1,value:b0.fromBER(l)})}break;default:throw new Error(`Unknown "contentType" for AuthenticatedSafe: " ${s.contentType}`)}}}async makeInternalValues(e,t=kt(!0)){if(!this.parsedValue)throw new Error('Please run "parseValues" first or add "parsedValue" manually');if(Ir.assert(this.parsedValue,"this.parsedValue","object"),Ir.assert(this.parsedValue.safeContents,"this.parsedValue.safeContents","Array"),Ir.assert(e,"parameters","object"),gr.assert(e,"safeContents"),Ir.assert(e.safeContents,"parameters.safeContents","Array"),e.safeContents.length!==this.parsedValue.safeContents.length)throw new Ir('Length of "parameters.safeContents" must be equal to "this.parsedValue.safeContents"');this.safeContents=[];for(let[n,s]of this.parsedValue.safeContents.entries())switch(gr.assert("content",s,"privacyMode","value"),Ir.assert(s.value,"content.value",b0),s.privacyMode){case 0:{let i=s.value.toSchema().toBER(!1);this.safeContents.push(new sn({contentType:"1.2.840.113549.1.7.1",content:new qe({valueHex:i})}))}break;case 1:{let i=new Mx,a=e.safeContents[n];a.contentToEncrypt=s.value.toSchema().toBER(!1),await i.encrypt(a,t),this.safeContents.push(new sn({contentType:"1.2.840.113549.1.7.6",content:i.toSchema()}))}break;case 2:{let i=new OR,a=s.value.toSchema().toBER(!1),u=e.safeContents[n];switch(gr.assert(`parameters.safeContents[${n}]`,u,"encryptingCertificate","encryptionAlgorithm"),!0){case u.encryptionAlgorithm.name.toLowerCase()==="aes-cbc":case u.encryptionAlgorithm.name.toLowerCase()==="aes-gcm":break;default:throw new Error(`Incorrect parameter "encryptionAlgorithm" in "parameters.safeContents[i]": ${u.encryptionAlgorithm}`)}switch(!0){case u.encryptionAlgorithm.length===128:case u.encryptionAlgorithm.length===192:case u.encryptionAlgorithm.length===256:break;default:throw new Error(`Incorrect parameter "encryptionAlgorithm.length" in "parameters.safeContents[i]": ${u.encryptionAlgorithm.length}`)}let c=u.encryptionAlgorithm;i.addRecipientByCertificate(u.encryptingCertificate,{},void 0,t),await i.encrypt(c,a,t),this.safeContents.push(new sn({contentType:"1.2.840.113549.1.7.3",content:i.toSchema()}))}break;default:throw new Error(`Incorrect value for "content.privacyMode": ${s.privacyMode}`)}return this}};PR.CLASS_NAME="AuthenticatedSafe";var Nh="hashAlgorithm",qm="issuerNameHash",Hm="issuerKeyHash",Th="serialNumber",j0e=[Nh,qm,Hm,Th],yi=class wl extends Re{static{o(this,"CertID")}static async create(e,t,n=kt(!0)){let s=new wl;return await s.createForCertificate(e,t,n),s}constructor(e={}){super(),this.hashAlgorithm=O(e,Nh,wl.defaultValues(Nh)),this.issuerNameHash=O(e,qm,wl.defaultValues(qm)),this.issuerKeyHash=O(e,Hm,wl.defaultValues(Hm)),this.serialNumber=O(e,Th,wl.defaultValues(Th)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Nh:return new we;case qm:case Hm:return new qe;case Th:return new xe;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Nh:return t.algorithmId===V&&!("algorithmParams"in t);case qm:case Hm:case Th:return t.isEqual(wl.defaultValues(Th));default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[we.schema(t.hashAlgorithmObject||{names:{blockName:t.hashAlgorithm||V}}),new qe({name:t.issuerNameHash||V}),new qe({name:t.issuerKeyHash||V}),new xe({name:t.serialNumber||V})]})}fromSchema(e){ke(e,j0e);let t=Be(e,e,wl.schema({names:{hashAlgorithm:Nh,issuerNameHash:qm,issuerKeyHash:Hm,serialNumber:Th}}));Te.assertSchema(t,this.className),this.hashAlgorithm=new we({schema:t.result.hashAlgorithm}),this.issuerNameHash=t.result.issuerNameHash,this.issuerKeyHash=t.result.issuerKeyHash,this.serialNumber=t.result.serialNumber}toSchema(){return new J({value:[this.hashAlgorithm.toSchema(),this.issuerNameHash,this.issuerKeyHash,this.serialNumber]})}toJSON(){return{hashAlgorithm:this.hashAlgorithm.toJSON(),issuerNameHash:this.issuerNameHash.toJSON(),issuerKeyHash:this.issuerKeyHash.toJSON(),serialNumber:this.serialNumber.toJSON()}}isEqual(e){return!(this.hashAlgorithm.algorithmId!==e.hashAlgorithm.algorithmId||!vt.isEqual(this.issuerNameHash.valueBlock.valueHexView,e.issuerNameHash.valueBlock.valueHexView)||!vt.isEqual(this.issuerKeyHash.valueBlock.valueHexView,e.issuerKeyHash.valueBlock.valueHexView)||!this.serialNumber.isEqual(e.serialNumber))}async createForCertificate(e,t,n=kt(!0)){gr.assert(t,Nh,"issuerCertificate");let s=n.getOIDByAlgorithm({name:t.hashAlgorithm},!0,"hashAlgorithm");this.hashAlgorithm=new we({algorithmId:s,algorithmParams:new tn});let i=t.issuerCertificate;this.serialNumber=e.serialNumber;let a=await n.digest({name:t.hashAlgorithm},i.subject.toSchema().toBER(!1));this.issuerNameHash=new qe({valueHex:a});let u=i.subjectPublicKeyInfo.subjectPublicKey.valueBlock.valueHexView,c=await n.digest({name:t.hashAlgorithm},u);this.issuerKeyHash=new qe({valueHex:c})}};yi.CLASS_NAME="CertID";var Km="certID",$m="certStatus",Gm="thisUpdate",El="nextUpdate",Ih="singleExtensions",F0e=[Km,$m,Gm,El,Ih],kR=class Sl extends Re{static{o(this,"SingleResponse")}constructor(e={}){super(),this.certID=O(e,Km,Sl.defaultValues(Km)),this.certStatus=O(e,$m,Sl.defaultValues($m)),this.thisUpdate=O(e,Gm,Sl.defaultValues(Gm)),El in e&&(this.nextUpdate=O(e,El,Sl.defaultValues(El))),Ih in e&&(this.singleExtensions=O(e,Ih,Sl.defaultValues(Ih))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Km:return new yi;case $m:return{};case Gm:case El:return new Date(0,0,0);case Ih:return[];default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Km:return yi.compareWithDefault("hashAlgorithm",t.hashAlgorithm)&&yi.compareWithDefault("issuerNameHash",t.issuerNameHash)&&yi.compareWithDefault("issuerKeyHash",t.issuerKeyHash)&&yi.compareWithDefault("serialNumber",t.serialNumber);case $m:return Object.keys(t).length===0;case Gm:case El:return t===Sl.defaultValues(e);default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[yi.schema(t.certID||{}),new Mr({value:[new xt({name:t.certStatus||V,idBlock:{tagClass:3,tagNumber:0}}),new fe({name:t.certStatus||V,idBlock:{tagClass:3,tagNumber:1},value:[new Fr,new fe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[new Bc]})]}),new xt({name:t.certStatus||V,idBlock:{tagClass:3,tagNumber:2},lenBlock:{length:1}})]}),new Fr({name:t.thisUpdate||V}),new fe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[new Fr({name:t.nextUpdate||V})]}),new fe({optional:!0,idBlock:{tagClass:3,tagNumber:1},value:[Rn.schema(t.singleExtensions||{})]})]})}fromSchema(e){ke(e,F0e);let t=Be(e,e,Sl.schema({names:{certID:{names:{blockName:Km}},certStatus:$m,thisUpdate:Gm,nextUpdate:El,singleExtensions:{names:{blockName:Ih}}}}));Te.assertSchema(t,this.className),this.certID=new yi({schema:t.result.certID}),this.certStatus=t.result.certStatus,this.thisUpdate=t.result.thisUpdate.toDate(),El in t.result&&(this.nextUpdate=t.result.nextUpdate.toDate()),Ih in t.result&&(this.singleExtensions=Array.from(t.result.singleExtensions.valueBlock.value,n=>new ea({schema:n})))}toSchema(){let e=[];return e.push(this.certID.toSchema()),e.push(this.certStatus),e.push(new Fr({valueDate:this.thisUpdate})),this.nextUpdate&&e.push(new fe({idBlock:{tagClass:3,tagNumber:0},value:[new Fr({valueDate:this.nextUpdate})]})),this.singleExtensions&&e.push(new fe({idBlock:{tagClass:3,tagNumber:1},value:[new J({value:Array.from(this.singleExtensions,t=>t.toSchema())})]})),new J({value:e})}toJSON(){let e={certID:this.certID.toJSON(),certStatus:this.certStatus.toJSON(),thisUpdate:this.thisUpdate};return this.nextUpdate&&(e.nextUpdate=this.nextUpdate),this.singleExtensions&&(e.singleExtensions=Array.from(this.singleExtensions,t=>t.toJSON())),e}};kR.CLASS_NAME="SingleResponse";var hA="tbs",_h="version",ox="responderID",ux="producedAt",cx="responses",Xm="responseExtensions",ep="ResponseData",iC=`${ep}.${_h}`,Wm=`${ep}.${ox}`,LR=`${ep}.${ux}`,VR=`${ep}.${cx}`,aC=`${ep}.${Xm}`,M0e=[ep,iC,Wm,LR,VR,aC],mu=class yo extends Re{static{o(this,"ResponseData")}get tbs(){return vt.toArrayBuffer(this.tbsView)}set tbs(e){this.tbsView=new Uint8Array(e)}constructor(e={}){super(),this.tbsView=new Uint8Array(O(e,hA,yo.defaultValues(hA))),_h in e&&(this.version=O(e,_h,yo.defaultValues(_h))),this.responderID=O(e,ox,yo.defaultValues(ox)),this.producedAt=O(e,ux,yo.defaultValues(ux)),this.responses=O(e,cx,yo.defaultValues(cx)),Xm in e&&(this.responseExtensions=O(e,Xm,yo.defaultValues(Xm))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case _h:return 0;case hA:return hn;case ox:return{};case ux:return new Date(0,0,0);case cx:case Xm:return[];default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case hA:return t.byteLength===0;case ox:return Object.keys(t).length===0;case ux:return t===yo.defaultValues(e);case cx:case Xm:return t.length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||ep,value:[new fe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[new xe({name:t.version||iC})]}),new Mr({value:[new fe({name:t.responderID||Wm,idBlock:{tagClass:3,tagNumber:1},value:[qr.schema(t.ResponseDataByName||{names:{blockName:"ResponseData.byName"}})]}),new fe({name:t.responderID||Wm,idBlock:{tagClass:3,tagNumber:2},value:[new qe({name:t.ResponseDataByKey||"ResponseData.byKey"})]})]}),new Fr({name:t.producedAt||LR}),new J({value:[new Bt({name:VR,value:kR.schema(t.response||{})})]}),new fe({optional:!0,idBlock:{tagClass:3,tagNumber:1},value:[Rn.schema(t.extensions||{names:{blockName:aC}})]})]})}fromSchema(e){ke(e,M0e);let t=Be(e,e,yo.schema());Te.assertSchema(t,this.className),this.tbsView=t.result.ResponseData.valueBeforeDecodeView,iC in t.result&&(this.version=t.result[iC].valueBlock.valueDec),t.result[Wm].idBlock.tagNumber===1?this.responderID=new qr({schema:t.result[Wm].valueBlock.value[0]}):this.responderID=t.result[Wm].valueBlock.value[0],this.producedAt=t.result[LR].toDate(),this.responses=Array.from(t.result[VR],n=>new kR({schema:n})),aC in t.result&&(this.responseExtensions=Array.from(t.result[aC].valueBlock.value,n=>new ea({schema:n})))}toSchema(e=!1){let t;if(e===!1){if(!this.tbsView.byteLength)return yo.schema();let n=en(this.tbsView);Te.assert(n,"TBS Response Data"),t=n.result}else{let n=[];_h in this&&n.push(new fe({idBlock:{tagClass:3,tagNumber:0},value:[new xe({value:this.version})]})),this.responderID instanceof qr?n.push(new fe({idBlock:{tagClass:3,tagNumber:1},value:[this.responderID.toSchema()]})):n.push(new fe({idBlock:{tagClass:3,tagNumber:2},value:[this.responderID]})),n.push(new Fr({valueDate:this.producedAt})),n.push(new J({value:Array.from(this.responses,s=>s.toSchema())})),this.responseExtensions&&n.push(new fe({idBlock:{tagClass:3,tagNumber:1},value:[new J({value:Array.from(this.responseExtensions,s=>s.toSchema())})]})),t=new J({value:n})}return t}toJSON(){let e={};return _h in this&&(e.version=this.version),this.responderID&&(e.responderID=this.responderID),this.producedAt&&(e.producedAt=this.producedAt),this.responses&&(e.responses=Array.from(this.responses,t=>t.toJSON())),this.responseExtensions&&(e.responseExtensions=Array.from(this.responseExtensions,t=>t.toJSON())),e}};mu.CLASS_NAME="ResponseData";var UB="trustedCerts",jB="certs",FB="crls",MB="ocsps",qB="checkDate",HB="findOrigin",KB="findIssuer",$h;(function(r){r[r.unknown=-1]="unknown",r[r.success=0]="success",r[r.noRevocation=11]="noRevocation",r[r.noPath=60]="noPath",r[r.noValidPath=97]="noValidPath"})($h||($h={}));var zm=class mH extends Error{static{o(this,"ChainValidationError")}constructor(e,t){super(t),this.name=mH.NAME,this.code=e,this.message=t}};zm.NAME="ChainValidationError";function q0e(r,e){for(let t=0;t<e.length;t++)if(vt.isEqual(r.tbsView,e[t].tbsView))return!0;return!1}o(q0e,"isTrusted");var gH=class vH{static{o(this,"CertificateChainValidationEngine")}constructor(e={}){this.trustedCerts=O(e,UB,this.defaultValues(UB)),this.certs=O(e,jB,this.defaultValues(jB)),this.crls=O(e,FB,this.defaultValues(FB)),this.ocsps=O(e,MB,this.defaultValues(MB)),this.checkDate=O(e,qB,this.defaultValues(qB)),this.findOrigin=O(e,HB,this.defaultValues(HB)),this.findIssuer=O(e,KB,this.defaultValues(KB))}static defaultFindOrigin(e,t){e.tbsView.byteLength===0&&(e.tbsView=new Uint8Array(e.encodeTBS().toBER()));for(let n of t.certs)if(n.tbsView.byteLength===0&&(n.tbsView=new Uint8Array(n.encodeTBS().toBER())),vt.isEqual(e.tbsView,n.tbsView))return"Intermediate Certificates";for(let n of t.trustedCerts)if(n.tbsView.byteLength===0&&(n.tbsView=new Uint8Array(n.encodeTBS().toBER())),vt.isEqual(e.tbsView,n.tbsView))return"Trusted Certificates";return"Unknown"}async defaultFindIssuer(e,t,n=kt(!0)){let s=[],i=null,a=null,u=null;if(e.subject.isEqual(e.issuer))try{if(await e.verify(void 0,n))return[e]}catch{}if(e.extensions){for(let l of e.extensions)if(l.extnID===sO&&l.parsedValue instanceof uO){l.parsedValue.keyIdentifier?i=l.parsedValue.keyIdentifier:(l.parsedValue.authorityCertIssuer&&(a=l.parsedValue.authorityCertIssuer),l.parsedValue.authorityCertSerialNumber&&(u=l.parsedValue.authorityCertSerialNumber));break}}function c(l){if(i!==null&&l.extensions){let m=!1;for(let g of l.extensions)if(g.extnID===Kde&&g.parsedValue){m=!0,vt.isEqual(g.parsedValue.valueBlock.valueHex,i.valueBlock.valueHexView)&&s.push(l);break}if(m)return}let h=!1;u!==null&&(h=l.serialNumber.isEqual(u)),a!==null?l.subject.isEqual(a)&&h&&s.push(l):e.issuer.isEqual(l.subject)&&s.push(l)}o(c,"checkCertificate");for(let l of t.trustedCerts)c(l);for(let l of t.certs)c(l);for(let l=s.length-1;l>=0;l--)try{await e.verify(s[l],n)===!1&&s.splice(l,1)}catch{s.splice(l,1)}return s}defaultValues(e){switch(e){case UB:return[];case jB:return[];case FB:return[];case MB:return[];case qB:return new Date;case HB:return vH.defaultFindOrigin;case KB:return this.defaultFindIssuer;default:throw new Error(`Invalid member name for CertificateChainValidationEngine class: ${e}`)}}async sort(e=!1,t=kt(!0)){let n=[],s=o(async(v,E)=>{let w=[];function C(b){let A=!0;for(let T=0;T<b.length;T++){for(let B=0;B<b.length;B++)if(B!==T&&b[T]===b[B]){A=!1;break}if(!A)break}return A}if(o(C,"checkUnique"),q0e(v,this.trustedCerts))return[[v]];let _=await this.findIssuer(v,this,E);if(_.length===0)throw new Error("No valid certificate paths found");for(let b=0;b<_.length;b++){if(vt.isEqual(_[b].tbsView,v.tbsView)){w.push([_[b]]);continue}let A=await s(_[b],E);for(let T=0;T<A.length;T++){let B=A[T].slice();B.splice(0,0,_[b]),C(B)?w.push(B):w.push(A[T])}}return w},"buildPath"),i=o(async v=>{let E=[],w=[],C=[];if(E.push(...n.filter(_=>v.issuer.isEqual(_.subject))),E.length===0)return{status:1,statusMessage:"No certificate's issuers"};if(w.push(...this.crls.filter(_=>_.issuer.isEqual(v.issuer))),w.length===0)return{status:2,statusMessage:"No CRLs for specific certificate issuer"};for(let _=0;_<w.length;_++){let b=w[_];if(!(b.nextUpdate&&b.nextUpdate.value<this.checkDate))for(let A=0;A<E.length;A++)try{if(await w[_].verify({issuerCertificate:E[A]},t)){C.push({crl:w[_],certificate:E[A]});break}}catch{}}return C.length?{status:0,statusMessage:V,result:C}:{status:3,statusMessage:"No valid CRLs found"}},"findCRL"),a=o(async(v,E)=>{let w=t.getAlgorithmByOID(v.signatureAlgorithm.algorithmId);if(!w.name||!w.hash)return 1;for(let C=0;C<this.ocsps.length;C++){let b=await this.ocsps[C].getCertificateStatus(v,E,t);if(b.isForCertificate)return b.status===0?0:1}return 2},"findOCSP");async function u(v,E=!1){let w=!1,C=!1,_=!1,b=!1;if(v.extensions){for(let A=0;A<v.extensions.length;A++){let T=v.extensions[A];if(T.critical&&!T.parsedValue)return{result:!1,resultCode:6,resultMessage:`Unable to parse critical certificate extension: ${T.extnID}`};if(T.extnID===$de){_=!0;let B=new Uint8Array(T.parsedValue.valueBlock.valueHex);(B[0]&4)===4&&(C=!0),(B[0]&2)===2&&(b=!0)}T.extnID===rO&&"cA"in T.parsedValue&&T.parsedValue.cA===!0&&(w=!0)}if(C===!0&&w===!1)return{result:!1,resultCode:3,resultMessage:'Unable to build certificate chain - using "keyCertSign" flag set without BasicConstraints'};if(_===!0&&w===!0&&C===!1)return{result:!1,resultCode:4,resultMessage:'Unable to build certificate chain - "keyCertSign" flag was not set'};if(w===!0&&_===!0&&E&&b===!1)return{result:!1,resultCode:5,resultMessage:'Unable to build certificate chain - intermediate certificate must have "cRLSign" key usage flag'}}return w===!1?{result:!1,resultCode:7,resultMessage:"Unable to build certificate chain - more than one possible end-user certificate"}:{result:!0,resultCode:0,resultMessage:V}}o(u,"checkForCA");let c=o(async(v,E)=>{for(let w=0;w<v.length;w++)if(v[w].notBefore.value>E||v[w].notAfter.value<E)return{result:!1,resultCode:8,resultMessage:"The certificate is either not yet valid or expired"};if(v.length<2)return{result:!1,resultCode:9,resultMessage:"Too short certificate path"};for(let w=v.length-2;w>=0;w--)if(v[w].issuer.isEqual(v[w].subject)===!1&&v[w].issuer.isEqual(v[w+1].subject)===!1)return{result:!1,resultCode:10,resultMessage:"Incorrect name chaining"};if(this.crls.length!==0||this.ocsps.length!==0)for(let w=0;w<v.length-1;w++){let C=2,_={status:0,statusMessage:V};if(this.ocsps.length!==0)switch(C=await a(v[w],v[w+1]),C){case 0:continue;case 1:return{result:!1,resultCode:12,resultMessage:"One of certificates was revoked via OCSP response"}}if(this.crls.length!==0){if(_=await i(v[w]),_.status===0&&_.result)for(let b=0;b<_.result.length;b++){if(_.result[b].crl.isCertificateRevoked(v[w]))return{result:!1,resultCode:12,resultMessage:"One of certificates had been revoked"};if((await u(_.result[b].certificate,!0)).result===!1)return{result:!1,resultCode:13,resultMessage:"CRL issuer certificate is not a CA certificate or does not have crlSign flag"}}else if(e===!1)throw new zm($h.noRevocation,`No revocation values found for one of certificates: ${_.statusMessage}`)}else if(C===2)return{result:!1,resultCode:11,resultMessage:"No revocation values found for one of certificates"};if(C===2&&_.status===2&&e){let b=v[w+1],A=!1;if(b.extensions)for(let T of b.extensions)switch(T.extnID){case V7:case nO:case iO:A=!0;break}if(A)throw new zm($h.noRevocation,`No revocation values found for one of certificates: ${_.statusMessage}`)}}for(let[w,C]of v.entries()){if(!w)continue;if(!(await u(C)).result)return{result:!1,resultCode:14,resultMessage:"One of intermediate certificates is not a CA certificate"}}return{result:!0}},"basicCheck");n.push(...this.trustedCerts),n.push(...this.certs);for(let v=0;v<n.length;v++)for(let E=0;E<n.length;E++)if(v!==E&&vt.isEqual(n[v].tbsView,n[E].tbsView)){n.splice(E,1),v=0;break}let l=n[n.length-1],h,m=[l];if(h=await s(l,t),h.length===0)throw new zm($h.noPath,"Unable to find certificate path");for(let v=h.length-1;v>=0;v--){let E=!1;for(let w=0;w<h[v].length;w++){let C=h[v][w];for(let _=0;_<this.trustedCerts.length;_++)if(vt.isEqual(C.tbsView,this.trustedCerts[_].tbsView)){E=!0;break}if(E)break}E||h.splice(v,1)}if(h.length===0)throw new zm($h.noValidPath,"No valid certificate paths found");let g=h[0].length,y=0;for(let v=0;v<h.length;v++)h[v].length<g&&(g=h[v].length,y=v);for(let v=0;v<h[y].length;v++)m.push(h[y][v]);if(h=await c(m,this.checkDate),h.result===!1)throw h;return m}async verify(e={},t=kt(!0)){function n(c,l){let h=Dl(c),m=Dl(l),g=h.split("."),y=m.split("."),v=g.length,E=y.length;if(v===0||E===0||v<E)return!1;for(let w=0;w<v;w++)if(g[w].length===0)return!1;for(let w=0;w<E;w++)if(y[w].length===0){if(w===0){if(E===1)return!1;continue}return!1}for(let w=0;w<E;w++)if(y[E-1-w].length!==0&&g[v-1-w].localeCompare(y[E-1-w])!==0)return!1;return!0}o(n,"compareDNSName");function s(c,l){let h=Dl(c),m=Dl(l),g=h.split("@"),y=m.split("@");if(g.length===0||y.length===0||g.length<y.length)return!1;if(y.length===1){if(n(g[1],y[0])){let E=g[1].split("."),w=y[0].split(".");return w[0].length===0?!0:E.length===w.length}return!1}return h.localeCompare(m)===0}o(s,"compareRFC822Name");function i(c,l){let h=Dl(c),m=Dl(l),g=h.split("/");if(m.split("/").length>1)return!1;if(g.length>1){for(let E=0;E<g.length;E++)if(g[E].length>0&&g[E].charAt(g[E].length-1)!==":"){h=g[E].split(":")[0];break}}if(n(h,m)){let E=h.split("."),w=m.split(".");return w[0].length===0?!0:E.length===w.length}return!1}o(i,"compareUniformResourceIdentifier");function a(c,l){let h=c.valueBlock.valueHexView,m=l.valueBlock.valueHexView;if(h.length===4&&m.length===8){for(let g=0;g<4;g++)if((h[g]^m[g])&m[g+4])return!1;return!0}if(h.length===16&&m.length===32){for(let g=0;g<16;g++)if((h[g]^m[g])&m[g+16])return!1;return!0}return!1}o(a,"compareIPAddress");function u(c,l){if(c.typesAndValues.length===0||l.typesAndValues.length===0)return!0;if(c.typesAndValues.length<l.typesAndValues.length)return!1;let h=!0,m=0;for(let g=0;g<l.typesAndValues.length;g++){let y=!1;for(let v=m;v<c.typesAndValues.length;v++)if(y=c.typesAndValues[v].isEqual(l.typesAndValues[g]),c.typesAndValues[v].type===l.typesAndValues[g].type&&(h=h&&y),y===!0)if(m===0||m===v){m=v+1;break}else return!1;if(y===!1)return!1}return m===0?!1:h}o(u,"compareDirectoryName");try{if(this.certs.length===0)throw new Error("Empty certificate array");let c=e.passedWhenNotRevValues||!1,l=e.initialPolicySet||[Ji],h=e.initialExplicitPolicy||!1,m=e.initialPolicyMappingInhibit||!1,g=e.initialInhibitPolicy||!1,y=e.initialPermittedSubtreesSet||[],v=e.initialExcludedSubtreesSet||[],E=e.initialRequiredNameForms||[],w=h,C=m,_=g,b=[!1,!1,!1],A=0,T=0,B=0,M=y,I=v,H=E,K=1;this.certs=await this.sort(c,t);let q=[];q.push(Ji);let W=[],he=new Array(this.certs.length-1);for(let ne=0;ne<this.certs.length-1;ne++)he[ne]=!0;W.push(he);let pe=new Array(this.certs.length-1),ue=new Array(this.certs.length-1),Y=w?this.certs.length-1:-1;for(let ne=this.certs.length-2;ne>=0;ne--,K++){let Z=this.certs[ne];if(Z.extensions){for(let Se=0;Se<Z.extensions.length;Se++){let He=Z.extensions[Se];if(He.extnID===U7){ue[ne]=He.parsedValue;for(let Le=0;Le<q.length;Le++)if(q[Le]===Ji){delete W[Le][ne];break}for(let Le=0;Le<He.parsedValue.certificatePolicies.length;Le++){let rt=-1,N=He.parsedValue.certificatePolicies[Le].policyIdentifier;for(let S=0;S<q.length;S++)if(N===q[S]){rt=S;break}if(rt===-1){q.push(N);let S=new Array(this.certs.length-1);S[ne]=!0,W.push(S)}else W[rt][ne]=!0}}if(He.extnID===j7){if(C)return{result:!1,resultCode:98,resultMessage:"Policy mapping prohibited"};pe[ne]=He.parsedValue}He.extnID===F7&&w===!1&&(He.parsedValue.requireExplicitPolicy===0?(w=!0,Y=ne):b[0]===!1?(b[0]=!0,A=He.parsedValue.requireExplicitPolicy):A=A>He.parsedValue.requireExplicitPolicy?He.parsedValue.requireExplicitPolicy:A,He.parsedValue.inhibitPolicyMapping===0?C=!0:b[1]===!1?(b[1]=!0,T=He.parsedValue.inhibitPolicyMapping+1):T=T>He.parsedValue.inhibitPolicyMapping+1?He.parsedValue.inhibitPolicyMapping+1:T),He.extnID===Zde&&_===!1&&(He.parsedValue.valueBlock.valueDec===0?_=!0:b[2]===!1?(b[2]=!0,B=He.parsedValue.valueBlock.valueDec):B=B>He.parsedValue.valueBlock.valueDec?He.parsedValue.valueBlock.valueDec:B)}if(_===!0){let Se=-1;for(let He=0;He<q.length;He++)if(q[He]===Ji){Se=He;break}Se!==-1&&delete W[0][ne]}w===!1&&b[0]===!0&&(A--,A===0&&(w=!0,Y=ne,b[0]=!1)),C===!1&&b[1]===!0&&(T--,T===0&&(C=!0,b[1]=!1)),_===!1&&b[2]===!0&&(B--,B===0&&(_=!0,b[2]=!1))}}for(let ne=0;ne<this.certs.length-1;ne++)if(ne<this.certs.length-2&&typeof pe[ne+1]<"u")for(let Z=0;Z<pe[ne+1].mappings.length;Z++){if(pe[ne+1].mappings[Z].issuerDomainPolicy===Ji||pe[ne+1].mappings[Z].subjectDomainPolicy===Ji)return{result:!1,resultCode:99,resultMessage:'The "anyPolicy" should not be a part of policy mapping scheme'};let Se=-1,He=-1;for(let Le=0;Le<q.length;Le++)q[Le]===pe[ne+1].mappings[Z].issuerDomainPolicy&&(Se=Le),q[Le]===pe[ne+1].mappings[Z].subjectDomainPolicy&&(He=Le);typeof W[Se][ne]<"u"&&delete W[Se][ne];for(let Le=0;Le<ue[ne].certificatePolicies.length;Le++)if(pe[ne+1].mappings[Z].subjectDomainPolicy===ue[ne].certificatePolicies[Le].policyIdentifier&&Se!==-1&&He!==-1)for(let rt=0;rt<=ne;rt++)typeof W[He][rt]<"u"&&(W[Se][rt]=!0,delete W[He][rt])}for(let ne=0;ne<q.length;ne++)if(q[ne]===Ji)for(let Z=0;Z<Y;Z++)delete W[ne][Z];let ve=[];for(let ne=0;ne<W.length;ne++){let Z=!0;for(let Se=0;Se<this.certs.length-1;Se++){let He=!1;if(Se<Y&&q[ne]===Ji&&q.length>1){Z=!1;break}if(typeof W[ne][Se]>"u"){if(Se>=Y){for(let Le=0;Le<q.length;Le++)if(q[Le]===Ji){W[Le][Se]===!0&&(He=!0);break}}if(!He){Z=!1;break}}}Z===!0&&ve.push(q[ne])}let Oe=[];if(l.length===1&&l[0]===Ji&&w===!1)Oe=l;else if(ve.length===1&&ve[0]===Ji)Oe=l;else for(let ne=0;ne<ve.length;ne++)for(let Z=0;Z<l.length;Z++)if(l[Z]===ve[ne]||l[Z]===Ji){Oe.push(ve[ne]);break}let Je={result:Oe.length>0,resultCode:0,resultMessage:Oe.length>0?V:'Zero "userConstrPolicies" array, no intersections with "authConstrPolicies"',authConstrPolicies:ve,userConstrPolicies:Oe,explicitPolicyIndicator:w,policyMappings:pe,certificatePath:this.certs};if(Oe.length===0||Je.result===!1)return Je;K=1;for(let ne=this.certs.length-2;ne>=0;ne--,K++){let Z=this.certs[ne],Se=[],He=[],Le=[];if(Z.extensions)for(let G=0;G<Z.extensions.length;G++){let P=Z.extensions[G];P.extnID===L7&&("permittedSubtrees"in P.parsedValue&&(He=He.concat(P.parsedValue.permittedSubtrees)),"excludedSubtrees"in P.parsedValue&&(Le=Le.concat(P.parsedValue.excludedSubtrees))),P.extnID===R7&&(Se=Se.concat(P.parsedValue.altNames))}let rt=H.length<=0;for(let G=0;G<H.length;G++)switch(H[G].base.type){case 4:{if(H[G].base.value.typesAndValues.length!==Z.subject.typesAndValues.length)continue;rt=!0;for(let P=0;P<Z.subject.typesAndValues.length;P++)if(Z.subject.typesAndValues[P].type!==H[G].base.value.typesAndValues[P].type){rt=!1;break}if(rt===!0)break}break;default:}if(rt===!1)throw Je.result=!1,Je.resultCode=21,Je.resultMessage="No necessary name form found",Je;let N=[[],[],[],[],[]];for(let G=0;G<M.length;G++)switch(M[G].base.type){case 1:N[0].push(M[G]);break;case 2:N[1].push(M[G]);break;case 4:N[2].push(M[G]);break;case 6:N[3].push(M[G]);break;case 7:N[4].push(M[G]);break;default:}for(let G=0;G<5;G++){let P=!1,Ee=!1,Ce=N[G];for(let Ae=0;Ae<Ce.length;Ae++){switch(G){case 0:if(Se.length>0)for(let Ye=0;Ye<Se.length;Ye++)Se[Ye].type===1&&(Ee=!0,P=P||s(Se[Ye].value,Ce[Ae].base.value));else for(let Ye=0;Ye<Z.subject.typesAndValues.length;Ye++)(Z.subject.typesAndValues[Ye].type==="1.2.840.113549.1.9.1"||Z.subject.typesAndValues[Ye].type==="0.9.2342.19200300.100.1.3")&&(Ee=!0,P=P||s(Z.subject.typesAndValues[Ye].value.valueBlock.value,Ce[Ae].base.value));break;case 1:if(Se.length>0)for(let Ye=0;Ye<Se.length;Ye++)Se[Ye].type===2&&(Ee=!0,P=P||n(Se[Ye].value,Ce[Ae].base.value));break;case 2:Ee=!0,P=u(Z.subject,Ce[Ae].base.value);break;case 3:if(Se.length>0)for(let Ye=0;Ye<Se.length;Ye++)Se[Ye].type===6&&(Ee=!0,P=P||i(Se[Ye].value,Ce[Ae].base.value));break;case 4:if(Se.length>0)for(let Ye=0;Ye<Se.length;Ye++)Se[Ye].type===7&&(Ee=!0,P=P||a(Se[Ye].value,Ce[Ae].base.value));break;default:}if(P)break}if(P===!1&&Ce.length>0&&Ee)throw Je.result=!1,Je.resultCode=41,Je.resultMessage='Failed to meet "permitted sub-trees" name constraint',Je}let S=!1;for(let G=0;G<I.length;G++){switch(I[G].base.type){case 1:if(Se.length>=0)for(let P=0;P<Se.length;P++)Se[P].type===1&&(S=S||s(Se[P].value,I[G].base.value));else for(let P=0;P<Z.subject.typesAndValues.length;P++)(Z.subject.typesAndValues[P].type==="1.2.840.113549.1.9.1"||Z.subject.typesAndValues[P].type==="0.9.2342.19200300.100.1.3")&&(S=S||s(Z.subject.typesAndValues[P].value.valueBlock.value,I[G].base.value));break;case 2:if(Se.length>0)for(let P=0;P<Se.length;P++)Se[P].type===2&&(S=S||n(Se[P].value,I[G].base.value));break;case 4:S=S||u(Z.subject,I[G].base.value);break;case 6:if(Se.length>0)for(let P=0;P<Se.length;P++)Se[P].type===6&&(S=S||i(Se[P].value,I[G].base.value));break;case 7:if(Se.length>0)for(let P=0;P<Se.length;P++)Se[P].type===7&&(S=S||a(Se[P].value,I[G].base.value));break;default:}if(S)break}if(S===!0)throw Je.result=!1,Je.resultCode=42,Je.resultMessage='Failed to meet "excluded sub-trees" name constraint',Je;M=M.concat(He),I=I.concat(Le)}return Je}catch(c){return c instanceof Error?c instanceof zm?{result:!1,resultCode:c.code,resultMessage:c.message,error:c}:{result:!1,resultCode:$h.unknown,resultMessage:c.message,error:c}:c&&typeof c=="object"&&"resultMessage"in c?c:{result:!1,resultCode:-1,resultMessage:`${c}`}}}},oC="tbsResponseData",lx="signatureAlgorithm",fx="signature",Jm="certs",qx="BasicOCSPResponse",UR=`${qx}.${oC}`,jR=`${qx}.${lx}`,FR=`${qx}.${fx}`,uC=`${qx}.${Jm}`,H0e=[UR,jR,FR,uC],Vx=class Dh extends Re{static{o(this,"BasicOCSPResponse")}constructor(e={}){super(),this.tbsResponseData=O(e,oC,Dh.defaultValues(oC)),this.signatureAlgorithm=O(e,lx,Dh.defaultValues(lx)),this.signature=O(e,fx,Dh.defaultValues(fx)),Jm in e&&(this.certs=O(e,Jm,Dh.defaultValues(Jm))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case oC:return new mu;case lx:return new we;case fx:return new Gt;case Jm:return[];default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case"type":{let n=mu.compareWithDefault("tbs",t.tbs)&&mu.compareWithDefault("responderID",t.responderID)&&mu.compareWithDefault("producedAt",t.producedAt)&&mu.compareWithDefault("responses",t.responses);return"responseExtensions"in t&&(n=n&&mu.compareWithDefault("responseExtensions",t.responseExtensions)),n}case lx:return t.algorithmId===V&&!("algorithmParams"in t);case fx:return t.isEqual(Dh.defaultValues(e));case Jm:return t.length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||qx,value:[mu.schema(t.tbsResponseData||{names:{blockName:UR}}),we.schema(t.signatureAlgorithm||{names:{blockName:jR}}),new Gt({name:t.signature||FR}),new fe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[new J({value:[new Bt({name:uC,value:vs.schema(t.certs||{})})]})]})]})}fromSchema(e){ke(e,H0e);let t=Be(e,e,Dh.schema());Te.assertSchema(t,this.className),this.tbsResponseData=new mu({schema:t.result[UR]}),this.signatureAlgorithm=new we({schema:t.result[jR]}),this.signature=t.result[FR],uC in t.result&&(this.certs=Array.from(t.result[uC],n=>new vs({schema:n})))}toSchema(){let e=[];return e.push(this.tbsResponseData.toSchema()),e.push(this.signatureAlgorithm.toSchema()),e.push(this.signature),this.certs&&e.push(new fe({idBlock:{tagClass:3,tagNumber:0},value:[new J({value:Array.from(this.certs,t=>t.toSchema())})]})),new J({value:e})}toJSON(){let e={tbsResponseData:this.tbsResponseData.toJSON(),signatureAlgorithm:this.signatureAlgorithm.toJSON(),signature:this.signature.toJSON()};return this.certs&&(e.certs=Array.from(this.certs,t=>t.toJSON())),e}async getCertificateStatus(e,t,n=kt(!0)){let s={isForCertificate:!1,status:2},i={},a=[];for(let u of this.tbsResponseData.responses){let c=n.getAlgorithmByOID(u.certID.hashAlgorithm.algorithmId,!0,"CertID.hashAlgorithm");if(!i[c.name]){i[c.name]=1;let l=new yi;a.push(l),await l.createForCertificate(e,{hashAlgorithm:c.name,issuerCertificate:t},n)}}for(let u of this.tbsResponseData.responses)for(let c of a)if(u.certID.isEqual(c)){s.isForCertificate=!0;try{switch(u.certStatus.idBlock.isConstructed){case!0:u.certStatus.idBlock.tagNumber===1&&(s.status=1);break;case!1:switch(u.certStatus.idBlock.tagNumber){case 0:s.status=0;break;case 2:s.status=2;break;default:}break;default:}}catch{}return s}return s}async sign(e,t="SHA-1",n=kt(!0)){if(!e)throw new Error("Need to provide a private key for signing");let s=await n.getSignatureParameters(e,t),i=s.parameters.algorithm;if(!("name"in i))throw new Error("Empty algorithm");this.signatureAlgorithm=s.signatureAlgorithm,this.tbsResponseData.tbsView=new Uint8Array(this.tbsResponseData.toSchema(!0).toBER());let a=await n.signWithPrivateKey(this.tbsResponseData.tbsView,e,{algorithm:i});this.signature=new Gt({valueHex:a})}async verify(e={},t=kt(!0)){let n=null,s=-1,i=e.trustedCerts||[];if(!this.certs)throw new Error("No certificates attached to the BasicOCSPResponse");switch(!0){case this.tbsResponseData.responderID instanceof qr:for(let[l,h]of this.certs.entries())if(h.subject.isEqual(this.tbsResponseData.responderID)){s=l;break}break;case this.tbsResponseData.responderID instanceof qe:for(let[l,h]of this.certs.entries()){let m=await t.digest({name:"sha-1"},h.subjectPublicKeyInfo.subjectPublicKey.valueBlock.valueHexView);if(_c(m,this.tbsResponseData.responderID.valueBlock.valueHex)){s=l;break}}break;default:throw new Error("Wrong value for responderID")}if(s===-1)throw new Error("Correct certificate was not found in OCSP response");n=this.certs[s];let a=[n];for(let l of this.certs){let h=await oH(l,n);h&&a.push(h)}if(!(await new gH({certs:a,trustedCerts:i}).verify({},t)).result)throw new Error("Validation of signer's certificate failed");return t.verifyWithPublicKey(this.tbsResponseData.tbsView,this.signature,this.certs[s].subjectPublicKeyInfo,this.signatureAlgorithm)}};Vx.CLASS_NAME="BasicOCSPResponse";var $B="tbs",GB="version",XB="subject",WB="subjectPublicKeyInfo",Md="attributes",hx="signatureAlgorithm",px="signatureValue",I0="CertificationRequestInfo",vO=`${I0}.version`,yO=`${I0}.subject`,xO=`${I0}.subjectPublicKeyInfo`,WC=`${I0}.attributes`,K0e=[I0,vO,yO,xO,WC,hx,px];function $0e(r={}){let e=O(r,"names",{});return new J({name:e.CertificationRequestInfo||I0,value:[new xe({name:e.CertificationRequestInfoVersion||vO}),qr.schema(e.subject||{names:{blockName:yO}}),Da.schema({names:{blockName:xO}}),new fe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[new Bt({optional:!0,name:e.CertificationRequestInfoAttributes||WC,value:pn.schema(e.attributes||{})})]})]})}o($0e,"CertificationRequestInfo");var G0e=class xo extends Re{static{o(this,"CertificationRequest")}get tbs(){return vt.toArrayBuffer(this.tbsView)}set tbs(e){this.tbsView=new Uint8Array(e)}constructor(e={}){super(),this.tbsView=new Uint8Array(O(e,$B,xo.defaultValues($B))),this.version=O(e,GB,xo.defaultValues(GB)),this.subject=O(e,XB,xo.defaultValues(XB)),this.subjectPublicKeyInfo=O(e,WB,xo.defaultValues(WB)),Md in e&&(this.attributes=O(e,Md,xo.defaultValues(Md))),this.signatureAlgorithm=O(e,hx,xo.defaultValues(hx)),this.signatureValue=O(e,px,xo.defaultValues(px)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case $B:return hn;case GB:return 0;case XB:return new qr;case WB:return new Da;case Md:return[];case hx:return new we;case px:return new Gt;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({value:[$0e(t.certificationRequestInfo||{}),new J({name:t.signatureAlgorithm||hx,value:[new ot,new bt({optional:!0})]}),new Gt({name:t.signatureValue||px})]})}fromSchema(e){ke(e,K0e);let t=Be(e,e,xo.schema());Te.assertSchema(t,this.className),this.tbsView=t.result.CertificationRequestInfo.valueBeforeDecodeView,this.version=t.result[vO].valueBlock.valueDec,this.subject=new qr({schema:t.result[yO]}),this.subjectPublicKeyInfo=new Da({schema:t.result[xO]}),WC in t.result&&(this.attributes=Array.from(t.result[WC],n=>new pn({schema:n}))),this.signatureAlgorithm=new we({schema:t.result.signatureAlgorithm}),this.signatureValue=t.result.signatureValue}encodeTBS(){let e=[new xe({value:this.version}),this.subject.toSchema(),this.subjectPublicKeyInfo.toSchema()];return Md in this&&e.push(new fe({idBlock:{tagClass:3,tagNumber:0},value:Array.from(this.attributes||[],t=>t.toSchema())})),new J({value:e})}toSchema(e=!1){let t;if(e===!1){if(this.tbsView.byteLength===0)return xo.schema();let n=en(this.tbsView);Te.assert(n,"PKCS#10 Certificate Request"),t=n.result}else t=this.encodeTBS();return new J({value:[t,this.signatureAlgorithm.toSchema(),this.signatureValue]})}toJSON(){let e={tbs:Nt.ToHex(this.tbsView),version:this.version,subject:this.subject.toJSON(),subjectPublicKeyInfo:this.subjectPublicKeyInfo.toJSON(),signatureAlgorithm:this.signatureAlgorithm.toJSON(),signatureValue:this.signatureValue.toJSON()};return Md in this&&(e.attributes=Array.from(this.attributes||[],t=>t.toJSON())),e}async sign(e,t="SHA-1",n=kt(!0)){if(!e)throw new Error("Need to provide a private key for signing");let s=await n.getSignatureParameters(e,t),i=s.parameters;this.signatureAlgorithm=s.signatureAlgorithm,this.tbsView=new Uint8Array(this.encodeTBS().toBER());let a=await n.signWithPrivateKey(this.tbsView,e,i);this.signatureValue=new Gt({valueHex:a})}async verify(e=kt(!0)){return e.verifyWithPublicKey(this.tbsView,this.signatureValue,this.subjectPublicKeyInfo,this.signatureAlgorithm)}async getPublicKey(e,t=kt(!0)){return t.getPublicKey(this.subjectPublicKeyInfo,this.signatureAlgorithm,e)}};G0e.CLASS_NAME="CertificationRequest";var Bh="digestAlgorithm",Rh="digest",X0e=[Bh,Rh],Gh=class dx extends Re{static{o(this,"DigestInfo")}constructor(e={}){super(),this.digestAlgorithm=O(e,Bh,dx.defaultValues(Bh)),this.digest=O(e,Rh,dx.defaultValues(Rh)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Bh:return new we;case Rh:return new qe;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Bh:return we.compareWithDefault("algorithmId",t.algorithmId)&&!("algorithmParams"in t);case Rh:return t.isEqual(dx.defaultValues(e));default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[we.schema(t.digestAlgorithm||{names:{blockName:Bh}}),new qe({name:t.digest||Rh})]})}fromSchema(e){ke(e,X0e);let t=Be(e,e,dx.schema({names:{digestAlgorithm:{names:{blockName:Bh}},digest:Rh}}));Te.assertSchema(t,this.className),this.digestAlgorithm=new we({schema:t.result.digestAlgorithm}),this.digest=t.result.digest}toSchema(){return new J({value:[this.digestAlgorithm.toSchema(),this.digest]})}toJSON(){return{digestAlgorithm:this.digestAlgorithm.toJSON(),digest:this.digest.toJSON()}}};Gh.CLASS_NAME="DigestInfo";var Ym="eContentType",Ta="eContent",W0e=[Ym,Ta],Xh=class Oh extends Re{static{o(this,"EncapsulatedContentInfo")}constructor(e={}){if(super(),this.eContentType=O(e,Ym,Oh.defaultValues(Ym)),Ta in e&&(this.eContent=O(e,Ta,Oh.defaultValues(Ta)),this.eContent.idBlock.tagClass===1&&this.eContent.idBlock.tagNumber===4&&this.eContent.idBlock.isConstructed===!1)){let t=new qe({idBlock:{isConstructed:!0},isConstructed:!0}),n=0,s=this.eContent.valueBlock.valueHexView.slice().buffer,i=s.byteLength;for(;i>0;){let a=new Uint8Array(s,n,n+65536>s.byteLength?s.byteLength-n:65536),u=new ArrayBuffer(a.length),c=new Uint8Array(u);for(let l=0;l<c.length;l++)c[l]=a[l];t.valueBlock.value.push(new qe({valueHex:u})),i-=a.length,n+=a.length}this.eContent=t}e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Ym:return V;case Ta:return new qe;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Ym:return t===V;case Ta:return t.idBlock.tagClass===1&&t.idBlock.tagNumber===4?t.isEqual(Oh.defaultValues(Ta)):!1;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new ot({name:t.eContentType||V}),new fe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[new bt({name:t.eContent||V})]})]})}fromSchema(e){ke(e,W0e);let t=Be(e,e,Oh.schema({names:{eContentType:Ym,eContent:Ta}}));Te.assertSchema(t,this.className),this.eContentType=t.result.eContentType.valueBlock.toString(),Ta in t.result&&(this.eContent=t.result.eContent)}toSchema(){let e=[];return e.push(new ot({value:this.eContentType})),this.eContent&&Oh.compareWithDefault(Ta,this.eContent)===!1&&e.push(new fe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[this.eContent]})),new J({value:e})}toJSON(){let e={eContentType:this.eContentType};return this.eContent&&Oh.compareWithDefault(Ta,this.eContent)===!1&&(e.eContent=this.eContent.toJSON()),e}};Xh.CLASS_NAME="EncapsulatedContentInfo";var Ph="mac",kh="macSalt",gu="iterations",z0e=[Ph,kh,gu],bl=class Lh extends Re{static{o(this,"MacData")}constructor(e={}){super(),this.mac=O(e,Ph,Lh.defaultValues(Ph)),this.macSalt=O(e,kh,Lh.defaultValues(kh)),gu in e&&(this.iterations=O(e,gu,Lh.defaultValues(gu))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Ph:return new Gh;case kh:return new qe;case gu:return 1;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Ph:return Gh.compareWithDefault("digestAlgorithm",t.digestAlgorithm)&&Gh.compareWithDefault("digest",t.digest);case kh:return t.isEqual(Lh.defaultValues(e));case gu:return t===Lh.defaultValues(e);default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,optional:t.optional||!0,value:[Gh.schema(t.mac||{names:{blockName:Ph}}),new qe({name:t.macSalt||kh}),new xe({optional:!0,name:t.iterations||gu})]})}fromSchema(e){ke(e,z0e);let t=Be(e,e,Lh.schema({names:{mac:{names:{blockName:Ph}},macSalt:kh,iterations:gu}}));Te.assertSchema(t,this.className),this.mac=new Gh({schema:t.result.mac}),this.macSalt=t.result.macSalt,gu in t.result&&(this.iterations=t.result.iterations.valueBlock.valueDec)}toSchema(){let e=[this.mac.toSchema(),this.macSalt];return this.iterations!==void 0&&e.push(new xe({value:this.iterations})),new J({value:e})}toJSON(){let e={mac:this.mac.toJSON(),macSalt:this.macSalt.toJSON()};return this.iterations!==void 0&&(e.iterations=this.iterations),e}};bl.CLASS_NAME="MacData";var Wh="hashAlgorithm",zh="hashedMessage",J0e=[Wh,zh],_a=class Qm extends Re{static{o(this,"MessageImprint")}static async create(e,t,n=kt(!0)){let s=n.getOIDByAlgorithm({name:e},!0,"hashAlgorithm"),i=await n.digest(e,t);return new Qm({hashAlgorithm:new we({algorithmId:s,algorithmParams:new tn}),hashedMessage:new qe({valueHex:i})})}constructor(e={}){super(),this.hashAlgorithm=O(e,Wh,Qm.defaultValues(Wh)),this.hashedMessage=O(e,zh,Qm.defaultValues(zh)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Wh:return new we;case zh:return new qe;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Wh:return t.algorithmId===V&&!("algorithmParams"in t);case zh:return t.isEqual(Qm.defaultValues(e))===0;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[we.schema(t.hashAlgorithm||{}),new qe({name:t.hashedMessage||V})]})}fromSchema(e){ke(e,J0e);let t=Be(e,e,Qm.schema({names:{hashAlgorithm:{names:{blockName:Wh}},hashedMessage:zh}}));Te.assertSchema(t,this.className),this.hashAlgorithm=new we({schema:t.result.hashAlgorithm}),this.hashedMessage=t.result.hashedMessage}toSchema(){return new J({value:[this.hashAlgorithm.toSchema(),this.hashedMessage]})}toJSON(){return{hashAlgorithm:this.hashAlgorithm.toJSON(),hashedMessage:this.hashedMessage.toJSON()}}};_a.CLASS_NAME="MessageImprint";var Zm="reqCert",Al="singleRequestExtensions",Y0e=[Zm,Al],zC=class mx extends Re{static{o(this,"Request")}constructor(e={}){super(),this.reqCert=O(e,Zm,mx.defaultValues(Zm)),Al in e&&(this.singleRequestExtensions=O(e,Al,mx.defaultValues(Al))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Zm:return new yi;case Al:return[];default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Zm:return t.isEqual(mx.defaultValues(e));case Al:return t.length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[yi.schema(t.reqCert||{}),new fe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[Rn.schema(t.extensions||{names:{blockName:t.singleRequestExtensions||V}})]})]})}fromSchema(e){ke(e,Y0e);let t=Be(e,e,mx.schema({names:{reqCert:{names:{blockName:Zm}},extensions:{names:{blockName:Al}}}}));Te.assertSchema(t,this.className),this.reqCert=new yi({schema:t.result.reqCert}),Al in t.result&&(this.singleRequestExtensions=Array.from(t.result.singleRequestExtensions.valueBlock.value,n=>new ea({schema:n})))}toSchema(){let e=[];return e.push(this.reqCert.toSchema()),this.singleRequestExtensions&&e.push(new fe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[new J({value:Array.from(this.singleRequestExtensions,t=>t.toSchema())})]})),new J({value:e})}toJSON(){let e={reqCert:this.reqCert.toJSON()};return this.singleRequestExtensions&&(e.singleRequestExtensions=Array.from(this.singleRequestExtensions,t=>t.toJSON())),e}};zC.CLASS_NAME="Request";var pA="tbs",e0="version",t0="requestorName",dA="requestList",r0="requestExtensions",_0="TBSRequest",cC=`${_0}.${e0}`,lC=`${_0}.${t0}`,MR=`${_0}.requests`,fC=`${_0}.${r0}`,Q0e=[_0,cC,lC,MR,fC],vu=class yu extends Re{static{o(this,"TBSRequest")}get tbs(){return vt.toArrayBuffer(this.tbsView)}set tbs(e){this.tbsView=new Uint8Array(e)}constructor(e={}){super(),this.tbsView=new Uint8Array(O(e,pA,yu.defaultValues(pA))),e0 in e&&(this.version=O(e,e0,yu.defaultValues(e0))),t0 in e&&(this.requestorName=O(e,t0,yu.defaultValues(t0))),this.requestList=O(e,dA,yu.defaultValues(dA)),r0 in e&&(this.requestExtensions=O(e,r0,yu.defaultValues(r0))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case pA:return hn;case e0:return 0;case t0:return new _r;case dA:case r0:return[];default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case pA:return t.byteLength===0;case e0:return t===yu.defaultValues(e);case t0:return t.type===_r.defaultValues("type")&&Object.keys(t.value).length===0;case dA:case r0:return t.length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||_0,value:[new fe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[new xe({name:t.TBSRequestVersion||cC})]}),new fe({optional:!0,idBlock:{tagClass:3,tagNumber:1},value:[_r.schema(t.requestorName||{names:{blockName:lC}})]}),new J({name:t.requestList||"TBSRequest.requestList",value:[new Bt({name:t.requests||MR,value:zC.schema(t.requestNames||{})})]}),new fe({optional:!0,idBlock:{tagClass:3,tagNumber:2},value:[Rn.schema(t.extensions||{names:{blockName:t.requestExtensions||fC}})]})]})}fromSchema(e){ke(e,Q0e);let t=Be(e,e,yu.schema());Te.assertSchema(t,this.className),this.tbsView=t.result.TBSRequest.valueBeforeDecodeView,cC in t.result&&(this.version=t.result[cC].valueBlock.valueDec),lC in t.result&&(this.requestorName=new _r({schema:t.result[lC]})),this.requestList=Array.from(t.result[MR],n=>new zC({schema:n})),fC in t.result&&(this.requestExtensions=Array.from(t.result[fC].valueBlock.value,n=>new ea({schema:n})))}toSchema(e=!1){let t;if(e===!1){if(this.tbsView.byteLength===0)return yu.schema();let n=en(this.tbsView);if(Te.assert(n,"TBS Request"),!(n.result instanceof J))throw new Error("ASN.1 result should be SEQUENCE");t=n.result}else{let n=[];this.version!==void 0&&n.push(new fe({idBlock:{tagClass:3,tagNumber:0},value:[new xe({value:this.version})]})),this.requestorName&&n.push(new fe({idBlock:{tagClass:3,tagNumber:1},value:[this.requestorName.toSchema()]})),n.push(new J({value:Array.from(this.requestList,s=>s.toSchema())})),this.requestExtensions&&n.push(new fe({idBlock:{tagClass:3,tagNumber:2},value:[new J({value:Array.from(this.requestExtensions,s=>s.toSchema())})]})),t=new J({value:n})}return t}toJSON(){let e={};return this.version!=null&&(e.version=this.version),this.requestorName&&(e.requestorName=this.requestorName.toJSON()),e.requestList=Array.from(this.requestList,t=>t.toJSON()),this.requestExtensions&&(e.requestExtensions=Array.from(this.requestExtensions,t=>t.toJSON())),e}};vu.CLASS_NAME="TBSRequest";var qd="signatureAlgorithm",Hd="signature",Uc="certs",Vh=class n0 extends Re{static{o(this,"Signature")}constructor(e={}){super(),this.signatureAlgorithm=O(e,qd,n0.defaultValues(qd)),this.signature=O(e,Hd,n0.defaultValues(Hd)),Uc in e&&(this.certs=O(e,Uc,n0.defaultValues(Uc))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case qd:return new we;case Hd:return new Gt;case Uc:return[];default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case qd:return t.algorithmId===V&&!("algorithmParams"in t);case Hd:return t.isEqual(n0.defaultValues(e));case Uc:return t.length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[we.schema(t.signatureAlgorithm||{}),new Gt({name:t.signature||V}),new fe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[new J({value:[new Bt({name:t.certs||V,value:vs.schema({})})]})]})]})}fromSchema(e){ke(e,[qd,Hd,Uc]);let t=Be(e,e,n0.schema({names:{signatureAlgorithm:{names:{blockName:qd}},signature:Hd,certs:Uc}}));Te.assertSchema(t,this.className),this.signatureAlgorithm=new we({schema:t.result.signatureAlgorithm}),this.signature=t.result.signature,Uc in t.result&&(this.certs=Array.from(t.result.certs,n=>new vs({schema:n})))}toSchema(){let e=[];return e.push(this.signatureAlgorithm.toSchema()),e.push(this.signature),this.certs&&e.push(new fe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[new J({value:Array.from(this.certs,t=>t.toSchema())})]})),new J({value:e})}toJSON(){let e={signatureAlgorithm:this.signatureAlgorithm.toJSON(),signature:this.signature.toJSON()};return this.certs&&(e.certs=Array.from(this.certs,t=>t.toJSON())),e}};Vh.CLASS_NAME="Signature";var s0="tbsRequest",Cl="optionalSignature",Z0e=[s0,Cl],ege=class hC extends Re{static{o(this,"OCSPRequest")}constructor(e={}){super(),this.tbsRequest=O(e,s0,hC.defaultValues(s0)),Cl in e&&(this.optionalSignature=O(e,Cl,hC.defaultValues(Cl))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case s0:return new vu;case Cl:return new Vh;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case s0:return vu.compareWithDefault("tbs",t.tbs)&&vu.compareWithDefault("version",t.version)&&vu.compareWithDefault("requestorName",t.requestorName)&&vu.compareWithDefault("requestList",t.requestList)&&vu.compareWithDefault("requestExtensions",t.requestExtensions);case Cl:return Vh.compareWithDefault("signatureAlgorithm",t.signatureAlgorithm)&&Vh.compareWithDefault("signature",t.signature)&&Vh.compareWithDefault("certs",t.certs);default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||"OCSPRequest",value:[vu.schema(t.tbsRequest||{names:{blockName:s0}}),new fe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[Vh.schema(t.optionalSignature||{names:{blockName:Cl}})]})]})}fromSchema(e){ke(e,Z0e);let t=Be(e,e,hC.schema());Te.assertSchema(t,this.className),this.tbsRequest=new vu({schema:t.result.tbsRequest}),Cl in t.result&&(this.optionalSignature=new Vh({schema:t.result.optionalSignature}))}toSchema(e=!1){let t=[];return t.push(this.tbsRequest.toSchema(e)),this.optionalSignature&&t.push(new fe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[this.optionalSignature.toSchema()]})),new J({value:t})}toJSON(){let e={tbsRequest:this.tbsRequest.toJSON()};return this.optionalSignature&&(e.optionalSignature=this.optionalSignature.toJSON()),e}async createForCertificate(e,t,n=kt(!0)){let s=new yi;await s.createForCertificate(e,t,n),this.tbsRequest.requestList.push(new zC({reqCert:s}))}async sign(e,t="SHA-1",n=kt(!0)){if(gr.assertEmpty(e,"privateKey","OCSPRequest.sign method"),!this.optionalSignature)throw new Error('Need to create "optionalSignature" field before signing');let s=await n.getSignatureParameters(e,t),i=s.parameters;this.optionalSignature.signatureAlgorithm=s.signatureAlgorithm;let a=this.tbsRequest.toSchema(!0).toBER(!1),u=await n.signWithPrivateKey(a,e,i);this.optionalSignature.signature=new Gt({valueHex:u})}verify(){}};ege.CLASS_NAME="OCSPRequest";var i0="responseType",a0="response",tge=[i0,a0],o0=class gx extends Re{static{o(this,"ResponseBytes")}constructor(e={}){super(),this.responseType=O(e,i0,gx.defaultValues(i0)),this.response=O(e,a0,gx.defaultValues(a0)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case i0:return V;case a0:return new qe;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case i0:return t===V;case a0:return t.isEqual(gx.defaultValues(e));default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new ot({name:t.responseType||V}),new qe({name:t.response||V})]})}fromSchema(e){ke(e,tge);let t=Be(e,e,gx.schema({names:{responseType:i0,response:a0}}));Te.assertSchema(t,this.className),this.responseType=t.result.responseType.valueBlock.toString(),this.response=t.result.response}toSchema(){return new J({value:[new ot({value:this.responseType}),this.response]})}toJSON(){return{responseType:this.responseType,response:this.response.toJSON()}}};o0.CLASS_NAME="ResponseBytes";var Kd="responseStatus",nu="responseBytes",rge=class vx extends Re{static{o(this,"OCSPResponse")}constructor(e={}){super(),this.responseStatus=O(e,Kd,vx.defaultValues(Kd)),nu in e&&(this.responseBytes=O(e,nu,vx.defaultValues(nu))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Kd:return new Bc;case nu:return new o0;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Kd:return t.isEqual(vx.defaultValues(e));case nu:return o0.compareWithDefault("responseType",t.responseType)&&o0.compareWithDefault("response",t.response);default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||"OCSPResponse",value:[new Bc({name:t.responseStatus||Kd}),new fe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[o0.schema(t.responseBytes||{names:{blockName:nu}})]})]})}fromSchema(e){ke(e,[Kd,nu]);let t=Be(e,e,vx.schema());Te.assertSchema(t,this.className),this.responseStatus=t.result.responseStatus,nu in t.result&&(this.responseBytes=new o0({schema:t.result.responseBytes}))}toSchema(){let e=[];return e.push(this.responseStatus),this.responseBytes&&e.push(new fe({idBlock:{tagClass:3,tagNumber:0},value:[this.responseBytes.toSchema()]})),new J({value:e})}toJSON(){let e={responseStatus:this.responseStatus.toJSON()};return this.responseBytes&&(e.responseBytes=this.responseBytes.toJSON()),e}async getCertificateStatus(e,t,n=kt(!0)){let s,i={isForCertificate:!1,status:2};if(!this.responseBytes||this.responseBytes.responseType!==wA)return i;try{let a=en(this.responseBytes.response.valueBlock.valueHexView);Te.assert(a,"Basic OCSP response"),s=new Vx({schema:a.result})}catch{return i}return s.getCertificateStatus(e,t,n)}async sign(e,t,n=kt(!0)){var s;if(this.responseBytes&&this.responseBytes.responseType===wA)return Vx.fromBER(this.responseBytes.response.valueBlock.valueHexView).sign(e,t,n);throw new Error(`Unknown ResponseBytes type: ${((s=this.responseBytes)===null||s===void 0?void 0:s.responseType)||"Unknown"}`)}async verify(e=null,t=kt(!0)){var n;if(!(nu in this))throw new Error("Empty ResponseBytes field");if(this.responseBytes&&this.responseBytes.responseType===wA){let s=Vx.fromBER(this.responseBytes.response.valueBlock.valueHexView);return e!==null&&(s.certs||(s.certs=[]),s.certs.push(e)),s.verify({},t)}throw new Error(`Unknown ResponseBytes type: ${((n=this.responseBytes)===null||n===void 0?void 0:n.responseType)||"Unknown"}`)}};rge.CLASS_NAME="OCSPResponse";var Pf="type",xu="attributes",mA="encodedValue",nge=[xu],ri=class wo extends Re{static{o(this,"SignedAndUnsignedAttributes")}constructor(e={}){super(),this.type=O(e,Pf,wo.defaultValues(Pf)),this.attributes=O(e,xu,wo.defaultValues(xu)),this.encodedValue=O(e,mA,wo.defaultValues(mA)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Pf:return-1;case xu:return[];case mA:return hn;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Pf:return t===wo.defaultValues(Pf);case xu:return t.length===0;case mA:return t.byteLength===0;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new fe({name:t.blockName||V,optional:!0,idBlock:{tagClass:3,tagNumber:t.tagNumber||0},value:[new Bt({name:t.attributes||V,value:pn.schema()})]})}fromSchema(e){ke(e,nge);let t=Be(e,e,wo.schema({names:{tagNumber:this.type,attributes:xu}}));Te.assertSchema(t,this.className),this.type=t.result.idBlock.tagNumber,this.encodedValue=vt.toArrayBuffer(t.result.valueBeforeDecodeView);let n=new Uint8Array(this.encodedValue);if(n[0]=49,!(xu in t.result)){if(this.type===0)throw new Error("Wrong structure of SignedUnsignedAttributes");return}this.attributes=Array.from(t.result.attributes,s=>new pn({schema:s}))}toSchema(){if(wo.compareWithDefault(Pf,this.type)||wo.compareWithDefault(xu,this.attributes))throw new Error('Incorrectly initialized "SignedAndUnsignedAttributes" class');return new fe({optional:!0,idBlock:{tagClass:3,tagNumber:this.type},value:Array.from(this.attributes,e=>e.toSchema())})}toJSON(){if(wo.compareWithDefault(Pf,this.type)||wo.compareWithDefault(xu,this.attributes))throw new Error('Incorrectly initialized "SignedAndUnsignedAttributes" class');return{type:this.type,attributes:Array.from(this.attributes,e=>e.toJSON())}}};ri.CLASS_NAME="SignedAndUnsignedAttributes";var u0="version",Uh="sid",c0="digestAlgorithm",Nl="signedAttrs",l0="signatureAlgorithm",yx="signature",Tl="unsignedAttrs",Ol="SignerInfo",qR=`${Ol}.${u0}`,xx=`${Ol}.${Uh}`,HR=`${Ol}.${c0}`,pC=`${Ol}.${Nl}`,KR=`${Ol}.${l0}`,$R=`${Ol}.${yx}`,dC=`${Ol}.${Tl}`,sge=[qR,xx,HR,pC,KR,$R,dC],JC=class Kn extends Re{static{o(this,"SignerInfo")}constructor(e={}){super(),this.version=O(e,u0,Kn.defaultValues(u0)),this.sid=O(e,Uh,Kn.defaultValues(Uh)),this.digestAlgorithm=O(e,c0,Kn.defaultValues(c0)),Nl in e&&(this.signedAttrs=O(e,Nl,Kn.defaultValues(Nl))),this.signatureAlgorithm=O(e,l0,Kn.defaultValues(l0)),this.signature=O(e,yx,Kn.defaultValues(yx)),Tl in e&&(this.unsignedAttrs=O(e,Tl,Kn.defaultValues(Tl))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case u0:return 0;case Uh:return new bt;case c0:return new we;case Nl:return new ri({type:0});case l0:return new we;case yx:return new qe;case Tl:return new ri({type:1});default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case u0:return Kn.defaultValues(u0)===t;case Uh:return t instanceof bt;case c0:return t instanceof we?t.isEqual(Kn.defaultValues(c0)):!1;case Nl:return ri.compareWithDefault("type",t.type)&&ri.compareWithDefault("attributes",t.attributes)&&ri.compareWithDefault("encodedValue",t.encodedValue);case l0:return t instanceof we?t.isEqual(Kn.defaultValues(l0)):!1;case yx:case Tl:return ri.compareWithDefault("type",t.type)&&ri.compareWithDefault("attributes",t.attributes)&&ri.compareWithDefault("encodedValue",t.encodedValue);default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:Ol,value:[new xe({name:t.version||qR}),new Mr({value:[ns.schema(t.sidSchema||{names:{blockName:xx}}),new Mr({value:[new fe({optional:!0,name:t.sid||xx,idBlock:{tagClass:3,tagNumber:0},value:[new qe]}),new xt({optional:!0,name:t.sid||xx,idBlock:{tagClass:3,tagNumber:0}})]})]}),we.schema(t.digestAlgorithm||{names:{blockName:HR}}),ri.schema(t.signedAttrs||{names:{blockName:pC,tagNumber:0}}),we.schema(t.signatureAlgorithm||{names:{blockName:KR}}),new qe({name:t.signature||$R}),ri.schema(t.unsignedAttrs||{names:{blockName:dC,tagNumber:1}})]})}fromSchema(e){ke(e,sge);let t=Be(e,e,Kn.schema());Te.assertSchema(t,this.className),this.version=t.result[qR].valueBlock.valueDec;let n=t.result[xx];n.idBlock.tagClass===1?this.sid=new ns({schema:n}):this.sid=n,this.digestAlgorithm=new we({schema:t.result[HR]}),pC in t.result&&(this.signedAttrs=new ri({type:0,schema:t.result[pC]})),this.signatureAlgorithm=new we({schema:t.result[KR]}),this.signature=t.result[$R],dC in t.result&&(this.unsignedAttrs=new ri({type:1,schema:t.result[dC]}))}toSchema(){if(Kn.compareWithDefault(Uh,this.sid))throw new Error('Incorrectly initialized "SignerInfo" class');let e=[];return e.push(new xe({value:this.version})),this.sid instanceof ns?e.push(this.sid.toSchema()):e.push(this.sid),e.push(this.digestAlgorithm.toSchema()),this.signedAttrs&&Kn.compareWithDefault(Nl,this.signedAttrs)===!1&&e.push(this.signedAttrs.toSchema()),e.push(this.signatureAlgorithm.toSchema()),e.push(this.signature),this.unsignedAttrs&&Kn.compareWithDefault(Tl,this.unsignedAttrs)===!1&&e.push(this.unsignedAttrs.toSchema()),new J({value:e})}toJSON(){if(Kn.compareWithDefault(Uh,this.sid))throw new Error('Incorrectly initialized "SignerInfo" class');let e={version:this.version,digestAlgorithm:this.digestAlgorithm.toJSON(),signatureAlgorithm:this.signatureAlgorithm.toJSON(),signature:this.signature.toJSON()};return this.sid instanceof bt||(e.sid=this.sid.toJSON()),this.signedAttrs&&Kn.compareWithDefault(Nl,this.signedAttrs)===!1&&(e.signedAttrs=this.signedAttrs.toJSON()),this.unsignedAttrs&&Kn.compareWithDefault(Tl,this.unsignedAttrs)===!1&&(e.unsignedAttrs=this.unsignedAttrs.toJSON()),e}};JC.CLASS_NAME="SignerInfo";var wx="version",Ex="policy",Sx="messageImprint",bx="serialNumber",Ax="genTime",jh="ordering",Fh="nonce",f0="accuracy",h0="tsa",p0="extensions",Ba="TSTInfo",GR=`${Ba}.${wx}`,XR=`${Ba}.${Ex}`,WR=`${Ba}.${Sx}`,zR=`${Ba}.${bx}`,JR=`${Ba}.${Ax}`,mC=`${Ba}.${f0}`,gC=`${Ba}.${jh}`,vC=`${Ba}.${Fh}`,yC=`${Ba}.${h0}`,xC=`${Ba}.${p0}`,ige=[GR,XR,WR,zR,JR,mC,gC,vC,yC,xC],yH=class ti extends Re{static{o(this,"TSTInfo")}constructor(e={}){super(),this.version=O(e,wx,ti.defaultValues(wx)),this.policy=O(e,Ex,ti.defaultValues(Ex)),this.messageImprint=O(e,Sx,ti.defaultValues(Sx)),this.serialNumber=O(e,bx,ti.defaultValues(bx)),this.genTime=O(e,Ax,ti.defaultValues(Ax)),f0 in e&&(this.accuracy=O(e,f0,ti.defaultValues(f0))),jh in e&&(this.ordering=O(e,jh,ti.defaultValues(jh))),Fh in e&&(this.nonce=O(e,Fh,ti.defaultValues(Fh))),h0 in e&&(this.tsa=O(e,h0,ti.defaultValues(h0))),p0 in e&&(this.extensions=O(e,p0,ti.defaultValues(p0))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case wx:return 0;case Ex:return V;case Sx:return new _a;case bx:return new xe;case Ax:return new Date(0,0,0);case f0:return new kf;case jh:return!1;case Fh:return new xe;case h0:return new _r;case p0:return[];default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case wx:case Ex:case Ax:case jh:return t===ti.defaultValues(jh);case Sx:return _a.compareWithDefault(Wh,t.hashAlgorithm)&&_a.compareWithDefault(zh,t.hashedMessage);case bx:case Fh:return t.isEqual(ti.defaultValues(Fh));case f0:return kf.compareWithDefault(jc,t.seconds)&&kf.compareWithDefault(Fc,t.millis)&&kf.compareWithDefault(Mc,t.micros);case h0:return _r.compareWithDefault(cy,t.type)&&_r.compareWithDefault(ly,t.value);case p0:return t.length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||Ba,value:[new xe({name:t.version||GR}),new ot({name:t.policy||XR}),_a.schema(t.messageImprint||{names:{blockName:WR}}),new xe({name:t.serialNumber||zR}),new Fr({name:t.genTime||JR}),kf.schema(t.accuracy||{names:{blockName:mC}}),new Ea({name:t.ordering||gC,optional:!0}),new xe({name:t.nonce||vC,optional:!0}),new fe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[_r.schema(t.tsa||{names:{blockName:yC}})]}),new fe({optional:!0,idBlock:{tagClass:3,tagNumber:1},value:[new Bt({name:t.extensions||xC,value:ea.schema(t.extension||{})})]})]})}fromSchema(e){ke(e,ige);let t=Be(e,e,ti.schema());Te.assertSchema(t,this.className),this.version=t.result[GR].valueBlock.valueDec,this.policy=t.result[XR].valueBlock.toString(),this.messageImprint=new _a({schema:t.result[WR]}),this.serialNumber=t.result[zR],this.genTime=t.result[JR].toDate(),mC in t.result&&(this.accuracy=new kf({schema:t.result[mC]})),gC in t.result&&(this.ordering=t.result[gC].valueBlock.value),vC in t.result&&(this.nonce=t.result[vC]),yC in t.result&&(this.tsa=new _r({schema:t.result[yC]})),xC in t.result&&(this.extensions=Array.from(t.result[xC],n=>new ea({schema:n})))}toSchema(){let e=[];return e.push(new xe({value:this.version})),e.push(new ot({value:this.policy})),e.push(this.messageImprint.toSchema()),e.push(this.serialNumber),e.push(new Fr({valueDate:this.genTime})),this.accuracy&&e.push(this.accuracy.toSchema()),this.ordering!==void 0&&e.push(new Ea({value:this.ordering})),this.nonce&&e.push(this.nonce),this.tsa&&e.push(new fe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[this.tsa.toSchema()]})),this.extensions&&e.push(new fe({optional:!0,idBlock:{tagClass:3,tagNumber:1},value:Array.from(this.extensions,t=>t.toSchema())})),new J({value:e})}toJSON(){let e={version:this.version,policy:this.policy,messageImprint:this.messageImprint.toJSON(),serialNumber:this.serialNumber.toJSON(),genTime:this.genTime};return this.accuracy&&(e.accuracy=this.accuracy.toJSON()),this.ordering!==void 0&&(e.ordering=this.ordering),this.nonce&&(e.nonce=this.nonce.toJSON()),this.tsa&&(e.tsa=this.tsa.toJSON()),this.extensions&&(e.extensions=Array.from(this.extensions,t=>t.toJSON())),e}async verify(e,t=kt(!0)){if(!e.data)throw new Error('"data" is a mandatory attribute for TST_INFO verification');let n=e.data;if(e.notBefore&&this.genTime<e.notBefore)throw new Error("Generation time for TSTInfo object is less than notBefore value");if(e.notAfter&&this.genTime>e.notAfter)throw new Error("Generation time for TSTInfo object is more than notAfter value");let s=t.getAlgorithmByOID(this.messageImprint.hashAlgorithm.algorithmId,!0,"MessageImprint.hashAlgorithm"),i=await t.digest(s.name,new Uint8Array(n));return vt.isEqual(i,this.messageImprint.hashedMessage.valueBlock.valueHexView)}};yH.CLASS_NAME="TSTInfo";var d0="version",Cx="digestAlgorithms",Nx="encapContentInfo",m0="certificates",g0="crls",Tx="signerInfos",iy="ocsps",tp="SignedData",YR=`${tp}.${d0}`,wC=`${tp}.${Cx}`,QR=`${tp}.${Nx}`,EC=`${tp}.${m0}`,SC=`${tp}.${g0}`,bC=`${tp}.${Tx}`,age=[YR,wC,QR,EC,SC,bC],ds=class extends Error{static{o(this,"SignedDataVerifyError")}constructor({message:e,code:t=0,date:n=new Date,signatureVerified:s=null,signerCertificate:i=null,signerCertificateVerified:a=null,timestampSerial:u=null,certificatePath:c=[]}){super(e),this.name="SignedDataVerifyError",this.date=n,this.code=t,this.timestampSerial=u,this.signatureVerified=s,this.signerCertificate=i,this.signerCertificateVerified=a,this.certificatePath=c}},T0=class Ia extends Re{static{o(this,"SignedData")}constructor(e={}){super(),this.version=O(e,d0,Ia.defaultValues(d0)),this.digestAlgorithms=O(e,Cx,Ia.defaultValues(Cx)),this.encapContentInfo=O(e,Nx,Ia.defaultValues(Nx)),m0 in e&&(this.certificates=O(e,m0,Ia.defaultValues(m0))),g0 in e&&(this.crls=O(e,g0,Ia.defaultValues(g0))),iy in e&&(this.ocsps=O(e,iy,Ia.defaultValues(iy))),this.signerInfos=O(e,Tx,Ia.defaultValues(Tx)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case d0:return 0;case Cx:return[];case Nx:return new Xh;case m0:return[];case g0:return[];case iy:return[];case Tx:return[];default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case d0:return t===Ia.defaultValues(d0);case Nx:return Xh.compareWithDefault("eContentType",t.eContentType)&&Xh.compareWithDefault("eContent",t.eContent);case Cx:case m0:case g0:case iy:case Tx:return t.length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return t.optional===void 0&&(t.optional=!1),new J({name:t.blockName||tp,optional:t.optional,value:[new xe({name:t.version||YR}),new rn({value:[new Bt({name:t.digestAlgorithms||wC,value:we.schema()})]}),Xh.schema(t.encapContentInfo||{names:{blockName:QR}}),new fe({name:t.certificates||EC,optional:!0,idBlock:{tagClass:3,tagNumber:0},value:Qh.schema().valueBlock.value}),new fe({optional:!0,idBlock:{tagClass:3,tagNumber:1},value:Ox.schema(t.crls||{names:{crls:SC}}).valueBlock.value}),new rn({value:[new Bt({name:t.signerInfos||bC,value:JC.schema()})]})]})}fromSchema(e){ke(e,age);let t=Be(e,e,Ia.schema());if(Te.assertSchema(t,this.className),this.version=t.result[YR].valueBlock.valueDec,wC in t.result&&(this.digestAlgorithms=Array.from(t.result[wC],n=>new we({schema:n}))),this.encapContentInfo=new Xh({schema:t.result[QR]}),EC in t.result){let n=new Qh({schema:new rn({value:t.result[EC].valueBlock.value})});this.certificates=n.certificates.slice(0)}SC in t.result&&(this.crls=Array.from(t.result[SC],n=>n.idBlock.tagClass===1?new Fx({schema:n}):(n.idBlock.tagClass=1,n.idBlock.tagNumber=16,new Rx({schema:n})))),bC in t.result&&(this.signerInfos=Array.from(t.result[bC],n=>new JC({schema:n})))}toSchema(e=!1){let t=[];if(this.certificates&&this.certificates.length&&this.certificates.some(n=>n instanceof XA)||this.crls&&this.crls.length&&this.crls.some(n=>n instanceof Rx)?this.version=5:this.certificates&&this.certificates.length&&this.certificates.some(n=>n instanceof Bl)?this.version=4:this.certificates&&this.certificates.length&&this.certificates.some(n=>n instanceof BC)||this.signerInfos.some(n=>n.version===3)||this.encapContentInfo.eContentType!==Ia.ID_DATA?this.version=3:this.version=1,t.push(new xe({value:this.version})),t.push(new rn({value:Array.from(this.digestAlgorithms,n=>n.toSchema())})),t.push(this.encapContentInfo.toSchema()),this.certificates){let s=new Qh({certificates:this.certificates}).toSchema();t.push(new fe({idBlock:{tagClass:3,tagNumber:0},value:s.valueBlock.value}))}return this.crls&&t.push(new fe({idBlock:{tagClass:3,tagNumber:1},value:Array.from(this.crls,n=>{if(n instanceof Rx){let s=n.toSchema();return s.idBlock.tagClass=3,s.idBlock.tagNumber=1,s}return n.toSchema(e)})})),t.push(new rn({value:Array.from(this.signerInfos,n=>n.toSchema())})),new J({value:t})}toJSON(){let e={version:this.version,digestAlgorithms:Array.from(this.digestAlgorithms,t=>t.toJSON()),encapContentInfo:this.encapContentInfo.toJSON(),signerInfos:Array.from(this.signerInfos,t=>t.toJSON())};return this.certificates&&(e.certificates=Array.from(this.certificates,t=>t.toJSON())),this.crls&&(e.crls=Array.from(this.crls,t=>t.toJSON())),e}async verify({signer:e=-1,data:t=hn,trustedCerts:n=[],checkDate:s=new Date,checkChain:i=!1,passedWhenNotRevValues:a=!1,extendedMode:u=!1,findOrigin:c=null,findIssuer:l=null}={},h=kt(!0)){let m=null,g=null;try{let y=hn,v=V,E=[],w=this.signerInfos[e];if(!w)throw new ds({date:s,code:1,message:"Unable to get signer by supplied index"});if(!this.certificates)throw new ds({date:s,code:2,message:"No certificates attached to this signed data"});if(w.sid instanceof ns){for(let A of this.certificates)if(A instanceof vs&&A.issuer.isEqual(w.sid.issuer)&&A.serialNumber.isEqual(w.sid.serialNumber)){m=A;break}}else{let A=w.sid,T=A.idBlock.isConstructed?A.valueBlock.value[0].valueBlock.valueHex:A.valueBlock.valueHex;for(let B of this.certificates){if(!(B instanceof vs))continue;let M=await h.digest({name:"sha-1"},B.subjectPublicKeyInfo.subjectPublicKey.valueBlock.valueHexView);if(_c(M,T)){m=B;break}}}if(!m)throw new ds({date:s,code:3,message:"Unable to find signer certificate"});if(this.encapContentInfo.eContentType===ime){if(!this.encapContentInfo.eContent)throw new ds({date:s,code:15,message:"Error during verification: TSTInfo eContent is empty",signatureVerified:null,signerCertificate:m,timestampSerial:g,signerCertificateVerified:!0});let A;try{A=yH.fromBER(this.encapContentInfo.eContent.valueBlock.valueHexView)}catch{throw new ds({date:s,code:15,message:"Error during verification: TSTInfo wrong ASN.1 schema ",signatureVerified:null,signerCertificate:m,timestampSerial:g,signerCertificateVerified:!0})}if(s=A.genTime,g=A.serialNumber.valueBlock.valueHexView.slice().buffer,t.byteLength===0)throw new ds({date:s,code:4,message:"Missed detached data input array"});if(!await A.verify({data:t},h))throw new ds({date:s,code:15,message:"Error during verification: TSTInfo verification is failed",signatureVerified:!1,signerCertificate:m,timestampSerial:g,signerCertificateVerified:!0})}if(i){let A=this.certificates.filter(I=>I instanceof vs&&!!oH(I,m)),T={checkDate:s,certs:A,trustedCerts:n};l&&(T.findIssuer=l),c&&(T.findOrigin=c);let B=new gH(T);if(B.certs.push(m),this.crls)for(let I of this.crls)"thisUpdate"in I?B.crls.push(I):I.otherRevInfoFormat===wA&&B.ocsps.push(new Vx({schema:I.otherRevInfo}));this.ocsps&&B.ocsps.push(...this.ocsps);let M=await B.verify({passedWhenNotRevValues:a},h).catch(I=>{throw new ds({date:s,code:5,message:`Validation of signer's certificate failed with error: ${I instanceof Object?I.resultMessage:I}`,signerCertificate:m,signerCertificateVerified:!1})});if(M.certificatePath&&(E=M.certificatePath),!M.result)throw new ds({date:s,code:5,message:`Validation of signer's certificate failed: ${M.resultMessage}`,signerCertificate:m,signerCertificateVerified:!1})}let C=h.getAlgorithmByOID(w.digestAlgorithm.algorithmId);if(!("name"in C))throw new ds({date:s,code:7,message:`Unsupported signature algorithm: ${w.digestAlgorithm.algorithmId}`,signerCertificate:m,signerCertificateVerified:!0});v=C.name;let _=this.encapContentInfo.eContent;if(_)_.idBlock.tagClass===1&&_.idBlock.tagNumber===4?t=_.getValue():t=_.valueBlock.valueBeforeDecodeView.slice().buffer;else if(t.byteLength===0)throw new ds({date:s,code:8,message:"Missed detached data input array",signerCertificate:m,signerCertificateVerified:!0});if(w.signedAttrs){let A=!1,T=!1;for(let B of w.signedAttrs.attributes)if(B.type==="1.2.840.113549.1.9.3"&&(A=!0),B.type==="1.2.840.113549.1.9.4"&&(T=!0,y=B.values[0].valueBlock.valueHex),A&&T)break;if(A===!1)throw new ds({date:s,code:9,message:'Attribute "content-type" is a mandatory attribute for "signed attributes"',signerCertificate:m,signerCertificateVerified:!0});if(T===!1)throw new ds({date:s,code:10,message:'Attribute "message-digest" is a mandatory attribute for "signed attributes"',signatureVerified:null,signerCertificate:m,signerCertificateVerified:!0})}if(w.signedAttrs){let A=await h.digest(v,new Uint8Array(t));if(!_c(A,y))throw new ds({date:s,code:15,message:"Error during verification: Message digest doesn't match",signatureVerified:null,signerCertificate:m,timestampSerial:g,signerCertificateVerified:!0});t=w.signedAttrs.encodedValue}let b=w.signatureAlgorithm.algorithmId==="1.2.840.113549.1.1.1"?await h.verifyWithPublicKey(t,w.signature,m.subjectPublicKeyInfo,w.signatureAlgorithm,v):await h.verifyWithPublicKey(t,w.signature,m.subjectPublicKeyInfo,w.signatureAlgorithm);return u?{date:s,code:14,message:V,signatureVerified:b,signerCertificate:m,timestampSerial:g,signerCertificateVerified:!0,certificatePath:E}:b}catch(y){throw y instanceof ds?y:new ds({date:s,code:15,message:`Error during verification: ${y instanceof Error?y.message:y}`,signatureVerified:null,signerCertificate:m,timestampSerial:g,signerCertificateVerified:!0})}}async sign(e,t,n="SHA-1",s=hn,i=kt(!0)){var a;if(!e)throw new Error("Need to provide a private key for signing");let u=this.signerInfos[t];if(!u)throw new RangeError("SignerInfo index is out of range");!(!((a=u.signedAttrs)===null||a===void 0)&&a.attributes.length)&&"hash"in e.algorithm&&"hash"in e.algorithm&&e.algorithm.hash&&(n=e.algorithm.hash.name);let c=i.getOIDByAlgorithm({name:n},!0,"hashAlgorithm");this.digestAlgorithms.filter(g=>g.algorithmId===c).length===0&&this.digestAlgorithms.push(new we({algorithmId:c,algorithmParams:new tn})),u.digestAlgorithm=new we({algorithmId:c,algorithmParams:new tn});let l=await i.getSignatureParameters(e,n),h=l.parameters;if(u.signatureAlgorithm=l.signatureAlgorithm,u.signedAttrs)if(u.signedAttrs.encodedValue.byteLength!==0)s=u.signedAttrs.encodedValue;else{s=u.signedAttrs.toSchema().toBER();let g=vt.toUint8Array(s);g[0]=49}else{let g=this.encapContentInfo.eContent;if(g)g.idBlock.tagClass===1&&g.idBlock.tagNumber===4?s=g.getValue():s=g.valueBlock.valueBeforeDecodeView.slice().buffer;else if(s.byteLength===0)throw new Error("Missed detached data input array")}let m=await i.signWithPrivateKey(s,e,h);u.signature=new qe({valueHex:m})}};T0.CLASS_NAME="SignedData";T0.ID_DATA=aO;var Mh="version",qh="authSafe",wu="macData",ay="parsedValue",oge=[Mh,qh,wu],uge=class Hh extends Re{static{o(this,"PFX")}constructor(e={}){super(),this.version=O(e,Mh,Hh.defaultValues(Mh)),this.authSafe=O(e,qh,Hh.defaultValues(qh)),wu in e&&(this.macData=O(e,wu,Hh.defaultValues(wu))),ay in e&&(this.parsedValue=O(e,ay,Hh.defaultValues(ay))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Mh:return 3;case qh:return new sn;case wu:return new bl;case ay:return{};default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Mh:return t===Hh.defaultValues(e);case qh:return sn.compareWithDefault("contentType",t.contentType)&&sn.compareWithDefault("content",t.content);case wu:return bl.compareWithDefault("mac",t.mac)&&bl.compareWithDefault("macSalt",t.macSalt)&&bl.compareWithDefault("iterations",t.iterations);case ay:return t instanceof Object&&Object.keys(t).length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new xe({name:t.version||Mh}),sn.schema(t.authSafe||{names:{blockName:qh}}),bl.schema(t.macData||{names:{blockName:wu,optional:!0}})]})}fromSchema(e){ke(e,oge);let t=Be(e,e,Hh.schema({names:{version:Mh,authSafe:{names:{blockName:qh}},macData:{names:{blockName:wu}}}}));Te.assertSchema(t,this.className),this.version=t.result.version.valueBlock.valueDec,this.authSafe=new sn({schema:t.result.authSafe}),wu in t.result&&(this.macData=new bl({schema:t.result.macData}))}toSchema(){let e=[new xe({value:this.version}),this.authSafe.toSchema()];return this.macData&&e.push(this.macData.toSchema()),new J({value:e})}toJSON(){let e={version:this.version,authSafe:this.authSafe.toJSON()};return this.macData&&(e.macData=this.macData.toJSON()),e}async makeInternalValues(e={},t=kt(!0)){if(Ir.assert(e,"parameters","object"),!this.parsedValue)throw new Error('Please call "parseValues" function first in order to make "parsedValue" data');switch(gr.assertEmpty(this.parsedValue.integrityMode,"integrityMode","parsedValue"),gr.assertEmpty(this.parsedValue.authenticatedSafe,"authenticatedSafe","parsedValue"),this.parsedValue.integrityMode){case 0:{if(!("iterations"in e))throw new gr("iterations");gr.assertEmpty(e.pbkdf2HashAlgorithm,"pbkdf2HashAlgorithm"),gr.assertEmpty(e.hmacHashAlgorithm,"hmacHashAlgorithm"),gr.assertEmpty(e.password,"password");let n=new ArrayBuffer(64),s=new Uint8Array(n);t.getRandomValues(s);let i=this.parsedValue.authenticatedSafe.toSchema().toBER(!1);this.authSafe=new sn({contentType:sn.DATA,content:new qe({valueHex:i})});let a=await t.stampDataWithPassword({password:e.password,hashAlgorithm:e.hmacHashAlgorithm,salt:n,iterationCount:e.iterations,contentToStamp:i});this.macData=new bl({mac:new Gh({digestAlgorithm:new we({algorithmId:t.getOIDByAlgorithm({name:e.hmacHashAlgorithm},!0,"hmacHashAlgorithm")}),digest:new qe({valueHex:a})}),macSalt:new qe({valueHex:n}),iterations:e.iterations})}break;case 1:{if(!("signingCertificate"in e))throw new gr("signingCertificate");gr.assertEmpty(e.privateKey,"privateKey"),gr.assertEmpty(e.hashAlgorithm,"hashAlgorithm");let n=this.parsedValue.authenticatedSafe.toSchema().toBER(!1),s=new T0({version:1,encapContentInfo:new Xh({eContentType:"1.2.840.113549.1.7.1",eContent:new qe({valueHex:n})}),certificates:[e.signingCertificate]}),i=await t.digest({name:e.hashAlgorithm},new Uint8Array(n)),a=[];a.push(new pn({type:"1.2.840.113549.1.9.3",values:[new ot({value:"1.2.840.113549.1.7.1"})]})),a.push(new pn({type:"1.2.840.113549.1.9.5",values:[new _f({valueDate:new Date})]})),a.push(new pn({type:"1.2.840.113549.1.9.4",values:[new qe({valueHex:i})]})),s.signerInfos.push(new JC({version:1,sid:new ns({issuer:e.signingCertificate.issuer,serialNumber:e.signingCertificate.serialNumber}),signedAttrs:new ri({type:0,attributes:a})})),await s.sign(e.privateKey,0,e.hashAlgorithm,void 0,t),this.authSafe=new sn({contentType:"1.2.840.113549.1.7.2",content:s.toSchema(!0)})}break;default:throw new Error(`Parameter "integrityMode" has unknown value: ${this.parsedValue.integrityMode}`)}}async parseInternalValues(e,t=kt(!0)){switch(Ir.assert(e,"parameters","object"),e.checkIntegrity===void 0&&(e.checkIntegrity=!0),this.parsedValue={},this.authSafe.contentType){case sn.DATA:{gr.assertEmpty(e.password,"password"),this.parsedValue.integrityMode=0,Ir.assert(this.authSafe.content,"authSafe.content",qe);let n=this.authSafe.content.getValue();if(this.parsedValue.authenticatedSafe=PR.fromBER(n),e.checkIntegrity){if(!this.macData)throw new Error('Absent "macData" value, can not check PKCS#12 data integrity');let s=t.getAlgorithmByOID(this.macData.mac.digestAlgorithm.algorithmId,!0,"digestAlgorithm");if(!await t.verifyDataStampedWithPassword({password:e.password,hashAlgorithm:s.name,salt:vt.toArrayBuffer(this.macData.macSalt.valueBlock.valueHexView),iterationCount:this.macData.iterations||1,contentToVerify:n,signatureToVerify:vt.toArrayBuffer(this.macData.mac.digest.valueBlock.valueHexView)}))throw new Error("Integrity for the PKCS#12 data is broken!")}}break;case sn.SIGNED_DATA:{this.parsedValue.integrityMode=1;let n=new T0({schema:this.authSafe.content}),s=n.encapContentInfo.eContent;gr.assert(s,"eContent","cmsSigned.encapContentInfo"),Ir.assert(s,"eContent",qe);let i=s.getValue();if(this.parsedValue.authenticatedSafe=PR.fromBER(i),!await n.verify({signer:0,checkChain:!1},t))throw new Error("Integrity for the PKCS#12 data is broken!")}break;default:throw new Error(`Incorrect value for "this.authSafe.contentType": ${this.authSafe.contentType}`)}}};uge.CLASS_NAME="PFX";var v0="status",Il="statusStrings",_l="failInfo",cge=[v0,Il,_l],_7;(function(r){r[r.granted=0]="granted",r[r.grantedWithMods=1]="grantedWithMods",r[r.rejection=2]="rejection",r[r.waiting=3]="waiting",r[r.revocationWarning=4]="revocationWarning",r[r.revocationNotification=5]="revocationNotification"})(_7||(_7={}));var Ix=class Kh extends Re{static{o(this,"PKIStatusInfo")}constructor(e={}){super(),this.status=O(e,v0,Kh.defaultValues(v0)),Il in e&&(this.statusStrings=O(e,Il,Kh.defaultValues(Il))),_l in e&&(this.failInfo=O(e,_l,Kh.defaultValues(_l))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case v0:return 2;case Il:return[];case _l:return new Gt;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case v0:return t===Kh.defaultValues(e);case Il:return t.length===0;case _l:return t.isEqual(Kh.defaultValues(e));default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new xe({name:t.status||V}),new J({optional:!0,value:[new Bt({name:t.statusStrings||V,value:new Wi})]}),new Gt({name:t.failInfo||V,optional:!0})]})}fromSchema(e){ke(e,cge);let t=Be(e,e,Kh.schema({names:{status:v0,statusStrings:Il,failInfo:_l}}));Te.assertSchema(t,this.className);let n=t.result.status;if(n.valueBlock.isHexOnly===!0||n.valueBlock.valueDec<0||n.valueBlock.valueDec>5)throw new Error('PKIStatusInfo "status" has invalid value');this.status=n.valueBlock.valueDec,Il in t.result&&(this.statusStrings=t.result.statusStrings),_l in t.result&&(this.failInfo=t.result.failInfo)}toSchema(){let e=[];return e.push(new xe({value:this.status})),this.statusStrings&&e.push(new J({optional:!0,value:this.statusStrings})),this.failInfo&&e.push(this.failInfo),new J({value:e})}toJSON(){let e={status:this.status};return this.statusStrings&&(e.statusStrings=Array.from(this.statusStrings,t=>t.toJSON())),this.failInfo&&(e.failInfo=this.failInfo.toJSON()),e}};Ix.CLASS_NAME="PKIStatusInfo";var _x="version",Dx="messageImprint",y0="reqPolicy",x0="nonce",Eu="certReq",w0="extensions",rp="TimeStampReq",ZR=`${rp}.${_x}`,eO=`${rp}.${Dx}`,AC=`${rp}.${y0}`,CC=`${rp}.${x0}`,NC=`${rp}.${Eu}`,TC=`${rp}.${w0}`,lge=[ZR,eO,AC,CC,NC,TC],fge=class Zi extends Re{static{o(this,"TimeStampReq")}constructor(e={}){super(),this.version=O(e,_x,Zi.defaultValues(_x)),this.messageImprint=O(e,Dx,Zi.defaultValues(Dx)),y0 in e&&(this.reqPolicy=O(e,y0,Zi.defaultValues(y0))),x0 in e&&(this.nonce=O(e,x0,Zi.defaultValues(x0))),Eu in e&&(this.certReq=O(e,Eu,Zi.defaultValues(Eu))),w0 in e&&(this.extensions=O(e,w0,Zi.defaultValues(w0))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case _x:return 0;case Dx:return new _a;case y0:return V;case x0:return new xe;case Eu:return!1;case w0:return[];default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case _x:case y0:case Eu:return t===Zi.defaultValues(e);case Dx:return _a.compareWithDefault("hashAlgorithm",t.hashAlgorithm)&&_a.compareWithDefault("hashedMessage",t.hashedMessage);case x0:return t.isEqual(Zi.defaultValues(e));case w0:return t.length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||rp,value:[new xe({name:t.version||ZR}),_a.schema(t.messageImprint||{names:{blockName:eO}}),new ot({name:t.reqPolicy||AC,optional:!0}),new xe({name:t.nonce||CC,optional:!0}),new Ea({name:t.certReq||NC,optional:!0}),new fe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[new Bt({name:t.extensions||TC,value:ea.schema()})]})]})}fromSchema(e){ke(e,lge);let t=Be(e,e,Zi.schema());Te.assertSchema(t,this.className),this.version=t.result[ZR].valueBlock.valueDec,this.messageImprint=new _a({schema:t.result[eO]}),AC in t.result&&(this.reqPolicy=t.result[AC].valueBlock.toString()),CC in t.result&&(this.nonce=t.result[CC]),NC in t.result&&(this.certReq=t.result[NC].valueBlock.value),TC in t.result&&(this.extensions=Array.from(t.result[TC],n=>new ea({schema:n})))}toSchema(){let e=[];return e.push(new xe({value:this.version})),e.push(this.messageImprint.toSchema()),this.reqPolicy&&e.push(new ot({value:this.reqPolicy})),this.nonce&&e.push(this.nonce),Eu in this&&Zi.compareWithDefault(Eu,this.certReq)===!1&&e.push(new Ea({value:this.certReq})),this.extensions&&e.push(new fe({idBlock:{tagClass:3,tagNumber:0},value:Array.from(this.extensions,t=>t.toSchema())})),new J({value:e})}toJSON(){let e={version:this.version,messageImprint:this.messageImprint.toJSON()};return this.reqPolicy!==void 0&&(e.reqPolicy=this.reqPolicy),this.nonce!==void 0&&(e.nonce=this.nonce.toJSON()),this.certReq!==void 0&&Zi.compareWithDefault(Eu,this.certReq)===!1&&(e.certReq=this.certReq),this.extensions&&(e.extensions=Array.from(this.extensions,t=>t.toJSON())),e}};fge.CLASS_NAME="TimeStampReq";var E0="status",S0="timeStampToken",wO="TimeStampResp",tO=`${wO}.${E0}`,IC=`${wO}.${S0}`,hge=[tO,IC],pge=class _C extends Re{static{o(this,"TimeStampResp")}constructor(e={}){super(),this.status=O(e,E0,_C.defaultValues(E0)),S0 in e&&(this.timeStampToken=O(e,S0,_C.defaultValues(S0))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case E0:return new Ix;case S0:return new sn;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case E0:return Ix.compareWithDefault(E0,t.status)&&!("statusStrings"in t)&&!("failInfo"in t);case S0:return t.contentType===V&&t.content instanceof bt;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||wO,value:[Ix.schema(t.status||{names:{blockName:tO}}),sn.schema(t.timeStampToken||{names:{blockName:IC,optional:!0}})]})}fromSchema(e){ke(e,hge);let t=Be(e,e,_C.schema());Te.assertSchema(t,this.className),this.status=new Ix({schema:t.result[tO]}),IC in t.result&&(this.timeStampToken=new sn({schema:t.result[IC]}))}toSchema(){let e=[];return e.push(this.status.toSchema()),this.timeStampToken&&e.push(this.timeStampToken.toSchema()),new J({value:e})}toJSON(){let e={status:this.status.toJSON()};return this.timeStampToken&&(e.timeStampToken=this.timeStampToken.toJSON()),e}async sign(e,t,n=kt(!0)){return this.assertContentType(),new T0({schema:this.timeStampToken.content}).sign(e,0,t,void 0,n)}async verify(e={signer:0,trustedCerts:[],data:hn},t=kt(!0)){return this.assertContentType(),new T0({schema:this.timeStampToken.content}).verify(e,t)}assertContentType(){if(!this.timeStampToken)throw new Error("timeStampToken is absent in TSP response");if(this.timeStampToken.contentType!==M7)throw new Error(`Wrong format of timeStampToken: ${this.timeStampToken.contentType}`)}};pge.CLASS_NAME="TimeStampResp";function dge(){if(typeof globalThis<"u"&&"crypto"in globalThis){let r="webcrypto";"webkitSubtle"in globalThis.crypto&&(r="safari"),DC(r,new N0({name:r,crypto:globalThis.crypto}))}else if(typeof crypto<"u"&&"webcrypto"in crypto){let r="NodeJS ^15",e=crypto.webcrypto;DC(r,new N0({name:r,crypto:e}))}}o(dge,"initCryptoEngine");dge();var EO=null,An=class{static{o(this,"Application")}static setEngine(e,t){EO=Object.assign(t,{name:e}),DC(e,new N0({name:e,crypto:t}))}static get crypto(){if(!EO)throw new $e(De.CRYPTOGRAPHIC_NO_MODULE);return EO}static isNodePlugin(){return typeof self>"u"&&typeof window>"u"}};function mge(){An.isNodePlugin()||An.setEngine("W3 WebCrypto module",self.crypto)}o(mge,"init");mge();var YC=class{static{o(this,"XmlAlgorithm")}getAlgorithmName(){return this.namespaceURI}},np=class extends YC{static{o(this,"HashAlgorithm")}async Digest(e){let t;if(typeof e=="string")t=Ar.FromString(e,"utf8");else if(ArrayBuffer.isView(e))t=new Uint8Array(e.buffer);else if(e instanceof ArrayBuffer)t=new Uint8Array(e);else{let s=xa(e);t=Ar.FromString(s,"utf8")}let n=await An.crypto.subtle.digest(this.algorithm,t);return new Uint8Array(n)}},Cn=class extends YC{static{o(this,"SignatureAlgorithm")}async Sign(e,t,n){let s=Ar.FromString(e,"utf8");return An.crypto.subtle.sign(n,t,s)}async Verify(e,t,n){let s=this.algorithm,i=Ar.FromString(e,"utf8");return An.crypto.subtle.verify(s,t,n,i)}};var $n="SHA-1",ss="SHA-256",is="SHA-384",as="SHA-512",D0="http://www.w3.org/2000/09/xmldsig#sha1",B0="http://www.w3.org/2001/04/xmlenc#sha256",R0="http://www.w3.org/2001/04/xmldsig-more#sha384",O0="http://www.w3.org/2001/04/xmlenc#sha512",QC=class extends np{static{o(this,"Sha1")}constructor(){super(...arguments),this.algorithm={name:$n},this.namespaceURI=D0}},Hx=class extends np{static{o(this,"Sha256")}constructor(){super(...arguments),this.algorithm={name:ss},this.namespaceURI=B0}},ZC=class extends np{static{o(this,"Sha384")}constructor(){super(...arguments),this.algorithm={name:is},this.namespaceURI=R0}},e2=class extends np{static{o(this,"Sha512")}constructor(){super(...arguments),this.algorithm={name:as},this.namespaceURI=O0}};var Au="ECDSA",t2="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1",r2="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha256",n2="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha384",s2="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha512";function i2(r){if(r.name.toUpperCase()===Au.toUpperCase())switch(r.hash.name.toUpperCase()){case $n:return new P0;case ss:return new k0;case is:return new L0;case as:return new V0}return null}o(i2,"fromAlgorithm");var P0=class extends Cn{static{o(this,"EcdsaSha1")}constructor(){super(...arguments),this.algorithm={name:Au,hash:{name:$n}},this.namespaceURI=t2}static fromAlgorithm(e){return i2(e)}},k0=class extends Cn{static{o(this,"EcdsaSha256")}constructor(){super(...arguments),this.algorithm={name:Au,hash:{name:ss}},this.namespaceURI=r2}static fromAlgorithm(e){return i2(e)}},L0=class extends Cn{static{o(this,"EcdsaSha384")}constructor(){super(...arguments),this.algorithm={name:Au,hash:{name:is}},this.namespaceURI=n2}static fromAlgorithm(e){return i2(e)}},V0=class extends Cn{static{o(this,"EcdsaSha512")}constructor(){super(...arguments),this.algorithm={name:Au,hash:{name:as}},this.namespaceURI=s2}static fromAlgorithm(e){return i2(e)}};var U0="HMAC",SO="http://www.w3.org/2000/09/xmldsig#hmac-sha1",bO="http://www.w3.org/2001/04/xmldsig-more#hmac-sha256",AO="http://www.w3.org/2001/04/xmldsig-more#hmac-sha384",CO="http://www.w3.org/2001/04/xmldsig-more#hmac-sha512";function a2(r){if(r.name.toUpperCase()===U0.toUpperCase())switch(r.hash.name.toUpperCase()){case $n:return new Kx;case ss:return new $x;case is:return new Gx;case as:return new Xx}return null}o(a2,"fromAlgorithm");var Kx=class extends Cn{static{o(this,"HmacSha1")}constructor(){super(...arguments),this.algorithm={name:U0,hash:{name:$n}},this.namespaceURI=SO}static fromAlgorithm(e){return a2(e)}},$x=class extends Cn{static{o(this,"HmacSha256")}constructor(){super(...arguments),this.algorithm={name:U0,hash:{name:ss}},this.namespaceURI=bO}static fromAlgorithm(e){return a2(e)}},Gx=class extends Cn{static{o(this,"HmacSha384")}constructor(){super(...arguments),this.algorithm={name:U0,hash:{name:is}},this.namespaceURI=AO}static fromAlgorithm(e){return a2(e)}},Xx=class extends Cn{static{o(this,"HmacSha512")}constructor(){super(...arguments),this.algorithm={name:U0,hash:{name:as}},this.namespaceURI=CO}static fromAlgorithm(e){return a2(e)}};var Cu="RSASSA-PKCS1-v1_5",o2="http://www.w3.org/2000/09/xmldsig#rsa-sha1",u2="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256",c2="http://www.w3.org/2001/04/xmldsig-more#rsa-sha384",l2="http://www.w3.org/2001/04/xmldsig-more#rsa-sha512";function f2(r){if(r.name.toUpperCase()===Cu.toUpperCase())switch(r.hash.name.toUpperCase()){case $n:return new j0;case ss:return new F0;case is:return new M0;case as:return new q0}return null}o(f2,"fromAlgorithm");var j0=class extends Cn{static{o(this,"RsaPkcs1Sha1")}constructor(){super(...arguments),this.algorithm={name:Cu,hash:{name:$n}},this.namespaceURI=o2}static fromAlgorithm(e){return f2(e)}},F0=class extends Cn{static{o(this,"RsaPkcs1Sha256")}constructor(){super(...arguments),this.algorithm={name:Cu,hash:{name:ss}},this.namespaceURI=u2}static fromAlgorithm(e){return f2(e)}},M0=class extends Cn{static{o(this,"RsaPkcs1Sha384")}constructor(){super(...arguments),this.algorithm={name:Cu,hash:{name:is}},this.namespaceURI=c2}static fromAlgorithm(e){return f2(e)}},q0=class extends Cn{static{o(this,"RsaPkcs1Sha512")}constructor(){super(...arguments),this.algorithm={name:Cu,hash:{name:as}},this.namespaceURI=l2}static fromAlgorithm(e){return f2(e)}};function We(r,e,t,n){var s=arguments.length,i=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(r,e,t,n);else for(var u=r.length-1;u>=0;u--)(a=r[u])&&(i=(s<3?a(i):s>3?a(e,t,i):a(e,t))||i);return s>3&&i&&Object.defineProperty(e,t,i),i}o(We,"__decorate");function dt(r,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(r,e)}o(dt,"__metadata");var ye={DefaultCanonMethod:"http://www.w3.org/TR/2001/REC-xml-c14n-20010315",DefaultDigestMethod:"http://www.w3.org/2001/04/xmlenc#sha256",DefaultPrefix:"ds",ElementNames:{CanonicalizationMethod:"CanonicalizationMethod",DigestMethod:"DigestMethod",DigestValue:"DigestValue",DSAKeyValue:"DSAKeyValue",DomainParameters:"DomainParameters",EncryptedKey:"EncryptedKey",HMACOutputLength:"HMACOutputLength",RSAPSSParams:"RSAPSSParams",MaskGenerationFunction:"MaskGenerationFunction",SaltLength:"SaltLength",KeyInfo:"KeyInfo",KeyName:"KeyName",KeyValue:"KeyValue",Modulus:"Modulus",Exponent:"Exponent",Manifest:"Manifest",Object:"Object",Reference:"Reference",RetrievalMethod:"RetrievalMethod",RSAKeyValue:"RSAKeyValue",ECDSAKeyValue:"ECDSAKeyValue",NamedCurve:"NamedCurve",PublicKey:"PublicKey",Signature:"Signature",SignatureMethod:"SignatureMethod",SignatureValue:"SignatureValue",SignedInfo:"SignedInfo",Transform:"Transform",Transforms:"Transforms",X509Data:"X509Data",PGPData:"PGPData",SPKIData:"SPKIData",SPKIexp:"SPKIexp",MgmtData:"MgmtData",X509IssuerSerial:"X509IssuerSerial",X509IssuerName:"X509IssuerName",X509SerialNumber:"X509SerialNumber",X509SKI:"X509SKI",X509SubjectName:"X509SubjectName",X509Certificate:"X509Certificate",X509CRL:"X509CRL",XPath:"XPath",X:"X",Y:"Y"},AttributeNames:{Algorithm:"Algorithm",Encoding:"Encoding",Id:"Id",MimeType:"MimeType",Type:"Type",URI:"URI"},AlgorithmNamespaces:{XmlDsigBase64Transform:"http://www.w3.org/2000/09/xmldsig#base64",XmlDsigC14NTransform:"http://www.w3.org/TR/2001/REC-xml-c14n-20010315",XmlDsigC14NWithCommentsTransform:"http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments",XmlDsigEnvelopedSignatureTransform:"http://www.w3.org/2000/09/xmldsig#enveloped-signature",XmlDsigXPathTransform:"http://www.w3.org/TR/1999/REC-xpath-19991116",XmlDsigXsltTransform:"http://www.w3.org/TR/1999/REC-xslt-19991116",XmlDsigExcC14NTransform:"http://www.w3.org/2001/10/xml-exc-c14n#",XmlDsigExcC14NWithCommentsTransform:"http://www.w3.org/2001/10/xml-exc-c14n#WithComments",XmlDecryptionTransform:"http://www.w3.org/2002/07/decrypt#XML",XmlLicenseTransform:"urn:mpeg:mpeg21:2003:01-REL-R-NS:licenseTransform"},Uri:{Manifest:"http://www.w3.org/2000/09/xmldsig#Manifest"},NamespaceURI:"http://www.w3.org/2000/09/xmldsig#",NamespaceURIMore:"http://www.w3.org/2007/05/xmldsig-more#",NamespaceURIPss:"http://www.example.org/xmldsig-pss/#"};var Jr=class extends Js{static{o(this,"XmlSignatureObject")}};Jr=We([Ht({localName:"xmldsig",namespaceURI:ye.NamespaceURI,prefix:ye.DefaultPrefix})],Jr);var ta=class extends Bd{static{o(this,"XmlSignatureCollection")}};ta=We([Ht({localName:"xmldsig_collection",namespaceURI:ye.NamespaceURI,prefix:ye.DefaultPrefix})],ta);var ra=class extends Jr{static{o(this,"DigestMethod")}constructor(e){super(),e&&(this.Algorithm=e)}};We([jr({localName:ye.AttributeNames.Algorithm,required:!0,defaultValue:ye.DefaultDigestMethod}),dt("design:type",String)],ra.prototype,"Algorithm",void 0);ra=We([Ht({localName:ye.ElementNames.DigestMethod}),dt("design:paramtypes",[String])],ra);var wi=class extends Jr{static{o(this,"KeyInfoClause")}static canImportCryptoKey(e){return!1}};var gge={name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},H0=class extends wi{static{o(this,"RsaKeyValue")}constructor(){super(...arguments),this.key=null,this.jwk=null,this.keyUsage=[]}static canImportCryptoKey(e){let t=e.algorithm.name.toUpperCase();return t===Cu.toUpperCase()||t===sp.toUpperCase()}async importKey(e){let t=e.algorithm.name?e.algorithm.name.toUpperCase():"";if(t!==Cu.toUpperCase()&&t!==sp.toUpperCase())throw new $e(De.ALGORITHM_WRONG_NAME,e.algorithm.name);this.key=e;let n=await An.crypto.subtle.exportKey("jwk",e);return this.jwk=n,this.Modulus=Ar.FromBase64Url(n.n||""),this.Exponent=Ar.FromBase64Url(n.e||""),this.keyUsage=e.usages,this}async exportKey(e=gge){if(this.key)return this.key;if(!this.Modulus)throw new $e(De.CRYPTOGRAPHIC,"RsaKeyValue has no Modulus");let t=Ar.ToBase64Url(this.Modulus);if(!this.Exponent)throw new $e(De.CRYPTOGRAPHIC,"RsaKeyValue has no Exponent");let n=Ar.ToBase64Url(this.Exponent),s;switch(e.name.toUpperCase()){case Cu.toUpperCase():s="R";break;case sp.toUpperCase():s="P";break;default:throw new $e(De.ALGORITHM_NOT_SUPPORTED,e.name)}switch(e.hash.name.toUpperCase()){case $n:s+="S1";break;case ss:s+="S256";break;case is:s+="S384";break;case as:s+="S512";break}let i={kty:"RSA",alg:s,n:t,e:n,ext:!0};return An.crypto.subtle.importKey("jwk",i,e,!0,this.keyUsage)}LoadXml(e){super.LoadXml(e),this.keyUsage=["verify"]}};We([Jt({localName:ye.ElementNames.Modulus,prefix:ye.DefaultPrefix,namespaceURI:ye.NamespaceURI,required:!0,converter:Xi}),dt("design:type",Object)],H0.prototype,"Modulus",void 0);We([Jt({localName:ye.ElementNames.Exponent,prefix:ye.DefaultPrefix,namespaceURI:ye.NamespaceURI,required:!0,converter:Xi}),dt("design:type",Object)],H0.prototype,"Exponent",void 0);H0=We([Ht({localName:ye.ElementNames.RSAKeyValue})],H0);var NO="http://www.w3.org/2007/05/xmldsig-more#",TO="pss",K0=class extends Js{static{o(this,"MaskGenerationFunction")}};We([Jt({parser:ra}),dt("design:type",ra)],K0.prototype,"DigestMethod",void 0);We([jr({localName:ye.AttributeNames.Algorithm,defaultValue:"http://www.w3.org/2007/05/xmldsig-more#MGF1"}),dt("design:type",String)],K0.prototype,"Algorithm",void 0);K0=We([Ht({localName:ye.ElementNames.MaskGenerationFunction,prefix:TO,namespaceURI:NO})],K0);var Ra=class extends Js{static{o(this,"PssAlgorithmParams")}};We([Jt({parser:ra}),dt("design:type",ra)],Ra.prototype,"DigestMethod",void 0);We([Jt({parser:K0}),dt("design:type",K0)],Ra.prototype,"MGF",void 0);We([Jt({converter:Uv,prefix:TO,namespaceURI:NO}),dt("design:type",Number)],Ra.prototype,"SaltLength",void 0);We([Jt({converter:Uv}),dt("design:type",Number)],Ra.prototype,"TrailerField",void 0);Ra=We([Ht({localName:ye.ElementNames.RSAPSSParams,prefix:TO,namespaceURI:NO})],Ra);var sp="RSA-PSS",IO="http://www.w3.org/2007/05/xmldsig-more#rsa-pss",h2=class r extends Cn{static{o(this,"RsaPssWithParams")}constructor(){super(...arguments),this.algorithm={name:sp,hash:{name:$n}},this.namespaceURI=IO}static fromAlgorithm(e){let t=null;if(e.name.toUpperCase()===sp.toUpperCase()){switch(e.hash.name.toUpperCase()){case $n:t=new r;break;case ss:t=new r;break;case is:t=new r;break;case as:t=new r;break}if(t)return t.algorithm.hash.name=e.hash.name,e.saltLength&&(t.algorithm.saltLength=e.saltLength),t}return null}fromMethod(e){if(!e.Any.Some(t=>{if(t instanceof Ra){switch(t.DigestMethod.Algorithm.toLowerCase()){case D0:this.algorithm.hash.name=$n;break;case B0:this.algorithm.hash.name=ss;break;case R0:this.algorithm.hash.name=is;break;case O0:this.algorithm.hash.name=as;break;default:throw new $e(De.CRYPTOGRAPHIC,`Unsupported hash algorithm: ${t.DigestMethod.Algorithm}`)}return t.SaltLength&&(this.algorithm.saltLength=t.SaltLength),!0}return!1}))throw new $e(De.CRYPTOGRAPHIC,"RSA-PSS parameters not found in SignatureMethod")}toMethod(e){let t=new Ra;switch(this.algorithm.hash.name.toUpperCase()){case $n:t.DigestMethod.Algorithm=D0;break;case ss:t.DigestMethod.Algorithm=B0;break;case is:t.DigestMethod.Algorithm=R0;break;case as:t.DigestMethod.Algorithm=O0;break;default:throw new $e(De.CRYPTOGRAPHIC,`Unsupported hash algorithm: ${this.algorithm.hash.name}`)}this.algorithm.saltLength&&(t.SaltLength=this.algorithm.saltLength),e.Any.Add(t)}};var Ei;(function(r){r[r.BeforeDocElement=0]="BeforeDocElement",r[r.InsideDocElement=1]="InsideDocElement",r[r.AfterDocElement=2]="AfterDocElement"})(Ei||(Ei={}));var So=class{static{o(this,"XmlCanonicalizer")}constructor(e,t,n=new Rd){this.propagatedNamespaces=new Rd,this.result=[],this.visibleNamespaces=new Rd,this.inclusiveNamespacesPrefixList=[],this.state=Ei.BeforeDocElement,this.withComments=e,this.exclusive=t,this.propagatedNamespaces=n}get InclusiveNamespacesPrefixList(){return this.inclusiveNamespacesPrefixList.join(" ")}set InclusiveNamespacesPrefixList(e){this.inclusiveNamespacesPrefixList=e.split(" ")}Canonicalize(e){if(!e)throw new $e(De.CRYPTOGRAPHIC,"Parameter 1 is not Node");return this.WriteNode(e),this.result.join("")}WriteNode(e){switch(e.nodeType){case qt.Document:case qt.DocumentFragment:this.WriteDocumentNode(e);break;case qt.Element:this.WriteElementNode(e);break;case qt.CDATA:case qt.SignificantWhitespace:case qt.Text:Af(e.parentNode)||this.WriteTextNode(e);break;case qt.Whitespace:this.state===Ei.InsideDocElement&&this.WriteTextNode(e);break;case qt.Comment:this.WriteCommentNode(e);break;case qt.ProcessingInstruction:this.WriteProcessingInstructionNode(e);break;case qt.EntityReference:for(let t=0;t<e.childNodes.length;t++)this.WriteNode(e.childNodes[t]);break;case qt.Attribute:throw new $e(De.CRYPTOGRAPHIC,"Attribute node is impossible here");case qt.EndElement:throw new $e(De.CRYPTOGRAPHIC,"Attribute node is impossible here");case qt.EndEntity:throw new $e(De.CRYPTOGRAPHIC,"Attribute node is impossible here");case qt.DocumentType:case qt.Entity:case qt.Notation:case qt.XmlDeclaration:break}}WriteDocumentNode(e){this.state=Ei.BeforeDocElement;for(let t=e.firstChild;t!=null;t=t.nextSibling)this.WriteNode(t)}WriteCommentNode(e){this.withComments&&(this.state===Ei.AfterDocElement?this.result.push(`
|
|
113
|
-
<!--`):this.result.push("<!--"),this.result.push(this.NormalizeString(e.nodeValue,qt.Comment)),this.state===Ei.BeforeDocElement?this.result.push(`-->
|
|
114
|
-
`):this.result.push("-->"))}WriteTextNode(e){this.result.push(this.NormalizeString(e.nodeValue,e.nodeType))}WriteProcessingInstructionNode(e){let t=e.nodeName||e.tagName;t!=="xml"&&(this.state===Ei.AfterDocElement?this.result.push(`
|
|
115
|
-
<?`):this.result.push("<?"),this.result.push(t),e.nodeValue&&(this.result.push(" "),this.result.push(this.NormalizeString(e.nodeValue,qt.ProcessingInstruction))),this.state===Ei.BeforeDocElement?this.result.push(`?>
|
|
116
|
-
`):this.result.push("?>"))}WriteElementNode(e){let t=this.state;this.state===Ei.BeforeDocElement&&(this.state=Ei.InsideDocElement),this.result.push("<"),this.result.push(e.nodeName);let n=this.WriteNamespacesAxis(e);this.WriteAttributesAxis(e),this.result.push(">");for(let s=e.firstChild;s!=null;s=s.nextSibling)this.WriteNode(s);for(this.result.push("</"),this.result.push(e.nodeName),this.result.push(">"),t===Ei.BeforeDocElement&&(this.state=Ei.AfterDocElement);n--;)this.visibleNamespaces.Pop()}WriteNamespacesAxis(e){let t=[],n=0;for(let i=0;i<e.attributes.length;i++){let a=e.attributes[i];if(!_O(a)){if(a.prefix&&!this.IsNamespaceRendered(a.prefix,a.namespaceURI)){let h={prefix:a.prefix,namespace:a.namespaceURI};t.push(h),this.visibleNamespaces.Add(h),n++}continue}if(a.localName==="xmlns"&&!a.prefix&&!a.nodeValue){let h={prefix:a.prefix,namespace:a.nodeValue};t.push(h),this.visibleNamespaces.Add(h),n++}let u=null,c;(c=/xmlns:([\w.-]+)/.exec(a.nodeName))&&(u=c[1]);let l=!0;if(this.exclusive&&!this.IsNamespaceInclusive(e,u)){let h=xH(e,u);if(h>1)l=!1;else if(h===0)continue}if(!this.IsNamespaceRendered(u,a.nodeValue)&&l){let h={prefix:u,namespace:a.nodeValue};t.push(h),this.visibleNamespaces.Add(h),n++}}if(!this.IsNamespaceRendered(e.prefix,e.namespaceURI)&&e.namespaceURI!=="http://www.w3.org/2000/xmlns/"){let i={prefix:e.prefix,namespace:e.namespaceURI};t.push(i),this.visibleNamespaces.Add(i),n++}t.sort(yge);let s=null;return t.forEach(i=>{i.prefix!==s&&(s=i.prefix,this.result.push(" xmlns"),i.prefix&&this.result.push(":"+i.prefix),this.result.push('="'),this.result.push(i.namespace||""),this.result.push('"'))}),n}WriteAttributesAxis(e){let t=[];for(let n=0;n<e.attributes.length;n++){let s=e.attributes[n];_O(s)||t.push(s)}t.sort(xge),t.forEach(n=>{n!=null&&(this.result.push(" "),this.result.push(n.nodeName),this.result.push('="'),this.result.push(this.NormalizeString(n.nodeValue,qt.Attribute)),this.result.push('"'))})}NormalizeString(e,t){let n=[];if(e)for(let s=0;s<e.length;s++){let i=e[s];i==="<"&&(t===qt.Attribute||this.IsTextNode(t))?n.push("<"):i===">"&&this.IsTextNode(t)?n.push(">"):i==="&"&&(t===qt.Attribute||this.IsTextNode(t))?n.push("&"):i==='"'&&t===qt.Attribute?n.push("""):i===" "&&t===qt.Attribute?n.push("	"):i===`
|
|
117
|
-
`&&t===qt.Attribute?n.push("
"):i==="\r"?n.push("
"):n.push(i)}return n.join("")}IsTextNode(e){switch(e){case qt.Text:case qt.CDATA:case qt.SignificantWhitespace:case qt.Whitespace:return!0}return!1}IsNamespaceInclusive(e,t){let n=t||null;return e.prefix===n?!1:this.inclusiveNamespacesPrefixList.indexOf(n||"")!==-1}IsNamespaceRendered(e,t){if(e=e||"",t=t||"",!e&&!t||e==="xml"&&t==="http://www.w3.org/XML/1998/namespace")return!0;let n=this.visibleNamespaces.GetPrefix(e);return n?n.namespace===t:!1}};function yge(r,e){return r==e?0:r?e?r.prefix?e.prefix?r.prefix<e.prefix?-1:r.prefix>e.prefix?1:0:1:-1:1:-1}o(yge,"XmlDsigC14NTransformNamespacesComparer");function xge(r,e){if(!r.namespaceURI&&e.namespaceURI)return-1;if(!e.namespaceURI&&r.namespaceURI)return 1;let t=(r.namespaceURI||"")+r.localName,n=(e.namespaceURI||"")+e.localName;return t===n?0:t<n?-1:1}o(xge,"XmlDsigC14NTransformAttributesComparer");function xH(r,e,t=0){let n=e||null;if(r.prefix===n)return++t;if(r.attributes)for(let s=0;s<r.attributes.length;s++){let i=r.attributes[s];if(!_O(i)&&e&&r.attributes[s].prefix===e)return++t}for(let s=r.firstChild;s;s=s.nextSibling)if(s.nodeType===qt.Element){let a=xH(s,e,t);if(s.nodeType===qt.Element&&a)return++t+a}return t}o(xH,"IsNamespaceUsed");function _O(r){let e=/xmlns:/;return!!(r!==null&&r.nodeType===qt.Attribute&&(r.nodeName==="xmlns"||e.test(r.nodeName)))}o(_O,"IsNamespaceNode");var p2=class extends ta{static{o(this,"SignatureMethodOther")}OnLoadXml(e){for(let t=0;t<e.childNodes.length;t++){let n=e.childNodes.item(t);if(n.nodeType!==qt.Element||n.nodeName===ye.ElementNames.HMACOutputLength)continue;let s;switch(n.localName){case ye.ElementNames.RSAPSSParams:s=Ra;break;default:break}if(s){let i=new s;i.LoadXml(n),this.Add(i)}}}};p2=We([Ht({localName:"Other"})],p2);var bo=class extends Jr{static{o(this,"SignatureMethod")}};We([jr({localName:ye.AttributeNames.Algorithm,required:!0,defaultValue:""}),dt("design:type",String)],bo.prototype,"Algorithm",void 0);We([Jt({localName:ye.ElementNames.HMACOutputLength,namespaceURI:ye.NamespaceURI,prefix:ye.DefaultPrefix,converter:Uv}),dt("design:type",Number)],bo.prototype,"HMACOutputLength",void 0);We([Jt({parser:p2,noRoot:!0,minOccurs:0}),dt("design:type",p2)],bo.prototype,"Any",void 0);bo=We([Ht({localName:ye.ElementNames.SignatureMethod})],bo);var $0=class extends Jr{static{o(this,"CanonicalizationMethod")}};We([jr({localName:ye.AttributeNames.Algorithm,required:!0,defaultValue:ye.DefaultCanonMethod}),dt("design:type",String)],$0.prototype,"Algorithm",void 0);$0=We([Ht({localName:ye.ElementNames.CanonicalizationMethod})],$0);var G0=class extends Jr{static{o(this,"DataObject")}};We([jr({localName:ye.AttributeNames.Id,defaultValue:""}),dt("design:type",String)],G0.prototype,"Id",void 0);We([jr({localName:ye.AttributeNames.MimeType,defaultValue:""}),dt("design:type",String)],G0.prototype,"MimeType",void 0);We([jr({localName:ye.AttributeNames.Encoding,defaultValue:""}),dt("design:type",String)],G0.prototype,"Encoding",void 0);G0=We([Ht({localName:ye.ElementNames.Object})],G0);var Wx=class extends ta{static{o(this,"DataObjects")}};Wx=We([Ht({localName:"xmldsig_objects",parser:G0})],Wx);var ys=class extends Jr{static{o(this,"Transform")}constructor(){super(...arguments),this.innerXml=null}GetOutput(){throw new $e(De.METHOD_NOT_IMPLEMENTED)}LoadInnerXml(e){if(!e)throw new $e(De.PARAM_REQUIRED,"node");this.innerXml=e}GetInnerXml(){return this.innerXml}};We([jr({localName:ye.AttributeNames.Algorithm,defaultValue:""}),dt("design:type",String)],ys.prototype,"Algorithm",void 0);We([Jt({localName:ye.ElementNames.XPath,defaultValue:""}),dt("design:type",String)],ys.prototype,"XPath",void 0);ys=We([Ht({localName:ye.ElementNames.Transform})],ys);var Nu=class extends ys{static{o(this,"XmlDsigBase64Transform")}constructor(){super(...arguments),this.Algorithm=ye.AlgorithmNamespaces.XmlDsigBase64Transform}GetOutput(){if(!this.innerXml)throw new $e(De.PARAM_REQUIRED,"innerXml");return Ar.FromString(this.innerXml.textContent||"","base64")}};var Ao=class extends ys{static{o(this,"XmlDsigC14NTransform")}constructor(){super(...arguments),this.Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315",this.xmlCanonicalizer=new So(!1,!1)}GetOutput(){if(!this.innerXml)throw new $e(De.PARAM_REQUIRED,"innerXml");return this.xmlCanonicalizer.Canonicalize(this.innerXml)}},Co=class extends Ao{static{o(this,"XmlDsigC14NWithCommentsTransform")}constructor(){super(...arguments),this.Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments",this.xmlCanonicalizer=new So(!0,!1)}};var Tu=class extends ys{static{o(this,"XmlDsigEnvelopedSignatureTransform")}constructor(){super(...arguments),this.Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"}GetOutput(){if(!this.innerXml)throw new $e(De.PARAM_REQUIRED,"innerXml");let e=this.innerXml.firstChild,t=[];for(;e;)gi(e)&&e.localName===ye.ElementNames.Signature&&e.namespaceURI===ye.NamespaceURI&&t.push(e),e=e.nextSibling;for(let n of t)n.parentNode?.removeChild(n);return this.innerXml}};var No=class extends ys{static{o(this,"XmlDsigExcC14NTransform")}constructor(){super(...arguments),this.Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#",this.xmlCanonicalizer=new So(!1,!0)}get InclusiveNamespacesPrefixList(){return this.xmlCanonicalizer.InclusiveNamespacesPrefixList}set InclusiveNamespacesPrefixList(e){this.xmlCanonicalizer.InclusiveNamespacesPrefixList=e}LoadXml(e){if(super.LoadXml(e),this.Element&&this.Element.childNodes)for(let t=0;t<this.Element.childNodes.length;t++){let n=this.Element.childNodes[t];if(n&&n.nodeType===1)switch(n.localName){case"InclusiveNamespaces":this.setInclusiveNamespacesElement(n);break}}}GetOutput(){if(!this.innerXml)throw new $e(De.PARAM_REQUIRED,"innerXml");return this.xmlCanonicalizer.Canonicalize(this.innerXml)}setInclusiveNamespacesElement(e){let t=e.getAttribute("PrefixList");t&&t.length>0&&(this.xmlCanonicalizer.InclusiveNamespacesPrefixList=t)}},To=class extends No{static{o(this,"XmlDsigExcC14NWithCommentsTransform")}constructor(){super(...arguments),this.Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#WithComments",this.xmlCanonicalizer=new So(!0,!0)}};function wH(r){return r.parentNode?wH(r.parentNode):r}o(wH,"lookupParentNode");var X0=class extends ys{static{o(this,"XmlDsigXPathTransform")}constructor(){super(...arguments),this.Algorithm=ye.AlgorithmNamespaces.XmlDsigXPathTransform}GetOutput(){if(!this.innerXml)throw new $e(De.PARAM_REQUIRED,"innerXml");this.Filter(wH(this.innerXml),this.XPath)}Filter(e,t){let n=e.childNodes,s=[];for(let i=0;n&&i<n.length;i++){let a=n.item(i);s.push(a)}s.forEach(i=>{this.Evaluate(i,t)?i.parentNode&&i.parentNode.removeChild(i):this.Filter(i,t)})}GetEvaluator(e){return typeof self<"u"?e.ownerDocument==null?e:e.ownerDocument:Dd("xpath")}Evaluate(e,t){try{let n=this.GetEvaluator(e),s=this.GetXml();if(!s||!s.firstChild)throw new Error("XML element or firstChild is not defined");let i=s.firstChild,a=`boolean(${t})`,u=typeof self>"u"?Dd("xpath"):self;return!n.evaluate(a,e,{lookupNamespaceURI:o(l=>i.lookupNamespaceURI(l),"lookupNamespaceURI")},u.XPathResult.ANY_TYPE,null).booleanValue}catch{return!1}}};We([Jt({localName:ye.ElementNames.XPath,namespaceURI:ye.NamespaceURI,prefix:ye.DefaultPrefix,required:!0}),dt("design:type",String)],X0.prototype,"XPath",void 0);var W0=class extends ta{static{o(this,"Transforms")}OnLoadXml(e){super.OnLoadXml(e),this.items=this.GetIterator().map(t=>{switch(t.Algorithm){case ye.AlgorithmNamespaces.XmlDsigEnvelopedSignatureTransform:return ip(t,Tu);case ye.AlgorithmNamespaces.XmlDsigC14NTransform:return ip(t,Ao);case ye.AlgorithmNamespaces.XmlDsigC14NWithCommentsTransform:return ip(t,Co);case ye.AlgorithmNamespaces.XmlDsigExcC14NTransform:return ip(t,No);case ye.AlgorithmNamespaces.XmlDsigExcC14NWithCommentsTransform:return ip(t,To);case ye.AlgorithmNamespaces.XmlDsigBase64Transform:return ip(t,Nu);case ye.AlgorithmNamespaces.XmlDsigXPathTransform:return ip(t,X0);default:try{let n=zx.CreateFromName(t.Algorithm);if(!t.Element)throw new Error("Transform element is not defined");return n.LoadXml(t.Element),n}catch{throw new $e(De.CRYPTOGRAPHIC_UNKNOWN_TRANSFORM,t.Algorithm)}}})}};W0=We([Ht({localName:ye.ElementNames.Transforms,parser:ys})],W0);function ip(r,e){let t=new e;if(!r.Element)throw new Error("Transform element is not defined");return t.LoadXml(r.Element),t}o(ip,"ChangeTransform");var Io=class extends Jr{static{o(this,"Reference")}constructor(e){super(),this.DigestMethod=new ra,e&&(this.Uri=e)}};We([jr({defaultValue:""}),dt("design:type",String)],Io.prototype,"Id",void 0);We([jr({localName:ye.AttributeNames.URI}),dt("design:type",String)],Io.prototype,"Uri",void 0);We([jr({localName:ye.AttributeNames.Type,defaultValue:""}),dt("design:type",String)],Io.prototype,"Type",void 0);We([Jt({parser:W0}),dt("design:type",W0)],Io.prototype,"Transforms",void 0);We([Jt({required:!0,parser:ra}),dt("design:type",ra)],Io.prototype,"DigestMethod",void 0);We([Jt({required:!0,localName:ye.ElementNames.DigestValue,namespaceURI:ye.NamespaceURI,prefix:ye.DefaultPrefix,converter:Xi}),dt("design:type",Uint8Array)],Io.prototype,"DigestValue",void 0);Io=We([Ht({localName:ye.ElementNames.Reference}),dt("design:paramtypes",[String])],Io);var z0=class extends ta{static{o(this,"References")}};z0=We([Ht({localName:"References",parser:Io})],z0);var Iu=class extends Jr{static{o(this,"SignedInfo")}};We([jr({localName:ye.AttributeNames.Id,defaultValue:""}),dt("design:type",String)],Iu.prototype,"Id",void 0);We([Jt({parser:$0,required:!0}),dt("design:type",$0)],Iu.prototype,"CanonicalizationMethod",void 0);We([Jt({parser:bo,required:!0}),dt("design:type",bo)],Iu.prototype,"SignatureMethod",void 0);We([Jt({parser:z0,minOccurs:1,noRoot:!0}),dt("design:type",z0)],Iu.prototype,"References",void 0);Iu=We([Ht({localName:ye.ElementNames.SignedInfo})],Iu);var Z0="http://www.w3.org/2001/04/xmldsig-more#",eg="ecdsa",ap=class extends Js{static{o(this,"EcdsaPublicKey")}};We([Jt({localName:ye.ElementNames.X,namespaceURI:Z0,prefix:eg,required:!0,converter:Xi}),dt("design:type",Uint8Array)],ap.prototype,"X",void 0);We([Jt({localName:ye.ElementNames.Y,namespaceURI:Z0,prefix:eg,required:!0,converter:Xi}),dt("design:type",Uint8Array)],ap.prototype,"Y",void 0);ap=We([Ht({localName:ye.ElementNames.PublicKey,namespaceURI:Z0,prefix:eg})],ap);var J0=class extends Js{static{o(this,"NamedCurve")}};We([jr({localName:ye.AttributeNames.URI,required:!0}),dt("design:type",String)],J0.prototype,"Uri",void 0);J0=We([Ht({localName:ye.ElementNames.NamedCurve,namespaceURI:Z0,prefix:eg})],J0);var Y0=class extends Js{static{o(this,"DomainParameters")}};We([Jt({parser:J0}),dt("design:type",J0)],Y0.prototype,"NamedCurve",void 0);Y0=We([Ht({localName:ye.ElementNames.DomainParameters,namespaceURI:Z0,prefix:eg})],Y0);var Q0=class extends wi{static{o(this,"EcdsaKeyValue")}constructor(){super(...arguments),this.name=ye.ElementNames.ECDSAKeyValue,this.key=null,this.jwk=null,this.keyUsage=null}static canImportCryptoKey(e){return e.algorithm.name.toUpperCase()===Au.toUpperCase()}get NamedCurve(){return SH(this.DomainParameters.NamedCurve.Uri)}async importKey(e){if(!e.algorithm.name||e.algorithm.name.toUpperCase()!=="ECDSA")throw new $e(De.ALGORITHM_WRONG_NAME,e.algorithm.name);let t=await An.crypto.subtle.exportKey("jwk",e);return this.key=e,this.jwk=t,this.PublicKey=new ap,this.PublicKey.X=Ar.FromString(t.x||"","base64url"),this.PublicKey.Y=Ar.FromString(t.y||"","base64url"),this.DomainParameters||(this.DomainParameters=new Y0),this.DomainParameters.NamedCurve||(this.DomainParameters.NamedCurve=new J0),this.DomainParameters.NamedCurve.Uri=SH(t.crv||""),this.keyUsage=e.usages,this}async exportKey(e){if(this.key)return this.key;let t=Ar.ToBase64Url(this.PublicKey.X),n=Ar.ToBase64Url(this.PublicKey.Y),s=wge(this.DomainParameters.NamedCurve.Uri),i={kty:"EC",crv:s,x:t,y:n,ext:!0};this.keyUsage=["verify"];let a=await An.crypto.subtle.importKey("jwk",i,{name:"ECDSA",namedCurve:s},!0,this.keyUsage);return this.key=a,this.key}};We([Jt({parser:Y0}),dt("design:type",Y0)],Q0.prototype,"DomainParameters",void 0);We([Jt({parser:ap,required:!0}),dt("design:type",ap)],Q0.prototype,"PublicKey",void 0);Q0=We([Ht({localName:ye.ElementNames.ECDSAKeyValue,namespaceURI:Z0,prefix:eg})],Q0);function SH(r){switch(r){case"P-256":return"urn:oid:1.2.840.10045.3.1.7";case"P-384":return"urn:oid:1.3.132.0.34";case"P-521":return"urn:oid:1.3.132.0.35"}throw new $e(De.CRYPTOGRAPHIC,"Unknown NamedCurve")}o(SH,"GetNamedCurveOid");function wge(r){switch(r){case"urn:oid:1.2.840.10045.3.1.7":return"P-256";case"urn:oid:1.3.132.0.34":return"P-384";case"urn:oid:1.3.132.0.35":return"P-521"}throw new $e(De.CRYPTOGRAPHIC,"Unknown NamedCurve OID")}o(wge,"GetNamedCurveFromOid");var Ege=class extends Map{static{o(this,"KeyInfoClauseRegistry")}},Pl=new Ege;Pl.set(ye.ElementNames.RSAKeyValue,H0);Pl.set(ye.ElementNames.ECDSAKeyValue,Q0);var d2=class{static{o(this,"KeyInfoClauseFactory")}static create(e){let t=Pl.get(e);if(!t)throw new $e(De.KEY_INFO_CLAUSE_NOT_SUPPORTED,e);return new t}};var Jx=class extends wi{static{o(this,"KeyValue")}set Value(e){this.element=null,this.value=e}get Value(){return this.value}constructor(e){super(),e&&(this.Value=e)}async importKey(e){for(let[,t]of Pl)if(t.canImportCryptoKey(e)){let n=new t;return await n.importKey(e),this.Value=n,this}throw new $e(De.ALGORITHM_NOT_SUPPORTED,e.algorithm.name)}async exportKey(e){if(!this.Value)throw new $e(De.NULL_REFERENCE);return this.Value.exportKey(e)}OnGetXml(e){if(!this.Value)throw new $e(De.CRYPTOGRAPHIC,"KeyValue has empty value");let t=this.Value.GetXml();t&&e.appendChild(t)}OnLoadXml(e){for(let t=0;t<e.childNodes.length;t++){let n=e.childNodes.item(t);if(gi(n))try{let s=n.localName,i=d2.create(s);i.LoadXml(n),this.value=i;return}catch{}}throw new $e(De.CRYPTOGRAPHIC,"Unsupported KeyValue in use")}};Jx=We([Ht({localName:ye.ElementNames.KeyValue}),dt("design:paramtypes",[wi])],Jx);var Sge={"2.5.4.3":{short:"CN",long:"CommonName"},"2.5.4.6":{short:"C",long:"Country"},"2.5.4.5":{long:"DeviceSerialNumber"},"0.9.2342.19200300.100.1.25":{short:"DC",long:"DomainComponent"},"1.2.840.113549.1.9.1":{short:"E",long:"EMail"},"2.5.4.42":{short:"G",long:"GivenName"},"2.5.4.43":{short:"I",long:"Initials"},"2.5.4.7":{short:"L",long:"Locality"},"2.5.4.10":{short:"O",long:"Organization"},"2.5.4.11":{short:"OU",long:"OrganizationUnit"},"2.5.4.8":{short:"ST",long:"State"},"2.5.4.9":{short:"Street",long:"StreetAddress"},"2.5.4.4":{short:"SN",long:"SurName"},"2.5.4.12":{short:"T",long:"Title"},"1.2.840.113549.1.9.8":{long:"UnstructuredAddress"},"1.2.840.113549.1.9.2":{long:"UnstructuredName"}},tg=class{static{o(this,"X509Certificate")}constructor(e){if(this.publicKey=null,e){let t=new Uint8Array(e);this.LoadRaw(t),this.raw=t}}get SerialNumber(){return this.simpl.serialNumber.valueBlock.toString()}get Issuer(){return this.NameToString(this.simpl.issuer)}get Subject(){return this.NameToString(this.simpl.subject)}async Thumbprint(e="SHA-1"){return An.crypto.subtle.digest(e,this.raw)}get PublicKey(){return this.publicKey}GetRaw(){return this.raw}async exportKey(e){if(e){let t={algorithm:e,usages:["verify"]};if(t.algorithm.name.toUpperCase()===Au){let s=this.simpl.subjectPublicKeyInfo.toJSON();if("crv"in s&&s.crv)t.algorithm.namedCurve=s.crv;else throw new Error("Cannot get Curved name from the ECDSA public key")}this.isHashedAlgorithm(t.algorithm)&&typeof t.algorithm.hash=="string"&&(t.algorithm.hash={name:t.algorithm.hash});let n=await this.simpl.getPublicKey({algorithm:t});return this.publicKey=n,n}return this.simpl.subjectPublicKeyInfo.algorithm.algorithmId==="1.2.840.113549.1.1.1"?this.publicKey=await this.simpl.getPublicKey({algorithm:{algorithm:{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},usages:["verify"]}}):this.publicKey=await this.simpl.getPublicKey(),this.publicKey}NameToString(e,t=","){let n=[];return e.typesAndValues.forEach(s=>{let i=s.type,a=Sge[i.toString()],u=a?a.short:null;n.push(`${u||i}=${s.value.valueBlock.value}`)}),n.join(t+" ")}LoadRaw(e){this.raw=new Uint8Array(e);let t=en(this.raw.buffer);this.simpl=new vs({schema:t.result})}isHashedAlgorithm(e){return!!e.hash}};var m2=class extends Jr{static{o(this,"X509IssuerSerial")}};We([Jt({localName:ye.ElementNames.X509IssuerName,namespaceURI:ye.NamespaceURI,prefix:ye.DefaultPrefix,required:!0}),dt("design:type",String)],m2.prototype,"X509IssuerName",void 0);We([Jt({localName:ye.ElementNames.X509SerialNumber,namespaceURI:ye.NamespaceURI,prefix:ye.DefaultPrefix,required:!0}),dt("design:type",String)],m2.prototype,"X509SerialNumber",void 0);m2=We([Ht({localName:ye.ElementNames.X509IssuerSerial})],m2);var op;(function(r){r[r.None=0]="None",r[r.EndCertOnly=1]="EndCertOnly",r[r.ExcludeRoot=2]="ExcludeRoot",r[r.WholeChain=3]="WholeChain"})(op||(op={}));var rg=class extends wi{static{o(this,"KeyInfoX509Data")}constructor(e,t=op.None){if(super(),this.x509crl=null,this.SubjectKeyIdList=[],e){if(e instanceof Uint8Array)this.AddCertificate(new tg(e));else if(e instanceof tg)switch(t){case op.None:case op.EndCertOnly:this.AddCertificate(e);break;case op.ExcludeRoot:this.AddCertificatesChainFrom(e,!1);break;case op.WholeChain:this.AddCertificatesChainFrom(e,!0);break}}}async importKey(e){throw new $e(De.METHOD_NOT_SUPPORTED)}async exportKey(e){if(!this.Certificates.length)throw new $e(De.NULL_REFERENCE);return this.Key=await this.Certificates[0].exportKey(e),this.Key}get Certificates(){return this.X509CertificateList}get CRL(){return this.x509crl}set CRL(e){this.x509crl=e}get IssuerSerials(){return this.IssuerSerialList}get SubjectKeyIds(){return this.SubjectKeyIdList}get SubjectNames(){return this.SubjectNameList}AddCertificate(e){if(!e)throw new $e(De.PARAM_REQUIRED,"certificate");this.X509CertificateList||(this.X509CertificateList=[]),this.X509CertificateList.push(e)}AddIssuerSerial(e,t){if(e==null)throw new $e(De.PARAM_REQUIRED,"issuerName");this.IssuerSerialList==null&&(this.IssuerSerialList=[]);let n={issuerName:e,serialNumber:t};this.IssuerSerialList.push(n)}AddSubjectKeyId(e){if(this.SubjectKeyIdList&&(this.SubjectKeyIdList=[]),typeof e=="string"){if(e!=null){let t=Ar.FromBase64(e);this.SubjectKeyIdList.push(t)}}else this.SubjectKeyIdList.push(e)}AddSubjectName(e){this.SubjectNameList==null&&(this.SubjectNameList=[]),this.SubjectNameList.push(e)}GetXml(){let e=this.CreateDocument(),t=this.CreateElement(e),n=this.GetPrefix();if(this.IssuerSerialList!=null&&this.IssuerSerialList.length>0&&this.IssuerSerialList.forEach(s=>{let i=e.createElementNS(ye.NamespaceURI,n+ye.ElementNames.X509IssuerSerial),a=e.createElementNS(ye.NamespaceURI,n+ye.ElementNames.X509IssuerName);a.textContent=s.issuerName,i.appendChild(a);let u=e.createElementNS(ye.NamespaceURI,n+ye.ElementNames.X509SerialNumber);u.textContent=s.serialNumber,i.appendChild(u),t.appendChild(i)}),this.SubjectKeyIdList!=null&&this.SubjectKeyIdList.length>0&&this.SubjectKeyIdList.forEach(s=>{let i=e.createElementNS(ye.NamespaceURI,n+ye.ElementNames.X509SKI);i.textContent=Ar.ToBase64(s),t.appendChild(i)}),this.SubjectNameList!=null&&this.SubjectNameList.length>0&&this.SubjectNameList.forEach(s=>{let i=e.createElementNS(ye.NamespaceURI,n+ye.ElementNames.X509SubjectName);i.textContent=s,t.appendChild(i)}),this.X509CertificateList!=null&&this.X509CertificateList.length>0&&this.X509CertificateList.forEach(s=>{let i=e.createElementNS(ye.NamespaceURI,n+ye.ElementNames.X509Certificate);i.textContent=Ar.ToBase64(s.GetRaw()),t.appendChild(i)}),this.x509crl!=null){let s=e.createElementNS(ye.NamespaceURI,n+ye.ElementNames.X509CRL);s.textContent=Ar.ToBase64(this.x509crl),t.appendChild(s)}return t}LoadXml(e){super.LoadXml(e),this.IssuerSerialList&&(this.IssuerSerialList=[]),this.SubjectKeyIdList&&(this.SubjectKeyIdList=[]),this.SubjectNameList&&(this.SubjectNameList=[]),this.X509CertificateList&&(this.X509CertificateList=[]),this.x509crl=null;let t=this.GetChildren(ye.ElementNames.X509IssuerSerial);t&&t.forEach(s=>{let i=Jr.GetChild(s,ye.ElementNames.X509IssuerName,ye.NamespaceURI,!0),a=Jr.GetChild(s,ye.ElementNames.X509SerialNumber,ye.NamespaceURI,!0);i&&i.textContent&&a&&a.textContent&&this.AddIssuerSerial(i.textContent,a.textContent)}),t=this.GetChildren(ye.ElementNames.X509SKI),t&&t.forEach(s=>{if(s.textContent){let i=Ar.FromBase64(s.textContent);this.AddSubjectKeyId(i)}}),t=this.GetChildren(ye.ElementNames.X509SubjectName),t?.forEach(s=>{s.textContent&&this.AddSubjectName(s.textContent)}),t=this.GetChildren(ye.ElementNames.X509Certificate),t&&t.forEach(s=>{if(s.textContent){let i=Ar.FromBase64(s.textContent);this.AddCertificate(new tg(i))}});let n=this.GetChild(ye.ElementNames.X509CRL,!1);n&&n.textContent&&(this.x509crl=Ar.FromBase64(n.textContent))}AddCertificatesChainFrom(e,t){}};rg=We([Ht({localName:ye.ElementNames.X509Data}),dt("design:paramtypes",[Object,Object])],rg);var Yx=class extends wi{static{o(this,"SPKIData")}async importKey(e){let t=await An.crypto.subtle.exportKey("spki",e);return this.SPKIexp=new Uint8Array(t),this.Key=e,this}async exportKey(e){if(!this.SPKIexp)throw new Error("SPKI data is not defined");let t=await An.crypto.subtle.importKey("spki",this.SPKIexp,e,!0,["verify"]);return this.Key=t,t}};We([Jt({localName:ye.ElementNames.SPKIexp,namespaceURI:ye.NamespaceURI,prefix:ye.DefaultPrefix,required:!0,converter:Xi}),dt("design:type",Object)],Yx.prototype,"SPKIexp",void 0);Yx=We([Ht({localName:ye.ElementNames.SPKIData})],Yx);var up=class extends ta{static{o(this,"KeyInfo")}OnLoadXml(e){for(let t=0;t<e.childNodes.length;t++){let n=e.childNodes.item(t);if(n.nodeType!==qt.Element)continue;let s=null;switch(n.localName){case ye.ElementNames.KeyValue:s=Jx;break;case ye.ElementNames.X509Data:s=rg;break;case ye.ElementNames.SPKIData:s=Yx;break;case ye.ElementNames.KeyName:case ye.ElementNames.RetrievalMethod:case ye.ElementNames.PGPData:case ye.ElementNames.MgmtData:}if(s){let i=new s;i.LoadXml(n),this.Add(i)}}}};We([jr({localName:ye.AttributeNames.Id,defaultValue:""}),dt("design:type",String)],up.prototype,"Id",void 0);up=We([Ht({localName:ye.ElementNames.KeyInfo})],up);var kl=class extends Jr{static{o(this,"Signature")}};We([jr({localName:ye.AttributeNames.Id,defaultValue:""}),dt("design:type",String)],kl.prototype,"Id",void 0);We([Jt({parser:Iu,required:!0}),dt("design:type",Iu)],kl.prototype,"SignedInfo",void 0);We([Jt({localName:ye.ElementNames.SignatureValue,namespaceURI:ye.NamespaceURI,prefix:ye.DefaultPrefix,required:!0,converter:Xi,defaultValue:null}),dt("design:type",Object)],kl.prototype,"SignatureValue",void 0);We([Jt({parser:up}),dt("design:type",up)],kl.prototype,"KeyInfo",void 0);We([Jt({parser:Wx,noRoot:!0}),dt("design:type",Wx)],kl.prototype,"ObjectList",void 0);kl=We([Ht({localName:ye.ElementNames.Signature})],kl);var Age=class extends Map{static{o(this,"AlgorithmRegistry")}},vr=new Age;vr.set(o2,{type:"signature",algorithm:j0});vr.set(u2,{type:"signature",algorithm:F0});vr.set(c2,{type:"signature",algorithm:M0});vr.set(l2,{type:"signature",algorithm:q0});vr.set(o2,{type:"signature",algorithm:j0});vr.set(u2,{type:"signature",algorithm:F0});vr.set(c2,{type:"signature",algorithm:M0});vr.set(l2,{type:"signature",algorithm:q0});vr.set(IO,{type:"signature",algorithm:h2});vr.set(t2,{type:"signature",algorithm:P0});vr.set(r2,{type:"signature",algorithm:k0});vr.set(n2,{type:"signature",algorithm:L0});vr.set(s2,{type:"signature",algorithm:V0});vr.set(t2.toUpperCase(),{type:"signature",algorithm:P0});vr.set(r2.toUpperCase(),{type:"signature",algorithm:k0});vr.set(n2.toUpperCase(),{type:"signature",algorithm:L0});vr.set(s2.toUpperCase(),{type:"signature",algorithm:V0});vr.set(SO,{type:"signature",algorithm:Kx});vr.set(bO,{type:"signature",algorithm:$x});vr.set(AO,{type:"signature",algorithm:Gx});vr.set(CO,{type:"signature",algorithm:Xx});vr.set(D0,{type:"hash",algorithm:QC});vr.set(B0,{type:"hash",algorithm:Hx});vr.set(R0,{type:"hash",algorithm:ZC});vr.set(O0,{type:"hash",algorithm:e2});var cp=class{static{o(this,"AlgorithmFactory")}static createHashAlgorithmFromNamespace(e){for(let[t,{type:n,algorithm:s}]of vr)if(n==="hash"&&t===e)return new s;throw new $e(De.ALGORITHM_NOT_SUPPORTED,e)}static createSignatureAlgorithmFromMethod(e){for(let[t,{type:n,algorithm:s}]of vr)if(n==="signature"&&e.Algorithm===t){let i=new s;return i.fromMethod&&i.fromMethod(e),i}throw new $e(De.ALGORITHM_NOT_SUPPORTED,e.Algorithm)}static createHashAlgorithmFromAlgorithm(e){for(let[,{type:t,algorithm:n}]of vr)if(t==="hash"){let s=new n;if(s.algorithm.name.toUpperCase()===e.name.toUpperCase())return s}throw new $e(De.ALGORITHM_NOT_SUPPORTED,e.name)}static createSignatureAlgorithmFromAlgorithm(e){for(let[,{type:t,algorithm:n}]of vr)if(t==="signature"){let s=n.fromAlgorithm(e);if(s)return s}throw new $e(De.ALGORITHM_NOT_SUPPORTED,e.name)}};var Cge=class extends Map{static{o(this,"TransformRegistry")}},_u=new Cge;_u.set(ye.AlgorithmNamespaces.XmlDsigBase64Transform,Nu);_u.set(ye.AlgorithmNamespaces.XmlDsigC14NTransform,Ao);_u.set(ye.AlgorithmNamespaces.XmlDsigC14NWithCommentsTransform,Co);_u.set(ye.AlgorithmNamespaces.XmlDsigEnvelopedSignatureTransform,Tu);_u.set(ye.AlgorithmNamespaces.XmlDsigExcC14NTransform,No);_u.set(ye.AlgorithmNamespaces.XmlDsigExcC14NWithCommentsTransform,To);var zx=class{static{o(this,"CryptoConfig")}static CreateFromName(e){if(!e)throw new $e(De.PARAM_REQUIRED,"name");let t=_u.get(e);if(t)return new t;let n;switch(e){case ye.AlgorithmNamespaces.XmlDsigBase64Transform:n=new Nu;break;case ye.AlgorithmNamespaces.XmlDsigC14NTransform:n=new Ao;break;case ye.AlgorithmNamespaces.XmlDsigC14NWithCommentsTransform:n=new Co;break;case ye.AlgorithmNamespaces.XmlDsigEnvelopedSignatureTransform:n=new Tu;break;case ye.AlgorithmNamespaces.XmlDsigXPathTransform:throw new $e(De.ALGORITHM_NOT_SUPPORTED,e);case ye.AlgorithmNamespaces.XmlDsigXsltTransform:throw new $e(De.ALGORITHM_NOT_SUPPORTED,e);case ye.AlgorithmNamespaces.XmlDsigExcC14NTransform:n=new No;break;case ye.AlgorithmNamespaces.XmlDsigExcC14NWithCommentsTransform:n=new To;break;case ye.AlgorithmNamespaces.XmlDecryptionTransform:throw new $e(De.ALGORITHM_NOT_SUPPORTED,e);default:throw new $e(De.ALGORITHM_NOT_SUPPORTED,e)}return n}static CreateSignatureAlgorithm(e){return cp.createSignatureAlgorithmFromMethod(e)}static CreateHashAlgorithm(e){return cp.createHashAlgorithmFromNamespace(e)}static GetHashAlgorithm(e){let t=typeof e=="string"?{name:e}:e;return cp.createHashAlgorithmFromAlgorithm(t)}static GetSignatureAlgorithm(e){let t=typeof e=="string"?{name:e}:e;return"hash"in t&&typeof t.hash=="string"&&(t.hash={name:t.hash}),cp.createSignatureAlgorithmFromAlgorithm(t)}static CreateSignatureMethod(e){let t=new bo;return t.Algorithm=e.namespaceURI,e.toMethod&&e.toMethod(t),t}static RegisterSignatureAlgorithm(e,t){vr.set(e,{type:"signature",algorithm:t})}static RegisterHashAlgorithm(e,t){vr.set(e,{type:"hash",algorithm:t})}static RegisterKeyInfoClause(e,t){Pl.set(e,t)}static RegisterTransform(e,t){_u.set(e,t)}};var g2=Xl(H_(),1);var bH={xmldec:{version:"1.0",encoding:"UTF-8",standalone:void 0}};var AH={explicitArray:!1,explicitRoot:!1,preserveChildrenOrder:!0};var U4e={[Nr.AC]:"America/Rio_Branco",[Nr.AL]:"America/Maceio",[Nr.AM]:"America/Manaus",[Nr.AP]:"America/Belem",[Nr.BA]:"America/Bahia",[Nr.CE]:"America/Fortaleza",[Nr.DF]:"America/Sao_Paulo",[Nr.ES]:"America/Sao_Paulo",[Nr.GO]:"America/Sao_Paulo",[Nr.MA]:"America/Fortaleza",[Nr.MG]:"America/Sao_Paulo",[Nr.MS]:"America/Campo_Grande",[Nr.MT]:"America/Cuiaba",[Nr.PA]:"America/Belem",[Nr.PB]:"America/Fortaleza",[Nr.PE]:"America/Recife",[Nr.PI]:"America/Fortaleza",[Nr.PR]:"America/Sao_Paulo",[Nr.RJ]:"America/Sao_Paulo",[Nr.RN]:"America/Fortaleza",[Nr.RO]:"America/Porto_Velho",[Nr.RR]:"America/Boa_Vista",[Nr.RS]:"America/Sao_Paulo",[Nr.SC]:"America/Sao_Paulo",[Nr.SE]:"America/Maceio",[Nr.SP]:"America/Sao_Paulo",[Nr.TO]:"America/Araguaina"};var CH=class{static{o(this,"Xml2JsToolkit")}xml2js;constructor(e=Ige){this.xml2js=e,M9({XMLSerializer:g2.default.XMLSerializer,DOMParser:g2.default.DOMParser,DOMImplementation:g2.default.DOMImplementation})}async validate(e,t){if(!e||e.trim().length===0)return ls(new Wr("Please provide a valid xml content"));if(!t||t.trim().length===0)return ls(new Wr("Please provide a valid existing xsd path"));try{return await pM.validate(e,t),Bi()}catch(n){return nf(n)}}parse(e,t){return new Promise((n,s)=>new this.xml2js.Parser({...AH,...t}).parseString(e,(i,a)=>i?s(i):n(a)))}build(e,t){return Promise.resolve(new this.xml2js.Builder({...bH,...t}).buildObject(e))}digest(e,t,n=Sg){return this.hash(this.canonicalize(e,n),t)}canonicalize(e,t=Sg){let n=zs(this.clear(e));return new So(t.includeComments,t.exclusive).Canonicalize(n)}getNode(e,t){let s=zs(e).documentElement.getElementsByTagName(t).item(0);return s?this.clear(xa(s)):null}getFirstNode(e){let n=zs(e).documentElement.firstChild;return n?this.clear(xa(n)):null}getAttribute(e,t){return zs(e).documentElement.getAttribute(t)}appendNode(e,t){let n=zs(e),{documentElement:s}=zs(t);return n.documentElement.appendChild(s),this.clear(xa(n))}insertBefore(e,t,n){let s=zs(e),i=s.documentElement.getElementsByTagName(t).item(0);if(!i?.parentNode)throw new Wr(`No element found with tag "${t}" to insert before`);let{documentElement:a}=zs(n);return i.parentNode.insertBefore(a,i),this.clear(xa(s))}hash(e,t){return Tge.createHash(t).update(e,"utf8").digest().toString("base64")}clear(e){return['xmlns:default="http://www.w3.org/2000/09/xmldsig#"',' standalone="no"',"default:",":default",`
|
|
118
|
-
`,"\r"," "].reduce((n,s)=>n.replace(s,""),e.replace(/(>)\s*(<)/gm,"$1$2"))}};import{registerDecorator as _ge}from"class-validator";var NH=o(r=>(e,t)=>{_ge({name:"isDecimal",target:e.constructor,propertyName:t,options:r,validator:{validate(n){return n instanceof _p?!0:typeof n=="string"||typeof n=="number"||typeof n=="bigint"},defaultMessage(n){return`${n.property} is not a valid Decimal value`}}})},"IsDecimal");import"reflect-metadata";import{registerDecorator as TH}from"class-validator";var ng=Symbol("choice"),sg=o(r=>r==null||r==="","isEmpty"),NLe=o(r=>e=>{let{properties:t,required:n=!1,...s}=r,i=Reflect.getMetadata(ng,e)??[],a={properties:t,required:n};i.push(a),Reflect.defineMetadata(ng,i,e);for(let u of t)TH({name:"choice",target:e,propertyName:u,options:s,validator:{validate(c,l){let h=l.object,m=l.property,g=Reflect.getMetadata(ng,e);if(!g)return!0;let y=g.find(v=>v.properties.includes(m));if(!y||sg(c))return!0;for(let v of y.properties){if(v===m)continue;let E=h[v];if(!sg(E))return!1}for(let v of g)if(v!==y)for(let E of v.properties){let w=h[E];if(!sg(w))return!1}return!0},defaultMessage(c){let l=Reflect.getMetadata(ng,e);if(!l)return`${c.property} validation error`;let h=l.find(g=>g.properties.includes(c.property));if(!h)return`${c.property} validation error`;let m=c.object;for(let g of h.properties){let y=m[g];if(!sg(y)&&g!==c.property)return`${c.property} cannot be set because ${g} is already set. Only one property from this choice group is allowed.`}for(let g of l)if(g!==h)for(let y of g.properties){let v=m[y];if(!sg(v))return`${c.property} cannot be set because ${y} from a different choice group is already set.`}return`${c.property} validation error`}}});if(n)for(let u of t)TH({name:"choiceGroupRequired",target:e,propertyName:u,options:{...s,always:!0},validator:{validate(c,l){let h=l.object,m=Reflect.getMetadata(ng,e);if(!m)return!0;let g=m.find(y=>y.properties.includes(l.property));if(!g?.required)return!0;for(let y of g.properties){let v=h[y];if(!sg(v))return!0}return l.property!==g.properties[0]},defaultMessage(c){let l=Reflect.getMetadata(ng,e);if(!l)return"At least one property from a choice group must be provided";let h=l.find(m=>m.properties.includes(c.property));return h?`You must provide a value for one of the following properties: ${h.properties.join(", ")}`:"At least one property from a choice group must be provided"}}})},"Choice");import"reflect-metadata";import{Transform as Dge}from"class-transformer";var OLe=o(({fixed:r,...e}={fixed:2})=>(t,n)=>{NH(e)(t,n),Dge(({value:s})=>_p.newOrUndefined(s)?.toFixed(r))(t,n)},"TransformDecimal");import{Transform as Oge}from"class-transformer";import{IsDateString as Pge}from"class-validator";import DO from"dayjs";import Bge from"dayjs/plugin/utc.js";import Rge from"dayjs/plugin/timezone.js";DO.extend(Bge);DO.extend(Rge);var IH=DO;var HLe=o((r={})=>(e,t)=>{Oge(({value:n})=>{let s=n instanceof Date?n.toISOString():n;return s?IH(s).tz("America/Sao_Paulo").format(r.format):void 0})(e,t),Pge()(e,t)},"TransformDateString");var _H=class{static{o(this,"StateCodeAcValidator")}execute(e){if(e=e.replace(/\D/g,""),!/^01\d{11}$/.test(e))return!1;let t=e.split("").map(Number),n=t.slice(0,11),s=t[11],i=t[12],a=[4,3,2,9,8,7,6,5,4,3,2],c=n.reduce((v,E,w)=>v+E*a[w],0)%11,l=c===0||c===1?0:11-c,h=[5,4,3,2,9,8,7,6,5,4,3,2],g=[...n,l].reduce((v,E,w)=>v+E*h[w],0)%11,y=g===0||g===1?0:11-g;return s===l&&i===y}};var DH=class{static{o(this,"StateCodeAlValidator")}execute(e){let t=e.replace(/\D/g,"");if(t.length!==9||!t.startsWith("24"))return!1;let n=[9,8,7,6,5,4,3,2],s=0;for(let c=0;c<8;c++)s+=parseInt(t[c],10)*n[c];let a=s*10%11;return(a===10?0:a)===parseInt(t[8],10)}};var BH=class{static{o(this,"StateCodeAmValidator")}execute(e){let t=e.replace(/\D/g,"");if(t.length!==9)return!1;let n=[9,8,7,6,5,4,3,2],s=0;for(let a=0;a<8;a++)s+=parseInt(t[a],10)*n[a];let i;if(s<11)i=11-s;else{let a=s%11;i=a<=1?0:11-a}return i===parseInt(t[8],10)}};var RH=class{static{o(this,"StateCodeApValidator")}execute(e){let t=e.replace(/\D/g,"");if(t.length!==9||!t.startsWith("03"))return!1;let n=t.substring(0,8),s=parseInt(n,10),i,a;s>=3017001&&s<=3019022?(i=9,a=1):s>=3000001&&s<=3017e3?(i=5,a=0):(i=0,a=0);let u=[9,8,7,6,5,4,3,2],c=i;for(let m=0;m<8;m++)c+=parseInt(t[m],10)*u[m];let h=11-c%11;return h===10?h=0:h===11&&(h=a),h===parseInt(t[8],10)}};var OH=class{static{o(this,"StateCodeBaValidator")}execute(e){let t=e.replace(/\D/g,"");if(t.length!==8&&t.length!==9)return!1;let n=t.split("").map(E=>parseInt(E,10)),s=(t.length===8?n[0]:n[1])<=5||n[0]===8?10:11,i=t.length===8?[7,6,5,4,3,2]:[8,7,6,5,4,3,2],a=0;for(let E=0;E<i.length;E++)a+=n[E]*i[E];let u=a%s,c=s-u;(s===11&&u<=1||s===10&&u===0)&&(c=0);let h=(t.slice(0,t.length-2)+c.toString()).split("").map(E=>parseInt(E,10)),m=t.length===8?[8,7,6,5,4,3,2]:[9,8,7,6,5,4,3,2],g=0;for(let E=0;E<m.length;E++)g+=h[E]*m[E];let y=g%s,v=s-y;return(s===11&&y<=1||s===10&&y===0)&&(v=0),v===n[t.length-2]&&c===n[t.length-1]}};var PH=class{static{o(this,"StateCodeCeValidator")}execute(e){let t=e.replace(/\D/g,"");if(t.length!==9)return!1;let n=[9,8,7,6,5,4,3,2],s=0;for(let u=0;u<8;u++)s+=parseInt(t[u],10)*n[u];let a=11-s%11;return(a===10||a===11)&&(a=0),a===parseInt(t[8],10)}};var kH=class{static{o(this,"StateCodeDfValidator")}execute(e){let t=e.replace(/\D/g,"");if(t.length!==13||!t.startsWith("07"))return!1;let n=t.slice(0,11).split("").map(Number),s=t.slice(11).split("").map(Number),i=[2,3,4,5,6,7,8,9],a=0;for(let m=10,g=0;m>=0;m--,g=(g+1)%i.length)a+=n[m]*i[g];let u=11-a%11;(u===10||u===11)&&(u=0);let c=n.concat([u]),l=0;for(let m=11,g=0;m>=0;m--,g=(g+1)%i.length)l+=c[m]*i[g];let h=11-l%11;return(h===10||h===11)&&(h=0),u===s[0]&&h===s[1]}};var LH=class{static{o(this,"StateCodeEsValidator")}execute(e){let t=e.replace(/\D/g,"");if(t.length!==9)return!1;let n=[9,8,7,6,5,4,3,2],s=0;for(let u=0;u<8;u++)s+=parseInt(t[u],10)*n[u];let i=s%11;return(i<2?0:11-i)===parseInt(t[8],10)}};var VH=class{static{o(this,"StateCodeGoValidator")}execute(e){let t=e.replace(/\D/g,"");if(t.length!==9)return!1;let n=parseInt(t.substring(0,2));if(!(n===10||n===11||n>=20&&n<=29))return!1;let s=[9,8,7,6,5,4,3,2],i=0;for(let c=0;c<8;c++)i+=parseInt(t[c],10)*s[c];let a=i%11;return(a===0||a===1?0:11-a)===parseInt(t[8],10)}};var UH=class{static{o(this,"StateCodeMaValidator")}execute(e){let t=e.replace(/\D/g,"");if(t.length!==9||!t.startsWith("12"))return!1;let n=[9,8,7,6,5,4,3,2],s=0;for(let u=0;u<8;u++)s+=parseInt(t[u],10)*n[u];let i=s%11;return(i===0||i===1?0:11-i)===parseInt(t[8],10)}};var jH=class{static{o(this,"StateCodeMgValidator")}execute(e){let t=e.replace(/\D/g,"");if(t.length!==13)return!1;let n=t.slice(0,11),s=n.slice(0,3)+"0"+n.slice(3),i=0;for(let y=0;y<12;y++){let v=y%2===0?1:2,E=(parseInt(s[y])*v).toString();i+=E.split("").reduce((w,C)=>w+parseInt(C),0)}let u=Math.ceil(i/10)*10-i,c=n+u.toString(),l=[3,2,11,10,9,8,7,6,5,4,3,2],h=0;for(let y=0;y<12;y++)h+=parseInt(c[y])*l[y];let m=h%11,g=m<2?0:11-m;return parseInt(t[11])===u&&parseInt(t[12])===g}};var FH=class{static{o(this,"StateCodeMsValidator")}execute(e){let t=e.replace(/\D/g,"");if(t.length!==9||!(t.startsWith("28")||t.startsWith("50")))return!1;let n=[9,8,7,6,5,4,3,2],s=0;for(let c=0;c<8;c++)s+=parseInt(t[c],10)*n[c];let i=s%11,a=11-i;return(i===0||a>9?0:a)===parseInt(t[8],10)}};var MH=class{static{o(this,"StateCodeMtValidator")}execute(e){let t=e.replace(/\D/g,"");if(t.length!==11)return!1;let n=[3,2,9,8,7,6,5,4,3,2],s=0;for(let u=0;u<10;u++)s+=parseInt(t[u],10)*n[u];let i=s%11;return(i===0||i===1?0:11-i)===parseInt(t[10],10)}};var qH=class{static{o(this,"StateCodePaValidator")}execute(e){let t=e.replace(/\D/g,"");if(t.length!==9)return!1;let n=[9,8,7,6,5,4,3,2],s=0;for(let u=0;u<8;u++)s+=parseInt(t[u])*n[u];let i=s%11;return(i===0||i===1?0:11-i)===parseInt(t[8])}};var HH=class{static{o(this,"StateCodePbValidator")}execute(e){let t=e.replace(/\D/g,"");if(t.length!==9)return!1;let n=[9,8,7,6,5,4,3,2],s=0;for(let u=0;u<8;u++)s+=parseInt(t[u])*n[u];let a=11-s%11;return(a===10||a===11)&&(a=0),a===parseInt(t[8])}};var KH=class{static{o(this,"StateCodePeValidator")}execute(e){let t=e.replace(/\D/g,"");if(t.length!==9)return!1;let n=t.slice(0,7).split("").map(Number),s=[8,7,6,5,4,3,2],i=0;for(let y=0;y<7;y++)i+=n[y]*s[y];let a=i%11,u=a===0||a===1?0:11-a,c=[...n,u],l=[9,8,7,6,5,4,3,2],h=0;for(let y=0;y<8;y++)h+=c[y]*l[y];let m=h%11,g=m===0||m===1?0:11-m;return u===parseInt(t[7])&&g===parseInt(t[8])}};var $H=class{static{o(this,"StateCodePiValidator")}execute(e){let t=e.replace(/\D/g,"");if(t.length!==9)return!1;let n=[9,8,7,6,5,4,3,2],s=0;for(let u=0;u<8;u++)s+=parseInt(t[u],10)*n[u];let a=11-s%11;return(a===10||a===11)&&(a=0),a===parseInt(t[8],10)}};var GH=class{static{o(this,"StateCodePrValidator")}execute(e){let t=e.replace(/\D/g,"");if(t.length!==10)return!1;let n=t.slice(0,8).split("").map(Number),s=[3,2,7,6,5,4,3,2],i=[4,3,2,7,6,5,4,3,2],a=0;for(let m=0;m<8;m++)a+=n[m]*s[m];let u=11-a%11;u>=10&&(u=0);let c=[...n,u],l=0;for(let m=0;m<9;m++)l+=c[m]*i[m];let h=11-l%11;return h>=10&&(h=0),u===parseInt(t[8])&&h===parseInt(t[9])}};var XH=class{static{o(this,"StateCodeRjValidator")}execute(e){let t=e.replace(/\D/g,"");if(t.length!==8)return!1;let n=[2,7,6,5,4,3,2],s=0;for(let u=0;u<7;u++)s+=parseInt(t[u],10)*n[u];let i=s%11;return(i<=1?0:11-i)===parseInt(t[7],10)}};var WH=class{static{o(this,"StateCodeRnValidator")}execute(e){let t=e.replace(/\D/g,"");if(!(t.length===9||t.length===10)||!t.startsWith("20"))return!1;let n=t.length===9?[9,8,7,6,5,4,3,2]:[10,9,8,7,6,5,4,3,2],s=t.slice(0,n.length).split("").map(Number),i=0;for(let l=0;l<n.length;l++)i+=s[l]*n[l];let u=i*10%11;return(u===10?0:u)===parseInt(t[t.length-1])}};var zH=class{static{o(this,"StateCodeRoValidator")}execute(e){let t=e.replace(/\D/g,""),n,s;if(t.length===9)n=t.slice(3,8).split("").map(Number),s=[6,5,4,3,2];else if(t.length===14)n=t.slice(0,13).split("").map(Number),s=[6,5,4,3,2,9,8,7,6,5,4,3,2];else return!1;let i=0;for(let c=0;c<s.length;c++)i+=n[c]*s[c];let u=11-i%11;return(u===10||u===11)&&(u-=10),u===parseInt(t[t.length-1])}};var JH=class{static{o(this,"StateCodeRrValidator")}execute(e){let t=e.replace(/\D/g,"");if(t.length!==9||!t.startsWith("24"))return!1;let n=0;for(let i=0;i<8;i++)n+=(i+1)*parseInt(t[i],10);return n%9===parseInt(t[8],10)}};var YH=class{static{o(this,"StateCodeRsValidator")}execute(e){let t=e.replace(/\D/g,"");if(t.length!==10)return!1;let n=[2,9,8,7,6,5,4,3,2],s=0;for(let a=0;a<9;a++)s+=parseInt(t[a],10)*n[a];let i=11-s%11;return(i===10||i===11)&&(i=0),i===parseInt(t[9],10)}};var QH=class{static{o(this,"StateCodeScValidator")}execute(e){let t=e.replace(/\D/g,"");if(t.length!==9)return!1;let n=[9,8,7,6,5,4,3,2],s=0;for(let u=0;u<8;u++)s+=parseInt(t[u],10)*n[u];let a=11-s%11;return(a===10||a===11)&&(a=0),a===parseInt(t[8],10)}};var ZH=class{static{o(this,"StateCodeSeValidator")}execute(e){let t=e.replace(/\D/g,"");if(t.length!==9)return!1;let n=[9,8,7,6,5,4,3,2],s=0;for(let u=0;u<8;u++)s+=parseInt(t[u])*n[u];let a=11-s%11;return(a===10||a===11)&&(a=0),a===parseInt(t[8],10)}};var eK=class{static{o(this,"StateCodeSpValidator")}execute(e){let t=e;if(t.length!==12)return!1;let n=t.split("").map(Number),s=[1,3,4,5,6,7,8,10],i=0;for(let h=0;h<8;h++)i+=n[h]*s[h];let a=i%11%10,u=[3,2,10,9,8,7,6,5,4,3,2],c=0;for(let h=0;h<11;h++)c+=n[h]*u[h];let l=c%11%10;return a===n[8]&&l===n[11]}};var tK=class{static{o(this,"StateCodeToValidator")}execute(e){let t=e.replace(/\D/g,"");if(t.length!==11)return!1;let n=t.split(""),s=n.slice(0,2).concat(n.slice(4,10)).map(Number),i=[9,8,7,6,5,4,3,2],a=0;for(let l=0;l<i.length;l++)a+=s[l]*i[l];let u=a%11;return(u<2?0:11-u)===parseInt(t[10])}};var _d=class{static{o(this,"ASN1")}extractCertificateInfo(e){let n=e.subject.split(`
|
|
119
|
-
`).reduce((i,a)=>{let[u,c]=a.split("=").map(l=>l.trim());return!u||!c?i:i.set(u,c)},new Map),s=this.oid("2.16.76.1.3.1",e.raw);return{CNPJ:this.oid("2.16.76.1.3.3",e.raw),CPF:s,CN:n.get("CN"),O:n.get("O"),OU:n.get("OU"),ST:n.get("ST"),L:n.get("L"),C:n.get("C")}}oid(e,t){let n=this.marker(e),s=t.indexOf(n);if(s===-1)return;let i=[t.subarray(0,s),t.subarray(s)];if(i.length<=1)return;let u=i[0].subarray(-4),c=u.subarray(-2);u[0]===48?c=u:u[1]===48&&(c=u.subarray(-3));let l=Buffer.concat([c,n,i[1]]),h=this.length(l),m=n.length,g=l.subarray(2+m,2+m+h),y=g.length-c.length-2;if(y<=0||y>g.length)return;let E=g.subarray(-y).toString("utf8");return E.substring(Buffer.from(E).findIndex((w,C)=>E.charCodeAt(C)>=32&&E.charCodeAt(C)<=126))}length(e){return e.length<2?0:e[1]<=127?e[1]:Buffer.from([e[1]&15]).reduce((t,n)=>t<<8|n,0)}marker(e){let t=e.split("."),n=t.slice(2).reduce((s,i)=>{let a=this.base128(s,Number.parseInt(i,10),!0);return s.length=0,s.push(...a),s},[]);return Buffer.from([6,n.length+1,40*Number.parseInt(t[0],10)+Number.parseInt(t[1],10),...n])}base128(e,t,n){let s=[...e];if(t>127){let a=this.base128(e,Math.floor(t/128),!1);a.length=0,s.push(...a)}let i=t%128;return n?s.push(i):s.push(128|i),s}};var nK=class{static{o(this,"NativeCertificateRepository")}httpClient;signer;cache;constructor(e,t,n=new Yw){this.httpClient=e,this.signer=t,this.cache=n}async read(e){try{let{password:t,pfxPathOrBase64:n}=e;if(!n)return ls(new Wr("Certificate path is required"));let s=await this.getPfxBuffer(e);if(s.isLeft())return s;let i=Ll.default.asn1.fromDer(s.value.toString("binary")),a=Ll.default.pkcs12.pkcs12FromAsn1(i,t),{certBag:u}=Ll.default.pki.oids,l=a.getBags({bagType:u})[u];if(!l?.length)return ls(new Wr("Cannot read certificate"));let[{cert:h},...m]=l;if(!h)return ls(new Wr("Issuer Certificate not found"));let g=m.reduce((v,{cert:E})=>(E&&v.push(new v2.X509Certificate(Ll.default.pki.certificateToPem(E))),v),[]),y=new v2.X509Certificate(Ll.default.pki.certificateToPem(h));return Bi({ca:g,password:t,certificate:y,privateKey:this.getPrivateKey(a)})}catch(t){return nf(t)}}getPrivateKey(e){let{pkcs8ShroudedKeyBag:t}=Ll.default.pki.oids,s=e.getBags({bagType:t})[t]?.[0]?.key;if(s)return v2.createPrivateKey(Ll.default.pki.privateKeyToPem(s))}async sign(e,t,n=Fu.SHA1){return this.signer.sign(e,t,n)}getCertificateInfo(e){return new _d().extractCertificateInfo(e)}getStringCertificate(e){return e.raw.toString("base64")}getStringPrivateKey(e){try{return e.export({type:"pkcs8",format:"pem"})}catch{throw new Wr("Cannot extract private key")}}async getPfxBuffer(e){let{pfxPathOrBase64:t,password:n}=e,s=this.getCacheKey(t,n),i=await this.cache.get(s);if(i)return Bi(i);if(kge.isAbsolute(t)||rK.existsSync(t))return this.hitBufferOnCache(s,rK.readFileSync(t));if(this.isValidRemoteUrl(t))try{let a=await this.httpClient.get(t,{responseType:"arraybuffer"});return await this.hitBufferOnCache(s,Buffer.from(a.data))}catch(a){return nf(a)}return this.hitBufferOnCache(s,Buffer.from(t,"base64"))}getCacheKey(e,t){return v2.createHash("sha256").update(`${e}.${t}`).digest("hex")}async hitBufferOnCache(e,t){return await this.cache.set(e,t),Bi(t)}isValidRemoteUrl(e){try{return new URL(e),!0}catch{return!1}}};export{ON as a,rk as b,PN as c,Fu as d,kN as e,Nr as f,Vge as g,jge as h,U4e as i,Wr as j,nk as k,LN as l,Cp as m,ls as n,Bi as o,sk as p,ik as q,bg as r,dve as s,mve as t,qw as u,ak as v,ok as w,uk as x,Cve as y,_p as z,bk as A,Ak as B,nf as C,Yw as D,nK as E,ab as F,qD as G,fM as H,CH as I,NH as J,NLe as K,OLe as L,IH as M,HLe as N,_H as O,DH as P,BH as Q,RH as R,OH as S,PH as T,kH as U,LH as V,VH as W,UH as X,jH as Y,FH as Z,MH as _,qH as $,HH as aa,KH as ba,$H as ca,GH as da,XH as ea,WH as fa,zH as ga,JH as ha,YH as ia,QH as ja,ZH as ka,eK as la,tK as ma,_d as na};
|
|
120
|
-
/*! Bundled license information:
|
|
121
|
-
|
|
122
|
-
lodash/lodash.js:
|
|
123
|
-
(**
|
|
124
|
-
* @license
|
|
125
|
-
* Lodash <https://lodash.com/>
|
|
126
|
-
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
127
|
-
* Released under MIT license <https://lodash.com/license>
|
|
128
|
-
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
129
|
-
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
130
|
-
*)
|
|
131
|
-
|
|
132
|
-
mime-db/index.js:
|
|
133
|
-
(*!
|
|
134
|
-
* mime-db
|
|
135
|
-
* Copyright(c) 2014 Jonathan Ong
|
|
136
|
-
* Copyright(c) 2015-2022 Douglas Christopher Wilson
|
|
137
|
-
* MIT Licensed
|
|
138
|
-
*)
|
|
139
|
-
|
|
140
|
-
mime-types/index.js:
|
|
141
|
-
(*!
|
|
142
|
-
* mime-types
|
|
143
|
-
* Copyright(c) 2014 Jonathan Ong
|
|
144
|
-
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
145
|
-
* MIT Licensed
|
|
146
|
-
*)
|
|
147
|
-
|
|
148
|
-
axios/dist/node/axios.cjs:
|
|
149
|
-
(*! Axios v1.13.2 Copyright (c) 2025 Matt Zabriskie and contributors *)
|
|
150
|
-
|
|
151
|
-
js-md4/src/md4.js:
|
|
152
|
-
(**
|
|
153
|
-
* [js-md4]{@link https://github.com/emn178/js-md4}
|
|
154
|
-
*
|
|
155
|
-
* @namespace md4
|
|
156
|
-
* @version 0.3.2
|
|
157
|
-
* @author Yi-Cyuan Chen [emn178@gmail.com]
|
|
158
|
-
* @copyright Yi-Cyuan Chen 2015-2027
|
|
159
|
-
* @license MIT
|
|
160
|
-
*)
|
|
161
|
-
|
|
162
|
-
sax/lib/sax.js:
|
|
163
|
-
sax/lib/sax.js:
|
|
164
|
-
(*! http://mths.be/fromcodepoint v0.1.0 by @mathias *)
|
|
165
|
-
|
|
166
|
-
decimal.js/decimal.mjs:
|
|
167
|
-
(*!
|
|
168
|
-
* decimal.js v10.6.0
|
|
169
|
-
* An arbitrary-precision Decimal type for JavaScript.
|
|
170
|
-
* https://github.com/MikeMcl/decimal.js
|
|
171
|
-
* Copyright (c) 2025 Michael Mclaughlin <M8ch88l@gmail.com>
|
|
172
|
-
* MIT Licence
|
|
173
|
-
*)
|
|
174
|
-
|
|
175
|
-
pvtsutils/build/index.es.js:
|
|
176
|
-
(*!
|
|
177
|
-
* MIT License
|
|
178
|
-
*
|
|
179
|
-
* Copyright (c) 2017-2024 Peculiar Ventures, LLC
|
|
180
|
-
*
|
|
181
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
182
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
183
|
-
* in the Software without restriction, including without limitation the rights
|
|
184
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
185
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
186
|
-
* furnished to do so, subject to the following conditions:
|
|
187
|
-
*
|
|
188
|
-
* The above copyright notice and this permission notice shall be included in all
|
|
189
|
-
* copies or substantial portions of the Software.
|
|
190
|
-
*
|
|
191
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
192
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
193
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
194
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
195
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
196
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
197
|
-
* SOFTWARE.
|
|
198
|
-
*
|
|
199
|
-
*)
|
|
200
|
-
|
|
201
|
-
pvutils/build/utils.es.js:
|
|
202
|
-
(*!
|
|
203
|
-
Copyright (c) Peculiar Ventures, LLC
|
|
204
|
-
*)
|
|
205
|
-
|
|
206
|
-
asn1js/build/index.es.js:
|
|
207
|
-
(*!
|
|
208
|
-
* Copyright (c) 2014, GMO GlobalSign
|
|
209
|
-
* Copyright (c) 2015-2022, Peculiar Ventures
|
|
210
|
-
* All rights reserved.
|
|
211
|
-
*
|
|
212
|
-
* Author 2014-2019, Yury Strozhevsky
|
|
213
|
-
*
|
|
214
|
-
* Redistribution and use in source and binary forms, with or without modification,
|
|
215
|
-
* are permitted provided that the following conditions are met:
|
|
216
|
-
*
|
|
217
|
-
* * Redistributions of source code must retain the above copyright notice, this
|
|
218
|
-
* list of conditions and the following disclaimer.
|
|
219
|
-
*
|
|
220
|
-
* * Redistributions in binary form must reproduce the above copyright notice, this
|
|
221
|
-
* list of conditions and the following disclaimer in the documentation and/or
|
|
222
|
-
* other materials provided with the distribution.
|
|
223
|
-
*
|
|
224
|
-
* * Neither the name of the copyright holder nor the names of its
|
|
225
|
-
* contributors may be used to endorse or promote products derived from
|
|
226
|
-
* this software without specific prior written permission.
|
|
227
|
-
*
|
|
228
|
-
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
229
|
-
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
230
|
-
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
231
|
-
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
|
232
|
-
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
233
|
-
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
234
|
-
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
|
235
|
-
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
236
|
-
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
237
|
-
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
238
|
-
*
|
|
239
|
-
*)
|
|
240
|
-
|
|
241
|
-
@noble/hashes/esm/utils.js:
|
|
242
|
-
(*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
|
|
243
|
-
|
|
244
|
-
pkijs/build/index.es.js:
|
|
245
|
-
(*!
|
|
246
|
-
* Copyright (c) 2014, GlobalSign
|
|
247
|
-
* Copyright (c) 2015-2019, Peculiar Ventures
|
|
248
|
-
* All rights reserved.
|
|
249
|
-
*
|
|
250
|
-
* Author 2014-2019, Yury Strozhevsky
|
|
251
|
-
*
|
|
252
|
-
* Redistribution and use in source and binary forms, with or without modification,
|
|
253
|
-
* are permitted provided that the following conditions are met:
|
|
254
|
-
*
|
|
255
|
-
* * Redistributions of source code must retain the above copyright notice, this
|
|
256
|
-
* list of conditions and the following disclaimer.
|
|
257
|
-
*
|
|
258
|
-
* * Redistributions in binary form must reproduce the above copyright notice, this
|
|
259
|
-
* list of conditions and the following disclaimer in the documentation and/or
|
|
260
|
-
* other materials provided with the distribution.
|
|
261
|
-
*
|
|
262
|
-
* * Neither the name of the {organization} nor the names of its
|
|
263
|
-
* contributors may be used to endorse or promote products derived from
|
|
264
|
-
* this software without specific prior written permission.
|
|
265
|
-
*
|
|
266
|
-
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
267
|
-
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
268
|
-
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
269
|
-
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
|
270
|
-
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
271
|
-
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
272
|
-
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
|
273
|
-
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
274
|
-
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
275
|
-
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
276
|
-
*
|
|
277
|
-
*)
|
|
278
|
-
*/
|